@overdeck/desktop 0.49.2 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (455) hide show
  1. package/drizzle/overdeck/0000_overdeck_init.sql +1 -0
  2. package/package.json +1 -1
  3. package/server/{acceptance-criteria-CHtDkHEL.js → acceptance-criteria-B_maCGZv.js} +2 -2
  4. package/server/{active-dashboard-bundle-Byh6sP-q.js → active-dashboard-bundle-CCqpFWiz.js} +2 -2
  5. package/server/{activity-logger-Ck8qoluj.js → activity-logger-B0X2JJwM.js} +1 -1
  6. package/server/{activity-logger-BWZhVphb.js → activity-logger-SlTXYCVf.js} +3 -3
  7. package/server/{advancing-selfheal-65W4yUQi.js → advancing-selfheal-BJAfiY-C.js} +11 -6
  8. package/server/{agent-gc-BNUudFnt.js → agent-gc-bhikjoJ_.js} +11 -11
  9. package/server/{agent-idle-ONBssBN_.js → agent-idle-D-UQ7gDv.js} +11 -11
  10. package/server/{agent-state-CM8iVw5B.js → agent-state-BrUPf_7Z.js} +1 -1
  11. package/server/{agent-state-BJhGIJZe.js → agent-state-FABw8neJ.js} +344 -402
  12. package/server/{agent-state-service-CzHfoqKQ.js → agent-state-service-BAQApt97.js} +1 -1
  13. package/server/{agent-state-service-CiIuwzIs.js → agent-state-service-rDenYSlD.js} +5 -5
  14. package/server/{agents-DpCuoF65.js → agents-DixZjXWm.js} +1 -1
  15. package/server/{agents-jXgqpHca.js → agents-DzpQidT8.js} +4 -4
  16. package/server/{archive-planning-CGkU6UeL.js → archive-planning-BL1ABtW0.js} +5 -5
  17. package/server/archive-planning-D3gw32U9.js +2 -0
  18. package/server/{artifact-index-jobs-Ck4NRRkY.js → artifact-index-jobs-Cjdme0jS.js} +2 -2
  19. package/server/{assemble-CyvEBmmq.js → assemble-B_JgnCbG.js} +2 -2
  20. package/server/{auto-spawn-consent-Dc4mtM-B.js → auto-spawn-consent-BesWchEi.js} +7 -7
  21. package/server/{backlog-auto-trigger-CCEpr4YT.js → backlog-auto-trigger-COLq639j.js} +3 -3
  22. package/server/{behavior-BiCQzqyT.js → behavior-DCg8CIWC.js} +3 -3
  23. package/server/{bridge-pool-patrol-Ce8rNPym.js → bridge-pool-patrol-BDohuMRt.js} +2 -2
  24. package/server/{briefing-freshness-e_OEYZEe.js → briefing-freshness-ENa_hW_V.js} +2 -2
  25. package/server/build-info-Dx2qrVhb.js +2 -0
  26. package/server/{build-info-BRw4QlYO.js → build-info-WuZT6xyi.js} +3 -3
  27. package/server/{checkpoint-manager-DOwRGFff.js → checkpoint-manager-CSZ7aVQF.js} +2 -2
  28. package/server/{checkpoint-manager-CKr42Usw.js → checkpoint-manager-DXhGRvg4.js} +1 -1
  29. package/server/checkpoint-worker.js +1 -1
  30. package/server/{checkpoints-Cszp_0Np.js → checkpoints-DUkUsPVS.js} +2 -2
  31. package/server/{checkpoints-Cb6CWT4S.js → checkpoints-tm_w6Y4V.js} +1 -1
  32. package/server/{claude-hooks-provision-C5JHpxTS.js → claude-hooks-provision-CTh9zxEi.js} +1 -1
  33. package/server/{claude-hooks-provision-Cer2eFfj.js → claude-hooks-provision-fRofvhTN.js} +2 -2
  34. package/server/{claude-permissions-Bc5kjX1q.js → claude-permissions-DLrb9ovz.js} +18 -3
  35. package/server/{claude-settings-overlay-m-VVZej1.js → claude-settings-overlay-BYnXaTVc.js} +2 -2
  36. package/server/{claude-settings-overlay-C7rWsnya.js → claude-settings-overlay-CMS5Jab5.js} +1 -1
  37. package/server/cli-BflmtEFM.js +2 -0
  38. package/server/{cli-BmczsfD6.js → cli-CoQou1t_.js} +11 -11
  39. package/server/{cliproxy-BpYpkogS.js → cliproxy-DXDQcR3I.js} +2 -2
  40. package/server/{cliproxy-_yUU0HRY.js → cliproxy-DdhFpcXU.js} +1 -1
  41. package/server/{close-issue-CxvRD0UI.js → close-issue-CpQ0BWg-.js} +5 -5
  42. package/server/{closed-issue-reaper-nMLRi5de.js → closed-issue-reaper-CdcJRvUx.js} +13 -13
  43. package/server/{closed-issue-reaper-omOcUDBl.js → closed-issue-reaper-TymtZM37.js} +1 -1
  44. package/server/{codex-DZhFfcWu.js → codex-BValsmtK.js} +1 -1
  45. package/server/{codex-KaSKE-R3.js → codex-DYyZL8JD.js} +6 -6
  46. package/server/{compaction-continuation-Bjfi70G-.js → compaction-continuation-CVjbdGKt.js} +3 -3
  47. package/server/{config-CH1AqqIQ.js → config-CvKH7r7W.js} +1 -1
  48. package/server/{config-ZGjvuR6J.js → config-NxI9Yl2f.js} +2 -2
  49. package/server/{config-Doq_tF-f.js → config-_qaa1UXH.js} +2 -2
  50. package/server/{config-yaml-D9nfpEx1.js → config-yaml-D60AnTIu.js} +24 -9
  51. package/server/{conflict-gate-D4XCtrm2.js → conflict-gate-0dD1kxjN.js} +1 -1
  52. package/server/{conflict-gate-DcUTY4Gb.js → conflict-gate-hAUCL-un.js} +5 -5
  53. package/server/{context-layers-BBTKP-Y4.js → context-layers-CdpabJj0.js} +3 -3
  54. package/server/{context-layers-BGj2Y9l3.js → context-layers-Ds1MnEFI.js} +2 -2
  55. package/server/{continue-i7Revg8D.js → continue-CnvrUfxw.js} +2 -2
  56. package/server/{control-settings-BMoDHY1G.js → control-settings-Db0uXgVM.js} +308 -5
  57. package/server/{conversation-compaction-D4VOmF7p.js → conversation-compaction-B-1KETG9.js} +8 -8
  58. package/server/{conversation-compaction-DzIjYMfg.js → conversation-compaction-DzMXGRiJ.js} +1 -1
  59. package/server/{conversation-service-CzZUJFEx.js → conversation-service-BL-asWPX.js} +1 -1
  60. package/server/{conversation-service-tQCIbBVZ.js → conversation-service-BxIOd5ay.js} +21 -7
  61. package/server/{conversations-bFDaD5YN.js → conversations-CEMfwMt-.js} +1 -1
  62. package/server/{conversations-C75EFFjf.js → conversations-nS6QgYpD.js} +5 -5
  63. package/server/cost-3FyqKK56.js +838 -0
  64. package/server/{cost-BCWEkvro.js → cost-Cctc-Q9M.js} +3 -3
  65. package/server/{cost-CiIwxH1D.js → cost-DTuIRE4y.js} +2 -2
  66. package/server/{cost-sync-DOkdE_yB.js → cost-sync-DfmvLT9L.js} +3 -3
  67. package/server/{dag-BPc74hwj.js → dag-o-dUpw1L.js} +2 -2
  68. package/server/{dangerous-git-ops-By9iguTP.js → dangerous-git-ops-BOtXCFkT.js} +1 -1
  69. package/server/dashboard-db-worker.js +61 -11
  70. package/server/{deacon-B24dNzr8.js → deacon-CsisLmPt.js} +125 -165
  71. package/server/{deacon-canonical-state-CkvxRPck.js → deacon-canonical-state-DkdkQS5p.js} +2 -2
  72. package/server/{deacon-CzSZMtb-.js → deacon-e6py3jkM.js} +3 -3
  73. package/server/{deacon-event-client-BYIQBu0T.js → deacon-event-client-BCjHiGAY.js} +1 -1
  74. package/server/{deacon-event-client-Do6Z2gKl.js → deacon-event-client-CMQswEHX.js} +2 -2
  75. package/server/{deacon-nudge-log-CzM9JA9t.js → deacon-nudge-log-pcliw8Dr.js} +1 -1
  76. package/server/{deacon-pending-lifecycle-BObEdT-L.js → deacon-pending-lifecycle-BzaE76Xo.js} +3 -3
  77. package/server/deacon.js +11 -11
  78. package/server/{dead-end-trip-CnVmjnya.js → dead-end-trip-Bs3hxIn6.js} +3 -3
  79. package/server/dead-end-trip-DUbiRMtT.js +2 -0
  80. package/server/{delivery-gyce0vQ7.js → delivery-DhZGRShH.js} +1 -1
  81. package/server/{deploy-patrol-CEwwEYDM.js → deploy-patrol-B8sKkA8h.js} +8 -8
  82. package/server/deploy-queue--smqHLhe.js +2 -0
  83. package/server/{deploy-queue-r96ojDI3.js → deploy-queue-CCGWXFkp.js} +2 -2
  84. package/server/{deploy-window-D_3hhfxt.js → deploy-window-YuJewzmC.js} +4 -4
  85. package/server/{deploy-window-DeJK8mTK.js → deploy-window-hgsvZ3UZ.js} +1 -1
  86. package/server/{dev-supervisor-DZWwpENk.js → dev-supervisor-4SBloJHV.js} +2 -2
  87. package/server/{devcontainer-renderer-d-9dCV_2.js → devcontainer-renderer-BiJhwFNi.js} +3 -3
  88. package/server/{dist-DsLAsFSh.js → dist-CoR2sivG.js} +1 -1
  89. package/server/dist-FHv1s5ez.js +3 -0
  90. package/server/{docker-B2mUBzGk.js → docker-CWO7dcIP.js} +3 -3
  91. package/server/{docker-CRPHBylA.js → docker-DQzyMXkd.js} +1 -1
  92. package/server/{dod-DWtilRLx.js → dod-BAk5arLF.js} +1 -1
  93. package/server/{done-preflight-BDVdWed5.js → done-preflight-CGFA0M1b.js} +1 -1
  94. package/server/{done-preflight-D4ukUf-S.js → done-preflight-Cx9JGznT.js} +5 -5
  95. package/server/{durable-review-pipeline-CaCbEJSt.js → durable-review-pipeline-BOEZ0chh.js} +1 -1
  96. package/server/{durable-review-pipeline-B3OS2_He.js → durable-review-pipeline-Djx_lvFd.js} +1 -1
  97. package/server/{ensure-devcontainer-rGSh0JHK.js → ensure-devcontainer-Dk6ZMOUC.js} +1 -1
  98. package/server/{ensure-devcontainer-BUeBRjmm.js → ensure-devcontainer-DzYBBwnM.js} +4 -4
  99. package/server/{esm-shims-oAaKIa-a.js → esm-shims-deFq5Hhl.js} +1 -1
  100. package/server/{event-store-Db4w4YIY.js → event-store-C50Qt-f1.js} +1 -1
  101. package/server/{event-store-BCSgMubf.js → event-store-DTns2XZP.js} +5 -5
  102. package/server/{event-store-provider-DlSQND3V.js → event-store-provider-Bu1Qrg6v.js} +1 -1
  103. package/server/{events-B6zioJA_.js → events-B6xW8Cpm.js} +3 -3
  104. package/server/{factory-BrdqXBeK.js → factory-CWVKwKFE.js} +4 -4
  105. package/server/{feature-registry-storage-zh3ZXW6f.js → feature-registry-storage-vaxRN3WO.js} +2 -2
  106. package/server/{features-BGntOWdy.js → features-DXWwktJB.js} +2 -2
  107. package/server/{feedback-stuck-retirement-DpA5u1kt.js → feedback-stuck-retirement-CXAYe2rU.js} +2 -2
  108. package/server/{feedback-target-Ddqk93NF.js → feedback-target-DSVpi0gT.js} +1 -1
  109. package/server/{feedback-target-D7GxdUYG.js → feedback-target-yPD_wclF.js} +10 -10
  110. package/server/{feedback-writer-CH2846DP.js → feedback-writer-BzN4qvaP.js} +1 -1
  111. package/server/{feedback-writer-C1gCLFmp.js → feedback-writer-Ds1Wjsz4.js} +5 -5
  112. package/server/{flywheel-HJt7QdWP.js → flywheel-BCZS-FlW.js} +1 -1
  113. package/server/{flywheel-v1cCOBx-.js → flywheel-CC4gE_rx.js} +15 -15
  114. package/server/{flywheel-CjW2L7BS.js → flywheel-DWKd7bMc.js} +16 -16
  115. package/server/{flywheel-merge-order-4fNRN2F2.js → flywheel-merge-order-DDT3i57u.js} +1 -1
  116. package/server/{flywheel-merge-order-D_yyAlND.js → flywheel-merge-order-DJwH2KpL.js} +17 -15
  117. package/server/forge-4VVCRcF7.js +2 -0
  118. package/server/{forge-RVTCK_5X.js → forge-CHADjOFs.js} +2 -2
  119. package/server/{from-BnLgKYvw.js → from-C3dzmjSO.js} +1 -1
  120. package/server/{fs-lock-C7J-ugIf.js → fs-lock-DQ_gUxfq.js} +2 -2
  121. package/server/{fts-operations-CU0B5WUx.js → fts-operations-asZo2fh1.js} +2 -2
  122. package/server/{git-info-BSrI9owC.js → git-info-DMOSfJ9I.js} +1 -1
  123. package/server/{git-utils-CsKV0Dis.js → git-utils-BAMwn9Nf.js} +1 -1
  124. package/server/{git-utils-DW8-jIUJ.js → git-utils-BdHk8y7g.js} +4 -4
  125. package/server/{github-app-Oi5hdn1n.js → github-app-BWziYCf3.js} +1 -1
  126. package/server/{github-app-7ywLhuZO.js → github-app-BlMSzSTw.js} +2 -2
  127. package/server/{github-client-Cy0fSj1a.js → github-client-OK24qpol.js} +1 -1
  128. package/server/{github-client-DAbuXLuk.js → github-client-w6j5nVlz.js} +2 -2
  129. package/server/{github-pr-lookup-Dhh3ec1V.js → github-pr-lookup-bGcsEvLE.js} +2 -2
  130. package/server/{harness-binary-tMmgJfC1.js → harness-binary-DChiynaB.js} +2 -2
  131. package/server/{harness-resolve-DusNpVEe.js → harness-resolve-BplBEbwn.js} +4 -4
  132. package/server/{health-events-BYDZ9n2i.js → health-events-BTqsmunw.js} +1 -1
  133. package/server/{health-events-DNw9Mzw9.js → health-events-Bk3LjaJ9.js} +2 -2
  134. package/server/{hooks-BjBjxqNh.js → hooks-DJR1yR9w.js} +2 -2
  135. package/server/{hooks-B4wj32l2.js → hooks-EndRNrx9.js} +1 -1
  136. package/server/{hume-BP9YbxaE.js → hume-1FJmNDTq.js} +2 -2
  137. package/server/hume-gXLmRhmN.js +3 -0
  138. package/server/{identity-C23uY8dZ.js → identity-C3s8lyp0.js} +3 -3
  139. package/server/{idle-stack-reaper-Bw0rU9GC.js → idle-stack-reaper-CBelVOE3.js} +1 -1
  140. package/server/{idle-stack-reaper-BSxb1bln.js → idle-stack-reaper-DtoI4al6.js} +4 -4
  141. package/server/{in-flight-guard-DuxabAHT.js → in-flight-guard-B7khcBdQ.js} +1 -1
  142. package/server/{infra-CHIvOb9q.js → infra-CJRi_5Wu.js} +10 -4
  143. package/server/{injection-BYUt8ml1.js → injection-ADWQ3D0s.js} +8 -8
  144. package/server/{injection-BviePcm3.js → injection-BWsgHvrL.js} +1 -1
  145. package/server/{inspect-agent-sV_19NxZ.js → inspect-agent-CCfNJjKr.js} +12 -12
  146. package/server/inspect-agent-Dhp3hCGp.js +2 -0
  147. package/server/{internal-token-BOtIRJU7.js → internal-token-BCTEqUCX.js} +1 -1
  148. package/server/{internal-token-DoVzb4b7.js → internal-token-BeIWG_kT.js} +2 -2
  149. package/server/{io-DKrWd3gX.js → io-BCtZoXHo.js} +4 -4
  150. package/server/{issue-closed-6RQsAjDX.js → issue-closed-CiYAa6bX.js} +7 -7
  151. package/server/{issue-lifecycle-D9nLErvS.js → issue-lifecycle-BETNVVLq.js} +25 -25
  152. package/server/{issue-lifecycle-DOPVv7xz.js → issue-lifecycle-DaKN57sx.js} +1 -1
  153. package/server/{issue-service-singleton-CvgNAWqK.js → issue-service-singleton-1Q0ER8Yc.js} +1 -1
  154. package/server/{issue-service-singleton-B2xy-IS9.js → issue-service-singleton-C_sZ0HjP.js} +10 -10
  155. package/server/{issue-title-fallback-DTSCQVu0.js → issue-title-fallback-B91iD66g.js} +3 -3
  156. package/server/{issues-e_Ck1Ln2.js → issues-RGHQUKhB.js} +2 -2
  157. package/server/{jsonl-parser-DqxVCZ1k.js → jsonl-parser-Dfs1dlYE.js} +3 -3
  158. package/server/{jsonl-resolver-07OS3qOr.js → jsonl-resolver-bFtftCDd.js} +8 -8
  159. package/server/{kimi-code-vtXl2DR5.js → kimi-code-BxkDgaj4.js} +1 -1
  160. package/server/{kimi-code-BjtAHIz1.js → kimi-code-CNYRA8Dd.js} +11 -11
  161. package/server/{kimi-parser-B1lgy2Vt.js → kimi-parser-OcWwmOqF.js} +2 -2
  162. package/server/{label-cleanup-D2zUMasf.js → label-cleanup-CefxK9tL.js} +3 -3
  163. package/server/{lifecycle-DaCovZwn.js → lifecycle-DDZ7w-BY.js} +6 -6
  164. package/server/{lifecycle-0NOEzomy.js → lifecycle-DVXyUil2.js} +2 -2
  165. package/server/{lifecycle-io-BBMTaP7S.js → lifecycle-io-D1oBiMce.js} +1 -1
  166. package/server/{lifecycle-io-6WL46dsB.js → lifecycle-io-D7N0vQNj.js} +5 -5
  167. package/server/{linear-client-7fQThJTc.js → linear-client-DUN7zCeb.js} +2 -2
  168. package/server/{linear-client-BTGApNLo.js → linear-client-TL32snOy.js} +1 -1
  169. package/server/{linear-mcp-auth-B8pYRsiU.js → linear-mcp-auth-CtRKSHy5.js} +1 -1
  170. package/server/{linear-mcp-auth-Nk5s3L9M.js → linear-mcp-auth-bB0CPyjh.js} +5 -5
  171. package/server/memory-fts-worker.js +1 -1
  172. package/server/{memory-governor-Cqvbusr4.js → memory-governor-Cvv_9K0M.js} +87 -21
  173. package/server/{memory-pressure-patrol-DPb8foam.js → memory-pressure-patrol-C6DJJQRA.js} +38 -14
  174. package/server/{merge-BB_bjJ9a.js → merge-DOCR6pHi.js} +1 -1
  175. package/server/{merge-FZ78_cEz.js → merge-FTk4LsnM.js} +3 -3
  176. package/server/{merge-agent-B3jRrlS1.js → merge-agent-C-dsN9se.js} +31 -31
  177. package/server/{merge-agent-BuoC_PRZ.js → merge-agent-D-4_iQgy.js} +2 -2
  178. package/server/{merge-batch-B8bVjFWS.js → merge-batch-BJjzUUL7.js} +1 -1
  179. package/server/{merge-completeness-DQt7Qa7i.js → merge-completeness-BOtBUwTU.js} +4 -4
  180. package/server/{merge-completeness-DkdabVch.js → merge-completeness-CoLJxfUY.js} +1 -1
  181. package/server/merge-eligibility-C4rTS97F.js +3 -0
  182. package/server/merge-eligibility-D7wRnJbj.js +51 -0
  183. package/server/merge-ops-Cf02szJ5.js +2 -0
  184. package/server/merge-rebase-Bj7eJAG4.js +2 -0
  185. package/server/{merge-rebase-qq40s91P.js → merge-rebase-KBw4rdh3.js} +2 -2
  186. package/server/{merge-set-BTNYvxM3.js → merge-set-CVfEM57p.js} +1 -1
  187. package/server/{merge-set-BmRRflt0.js → merge-set-CyW-xSn4.js} +4 -4
  188. package/server/{merge-sync-0m2Q087q.js → merge-sync-CYGsJy0u.js} +1 -1
  189. package/server/{merge-sync-CJpOa0cZ.js → merge-sync-YLvOPAry.js} +2 -2
  190. package/server/{merge-train-iwKqjtCF.js → merge-train-VxLn8Ms4.js} +4 -4
  191. package/server/{merge-train-deps-CH5Mr3vN.js → merge-train-deps-D0y4hBB9.js} +4 -4
  192. package/server/{merge-verification-JJc5GC2t.js → merge-verification-BfJRNMiD.js} +6 -6
  193. package/server/{merged-docker-cleanup-worker-BOqWA373.js → merged-docker-cleanup-worker-Bh5fKG_b.js} +3 -3
  194. package/server/{merged-docker-cleanup-worker-CrhTdxZV.js → merged-docker-cleanup-worker-Ci9oeFAe.js} +1 -1
  195. package/server/{messaging-nuwStbdQ.js → messaging-Dfbhgjd6.js} +1 -1
  196. package/server/{multipart-parser-DxuW_rZV.js → multipart-parser-BYwfKOVU.js} +2 -2
  197. package/server/{no-resume-mode-xuYLFhLw.js → no-resume-mode-DjMQRkId.js} +1 -1
  198. package/server/node_modules/.package-lock.json +18 -18
  199. package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/ai-docs/package.json +2 -2
  200. package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/ai-docs/src/70_cli/10_basics.ts +4 -2
  201. package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/dist/NodeClusterSocket.d.ts.map +1 -1
  202. package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/dist/NodeClusterSocket.js +12 -9
  203. package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/dist/NodeClusterSocket.js.map +1 -1
  204. package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/dist/NodeSocket.js +1 -1
  205. package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/dist/NodeSocket.js.map +1 -1
  206. package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/package.json +6 -6
  207. package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/src/NodeClusterSocket.ts +15 -12
  208. package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/src/NodeSocket.ts +1 -1
  209. package/server/node_modules/@types/node/README.md +1 -1
  210. package/server/node_modules/@types/node/buffer.buffer.d.ts +5 -5
  211. package/server/node_modules/@types/node/crypto.d.ts +2 -2
  212. package/server/node_modules/@types/node/http.d.ts +16 -0
  213. package/server/node_modules/@types/node/http2.d.ts +10 -2
  214. package/server/node_modules/@types/node/package.json +2 -2
  215. package/server/node_modules/@types/node/process.d.ts +52 -0
  216. package/server/node_modules/@types/node/quic.d.ts +210 -28
  217. package/server/node_modules/@types/node/sqlite.d.ts +6 -2
  218. package/server/node_modules/@types/node/test.d.ts +36 -0
  219. package/server/node_modules/effect/node_modules/uuid/README.md +19 -19
  220. package/server/node_modules/effect/node_modules/uuid/dist/v1.js +7 -3
  221. package/server/node_modules/effect/node_modules/uuid/dist/v7.js +5 -2
  222. package/server/node_modules/effect/node_modules/uuid/dist-node/v1.js +7 -3
  223. package/server/node_modules/effect/node_modules/uuid/dist-node/v7.js +5 -2
  224. package/server/node_modules/effect/node_modules/uuid/package.json +4 -3
  225. package/server/node_modules/msgpackr/dist/index-no-eval.cjs +11 -5
  226. package/server/node_modules/msgpackr/dist/index-no-eval.cjs.map +1 -1
  227. package/server/node_modules/msgpackr/dist/index-no-eval.min.js +1 -1
  228. package/server/node_modules/msgpackr/dist/index-no-eval.min.js.map +1 -1
  229. package/server/node_modules/msgpackr/dist/index.js +11 -5
  230. package/server/node_modules/msgpackr/dist/index.js.map +1 -1
  231. package/server/node_modules/msgpackr/dist/index.min.js +1 -1
  232. package/server/node_modules/msgpackr/dist/index.min.js.map +1 -1
  233. package/server/node_modules/msgpackr/dist/node.cjs +11 -5
  234. package/server/node_modules/msgpackr/dist/node.cjs.map +1 -1
  235. package/server/node_modules/msgpackr/dist/test.js +11 -5
  236. package/server/node_modules/msgpackr/dist/test.js.map +1 -1
  237. package/server/node_modules/msgpackr/dist/unpack-no-eval.cjs +11 -5
  238. package/server/node_modules/msgpackr/dist/unpack-no-eval.cjs.map +1 -1
  239. package/server/node_modules/msgpackr/package.json +1 -1
  240. package/server/node_modules/msgpackr/unpack.js +11 -5
  241. package/server/node_modules/picomatch/lib/parse.js +10 -1
  242. package/server/node_modules/picomatch/lib/scan.js +30 -18
  243. package/server/node_modules/picomatch/package.json +1 -1
  244. package/server/{orphan-proposed-reconciler-gf4TxfZb.js → orphan-proposed-reconciler-CnP0K2v3.js} +2 -2
  245. package/server/{orphan-proposed-reconciler-Dmk0kO_p.js → orphan-proposed-reconciler-nFUlquZt.js} +21 -21
  246. package/server/package-lock.json +19 -19
  247. package/server/package.json +1 -1
  248. package/server/{pan-dir-BMda7tQj.js → pan-dir-B4NfzOf3.js} +4 -4
  249. package/server/{parked-residue-BiHb8cD7.js → parked-residue-8WbU0y1z.js} +68 -64
  250. package/server/{paths-DEe9j-kw.js → paths-rETQhTF2.js} +2 -2
  251. package/server/{pending-lifecycle-claim-J5uIIJPu.js → pending-lifecycle-claim-yAwDuGS4.js} +1 -1
  252. package/server/{pickup-D1UbSDPd.js → pickup-Dle6k9Xt.js} +1 -1
  253. package/server/{pipeline-agent-reader-D-6okryb.js → pipeline-agent-reader-CeWhQzXC.js} +3 -3
  254. package/server/{pipeline-membership-PGX3Pe8V.js → pipeline-membership-BV4hdkHm.js} +1 -1
  255. package/server/{pipeline-membership-CCbgBzNC.js → pipeline-membership-C9ykcjsn.js} +1 -1
  256. package/server/{pipeline-membership-gather-BK4dzh0X.js → pipeline-membership-gather-Ba0wJNCR.js} +10 -10
  257. package/server/{pipeline-membership-gather-BRhU7XPx.js → pipeline-membership-gather-C9E22B2W.js} +1 -1
  258. package/server/{pipeline-notifier-DvHLaXKb.js → pipeline-notifier-B5DPXvnr.js} +1 -1
  259. package/server/{pipeline-notifier-BNAV9kpa.js → pipeline-notifier-p190L97e.js} +2 -2
  260. package/server/{post-merge-lifecycle-worker-DAWgzXQA.js → post-merge-lifecycle-worker-OQoK8Ckg.js} +2 -2
  261. package/server/{post-merge-state-DC2_0t12.js → post-merge-state-DFaf7OI1.js} +4 -4
  262. package/server/{prd-locations-BbAvqQmT.js → prd-locations-F2oLSAhy.js} +3 -3
  263. package/server/{project-pipelines-By_5WcT4.js → project-pipelines-CUsa6U59.js} +2 -2
  264. package/server/{project-repos-3bI6t4fO.js → project-repos-BVdi9-ch.js} +1 -1
  265. package/server/{project-repos--QeCg7yQ.js → project-repos-CsfvLtmr.js} +2 -2
  266. package/server/{project-resource-refresh-queue-x-K9mvpP.js → project-resource-refresh-queue-BehrH4Ai.js} +17 -17
  267. package/server/{project-resource-refresh-queue-BaZC79S3.js → project-resource-refresh-queue-D2110Guc.js} +1 -1
  268. package/server/{projects-LftaVK99.js → projects-BMuEf14J.js} +1 -1
  269. package/server/{prompts-BotGu-6W.js → prompts-CKpDt8Jn.js} +2 -2
  270. package/server/{providers-Dqgz3MY5.js → providers-Buv2wmFU.js} +1 -1
  271. package/server/{providers-BL1I66sM.js → providers-CxPKmyif.js} +7 -7
  272. package/server/public/assets/{chunk-BO2N2NFS-D5Fz5jND.js → chunk-BO2N2NFS-DZOQVqV1.js} +4 -4
  273. package/server/public/assets/{diagram-OG6HWLK6-Eux0gWFq.js → diagram-OG6HWLK6-oKeXcbO1.js} +1 -1
  274. package/server/public/assets/{dist-D-JX_u7m.js → dist-2qPmeRzT.js} +3 -3
  275. package/server/public/assets/{dist-C3zShwhA.js → dist-ClBlE-Nm.js} +1 -1
  276. package/server/public/assets/{ganttDiagram-6RSMTGT7-UH3aweia.js → ganttDiagram-6RSMTGT7-BwdG9fQv.js} +1 -1
  277. package/server/public/assets/{highlighted-body-OFNGDK62-ccIQ-WXS.js → highlighted-body-OFNGDK62-BzGNdskQ.js} +1 -1
  278. package/server/public/assets/index-CdPveU3M.css +1 -0
  279. package/server/public/assets/{index-BTVcdPve.js → index-Cg6tdZoY.js} +149 -149
  280. package/server/public/assets/{linear-Cnnu4YQy.js → linear-DpEt1TJb.js} +1 -1
  281. package/server/public/assets/mermaid-GHXKKRXX-6KBD_3T_.js +1 -0
  282. package/server/public/assets/{pieDiagram-4H26LBE5-BD8-Tye6.js → pieDiagram-4H26LBE5-9BpM4oRJ.js} +1 -1
  283. package/server/public/assets/{prod-Ca6aKMts.js → prod-CzJiNNEG.js} +4 -4
  284. package/server/public/assets/{quadrantDiagram-W4KKPZXB-BmSrVyFD.js → quadrantDiagram-W4KKPZXB-BXWVAoZx.js} +1 -1
  285. package/server/public/assets/{sankeyDiagram-5OEKKPKP-CEGy8Das.js → sankeyDiagram-5OEKKPKP-5oxodGEw.js} +1 -1
  286. package/server/public/assets/{xychartDiagram-2RQKCTM6-VnQ8iY8s.js → xychartDiagram-2RQKCTM6-BChDrHxZ.js} +1 -1
  287. package/server/public/index.html +2 -2
  288. package/server/pull-requests-CmlandI7.js +2 -0
  289. package/server/{pull-requests-Cp_FDT8-.js → pull-requests-T0OV0Vn4.js} +3 -3
  290. package/server/{rally-bQpBzUNf.js → rally-CUqj2oIN.js} +3 -3
  291. package/server/rally-DYIn9R2U.js +3 -0
  292. package/server/{rally-api-CqAIJ8RX.js → rally-api-BFPb2oSq.js} +2 -2
  293. package/server/{rally-api-Ij1Zt0NI.js → rally-api-BoucQG1u.js} +1 -1
  294. package/server/{rally-client-qKbCNRVW.js → rally-client-16iObny7.js} +4 -4
  295. package/server/{rally-client-CN5vh4Ac.js → rally-client-CsqLjLLa.js} +1 -1
  296. package/server/{rebuild-stack-DrMyA_mA.js → rebuild-stack-BcBVFJp3.js} +2 -2
  297. package/server/{rebuild-stack-BNOMVh7C.js → rebuild-stack-CyXMrj6K.js} +6 -6
  298. package/server/reconciler-caYiRnPy.js +657 -0
  299. package/server/{reconstruct-cache-mxIYCnqs.js → reconstruct-cache-3JzPOune.js} +7 -7
  300. package/server/{record-Ug18Cp4V.js → record-DYOg97Iv.js} +1 -1
  301. package/server/{record-update-dBGxL9OC.js → record-update-BPqpBu3O.js} +5 -5
  302. package/server/{record-update-WyhsREoH.js → record-update-CDPEX7BH.js} +1 -1
  303. package/server/{recovery-trip-BKLrL6NX.js → recovery-trip-CpfW6LCJ.js} +3 -3
  304. package/server/{recovery-trip-wFAixKsg.js → recovery-trip-xqKC07Gy.js} +1 -1
  305. package/server/{release-engine-D9gaCBn9.js → release-engine-C_OOhCaK.js} +5 -5
  306. package/server/{release-set-DPHHzEGx.js → release-set-DOIDz2vw.js} +3 -3
  307. package/server/{remote-BUEeUic6.js → remote-BTh-sjpX.js} +3 -3
  308. package/server/{remote-agents-CSaTLi3u.js → remote-agents-DbbN7vSm.js} +6 -6
  309. package/server/{remote-agents-BVtASiOF.js → remote-agents-MuXx2gWm.js} +1 -1
  310. package/server/{remote-completion-CBV3b9TI.js → remote-completion-LcWCpAm2.js} +12 -12
  311. package/server/{remote-BU6ONLpv.js → remote-xY0B43Ho.js} +3 -3
  312. package/server/{resolver-gxv97jsQ.js → resolver-C2QKOf09.js} +2 -2
  313. package/server/{resolver-DvSMXty7.js → resolver-D4nsxfGo.js} +7 -7
  314. package/server/{resume-DvHuF-bm.js → resume-ByUrJUNX.js} +1 -1
  315. package/server/{review-agent-esZ0QXdY.js → review-agent-BRBTm1qE.js} +30 -30
  316. package/server/{review-agent-DgkUPRx0.js → review-agent-Caodi0PX.js} +2 -2
  317. package/server/{review-artifacts-DGGEobLp.js → review-artifacts-DgaDlbO4.js} +6 -6
  318. package/server/{review-convoy-liveness-DmO8dIBH.js → review-convoy-liveness-BBvyuRLC.js} +8 -8
  319. package/server/{review-run-recovery-DHiiw7d8.js → review-run-recovery-DCzWMMvE.js} +1 -1
  320. package/server/{review-run-recovery-Ct0q7FkE.js → review-run-recovery-THHMKlXJ.js} +2 -2
  321. package/server/{review-status-C_kQeeX0.js → review-status-Bge_3XTR.js} +1 -1
  322. package/server/{review-status-yOGD2MuK.js → review-status-DpniqzPT.js} +55 -45
  323. package/server/{review-status-emit-BZz1Y_22.js → review-status-emit-D7sM720S.js} +3 -3
  324. package/server/{review-status-enrichment-BWH0XW_m.js → review-status-enrichment-PDI4-faj.js} +3 -3
  325. package/server/{review-status-sync-2C9lk85r.js → review-status-sync-C6ZKTI8f.js} +11 -8
  326. package/server/{review-status-sync-Bq00Loey.js → review-status-sync-CvpHWyvR.js} +1 -1
  327. package/server/{review-verdict-feedback-CE_tr2iQ.js → review-verdict-feedback-B2ojHFH5.js} +7 -7
  328. package/server/{review-verdict-feedback-Brjaxoda.js → review-verdict-feedback-tyMoLT2L.js} +1 -1
  329. package/server/{review-verdict-writer-Ca2V7QSY.js → review-verdict-writer-Cy_1pnIj.js} +7 -7
  330. package/server/{review-verdict-writer-CD-4kDVx.js → review-verdict-writer-DjrJ64eS.js} +1 -1
  331. package/server/{rollup--g9ik1XQ.js → rollup-Cp0KEoOu.js} +1 -1
  332. package/server/{rollup-B6g9Nr6L.js → rollup-DU3xBQu2.js} +8 -8
  333. package/server/{scanner-YxIv-fG1.js → scanner-BFKG3Gxv.js} +7 -7
  334. package/server/{search-DqMN4__-.js → search-DhtKwbBC.js} +2 -2
  335. package/server/{sequence-io--b3_PsWq.js → sequence-io-C-Q19Jez.js} +4 -4
  336. package/server/{sequencer-agent-CqouKVZG.js → sequencer-agent-eN2P2lDz.js} +6 -6
  337. package/server/server.js +585 -282
  338. package/server/{service-CEp-3iow.js → service-CThO0Sar.js} +77 -772
  339. package/server/{session-fork-GtoeCh2H.js → session-fork-ZYTHtpBh.js} +2 -2
  340. package/server/settings-ByDRfuuE.js +2 -0
  341. package/server/{settings-CLQcdkoD.js → settings-CTywpFw5.js} +2 -2
  342. package/server/{settings-Ch2pCVtt.js → settings-nAT-eK56.js} +3 -3
  343. package/server/{shadow-engineering-BxiFrIKv.js → shadow-engineering-BHZKPJhq.js} +2 -2
  344. package/server/{shadow-state-CSA1vtxr.js → shadow-state-BTLi4Axs.js} +2 -2
  345. package/server/{shadow-state-nGhCNXT2.js → shadow-state-CZ_LnPsi.js} +1 -1
  346. package/server/{shadow-utils-7q5QDmMj.js → shadow-utils-CPLlPHdn.js} +2 -2
  347. package/server/{ship-log-ie0A_SqV.js → ship-log-D-CphNZx.js} +1 -1
  348. package/server/{ship-record-BM3oVvnL.js → ship-record-BaBla0l_.js} +5 -5
  349. package/server/{ship-record-DHWH1hLz.js → ship-record-BlvX8-xv.js} +1 -1
  350. package/server/{ship-status-BEkddXMT.js → ship-status-rQbPQBsF.js} +2 -2
  351. package/server/{smart-compaction-BkzjVpWL.js → smart-compaction-CUXn8mfX.js} +1 -1
  352. package/server/{smart-compaction-D0TE1lBD.js → smart-compaction-D1CNGdZx.js} +7 -7
  353. package/server/{spawn-planning-session-CkGweSCC.js → spawn-planning-session-DCmO6COk.js} +17 -17
  354. package/server/{spawn-planning-session-s406rw1N.js → spawn-planning-session-DfEWyrVV.js} +2 -2
  355. package/server/{specialist-completion-CTAjwH5j.js → specialist-completion-BMv3K54P.js} +1 -1
  356. package/server/{specialist-context-CKasRfYu.js → specialist-context-C1-CfYQb.js} +5 -5
  357. package/server/{specialist-handoff-logger-DrjrOmmn.js → specialist-handoff-logger-BDKoz5Z9.js} +2 -2
  358. package/server/{specialist-logs-Du6quZ0_.js → specialist-logs-BJQFkpdG.js} +3 -3
  359. package/server/{specialists-x-kPMhrL.js → specialists-CYt1U3Zm.js} +2 -2
  360. package/server/{specialists-CuDWiNdB.js → specialists-D6MUU31Q.js} +19 -19
  361. package/server/{specialists-b0dMMjWq.js → specialists-DhS79T9v.js} +333 -118
  362. package/server/{specialists-B-4zyE4Y.js → specialists-Dx0zRTxX.js} +1 -1
  363. package/server/{specialists-registry-1y6Rt_F1.js → specialists-registry-BRLCi61y.js} +1 -1
  364. package/server/{specialists-registry-BYjs04iK.js → specialists-registry-Bng0OFGH.js} +2 -2
  365. package/server/specs-oRGyfz6C.js +3 -0
  366. package/server/{src-CZsPs61V.js → src-C7gGe4KU.js} +6 -6
  367. package/server/{src-CY2Wl8IX.js → src-CdwN6WY6.js} +8 -2
  368. package/server/{src-DeQwpuh6.js → src-DMosbuSJ.js} +3 -3
  369. package/server/{stack-health-BQFSJc0l.js → stack-health-BKfNaqMm.js} +3 -3
  370. package/server/{stack-health-ypIKtkbE.js → stack-health-Bz711z1Y.js} +1 -1
  371. package/server/{stale-task-claims-C2e1zdMT.js → stale-task-claims-DMRLb5R2.js} +5 -5
  372. package/server/{staleness-Fzx_3_Hr.js → staleness-CxZaIhrn.js} +1 -1
  373. package/server/{staleness-CRDK6LFG.js → staleness-r_dkMyMG.js} +1 -1
  374. package/server/{stall-sweeper-QNk4h9m6.js → stall-sweeper-CBWqSWV2.js} +8 -8
  375. package/server/{state-home-DdG8erBI.js → state-home-DhsMqg8W.js} +2 -2
  376. package/server/{state-migrate-C6H3jfHE.js → state-migrate-C2Ouyd6e.js} +6 -6
  377. package/server/{state-mirror-DF4Lfxm0.js → state-mirror-BPXciz84.js} +3 -3
  378. package/server/{stuck-remediation-BVNd9txd.js → stuck-remediation-DALieAkx.js} +1 -1
  379. package/server/{stuck-remediation-BDa_tXgB.js → stuck-remediation-kta3KN7c.js} +13 -13
  380. package/server/{substrate-bug-weights-service-BbbCZEtJ.js → substrate-bug-weights-service-D_ICP7TI.js} +3 -3
  381. package/server/{summary-fork-DIQmtOuV.js → summary-fork-CojrFKb6.js} +2 -2
  382. package/server/{summary-fork-BvcW6bq0.js → summary-fork-DhhaFhxZ.js} +10 -10
  383. package/server/supervisor-DSSWo4M2.js +2 -0
  384. package/server/{supervisor-D3jC2c7A.js → supervisor-DqH-laVL.js} +4 -4
  385. package/server/{swarm-readiness-CMWAQuWM.js → swarm-readiness-LF8ZF_hc.js} +3 -3
  386. package/server/{synthesis-verdict-DVlrLF9A.js → synthesis-verdict-CGFF8uQI.js} +2 -2
  387. package/server/{synthesis-verdict-C-pJOPsn.js → synthesis-verdict-DSoOFUIV.js} +1 -1
  388. package/server/{system-prerequisites-QKtIYXI2.js → system-prerequisites-Lsx0jUUV.js} +2 -2
  389. package/server/{teardown-workspace-cJea1OLo.js → teardown-workspace-DMwomEG1.js} +16 -16
  390. package/server/{test-agent-queue-C5DI_gWX.js → test-agent-queue-Cu0D6BYe.js} +6 -6
  391. package/server/{test-verdict-C7kmd2_Y.js → test-verdict-9mvl7pQn.js} +1 -1
  392. package/server/{test-verdict-DUbDHqeD.js → test-verdict-oNSv1rVr.js} +2 -2
  393. package/server/{tldr-daemon-BNQHwblU.js → tldr-daemon-CRSAkhBx.js} +1 -1
  394. package/server/{tldr-daemon-CO08YlfQ.js → tldr-daemon-McqCk2X7.js} +2 -2
  395. package/server/{tmux-B8zsqD_6.js → tmux-CYucGrTl.js} +2 -2
  396. package/server/{tmux-DWEc4Ld9.js → tmux-wnT_hg-s.js} +2 -2
  397. package/server/{token-Bez-qCB2.js → token-BdfZLRg1.js} +1 -1
  398. package/server/{tracker-config-CJzPhSHv.js → tracker-config-tfAOWgng.js} +2 -2
  399. package/server/{tracker-utils-DJAOAuMN.js → tracker-utils-Dbg_pVZg.js} +2 -2
  400. package/server/{traefik-connect-D3H5I6b9.js → traefik-connect-DoQvQ6oJ.js} +1 -1
  401. package/server/{tunnel-BSdKnW0U.js → tunnel-B1MNIgkL.js} +1 -1
  402. package/server/{tunnel-Cr3ctqxp.js → tunnel-skW68j9B.js} +3 -3
  403. package/server/{types-fzBp9cYi.js → types-PW4zkxCM.js} +1 -1
  404. package/server/{uat-failure-feedback-IZQ-J8jt.js → uat-failure-feedback-ly8ZwtfC.js} +5 -5
  405. package/server/{uat-promote-verification-DXApKcc2.js → uat-promote-verification-BBaMwfdc.js} +5 -5
  406. package/server/{uat-train-IIZlz7r3.js → uat-train-BBEiYSep.js} +0 -0
  407. package/server/{uat-train-CycEzpbE.js → uat-train-D7Ran2FB.js} +1 -1
  408. package/server/{validate-Ur4xH5bN.js → validate-BYcBcBwg.js} +3 -3
  409. package/server/{validation-Dr6V4PXx.js → validation-BfG2jW5C.js} +4 -4
  410. package/server/{validation-CHovCoTT.js → validation-nSrYiYvA.js} +1 -1
  411. package/server/{verification-artifact-D3viYe_t.js → verification-artifact-Cmhgq4b_.js} +1 -1
  412. package/server/{verification-artifact-k5Ftpg0c.js → verification-artifact-DglwaHke.js} +1 -1
  413. package/server/{verification-runner-Dl13mmsI.js → verification-runner-BEq5ZF-h.js} +16 -16
  414. package/server/{verification-runner-BuqGwm2t.js → verification-runner-CFjAuv9u.js} +1 -1
  415. package/server/{vtt-parser-BSnAB-Og.js → vtt-parser-Va--tv27.js} +1 -1
  416. package/server/{work-agent-prompt-CJJ4tXci.js → work-agent-prompt-BnhKNAg7.js} +1 -1
  417. package/server/{work-agent-prompt-CioeOuM4.js → work-agent-prompt-CaD2ue8m.js} +10 -10
  418. package/server/{work-agent-start-B65Gqn9N.js → work-agent-start-0nJ-6UeA.js} +2 -2
  419. package/server/{work-agent-start-Ct1HVh6z.js → work-agent-start-D8NEN5KD.js} +1 -1
  420. package/server/workflows-BtHRlFIm.js +2 -0
  421. package/server/{workflows-AgFul1xc.js → workflows-C7mxM1qc.js} +28 -28
  422. package/server/{workspace-Cy4sDd3q.js → workspace-BAhMgMaO.js} +3 -3
  423. package/server/{workspace-Cu3XlMXt.js → workspace-Dbqv9ehn.js} +1 -1
  424. package/server/{workspace-anchor-drift-CMaqvizr.js → workspace-anchor-drift-B_3kyyxJ.js} +4 -4
  425. package/server/{workspace-anchor-drift-BI0Hz6zI.js → workspace-anchor-drift-Bpa3xoni.js} +1 -1
  426. package/server/{workspace-config-DRYDO7Zr.js → workspace-config-D-bNq2CF.js} +1 -1
  427. package/server/{workspace-manager-jfkKAEuO.js → workspace-manager-BrbX90Rm.js} +1 -1
  428. package/server/{workspace-manager-CgovxDrO.js → workspace-manager-CM8RCrSc.js} +16 -16
  429. package/server/{workspace-metadata-BDqXzGGK.js → workspace-metadata-BEOwJSdK.js} +1 -1
  430. package/server/{workspace-metadata-BNzODIv6.js → workspace-metadata-Cu6yfxBS.js} +2 -2
  431. package/server/{workspaces-BJdPqx_J.js → workspaces-C7LAuZfe.js} +123 -696
  432. package/sync-sources/rules/agent-message-delivery.md +21 -14
  433. package/sync-sources/rules/pan-handoff-focus-limit.md +3 -1
  434. package/sync-sources/skills/pan-gauntlet-loop/SKILL.md +94 -46
  435. package/sync-sources/skills/pan-handoff/SKILL.md +13 -2
  436. package/server/archive-planning-BW4MKNI7.js +0 -2
  437. package/server/build-info-Bj2vQEMh.js +0 -2
  438. package/server/cli-BRuzUT_I.js +0 -2
  439. package/server/dead-end-trip-6V_CwveT.js +0 -2
  440. package/server/deploy-queue-CjLErpgw.js +0 -2
  441. package/server/dist-fCA6y2bH.js +0 -3
  442. package/server/forge-bvak6vXJ.js +0 -2
  443. package/server/hume-TYTb6fDU.js +0 -3
  444. package/server/inspect-agent-JFEaYTRa.js +0 -2
  445. package/server/merge-ops-DabXHp2i.js +0 -2
  446. package/server/merge-rebase-CXq0qsgR.js +0 -2
  447. package/server/public/assets/index-2wV4ipy_.css +0 -1
  448. package/server/public/assets/mermaid-GHXKKRXX-Bjto8iJh.js +0 -1
  449. package/server/pull-requests-jVGcVq5G.js +0 -2
  450. package/server/rally-CxhVgIQ6.js +0 -3
  451. package/server/settings-DhtPDmmI.js +0 -2
  452. package/server/specs-IYsFlM-L.js +0 -3
  453. package/server/supervisor-v0cYN2Vp.js +0 -2
  454. package/server/workflows-CfHm8lVd.js +0 -2
  455. package/sync-sources/skills/pan-gauntlet-loop/references/lessons.md +0 -60
