@overdeck/desktop 0.45.24 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (528) hide show
  1. package/drizzle/overdeck/0000_overdeck_init.sql +36 -1
  2. package/package.json +1 -1
  3. package/server/{acceptance-criteria-DDCnXF58.js → acceptance-criteria-10Ur5Dne.js} +2 -2
  4. package/server/activity-logger-CMthG6Vd.js +3 -0
  5. package/server/{activity-logger-DDlOIAML.js → activity-logger-CyteR4JO.js} +24 -13
  6. package/server/{advancing-selfheal-BVwW4qRn.js → advancing-selfheal-BNwqxseD.js} +6 -6
  7. package/server/{agent-gc-CHcnvonI.js → agent-gc-C3h9Or3a.js} +5 -5
  8. package/server/agent-state-CYXJVG72.js +3 -0
  9. package/server/agent-state-service-C63p_ftq.js +2 -0
  10. package/server/{agent-state-service-BsgWxZuB.js → agent-state-service-Ds6OeFvo.js} +15 -9
  11. package/server/{agents-EbI0zCJl.js → agents-J5mEnekq.js} +23 -16
  12. package/server/agents-ePFVoZbu.js +3 -0
  13. package/server/archive-planning-B2XplFzT.js +2 -0
  14. package/server/{archive-planning-Du25Jtst.js → archive-planning-BwhxeP7C.js} +22 -26
  15. package/server/{artifact-index-jobs-CbEDfCDu.js → artifact-index-jobs-D1q_vR3V.js} +2 -2
  16. package/server/{assemble-J2ZZ2C15.js → assemble-Bgwqv-Ro.js} +2 -2
  17. package/server/auto-spawn-consent-CQ9Bi9q6.js +1141 -0
  18. package/server/{backlog-auto-trigger-2R2jog7n.js → backlog-auto-trigger-n1lzPgN4.js} +3 -3
  19. package/server/{behavior-B3exJ42O.js → behavior-td6-xhQk.js} +2 -2
  20. package/server/boot-reconciled-stop-events-C7gGe3oB.js +44 -0
  21. package/server/bridge-pool-patrol-CYH2OLb5.js +136 -0
  22. package/server/{briefing-freshness-D1wzUIWv.js → briefing-freshness-DRqZ8lAz.js} +2 -2
  23. package/server/{build-info-Ie_D0_BT.js → build-info-7yiEpl6u.js} +5 -3
  24. package/server/{build-info-CZk_TITh.js → build-info-CpG__c63.js} +1 -1
  25. package/server/{checkpoint-manager-DwbQoqrC.js → checkpoint-manager-CkKmB0wZ.js} +1 -1
  26. package/server/{checkpoint-manager-BI1Wxoku.js → checkpoint-manager-DBcyNR8w.js} +2 -2
  27. package/server/checkpoint-worker.js +1 -1
  28. package/server/{checkpoints-CQB1h765.js → checkpoints-D95apurL.js} +2 -2
  29. package/server/{checkpoints-BJIs5QIA.js → checkpoints-Wm963lm8.js} +1 -1
  30. package/server/{claude-hooks-provision-8Ngo8TpT.js → claude-hooks-provision-4RPxNkE8.js} +1 -1
  31. package/server/{claude-hooks-provision-D8GXF3_s.js → claude-hooks-provision-Bjitl9aI.js} +13 -2
  32. package/server/{claude-permissions-DNWEVV6z.js → claude-permissions-CpbpvUQ2.js} +2 -2
  33. package/server/{claude-settings-overlay-DWy-Bb4Y.js → claude-settings-overlay-BzkHYDwR.js} +1 -1
  34. package/server/{claude-settings-overlay-CEdaqpWI.js → claude-settings-overlay-_H9Yrzab.js} +2 -2
  35. package/server/cli-CjOCSnfj.js +3 -0
  36. package/server/{cli-RoOx5DUf.js → cli-Cte9ZFGn.js} +9 -9
  37. package/server/{cliproxy-C8a1vtTU.js → cliproxy-C5fMJ7rY.js} +2 -2
  38. package/server/{cliproxy-fHfIeiGd.js → cliproxy-DaAbWMjC.js} +1 -1
  39. package/server/{close-issue-DoOifFIK.js → close-issue-BPh1ARCF.js} +5 -5
  40. package/server/{closed-issue-reaper-CktPXo8m.js → closed-issue-reaper-DHRfRMrp.js} +1 -1
  41. package/server/{closed-issue-reaper-Bk3SU4RC.js → closed-issue-reaper-DoOZqGFK.js} +88 -17
  42. package/server/{codex-BZXGhUVB.js → codex-BzGDW_d3.js} +36 -7
  43. package/server/{codex-GcHuUF-k.js → codex-o8FJwzmy.js} +1 -1
  44. package/server/{codex-parser-CFZ1_1Jl.js → codex-parser-Dt-ycU8L.js} +2 -2
  45. package/server/compaction-continuation-CvXpbZ4w.js +200 -0
  46. package/server/{config-CKxYiCmX.js → config-Bi3u1VK7.js} +4 -3
  47. package/server/{config-BZ0sHTju.js → config-BvLe652W.js} +2 -2
  48. package/server/{config-DzV30TOm.js → config-CL3Gyvja.js} +1 -1
  49. package/server/{config-yaml-DySPNmKN.js → config-yaml-CxdwhAIA.js} +276 -14
  50. package/server/conflict-gate-CX80JYYS.js +3 -0
  51. package/server/{conflict-gate-BaCVrH-N.js → conflict-gate-E4nt7ZeS.js} +60 -14
  52. package/server/{context-layers-igZ4FI4_.js → context-layers-C_IIysnm.js} +3 -3
  53. package/server/{context-layers-BrPmE__h.js → context-layers-DAG83UZt.js} +2 -2
  54. package/server/{control-settings-BQp7_4uD.js → control-settings-CiqGxXnc.js} +56 -19
  55. package/server/{conversation-compaction-eQB5CkOe.js → conversation-compaction-BE3CNtHF.js} +1 -1
  56. package/server/{conversation-compaction-CgrR8YYp.js → conversation-compaction-D6-yLtqt.js} +8 -8
  57. package/server/{conversation-service-DPJ71F33.js → conversation-service-DBxoYMDl.js} +10 -8
  58. package/server/conversation-service-D_TS2b1r.js +3 -0
  59. package/server/{conversations-CAsJF9kh.js → conversations-BKDVpB-3.js} +1 -1
  60. package/server/{conversations-6AfUfbwc.js → conversations-D0UEdLtk.js} +4 -4
  61. package/server/{cost-R-m6Yi-W.js → cost-DS1s0DbG.js} +3 -3
  62. package/server/{cost-B2ddP6wq.js → cost-DpgYmYqR.js} +12 -2
  63. package/server/{cost-sync-BsN6ER0n.js → cost-sync-tOCCGnEt.js} +3 -3
  64. package/server/{dag-B1ucnjDU.js → dag-BtkgLeqY.js} +2 -2
  65. package/server/{dangerous-git-ops-BXqeWVSf.js → dangerous-git-ops-CFLykHWt.js} +1 -1
  66. package/server/dashboard-db-worker.js +7 -7
  67. package/server/deacon-BIblC-WX.js +4 -0
  68. package/server/{deacon-nudge-log-6wVqAaqz.js → deacon-nudge-log-B08gF0mh.js} +3 -3
  69. package/server/{deacon-CU_cAYSR.js → deacon-pLRLbPvR.js} +3308 -2707
  70. package/server/deacon-pending-lifecycle-B-Io84AP.js +33 -0
  71. package/server/deacon-swarm-B1XkIvfr.js +2 -0
  72. package/server/{deacon-swarm-BXZZ1Z2-.js → deacon-swarm-v5PMun-m.js} +15 -14
  73. package/server/deacon.js +14 -19
  74. package/server/dead-end-trip-D8A3msX9.js +13 -0
  75. package/server/delivery-BX9HR4wQ.js +3 -0
  76. package/server/{deploy-patrol-AiFoP8dw.js → deploy-patrol-sYgOxLeb.js} +69 -18
  77. package/server/deploy-queue-VfohaPN_.js +169 -0
  78. package/server/deploy-queue-gHJBycaF.js +3 -0
  79. package/server/deploy-window-CFRZ0-kt.js +3 -0
  80. package/server/{deploy-window-C3F-tihF.js → deploy-window-D4DQb8VP.js} +40 -16
  81. package/server/{dev-supervisor-bcOWqdQE.js → dev-supervisor-DiOBDM1c.js} +2 -2
  82. package/server/{devcontainer-renderer-_d6XhyND.js → devcontainer-renderer-BUOIlfgD.js} +3 -3
  83. package/server/dist-B3YPQa5A.js +3 -0
  84. package/server/{dist-Cb_0uvpS.js → dist-C3A8B8wM.js} +1 -1
  85. package/server/{dist-src-BSoS7mkd.js → dist-src-C0adpegX.js} +1 -1
  86. package/server/{docker-DcMTFTUC.js → docker-BJzlkqYB.js} +2 -2
  87. package/server/docker-Y3PElJb0.js +3 -0
  88. package/server/dod-DlNtcH6n.js +91 -0
  89. package/server/durable-review-pipeline-Cibps-Rg.js +20 -0
  90. package/server/durable-review-pipeline-DP6bIcOY.js +3 -0
  91. package/server/{ensure-devcontainer-DNi-ono3.js → ensure-devcontainer-BAofzBPv.js} +4 -4
  92. package/server/{ensure-devcontainer-BZgOhRo7.js → ensure-devcontainer-DMAbWqtQ.js} +1 -1
  93. package/server/{esm-shims-OSHAYaS1.js → esm-shims-BeObUkaw.js} +1 -1
  94. package/server/{event-store-EV2cMiXj.js → event-store-5UKzh9Jf.js} +1 -1
  95. package/server/{event-store-CQL6NeqB.js → event-store-CrHcVC5_.js} +23 -4
  96. package/server/{events-DTfAe4My.js → events-BNrvchBg.js} +3 -3
  97. package/server/{events-BTdrdEq8.js → events-CF8QDbuV.js} +1 -1
  98. package/server/{factory-CFibJuaw.js → factory-Cmm9Hsho.js} +5 -5
  99. package/server/{feature-registry-population-DKZFMbFt.js → feature-registry-population-B6HpNWRy.js} +4 -4
  100. package/server/{feature-registry-storage-BdPuLcBX.js → feature-registry-storage-DJEFx1Pf.js} +2 -2
  101. package/server/{features-ez2271oH.js → features-D5km80UI.js} +2 -2
  102. package/server/{feedback-target-CoFDHiM8.js → feedback-target-BJ5ZADsu.js} +1 -1
  103. package/server/{feedback-target-7mqqwrX6.js → feedback-target-DSxEL6lP.js} +8 -8
  104. package/server/{feedback-writer-CY5L1lB7.js → feedback-writer-C27Hak8a.js} +5 -5
  105. package/server/{feedback-writer-D3a22RCd.js → feedback-writer-CoB9Z6aU.js} +1 -1
  106. package/server/{flywheel-DHrgCphM.js → flywheel-BHx8XuMr.js} +47 -20
  107. package/server/{flywheel-SVF02Jpq.js → flywheel-DZZdtiOL.js} +1 -1
  108. package/server/{flywheel-DzGtWnJ1.js → flywheel-f662Q-y2.js} +16 -15
  109. package/server/flywheel-merge-order-D_xLMbJU.js +462 -0
  110. package/server/flywheel-merge-order-Dil0LmdN.js +2 -0
  111. package/server/forge-B5o319qI.js +3 -0
  112. package/server/forge-BaKGCya6.js +383 -0
  113. package/server/{from-kNxT0bZC.js → from-B3tZbB55.js} +1 -1
  114. package/server/fs-lock-Bre3sGoz.js +130 -0
  115. package/server/{fts-db-CE46vDkZ.js → fts-db-IVc4_M3f.js} +2 -2
  116. package/server/{fts-operations-CqY6zl-i.js → fts-operations-B9jG8wa3.js} +2 -2
  117. package/server/{git-utils-CRw2zLPC.js → git-utils-CsvYfJU3.js} +30 -5
  118. package/server/git-utils-Xg4PFN45.js +3 -0
  119. package/server/{github-app-ClZ2lk8D.js → github-app-Bmg4R9mv.js} +1 -1
  120. package/server/{github-app-C3QrAUd0.js → github-app-CmNk0zLU.js} +3 -3
  121. package/server/{github-client-DfQYVUaw.js → github-client-B6KM9_wA.js} +1 -1
  122. package/server/{github-client-BnIsSrEN.js → github-client-qazkPrg0.js} +3 -3
  123. package/server/github-pr-lookup-DAcVeRLK.js +58 -0
  124. package/server/{harness-binary-DPUi-Pv8.js → harness-binary-BSpiXaLw.js} +2 -2
  125. package/server/{harness-resolve-3lNZkyT4.js → harness-resolve-BAJu5MX8.js} +4 -4
  126. package/server/{health-events-BDOHby5Q.js → health-events-2Z6Wa9SM.js} +1 -1
  127. package/server/{health-events-BBcTYQKU.js → health-events-BwX32k8d.js} +2 -2
  128. package/server/{hooks-DPVX1rwQ.js → hooks-D1g1jKLI.js} +1 -1
  129. package/server/{hooks-CKZgXlJb.js → hooks-DbtbimEf.js} +2 -2
  130. package/server/{hume-Cz8igP9E.js → hume-DXNiu6nQ.js} +2 -2
  131. package/server/hume-VUCNbTgn.js +3 -0
  132. package/server/{idle-stack-reaper-CuLF0j2H.js → idle-stack-reaper-CRA1e0jr.js} +1 -1
  133. package/server/{idle-stack-reaper-DDIRwxUY.js → idle-stack-reaper-Cy-dQzW4.js} +99 -6
  134. package/server/in-flight-guard-D-sSkADM.js +45 -0
  135. package/server/{infra-BEqFxlJc.js → infra-BDQDRopn.js} +81 -5
  136. package/server/{injection-C8aiVJrF.js → injection-6AGnXxlj.js} +7 -7
  137. package/server/{injection-CPUIqNhI.js → injection-Bl8d_jHZ.js} +1 -1
  138. package/server/inspect-agent-CUwVmr2h.js +2 -0
  139. package/server/{inspect-agent-BLuJ1AkT.js → inspect-agent-nXdIptyh.js} +26 -25
  140. package/server/{internal-token-s0-oKybJ.js → internal-token-DzK385vD.js} +2 -2
  141. package/server/{internal-token-BrcU6qfe.js → internal-token-Ias7N8Kg.js} +1 -1
  142. package/server/{io-C9kF1wtJ.js → io-B00PBNku.js} +44 -27
  143. package/server/{issue-closed-CDJk4pIp.js → issue-closed-BehTG1be.js} +8 -8
  144. package/server/{issue-lifecycle-ojZAzDBP.js → issue-lifecycle-Birk-ifu.js} +42 -30
  145. package/server/{issue-lifecycle-B8sZHVHh.js → issue-lifecycle-BqSuQvbn.js} +1 -1
  146. package/server/{issue-service-singleton-BvJ09SaR.js → issue-service-singleton-B2wXiIlw.js} +1 -1
  147. package/server/{issue-service-singleton-Yx5DdmVJ.js → issue-service-singleton-C6ZduvuY.js} +10 -10
  148. package/server/{issues-BMmP_77e.js → issues-DQ5-LatB.js} +2 -2
  149. package/server/{jsonl-parser-BXSlHwEh.js → jsonl-parser-BDpnGFCl.js} +5 -4
  150. package/server/{label-cleanup-B0UJwnv5.js → label-cleanup-Dwnky8FG.js} +3 -3
  151. package/server/{lifecycle-xmBfK2GJ.js → lifecycle-B3s4sM1G.js} +6 -7
  152. package/server/{lifecycle-yPd___5E.js → lifecycle-B4Xdb4cY.js} +2 -2
  153. package/server/{lifecycle-io-DPo7x11I.js → lifecycle-io-CzTHEooc.js} +1 -1
  154. package/server/{lifecycle-io-BREGpnLk.js → lifecycle-io-DCo6s6ks.js} +5 -5
  155. package/server/{linear-client-BsuUvkdA.js → linear-client-9uq7fhiV.js} +3 -3
  156. package/server/{linear-client-CTskEeT_.js → linear-client-CnbtHiic.js} +1 -1
  157. package/server/linear-mcp-auth-BxUOzswy.js +280 -0
  158. package/server/linear-mcp-auth-D46fBCLf.js +2 -0
  159. package/server/memory-fts-worker.js +1 -1
  160. package/server/{merge-CefQNAnq.js → merge-DiW9RdSB.js} +13 -11
  161. package/server/{merge-agent-4WOWlSYA.js → merge-agent-BLUgRsz3.js} +234 -84
  162. package/server/{merge-agent-CKkgIBPB.js → merge-agent-DQTXZk8z.js} +1 -1
  163. package/server/{merge-batch-ClFn2T-y.js → merge-batch-Cp_j9BGk.js} +1 -1
  164. package/server/merge-completeness-B46KqhtY.js +277 -0
  165. package/server/merge-completeness-BLbB5-6n.js +3 -0
  166. package/server/merge-ops-1abz6O_P.js +2 -0
  167. package/server/merge-rebase-CJJVAJuz.js +2 -0
  168. package/server/{merge-rebase-BfaTyXsw.js → merge-rebase-DIkBjgwq.js} +3 -3
  169. package/server/{merge-set-DJ8-UErs.js → merge-set-CBgHfwM0.js} +11 -5
  170. package/server/merge-set-DeUxFsC3.js +3 -0
  171. package/server/{merge-B1DiziGU.js → merge-sr8Nrnmi.js} +1 -1
  172. package/server/merge-sync-CpGmk6Ch.js +3 -0
  173. package/server/{merge-sync-VPV28g0g.js → merge-sync-kr4vqyjM.js} +409 -153
  174. package/server/{merge-train-CHopycP0.js → merge-train-Dmrcus12.js} +18 -8
  175. package/server/{merge-train-deps-D1cOZzy2.js → merge-train-deps-D_uGX91G.js} +21 -15
  176. package/server/merge-verification-NvaAd8CZ.js +220 -0
  177. package/server/merged-docker-cleanup-worker-DH_hrGPI.js +3 -0
  178. package/server/merged-docker-cleanup-worker-Y1R06TEl.js +107 -0
  179. package/server/{multipart-parser-duPAfSBw.js → multipart-parser-R-oC8dQg.js} +2 -2
  180. package/server/{no-resume-mode-Nw29vaFb.js → no-resume-mode-BgD0JUmM.js} +1 -1
  181. package/server/node_modules/.package-lock.json +30 -30
  182. package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/package.json +3 -3
  183. package/server/node_modules/@google-cloud/common/package.json +2 -2
  184. package/server/node_modules/@types/node/README.md +1 -1
  185. package/server/node_modules/@types/node/crypto.d.ts +1 -1
  186. package/server/node_modules/@types/node/package.json +2 -2
  187. package/server/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  188. package/server/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +1 -1
  189. package/server/node_modules/gaxios/package.json +1 -1
  190. package/server/node_modules/google-auth-library/build/src/auth/googleauth.js +24 -19
  191. package/server/node_modules/google-auth-library/package.json +1 -1
  192. package/server/node_modules/google-gax/build/protos/google/api/auth.proto +2 -1
  193. package/server/node_modules/google-gax/build/protos/google/api/backend.proto +12 -1
  194. package/server/node_modules/google-gax/build/protos/google/api/billing.proto +1 -1
  195. package/server/node_modules/google-gax/build/protos/google/api/client.proto +165 -53
  196. package/server/node_modules/google-gax/build/protos/google/api/cloudquotas/v1/resources.proto +1 -1
  197. package/server/node_modules/google-gax/build/protos/google/api/cloudquotas/v1beta/quota_adjuster_settings.proto +7 -3
  198. package/server/node_modules/google-gax/build/protos/google/api/cloudquotas/v1beta/resources.proto +1 -1
  199. package/server/node_modules/google-gax/build/protos/google/api/config_change.proto +1 -1
  200. package/server/node_modules/google-gax/build/protos/google/api/context.proto +1 -1
  201. package/server/node_modules/google-gax/build/protos/google/api/control.proto +3 -3
  202. package/server/node_modules/google-gax/build/protos/google/api/distribution.proto +1 -1
  203. package/server/node_modules/google-gax/build/protos/google/api/documentation.proto +1 -1
  204. package/server/node_modules/google-gax/build/protos/google/api/endpoint.proto +1 -1
  205. package/server/node_modules/google-gax/build/protos/google/api/error_reason.proto +186 -1
  206. package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/checked.proto +31 -3
  207. package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/eval.proto +8 -9
  208. package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/explain.proto +1 -2
  209. package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/syntax.proto +20 -22
  210. package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/value.proto +2 -3
  211. package/server/node_modules/google-gax/build/protos/google/api/field_behavior.proto +1 -1
  212. package/server/node_modules/google-gax/build/protos/google/api/field_info.proto +1 -1
  213. package/server/node_modules/google-gax/build/protos/google/api/http.proto +1 -1
  214. package/server/node_modules/google-gax/build/protos/google/api/httpbody.proto +1 -1
  215. package/server/node_modules/google-gax/build/protos/google/api/label.proto +1 -1
  216. package/server/node_modules/google-gax/build/protos/google/api/launch_stage.proto +1 -1
  217. package/server/node_modules/google-gax/build/protos/google/api/log.proto +1 -1
  218. package/server/node_modules/google-gax/build/protos/google/api/logging.proto +1 -1
  219. package/server/node_modules/google-gax/build/protos/google/api/metric.proto +1 -1
  220. package/server/node_modules/google-gax/build/protos/google/api/monitored_resource.proto +1 -1
  221. package/server/node_modules/google-gax/build/protos/google/api/monitoring.proto +1 -1
  222. package/server/node_modules/google-gax/build/protos/google/api/policy.proto +1 -1
  223. package/server/node_modules/google-gax/build/protos/google/api/quota.proto +1 -1
  224. package/server/node_modules/google-gax/build/protos/google/api/resource.proto +1 -1
  225. package/server/node_modules/google-gax/build/protos/google/api/routing.proto +8 -4
  226. package/server/node_modules/google-gax/build/protos/google/api/service.proto +2 -3
  227. package/server/node_modules/google-gax/build/protos/google/api/source_info.proto +1 -1
  228. package/server/node_modules/google-gax/build/protos/google/api/system_parameter.proto +1 -1
  229. package/server/node_modules/google-gax/build/protos/google/api/usage.proto +7 -27
  230. package/server/node_modules/google-gax/build/protos/google/api/visibility.proto +1 -1
  231. package/server/node_modules/google-gax/build/protos/google/longrunning/operations.proto +20 -1
  232. package/server/node_modules/google-gax/build/protos/google/protobuf/any.proto +52 -108
  233. package/server/node_modules/google-gax/build/protos/google/protobuf/compiler/ruby/ruby_generated_code.proto +2 -0
  234. package/server/node_modules/google-gax/build/protos/google/protobuf/cpp_features.proto +21 -1
  235. package/server/node_modules/google-gax/build/protos/google/protobuf/cpp_file_options.proto +24 -0
  236. package/server/node_modules/google-gax/build/protos/google/protobuf/cpp_options.proto +15 -0
  237. package/server/node_modules/google-gax/build/protos/google/protobuf/descriptor.proto +118 -30
  238. package/server/node_modules/google-gax/build/protos/google/protobuf/field_mask.proto +16 -18
  239. package/server/node_modules/google-gax/build/protos/google/protobuf/internal_options.proto +8 -1
  240. package/server/node_modules/google-gax/build/protos/google/protobuf/json/json_enumval_custom_string.proto +26 -0
  241. package/server/node_modules/google-gax/build/protos/google/protobuf/json_enumvalue_options.proto +29 -0
  242. package/server/node_modules/google-gax/build/protos/google/protobuf/json_options.proto +14 -0
  243. package/server/node_modules/google-gax/build/protos/google/protobuf/struct.proto +38 -22
  244. package/server/node_modules/google-gax/build/protos/google/protobuf/test_protos/forced_micro_string.proto +3 -0
  245. package/server/node_modules/google-gax/build/protos/google/protobuf/test_protos/repeated_field_proxy_import_message.proto +14 -0
  246. package/server/node_modules/google-gax/build/protos/google/protobuf/timestamp.proto +9 -8
  247. package/server/node_modules/google-gax/build/protos/google/protobuf/util/json_format_proto3.proto +18 -0
  248. package/server/node_modules/google-gax/build/protos/google/rpc/code.proto +1 -1
  249. package/server/node_modules/google-gax/build/protos/google/rpc/context/attribute_context.proto +7 -2
  250. package/server/node_modules/google-gax/build/protos/google/rpc/context/audit_context.proto +1 -1
  251. package/server/node_modules/google-gax/build/protos/google/rpc/error_details.proto +5 -5
  252. package/server/node_modules/google-gax/build/protos/google/rpc/http.proto +1 -1
  253. package/server/node_modules/google-gax/build/protos/google/rpc/status.proto +1 -2
  254. package/server/node_modules/google-gax/build/protos/google/type/calendar_period.proto +1 -1
  255. package/server/node_modules/google-gax/build/protos/google/type/color.proto +9 -10
  256. package/server/node_modules/google-gax/build/protos/google/type/date.proto +11 -9
  257. package/server/node_modules/google-gax/build/protos/google/type/datetime.proto +17 -17
  258. package/server/node_modules/google-gax/build/protos/google/type/dayofweek.proto +1 -1
  259. package/server/node_modules/google-gax/build/protos/google/type/decimal.proto +11 -13
  260. package/server/node_modules/google-gax/build/protos/google/type/expr.proto +1 -1
  261. package/server/node_modules/google-gax/build/protos/google/type/fraction.proto +1 -1
  262. package/server/node_modules/google-gax/build/protos/google/type/interval.proto +1 -2
  263. package/server/node_modules/google-gax/build/protos/google/type/latlng.proto +4 -5
  264. package/server/node_modules/google-gax/build/protos/google/type/localized_text.proto +3 -3
  265. package/server/node_modules/google-gax/build/protos/google/type/money.proto +1 -2
  266. package/server/node_modules/google-gax/build/protos/google/type/month.proto +1 -1
  267. package/server/node_modules/google-gax/build/protos/google/type/phone_number.proto +20 -15
  268. package/server/node_modules/google-gax/build/protos/google/type/postal_address.proto +39 -39
  269. package/server/node_modules/google-gax/build/protos/google/type/quaternion.proto +4 -4
  270. package/server/node_modules/google-gax/build/protos/google/type/timeofday.proto +11 -8
  271. package/server/node_modules/google-gax/package.json +5 -5
  272. package/server/node_modules/retry-request/package.json +4 -4
  273. package/server/node_modules/teeny-request/package.json +5 -5
  274. package/server/node_modules/undici/lib/cache/memory-cache-store.js +54 -9
  275. package/server/node_modules/undici/lib/cache/sqlite-cache-store.js +7 -1
  276. package/server/node_modules/undici/lib/core/request.js +12 -1
  277. package/server/node_modules/undici/lib/dispatcher/client-h1.js +11 -2
  278. package/server/node_modules/undici/lib/global.js +36 -16
  279. package/server/node_modules/undici/lib/handler/cache-handler.js +236 -116
  280. package/server/node_modules/undici/lib/handler/cache-revalidation-handler.js +3 -3
  281. package/server/node_modules/undici/lib/handler/retry-handler.js +24 -0
  282. package/server/node_modules/undici/lib/interceptor/cache.js +152 -62
  283. package/server/node_modules/undici/lib/interceptor/decompress.js +5 -2
  284. package/server/node_modules/undici/lib/util/cache.js +328 -66
  285. package/server/node_modules/undici/lib/util/date.js +23 -6
  286. package/server/node_modules/undici/lib/web/cookies/util.js +78 -8
  287. package/server/node_modules/undici/package.json +1 -1
  288. package/server/{orphan-proposed-reconciler-BvKkWMJQ.js → orphan-proposed-reconciler-B6vJHxtX.js} +242 -34
  289. package/server/{orphan-proposed-reconciler-CTSGcK8p.js → orphan-proposed-reconciler-DcgTPPFY.js} +1 -1
  290. package/server/package-lock.json +31 -31
  291. package/server/package.json +1 -1
  292. package/server/{pan-dir-B0c3w0Ya.js → pan-dir-DMzF5wne.js} +25 -11
  293. package/server/{paths-D-xWGHdh.js → paths-sJBSb7Ul.js} +2 -2
  294. package/server/pending-lifecycle-claim-DilzGfgk.js +110 -0
  295. package/server/persistent-logger-H_VjuOu7.js +57 -0
  296. package/server/{pickup-DUCLWrJY.js → pickup-DWhqzliO.js} +4 -3
  297. package/server/pipeline-membership-C88VBnhJ.js +3 -0
  298. package/server/pipeline-membership-D9SBvItj.js +57 -0
  299. package/server/pipeline-membership-gather-4eR-7Tqy.js +3 -0
  300. package/server/pipeline-membership-gather-CeVGnNJ2.js +593 -0
  301. package/server/{pipeline-notifier-BXkJzDC4.js → pipeline-notifier-D0ALV6Nw.js} +2 -2
  302. package/server/{pipeline-notifier-BJr8gQX6.js → pipeline-notifier-DT6xLFao.js} +1 -1
  303. package/server/post-merge-lifecycle-worker-8HIeS_J6.js +50 -0
  304. package/server/{project-pipelines-C0MWUeCU.js → project-pipelines-9SKt2bEc.js} +2 -2
  305. package/server/{project-repos-B6GycDh9.js → project-repos-B5pIphKg.js} +7 -3
  306. package/server/project-repos-DPjOdfPa.js +3 -0
  307. package/server/projects-_n3Zui6K.js +3 -0
  308. package/server/{prompts-DxzFXuLl.js → prompts-CgzMBvQF.js} +2 -2
  309. package/server/{providers-u4Ga0jOr.js → providers-BI1mOBQ4.js} +1 -1
  310. package/server/{providers-qQAwGQDW.js → providers-BJQSnAAp.js} +7 -7
  311. package/server/public/assets/{chunk-BO2N2NFS-BamJdinX.js → chunk-BO2N2NFS-D_pGACYN.js} +4 -4
  312. package/server/public/assets/{diagram-OG6HWLK6-DfOB8-w4.js → diagram-OG6HWLK6-BO6fe3hH.js} +1 -1
  313. package/server/public/assets/{dist-ByIuzMQW.js → dist-5zingMiA.js} +3 -3
  314. package/server/public/assets/{dist-D7zYSEA6.js → dist-CVxhbI2E.js} +1 -1
  315. package/server/public/assets/{ganttDiagram-6RSMTGT7-EdmRyXL3.js → ganttDiagram-6RSMTGT7-Bgj4A7kp.js} +1 -1
  316. package/server/public/assets/{highlighted-body-OFNGDK62-MerOfTX8.js → highlighted-body-OFNGDK62-DNPK7_cm.js} +1 -1
  317. package/server/public/assets/index-DEpY-D1O.js +807 -0
  318. package/server/public/assets/index-Ddkcz3WT.css +1 -0
  319. package/server/public/assets/{linear-BBbArIcK.js → linear-BB0jQT16.js} +1 -1
  320. package/server/public/assets/mermaid-GHXKKRXX-BzPfaQJ1.js +1 -0
  321. package/server/public/assets/{pieDiagram-4H26LBE5-BKIddiJN.js → pieDiagram-4H26LBE5-DeGIzzpZ.js} +1 -1
  322. package/server/public/assets/{prod-B8vYiu52.js → prod-XBLvikex.js} +4 -4
  323. package/server/public/assets/{quadrantDiagram-W4KKPZXB-D6RtoULk.js → quadrantDiagram-W4KKPZXB-BV9SLeWz.js} +1 -1
  324. package/server/public/assets/{sankeyDiagram-5OEKKPKP-CLrCedZX.js → sankeyDiagram-5OEKKPKP-Dwja0gj8.js} +1 -1
  325. package/server/public/assets/{xychartDiagram-2RQKCTM6-hznR8DYl.js → xychartDiagram-2RQKCTM6-DCB4qvfw.js} +1 -1
  326. package/server/public/index.html +2 -2
  327. package/server/{pull-requests-_lHueOHW.js → pull-requests-7BgLDsIo.js} +19 -10
  328. package/server/{pull-requests-7N8WKseP.js → pull-requests-Dq0y6IxE.js} +1 -1
  329. package/server/{queries-CjNIf-Ub.js → queries-C-MUZaIy.js} +824 -192
  330. package/server/{rally-CyWT_lNO.js → rally-CPysR4T_.js} +3 -3
  331. package/server/rally-D_VW4bJv.js +3 -0
  332. package/server/{rally-api-C8e_1JRi.js → rally-api-8Ptlp2os.js} +2 -2
  333. package/server/{rally-api-ClOSd-Tt.js → rally-api-CgosKdKL.js} +1 -1
  334. package/server/{rally-client-sgtVqzNU.js → rally-client-CCX0hADj.js} +1 -1
  335. package/server/{rally-client-lc-nokqr.js → rally-client-iYMHWQD7.js} +5 -5
  336. package/server/{reap-terminal-sessions-7KeHv1R1.js → reap-terminal-sessions-4Xg9NGA8.js} +2 -2
  337. package/server/{reap-terminal-sessions-BtHPo6Xc.js → reap-terminal-sessions-Qf-9LVQc.js} +2 -2
  338. package/server/{rebuild-stack-lwtsW0GO.js → rebuild-stack-CMdgaylx.js} +16 -7
  339. package/server/{rebuild-stack-CFvcBHsS.js → rebuild-stack-DqcOVmJO.js} +2 -2
  340. package/server/{reconstruct-cache-C3Ui7ojV.js → reconstruct-cache-CMZJ_Vjq.js} +9 -7
  341. package/server/record-BTwWhtBb.js +3 -0
  342. package/server/{record-update-dE1Aw83j.js → record-update-DaOKS7Wb.js} +124 -157
  343. package/server/record-update-DhI7eySG.js +3 -0
  344. package/server/{recovery-trip-BvRWfUXM.js → recovery-trip-DDH-02ng.js} +2 -2
  345. package/server/{release-engine-Cx48W7z8.js → release-engine-B2X9AfFC.js} +5 -5
  346. package/server/{release-set-CQfuN9-v.js → release-set-G4XKyQ8K.js} +3 -3
  347. package/server/{remote-C_2hasl7.js → remote-BXarMvqf.js} +3 -3
  348. package/server/{remote-ChgimyYa.js → remote-CUhyqjXk.js} +3 -3
  349. package/server/{remote-agents-By1ige5O.js → remote-agents-Bba-MgSA.js} +311 -48
  350. package/server/{remote-agents-CA3Ihlxj.js → remote-agents-CLZB3Coc.js} +2 -2
  351. package/server/{remote-completion-fVe9e_3u.js → remote-completion-CwAp79EC.js} +13 -13
  352. package/server/resume-mOREjlYu.js +3 -0
  353. package/server/{review-agent-CIGOQYBD.js → review-agent--pOptAEV.js} +65 -50
  354. package/server/{review-agent-DNboMyW4.js → review-agent-BTCNkq2h.js} +1 -1
  355. package/server/{review-artifacts-nRDPuMxd.js → review-artifacts-BNmw8dWE.js} +7 -6
  356. package/server/{review-context-2uj-YQ8J.js → review-context-DFxYOOJW.js} +9 -9
  357. package/server/{in-flight-guard-CAAkqPLu.js → review-convoy-liveness-BgU_1jJf.js} +3 -44
  358. package/server/review-status-CGvlA4o_.js +7737 -0
  359. package/server/review-status-Dma9SFaN.js +3 -0
  360. package/server/review-status-emit-DURrmGYX.js +50 -0
  361. package/server/{review-status-enrichment-Dci-ZwEt.js → review-status-enrichment-8NiNXi5W.js} +4 -4
  362. package/server/review-status-source-BLx_1siH.js +3 -0
  363. package/server/{review-status-source-CxuEjLGg.js → review-status-source-DIk1JSow.js} +24 -3
  364. package/server/{review-status-sync-BTOpxtTC.js → review-status-sync-0GxOqeqF.js} +11 -6
  365. package/server/{review-status-sync-DSDK3OMy.js → review-status-sync-muT-EBp2.js} +1 -1
  366. package/server/{review-verdict-feedback-CTd4QMBu.js → review-verdict-feedback-HwF6ODFy.js} +1 -1
  367. package/server/{review-verdict-feedback-CCjVA7Uk.js → review-verdict-feedback-xJNdqBnX.js} +65 -11
  368. package/server/{rollup-FGsKki9R.js → rollup-BQaol5TX.js} +8 -8
  369. package/server/{rollup-BKQC7jp4.js → rollup-BR4t_wck.js} +1 -1
  370. package/server/{scanner-CnqEZeDy.js → scanner-C-D2cFdX.js} +8 -7
  371. package/server/{sequence-io-D909zgeH.js → sequence-io-Bmf1EZM5.js} +4 -4
  372. package/server/{sequencer-agent-CzkcK6P5.js → sequencer-agent-CigMyKh2.js} +7 -6
  373. package/server/server.js +2005 -614
  374. package/server/{service-CLeAoU6G.js → service-CD0DvFvD.js} +114 -68
  375. package/server/{session-fork-CHI1XvL9.js → session-fork-B6cQ5eya.js} +2 -2
  376. package/server/{session-history-BT3IvqhC.js → session-history-3ON_IJjm.js} +7 -55
  377. package/server/settings-CVmWiJ-r.js +2 -0
  378. package/server/{settings-C0zgxOGf.js → settings-PilbFZAM.js} +3 -2
  379. package/server/{settings-BTMvpNFU.js → settings-VN0qOh4U.js} +3 -3
  380. package/server/{shadow-engineering-BJfgm-hX.js → shadow-engineering-DXvx77oE.js} +3 -3
  381. package/server/{shadow-state-7a-524T8.js → shadow-state-BBk_zacw.js} +2 -2
  382. package/server/{shadow-state-DnDyjujH.js → shadow-state-CZBp7pwq.js} +1 -1
  383. package/server/{shadow-utils-Db3oroFG.js → shadow-utils-DdZ05AJS.js} +2 -2
  384. package/server/{ship-log-D9MlVzYU.js → ship-log-7kJfjUX2.js} +1 -1
  385. package/server/{smart-compaction-CV2ukKND.js → smart-compaction-8fA5k5XN.js} +1 -1
  386. package/server/{smart-compaction-KCYScAU1.js → smart-compaction-ByhL9cRS.js} +8 -7
  387. package/server/{spawn-planning-session-DKpdFyOC.js → spawn-planning-session-pcF-YeFE.js} +38 -50
  388. package/server/spawn-planning-session-vLUJoFjy.js +3 -0
  389. package/server/{specialist-completion-Ky9wCDpb.js → specialist-completion-B07XjWD2.js} +1 -1
  390. package/server/{specialist-context-Bn3dCGS2.js → specialist-context-DJ-zFyL3.js} +5 -5
  391. package/server/{specialist-handoff-logger-CMEwYxa2.js → specialist-handoff-logger-aKSxbIgD.js} +2 -2
  392. package/server/{specialist-logs-C5p8G7tx.js → specialist-logs-Dae-n52_.js} +3 -3
  393. package/server/{specialists-CC4r-c2s.js → specialists-6PWdtWcg.js} +1177 -311
  394. package/server/{specialists-DM6bWjsi.js → specialists-Bz-wFT7R.js} +1 -1
  395. package/server/{specialists-jiuuyVkp.js → specialists-DUiExaxb.js} +18 -18
  396. package/server/{specialists-CShuVGWT.js → specialists-KR3pKulN.js} +1 -1
  397. package/server/specs--enInima.js +3 -0
  398. package/server/src-B948bGVR.js +11452 -0
  399. package/server/{src-CXmtj0im.js → src-rac0Mepv.js} +6 -6
  400. package/server/{src-CdmnTM2m.js → src-vHy2-oCv.js} +3 -3
  401. package/server/{stack-health-Bn3o8FBX.js → stack-health-BikqHSjn.js} +1 -1
  402. package/server/{stack-health-DxSdG9cW.js → stack-health-DqLTiEu4.js} +7 -5
  403. package/server/{stale-task-claims-KJKxxiiQ.js → stale-task-claims-Cab_Fo_Z.js} +5 -4
  404. package/server/{staleness-DPm7ClwA.js → staleness-C-a5rBxF.js} +1 -1
  405. package/server/{staleness-CT34nwr9.js → staleness-CGTZyp6V.js} +1 -1
  406. package/server/{state-home-Cn_Qu8IX.js → state-home-722Dkx92.js} +2 -2
  407. package/server/{state-mapping-BL_-3Yt8.js → state-mapping-CybR81Uf.js} +1 -1
  408. package/server/{state-migrate-BGg2ZaOt.js → state-migrate-2u8wIpoL.js} +4 -4
  409. package/server/{stuck-remediation-DYuPRYYw.js → stuck-remediation-CC6q3eqQ.js} +84 -26
  410. package/server/{stuck-remediation-s9_2qfi6.js → stuck-remediation-r1TJu68G.js} +1 -1
  411. package/server/{substrate-bug-weights-service-B-FwCs5V.js → substrate-bug-weights-service-CzIyyWFT.js} +3 -3
  412. package/server/{summary-fork-DpcxN9tf.js → summary-fork-BqgmgPDt.js} +2 -2
  413. package/server/{summary-fork-D1RAk9rJ.js → summary-fork-Df2WFijM.js} +8 -8
  414. package/server/supervisor/{injection-budget-Csw5tqfJ.js → injection-budget-Cg_KIb3o.js} +1 -1
  415. package/server/supervisor/{paths-DehGY2Fj.js → paths-BBOnCYlO.js} +10 -2
  416. package/server/supervisor/pty-supervisor.js +50 -4
  417. package/server/supervisor/{pty-token-x-ea28Us.js → pty-token-BbjwEUUM.js} +3 -3
  418. package/server/supervisor-B4anCCSm.js +2 -0
  419. package/server/{supervisor-wM4ooB5O.js → supervisor-BxqSpjcN.js} +3 -3
  420. package/server/{swarm-readiness-DlP_UjHq.js → swarm-readiness-DfFxa9-n.js} +3 -3
  421. package/server/{system-prerequisites-DUDj1YHf.js → system-prerequisites-ICLSkhhZ.js} +2 -2
  422. package/server/{teardown-workspace-DeTTImn-.js → teardown-workspace-DRdi_CPa.js} +15 -16
  423. package/server/{test-agent-queue-MbxX5vqq.js → test-agent-queue-A_-p-i0I.js} +8 -7
  424. package/server/{test-verdict-gscuksPv.js → test-verdict-BHgTAwIG.js} +1 -1
  425. package/server/{test-verdict-bWYBtqBg.js → test-verdict-C4i9aqEP.js} +1 -1
  426. package/server/{tldr-daemon-BYFkts95.js → tldr-daemon-CvWXBhX1.js} +1 -1
  427. package/server/{tldr-daemon-C-69c3OI.js → tldr-daemon-wvsU6bKv.js} +2 -2
  428. package/server/{tmux-R7N7y-Mh.js → tmux-CfDHob9M.js} +174 -4
  429. package/server/{tmux-B6z7h_vZ.js → tmux-Ctk6RV5l.js} +1 -1
  430. package/server/{token-BK6t8BIT.js → token-DrxwytsZ.js} +2 -2
  431. package/server/{token-util-DxXu-vd1.js → token-util-B48BlCba.js} +1 -1
  432. package/server/token-util-D411CAq9.js +3 -0
  433. package/server/{tracker-config-G6latr8C.js → tracker-config-BcPMElRB.js} +2 -2
  434. package/server/{tracker-utils-DHv5pSDT.js → tracker-utils-CJ6BHjcD.js} +3 -3
  435. package/server/{traefik-connect-Df2uXPsQ.js → traefik-connect-DZ6nMYMj.js} +1 -1
  436. package/server/{tunnel-DGdUkGoZ.js → tunnel-Bp-dRHZz.js} +1 -1
  437. package/server/{tunnel-CDVKJpRv.js → tunnel-DUbUPElU.js} +3 -3
  438. package/server/{typed-errors-BHhE85Ul.js → typed-errors-CKeoDdU3.js} +1 -1
  439. package/server/{typed-errors-2BTMxkZq.js → typed-errors-DyjseiB6.js} +1 -1
  440. package/server/{types-hraoaQIp.js → types-Cm5ASJbq.js} +1 -1
  441. package/server/{types-5M0lupud.js → types-Di8wdakq.js} +1 -1
  442. package/server/uat-promote-verification-CoJuh7XO.js +92 -0
  443. package/server/uat-train-4Q0k06CQ.js +0 -0
  444. package/server/uat-train-Dewoatps.js +2 -0
  445. package/server/{validate-IfDGkaVR.js → validate-B0C8p66t.js} +8 -6
  446. package/server/{validation-Dw1pzDzr.js → validation-B_kIRfNe.js} +4 -4
  447. package/server/{validation-CC9OPqJZ.js → validation-hVOwQk8T.js} +1 -1
  448. package/server/{verification-artifact-B3itKTxu.js → verification-artifact-BxlxTiYK.js} +1 -1
  449. package/server/{verification-artifact-TVFSz_q1.js → verification-artifact-D70AtckY.js} +1 -1
  450. package/server/{verification-runner-BW4HOKAz.js → verification-runner-Bc3cJvpC.js} +1 -1
  451. package/server/{verification-runner-CkgX6EtI.js → verification-runner-KZTz6u72.js} +40 -18
  452. package/server/{vtt-parser-DYPbKcIJ.js → vtt-parser-CE_i3Bcw.js} +1 -1
  453. package/server/{work-agent-prompt-Du8Vh2aJ.js → work-agent-prompt-ByrPAzOy.js} +20 -9
  454. package/server/{workflows-mbQzh6mQ.js → workflows-D0vP1WrK.js} +252 -99
  455. package/server/workflows-DtDX08ed.js +2 -0
  456. package/server/{workspace--8tnhDI0.js → workspace-COWvdibH.js} +1 -1
  457. package/server/{workspace-BPUws1-_.js → workspace-DQkRPLlQ.js} +3 -3
  458. package/server/workspace-anchor-drift-DXYIAHzr.js +224 -0
  459. package/server/workspace-anchor-drift-pwz23TI1.js +3 -0
  460. package/server/{workspace-config-CIVWZOQr.js → workspace-config-BdZM4PvZ.js} +1 -1
  461. package/server/{workspace-manager-CBhNdzE4.js → workspace-manager-BPgTrG66.js} +157 -118
  462. package/server/workspace-manager-C1F3XsnS.js +3 -0
  463. package/server/{workspace-metadata-BzHnwwX4.js → workspace-metadata-CdjzAP8x.js} +1 -1
  464. package/server/{workspace-metadata-_WygnyoX.js → workspace-metadata-DkO_iTLo.js} +2 -2
  465. package/server/{workspaces-Do_9J0LQ.js → workspaces-CRBJikLp.js} +749 -299
  466. package/sync-sources/dev-skills/pan-dashboard-restart/SKILL.md +34 -10
  467. package/sync-sources/hooks/linear-mcp-auth-hook +97 -0
  468. package/sync-sources/rules/ask-user-question-self-contained.md +9 -0
  469. package/sync-sources/skills/pan-close/SKILL.md +5 -3
  470. package/sync-sources/skills/pan-merge/SKILL.md +7 -5
  471. package/sync-sources/skills/pan-peer-review/SKILL.md +195 -0
  472. package/sync-sources/skills/pan-release/SKILL.md +57 -0
  473. package/sync-sources/skills/pan-reload/SKILL.md +3 -3
  474. package/sync-sources/skills/pan-restart/SKILL.md +5 -4
  475. package/sync-sources/skills/pan-review/SKILL.md +7 -1
  476. package/sync-sources/skills/pan-sync-main/SKILL.md +9 -8
  477. package/sync-sources/skills/pipeline-status/SKILL.md +10 -1
  478. package/sync-sources/skills/workspace-add-repo/SKILL.md +16 -1
  479. package/server/activity-logger-OEUBdfZ8.js +0 -3
  480. package/server/agent-state-Bc3tzUC8.js +0 -3
  481. package/server/agent-state-service-D5UGKIJL.js +0 -2
  482. package/server/agents-wi9NWzs2.js +0 -3
  483. package/server/archive-planning-BZDgzoEj.js +0 -3
  484. package/server/cli-B86rejVV.js +0 -3
  485. package/server/conflict-gate-BhAY7TUd.js +0 -3
  486. package/server/conversation-service-BLd3MYsG.js +0 -3
  487. package/server/deacon-kiQrb4ZT.js +0 -4
  488. package/server/deacon-swarm-C-GwfjJy.js +0 -2
  489. package/server/deploy-window-DkZraDyj.js +0 -3
  490. package/server/dist-Bzy0y69j.js +0 -3
  491. package/server/dod-C6n9RV3G.js +0 -66
  492. package/server/flywheel-merge-order-UU0tiUld.js +0 -245
  493. package/server/flywheel-merge-order-UUcsCDb6.js +0 -2
  494. package/server/forge-CNFnyqps.js +0 -270
  495. package/server/forge-DXnS_YFH.js +0 -2
  496. package/server/git-utils-D0_yhCgF.js +0 -3
  497. package/server/github-pr-lookup-D16NGsSO.js +0 -44
  498. package/server/hume-ccTf4wTX.js +0 -3
  499. package/server/inspect-agent-Brtz0URj.js +0 -2
  500. package/server/label-reconciler-B4iOAjlC.js +0 -113
  501. package/server/launcher-generator-BBWG_SiS.js +0 -473
  502. package/server/merge-ops-CR44oU9-.js +0 -2
  503. package/server/merge-set-bUqbm3yc.js +0 -3
  504. package/server/merge-sync-BJYeOODr.js +0 -3
  505. package/server/merge-verification-BkaOqPsw.js +0 -124
  506. package/server/pipeline-membership-mY3GprlK.js +0 -420
  507. package/server/project-repos-DXKQsc_m.js +0 -3
  508. package/server/projects-vjjcmiN8.js +0 -3
  509. package/server/public/assets/index-CWeMerGO.js +0 -804
  510. package/server/public/assets/index-CenuJ3Cw.css +0 -1
  511. package/server/public/assets/mermaid-GHXKKRXX-CpPWAFwE.js +0 -1
  512. package/server/rally-zhhtXuDP.js +0 -3
  513. package/server/record-CN0pj4_5.js +0 -3
  514. package/server/record-update-bLJxAXH4.js +0 -3
  515. package/server/resume-BFv1PGpA.js +0 -3
  516. package/server/review-status-btEYlaxA.js +0 -3
  517. package/server/review-status-kZj_KyCk.js +0 -1470
  518. package/server/settings-66A6uvIA.js +0 -2
  519. package/server/spawn-planning-session-qUC2VWu3.js +0 -2
  520. package/server/specs-C8Wsn2XO.js +0 -3
  521. package/server/src-DtcUOZCq.js +0 -4826
  522. package/server/supervisor-FTJAIsAK.js +0 -2
  523. package/server/token-util-DuPuNriz.js +0 -3
  524. package/server/tracker-utils-B4ylXZQK.js +0 -3
  525. package/server/uat-train-B05BWkp-.js +0 -2
  526. package/server/uat-train-DDSrSoV1.js +0 -2152
  527. package/server/workflows-BQu4RFQ-.js +0 -2
  528. package/server/workspace-manager-CWT55qeI.js +0 -3