@@ -1,49 +1,48 @@
1
1
  import { n as __esmMin, o as __toESM } from "./rolldown-runtime-DNCzzKnI.js";
2
- import { $t as findProjectByPathSync, Bi as isDevMode, C as DEFAULT_TIERED_EXECUTION_CONFIG, Dr as init_roles, Dt as queueAutoCommit, E as init_tier_table, Et as pushPendingStateCommits, Gt as shouldCommitLegacyWorkspaceArtifacts, Hi as resolveOhmypiExtensionPath, Hr as fmix32, Ht as init_state_read_home, Ir as resolveModelIdSync, Kn as extractPrefixSync, Li as getOverdeckHome, Lr as CLIPROXY_GPT56_CONTEXT_WINDOW, Nr as hasModelCapabilitySync, O as resolveTieredExecutionEnabled, Oi as claudeSessionTranscriptExists, On as resolveProjectFromIssueSync, Or as resolveModel, Ot as reconcileStatePlaneDrift, Pr as init_model_capabilities, Ri as init_paths, Rr as CLIPROXY_GPT56_LONG_CONTEXT_WINDOW, Tt as init_auto_commit, Ui as sessionFilePath, Ur as fnv1a32, Vi as packageRoot, Wr as init_percent, Wt as resolveStateReadHomeSync, Xn as resolveBareNumericIdSync, Y as init_record, Yr as ClaudeCredentialParseError, Zr as FsError, _r as setupCredentialFileAuthSync, ai as TmuxError, an as getProjectSwarmHotspots, at as writeAgentHarnessModelSync, br as init_openai_compatible_proxy, ci as init_errors, cr as clearCredentialFileAuthSync, d as isTldrEnabledSync, dr as getProviderEnvSync, er as require_dist, et as readIssueRecordForWorkspaceSync, fn as init_projects, fr as getProviderForModelSync, gr as resolveKimiCodeModelAlias, jr as getModelCapabilitySync, k as resolveTieredExecutionEnabledForIssue, ki as encodeClaudeProjectDir, li as AGENTS_DIR, lr as getBuiltInDefaultHarness, on as getProjectSync, p as loadConfigSync, pr as init_providers, qn as init_issue_id, rn as getIssuePrefix, rt as resolveProjectForIssue, t as init_config_yaml, tt as readIssueRecordSync, u as isClaudeCodeChannelsMcpEnabled, vr as ensureOpenAICompatibleProxyRunning, w as TIERED_EXECUTION_DIFFICULTIES, wt as flushAutoCommits, zr as GPT56_LONG_CONTEXT_VARIANTS } from "./config-yaml-D9nfpEx1.js";
3
- import { h as loadConfigSync$1, p as init_config } from "./config-ZGjvuR6J.js";
4
- import { l as init_activity_logger, o as emitActivityEntrySync, s as emitActivityTtsSync } from "./activity-logger-BWZhVphb.js";
5
- import { d as getOverdeckDatabaseSync, f as init_infra } from "./infra-CHIvOb9q.js";
6
- import { n as init_fs_lock, s as withRecordFsLock } from "./fs-lock-C7J-ugIf.js";
7
- import { i as init_record_update, n as clearRecordPipelineClosedOut } from "./record-update-dBGxL9OC.js";
8
- import { $ as init_pane_choice_menu, B as sendKeys, C as init_tmux, D as killSessionSync, E as killSession, G as setOption, H as sendRawKeystroke, P as listSessionsSync, Q as buildChoiceKeystrokes, T as isPaneDead, U as sessionExists, W as sessionExistsSync, a as capturePaneText, c as createSessionSync, ct as BLANKED_PROVIDER_ENV, dt as init_child_env, et as paneChoiceMenuSignature, i as capturePaneSync, k as listPaneValues, nt as parsePaneChoiceMenu, p as exactPaneTarget, r as capturePane, s as createSession, v as getManagedTmuxSocketName, z as sendEscapeKeyAsync } from "./tmux-DWEc4Ld9.js";
9
- import { a as getWorkspaceForIssue, o as init_resolver } from "./resolver-gxv97jsQ.js";
10
- import { a as init_event_store, i as initEventStore } from "./event-store-BCSgMubf.js";
11
- import { o as OHMYPI_BEHAVIOR, s as getHarnessBehavior } from "./src-CY2Wl8IX.js";
12
- import { a as readVerdictPreservationStatus, d as getOverdeckAgentStateSync, f as init_agent_state_sync, i as init_work_start_verdicts, l as resetWorkStartPipelineVerdicts, m as saveOverdeckAgentStateSync, o as refreshWorkStartReviewedAnchor, p as listOverdeckAgentStatesSync, r as registerPipelineTelemetryAgentReader, t as init_pipeline_agent_reader } from "./pipeline-agent-reader-D-6okryb.js";
13
- import { a as countAgentsByStatus, c as init_agents$2, g as logAgentLifecycleSync, h as init_persistent_logger } from "./agents-jXgqpHca.js";
14
- import { n as ensureSessionContextBriefingFile, r as init_briefing_freshness } from "./briefing-freshness-e_OEYZEe.js";
15
- import { o as getPricingSync, s as init_cost } from "./cost-CiIwxH1D.js";
16
- import { t as init_behavior } from "./behavior-BiCQzqyT.js";
17
- import { _ as init_tier_metrics, g as estimateFeedDeliveryTokens, v as recordTierFeedDelivery } from "./cost-sync-DOkdE_yB.js";
18
- import { b as init_cliproxy, c as bridgeGeminiAuthToCliproxy, h as getCliproxyClientEnv, l as decodeJwtPayload$1, p as getCliproxyAuthDir, s as bridgeCodexAuthToCliproxySync, v as getCliproxyLogPath } from "./cliproxy-BpYpkogS.js";
19
- import { a as init_feature_registry_population, i as resetPostMergeState, n as init_post_merge_state, o as recordFeatureRegistryLifecycle } from "./post-merge-state-DC2_0t12.js";
20
- import { i as ensureInternalTokenSync, s as init_internal_token, t as INTERNAL_TOKEN_HEADER } from "./internal-token-DoVzb4b7.js";
21
- import { A as init_conversations, B as reactivateConversationForSpawn, C as getConversationByName, b as createConversation, z as normalizeHarness } from "./conversations-C75EFFjf.js";
22
- import { n as readActiveDashboardBundleSync, t as init_active_dashboard_bundle } from "./active-dashboard-bundle-Byh6sP-q.js";
23
- import { a as readCavemanVariant, n as init_workspace } from "./workspace-Cy4sDd3q.js";
24
- import { C as generateLauncherScriptSync, D as normalizeModelOverrideSync, E as init_model_validation, O as requireModelOverrideSync, S as normalizeFlywheelRunId, _ as init_tmux_dedup, b as init_provenance, f as completeKeyedSubmit, i as init_auto_spawn_consent, k as shellQuoteModelIdSync, s as withAutoSpawnConsentClaim, w as init_launcher_generator, x as isOperatorStartedBy, y as sendKeysDedup } from "./auto-spawn-consent-Dc4mtM-B.js";
25
- import { a as init_claude_permissions, r as getClaudePermissionFlagsStringSync } from "./claude-permissions-Bc5kjX1q.js";
26
- import { D as init_layers, F as resolveWorkspaceContextFile, L as workspaceContextFile, b as renderForHarness, d as renderProjectLayer, i as workspaceContextWithoutProjectLayer, l as init_render, r as init_assemble, u as renderGlobalLayer, y as init_harness } from "./assemble-CyvEBmmq.js";
27
- import { a as extractThreadIdFromRollout, c as initCodexHome, l as init_codex, o as findLatestRollout } from "./codex-KaSKE-R3.js";
28
- import { i as prepareHarnessLaunch, r as init_harness_binary } from "./harness-binary-tMmgJfC1.js";
29
- import { a as getFlywheelActiveRunIdSync, c as init_control_settings } from "./control-settings-BMoDHY1G.js";
30
- import { n as createTrackerFromConfig, r as init_factory, t as createTracker } from "./factory-BrdqXBeK.js";
31
- import { c as init_stack_health, o as getWorkspaceStackHealth } from "./stack-health-BQFSJc0l.js";
2
+ import { $t as findProjectByPathSync, Ai as encodeClaudeProjectDir, Br as OPENROUTER_MODEL_CONTEXT_WINDOWS, C as DEFAULT_TIERED_EXECUTION_CONFIG, Dr as init_roles, Dt as queueAutoCommit, E as init_tier_table, Et as pushPendingStateCommits, Gr as init_percent, Gt as shouldCommitLegacyWorkspaceArtifacts, Hi as packageRoot, Ht as init_state_read_home, Ir as resolveModelIdSync, Kn as extractPrefixSync, Lr as CLIPROXY_GPT56_CONTEXT_WINDOW, Nr as hasModelCapabilitySync, O as resolveTieredExecutionEnabled, On as resolveProjectFromIssueSync, Or as resolveModel, Ot as reconcileStatePlaneDrift, Pr as init_model_capabilities, Qr as FsError, Ri as getOverdeckHome, Rr as CLIPROXY_GPT56_LONG_CONTEXT_WINDOW, Tt as init_auto_commit, Ui as resolveOhmypiExtensionPath, Ur as fmix32, Vi as isDevMode, Wi as sessionFilePath, Wr as fnv1a32, Wt as resolveStateReadHomeSync, Xn as resolveBareNumericIdSync, Xr as ClaudeCredentialParseError, Y as init_record, _r as setupCredentialFileAuthSync, an as getProjectSwarmHotspots, at as writeAgentHarnessModelSync, br as init_openai_compatible_proxy, cr as clearCredentialFileAuthSync, d as isTldrEnabledSync, dr as getProviderEnvSync, er as require_dist, et as readIssueRecordForWorkspaceSync, fn as init_projects, fr as getProviderForModelSync, gr as resolveKimiCodeModelAlias, jr as getModelCapabilitySync, k as resolveTieredExecutionEnabledForIssue, ki as claudeSessionTranscriptExists, li as init_errors, lr as getBuiltInDefaultHarness, oi as TmuxError, on as getProjectSync, p as loadConfigSync, pr as init_providers, qn as init_issue_id, rn as getIssuePrefix, rt as resolveProjectForIssue, t as init_config_yaml, tt as readIssueRecordSync, u as isClaudeCodeChannelsMcpEnabled, ui as AGENTS_DIR, vr as ensureOpenAICompatibleProxyRunning, w as TIERED_EXECUTION_DIFFICULTIES, wt as flushAutoCommits, zi as init_paths, zr as GPT56_LONG_CONTEXT_VARIANTS } from "./config-yaml-D60AnTIu.js";
3
+ import { h as loadConfigSync$1, p as init_config } from "./config-NxI9Yl2f.js";
4
+ import { l as init_activity_logger, o as emitActivityEntrySync, s as emitActivityTtsSync } from "./activity-logger-SlTXYCVf.js";
5
+ import { d as getOverdeckDatabaseSync, f as init_infra } from "./infra-CJRi_5Wu.js";
6
+ import { n as init_fs_lock, s as withRecordFsLock } from "./fs-lock-DQ_gUxfq.js";
7
+ import { c as withStateGitLock, i as init_record_update, n as clearRecordPipelineClosedOut, s as init_state_git_lock } from "./record-update-BPqpBu3O.js";
8
+ import { $ as init_pane_choice_menu, B as sendKeys, C as init_tmux, D as killSessionSync, E as killSession, G as setOption, H as sendRawKeystroke, P as listSessionsSync, Q as buildChoiceKeystrokes, T as isPaneDead, U as sessionExists, W as sessionExistsSync, a as capturePaneText, c as createSessionSync, ct as BLANKED_PROVIDER_ENV, dt as init_child_env, et as paneChoiceMenuSignature, i as capturePaneSync, k as listPaneValues, nt as parsePaneChoiceMenu, p as exactPaneTarget, r as capturePane, s as createSession, v as getManagedTmuxSocketName, z as sendEscapeKeyAsync } from "./tmux-wnT_hg-s.js";
9
+ import { a as getWorkspaceForIssue, o as init_resolver } from "./resolver-C2QKOf09.js";
10
+ import { a as init_event_store, i as initEventStore } from "./event-store-DTns2XZP.js";
11
+ import { o as OHMYPI_BEHAVIOR, s as getHarnessBehavior } from "./src-CdwN6WY6.js";
12
+ import { a as readVerdictPreservationStatus, d as getOverdeckAgentStateSync, f as init_agent_state_sync, i as init_work_start_verdicts, l as resetWorkStartPipelineVerdicts, m as saveOverdeckAgentStateSync, o as refreshWorkStartReviewedAnchor, p as listOverdeckAgentStatesSync, r as registerPipelineTelemetryAgentReader, t as init_pipeline_agent_reader } from "./pipeline-agent-reader-CeWhQzXC.js";
13
+ import { a as countAgentsByStatus, c as init_agents$2, g as logAgentLifecycleSync, h as init_persistent_logger } from "./agents-DzpQidT8.js";
14
+ import { n as ensureSessionContextBriefingFile, r as init_briefing_freshness } from "./briefing-freshness-ENa_hW_V.js";
15
+ import { a as getFlywheelActiveRunIdSync, c as init_control_settings, j as parseOhmypiSessionSync, k as init_ohmypi_parser } from "./control-settings-Db0uXgVM.js";
16
+ import { _ as init_tier_metrics, g as estimateFeedDeliveryTokens, v as recordTierFeedDelivery } from "./cost-sync-DfmvLT9L.js";
17
+ import { t as init_behavior } from "./behavior-DCg8CIWC.js";
18
+ import { b as init_cliproxy, c as bridgeGeminiAuthToCliproxy, h as getCliproxyClientEnv, l as decodeJwtPayload$1, p as getCliproxyAuthDir, s as bridgeCodexAuthToCliproxySync, v as getCliproxyLogPath } from "./cliproxy-DXDQcR3I.js";
19
+ import { a as init_feature_registry_population, i as resetPostMergeState, n as init_post_merge_state, o as recordFeatureRegistryLifecycle } from "./post-merge-state-DFaf7OI1.js";
20
+ import { i as ensureInternalTokenSync, s as init_internal_token, t as INTERNAL_TOKEN_HEADER } from "./internal-token-BeIWG_kT.js";
21
+ import { A as init_conversations, B as reactivateConversationForSpawn, C as getConversationByName, b as createConversation, z as normalizeHarness } from "./conversations-nS6QgYpD.js";
22
+ import { n as readActiveDashboardBundleSync, t as init_active_dashboard_bundle } from "./active-dashboard-bundle-CCqpFWiz.js";
23
+ import { a as readCavemanVariant, n as init_workspace } from "./workspace-BAhMgMaO.js";
24
+ import { C as generateLauncherScriptSync, D as normalizeModelOverrideSync, E as init_model_validation, O as requireModelOverrideSync, S as normalizeFlywheelRunId, _ as init_tmux_dedup, b as init_provenance, f as completeKeyedSubmit, i as init_auto_spawn_consent, k as shellQuoteModelIdSync, s as withAutoSpawnConsentClaim, w as init_launcher_generator, x as isOperatorStartedBy, y as sendKeysDedup } from "./auto-spawn-consent-BesWchEi.js";
25
+ import { a as init_claude_permissions, r as getClaudePermissionFlagsStringSync } from "./claude-permissions-DLrb9ovz.js";
26
+ import { D as init_layers, F as resolveWorkspaceContextFile, L as workspaceContextFile, b as renderForHarness, d as renderProjectLayer, i as workspaceContextWithoutProjectLayer, l as init_render, r as init_assemble, u as renderGlobalLayer, y as init_harness } from "./assemble-B_JgnCbG.js";
27
+ import { a as extractThreadIdFromRollout, c as initCodexHome, l as init_codex, o as findLatestRollout } from "./codex-DYyZL8JD.js";
28
+ import { i as prepareHarnessLaunch, r as init_harness_binary } from "./harness-binary-DChiynaB.js";
29
+ import { n as createTrackerFromConfig, r as init_factory, t as createTracker } from "./factory-CWVKwKFE.js";
30
+ import { c as init_stack_health, o as getWorkspaceStackHealth } from "./stack-health-BKfNaqMm.js";
32
31
  import { i as readReviewStatusMap, n as init_review_status_source, r as isRoleTerminal, s as resolveCanonicalReviewStatus } from "./review-status-source-Jq0BXmn3.js";
33
- import { N as getProjectPanPaths, P as init_paths$1, h as readWorkspacePlanSync, s as init_io } from "./io-DKrWd3gX.js";
34
- import { a as getDispatchableItems, c as init_dag, o as groupItemsByWave, r as createActiveSlice } from "./dag-BPc74hwj.js";
35
- import { c as generateFixedPointPromptSync, f as initHookSync, n as checkHookSync, p as init_hooks } from "./hooks-BjBjxqNh.js";
36
- import { a as init_git_utils, l as renderWorkspaceGitShowPromise } from "./git-utils-DW8-jIUJ.js";
37
- import { n as init_workspace_anchor_drift, t as evaluateWorkspaceAnchorDrift } from "./workspace-anchor-drift-CMaqvizr.js";
38
- import { n as resolveHarness, t as init_harness_resolve } from "./harness-resolve-DusNpVEe.js";
39
- import { a as loadCloisterConfigSync, r as init_config$1 } from "./config-Doq_tF-f.js";
32
+ import { N as getProjectPanPaths, P as init_paths$1, h as readWorkspacePlanSync, s as init_io } from "./io-BCtZoXHo.js";
33
+ import { a as getDispatchableItems, c as init_dag, o as groupItemsByWave, r as createActiveSlice } from "./dag-o-dUpw1L.js";
34
+ import { c as generateFixedPointPromptSync, f as initHookSync, n as checkHookSync, p as init_hooks } from "./hooks-DJR1yR9w.js";
35
+ import { a as init_git_utils, l as renderWorkspaceGitShowPromise } from "./git-utils-BdHk8y7g.js";
36
+ import { n as init_workspace_anchor_drift, t as evaluateWorkspaceAnchorDrift } from "./workspace-anchor-drift-B_3kyyxJ.js";
37
+ import { n as resolveHarness, t as init_harness_resolve } from "./harness-resolve-BplBEbwn.js";
38
+ import { a as loadCloisterConfigSync, r as init_config$1 } from "./config-_qaa1UXH.js";
40
39
  import { t as init_reap_terminal_sessions } from "./reap-terminal-sessions-BaDSNR-k.js";