@@ -0,0 +1,1141 @@
1
+ import { n as __esmMin } from "./rolldown-runtime-DNCzzKnI.js";
2
+ import { H as init_providers, W as qualifyPiModel, ci as getOverdeckHome$1, di as packageRoot, li as init_paths } from "./config-yaml-CxdwhAIA.js";
3
+ import { i as releaseRecordLock, n as init_fs_lock, t as acquireRecordLock } from "./fs-lock-Bre3sGoz.js";
4
+ import { $ as colorFgBgForTheme, G as tmuxExecAsync, K as validateSessionName, et as getUiThemeSync, tt as init_ui_theme, w as init_tmux } from "./tmux-CfDHob9M.js";
5
+ import { s as getHarnessBehavior } from "./src-B948bGVR.js";
6
+ import { t as init_behavior } from "./behavior-td6-xhQk.js";
7
+ import { f as toCodexSandboxValue, l as init_codex } from "./codex-BzGDW_d3.js";
8
+ import { dirname, join } from "node:path";
9
+ import { Data } from "effect";
10
+ import { join as join$1 } from "path";
11
+ import { tmpdir } from "os";
12
+ import { homedir as homedir$1 } from "node:os";
13
+ import "node:fs";
14
+ import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
15
+ import { unlink as unlink$1, writeFile as writeFile$1 } from "fs/promises";
16
+ import { randomUUID } from "node:crypto";
17
+ //#region ../../lib/model-validation.ts
18
+ function normalizeModelOverrideSync(value) {
19
+ if (value === void 0 || value === null) return void 0;
20
+ if (typeof value !== "string") throw new Error("model must be a string.");
21
+ const trimmed = value.trim();
22
+ if (trimmed.length === 0) return void 0;
23
+ if (!MODEL_ID_PATTERN.test(trimmed)) throw new Error("model must match [A-Za-z0-9._:/@-] plus square brackets, with 1-128 characters and no whitespace or shell metacharacters.");
24
+ return trimmed;
25
+ }
26
+ function requireModelOverrideSync(value) {
27
+ const model = normalizeModelOverrideSync(value);
28
+ if (!model) throw new Error("model is required");
29
+ return model;
30
+ }
31
+ function shellQuoteModelIdSync(model) {
32
+ return `'${requireModelOverrideSync(model).replace(/'/g, `'\\''`)}'`;
33
+ }
34
+ var MODEL_ID_PATTERN;
35
+ var init_model_validation = __esmMin((() => {
36
+ MODEL_ID_PATTERN = /^[A-Za-z0-9](?:[A-Za-z0-9._:/@-]|\[|\]){0,127}$/;
37
+ Data.TaggedError("ModelValidationError");
38
+ }));
39
+ //#endregion
40
+ //#region ../../lib/launcher-git-guard.ts
41
+ /**
42
+ * Per-agent `git` shim installed on the agent's PATH by its launcher.
43
+ *
44
+ * The shim blocks the three history-moving commands agents must never run
45
+ * against their own worktree (`rebase`, state-moving `stash`, `reset --hard`)
46
+ * and passes everything else through to the real git.
47
+ *
48
+ * Two scoping rules keep the guard honest (PAN-3189):
49
+ *
50
+ * 1. It only fires when the git invocation targets the agent's own worktree
51
+ * (`guardRoot`). A `git rebase` inside a test fixture's temp repo is not
52
+ * the behavior this guard exists to prevent, and blocking it made the
53
+ * workspace test suite untrustworthy — which pushed agents onto weaker
54
+ * gates, or onto stripping the guard entirely.
55
+ * 2. The launcher drops any *other* agent's guard directory from PATH before
56
+ * prepending its own, so a Flywheel-spawned agent never runs behind the
57
+ * orchestrator's shim inherited through the environment.
58
+ */
59
+ function shellQuote$1(value) {
60
+ return `'${value.replace(/'/g, `'\\''`)}'`;
61
+ }
62
+ /**
63
+ * Emit the launcher lines that materialize and install the per-agent git guard.
64
+ *
65
+ * @param agentId Owning agent id — the guard lives in `~/.overdeck/agents/<id>/git-guard`.
66
+ * @param guardRoot The agent's worktree. Only git commands targeting this
67
+ * directory (or a descendant) are guarded.
68
+ */
69
+ function buildGitGuardLines(agentId, guardRoot) {
70
+ const guardDir = join(getOverdeckHome$1(), "agents", agentId, "git-guard");
71
+ const guardPath = join(guardDir, "git");
72
+ const pathForDoubleQuotes = guardDir.replace(/([\\"$`])/g, "\\$1");
73
+ return [
74
+ "IFS=':' read -r -a _overdeck_path_segments <<< \"$PATH\"",
75
+ "_overdeck_kept_path=()",
76
+ "for _overdeck_path_segment in \"${_overdeck_path_segments[@]}\"; do",
77
+ " [[ \"$_overdeck_path_segment\" == */git-guard ]] || _overdeck_kept_path+=(\"$_overdeck_path_segment\")",
78
+ "done",
79
+ "PATH=\"$(IFS=':'; echo \"${_overdeck_kept_path[*]}\")\"",
80
+ "unset _overdeck_path_segments _overdeck_kept_path _overdeck_path_segment",
81
+ "_OVERDECK_REAL_GIT=\"$(command -v git)\"",
82
+ `_OVERDECK_GUARD_ROOT="$(cd ${shellQuote$1(guardRoot)} 2>/dev/null && pwd -P)"`,
83
+ `[ -n "$_OVERDECK_GUARD_ROOT" ] || _OVERDECK_GUARD_ROOT=${shellQuote$1(guardRoot)}`,
84
+ `mkdir -p ${shellQuote$1(guardDir)}`,
85
+ `cat > ${shellQuote$1(guardPath)} <<EOF`,
86
+ "#!/bin/sh",
87
+ "_OVERDECK_REAL_GIT=\"$_OVERDECK_REAL_GIT\"",
88
+ "_OVERDECK_GUARD_ROOT=\"$_OVERDECK_GUARD_ROOT\"",
89
+ "if [ \"\\$OVERDECK_PAN_GIT_OP\" = \"1\" ]; then",
90
+ " exec \"\\$_OVERDECK_REAL_GIT\" \"\\$@\"",
91
+ "fi",
92
+ "_overdeck_git_find_command() {",
93
+ " while [ \"\\$#\" -gt 0 ]; do",
94
+ " case \"\\$1\" in",
95
+ " -C|-c|--git-dir|--work-tree|--namespace|--config-env|--super-prefix|--attr-source)",
96
+ " shift",
97
+ " [ \"\\$#\" -gt 0 ] && shift",
98
+ " ;;",
99
+ " -C?*|-c?*|--git-dir=*|--work-tree=*|--namespace=*|--config-env=*|--super-prefix=*|--attr-source=*)",
100
+ " shift",
101
+ " ;;",
102
+ " --)",
103
+ " shift",
104
+ " break",
105
+ " ;;",
106
+ " -*)",
107
+ " shift",
108
+ " ;;",
109
+ " *)",
110
+ " printf \"%s\\n\" \"\\$1\"",
111
+ " return",
112
+ " ;;",
113
+ " esac",
114
+ " done",
115
+ " [ \"\\$#\" -gt 0 ] && printf \"%s\\n\" \"\\$1\"",
116
+ "}",
117
+ "_overdeck_git_target_dir() {",
118
+ " _overdeck_dir=\"\\$(pwd -P 2>/dev/null || pwd)\"",
119
+ " while [ \"\\$#\" -gt 0 ]; do",
120
+ " case \"\\$1\" in",
121
+ " -C)",
122
+ " shift",
123
+ " [ \"\\$#\" -gt 0 ] || break",
124
+ " case \"\\$1\" in",
125
+ " /*) _overdeck_dir=\"\\$1\" ;;",
126
+ " *) _overdeck_dir=\"\\$_overdeck_dir/\\$1\" ;;",
127
+ " esac",
128
+ " shift",
129
+ " ;;",
130
+ " -C?*)",
131
+ " _overdeck_c_value=\"\\${1#-C}\"",
132
+ " case \"\\$_overdeck_c_value\" in",
133
+ " /*) _overdeck_dir=\"\\$_overdeck_c_value\" ;;",
134
+ " *) _overdeck_dir=\"\\$_overdeck_dir/\\$_overdeck_c_value\" ;;",
135
+ " esac",
136
+ " shift",
137
+ " ;;",
138
+ " -c|--git-dir|--work-tree|--namespace|--config-env|--super-prefix|--attr-source)",
139
+ " shift",
140
+ " [ \"\\$#\" -gt 0 ] && shift",
141
+ " ;;",
142
+ " -c?*|--git-dir=*|--work-tree=*|--namespace=*|--config-env=*|--super-prefix=*|--attr-source=*)",
143
+ " shift",
144
+ " ;;",
145
+ " --)",
146
+ " break",
147
+ " ;;",
148
+ " -*)",
149
+ " shift",
150
+ " ;;",
151
+ " *)",
152
+ " break",
153
+ " ;;",
154
+ " esac",
155
+ " done",
156
+ " if [ -d \"\\$_overdeck_dir\" ]; then",
157
+ " (cd \"\\$_overdeck_dir\" 2>/dev/null && pwd -P) || printf \"%s\\n\" \"\\$_overdeck_dir\"",
158
+ " else",
159
+ " printf \"%s\\n\" \"\\$_overdeck_dir\"",
160
+ " fi",
161
+ "}",
162
+ "_overdeck_git_command=\"\\$(_overdeck_git_find_command \"\\$@\")\"",
163
+ "case \"\\$_overdeck_git_command\" in",
164
+ " rebase|stash|reset) ;;",
165
+ " *) exec \"\\$_OVERDECK_REAL_GIT\" \"\\$@\" ;;",
166
+ "esac",
167
+ "_overdeck_git_target=\"\\$(_overdeck_git_target_dir \"\\$@\")\"",
168
+ "case \"\\$_overdeck_git_target\" in",
169
+ " \"\\$_OVERDECK_GUARD_ROOT\"|\"\\$_OVERDECK_GUARD_ROOT\"/*) ;;",
170
+ " *) exec \"\\$_OVERDECK_REAL_GIT\" \"\\$@\" ;;",
171
+ "esac",
172
+ "case \"\\$_overdeck_git_command\" in",
173
+ " rebase)",
174
+ " echo \"Overdeck agents must not run git rebase directly. Use pan sync-main to sync main or pan done to submit.\" >&2",
175
+ " exit 1",
176
+ " ;;",
177
+ " stash)",
178
+ " _overdeck_stash_sub=\"\"",
179
+ " _overdeck_after_stash=0",
180
+ " for _overdeck_git_arg in \"\\$@\"; do",
181
+ " if [ \"\\$_overdeck_after_stash\" = \"1\" ]; then",
182
+ " case \"\\$_overdeck_git_arg\" in",
183
+ " -*) ;;",
184
+ " *)",
185
+ " _overdeck_stash_sub=\"\\$_overdeck_git_arg\"",
186
+ " break",
187
+ " ;;",
188
+ " esac",
189
+ " elif [ \"\\$_overdeck_git_arg\" = \"stash\" ]; then",
190
+ " _overdeck_after_stash=1",
191
+ " fi",
192
+ " done",
193
+ " case \"\\$_overdeck_stash_sub\" in",
194
+ " list|show)",
195
+ " ;;",
196
+ " *)",
197
+ " echo \"Overdeck agents must not run git stash directly (read-only stash list/show are allowed). Use pan sync-main to sync main or pan done to submit.\" >&2",
198
+ " exit 1",
199
+ " ;;",
200
+ " esac",
201
+ " ;;",
202
+ " reset)",
203
+ " for _overdeck_git_arg in \"\\$@\"; do",
204
+ " if [ \"\\$_overdeck_git_arg\" = \"--hard\" ]; then",
205
+ " echo \"Overdeck agents must not run git reset --hard. Commit, explicitly discard, or surface the state instead.\" >&2",
206
+ " exit 1",
207
+ " fi",
208
+ " done",
209
+ " ;;",
210
+ "esac",
211
+ "exec \"\\$_OVERDECK_REAL_GIT\" \"\\$@\"",
212
+ "EOF",
213
+ `chmod 0755 ${shellQuote$1(guardPath)}`,
214
+ `export PATH="${pathForDoubleQuotes}:$PATH"`
215
+ ];
216
+ }
217
+ var init_launcher_git_guard = __esmMin((() => {
218
+ init_paths();
219
+ }));
220
+ //#endregion
221
+ //#region ../../lib/launcher-generator.ts
222
+ /**
223
+ * Quote a string for safe use as a shell literal in single quotes.
224
+ * e.g. shellQuote("foo'bar") → "'foo'\\''bar'"
225
+ */
226
+ function shellQuote(value) {
227
+ return `'${value.replace(/'/g, `'\\''`)}'`;
228
+ }
229
+ /**
230
+ * Build the trailing `--mcp-config <path> --dangerously-load-development-channels server:<name>`
231
+ * fragment when both channels-bridge fields are set. Returns an empty string when
232
+ * channelsBridgeMcpConfig is unset so existing call sites stay byte-identical.
233
+ *
234
+ * Note: --mcp-config is intentionally additive (no --strict-mcp-config) so the
235
+ * project's .mcp.json continues to load alongside the bridge.
236
+ */
237
+ function buildChannelsArgs(config) {
238
+ if (!config.channelsBridgeMcpConfig) return "";
239
+ const serverName = config.channelsBridgeServerName ?? "overdeck-bridge";
240
+ return ` --mcp-config ${shellQuote(config.channelsBridgeMcpConfig)} --dangerously-load-development-channels server:${serverName}`;
241
+ }
242
+ function wrapWithSupervisor(config, cmd) {
243
+ if (!config.useSupervisor) return cmd;
244
+ if (!getHarnessBehavior(config.harness ?? "claude-code").supportsPtySupervisor || config.reviewSignal) return cmd;
245
+ if (!config.supervisorScriptPath) throw new Error("LauncherConfig.supervisorScriptPath is required when useSupervisor=true");
246
+ return `node ${shellQuote(config.supervisorScriptPath)} ${cmd}`;
247
+ }
248
+ /**
249
+ * Canonical launcher script generator.
250
+ *
251
+ * Takes a typed LauncherConfig and returns a bash script string.
252
+ * Callers are responsible for building providerExports, cavemanExports,
253
+ * and baseCommand strings — the generator does NOT call helper functions
254
+ * internally (keeps coupling low, tests simple).
255
+ */
256
+ function generateLauncherScriptSync(config) {
257
+ const lines = [];
258
+ lines.push("#!/bin/bash");
259
+ lines.push("unset TMUX TMUX_PANE STY");
260
+ if (config.setPipefail) lines.push("set -o pipefail");
261
+ lines.push("command -v mkcert >/dev/null 2>&1 && export NODE_EXTRA_CA_CERTS=\"$(mkcert -CAROOT)/rootCA.pem\"");
262
+ lines.push("export SKIP_DOCS_INDEX=1");
263
+ if (config.setTerminalEnv) {
264
+ lines.push("export TERM=xterm-256color");
265
+ lines.push("export COLORTERM=truecolor");
266
+ lines.push("export LANG=C.UTF-8");
267
+ lines.push("export LC_ALL=C.UTF-8");
268
+ lines.push(`export COLORFGBG='${colorFgBgForTheme(getUiThemeSync())}'`);
269
+ }
270
+ if (config.setRemotePath) lines.push("export PATH=\"/usr/local/bin:$PATH\"");
271
+ const explicitlySetOverdeckKeys = /* @__PURE__ */ new Set();
272
+ if (config.overdeckEnv) {
273
+ if (config.overdeckEnv.agentId != null) {
274
+ lines.push(`export OVERDECK_AGENT_ID=${shellQuote(config.overdeckEnv.agentId)}`);
275
+ explicitlySetOverdeckKeys.add("OVERDECK_AGENT_ID");
276
+ }
277
+ if (config.overdeckEnv.issueId != null) {
278
+ lines.push(`export OVERDECK_ISSUE_ID=${shellQuote(config.overdeckEnv.issueId)}`);
279
+ explicitlySetOverdeckKeys.add("OVERDECK_ISSUE_ID");
280
+ }
281
+ if (config.overdeckEnv.sessionType != null) {
282
+ lines.push(`export OVERDECK_SESSION_TYPE=${shellQuote(config.overdeckEnv.sessionType)}`);
283
+ explicitlySetOverdeckKeys.add("OVERDECK_SESSION_TYPE");
284
+ }
285
+ }
286
+ if (config.overdeckEnv?.agentId && config.spawnMode !== "conversation") lines.push(...buildGitGuardLines(config.overdeckEnv.agentId, config.workingDir));
287
+ if (config.extraEnvExports) for (const expr of config.extraEnvExports) lines.push(expr);
288
+ if (config.codexHome) lines.push(`export CODEX_HOME=${shellQuote(config.codexHome)}`);
289
+ if (config.changeDir !== false) lines.push(`cd -- ${shellQuote(config.workingDir)}`);
290
+ if (config.unsetProviderEnv) for (const key of PROVIDER_ENV_UNSETS) lines.push(`unset ${key}`);
291
+ if (config.providerExports) {
292
+ const trimmed = config.providerExports.trimEnd();
293
+ if (trimmed) lines.push(trimmed);
294
+ }
295
+ if (config.cavemanExports) {
296
+ const trimmed = config.cavemanExports.trimEnd();
297
+ if (trimmed) lines.push(trimmed);
298
+ }
299
+ if (config.unsetOverdeckEnv) {
300
+ const keysToUnset = [
301
+ "OVERDECK_AGENT_ID",
302
+ "OVERDECK_ISSUE_ID",
303
+ "OVERDECK_SESSION_TYPE"
304
+ ].filter((k) => !explicitlySetOverdeckKeys.has(k));
305
+ if (keysToUnset.length > 0) lines.push(`unset ${keysToUnset.join(" ")}`);
306
+ }
307
+ if (config.trapHup) lines.push("trap '' HUP");
308
+ if (config.promptFile && config.promptFileMode !== "stdin") lines.push(`prompt=$(cat ${shellQuote(config.promptFile)})`);
309
+ if (config.debugLog) lines.push(`echo "[launcher] Claude starting at $(date)" >> ${shellQuote(config.debugLog)}`);
310
+ const commandParts = buildCommand(config);
311
+ if (commandParts.length > 0) lines.push(...commandParts);
312
+ if (config.debugLog) {
313
+ lines.push("CLAUDE_EXIT=$?");
314
+ lines.push(`echo "[launcher] Claude exited with code $CLAUDE_EXIT at $(date)" >> ${shellQuote(config.debugLog)}`);
315
+ }
316
+ if (config.role === "plan") {
317
+ lines.push("echo \"\"");
318
+ lines.push("echo \"Planning agent has exited. Session kept alive for review.\"");
319
+ lines.push("echo \"Click 'Done' in the dashboard when ready to hand off to implementation.\"");
320
+ if (config.debugLog) lines.push(`echo "[launcher] Keep-alive loop starting at $(date)" >> ${shellQuote(config.debugLog)}`);
321
+ }
322
+ if (config.spawnMode === "conversation") {
323
+ lines.push("echo \"\"");
324
+ lines.push("echo \"Conversation session ended. Close this panel or click Resume to start a new session.\"");
325
+ }
326
+ if (config.keepAlive) lines.push("while true; do sleep 60; done");
327
+ let script = lines.join("\n") + "\n";
328
+ if (config.escapeForBase64) script = script.replace(/\$/g, "\\$");
329
+ return script;
330
+ }
331
+ function buildCommand(config) {
332
+ const parts = [];
333
+ const behavior = getHarnessBehavior(config.harness ?? "claude-code");
334
+ if (config.spawnMode === "conversation") {
335
+ if (behavior.launchCommandKind === "ohmypi-rpc") return buildOhmypiCommand(config, false);
336
+ if (behavior.launchCommandKind === "codex-work-tui") return buildCodexCommand(config, false);
337
+ if (behavior.launchCommandKind === "acp-host") return buildAcpCommand(config, false);
338
+ if (config.baseCommand) {
339
+ let cmd = config.baseCommand;
340
+ cmd += buildChannelsArgs(config);
341
+ const args = [];
342
+ if (config.resumeSessionId) args.push(`--resume ${shellQuote(config.resumeSessionId)}`);
343
+ else if (config.sessionId) args.push(`--session-id ${shellQuote(config.sessionId)}`);
344
+ if (config.extraArgs) args.push(config.extraArgs);
345
+ parts.push(wrapWithSupervisor(config, `${cmd} ${args.join(" ")}`.trim()));
346
+ }
347
+ return parts;
348
+ }
349
+ if (config.role === "plan") return buildNonConversationCommand(config, false);
350
+ if (config.reviewSignal) return buildReviewSubRoleCommand(config);
351
+ return buildNonConversationCommand(config, true);
352
+ }
353
+ /**
354
+ * Build the review sub-role command sequence (PAN-977).
355
+ *
356
+ * The reviewer runs under `timeout` as a child process; once it exits, the
357
+ * launcher itself signals the synthesis agent deterministically — the agent
358
+ * never has to remember to run `pan tell`, and the signal is tied to process
359
+ * exit rather than agent good behavior or Deacon patrol timing.
360
+ */
361
+ function buildReviewSubRoleCommand(config) {
362
+ const sig = config.reviewSignal;
363
+ const inner = buildNonConversationCommand(config, false);
364
+ if (inner.length === 0) return inner;
365
+ const claudeCmd = `timeout ${sig.timeoutSeconds} ${inner[0]}`;
366
+ const synth = shellQuote(sig.synthesisAgentId);
367
+ const out = sig.outputPath;
368
+ const role = sig.subRole;
369
+ const pidFile = shellQuote(sig.launcherPidPath);
370
+ return [
371
+ `echo $$ > ${pidFile}`,
372
+ claudeCmd,
373
+ "CLAUDE_EXIT=$?",
374
+ `if [ "$CLAUDE_EXIT" = "124" ]; then`,
375
+ ` pan tell ${synth} "REVIEWER_TIMEOUT ${role} reviewer exceeded ${sig.timeoutSeconds}s deadline" || true`,
376
+ `elif [ -s ${shellQuote(out)} ]; then`,
377
+ ` pan tell ${synth} "REVIEWER_READY ${role} ${out}" || true`,
378
+ `else`,
379
+ ` pan tell ${synth} "REVIEWER_FAILED ${role} reviewer exited (code $CLAUDE_EXIT) without writing report" || true`,
380
+ `fi`,
381
+ `touch ${shellQuote(sig.signalMarkerPath)}`,
382
+ `rm -f ${pidFile}`
383
+ ];
384
+ }
385
+ /**
386
+ * Shared command builder for planning and exec-based agent types.
387
+ * Appends session args, extra args, and prompt references.
388
+ *
389
+ * PAN-982: When `baseCommand` contains `--agent` (i.e. an agent definition
390
+ * is selecting permissions, model, and tools via `.claude/agents/pan-*.md`
391
+ * frontmatter), permission flags are skipped — the frontmatter handles them.
392
+ */
393
+ function buildNonConversationCommand(config, useExec) {
394
+ const behavior = getHarnessBehavior(config.harness ?? "claude-code");
395
+ if (behavior.launchCommandKind === "ohmypi-rpc") return buildOhmypiCommand(config, useExec);
396
+ if (behavior.launchCommandKind === "codex-work-tui") return buildCodexCommand(config, useExec);
397
+ if (behavior.launchCommandKind === "acp-host") return buildAcpCommand(config, useExec);
398
+ const parts = [];
399
+ if (!config.baseCommand) return parts;
400
+ let cmd = config.baseCommand;
401
+ if (!cmd.includes("--agent ") && config.permissionFlags && config.permissionFlags.length > 0) {
402
+ const cmdTokens = cmd.split(/\s+/);
403
+ for (const flag of config.permissionFlags) if (!cmdTokens.includes(flag)) cmd += ` ${flag}`;
404
+ }
405
+ cmd += buildChannelsArgs(config);
406
+ if (config.resumeSessionId) cmd += ` --resume ${shellQuote(config.resumeSessionId)}`;
407
+ if (config.sessionId) cmd += ` --session-id ${shellQuote(config.sessionId)}`;
408
+ if (config.model) cmd += ` --model ${shellQuoteModelIdSync(config.model)}`;
409
+ if (config.extraArgs) cmd += ` ${config.extraArgs}`;
410
+ for (const file of systemPromptFiles(config)) cmd += ` --append-system-prompt-file ${shellQuote(file)}`;
411
+ if (config.promptFile) if (config.promptFileMode === "stdin") cmd += ` < ${shellQuote(config.promptFile)}`;
412
+ else cmd += " \"$prompt\"";
413
+ if (config.promptInline) cmd += ` ${shellQuote(config.promptInline)}`;
414
+ const wrapped = wrapWithSupervisor(config, cmd.trim());
415
+ parts.push(useExec ? `exec ${wrapped}` : wrapped);
416
+ return parts;
417
+ }
418
+ /**
419
+ * Build an oh-my-pi (omp) command line (PAN-1989).
420
+ *
421
+ * RPC mode (work-agents):
422
+ * omp --mode rpc \
423
+ * --model <model> \
424
+ * --session-dir <piSessionDir> \
425
+ * --extension <piExtensionPath> \
426
+ * [--resume <resumeSessionId>] \
427
+ * [--append-system-prompt "$prompt"] \
428
+ * <> <piFifoPath> >> <agentDir>/output.log 2>&1
429
+ *
430
+ * TUI mode (conversations):
431
+ * omp --model <model> \
432
+ * --session-dir <piSessionDir> \
433
+ * [--extension <piExtensionPath>] \
434
+ * [--resume <resumeSessionId>] \
435
+ * [--append-system-prompt "$prompt"]
436
+ *
437
+ * Contract differences from pi (docs/ohmypi-contract.md):
438
+ * - Binary is `omp`, not `pi`
439
+ * - `--no-context-files` is REMOVED (flag does not exist in omp)
440
+ * - `--resume <id>` replaces `--session <id>`
441
+ */
442
+ function buildOhmypiCommand(config, useExec) {
443
+ const piMode = config.piMode ?? "rpc";
444
+ if (!config.piSessionDir) throw new Error("ohmypi launcher requires piSessionDir");
445
+ if (piMode === "rpc") {
446
+ if (!config.piExtensionPath) throw new Error("ohmypi launcher (rpc mode) requires piExtensionPath");
447
+ if (!config.piFifoPath) throw new Error("ohmypi launcher (rpc mode) requires piFifoPath");
448
+ }
449
+ const tokens = ["omp"];
450
+ if (piMode === "rpc") tokens.push("--mode", "rpc");
451
+ if (config.model) tokens.push("--model", shellQuoteModelIdSync(qualifyPiModel(config.model)));
452
+ tokens.push("--session-dir", shellQuote(config.piSessionDir));
453
+ if (config.piExtensionPath) tokens.push("--extension", shellQuote(config.piExtensionPath));
454
+ for (const file of systemPromptFiles(config)) tokens.push("--append-system-prompt", `"$(cat ${shellQuote(file)} 2>/dev/null)"`);
455
+ if (config.resumeSessionId) tokens.push("--resume", shellQuote(config.resumeSessionId));
456
+ if (config.extraArgs) tokens.push(config.extraArgs);
457
+ if (config.promptFile) tokens.push("--append-system-prompt", "\"$prompt\"");
458
+ else if (config.promptInline) tokens.push("--append-system-prompt", shellQuote(config.promptInline));
459
+ let cmd = tokens.join(" ").replace(/\s+/g, " ").trim();
460
+ if (piMode === "rpc") {
461
+ const agentDir = dirname(config.piFifoPath);
462
+ const outputLogPath = join(agentDir, "output.log");
463
+ const exitStatusPath = join(agentDir, "exit-status");
464
+ return [
465
+ `${cmd} <> ${shellQuote(config.piFifoPath)} >> ${shellQuote(outputLogPath)} 2>&1`,
466
+ "__omp_exit=$?",
467
+ `printf '%s %s\\n' "$__omp_exit" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > ${shellQuote(exitStatusPath)}`,
468
+ "exit $__omp_exit"
469
+ ];
470
+ }
471
+ return [useExec ? `exec ${cmd}` : cmd];
472
+ }
473
+ /**
474
+ * Build a Pi command line.
475
+ *
476
+ * RPC mode (work-agents):
477
+ * pi --mode rpc \
478
+ * --model <model> \
479
+ * --session-dir <piSessionDir> \
480
+ * --extension <piExtensionPath> \
481
+ * --no-context-files \
482
+ * [--session <resumeSessionId>] \
483
+ * [--append-system-prompt "$prompt"] \
484
+ * <> <piFifoPath>
485
+ *
486
+ * TUI mode (conversations):
487
+ * pi --model <model> \
488
+ * --session-dir <piSessionDir> \
489
+ * [--extension <piExtensionPath>] \
490
+ * --no-context-files \
491
+ * [--session <resumeSessionId>] \
492
+ * [--append-system-prompt "$prompt"]
493
+ *
494
+ * Pi has no permission system, so permissionFlags are intentionally
495
+ * dropped (AC4). baseCommand is ignored — Pi launchers always start with
496
+ * the literal `pi` so callers cannot accidentally smuggle in claude flags.
497
+ */
498
+ function systemPromptFiles(config) {
499
+ return [...config.appendSystemPromptFile ? [config.appendSystemPromptFile] : [], ...config.appendSystemPromptFiles ?? []];
500
+ }
501
+ function buildAcpCommand(config, useExec) {
502
+ if (!config.acpAgentId) throw new Error("acp launcher requires acpAgentId");
503
+ if (!config.acpProvider) throw new Error("acp launcher requires acpProvider");
504
+ if (!config.acpWorkspace) throw new Error("acp launcher requires acpWorkspace");
505
+ if (!config.acpBinaryPath) throw new Error("acp launcher requires acpBinaryPath");
506
+ const tokens = [
507
+ "node",
508
+ shellQuote(join(packageRoot, "dist", "acp-host.js")),
509
+ "--agent",
510
+ shellQuote(config.acpAgentId),
511
+ "--provider",
512
+ shellQuote(config.acpProvider),
513
+ "--workspace",
514
+ shellQuote(config.acpWorkspace),
515
+ "--binary-path",
516
+ shellQuote(config.acpBinaryPath)
517
+ ];
518
+ if (config.resumeSessionId) tokens.push("--resume", shellQuote(config.resumeSessionId));
519
+ if (config.model) tokens.push("--model", shellQuoteModelIdSync(config.model));
520
+ if (config.acpContextFile) tokens.push("--context-file", shellQuote(config.acpContextFile));
521
+ const cmd = tokens.join(" ");
522
+ return [useExec ? `exec ${cmd}` : cmd];
523
+ }
524
+ function buildCodexCommand(config, useExec) {
525
+ const cmd = computeCodexCommandTokens(config, useExec);
526
+ const flat = cmd.join(" ").replace(/\s+/g, " ");
527
+ const applied = /(^|\s)resume(\s|$)/.test(flat) ? "YES" : "no";
528
+ console.log(`[codex-launcher] agent=${config.overdeckEnv?.agentId ?? "?"} mode=${config.codexMode ?? "exec"} resumeSessionId=${config.resumeSessionId ?? "(none)"} resumeApplied=${applied} cmd=${flat.slice(0, 200)}`);
529
+ return cmd;
530
+ }
531
+ function computeCodexCommandTokens(config, useExec) {
532
+ const codexMode = config.codexMode ?? "exec";
533
+ if (codexMode === "tui") {
534
+ const tokens = ["codex"];
535
+ if (config.resumeSessionId) tokens.push("resume");
536
+ tokens.push("-c", "project_doc_max_bytes=0");
537
+ if (config.resumeSessionId) tokens.push(shellQuote(config.resumeSessionId));
538
+ const cmd = wrapWithSupervisor(config, tokens.join(" "));
539
+ return [useExec ? `exec ${cmd}` : cmd];
540
+ }
541
+ if (codexMode === "work-tui") {
542
+ const tokens = ["codex"];
543
+ if (config.resumeSessionId) tokens.push("resume");
544
+ if (config.model) tokens.push("-m", shellQuoteModelIdSync(config.model));
545
+ if (config.resumeSessionId) tokens.push(shellQuote(config.resumeSessionId));
546
+ const cmd = wrapWithSupervisor(config, tokens.join(" "));
547
+ return [useExec ? `exec ${cmd}` : cmd];
548
+ }
549
+ if (codexMode === "app-server") {
550
+ const tokens = ["node", shellQuote(join(packageRoot, "dist", "codex-app-server-host.js"))];
551
+ if (config.model) tokens.push("--model", shellQuoteModelIdSync(config.model));
552
+ if (config.resumeSessionId) tokens.push("--resume", shellQuote(config.resumeSessionId));
553
+ const cmd = tokens.join(" ");
554
+ return [useExec ? `exec ${cmd}` : cmd];
555
+ }
556
+ const isResume = Boolean(config.resumeSessionId);
557
+ const tokens = ["codex", "exec"];
558
+ if (isResume) tokens.push("resume");
559
+ if (config.model) tokens.push("-m", shellQuoteModelIdSync(config.model));
560
+ tokens.push("-c", "approval_policy=never");
561
+ const sandbox = toCodexSandboxValue(config.codexSandboxMode);
562
+ if (isResume) tokens.push("-c", `sandbox_mode=${sandbox}`);
563
+ else tokens.push("-s", sandbox);
564
+ tokens.push("--skip-git-repo-check");
565
+ if (isResume) tokens.push(shellQuote(config.resumeSessionId));
566
+ if (config.promptFile) tokens.push("\"$prompt\"");
567
+ else if (config.promptInline) tokens.push(shellQuote(config.promptInline));
568
+ let cmd = tokens.join(" ").replace(/\s+/g, " ").trim();
569
+ return [useExec ? `exec ${cmd}` : cmd];
570
+ }
571
+ var PROVIDER_ENV_UNSETS;
572
+ var init_launcher_generator = __esmMin((() => {
573
+ init_codex();
574
+ init_behavior();
575
+ init_providers();
576
+ init_model_validation();
577
+ init_ui_theme();
578
+ init_paths();
579
+ init_launcher_git_guard();
580
+ PROVIDER_ENV_UNSETS = [
581
+ "ANTHROPIC_API_KEY",
582
+ "ANTHROPIC_BASE_URL",
583
+ "ANTHROPIC_AUTH_TOKEN",
584
+ "OPENAI_API_KEY",
585
+ "GEMINI_API_KEY",
586
+ "API_TIMEOUT_MS",
587
+ "CLAUDE_CODE_API_KEY_HELPER_TTL_MS",
588
+ "CLAUDE_CODE_AUTO_COMPACT_WINDOW",
589
+ "CLAUDE_CODE_MAX_CONTEXT_TOKENS"
590
+ ];
591
+ }));
592
+ //#endregion
593
+ //#region ../../lib/agents/provenance.ts
594
+ function normalizeFlywheelRunId(runId) {
595
+ if (!runId) return void 0;
596
+ const trimmed = runId.trim();
597
+ return /^RUN-\d+$/.test(trimmed) ? trimmed : void 0;
598
+ }
599
+ function isOperatorStartedBy(startedBy) {
600
+ return startedBy.startsWith("operator:") || startedBy === "dashboard:agent-spawner";
601
+ }
602
+ var init_provenance = __esmMin((() => {}));
603
+ //#endregion
604
+ //#region ../../lib/tmux-dedup.ts
605
+ /**
606
+ * Keyed, crash-safe tmux delivery (PAN-2997).
607
+ *
608
+ * The dashboard cannot dedupe a tmux paste from its own state — a crash
609
+ * between the paste and the dashboard's acknowledgment bookkeeping would make
610
+ * recovery re-paste. The dedup record therefore lives in the
611
+ * crash-independent component: per-session tmux user options. All
612
+ * check/paste/mark sequences that must not be interrupted are issued as ONE
613
+ * `if-shell` command list, which the tmux SERVER executes — a dashboard exit
614
+ * cannot interrupt it, and a tmux-server exit kills the agent session itself,
615
+ * so a replay after either crash is correct.
616
+ *
617
+ * The protocol is two-phase so the complete paste-settle-submit transaction
618
+ * survives a dashboard crash: the key becomes terminal only as part of the
619
+ * server-owned submission itself.
620
+ *
621
+ * (none) ──paste──► PENDING ──atomic claim+Enter──► TERMINAL
622
+ *
623
+ * - `sendKeysDedup` atomically pastes and sets the PENDING option only when
624
+ * neither option is set. A replay that finds PENDING (a prior attempt
625
+ * crashed before submitting) returns 'submit-pending' WITHOUT re-pasting.
626
+ * A POISON breadcrumb (a terminal marker that proved false but could not be
627
+ * rolled back) is repaired first and never honored as a dedup.
628
+ * - `completeKeyedSubmit` issues ONE `if-shell`: only when PENDING is
629
+ * present, TERMINAL absent, and the pane alive does the tmux server send
630
+ * the Enter and then flip TERMINAL and clear PENDING — in that order, in a
631
+ * single server-executed command list. After the command the target is
632
+ * re-read: if the pane died, was replaced, or cannot be identified around
633
+ * the Enter, the terminal marker is rolled back under a poison breadcrumb
634
+ * and the pending claim restored. Exactly one caller can become the
635
+ * completer; every other concurrent or post-crash caller loses the
636
+ * server-side condition and sends nothing, so no stray Enter can ever land
637
+ * in a composer holding unrelated text.
638
+ */
639
+ /** Set once the keyed message has been SUBMITTED (Enter sent). */
640
+ function dedupTerminalOptionName(dedupKey) {
641
+ return `@overdeck-dedup-${dedupKey}`;
642
+ }
643
+ /** Set atomically with the paste; cleared when the terminal marker lands. */
644
+ function dedupPendingOptionName(dedupKey) {
645
+ return `@overdeck-dedup-pending-${dedupKey}`;
646
+ }
647
+ /**
648
+ * Rollback-required breadcrumb (cycle 11). Set when a post-submit check
649
+ * proves a terminal marker FALSE but the rollback could not be verified.
650
+ * While this marker exists the terminal marker must never be honored — the
651
+ * next keyed call repairs the markers before anything else.
652
+ */
653
+ function dedupPoisonOptionName(dedupKey) {
654
+ return `@overdeck-dedup-poison-${dedupKey}`;
655
+ }
656
+ /**
657
+ * The pane_pid of the pane that received the keyed paste (cycle 13). Set
658
+ * atomically with the paste (`set-option -F ... '#{pane_pid}'`) and required
659
+ * by the submit condition: recovery may complete an old pending claim with
660
+ * Enter alone ONLY when the current pane IS the pane that holds the pasted
661
+ * content. A replaced pane gets a real re-paste instead.
662
+ */
663
+ function dedupTargetOptionName(dedupKey) {
664
+ return `@overdeck-dedup-target-${dedupKey}`;
665
+ }
666
+ function assertValidDedupKey(dedupKey) {
667
+ if (!DEDUP_KEY_RE.test(dedupKey)) throw new Error(`dedupKey must match [A-Za-z0-9:_-]+, got: ${dedupKey.slice(0, 40)}`);
668
+ }
669
+ /** pane_pid + pane_dead in one read — the identity of the Enter's target. */
670
+ async function readPaneTarget(sessionName) {
671
+ return tmuxExecAsync([
672
+ "display-message",
673
+ "-p",
674
+ "-t",
675
+ sessionName,
676
+ "#{pane_pid} #{pane_dead}"
677
+ ], { encoding: "utf-8" }).then((result) => {
678
+ const [pid = "", dead = ""] = String(result.stdout).trim().split(/\s+/);
679
+ return {
680
+ pid,
681
+ dead: dead === "1"
682
+ };
683
+ }).catch(() => ({
684
+ pid: "",
685
+ dead: true
686
+ }));
687
+ }
688
+ async function readMarker(sessionName, option) {
689
+ return tmuxExecAsync([
690
+ "show-option",
691
+ "-qv",
692
+ "-t",
693
+ sessionName,
694
+ option
695
+ ], { encoding: "utf-8" }).then((result) => String(result.stdout).trim(), () => "");
696
+ }
697
+ /**
698
+ * Fail-CLOSED marker read (cycle 12): `-q` makes an unset user option a clean
699
+ * empty read, so a rejection is always a REAL failure (missing session,
700
+ * unreachable server). Safety-critical markers (the poison breadcrumb) must
701
+ * be read this way — interpreting a failed read as "absent" could honor a
702
+ * false terminal marker or bypass a rollback-required state.
703
+ */
704
+ async function readMarkerStrict(sessionName, option) {
705
+ const result = await tmuxExecAsync([
706
+ "show-option",
707
+ "-qv",
708
+ "-t",
709
+ sessionName,
710
+ option
711
+ ], { encoding: "utf-8" });
712
+ return String(result.stdout).trim();
713
+ }
714
+ /**
715
+ * Clear the poison breadcrumb and VERIFY it is gone with a strict read.
716
+ * EVERY failure here — the clear command, the verification read, or a
717
+ * surviving breadcrumb — is a recoverable KeyedMarkerVerificationError
718
+ * (cycle 14): a repair that stops at this boundary has delivered nothing,
719
+ * so the wake outbox must stay pending, never terminal 'failed'.
720
+ */
721
+ async function clearPoisonVerified(sessionName, poisonOption, context, readStrict = readMarkerStrict) {
722
+ try {
723
+ await tmuxExecAsync([
724
+ "set-option",
725
+ "-u",
726
+ "-t",
727
+ sessionName,
728
+ poisonOption
729
+ ], { encoding: "utf-8" });
730
+ } catch (error) {
731
+ throw new KeyedMarkerVerificationError(sessionName, `poison clear command failed (${context})`, { cause: error });
732
+ }
733
+ let remaining;
734
+ try {
735
+ remaining = await readStrict(sessionName, poisonOption);
736
+ } catch (error) {
737
+ throw new KeyedMarkerVerificationError(sessionName, `post-clear verification read failed (${context})`, { cause: error });
738
+ }
739
+ if (remaining !== "") throw new KeyedMarkerVerificationError(sessionName, `poison breadcrumb survived the clear (${context})`);
740
+ }
741
+ /**
742
+ * Repair a poisoned marker set (cycle 11/12): clear the terminal marker,
743
+ * restore a pending claim, verify both, then clear the breadcrumb — verified.
744
+ * A poisoned terminal is PROVISIONAL: it may be a false claim (rollback was
745
+ * interrupted) or a delivered-but-unverified one, and the tmux tier cannot
746
+ * distinguish them — so repair always rolls back to pending and lets the
747
+ * normal recovery re-drive. An empty Enter on the (already-submitted, live)
748
+ * composer is the worst case; a suppressed wake is never acceptable.
749
+ *
750
+ * Returns normally only when the breadcrumb is verifiably gone; throws
751
+ * otherwise (the caller must NOT submit while a stale breadcrumb survives —
752
+ * a later replay would invalidate a legitimate terminal and re-submit).
753
+ */
754
+ async function repairPoisonedMarkers(sessionName, dedupKey, sendId, readStrict) {
755
+ const terminalOption = dedupTerminalOptionName(dedupKey);
756
+ const pendingOption = dedupPendingOptionName(dedupKey);
757
+ const poisonOption = dedupPoisonOptionName(dedupKey);
758
+ await tmuxExecAsync([
759
+ "set-option",
760
+ "-u",
761
+ "-t",
762
+ sessionName,
763
+ terminalOption,
764
+ ";",
765
+ "set-option",
766
+ "-t",
767
+ sessionName,
768
+ pendingOption,
769
+ sendId
770
+ ], { encoding: "utf-8" });
771
+ let repairedTerminal;
772
+ let repairedPending;
773
+ try {
774
+ [repairedTerminal, repairedPending] = await Promise.all([readStrict(sessionName, terminalOption), readStrict(sessionName, pendingOption)]);
775
+ } catch {
776
+ throw new KeyedMarkerVerificationError(sessionName, `repair verification of key "${dedupKey}"`);
777
+ }
778
+ if (repairedTerminal !== "" || repairedPending === "") throw new Error(`Keyed tmux markers for ${sessionName} are poisoned and could not be repaired (key "${dedupKey}")`);
779
+ await clearPoisonVerified(sessionName, poisonOption, `repair of key "${dedupKey}"`, readStrict);
780
+ }
781
+ /**
782
+ * Deduplicated message paste for the tmux fallback path.
783
+ *
784
+ * Returns 'pasted' when this call pasted (caller must complete the submit),
785
+ * 'submit-pending' when a prior attempt's paste is still awaiting submission
786
+ * (caller must complete the submit — crucially WITHOUT pasting again), and
787
+ * 'deduplicated' when the key is already terminal (caller does nothing; no
788
+ * stray Enter, because the composer may hold unrelated operator text).
789
+ *
790
+ * Throws when the keyed paste did not land and no marker explains why —
791
+ * silent loss must surface as a delivery failure, not as a false dedup.
792
+ */
793
+ async function sendKeysDedup(sessionName, keys, dedupKey, caller, deps = {}) {
794
+ validateSessionName(sessionName);
795
+ assertValidDedupKey(dedupKey);
796
+ const read = deps.readMarker ?? readMarker;
797
+ const readStrict = deps.readMarkerStrict ?? readMarkerStrict;
798
+ const terminalOption = dedupTerminalOptionName(dedupKey);
799
+ const pendingOption = dedupPendingOptionName(dedupKey);
800
+ const poisonOption = dedupPoisonOptionName(dedupKey);
801
+ const sendId = randomUUID();
802
+ let poisonMarker;
803
+ try {
804
+ poisonMarker = await readStrict(sessionName, poisonOption);
805
+ } catch (error) {
806
+ throw new KeyedMarkerVerificationError(sessionName, `initial poison read (key "${dedupKey}")`, { cause: error });
807
+ }
808
+ const repaired = poisonMarker !== "";
809
+ if (repaired) await repairPoisonedMarkers(sessionName, dedupKey, sendId, readStrict);
810
+ const targetOption = dedupTargetOptionName(dedupKey);
811
+ const tmpFile = join$1(tmpdir(), `pan-sendkeys-${sendId}.txt`);
812
+ const bufferName = `pan-${sendId}`;
813
+ try {
814
+ await writeFile$1(tmpFile, keys, "utf-8");
815
+ await tmuxExecAsync([
816
+ "load-buffer",
817
+ "-b",
818
+ bufferName,
819
+ tmpFile
820
+ ], { encoding: "utf-8" });
821
+ if (!repaired) await tmuxExecAsync([
822
+ "if-shell",
823
+ "-t",
824
+ sessionName,
825
+ `test -z "$(tmux show-option -qv -t ${sessionName} ${pendingOption})" && test -z "$(tmux show-option -qv -t ${sessionName} ${terminalOption})"`,
826
+ `paste-buffer -b ${bufferName} -p -t ${sessionName} \; set-option -t ${sessionName} ${pendingOption} ${sendId} \; set-option -F -t ${sessionName} ${targetOption} '#{pane_pid}'`
827
+ ], { encoding: "utf-8" });
828
+ const [pendingMarker, terminalMarker] = await Promise.all([read(sessionName, pendingOption), read(sessionName, terminalOption)]);
829
+ if (terminalMarker !== "") return "deduplicated";
830
+ if (!repaired && pendingMarker === sendId) return "pasted";
831
+ if (pendingMarker !== "") {
832
+ const recordedTarget = await read(sessionName, targetOption);
833
+ const currentPid = (await (deps.readPaneTarget ?? readPaneTarget)(sessionName)).pid;
834
+ if (recordedTarget !== "" && currentPid !== "" && recordedTarget === currentPid) return "submit-pending";
835
+ await tmuxExecAsync([
836
+ "if-shell",
837
+ "-t",
838
+ sessionName,
839
+ `test -n "$(tmux show-option -qv -t ${sessionName} ${pendingOption})" && test -z "$(tmux show-option -qv -t ${sessionName} ${terminalOption})" && ! test "$(tmux display-message -p -t ${sessionName} '#{pane_pid}')" = "$(tmux show-option -qv -t ${sessionName} ${targetOption})"`,
840
+ `paste-buffer -b ${bufferName} -p -t ${sessionName} \; set-option -t ${sessionName} ${pendingOption} ${sendId} \; set-option -F -t ${sessionName} ${targetOption} '#{pane_pid}'`
841
+ ], { encoding: "utf-8" });
842
+ const [repastedPending, repastedTerminal, repastedTarget] = await Promise.all([
843
+ read(sessionName, pendingOption),
844
+ read(sessionName, terminalOption),
845
+ read(sessionName, targetOption)
846
+ ]);
847
+ if (repastedTerminal !== "") return "deduplicated";
848
+ if (repastedPending === sendId) return "pasted";
849
+ if (repastedPending !== "") {
850
+ const nowPid = (await (deps.readPaneTarget ?? readPaneTarget)(sessionName)).pid;
851
+ if (repastedTarget !== "" && nowPid !== "" && repastedTarget === nowPid) return "submit-pending";
852
+ }
853
+ }
854
+ throw new Error(`Keyed tmux paste for ${sessionName} did not land and no dedup marker was recorded` + (caller ? ` (caller: ${caller})` : ""));
855
+ } finally {
856
+ await unlink$1(tmpFile).catch(() => {});
857
+ await tmuxExecAsync([
858
+ "delete-buffer",
859
+ "-b",
860
+ bufferName
861
+ ], { encoding: "utf-8" }).catch(() => {});
862
+ }
863
+ }
864
+ /**
865
+ * Complete the paste-settle-submit transaction for a keyed tmux delivery.
866
+ *
867
+ * After the settle window, the SUBMISSION is one server-owned command: a
868
+ * single `if-shell` whose condition requires the pending claim present, the
869
+ * terminal marker absent, AND the pane alive, and whose command list sends
870
+ * the Enter FIRST and then sets the POISON breadcrumb and the TERMINAL
871
+ * marker and clears pending — the terminal is PROVISIONAL from the moment it
872
+ * exists, so a dashboard crash can never strand an honorable-but-unverified
873
+ * terminal (cycle 12). The tmux server executes the whole sequence:
874
+ *
875
+ * - A pane that died during the settle window fails the liveness condition —
876
+ * NO marker changes and NO Enter is sent, so the wake is never recorded as
877
+ * delivered when it never landed. The preserved pending claim lets
878
+ * recovery retry after the agent resumes.
879
+ * - The pre-branch liveness condition is NOT proof of acceptance (cycle 10):
880
+ * the pane can die in the shell-to-branch handoff, and tmux reports
881
+ * send-keys into a remain-on-exit corpse as success. So after the command
882
+ * the target is re-read — if the pane died, was replaced, or cannot be
883
+ * identified around the Enter, the terminal marker is ROLLED BACK and the
884
+ * pending claim restored, and KeyedSubmitTargetDeadError is thrown. The
885
+ * breadcrumb is lifted only after verification, and clearing it is itself
886
+ * verified (cycle 12): a stale breadcrumb would let a later replay
887
+ * invalidate a legitimate terminal and re-submit.
888
+ * - The Enter precedes the terminal transition inside the transaction, so a
889
+ * failed Enter (which aborts the command list) can never leave the key
890
+ * terminal.
891
+ * - Exactly one caller becomes the completer; concurrent or post-crash
892
+ * callers lose the server-side condition and send no stray Enter into a
893
+ * composer that may hold unrelated operator text.
894
+ *
895
+ * Safe to call for both 'pasted' and 'submit-pending' phases; a call whose
896
+ * key is already terminal is a no-op. Throws KeyedSubmitTargetDeadError when
897
+ * the pane is dead (pending claim preserved), and a generic error when both
898
+ * markers vanished without a submission.
899
+ */
900
+ async function completeKeyedSubmit(sessionName, dedupKey, deps = {}) {
901
+ validateSessionName(sessionName);
902
+ assertValidDedupKey(dedupKey);
903
+ const read = deps.readMarker ?? readMarker;
904
+ const readStrict = deps.readMarkerStrict ?? readMarkerStrict;
905
+ const readTarget = deps.readPaneTarget ?? readPaneTarget;
906
+ const terminalOption = dedupTerminalOptionName(dedupKey);
907
+ const pendingOption = dedupPendingOptionName(dedupKey);
908
+ const poisonOption = dedupPoisonOptionName(dedupKey);
909
+ const targetOption = dedupTargetOptionName(dedupKey);
910
+ await new Promise((resolve) => setTimeout(resolve, PASTE_SETTLE_MS));
911
+ const preTarget = await readTarget(sessionName);
912
+ const pendingBefore = await read(sessionName, pendingOption);
913
+ await tmuxExecAsync([
914
+ "if-shell",
915
+ "-t",
916
+ sessionName,
917
+ `test -z "$(tmux show-option -qv -t ${sessionName} ${terminalOption})" && test -n "$(tmux show-option -qv -t ${sessionName} ${pendingOption})" && test "$(tmux display-message -p -t ${sessionName} '#{pane_dead}')" = "0" && test "$(tmux display-message -p -t ${sessionName} '#{pane_pid}')" = "$(tmux show-option -qv -t ${sessionName} ${targetOption})"`,
918
+ `send-keys -t ${sessionName} C-m \; set-option -t ${sessionName} ${poisonOption} 1 \; set-option -t ${sessionName} ${terminalOption} 1 \; set-option -u -t ${sessionName} ${pendingOption}`
919
+ ], { encoding: "utf-8" });
920
+ const [terminalAfter, pendingAfter, postTarget, recordedTarget] = await Promise.all([
921
+ read(sessionName, terminalOption),
922
+ read(sessionName, pendingOption),
923
+ readTarget(sessionName),
924
+ read(sessionName, targetOption)
925
+ ]);
926
+ const targetLost = preTarget.dead || preTarget.pid === "" || postTarget.dead || postTarget.pid !== preTarget.pid;
927
+ if (terminalAfter !== "") {
928
+ if (!targetLost) {
929
+ await clearPoisonVerified(sessionName, poisonOption, `verified delivery of key "${dedupKey}"`, readStrict);
930
+ return;
931
+ }
932
+ await tmuxExecAsync(pendingBefore === "" ? [
933
+ "set-option",
934
+ "-u",
935
+ "-t",
936
+ sessionName,
937
+ terminalOption,
938
+ ";",
939
+ "set-option",
940
+ "-u",
941
+ "-t",
942
+ sessionName,
943
+ pendingOption
944
+ ] : [
945
+ "set-option",
946
+ "-u",
947
+ "-t",
948
+ sessionName,
949
+ terminalOption,
950
+ ";",
951
+ "set-option",
952
+ "-t",
953
+ sessionName,
954
+ pendingOption,
955
+ pendingBefore
956
+ ], { encoding: "utf-8" }).catch(() => {});
957
+ let rolledTerminal;
958
+ let restoredPending;
959
+ try {
960
+ [rolledTerminal, restoredPending] = await Promise.all([readStrict(sessionName, terminalOption), readStrict(sessionName, pendingOption)]);
961
+ } catch {
962
+ throw new KeyedMarkerVerificationError(sessionName, `rollback verification of key "${dedupKey}"`);
963
+ }
964
+ if (rolledTerminal === "" && restoredPending !== "") await clearPoisonVerified(sessionName, poisonOption, `verified rollback of key "${dedupKey}"`, readStrict).catch(() => {});
965
+ throw new KeyedSubmitTargetDeadError(sessionName, dedupKey);
966
+ }
967
+ if (pendingAfter !== "") {
968
+ const replaced = recordedTarget === "" || postTarget.pid === "" || recordedTarget !== postTarget.pid;
969
+ if (targetLost || replaced) throw new KeyedSubmitTargetDeadError(sessionName, dedupKey);
970
+ throw new Error(`Keyed tmux submit for ${sessionName} was rejected with the pending claim intact on a live pane`);
971
+ }
972
+ throw new Error(`Keyed tmux submit for ${sessionName} found neither a pending claim nor a terminal marker — the paste vanished without submission`);
973
+ }
974
+ var DEDUP_KEY_RE, PASTE_SETTLE_MS, KeyedSubmitTargetDeadError, KeyedMarkerVerificationError;
975
+ var init_tmux_dedup = __esmMin((() => {
976
+ init_tmux();
977
+ DEDUP_KEY_RE = /^[A-Za-z0-9:_-]+$/;
978
+ PASTE_SETTLE_MS = 300;
979
+ KeyedSubmitTargetDeadError = class extends Error {
980
+ constructor(sessionName, dedupKey) {
981
+ super(`Keyed tmux submit for ${sessionName} found a dead pane — the Enter was NOT accepted by a live harness, the pending claim for key "${dedupKey}" is preserved, and the key is not terminal`);
982
+ this.name = "KeyedSubmitTargetDeadError";
983
+ }
984
+ };
985
+ KeyedMarkerVerificationError = class extends Error {
986
+ constructor(sessionName, context, options) {
987
+ const causeText = options?.cause instanceof Error ? `: ${options.cause.message}` : "";
988
+ super(`Keyed tmux markers for ${sessionName} could not be verified (${context})${causeText}`, options);
989
+ this.name = "KeyedMarkerVerificationError";
990
+ }
991
+ };
992
+ }));
993
+ //#endregion
994
+ //#region ../../lib/planning/auto-spawn-consent.ts
995
+ function getOverdeckHome() {
996
+ return process.env["OVERDECK_HOME"] ?? join(homedir$1(), ".overdeck");
997
+ }
998
+ function autoSpawnOnFinalizeFlagPath(issueId) {
999
+ return join(getOverdeckHome(), "agents", `planning-${issueId.toLowerCase()}`, "auto-spawn-on-finalize.json");
1000
+ }
1001
+ function autoSpawnConsentLockPath(issueId) {
1002
+ return join(getOverdeckHome(), "locks", "auto-spawn-consent", `${issueId.toLowerCase()}.lock`);
1003
+ }
1004
+ function parseConsentRecord(raw) {
1005
+ const value = JSON.parse(raw);
1006
+ if (value.version === 2 && typeof value.generation === "string" && (value.status === "granted" || value.status === "claimed" || value.status === "spent")) return value;
1007
+ if (typeof value.autoSpawnOnFinalize === "boolean") return {
1008
+ version: 2,
1009
+ generation: "legacy",
1010
+ status: value.autoSpawnOnFinalize ? "granted" : "spent",
1011
+ updatedAt: (/* @__PURE__ */ new Date(0)).toISOString()
1012
+ };
1013
+ return null;
1014
+ }
1015
+ async function readConsentRecord(issueId) {
1016
+ try {
1017
+ return parseConsentRecord(await readFile(autoSpawnOnFinalizeFlagPath(issueId), "utf8"));
1018
+ } catch {
1019
+ return null;
1020
+ }
1021
+ }
1022
+ async function readConsentRecordForTransition(issueId) {
1023
+ try {
1024
+ const record = parseConsentRecord(await readFile(autoSpawnOnFinalizeFlagPath(issueId), "utf8"));
1025
+ if (!record) throw new Error(`Invalid auto-start consent state for ${issueId.toUpperCase()}`);
1026
+ return record;
1027
+ } catch (error) {
1028
+ if (error.code === "ENOENT") return null;
1029
+ throw error;
1030
+ }
1031
+ }
1032
+ async function writeConsentRecord(issueId, record) {
1033
+ const path = autoSpawnOnFinalizeFlagPath(issueId);
1034
+ const temporaryPath = `${path}.${process.pid}.${randomUUID()}.tmp`;
1035
+ await mkdir(dirname(path), { recursive: true });
1036
+ try {
1037
+ await writeFile(temporaryPath, JSON.stringify(record), { mode: 384 });
1038
+ await rename(temporaryPath, path);
1039
+ } catch (error) {
1040
+ await rm(temporaryPath, { force: true }).catch(() => void 0);
1041
+ throw error;
1042
+ }
1043
+ }
1044
+ async function withConsentLock(issueId, writerId, operation) {
1045
+ const lockPath = autoSpawnConsentLockPath(issueId);
1046
+ await acquireRecordLock(lockPath, {
1047
+ writerId,
1048
+ recordPath: autoSpawnOnFinalizeFlagPath(issueId)
1049
+ });
1050
+ try {
1051
+ return await operation();
1052
+ } finally {
1053
+ await releaseRecordLock(lockPath);
1054
+ }
1055
+ }
1056
+ async function readAutoSpawnOnFinalizeFlagAsync(issueId) {
1057
+ return (await readConsentRecord(issueId))?.status === "granted";
1058
+ }
1059
+ async function writeAutoSpawnOnFinalizeFlag(issueId, enabled) {
1060
+ await withConsentLock(issueId, "planning-consent:new-cycle", async () => {
1061
+ await writeConsentRecord(issueId, {
1062
+ version: 2,
1063
+ generation: randomUUID(),
1064
+ status: enabled ? "granted" : "spent",
1065
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
1066
+ });
1067
+ });
1068
+ }
1069
+ async function claimAutoSpawnConsentForWorkStart(issueId) {
1070
+ return withConsentLock(issueId, "planning-consent:claim", async () => {
1071
+ const current = await readConsentRecordForTransition(issueId);
1072
+ if (!current) return null;
1073
+ if (current.status !== "granted") throw new Error(`Auto-start consent for ${issueId.toUpperCase()} is unavailable because the current generation is ${current.status}`);
1074
+ const claimId = randomUUID();
1075
+ await writeConsentRecord(issueId, {
1076
+ ...current,
1077
+ status: "claimed",
1078
+ claimId,
1079
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
1080
+ });
1081
+ return {
1082
+ issueId: issueId.toUpperCase(),
1083
+ generation: current.generation,
1084
+ claimId
1085
+ };
1086
+ });
1087
+ }
1088
+ async function transitionClaim(claim, status, writerId) {
1089
+ await withConsentLock(claim.issueId, writerId, async () => {
1090
+ const current = await readConsentRecordForTransition(claim.issueId);
1091
+ if (!current || current.generation !== claim.generation || current.status !== "claimed" || current.claimId !== claim.claimId) return;
1092
+ await writeConsentRecord(claim.issueId, {
1093
+ ...current,
1094
+ status,
1095
+ claimId: void 0,
1096
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
1097
+ });
1098
+ });
1099
+ }
1100
+ async function completeAutoSpawnConsentClaim(claim) {
1101
+ await transitionClaim(claim, "spent", "planning-consent:complete");
1102
+ }
1103
+ async function releaseAutoSpawnConsentClaim(claim) {
1104
+ await transitionClaim(claim, "granted", "planning-consent:release");
1105
+ }
1106
+ async function withAutoSpawnConsentClaim(issueId, operation, options = {}) {
1107
+ const claim = await claimAutoSpawnConsentForWorkStart(issueId);
1108
+ if (!claim) throw new Error(`Auto-start consent for ${issueId.toUpperCase()} is required but no current generation exists`);
1109
+ let accepted = false;
1110
+ const accept = async () => {
1111
+ if (accepted) return;
1112
+ accepted = true;
1113
+ try {
1114
+ await completeAutoSpawnConsentClaim(claim);
1115
+ } catch (error) {
1116
+ const message = error instanceof Error ? error.message : String(error);
1117
+ (options.logWarning ?? console.warn)(`[planning] Work start for ${issueId.toUpperCase()} succeeded; consent remains durably claimed because completion persistence failed: ${message}`);
1118
+ }
1119
+ };
1120
+ try {
1121
+ const result = await operation(accept);
1122
+ if (!accepted) if ((options.isAccepted ?? (() => true))(result)) await accept();
1123
+ else await releaseAutoSpawnConsentClaim(claim);
1124
+ return result;
1125
+ } catch (error) {
1126
+ if (!accepted) try {
1127
+ await releaseAutoSpawnConsentClaim(claim);
1128
+ } catch (releaseError) {
1129
+ const message = releaseError instanceof Error ? releaseError.message : String(releaseError);
1130
+ (options.logWarning ?? console.warn)(`[planning] Work start for ${issueId.toUpperCase()} failed; consent remains fail-closed because claim release failed: ${message}`);
1131
+ }
1132
+ throw error;
1133
+ }
1134
+ }
1135
+ var init_auto_spawn_consent = __esmMin((() => {
1136
+ init_fs_lock();
1137
+ }));
1138
+ //#endregion
1139
+ export { init_launcher_generator as C, requireModelOverrideSync as D, normalizeModelOverrideSync as E, shellQuoteModelIdSync as O, generateLauncherScriptSync as S, init_model_validation as T, init_tmux_dedup as _, readAutoSpawnOnFinalizeFlagAsync as a, isOperatorStartedBy as b, writeAutoSpawnOnFinalizeFlag as c, assertValidDedupKey as d, completeKeyedSubmit as f, dedupTerminalOptionName as g, dedupTargetOptionName as h, init_auto_spawn_consent as i, KeyedMarkerVerificationError as l, dedupPoisonOptionName as m, claimAutoSpawnConsentForWorkStart as n, releaseAutoSpawnConsentClaim as o, dedupPendingOptionName as p, completeAutoSpawnConsentClaim as r, withAutoSpawnConsentClaim as s, autoSpawnOnFinalizeFlagPath as t, KeyedSubmitTargetDeadError as u, sendKeysDedup as v, MODEL_ID_PATTERN as w, normalizeFlywheelRunId as x, init_provenance as y };
1140
+
1141
+ //# sourceMappingURL=auto-spawn-consent-CQ9Bi9q6.js.map