41
- import { a as init_state_home, c as isStateMigrated } from "./state-home-DdG8erBI.js";
42
- import { n as provisionClaudeHooks, t as init_claude_hooks_provision } from "./claude-hooks-provision-Cer2eFfj.js";
43
- import { d as resolveWorkspaceRepoRootsSync, i as init_project_repos } from "./project-repos--QeCg7yQ.js";
44
- import { a as init_lifecycle_io, t as appendContinueSessionEntryForIssue } from "./lifecycle-io-6WL46dsB.js";
45
- import { a as init_tracker_config, t as getGitHubConfig } from "./tracker-config-CJzPhSHv.js";
46
- import { r as init_swarm_readiness, t as analyzeSwarmReadiness } from "./swarm-readiness-CMWAQuWM.js";
40
+ import { a as init_state_home, c as isStateMigrated } from "./state-home-DhsMqg8W.js";
41
+ import { n as provisionClaudeHooks, t as init_claude_hooks_provision } from "./claude-hooks-provision-fRofvhTN.js";
42
+ import { d as resolveWorkspaceRepoRootsSync, i as init_project_repos } from "./project-repos-CsfvLtmr.js";
43
+ import { a as init_lifecycle_io, t as appendContinueSessionEntryForIssue } from "./lifecycle-io-D7N0vQNj.js";
44
+ import { a as init_tracker_config, t as getGitHubConfig } from "./tracker-config-tfAOWgng.js";
45
+ import { r as init_swarm_readiness, t as analyzeSwarmReadiness } from "./swarm-readiness-LF8ZF_hc.js";
47
46
  import { createRequire } from "node:module";
48
47
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
49
48
  import { Data, Duration, Effect, FileSystem } from "effect";
@@ -66,307 +65,6 @@ import { fileURLToPath } from "node:url";
66
65
  import { request } from "node:http";
67
66
  import { ChildProcessSpawner as ChildProcessSpawner$1 } from "effect/unstable/process/ChildProcessSpawner";
68
67
  import { layer } from "@effect/platform-node/NodeServices";
69
- //#region ../../lib/cost-parsers/ohmypi-parser.ts
70
- /**
71
- * oh-my-pi (omp) JSONL parser (PAN-1989). Forked from pi-parser.ts (PAN-636).
72
- *
73
- * omp sessions live at:
74
- * ~/.omp/agent/sessions/<encoded-cwd>/<timestamp>_<session-id>.jsonl
75
- *
76
- * Format (omp v3 — same as Pi v3):
77
- * - First line: { type: "session", version: 3, id, timestamp, cwd }
78
- * - Subsequent: every entry has an opaque `id` and a `parentId`. parentId
79
- * is null for the first non-session entry.
80
- * - The graph is a tree (omp supports forking/branching), not a list.
81
- *
82
- * To compute usage for the *active* branch we walk leaf -> root via parentId
83
- * from the latest leaf (max timestamp among entries that have no children).
84
- * omp assistant messages report per-call usage — input/output tokens are NOT
85
- * cumulative across the conversation — so summing along the active branch is
86
- * correct without subtracting pre-compaction input.
87
- *
88
- * SessionUsage shape comes from jsonl-parser.ts (the Claude Code parser); we
89
- * map into it unchanged so all upstream consumers keep working.
90
- */
91
- function isMessage(entry) {
92
- return entry.type === "message";
93
- }
94
- function isAssistantMessage(entry) {
95
- return isMessage(entry) && entry.message?.role === "assistant";
96
- }
97
- function pricingProviderFor(provider, model) {
98
- const lowerProvider = provider?.toLowerCase() ?? "";
99
- const lowerModel = model.toLowerCase();
100
- if (lowerProvider === "openai" || lowerProvider === "openai-codex" || lowerModel.includes("gpt")) return "openai";
101
- if (lowerProvider === "google" || lowerModel.includes("gemini")) return "google";
102
- if (lowerProvider === "anthropic" || lowerModel.includes("claude")) return "anthropic";
103
- if (lowerProvider === "kimi" || lowerProvider === "minimax" || lowerProvider === "zai" || lowerProvider === "zhipu" || lowerProvider === "custom" || lowerModel.includes("kimi") || lowerModel.includes("minimax") || lowerModel.includes("glm")) return "custom";
104
- return null;
105
- }
106
- function computeCostFromPricing(provider, model, usage) {
107
- const pricingProvider = pricingProviderFor(provider, model);
108
- if (!pricingProvider) return {
109
- cost: 0,
110
- reason: "unknown-provider"
111
- };
112
- const pricing = getPricingSync(pricingProvider, model);
113
- if (!pricing) return {
114
- cost: 0,
115
- reason: "unpriced-model"
116
- };
117
- return { cost: usage.inputTokens / 1e3 * pricing.inputPer1k + usage.outputTokens / 1e3 * pricing.outputPer1k + (usage.cacheReadTokens ?? 0) / 1e3 * (pricing.cacheReadPer1k ?? 0) + (usage.cacheWriteTokens ?? 0) / 1e3 * (pricing.cacheWrite5mPer1k ?? 0) };
118
- }
119
- function tsMs(timestamp) {
120
- if (!timestamp) return 0;
121
- const t = Date.parse(timestamp);
122
- return Number.isFinite(t) ? t : 0;
123
- }
124
- /**
125
- * Parse a Pi session JSONL file into a SessionUsage record.
126
- *
127
- * Returns null if the file does not exist, is empty, or is unparseable. Errors
128
- * during line parsing are tolerated (the line is skipped); we never throw.
129
- */
130
- function parseOhmypiSessionSync(filePath) {
131
- if (!existsSync(filePath)) return null;
132
- const result = parseOhmypiSessionContent(readFileSync(filePath, "utf8"), filePath);
133
- return result.ok ? result.usage : null;
134
- }
135
- function parseOhmypiSessionCostResultSync(filePath) {
136
- if (!existsSync(filePath)) return {
137
- ok: false,
138
- reason: "unreadable"
139
- };
140
- try {
141
- return parseOhmypiSessionContent(readFileSync(filePath, "utf8"), filePath);
142
- } catch {
143
- return {
144
- ok: false,
145
- reason: "unreadable"
146
- };
147
- }
148
- }
149
- /**
150
- * Parse Pi session JSONL content. Exposed for tests and callers that already
151
- * have the file content in memory.
152
- */
153
- function parseOhmypiSessionContent(content, filePath = "<inline>") {
154
- const lines = content.split("\n").filter((l) => l.trim().length > 0);
155
- if (lines.length === 0) return {
156
- ok: false,
157
- reason: "empty"
158
- };
159
- let root = null;
160
- const entriesById = /* @__PURE__ */ new Map();
161
- const childrenOf = /* @__PURE__ */ new Map();
162
- const unknownTypesSeen = /* @__PURE__ */ new Set();
163
- for (const line of lines) {
164
- let parsed;
165
- try {
166
- parsed = JSON.parse(line);
167
- } catch {
168
- continue;
169
- }
170
- if (!parsed || typeof parsed !== "object") continue;
171
- const entry = parsed;
172
- if (entry.type === "session") {
173
- root = entry;
174
- continue;
175
- }
176
- if (!entry.id) continue;
177
- if (!KNOWN_TYPES.has(entry.type)) {
178
- if (!unknownTypesSeen.has(entry.type)) {
179
- unknownTypesSeen.add(entry.type);
180
- console.debug(`[ohmypi-parser] unknown entry type "${entry.type}" in ${filePath} — ignoring`);
181
- }
182
- }
183
- entriesById.set(entry.id, entry);
184
- const list = childrenOf.get(entry.parentId ?? null);
185
- if (list) list.push(entry.id);
186
- else childrenOf.set(entry.parentId ?? null, [entry.id]);
187
- }
188
- if (!root) return {
189
- ok: false,
190
- reason: "missing-session-root"
191
- };
192
- if (entriesById.size === 0) return {
193
- ok: true,
194
- usage: emptyUsage(filePath, root)
195
- };
196
- const leaves = [];
197
- for (const entry of entriesById.values()) {
198
- const kids = childrenOf.get(entry.id);
199
- if (!kids || kids.length === 0) leaves.push(entry);
200
- }
201
- if (leaves.length === 0) leaves.push(...entriesById.values());
202
- let latestLeaf = leaves[0];
203
- for (const leaf of leaves) if (tsMs(leaf.timestamp) > tsMs(latestLeaf.timestamp)) latestLeaf = leaf;
204
- const branch = [];
205
- const visited = /* @__PURE__ */ new Set();
206
- let cursor = latestLeaf;
207
- while (cursor) {
208
- if (visited.has(cursor.id)) break;
209
- visited.add(cursor.id);
210
- branch.push(cursor);
211
- if (!cursor.parentId) break;
212
- cursor = entriesById.get(cursor.parentId);
213
- }
214
- branch.reverse();
215
- const totals = {
216
- inputTokens: 0,
217
- outputTokens: 0,
218
- cacheReadTokens: 0,
219
- cacheWriteTokens: 0
220
- };
221
- let costV2 = 0;
222
- let messageCount = 0;
223
- let costRecomputedFromTokens = 0;
224
- const modelBreakdown = {};
225
- const usageEvents = [];
226
- const unpricedModels = [];
227
- const modelsInOrder = [];
228
- let compactionCount = 0;
229
- let firstTs = null;
230
- let lastTs = null;
231
- for (const entry of branch) {
232
- if (entry.type === "compaction_start" || entry.type === "session_compact") compactionCount += 1;
233
- if (!firstTs && entry.timestamp) firstTs = entry.timestamp;
234
- if (entry.timestamp) lastTs = entry.timestamp;
235
- if (!isAssistantMessage(entry)) continue;
236
- const usage = entry.message.usage;
237
- if (!usage) continue;
238
- const model = entry.message.model || "unknown";
239
- const provider = typeof entry.message.provider === "string" ? entry.message.provider : null;
240
- const input = usage.input ?? 0;
241
- const output = usage.output ?? 0;
242
- const cacheRead = usage.cacheRead ?? 0;
243
- const cacheWrite = usage.cacheWrite ?? 0;
244
- const tokenUsage = {
245
- inputTokens: input,
246
- outputTokens: output,
247
- cacheReadTokens: cacheRead,
248
- cacheWriteTokens: cacheWrite
249
- };
250
- const hasInlineCost = usage.cost?.total !== void 0;
251
- let cost = usage.cost?.total ?? 0;
252
- let warning;
253
- if (!hasInlineCost && input + output + cacheRead + cacheWrite > 0) {
254
- const computed = computeCostFromPricing(provider, model, tokenUsage);
255
- cost = computed.cost;
256
- if (computed.reason) {
257
- unpricedModels.push({
258
- provider,
259
- model,
260
- reason: computed.reason
261
- });
262
- warning = [{
263
- type: "unpriced-model",
264
- provider,
265
- model,
266
- reason: computed.reason
267
- }];
268
- }
269
- }
270
- const localComputed = hasInlineCost ? (usage.cost?.input ?? 0) + (usage.cost?.output ?? 0) + (usage.cost?.cacheRead ?? 0) + (usage.cost?.cacheWrite ?? 0) : cost;
271
- totals.inputTokens += input;
272
- totals.outputTokens += output;
273
- totals.cacheReadTokens = (totals.cacheReadTokens ?? 0) + cacheRead;
274
- totals.cacheWriteTokens = (totals.cacheWriteTokens ?? 0) + cacheWrite;
275
- costV2 += cost;
276
- costRecomputedFromTokens += localComputed;
277
- messageCount += 1;
278
- if (!modelBreakdown[model]) {
279
- modelBreakdown[model] = {
280
- cost: 0,
281
- inputTokens: 0,
282
- outputTokens: 0,
283
- messageCount: 0,
284
- cacheReadTokens: 0,
285
- cacheWriteTokens: 0
286
- };
287
- modelsInOrder.push(model);
288
- }
289
- const slot = modelBreakdown[model];
290
- slot.cost += cost;
291
- slot.inputTokens += input;
292
- slot.outputTokens += output;
293
- slot.messageCount += 1;
294
- slot.cacheReadTokens = (slot.cacheReadTokens ?? 0) + cacheRead;
295
- slot.cacheWriteTokens = (slot.cacheWriteTokens ?? 0) + cacheWrite;
296
- usageEvents.push({
297
- requestId: `ohmypi:${root.id}:${entry.id}`,
298
- timestamp: entry.timestamp || root.timestamp,
299
- sessionId: root.id,
300
- sessionFile: filePath,
301
- provider,
302
- model,
303
- input,
304
- output,
305
- cacheRead,
306
- cacheWrite,
307
- cost,
308
- ...warning ? { warnings: warning } : {}
309
- });
310
- }
311
- if (Math.abs(costV2 - costRecomputedFromTokens) > 1e-9) console.debug(`[ohmypi-parser] inline cost vs sum-of-line-items delta=${(costV2 - costRecomputedFromTokens).toFixed(6)} in ${filePath}`);
312
- if (compactionCount > 0) console.debug(`[ohmypi-parser] active branch in ${filePath} has ${compactionCount} compaction event(s) — usage summed per-message (no double-count)`);
313
- const display = modelsInOrder.length === 0 ? "unknown" : modelsInOrder.length === 1 ? modelsInOrder[0] : modelsInOrder.join(" → ");
314
- return {
315
- ok: true,
316
- usage: {
317
- sessionId: root.id,
318
- sessionFile: filePath,
319
- startTime: firstTs ?? root.timestamp,
320
- endTime: lastTs ?? root.timestamp,
321
- model: display,
322
- usage: totals,
323
- cost: costV2,
324
- cost_v2: costV2,
325
- messageCount,
326
- modelBreakdown
327
- },
328
- usageEvents,
329
- unpricedModels
330
- };
331
- }
332
- function emptyUsage(filePath, root) {
333
- return {
334
- sessionId: root.id,
335
- sessionFile: filePath,
336
- startTime: root.timestamp,
337
- endTime: root.timestamp,
338
- model: "unknown",
339
- usage: {
340
- inputTokens: 0,
341
- outputTokens: 0,
342
- cacheReadTokens: 0,
343
- cacheWriteTokens: 0
344
- },
345
- cost: 0,
346
- cost_v2: 0,
347
- messageCount: 0,
348
- modelBreakdown: {}
349
- };
350
- }
351
- var KNOWN_TYPES;
352
- var init_ohmypi_parser = __esmMin((() => {
353
- init_cost();
354
- init_errors();
355
- KNOWN_TYPES = new Set([
356
- "session",
357
- "message",
358
- "model_change",
359
- "thinking_level_change",
360
- "compaction_start",
361
- "compaction_end",
362
- "session_before_compact",
363
- "session_compact",
364
- "session_before_switch",
365
- "session_before_fork",
366
- "session_start"
367
- ]);
368
- }));
369
- //#endregion
370
68
  //#region ../../lib/agent-runtime-mirror.ts
371
69
  /**
372
70
  * PAN-800 — in-process mirror of AgentStateService's canonical ref.
@@ -546,6 +244,133 @@ function writeAgentPlaneRecordAtomicSync(path, record) {
546
244
  }
547
245
  parseAgentPlaneRecord(readFileSync$1(path, "utf-8"), path);
548
246
  }
247
+ function gitFailureMessage(error) {
248
+ if (error && typeof error === "object") {
249
+ const failure = error;
250
+ return failure.stderr?.trim() || failure.stdout?.trim() || failure.message;
251
+ }
252
+ return String(error);
253
+ }
254
+ function isRemoteRefRaceError(message) {
255
+ return /non-fast-forward|fetch first|stale info|cannot lock ref.*expected|failed to update ref|failed to push some refs/i.test(message);
256
+ }
257
+ async function git(root, args) {
258
+ return (await execFileAsync$6("git", args, {
259
+ cwd: root,
260
+ encoding: "utf8",
261
+ timeout: 3e4,
262
+ maxBuffer: 16 * 1024 * 1024,
263
+ env: {
264
+ ...process.env,
265
+ HUSKY: "0"
266
+ }
267
+ })).stdout.trim();
268
+ }
269
+ function appendMissing(remote, local) {
270
+ const known = new Set(remote.map((entry) => JSON.stringify(entry)));
271
+ return [...remote, ...local.filter((entry) => !known.has(JSON.stringify(entry)))];
272
+ }
273
+ function mergeAgentPlaneRecords(remote, local) {
274
+ if (!remote) return local;
275
+ if (remote.agentId !== local.agentId || remote.issueId !== local.issueId || remote.projectKey !== local.projectKey || remote.origin.machineId !== local.origin.machineId) throw new Error(`Refusing to reconcile incompatible durable agent record ${local.agentId}`);
276
+ return {
277
+ ...remote,
278
+ sessions: appendMissing(remote.sessions, local.sessions),
279
+ lifecycle: appendMissing(remote.lifecycle, local.lifecycle),
280
+ archiveRef: local.archiveRef ?? remote.archiveRef,
281
+ recovered: remote.recovered || local.recovered
282
+ };
283
+ }
284
+ async function abortAgentPlaneMerge(root) {
285
+ await git(root, ["merge", "--abort"]).catch(() => void 0);
286
+ }
287
+ async function reconcileAgentPlanePush(context, desired) {
288
+ const relativePath = relative(context.root, context.path).replace(/\\/g, "/");
289
+ try {
290
+ for (let attempt = 0; attempt < MAX_AGENT_PUSH_RECONCILIATIONS; attempt += 1) {
291
+ if (await git(context.root, ["status", "--porcelain"])) return {
292
+ committed: true,
293
+ pushed: false,
294
+ reason: "agent-plane reconciliation blocked by dirty state worktree"
295
+ };
296
+ await git(context.root, [
297
+ "fetch",
298
+ "origin",
299
+ "overdeck-state"
300
+ ]);
301
+ try {
302
+ await git(context.root, [
303
+ "merge",
304
+ "--no-edit",
305
+ "origin/overdeck-state"
306
+ ]);
307
+ } catch (mergeError) {
308
+ const conflicts = (await git(context.root, [
309
+ "diff",
310
+ "--name-only",
311
+ "--diff-filter=U"
312
+ ])).split("\n").map((path) => path.trim()).filter(Boolean);
313
+ if (conflicts.length !== 1 || conflicts[0] !== relativePath) {
314
+ await abortAgentPlaneMerge(context.root);
315
+ return {
316
+ committed: true,
317
+ pushed: false,
318
+ reason: `agent-plane reconciliation conflicted outside ${relativePath}: ${conflicts.join(", ") || gitFailureMessage(mergeError)}`
319
+ };
320
+ }
321
+ await git(context.root, [
322
+ "checkout",
323
+ "--theirs",
324
+ "--",
325
+ relativePath
326
+ ]);
327
+ const remote = readAgentPlaneRecordAtPath(context.path);
328
+ writeAgentPlaneRecordAtomicSync(context.path, mergeAgentPlaneRecords(remote, desired));
329
+ await git(context.root, [
330
+ "add",
331
+ "--",
332
+ relativePath
333
+ ]);
334
+ await git(context.root, [
335
+ "-c",
336
+ "core.editor=true",
337
+ "commit",
338
+ "--no-edit"
339
+ ]);
340
+ }
341
+ try {
342
+ await git(context.root, [
343
+ "push",
344
+ "origin",
345
+ "overdeck-state"
346
+ ]);
347
+ return {
348
+ committed: true,
349
+ pushed: true
350
+ };
351
+ } catch (pushError) {
352
+ const message = gitFailureMessage(pushError);
353
+ if (!isRemoteRefRaceError(message)) return {
354
+ committed: true,
355
+ pushed: false,
356
+ reason: `agent-plane reconciled push failed: ${message}`
357
+ };
358
+ }
359
+ }
360
+ return {
361
+ committed: true,
362
+ pushed: false,
363
+ reason: `agent-plane push lost ${MAX_AGENT_PUSH_RECONCILIATIONS} consecutive remote ref races`
364
+ };
365
+ } catch (error) {
366
+ await abortAgentPlaneMerge(context.root);
367
+ return {
368
+ committed: true,
369
+ pushed: false,
370
+ reason: `agent-plane reconciliation failed: ${gitFailureMessage(error)}`
371
+ };
372
+ }
373
+ }
549
374
  function makeAgentPlaneRecord(state, projectKey) {
550
375
  return {
551
376
  version: 1,
@@ -649,38 +474,50 @@ function appendAgentPlaneSession(state, entry) {
649
474
  };
650
475
  });
651
476
  }
652
- function appendAgentPlaneLifecycle(state, entry) {
477
+ function appendAgentPlaneLifecycle(state, entry, options = {}) {
653
478
  return updateAgentPlaneRecord(state, `${entry.event} lifecycle append`, (current) => ({
654
479
  ...current,
655
480
  lifecycle: [...current.lifecycle, entry]
656
- }));
481
+ }), options.deferCommit);
657
482
  }
658
483
  async function flushAgentPlaneWrites(issueId, agentId) {
659
484
  const context = resolveAgentPlaneContext(issueId, agentId, "flush");
660
485
  if (!context || !existsSync$1(context.root)) return null;
661
- const flushed = await Effect.runPromise(flushAutoCommits(context.project.path));
662
- if (flushed.errored || flushed.committed && flushed.pushed !== true) return flushed;
663
- const reconciled = await Effect.runPromise(reconcileStatePlaneDrift(context.project.path));
664
- if (reconciled.errored || reconciled.committed && reconciled.pushed !== true) return reconciled;
665
- if (flushed.committed || reconciled.committed) return {
666
- committed: true,
667
- pushed: true
668
- };
669
- const push = await Effect.runPromise(pushPendingStateCommits(context.project.path));
670
- return {
671
- committed: false,
672
- pushed: push?.pushed,
673
- reason: push?.reason ?? reconciled.reason ?? flushed.reason
674
- };
486
+ const desired = readAgentPlaneRecordAtPath(context.path);
487
+ if (!desired) return null;
488
+ return withStateGitLock(context.root, `agent-plane-flush:${safeAgentId(agentId)}`, context.path, async () => {
489
+ const flushed = await Effect.runPromise(flushAutoCommits(context.project.path));
490
+ if (flushed.errored) return flushed;
491
+ if (flushed.committed && flushed.pushed !== true) {
492
+ if (!isRemoteRefRaceError(flushed.reason ?? "")) return flushed;
493
+ return reconcileAgentPlanePush(context, desired);
494
+ }
495
+ const reconciled = await Effect.runPromise(reconcileStatePlaneDrift(context.project.path));
496
+ if (reconciled.errored || reconciled.committed && reconciled.pushed !== true) return reconciled;
497
+ if (flushed.committed || reconciled.committed) return {
498
+ committed: true,
499
+ pushed: true
500
+ };
501
+ const push = await Effect.runPromise(pushPendingStateCommits(context.project.path));
502
+ if (push?.pushed === false && isRemoteRefRaceError(push.reason ?? "")) return reconcileAgentPlanePush(context, desired);
503
+ return {
504
+ committed: false,
505
+ pushed: push?.pushed,
506
+ reason: push?.reason ?? reconciled.reason ?? flushed.reason
507
+ };
508
+ });
675
509
  }
676
- var AGENT_PLANE_DIRNAME, AgentPlaneOwnershipError;
510
+ var AGENT_PLANE_DIRNAME, execFileAsync$6, MAX_AGENT_PUSH_RECONCILIATIONS, AgentPlaneOwnershipError;
677
511
  var init_agents$1 = __esmMin((() => {
678
512
  init_paths();
679
513
  init_projects();
680
514
  init_state_read_home();
681
515
  init_auto_commit();
682
516
  init_fs_lock();
517
+ init_state_git_lock();
683
518
  AGENT_PLANE_DIRNAME = "agents";
519
+ execFileAsync$6 = promisify(execFile);
520
+ MAX_AGENT_PUSH_RECONCILIATIONS = 3;
684
521
  AgentPlaneOwnershipError = class extends Error {
685
522
  constructor(agentId, ownerMachine, writerMachine) {
686
523
  super(`Refusing to write durable agent ${agentId}: origin machine is ${ownerMachine}, current machine is ${writerMachine}.`);
@@ -1606,8 +1443,17 @@ async function getProviderEnvForModel(model, harness) {
1606
1443
  throw new Error(`No API key configured for ${provider.displayName}. Configure it in Settings before using model "${model}".`);
1607
1444
  }
1608
1445
  function getClaudeCodeContextPolicyForModel(model) {
1609
- if (getProviderForModelSync(model).name === "anthropic") return {};
1446
+ const provider = getProviderForModelSync(model);
1447
+ if (provider.name === "anthropic") return {};
1610
1448
  const resolvedModel = resolveModelIdSync(model);
1449
+ if (provider.name === "openrouter") {
1450
+ const openrouterWindow = OPENROUTER_MODEL_CONTEXT_WINDOWS[resolvedModel];
1451
+ if (openrouterWindow !== void 0) return {
1452
+ autoCompactWindow: openrouterWindow,
1453
+ maxContextTokens: openrouterWindow
1454
+ };
1455
+ return {};
1456
+ }
1611
1457
  if (GPT_56_LONG_MODELS.has(resolvedModel)) return {
1612
1458
  autoCompactWindow: CLIPROXY_GPT56_LONG_CONTEXT_WINDOW,
1613
1459
  maxContextTokens: CLIPROXY_GPT56_LONG_CONTEXT_WINDOW
@@ -2050,12 +1896,12 @@ async function claudeSystemPromptFiles(workspace, harness) {
2050
1896
  }
2051
1897
  files.push(await ensureSessionContextBriefingFile());
2052
1898
  if (behavior.contextLayerKind === "pi") {
2053
- const { piGlobalContextFile } = await import("./context-layers-BGj2Y9l3.js");
1899
+ const { piGlobalContextFile } = await import("./context-layers-Ds1MnEFI.js");
2054
1900
  const globalFile = piGlobalContextFile();
2055
1901
  if (existsSync(globalFile)) files.unshift(globalFile);
2056
1902
  }
2057
1903
  if (behavior.contextLayerKind === "codex") {
2058
- const { codexGlobalContextFile } = await import("./context-layers-BGj2Y9l3.js");
1904
+ const { codexGlobalContextFile } = await import("./context-layers-Ds1MnEFI.js");
2059
1905
  const globalFile = codexGlobalContextFile();
2060
1906
  if (existsSync(globalFile)) files.unshift(globalFile);
2061
1907
  }
@@ -2384,7 +2230,7 @@ async function injectPiPromptTimeMemory(agentId, prompt) {
2384
2230
  agentRole: agentState.role ?? "work",
2385
2231
  agentHarness: agentState.harness ?? "claude-code"
2386
2232
  };
2387
- const { injectPromptTimeMemory } = await import("./injection-BviePcm3.js");
2233
+ const { injectPromptTimeMemory } = await import("./injection-BWsgHvrL.js");
2388
2234
  const result = await injectPromptTimeMemory({
2389
2235
  prompt,
2390
2236
  identity,
@@ -2418,7 +2264,7 @@ async function injectPiConversationMemory(opts, prompt) {
2418
2264
  agentRole: "work",
2419
2265
  agentHarness: "ohmypi"
2420
2266
  };
2421
- const { injectPromptTimeMemory } = await import("./injection-BviePcm3.js");
2267
+ const { injectPromptTimeMemory } = await import("./injection-BWsgHvrL.js");
2422
2268
  const result = await injectPromptTimeMemory({
2423
2269
  prompt,
2424
2270
  identity,
@@ -2984,7 +2830,7 @@ async function transitionIssueToInReview(issueId, workspacePath) {
2984
2830
  async function buildAgentLaunchConfig(opts) {
2985
2831
  const model = requireModelOverrideSync(opts.model);
2986
2832
  try {
2987
- const { injectOverdeckInfraDeny } = await import("./claude-settings-overlay-C7rWsnya.js");
2833
+ const { injectOverdeckInfraDeny } = await import("./claude-settings-overlay-CMS5Jab5.js");
2988
2834
  await Effect.runPromise(injectOverdeckInfraDeny(opts.workspace));
2989
2835
  } catch (err) {
2990
2836
  console.warn(`[agents] injectOverdeckInfraDeny failed for ${opts.agentId} (non-fatal): ${err instanceof Error ? err.message : err}`);
@@ -3077,7 +2923,7 @@ async function retrieveSpawnTimeMemoryContext(input) {
3077
2923
  agentRole: input.role,
3078
2924
  agentHarness: input.harness
3079
2925
  };
3080
- const { injectPromptTimeMemory } = await import("./injection-BviePcm3.js");
2926
+ const { injectPromptTimeMemory } = await import("./injection-BWsgHvrL.js");
3081
2927
  return (await injectPromptTimeMemory({
3082
2928
  prompt: input.prompt,
3083
2929
  identity,
@@ -3177,7 +3023,7 @@ async function assertWorkspaceStackHealthyForSpawn(issueId, role, allowHost = fa
3177
3023
  record.attempts += 1;
3178
3024
  spawnStackRebuildState.set(normalizedIssue, record);
3179
3025
  console.log(`[agents] Workspace stack for ${normalizedIssue} unhealthy (${details}) — rebuilding before spawn (attempt ${record.attempts}/${SPAWN_STACK_REBUILD_MAX_ATTEMPTS})`);
3180
- const { rebuildWorkspaceStack } = await import("./rebuild-stack-DrMyA_mA.js");
3026
+ const { rebuildWorkspaceStack } = await import("./rebuild-stack-BcBVFJp3.js");
3181
3027
  const result = await Effect.runPromise(rebuildWorkspaceStack(issueId, { onProgress: (m) => console.log(`[agents] ${normalizedIssue} stack rebuild: ${m}`) })).catch((err) => ({
3182
3028
  success: false,
3183
3029
  error: err instanceof Error ? err.message : String(err)
@@ -5552,7 +5398,7 @@ var init_runtime_census = __esmMin((() => {
5552
5398
  ]);
5553
5399
  runtimeCensusService = createRuntimeCensusService({
5554
5400
  listPanes: async () => {
5555
- const { listAllPaneRecords } = await import("./tmux-B8zsqD_6.js");
5401
+ const { listAllPaneRecords } = await import("./tmux-CYucGrTl.js");
5556
5402
  return Effect.runPromise(listAllPaneRecords());
5557
5403
  },
5558
5404
  readProcesses: readRuntimeProcessTable
@@ -6284,7 +6130,7 @@ async function spawnRunWithoutConsentClaim(issueId, role, options, acceptConsent
6284
6130
  let reapWarmIdle = false;
6285
6131
  const advancing = role === "review" || role === "test" || role === "ship";
6286
6132
  try {
6287
- const { isPaneDead } = await import("./tmux-B8zsqD_6.js");
6133
+ const { isPaneDead } = await import("./tmux-CYucGrTl.js");
6288
6134
  if (await Effect.runPromise(isPaneDead(agentId))) reapWarmIdle = true;
6289
6135
  else if (advancing) {
6290
6136
  const { status } = resolveCanonicalReviewStatus(issueId);
@@ -6293,7 +6139,7 @@ async function spawnRunWithoutConsentClaim(issueId, role, options, acceptConsent
6293
6139
  } catch {}
6294
6140
  if (!reapWarmIdle) throw new Error(`Role run ${agentId} already running. Use 'pan tell' to message it.`);
6295
6141
  console.log(`[spawn] ${agentId} is warm-idle from the previous cycle — reaping it for the new ${role} dispatch (PAN-2579)`);
6296
- const { killSession } = await import("./tmux-B8zsqD_6.js");
6142
+ const { killSession } = await import("./tmux-CYucGrTl.js");
6297
6143
  await Effect.runPromise(killSession(agentId)).catch(() => {});
6298
6144
  }
6299
6145
  await prepareWorkspaceForAgentSpawn(issueId, role, options.allowHost, workspace);
@@ -6308,7 +6154,7 @@ async function spawnRunWithoutConsentClaim(issueId, role, options, acceptConsent
6308
6154
  assertCodexNativeAuthForSpawn(resolvedHarness, listAgentStates());
6309
6155
  await ensureLifecycleHooksBeforeLaunch(agentId, resolvedHarness);
6310
6156
  if (getProviderForModelSync(selectedModel).name === "openai" && await getProviderAuthMode(selectedModel) === "subscription") {
6311
- const { isCliproxyRunning } = await import("./cliproxy-_yUU0HRY.js");
6157
+ const { isCliproxyRunning } = await import("./cliproxy-DdhFpcXU.js");
6312
6158
  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.");
6313
6159
  }
6314
6160
  const state = {
@@ -6435,7 +6281,7 @@ async function spawnRunWithoutConsentClaim(issueId, role, options, acceptConsent
6435
6281
  const claudeCmd = `bash ${launcherScript}`;
6436
6282
  console.log(`[claude-invoke] purpose=role-run | role=${role} | model=${state.model} | source=agents.ts:spawnRun | session=${agentId} | command="${claudeCmd}"`);
6437
6283
  try {
6438
- const { preTrustDirectory } = await import("./workspace-manager-jfkKAEuO.js");
6284
+ const { preTrustDirectory } = await import("./workspace-manager-BrbX90Rm.js");
6439
6285
  preTrustDirectory(workspace);
6440
6286
  } catch {}
6441
6287
  clearReadySignal(agentId);
@@ -6501,7 +6347,7 @@ async function spawnRunWithoutConsentClaim(issueId, role, options, acceptConsent
6501
6347
  }
6502
6348
  markAgentRunning(state);
6503
6349
  try {
6504
- const { snapshotWorkspaceHeadsPromise } = await import("./git-utils-CsKV0Dis.js");
6350
+ const { snapshotWorkspaceHeadsPromise } = await import("./git-utils-BAMwn9Nf.js");
6505
6351
  const headAnchor = await snapshotWorkspaceHeadsPromise(issueId, workspace);
6506
6352
  if (headAnchor) state.roleRunHead = headAnchor;
6507
6353
  } catch {}
@@ -6543,7 +6389,7 @@ async function spawnAgentWithoutConsentClaim(options, acceptConsent) {
6543
6389
  });
6544
6390
  console.log(`[DEBUG] Selected model: ${selectedModel}`);
6545
6391
  if (getProviderForModelSync(selectedModel).name === "openai" && await getProviderAuthMode(selectedModel) === "subscription") {
6546
- const { isCliproxyRunning } = await import("./cliproxy-_yUU0HRY.js");
6392
+ const { isCliproxyRunning } = await import("./cliproxy-DdhFpcXU.js");
6547
6393
  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.");
6548
6394
  }
6549
6395
  const resolvedHarness = await resolveHarness({
@@ -6593,7 +6439,7 @@ async function spawnAgentWithoutConsentClaim(options, acceptConsent) {
6593
6439
  });
6594
6440
  }
6595
6441
  if (role === "work") try {
6596
- const { writeStoryFeatureContext } = await import("./work-agent-prompt-CJJ4tXci.js");
6442
+ const { writeStoryFeatureContext } = await import("./work-agent-prompt-BnhKNAg7.js");
6597
6443
  await writeStoryFeatureContext(options.workspace, options.issueId);
6598
6444
  } catch (ctxErr) {
6599
6445
  console.warn(`[agents] Could not write story feature context for ${options.issueId}: ${ctxErr.message}`);
@@ -6640,7 +6486,7 @@ async function spawnAgentWithoutConsentClaim(options, acceptConsent) {
6640
6486
  try {
6641
6487
  const venvPath = join$1(options.workspace, ".venv");
6642
6488
  if (isTldrEnabledSync() && existsSync(venvPath)) {
6643
- const { getTldrDaemonServiceSync } = await import("./tldr-daemon-BNQHwblU.js");
6489
+ const { getTldrDaemonServiceSync } = await import("./tldr-daemon-CRSAkhBx.js");
6644
6490
  const tldrService = getTldrDaemonServiceSync(options.workspace, venvPath);
6645
6491
  if (!(await tldrService.getStatus()).running) {
6646
6492
  await tldrService.start(true);
@@ -6680,13 +6526,13 @@ async function spawnAgentWithoutConsentClaim(options, acceptConsent) {
6680
6526
  const claudeCmd = `bash ${launcherScript}`;
6681
6527
  console.log(`[claude-invoke] purpose=work-agent | model=${state.model} | source=agents.ts:spawnAgent | session=${agentId} | command="${claudeCmd}"`);
6682
6528
  try {
6683
- const { preTrustDirectory } = await import("./workspace-manager-jfkKAEuO.js");
6529
+ const { preTrustDirectory } = await import("./workspace-manager-BrbX90Rm.js");
6684
6530
  preTrustDirectory(options.workspace);
6685
6531
  } catch {}
6686
6532
  try {
6687
- const { isGitHubAppConfigured, generateInstallationToken, configureWorkspaceForBot } = await import("./github-app-Oi5hdn1n.js");
6533
+ const { isGitHubAppConfigured, generateInstallationToken, configureWorkspaceForBot } = await import("./github-app-BWziYCf3.js");
6688
6534
  if (isGitHubAppConfigured()) {
6689
- const { findProjectByPathSync } = await import("./projects-LftaVK99.js");
6535
+ const { findProjectByPathSync } = await import("./projects-BMuEf14J.js");
6690
6536
  const ghRepo = findProjectByPathSync(resolve$1(options.workspace, "..", ".."))?.github_repo;
6691
6537
  if (ghRepo) {
6692
6538
  const [owner, repo] = ghRepo.split("/");
@@ -6702,7 +6548,7 @@ async function spawnAgentWithoutConsentClaim(options, acceptConsent) {
6702
6548
  const launchAndCaptureKimiSession = async () => {
6703
6549
  let kimiExistingSessionsBefore;
6704
6550
  if (resolvedHarness === "kimi-code") try {
6705
- const { kimiSessionsRoot } = await import("./kimi-code-vtXl2DR5.js");
6551
+ const { kimiSessionsRoot } = await import("./kimi-code-BxkDgaj4.js");
6706
6552
  kimiExistingSessionsBefore = new Set(await readdir$1(kimiSessionsRoot(join$1(homedir(), ".kimi-code"), options.workspace)));
6707
6553
  } catch {
6708
6554
  kimiExistingSessionsBefore = /* @__PURE__ */ new Set();
@@ -6720,14 +6566,14 @@ async function spawnAgentWithoutConsentClaim(options, acceptConsent) {
6720
6566
  ...providerEnv
6721
6567
  } }));
6722
6568
  if (kimiExistingSessionsBefore) {
6723
- const { waitForNewKimiSessionAsync, writeKimiSessionId } = await import("./kimi-code-vtXl2DR5.js");
6569
+ const { waitForNewKimiSessionAsync, writeKimiSessionId } = await import("./kimi-code-BxkDgaj4.js");
6724
6570
  const sessionId = await waitForNewKimiSessionAsync(join$1(homedir(), ".kimi-code"), options.workspace, kimiExistingSessionsBefore);
6725
6571
  if (sessionId) writeKimiSessionId(agentId, sessionId);
6726
6572
  else throw new Error(`kimi-code session capture timed out for ${agentId} — no new session directory appeared under the workspace bucket`);
6727
6573
  }
6728
6574
  };
6729
6575
  if (resolvedHarness === "kimi-code") {
6730
- const { withKimiSessionCaptureLock } = await import("./kimi-code-vtXl2DR5.js");
6576
+ const { withKimiSessionCaptureLock } = await import("./kimi-code-BxkDgaj4.js");
6731
6577
  try {
6732
6578
  await withKimiSessionCaptureLock(join$1(homedir(), ".kimi-code"), options.workspace, launchAndCaptureKimiSession);
6733
6579
  } catch (err) {
@@ -6790,7 +6636,7 @@ async function spawnAgentWithoutConsentClaim(options, acceptConsent) {
6790
6636
  const codexHomeForAgent = join$1(homedir(), ".overdeck", "agents", agentId, "codex-home");
6791
6637
  (async () => {
6792
6638
  try {
6793
- const { waitForCodexRollout, extractThreadIdFromRollout, writeThreadId } = await import("./codex-DZhFfcWu.js");
6639
+ const { waitForCodexRollout, extractThreadIdFromRollout, writeThreadId } = await import("./codex-BValsmtK.js");
6794
6640
  const rollout = await waitForCodexRollout(codexHomeForAgent, 12e4);
6795
6641
  if (rollout) {
6796
6642
  const threadId = extractThreadIdFromRollout(rollout);
@@ -7792,7 +7638,7 @@ function deliverWithOptionalKey(normalizedId, message, caller, deliveryMethod, d
7792
7638
  * at-most-once across the whole replay window.
7793
7639
  */
7794
7640
  async function resumeThenDeliverKeyed(normalizedId, message, caller, agentState, dedupKey) {
7795
- const { resumeAgent } = await import("./agents-DpCuoF65.js");
7641
+ const { resumeAgent } = await import("./agents-DixZjXWm.js");
7796
7642
  const result = await resumeAgent(normalizedId);
7797
7643
  if (!result.success) throw new Error(`Failed to auto-resume agent: ${result.error}`);
7798
7644
  const delivery = await deliverAgentMessage(normalizedId, message, `messageAgent:${caller}`, resolveAgentDeliveryMethod(agentState), { dedupKey });
@@ -7847,7 +7693,7 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
7847
7693
  }
7848
7694
  console.log(`[agents] Auto-resuming suspended agent ${normalizedId} to deliver message`);
7849
7695
  if (opts.dedupKey !== void 0) return resumeThenDeliverKeyed(normalizedId, message, caller, agentState, opts.dedupKey);
7850
- const { resumeAgent } = await import("./agents-DpCuoF65.js");
7696
+ const { resumeAgent } = await import("./agents-DixZjXWm.js");
7851
7697
  const result = await resumeAgent(normalizedId, message);
7852
7698
  if (!result.success) throw new Error(`Failed to auto-resume agent: ${result.error}`);
7853
7699
  if (result.messageDelivered === false) throw new Error(`Agent resumed but ready signal did not fire — message not delivered. Feedback is in the mail queue.`);
@@ -7872,7 +7718,7 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
7872
7718
  }
7873
7719
  console.log(`[agents] Auto-resuming stopped agent ${normalizedId} to deliver feedback (session exists: ${await Effect.runPromise(sessionExists(normalizedId))})`);
7874
7720
  if (opts.dedupKey !== void 0) return resumeThenDeliverKeyed(normalizedId, message, caller, agentState, opts.dedupKey);
7875
- const { resumeAgent } = await import("./agents-DpCuoF65.js");
7721
+ const { resumeAgent } = await import("./agents-DixZjXWm.js");
7876
7722
  const resumeResult = await resumeAgent(normalizedId, message);
7877
7723
  queueAgentMail(normalizedId, message);
7878
7724
  if (resumeResult.success && resumeResult.messageDelivered !== false) {
@@ -7916,7 +7762,7 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
7916
7762
  const resumeModel = agentState.model || "claude-sonnet-4-6";
7917
7763
  const fallbackHarness = agentState.harness ?? "claude-code";
7918
7764
  const harnessLaunch = await prepareHarnessLaunch(fallbackHarness);
7919
- const { assertWorkspaceStackHealthyForSpawn } = await import("./agents-DpCuoF65.js");
7765
+ const { assertWorkspaceStackHealthyForSpawn } = await import("./agents-DixZjXWm.js");
7920
7766
  await assertWorkspaceStackHealthyForSpawn(agentState.issueId || normalizedId.replace(/^agent-/, "").toUpperCase(), resumeRole, agentState.hostOverride === true, agentState.workspace);
7921
7767
  const fallbackPiFields = fallbackHarness === "ohmypi" ? await getOhmypiLauncherFields(normalizedId, resumeModel) : {};
7922
7768
  const fallbackCodexFields = fallbackHarness === "codex" ? getCodexLauncherFields(normalizedId, resumeModel, agentState.workspace, resumeRole) : {};
@@ -7999,12 +7845,12 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
7999
7845
  ...reason ? { reason } : {}
8000
7846
  };
8001
7847
  }
8002
- const { loadRemoteAgentState, sendToRemoteAgent } = await import("./remote-agents-BVtASiOF.js");
7848
+ const { loadRemoteAgentState, sendToRemoteAgent } = await import("./remote-agents-MuXx2gWm.js");
8003
7849
  const remoteState = loadRemoteAgentState(normalizedId);
8004
7850
  if (remoteState && remoteState.vmName) {
8005
7851
  console.log(`[agents] Sending message to remote agent ${normalizedId} on ${remoteState.vmName}`);
8006
7852
  if (opts.dedupKey !== void 0) {
8007
- const { sendToRemoteAgentKeyed } = await import("./remote-agents-BVtASiOF.js");
7853
+ const { sendToRemoteAgentKeyed } = await import("./remote-agents-MuXx2gWm.js");
8008
7854
  const remoteOutcome = await sendToRemoteAgentKeyed(normalizedId, remoteState.vmName, message, opts.dedupKey);
8009
7855
  queueAgentMail(normalizedId, message, "delivered", opts.dedupKey);
8010
7856
  await appendTellInterventionForUserSource(normalizedId, caller);
@@ -8068,7 +7914,7 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
8068
7914
  if (panePids.length > 0 && !await hasAgentRuntimeInSubtree(panePids[0], expectedHarness)) {
8069
7915
  console.warn(`[agents] ${normalizedId} tmux session is a zombie (no ${expectedHarness} runtime) — attempting resume`);
8070
7916
  if (opts.dedupKey !== void 0) return resumeThenDeliverKeyed(normalizedId, message, caller, agentState, opts.dedupKey);
8071
- const { resumeAgent } = await import("./agents-DpCuoF65.js");
7917
+ const { resumeAgent } = await import("./agents-DixZjXWm.js");
8072
7918
  const resumeResult = await resumeAgent(normalizedId, message);
8073
7919
  if (resumeResult.success) {
8074
7920
  const delivered = resumeResult.messageDelivered !== false;
@@ -8468,7 +8314,7 @@ async function buildCompactRecoverySeed(agentId) {
8468
8314
  if (agentState?.workspace && sessionId) {
8469
8315
  const sessionFile = sessionFilePath(agentState.workspace, sessionId);
8470
8316
  try {
8471
- const [{ getConversationCompactionSettings }, { generateSmartSummary }] = await Promise.all([import("./conversation-compaction-DzIjYMfg.js"), import("./smart-compaction-BkzjVpWL.js")]);
8317
+ const [{ getConversationCompactionSettings }, { generateSmartSummary }] = await Promise.all([import("./conversation-compaction-DzMXGRiJ.js"), import("./smart-compaction-CUXn8mfX.js")]);
8472
8318
  const settings = getConversationCompactionSettings();
8473
8319
  summary = (await Effect.runPromise(generateSmartSummary({
8474
8320
  jsonlPath: sessionFile,
@@ -8479,7 +8325,7 @@ async function buildCompactRecoverySeed(agentId) {
8479
8325
  } catch (err) {
8480
8326
  logAgentLifecycleSync(normalizedId, `compact-recovery smart summary failed (${err instanceof Error ? err.message : String(err)}); trying heuristic fallback`);
8481
8327
  try {
8482
- const { generateFallbackSummary } = await import("./summary-fork-DIQmtOuV.js");
8328
+ const { generateFallbackSummary } = await import("./summary-fork-CojrFKb6.js");
8483
8329
  summary = await Effect.runPromise(generateFallbackSummary(sessionFile));
8484
8330
  } catch (fallbackErr) {
8485
8331
  logAgentLifecycleSync(normalizedId, `compact-recovery fallback summary failed (${fallbackErr instanceof Error ? fallbackErr.message : String(fallbackErr)}); seeding with reseed instructions only`);
@@ -9001,6 +8847,25 @@ function looksLikeGenericConfirmation(line) {
9001
8847
  function looksLikePiPermission(text) {
9002
8848
  return /(?:permission|approval|approve|allow).{0,80}(?:required|request|prompt|action|command)/i.test(text) || /(?:allow|approve|run|execute)\s+(?:this\s+)?(?:command|tool|action)/i.test(text);
9003
8849
  }
8850
+ /**
8851
+ * PAN-3766 — ohmypi `ask` modal footer. Pi renders a blocking multiple-choice
8852
+ * question in a box-drawn frame whose footer hint reads "Enter select · n note
8853
+ * · ↑/↓ move · Esc cancel". The modal sits at the bottom of the pane while open
8854
+ * and disappears when answered. The JSONL scan (scanPendingInputsPromise)
8855
+ * carries the question payload for conversations; this pane signal covers
8856
+ * sessions whose transcript is not wired into that scan (pi work agents).
8857
+ */
8858
+ function looksLikePiAskFooter(line) {
8859
+ return /Enter\s+select\b/i.test(line) && /Esc\s+cancel/i.test(line);
8860
+ }
8861
+ /** Box-drawing chrome lines that may follow the ask modal's footer (╰───╯). */
8862
+ function looksLikePiBoxChrome(line) {
8863
+ return /^[\s╰╯╭╮─│├┤┌┐└┘┬┴┼]*$/.test(line);
8864
+ }
8865
+ /** The modal's header line: plain ("Ask 1 questions") or boxed ("╭─ Ask ─╮"). */
8866
+ function looksLikePiAskHeader(line) {
8867
+ return /^\s*(?:╭\s*─*\s*)?Ask\b/.test(line);
8868
+ }
9004
8869
  function looksLikePlanningDone(text) {
9005
8870
  return /planning finalized\s*[—-]\s*click done/i.test(text) || /click Done in the dashboard/i.test(text) || /planning (?:is )?complete.{0,120}(?:click|press|select) Done/i.test(text);
9006
8871
  }
@@ -9063,6 +8928,21 @@ function detectAwaitingInputFromPaneSync(pane, options = {}) {
9063
8928
  prompt: snippet
9064
8929
  };
9065
8930
  }
8931
+ const piAskIndex = lastIndexMatching(lines, looksLikePiAskFooter);
8932
+ if (piAskIndex >= 0 && isRecentPromptIndex(lines, piAskIndex)) {
8933
+ const trailing = lines.slice(piAskIndex + 1);
8934
+ if (trailing.length <= 3 && trailing.every(looksLikePiBoxChrome)) {
8935
+ let headerIndex = -1;
8936
+ for (let i = piAskIndex - 1; i >= 0 && i >= piAskIndex - 30; i--) if (looksLikePiAskHeader(lines[i])) {
8937
+ headerIndex = i;
8938
+ break;
8939
+ }
8940
+ return {
8941
+ reason: "user_question",
8942
+ prompt: snippetAround(lines, headerIndex >= 0 ? headerIndex : piAskIndex, 0, 12)
8943
+ };
8944
+ }
8945
+ }
9066
8946
  if (options.isPlanning && looksLikePlanningDone(recentText)) {
9067
8947
  const doneIndex = lastIndexMatching(lines, (line) => /done|planning/i.test(line));
9068
8948
  return {
@@ -9410,6 +9290,60 @@ function isUserTextEntry(entry) {
9410
9290
  });
9411
9291
  return false;
9412
9292
  }
9293
+ function isPiMessageEntry(entry) {
9294
+ if (!entry || typeof entry !== "object") return false;
9295
+ const e = entry;
9296
+ return e.type === "message" && typeof e.message?.role === "string";
9297
+ }
9298
+ function piAskQuestions(raw) {
9299
+ if (!Array.isArray(raw)) return [];
9300
+ const questions = [];
9301
+ for (const q of raw) {
9302
+ if (!q || typeof q !== "object") continue;
9303
+ const r = q;
9304
+ const options = Array.isArray(r["options"]) ? r["options"].filter((o) => !!o && typeof o === "object").map((o) => ({
9305
+ label: typeof o["label"] === "string" ? o["label"] : "",
9306
+ description: typeof o["description"] === "string" ? o["description"] : ""
9307
+ })) : [];
9308
+ questions.push({
9309
+ question: typeof r["question"] === "string" ? r["question"] : "",
9310
+ header: typeof r["header"] === "string" ? r["header"] : "",
9311
+ options,
9312
+ multiSelect: r["multiSelect"] === true
9313
+ });
9314
+ }
9315
+ return questions;
9316
+ }
9317
+ function scanPiEntry(entry, state) {
9318
+ const e = entry;
9319
+ const message = e.message;
9320
+ if (!message) return;
9321
+ const timestamp = typeof e.timestamp === "string" ? e.timestamp : (/* @__PURE__ */ new Date()).toISOString();
9322
+ if (message.role === "assistant" && Array.isArray(message.content)) {
9323
+ for (const item of message.content) {
9324
+ if (!item || typeof item !== "object") continue;
9325
+ const c = item;
9326
+ if (c.type === "toolCall" && c.name === "ask" && typeof c.id === "string") state.askToolCalls.set(c.id, {
9327
+ toolId: c.id,
9328
+ timestamp,
9329
+ questions: piAskQuestions(c.arguments?.questions)
9330
+ });
9331
+ }
9332
+ return;
9333
+ }
9334
+ if (message.role === "toolResult" && typeof message.toolCallId === "string") {
9335
+ if (state.askToolCalls.has(message.toolCallId)) {
9336
+ state.askAnswered.add(message.toolCallId);
9337
+ state.askDeniedAwaitingUser.delete(message.toolCallId);
9338
+ }
9339
+ }
9340
+ }
9341
+ /**
9342
+ * Scan a session transcript for inputs waiting on the operator: outstanding
9343
+ * AskUserQuestion tool calls (claude) or `ask` tool calls (ohmypi, PAN-3766),
9344
+ * and claude plan-mode state. Format is detected per line, so a transcript
9345
+ * resolves correctly even when the recorded harness is stale.
9346
+ */
9413
9347
  async function scanPendingInputsPromise(jsonlPath) {
9414
9348
  if (!existsSync(jsonlPath)) return {
9415
9349
  askUserQuestions: [],
@@ -9429,6 +9363,14 @@ async function scanPendingInputsPromise(jsonlPath) {
9429
9363
  const exitPlanModeFiredAfterEnter = /* @__PURE__ */ new Set();
9430
9364
  for (const line of lines) try {
9431
9365
  const entry = JSON.parse(line);
9366
+ if (isPiMessageEntry(entry)) {
9367
+ scanPiEntry(entry, {
9368
+ askToolCalls,
9369
+ askAnswered,
9370
+ askDeniedAwaitingUser
9371
+ });
9372
+ continue;
9373
+ }
9432
9374
  if (isUserTextEntry(entry)) {
9433
9375
  for (const id of askDeniedAwaitingUser) askAnswered.add(id);
9434
9376
  askDeniedAwaitingUser.clear();
@@ -9787,7 +9729,7 @@ async function restartAgent(agentId, opts = {}, deps = {}) {
9787
9729
  unlinkSync(join$1(getAgentDir(normalizedId), "kimi-session-id"));
9788
9730
  } catch {}
9789
9731
  try {
9790
- const { kimiSessionsRoot } = await import("./kimi-code-vtXl2DR5.js");
9732
+ const { kimiSessionsRoot } = await import("./kimi-code-BxkDgaj4.js");
9791
9733
  kimiExistingSessionsBefore = new Set(await readdir$1(kimiSessionsRoot(join$1(homedir(), ".kimi-code"), agentState.workspace)));
9792
9734
  } catch {
9793
9735
  kimiExistingSessionsBefore = /* @__PURE__ */ new Set();
@@ -9804,14 +9746,14 @@ async function restartAgent(agentId, opts = {}, deps = {}) {
9804
9746
  ...providerEnv
9805
9747
  } }));
9806
9748
  if (kimiExistingSessionsBefore) {
9807
- const { waitForNewKimiSessionAsync, writeKimiSessionId } = await import("./kimi-code-vtXl2DR5.js");
9749
+ const { waitForNewKimiSessionAsync, writeKimiSessionId } = await import("./kimi-code-BxkDgaj4.js");
9808
9750
  const sessionId = await waitForNewKimiSessionAsync(join$1(homedir(), ".kimi-code"), agentState.workspace, kimiExistingSessionsBefore);
9809
9751
  if (!sessionId) throw new Error(`kimi-code session capture timed out after fresh relaunch for ${normalizedId} — no new session directory appeared under the workspace bucket`);
9810
9752
  writeKimiSessionId(normalizedId, sessionId);
9811
9753
  }
9812
9754
  };
9813
9755
  if (effectiveHarness === "kimi-code") {
9814
- const { withKimiSessionCaptureLock } = await import("./kimi-code-vtXl2DR5.js");
9756
+ const { withKimiSessionCaptureLock } = await import("./kimi-code-BxkDgaj4.js");
9815
9757
  await withKimiSessionCaptureLock(join$1(homedir(), ".kimi-code"), agentState.workspace, launchAndCaptureKimiSession);
9816
9758
  } else await launchAndCaptureKimiSession();
9817
9759
  const prompt = message || buildResumeContinueMessage(agentState);
@@ -10041,7 +9983,7 @@ async function recoverAgent(agentId, opts = {}) {
10041
9983
  const launchAndCaptureKimiSession = async () => {
10042
9984
  let kimiExistingSessionsBefore;
10043
9985
  if (!resumeSessionId) try {
10044
- const { kimiSessionsRoot } = await import("./kimi-code-vtXl2DR5.js");
9986
+ const { kimiSessionsRoot } = await import("./kimi-code-BxkDgaj4.js");
10045
9987
  kimiExistingSessionsBefore = new Set(await readdir$1(kimiSessionsRoot(join$1(homedir(), ".kimi-code"), state.workspace)));
10046
9988
  } catch {
10047
9989
  kimiExistingSessionsBefore = /* @__PURE__ */ new Set();
@@ -10055,13 +9997,13 @@ async function recoverAgent(agentId, opts = {}) {
10055
9997
  ...kimiProviderEnv
10056
9998
  } }));
10057
9999
  if (kimiExistingSessionsBefore) {
10058
- const { waitForNewKimiSessionAsync, writeKimiSessionId } = await import("./kimi-code-vtXl2DR5.js");
10000
+ const { waitForNewKimiSessionAsync, writeKimiSessionId } = await import("./kimi-code-BxkDgaj4.js");
10059
10001
  const sessionId = await waitForNewKimiSessionAsync(join$1(homedir(), ".kimi-code"), state.workspace, kimiExistingSessionsBefore);
10060
10002
  if (sessionId) writeKimiSessionId(normalizedId, sessionId);
10061
10003
  else throw new Error(`kimi-code session capture timed out after fresh relaunch for ${normalizedId} — no new session directory appeared under the workspace bucket`);
10062
10004
  }
10063
10005
  };
10064
- const { withKimiSessionCaptureLock } = await import("./kimi-code-vtXl2DR5.js");
10006
+ const { withKimiSessionCaptureLock } = await import("./kimi-code-BxkDgaj4.js");
10065
10007
  try {
10066
10008
  await withKimiSessionCaptureLock(join$1(homedir(), ".kimi-code"), state.workspace, launchAndCaptureKimiSession);
10067
10009
  } catch (err) {
@@ -11985,6 +11927,6 @@ var init_agent_state = __esmMin((() => {
11985
11927
  };
11986
11928
  }));
11987
11929
  //#endregion
11988
- export { deliverCommitForReview as $, isTerminalSwarmSlotAgent as $n, piFifoPaths as $r, init_activity as $t, saveAgentStateSync as A, getAgentRuntimeSnapshot as Ai, init_runtime_census as An, transitionIssueToInReview as Ar, init_agent_input_detection as At, resolveAgentTargetSync as B, markAgentStateServiceInProcess as Bi, countRunningAgents as Bn, getAgentRuntimeBaseCommand as Br, isContextOverflowError as Bt, markAgentTroubled as C, writeChannelsBridgeMcpConfig as Ci, init_state_dir_removal as Cn, paneShowsCodexAuthBurn as Cr, getAgentWorkspace as Ct, recordStartupSessionExit as D, writePtyToken as Di, descendantPidsForSession as Dn, init_spawn_prep as Dr, scanPendingInputsPromise as Dt, recordAgentFailureSync as E, init_pty_token as Ei, removeAgentStateDir as En, defaultRunWorkspace as Er, isInteractiveRoleAgent as Et, writeAgentStateJsonSync as F, init_agents$1 as Fi, init_collector as Fn, init_resolve_tier as Fr, resumeAgent as Ft, init_runtime_state as G, init_concurrency as Gn, getRoleRuntimeBaseCommand as Gr, resolveAgentDeliveryMethod as Gt, waitForReadySignal as H, init_ohmypi_parser as Hi, describeRunningAgents as Hn, getKimiCodeLauncherFields as Hr, init_messaging as Ht, isRole as I, init_agent_record_sync as Ii, LINUX_MEMORY_PRESSURE_DEFAULTS as In, resolveTier as Ir, answerSessionPaneChoice as It, compactAtTierRunBoundary as J, resetPatrolDispatchBudget as Jn, injectPiConversationMemory as Jr, appendActivity as Jt, saveAgentRuntimeState as K, releaseAdvancingSlot as Kn, hasAgentRuntimeInSubtree as Kr, init_operator_interventions as Kt, clearReadySignal as L, readAgentHarnessModelRecordSync as Li, init_linux as Ln, OHMYPI_AGENT_READY_TIMEOUT_SECONDS as Lr, captureSessionPaneChoice as Lt, setAgentPausedSync as M, appendAgentPlaneLifecycle as Mi, refreshRuntimeCensus as Mn, resolveImplicitStaffing as Mr, parseCodexApprovalPrompt as Mt, setAgentYieldedSync as N, appendAgentPlaneSession as Ni, runtimeCensusHasHarnessProcess as Nn, resolveIssueWorkModel as Nr, buildCompactRecoverySeed as Nt, resetAgentFailureCount as O, init_pty_supervisor_locate as Oi, getRuntimeCensus as On, retrieveSpawnTimeMemoryContext as Or, detectAwaitingInputForAgent as Ot, wipeAgentStateDirs as P, flushAgentPlaneWrites as Pi, createHostHealthCollector as Pn, resolveStaffing as Pr, init_resume as Pt, shouldReplayCompactAtTierRunBoundary as Q, init_swarm_slot_lifecycle as Qn, init_pi_fifo as Qr, getSessionId as Qt, isQualifiedAgentId as R, getRuntimeSnapshot as Ri, DARWIN_MEMORY_PRESSURE_DEFAULTS as Rn, describeOhmypiSpawnFailure as Rr, init_session_pane_choice as Rt, markAgentStoppedState as S, init_supervisor_channels as Si, hasRetainedTranscriptsMarker as Sn, isCodexAuthRouted as Sr, getAgentPendingQuestions as St, recordAgentFailure as T, init_resume_contract as Ti, markRetainedTranscripts as Tn, buildAgentLaunchConfig as Tr, isBlockedOnPendingInput as Tt, getAgentRuntimeState as U, parseOhmypiSessionCostResultSync as Ui, emergencyBrake as Un, getOhmypiLauncherFields as Ur, messageAgent as Ut, waitForAgentIdle as V, setAgentRuntimeMirror as Vi, countRunningSwarmSlotsForIssue as Vn, getCodexLauncherFields as Vr, isContextOverflowTail as Vt, getAgentRuntimeStateSync as W, getConcurrencyLimits as Wn, getProviderAuthMode as Wr, messageAgentWithOutcome as Wt, replayCrashedStandingAgent as X, tryReserveSwarmSlot as Xn, waitForAcpHostReady as Xr, getLatestSessionId as Xt, contextWindowForModel as Y, tryReserveAdvancingSlot as Yn, roleAgentDefinitionPath as Yr, getActivity as Yt, replayStandingAgent as Z, workResumeSlotsAvailable as Zn, waitForPromptReady as Zr, getLatestSessionIdSync as Zt, init_agent_state as _, buildResumeContinueMessage as _i, listAgentStates as _n, init_bridge_token as _r, init_pending_decision_gate as _t, clearAgentOperatorGatesForIssuesSync as a, init_claude_auth as ai, init_spawn as an, deliverAgentMessage as ar, broadcastCommit as at, markAgentRunning as b, dismissDevChannelsDialog as bi, warnOnBareNumericIssueIds as bn, checkCodexAuthStatus as br, getAgentJsonlMtime as bt, clearAgentTroubled as c, determineModel as ci, ensureRegisteredSlotWorktree as cn, deliverResumeMessageWithTranscriptConfirmation as cr, init_tier_escalation as ct, decideResumeGate as d, getProviderTmuxFlags as di, init_session_history as dn, resilientDeliveryMethod as dr, reconcileSlotState as dt, init_ohmypi_fifo as ei, resolveLatestSessionIdSync as en, getCachedMemoryVerdict as er, init_tier_supervisor as et, getAgentDir as f, init_provider_health as fi, init_termination as fn, setAgentDeliveryMethod as fr, autoRecoverAgents as ft, getAgentStateSync as g, buildDefaultResumeContinueMessage as gi, init_queries as gn, BRIDGE_TOKEN_HEADER as gr, detectPendingOperatorDecision as gt, getAgentStateFilePath as h, init_openai_auth as hi, dropLegacyAgentStatesMissingRoleAsync as hn, probeTranscriptSince as hr, restartAgent as ht, clearAgentOperatorGatesForIssueSync as i, getClaudeAuthStatus as ii, init_ohmypi as in, SocketPostStatusError as ir, supervisorAgentId as it, setAgentPaused as j, init_agent_runtime as ji, panePidsForSession as jn, init_staffing as jr, normalizeAwaitingInputPrompt as jt, saveAgentState as k, resolvePtySupervisorScriptPath as ki, getRuntimeCensusSnapshot as kn, transitionIssueToInProgress as kr, detectAwaitingInputFromPaneSync as kt, clearAgentTroubledSync as l, getProviderEnvForModel as li, init_registered_slot_spawn as ln, init_delivery as lr, init_slot_reconcile as lt, getAgentState as m, getOpenAIAuthStatus as mi, stopAgentSync as mn, init_transcript_landing as mr, recoverAgent as mt, SESSION_EXITED_BEFORE_KICKOFF as n, init_context as ni, init_event_reads as nn, setCachedMemoryVerdict as nr, shouldSupervise as nt, clearAgentPaused as o, buildCavemanExports as oi, spawnAgent as on, deliverAgentPermissionDecision as or, init_tier_feed as ot, getAgentResumeGateBlockReason as p, validateProviderHealth as pi, stopAgent as pn, captureTranscriptUserRecordSnapshot as pr, detectCrashedAgents as pt, init_agents as q, releaseSwarmSlot as qn, init_runtime_command as qr, operatorInterventionEvent as qt, __testInternals as r, materializeAcpContextFile as ri, createOhmypiRuntimeSync as rn, AmbiguousKeyedDeliveryError as rr, spawnTierSupervisor as rt, clearAgentPausedSync as s, buildSpawnEnvForModel as si, spawnRun as sn, deliverInitialPromptWithRetry as sr, decideEscalation as st, GOVERNOR_SLOT_PAUSE_REASON_PREFIX as t, ohmypiFifoPaths as ti, saveSessionId as tn, init_memory_verdict_cache as tr, loadPrdDraft as tt, clearYieldForResumeSync as u, getProviderExportsForModel as ui, appendSessionIdToHistory as un, keyedSupervisorFailureKind as ur, listSlotAssignments as ut, isAgentPaused as v, decideChannelsForWorkAgent as vi, listRunningAgents as vn, writeBridgeTokenSync as vr, computeAgentEnrichment as vt, recordAgentActivitySync as w, buildResumeContract as wi, listAgentStateFilesForRemoval as wn, assertWorkspaceStackHealthyForSpawn as wr, init_agent_enrichment as wt, markAgentRunningState as x, hasCompletionMarkerForAgent as xi, RETAINED_TRANSCRIPTS_MARKER as xn, init_codex_auth as xr, getAgentJsonlPath as xt, isAgentTroubled as y, decideSupervisorForWorkAgent as yi, listRunningAgentsSync as yn, applyCodexAuthBurnFlag as yr, countPendingAskUserQuestionsForAgent as yt, normalizeAgentId as z, init_agent_runtime_mirror as zi, init_darwin as zn, getAcpLauncherFields as zr, init_context_overflow as zt };
11930
+ export { deliverCommitForReview as $, isTerminalSwarmSlotAgent as $n, piFifoPaths as $r, init_activity as $t, saveAgentStateSync as A, getAgentRuntimeSnapshot as Ai, init_runtime_census as An, transitionIssueToInReview as Ar, init_agent_input_detection as At, resolveAgentTargetSync as B, markAgentStateServiceInProcess as Bi, countRunningAgents as Bn, getAgentRuntimeBaseCommand as Br, isContextOverflowError as Bt, markAgentTroubled as C, writeChannelsBridgeMcpConfig as Ci, init_state_dir_removal as Cn, paneShowsCodexAuthBurn as Cr, getAgentWorkspace as Ct, recordStartupSessionExit as D, writePtyToken as Di, descendantPidsForSession as Dn, init_spawn_prep as Dr, scanPendingInputsPromise as Dt, recordAgentFailureSync as E, init_pty_token as Ei, removeAgentStateDir as En, defaultRunWorkspace as Er, isInteractiveRoleAgent as Et, writeAgentStateJsonSync as F, init_agents$1 as Fi, init_collector as Fn, init_resolve_tier as Fr, resumeAgent as Ft, init_runtime_state as G, init_concurrency as Gn, getRoleRuntimeBaseCommand as Gr, resolveAgentDeliveryMethod as Gt, waitForReadySignal as H, describeRunningAgents as Hn, getKimiCodeLauncherFields as Hr, init_messaging as Ht, isRole as I, init_agent_record_sync as Ii, LINUX_MEMORY_PRESSURE_DEFAULTS as In, resolveTier as Ir, answerSessionPaneChoice as It, compactAtTierRunBoundary as J, resetPatrolDispatchBudget as Jn, injectPiConversationMemory as Jr, appendActivity as Jt, saveAgentRuntimeState as K, releaseAdvancingSlot as Kn, hasAgentRuntimeInSubtree as Kr, init_operator_interventions as Kt, clearReadySignal as L, readAgentHarnessModelRecordSync as Li, init_linux as Ln, OHMYPI_AGENT_READY_TIMEOUT_SECONDS as Lr, captureSessionPaneChoice as Lt, setAgentPausedSync as M, appendAgentPlaneLifecycle as Mi, refreshRuntimeCensus as Mn, resolveImplicitStaffing as Mr, parseCodexApprovalPrompt as Mt, setAgentYieldedSync as N, appendAgentPlaneSession as Ni, runtimeCensusHasHarnessProcess as Nn, resolveIssueWorkModel as Nr, buildCompactRecoverySeed as Nt, resetAgentFailureCount as O, init_pty_supervisor_locate as Oi, getRuntimeCensus as On, retrieveSpawnTimeMemoryContext as Or, detectAwaitingInputForAgent as Ot, wipeAgentStateDirs as P, flushAgentPlaneWrites as Pi, createHostHealthCollector as Pn, resolveStaffing as Pr, init_resume as Pt, shouldReplayCompactAtTierRunBoundary as Q, init_swarm_slot_lifecycle as Qn, init_pi_fifo as Qr, getSessionId as Qt, isQualifiedAgentId as R, getRuntimeSnapshot as Ri, DARWIN_MEMORY_PRESSURE_DEFAULTS as Rn, describeOhmypiSpawnFailure as Rr, init_session_pane_choice as Rt, markAgentStoppedState as S, init_supervisor_channels as Si, hasRetainedTranscriptsMarker as Sn, isCodexAuthRouted as Sr, getAgentPendingQuestions as St, recordAgentFailure as T, init_resume_contract as Ti, markRetainedTranscripts as Tn, buildAgentLaunchConfig as Tr, isBlockedOnPendingInput as Tt, getAgentRuntimeState as U, emergencyBrake as Un, getOhmypiLauncherFields as Ur, messageAgent as Ut, waitForAgentIdle as V, setAgentRuntimeMirror as Vi, countRunningSwarmSlotsForIssue as Vn, getCodexLauncherFields as Vr, isContextOverflowTail as Vt, getAgentRuntimeStateSync as W, getConcurrencyLimits as Wn, getProviderAuthMode as Wr, messageAgentWithOutcome as Wt, replayCrashedStandingAgent as X, tryReserveSwarmSlot as Xn, waitForAcpHostReady as Xr, getLatestSessionId as Xt, contextWindowForModel as Y, tryReserveAdvancingSlot as Yn, roleAgentDefinitionPath as Yr, getActivity as Yt, replayStandingAgent as Z, workResumeSlotsAvailable as Zn, waitForPromptReady as Zr, getLatestSessionIdSync as Zt, init_agent_state as _, buildResumeContinueMessage as _i, listAgentStates as _n, init_bridge_token as _r, init_pending_decision_gate as _t, clearAgentOperatorGatesForIssuesSync as a, init_claude_auth as ai, init_spawn as an, deliverAgentMessage as ar, broadcastCommit as at, markAgentRunning as b, dismissDevChannelsDialog as bi, warnOnBareNumericIssueIds as bn, checkCodexAuthStatus as br, getAgentJsonlMtime as bt, clearAgentTroubled as c, determineModel as ci, ensureRegisteredSlotWorktree as cn, deliverResumeMessageWithTranscriptConfirmation as cr, init_tier_escalation as ct, decideResumeGate as d, getProviderTmuxFlags as di, init_session_history as dn, resilientDeliveryMethod as dr, reconcileSlotState as dt, init_ohmypi_fifo as ei, resolveLatestSessionIdSync as en, getCachedMemoryVerdict as er, init_tier_supervisor as et, getAgentDir as f, init_provider_health as fi, init_termination as fn, setAgentDeliveryMethod as fr, autoRecoverAgents as ft, getAgentStateSync as g, buildDefaultResumeContinueMessage as gi, init_queries as gn, BRIDGE_TOKEN_HEADER as gr, detectPendingOperatorDecision as gt, getAgentStateFilePath as h, init_openai_auth as hi, dropLegacyAgentStatesMissingRoleAsync as hn, probeTranscriptSince as hr, restartAgent as ht, clearAgentOperatorGatesForIssueSync as i, getClaudeAuthStatus as ii, init_ohmypi as in, SocketPostStatusError as ir, supervisorAgentId as it, setAgentPaused as j, init_agent_runtime as ji, panePidsForSession as jn, init_staffing as jr, normalizeAwaitingInputPrompt as jt, saveAgentState as k, resolvePtySupervisorScriptPath as ki, getRuntimeCensusSnapshot as kn, transitionIssueToInProgress as kr, detectAwaitingInputFromPaneSync as kt, clearAgentTroubledSync as l, getProviderEnvForModel as li, init_registered_slot_spawn as ln, init_delivery as lr, init_slot_reconcile as lt, getAgentState as m, getOpenAIAuthStatus as mi, stopAgentSync as mn, init_transcript_landing as mr, recoverAgent as mt, SESSION_EXITED_BEFORE_KICKOFF as n, init_context as ni, init_event_reads as nn, setCachedMemoryVerdict as nr, shouldSupervise as nt, clearAgentPaused as o, buildCavemanExports as oi, spawnAgent as on, deliverAgentPermissionDecision as or, init_tier_feed as ot, getAgentResumeGateBlockReason as p, validateProviderHealth as pi, stopAgent as pn, captureTranscriptUserRecordSnapshot as pr, detectCrashedAgents as pt, init_agents as q, releaseSwarmSlot as qn, init_runtime_command as qr, operatorInterventionEvent as qt, __testInternals as r, materializeAcpContextFile as ri, createOhmypiRuntimeSync as rn, AmbiguousKeyedDeliveryError as rr, spawnTierSupervisor as rt, clearAgentPausedSync as s, buildSpawnEnvForModel as si, spawnRun as sn, deliverInitialPromptWithRetry as sr, decideEscalation as st, GOVERNOR_SLOT_PAUSE_REASON_PREFIX as t, ohmypiFifoPaths as ti, saveSessionId as tn, init_memory_verdict_cache as tr, loadPrdDraft as tt, clearYieldForResumeSync as u, getProviderExportsForModel as ui, appendSessionIdToHistory as un, keyedSupervisorFailureKind as ur, listSlotAssignments as ut, isAgentPaused as v, decideChannelsForWorkAgent as vi, listRunningAgents as vn, writeBridgeTokenSync as vr, computeAgentEnrichment as vt, recordAgentActivitySync as w, buildResumeContract as wi, listAgentStateFilesForRemoval as wn, assertWorkspaceStackHealthyForSpawn as wr, init_agent_enrichment as wt, markAgentRunningState as x, hasCompletionMarkerForAgent as xi, RETAINED_TRANSCRIPTS_MARKER as xn, init_codex_auth as xr, getAgentJsonlPath as xt, isAgentTroubled as y, decideSupervisorForWorkAgent as yi, listRunningAgentsSync as yn, applyCodexAuthBurnFlag as yr, countPendingAskUserQuestionsForAgent as yt, normalizeAgentId as z, init_agent_runtime_mirror as zi, init_darwin as zn, getAcpLauncherFields as zr, init_context_overflow as zt };
11989
11931
 
11990
- //# sourceMappingURL=agent-state-BJhGIJZe.js.map
11932
+ //# sourceMappingURL=agent-state-FABw8neJ.js.map