@p4code/cli 0.9.18 → 0.9.19

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 (362) hide show
  1. package/dist/AcpMcpStdioBridge-DbCGhPmy.mjs +3 -0
  2. package/dist/{AcpMcpStdioBridge-4vUttgH1.mjs → AcpMcpStdioBridge-DxIZyDJz.mjs} +4 -4
  3. package/dist/{Effect-_Rz7VLdg.mjs → Effect-BqRgldaH.mjs} +20 -4
  4. package/dist/{Schema-APnY3Ozr.mjs → Schema-CkGB1Dgx.mjs} +2 -2
  5. package/dist/{Stream-CJtpwu3-.mjs → Stream-DZTo5F3N.mjs} +2 -2
  6. package/dist/{TraceDiagnostics-CeQ-TvdA.mjs → TraceDiagnostics-BU8mTsuy.mjs} +278 -50
  7. package/dist/bin.mjs +2 -2
  8. package/dist/{binCli-DzRO6f_z.mjs → binCli-CJGD6FcB.mjs} +297 -125
  9. package/dist/claude-history-worker.mjs +1 -1
  10. package/dist/{claudeHistoryWorker-B6KX_N9G.mjs → claudeHistoryWorker-Cst8OnLH.mjs} +1 -1
  11. package/dist/{claudeHistoryWorker-DZ1Ft4NK.mjs → claudeHistoryWorker-r4mV4Dxy.mjs} +2 -2
  12. package/dist/client/.vite/manifest.json +2143 -2131
  13. package/dist/client/assets/{2NI2N5EU-Ds9jiLPm.js → 2NI2N5EU-dXNVRqH0.js} +2 -2
  14. package/dist/client/assets/{4UO7MD6I-BWEQQJHY.js → 4UO7MD6I-BnTV2LIU.js} +2 -2
  15. package/dist/client/assets/{5B3SVYGG-lcm66GRf.js → 5B3SVYGG-BW_NJOn9.js} +2 -2
  16. package/dist/client/assets/{5GK6JWQ2-DegG64te.js → 5GK6JWQ2-zR4M88FU.js} +2 -2
  17. package/dist/client/assets/{5N7A7DKN-CDv2ioO3.js → 5N7A7DKN-DIzrmjXm.js} +2 -2
  18. package/dist/client/assets/{5OC2THR4-CaZVvwg8.js → 5OC2THR4-D9gz0spY.js} +2 -2
  19. package/dist/client/assets/{5S6HY5KT-B8WMtvrw.js → 5S6HY5KT-BFO1LsJz.js} +2 -2
  20. package/dist/client/assets/{6IMQ5BUJ-R-et-GtO.js → 6IMQ5BUJ-CflGSI2z.js} +2 -2
  21. package/dist/client/assets/{6OLKWJ4F-CdOZHr7D.js → 6OLKWJ4F-B_-tUtQE.js} +2 -2
  22. package/dist/client/assets/{74OO7NKP-DVS5qE0v.js → 74OO7NKP-CNFGk064.js} +2 -2
  23. package/dist/client/assets/{75O6YZUN-B6bJpGs2.js → 75O6YZUN-DSw7e3qz.js} +2 -2
  24. package/dist/client/assets/{77XECAW3-DDozcJnk.js → 77XECAW3-C1endahg.js} +2 -2
  25. package/dist/client/assets/{ABYRPUBD-BZd5-ucB.js → ABYRPUBD-DGyrlbqz.js} +2 -2
  26. package/dist/client/assets/AlertDialogRoot-CfwItD_i.js +2 -0
  27. package/dist/client/assets/{AnimatedHeight-CsOfc5H1.js → AnimatedHeight-DG3oq8Fl.js} +2 -2
  28. package/dist/client/assets/{AuthSurfaceShell--2lH1vql.js → AuthSurfaceShell-uHFuClfP.js} +2 -2
  29. package/dist/client/assets/{BB2UYUI2-DAb-WdIu.js → BB2UYUI2-DJtfqV3f.js} +2 -2
  30. package/dist/client/assets/{BUM34MOA-DMU6CGcz.js → BUM34MOA-B4MgXIYY.js} +2 -2
  31. package/dist/client/assets/{CEQABKGZ-BnDJUiDl.js → CEQABKGZ-CnWbDLSz.js} +2 -2
  32. package/dist/client/assets/{CXAC5362-QKBU6D2s.js → CXAC5362-DdZ6n5qP.js} +2 -2
  33. package/dist/client/assets/ChatGptUsageButton-Dg1SR7pz.js +2 -0
  34. package/dist/client/assets/ChatMarkdown-eJNo9q4b.js +49 -0
  35. package/dist/client/assets/CheckboxIndicator-BpGIx6Ze.js +2 -0
  36. package/dist/client/assets/{ClippedText-aNLi0IDp.js → ClippedText-Cny-j-4e.js} +2 -2
  37. package/dist/client/assets/CodexSetupSection.logic-C4KEUUA1.js +2 -0
  38. package/dist/client/assets/CollapsiblePanel-vHsKk5wM.js +2 -0
  39. package/dist/client/assets/ComboboxClear-DI8al7ca.js +2 -0
  40. package/dist/client/assets/{ComboboxGroupLabel-BaZLyLCv.js → ComboboxGroupLabel-9alK0hYt.js} +2 -2
  41. package/dist/client/assets/{CommandBlock-Bg2O3rbF.js → CommandBlock-BOYakQHx.js} +2 -2
  42. package/dist/client/assets/CompositeRoot-OiiGu5cn.js +2 -0
  43. package/dist/client/assets/{ConnectAgentSurface-D-fMTn_R.js → ConnectAgentSurface-D9vE8btn.js} +2 -2
  44. package/dist/client/assets/{ConnectionStatusDot-vOKtZfeV.js → ConnectionStatusDot-DL0Hsk-v.js} +2 -2
  45. package/dist/client/assets/{DRLTVNUE-DvpJAT6K.js → DRLTVNUE-D99K7hWK.js} +2 -2
  46. package/dist/client/assets/{DYY6UVD2-DFSg5DAZ.js → DYY6UVD2-BF6iP9-o.js} +2 -2
  47. package/dist/client/assets/DevicePanel-BzIRsUjQ.js +2 -0
  48. package/dist/client/assets/DeviceSetup-DQqwNSXQ.js +2 -0
  49. package/dist/client/assets/DialogTitle-BNEjkHZl.js +2 -0
  50. package/dist/client/assets/{DiffCommentAnnotation-CAml763Q.js → DiffCommentAnnotation-DOn5F9Vx.js} +3 -3
  51. package/dist/client/assets/{DiffFileTree-2Y-Da6MW.js → DiffFileTree-C7d_tSjH.js} +2 -2
  52. package/dist/client/assets/DiffPanel-zzTYLQBt.js +2 -0
  53. package/dist/client/assets/{DiffWorkerPoolProvider-Czi5bOUV.js → DiffWorkerPoolProvider-CHaL1Ona.js} +3 -3
  54. package/dist/client/assets/{EmbeddedDesign-AHra-cLY.js → EmbeddedDesign-DZezJSS1.js} +8 -8
  55. package/dist/client/assets/{EnvironmentMachineIcon-BnMVjB89.js → EnvironmentMachineIcon-BrYDn6tR.js} +2 -2
  56. package/dist/client/assets/{ExpandableText-gKNgCxfU.js → ExpandableText-BsOIEd28.js} +2 -2
  57. package/dist/client/assets/{FNOVOB4O-D2IqnTWb.js → FNOVOB4O-B07Bu4_g.js} +2 -2
  58. package/dist/client/assets/{FieldControl-Bjdbc6Ii.js → FieldControl-Ua5R3Une.js} +2 -2
  59. package/dist/client/assets/{FileDiff-Di0hvnyJ.js → FileDiff-CAhD0qa4.js} +2 -2
  60. package/dist/client/assets/{FilePreviewPanel-2-RLs_YZ.js → FilePreviewPanel-Ptxxfl5h.js} +6 -6
  61. package/dist/client/assets/FoldedSettingsSection-C-4eZXtv.js +2 -0
  62. package/dist/client/assets/{HDGCDEEZ-AZF834xy.js → HDGCDEEZ-BiCUaNcl.js} +2 -2
  63. package/dist/client/assets/{HSJLKHB7-Dtz-7WMf.js → HSJLKHB7-MsC8mniI.js} +2 -2
  64. package/dist/client/assets/{Icons-BzIBDVKW.js → Icons-D8Idteuf.js} +2 -2
  65. package/dist/client/assets/Input-BtekXNnW.js +2 -0
  66. package/dist/client/assets/{IntervalSecondsField-Fdrpvkqj.js → IntervalSecondsField-Aqwzi0Sz.js} +2 -2
  67. package/dist/client/assets/JZOYTAAL-B8yh1QUr.js +1 -0
  68. package/dist/client/assets/{K3MD6TGW-BPz_yQfQ.js → K3MD6TGW-CkU_KXkd.js} +2 -2
  69. package/dist/client/assets/{K7RP3OMA-C-IhAYzY.js → K7RP3OMA-DLs66X2w.js} +2 -2
  70. package/dist/client/assets/{KeybindingsSettings.logic-DjD-8Wsr.js → KeybindingsSettings.logic-DNTed1xn.js} +2 -2
  71. package/dist/client/assets/{LHDIQX7Q-Dw7FK-yZ.js → LHDIQX7Q-BOSadp0O.js} +2 -2
  72. package/dist/client/assets/{LUXOKEGN-Cp4yLfcO.js → LUXOKEGN-qg2nPaOP.js} +2 -2
  73. package/dist/client/assets/{LinkMachineSelect-v3ZAAPFG.js → LinkMachineSelect-CQIJcmq4.js} +2 -2
  74. package/dist/client/assets/{MathTypeset-CAVYwtpt.js → MathTypeset-B_2pC76G.js} +2 -2
  75. package/dist/client/assets/ModelLiveLayer-BdDN1RwJ.js +3 -0
  76. package/dist/client/assets/{N3JZAHOW-sZve4CbV.js → N3JZAHOW-DkFZrX8t.js} +2 -2
  77. package/dist/client/assets/{NUIALGQ3-DMlKhtdq.js → NUIALGQ3-DF_hOTNF.js} +2 -2
  78. package/dist/client/assets/{NoProjectsHero-B0ChXuQG.js → NoProjectsHero-DIDw2XWy.js} +2 -2
  79. package/dist/client/assets/{O65XPQGZ-COhBlGA1.js → O65XPQGZ-DX7_CzKu.js} +2 -2
  80. package/dist/client/assets/{O7XIQ6OM-D-y75rjS.js → O7XIQ6OM-mHLqolvI.js} +2 -2
  81. package/dist/client/assets/{OFQON5FD-kw-f4mV4.js → OFQON5FD-Suig0WTF.js} +2 -2
  82. package/dist/client/assets/{P4ConnectAccountPages-BXM_FJyy.js → P4ConnectAccountPages-naPvNZLz.js} +2 -2
  83. package/dist/client/assets/{P4ConnectSidebarSignIn-D8uwPPR6.js → P4ConnectSidebarSignIn-D2rgfUAh.js} +2 -2
  84. package/dist/client/assets/{PJQHF43J-Dww1R-k6.js → PJQHF43J-7rnsehAx.js} +2 -2
  85. package/dist/client/assets/PanelLayoutControls-D6h4yyW-.js +216 -0
  86. package/dist/client/assets/{PierreEntryIcon-C-5f-jFb.js → PierreEntryIcon-0R4z7KQU.js} +2 -2
  87. package/dist/client/assets/PopoverHandle-BxV9_kh8.js +2 -0
  88. package/dist/client/assets/PreviewPanel-DCN5UudG.js +2 -0
  89. package/dist/client/assets/ProjectDefaultsSettings-BVdLNACE.js +2 -0
  90. package/dist/client/assets/{ProjectFavicon-CPvmNs3J.js → ProjectFavicon-DJmxMkvz.js} +3 -3
  91. package/dist/client/assets/{ProjectIconPickerDialog-blbck4gY.js → ProjectIconPickerDialog-3Bcbbvvc.js} +2 -2
  92. package/dist/client/assets/{ProjectMonogram-Cesz5yVS.js → ProjectMonogram-Bb9wZVNY.js} +2 -2
  93. package/dist/client/assets/{ProviderAuthTerminal-BXGE9cPY.js → ProviderAuthTerminal-mgY-tn0M.js} +2 -2
  94. package/dist/client/assets/ProviderModelPicker-D3VH0Z__.js +2 -0
  95. package/dist/client/assets/{ProviderSettingsForm-CRvI8mDe.js → ProviderSettingsForm-CGySH9bP.js} +2 -2
  96. package/dist/client/assets/PullRequestCodeTab-D-J3laup.js +6 -0
  97. package/dist/client/assets/{RHNBAITX-CY4FKVtu.js → RHNBAITX-Ddcb7a4G.js} +2 -2
  98. package/dist/client/assets/{ReadOnlySourcePreview-DK9ZCAf4.js → ReadOnlySourcePreview-CUrcvaQB.js} +2 -2
  99. package/dist/client/assets/{RedactedSensitiveText-DrIhPFXw.js → RedactedSensitiveText-DiLAhy4C.js} +2 -2
  100. package/dist/client/assets/RenderErrorBoundary-DNjP1Gq4.js +23 -0
  101. package/dist/client/assets/{RightPanelResizeHandle-DBCfKzRv.js → RightPanelResizeHandle-BKZPxtjZ.js} +2 -2
  102. package/dist/client/assets/{SLD4V6NK-Dtrbq5qR.js → SLD4V6NK-CAdpUQd9.js} +2 -2
  103. package/dist/client/assets/ScheduledTasksSettings-BIqva7uG.js +6 -0
  104. package/dist/client/assets/{ScopedSwitch-DQHfQgMZ.js → ScopedSwitch-CjWqxV6P.js} +2 -2
  105. package/dist/client/assets/{ScrollAreaCorner-B9Aiu69u.js → ScrollAreaCorner-BNGMax5h.js} +2 -2
  106. package/dist/client/assets/{SecretInput-CxJl9pux.js → SecretInput-F_2AS4sm.js} +2 -2
  107. package/dist/client/assets/SelectScrollUpArrow-r18qpNEu.js +2 -0
  108. package/dist/client/assets/{SelfImproveSettingsSection-yFj7aCio.js → SelfImproveSettingsSection-dyJbezur.js} +2 -2
  109. package/dist/client/assets/{SettingsPanels-H_7XUe5G.js → SettingsPanels-BwrWyM3f.js} +7 -7
  110. package/dist/client/assets/{SettingsPanels.logic-BYLv56aj.js → SettingsPanels.logic-DWRYwc9b.js} +2 -2
  111. package/dist/client/assets/{SettingsScopeNotice-pJqEfHRd.js → SettingsScopeNotice-DpC9Q9ae.js} +2 -2
  112. package/dist/client/assets/{SidebarStageBackdrop-DWShR_RZ.js → SidebarStageBackdrop-ByWEF0y2.js} +2 -2
  113. package/dist/client/assets/{T3PCR2KE-BFmO9IZ-.js → T3PCR2KE-BsP9x4U3.js} +2 -2
  114. package/dist/client/assets/{TKWO2OVW-DMeVANpK.js → TKWO2OVW-BONiqXri.js} +2 -2
  115. package/dist/client/assets/{TSHNXIZL-COvYTPCc.js → TSHNXIZL-CLTZIB-s.js} +2 -2
  116. package/dist/client/assets/{ThemeEditorPanel-BxOl9N6E.js → ThemeEditorPanel-C7o3GtWa.js} +3 -3
  117. package/dist/client/assets/{ThreadDetailsItemsMenu-BXQbo6bY.js → ThreadDetailsItemsMenu-Bq_XM62t.js} +40 -40
  118. package/dist/client/assets/ThreadTerminalDrawer-CD5oxZhC.js +5 -0
  119. package/dist/client/assets/TooltipProvider-DPt8xz_3.js +2 -0
  120. package/dist/client/assets/{UQJE5E4I-CajoppS3.js → UQJE5E4I-BS_wwVFT.js} +2 -2
  121. package/dist/client/assets/{USNYFO5S-BQLaJAkC.js → USNYFO5S-CpDVNtuT.js} +2 -2
  122. package/dist/client/assets/{Virtualizer-kAxtf9JI.js → Virtualizer-BWztABfX.js} +2 -2
  123. package/dist/client/assets/{WEVWDWVA-Bn1CMBLe.js → WEVWDWVA-4IVaqPOG.js} +2 -2
  124. package/dist/client/assets/{WorkspaceBreadcrumb-KdZMrP13.js → WorkspaceBreadcrumb-BHensDdi.js} +2 -2
  125. package/dist/client/assets/{WorkspacePageContainer-VqvvyrKx.js → WorkspacePageContainer-CCJOwHlv.js} +2 -2
  126. package/dist/client/assets/{WorkspacePageHeader-Ca7-ugiS.js → WorkspacePageHeader-C9Tpr_np.js} +2 -2
  127. package/dist/client/assets/{X5RFHQXM-CPBgn0uR.js → X5RFHQXM-DO1k5hPx.js} +2 -2
  128. package/dist/client/assets/{X62E3GBT-DEsBFWSE.js → X62E3GBT-DR5ebldd.js} +2 -2
  129. package/dist/client/assets/{XBNEOJTC-rIiejuIa.js → XBNEOJTC-D6Kx02Ci.js} +2 -2
  130. package/dist/client/assets/{YHV2MVVZ-FepTeOr1.js → YHV2MVVZ-B7xQdu1d.js} +2 -2
  131. package/dist/client/assets/{YURCZMG2-Co7j1onF.js → YURCZMG2-vpRi9ruy.js} +2 -2
  132. package/dist/client/assets/{YVG2LODB-CH8YtqJ9.js → YVG2LODB-BPr-N_Eh.js} +2 -2
  133. package/dist/client/assets/_chat-B7MuBHoN.js +47 -0
  134. package/dist/client/assets/{_chat.design-C593M39o.js → _chat.design-JY93KEj-.js} +2 -2
  135. package/dist/client/assets/{_chat.index-DZmhCx_Q.js → _chat.index-BLQil4HT.js} +2 -2
  136. package/dist/client/assets/{_chat.new-BLxqLetm.js → _chat.new-BUUjlaam.js} +3 -3
  137. package/dist/client/assets/_chat.pull-requests-hoMASTBm.js +2 -0
  138. package/dist/client/assets/{alert-BdISKl4u.js → alert-Eh-IusVP.js} +2 -2
  139. package/dist/client/assets/{alert-dialog-Broi1wym.js → alert-dialog-BxwvNOYD.js} +2 -2
  140. package/dist/client/assets/{assetUrls-DyJx-URx.js → assetUrls-Bk8CvVQ5.js} +2 -2
  141. package/dist/client/assets/assets-w0TTeveX.js +2 -0
  142. package/dist/client/assets/{browserHistoryStore-zdRsIuMc.js → browserHistoryStore-CQgs_U0x.js} +2 -2
  143. package/dist/client/assets/{browserLinkTarget-aye_Gpt4.js → browserLinkTarget-BD9wK52f.js} +2 -2
  144. package/dist/client/assets/{checkbox-ueGFMqVv.js → checkbox-CDoyvSyH.js} +2 -2
  145. package/dist/client/assets/{color-picker-CUoPp4AJ.js → color-picker-BOsv4n_B.js} +2 -2
  146. package/dist/client/assets/{combobox-BfOjf6Iu.js → combobox-BJsEk7ze.js} +2 -2
  147. package/dist/client/assets/{command-CeMH9lgx.js → command-Cg83G2rG.js} +2 -2
  148. package/dist/client/assets/{connect-CQUjsv6p.js → connect-C7ENaX3L.js} +2 -2
  149. package/dist/client/assets/connect-agent-BEYL9KOm.js +2 -0
  150. package/dist/client/assets/{design-BL2REeQ-.js → design-pZfTAgOJ.js} +2 -2
  151. package/dist/client/assets/{device-DUMKyegd.js → device-CG5GzxuX.js} +2 -2
  152. package/dist/client/assets/{dialog-BzESHWgr.js → dialog-wBelv1Ac.js} +2 -2
  153. package/dist/client/assets/diffPanelStore-C8bCQWTi.js +2 -0
  154. package/dist/client/assets/{diffRendering-BnN6RWwy.js → diffRendering-C_l9f0DJ.js} +2 -2
  155. package/dist/client/assets/{dist--Lo1A95S.js → dist-1X_vspyy.js} +3 -3
  156. package/dist/client/assets/{draft-input-BozMgkbl.js → draft-input-BhYlt4Pu.js} +2 -2
  157. package/dist/client/assets/{duoViewer-mOZwt5UN.js → duoViewer-C9zEhnho.js} +2 -2
  158. package/dist/client/assets/{dynamic-3CmgXeht.js → dynamic--1QgBotz.js} +3 -3
  159. package/dist/client/assets/{embeddedScripts-g3gqCUmg.js → embeddedScripts-B_jWJYkI.js} +2 -2
  160. package/dist/client/assets/{empty-CeYEMFdG.js → empty-CJnssipy.js} +2 -2
  161. package/dist/client/assets/entities-CRXY8xy3.js +2 -0
  162. package/dist/client/assets/{fileLinks-LQyYck3z.js → fileLinks-Bg40qEqI.js} +2 -2
  163. package/dist/client/assets/{fileTreeExpansion-CY-keZ2e.js → fileTreeExpansion-C_MZA2Fb.js} +2 -2
  164. package/dist/client/assets/fold-vertical-CN9ryhZz.js +2 -0
  165. package/dist/client/assets/{getDiffFileInput-ClUa7N40.js → getDiffFileInput-PLuWhYlb.js} +2 -2
  166. package/dist/client/assets/{htmlRender-CxBGTvqW.js → htmlRender-DNX1FsUO.js} +2 -2
  167. package/dist/client/assets/index-BeP8Inse.js +3 -0
  168. package/dist/client/assets/{input-K95B1E2P.js → input-Cd-93Wp0.js} +2 -2
  169. package/dist/client/assets/{input-group-BAbOiIZs.js → input-group-CsS-Psw7.js} +2 -2
  170. package/dist/client/assets/{kbd-D9Q8zN3_.js → kbd-DB5SHS11.js} +2 -2
  171. package/dist/client/assets/{keybindings-C427DPQo.js → keybindings-DBugaGH3.js} +2 -2
  172. package/dist/client/assets/{lazy-BDrl-IrZ.js → lazy-8c6T_8yh.js} +4 -4
  173. package/dist/client/assets/{lazyRouteComponent-Bi84pz13.js → lazyRouteComponent-DtOhACEQ.js} +2 -2
  174. package/dist/client/assets/{link-B57I0_wC.js → link-BrJlIcQX.js} +2 -2
  175. package/dist/client/assets/{linkedPrompt-zM8XlD0_.js → linkedPrompt-CN6Qis59.js} +2 -2
  176. package/dist/client/assets/main-CNyrs4J_.js +37 -0
  177. package/dist/client/assets/main-h6l_SQzg.css +2 -0
  178. package/dist/client/assets/mediaReference-CJpFszQ0.js +2 -0
  179. package/dist/client/assets/{mediaSource-BQkNpHYP.js → mediaSource-D0cInV6V.js} +2 -2
  180. package/dist/client/assets/{modelScene-DWYEc7-j.js → modelScene-BmBrNhLd.js} +2 -2
  181. package/dist/client/assets/number-field-CSK9SRbZ.js +2 -0
  182. package/dist/client/assets/{observeResize-nOwAB2yP.js → observeResize-CFw3_anS.js} +2 -2
  183. package/dist/client/assets/{onboarding-BpYTNtvC.js → onboarding-Eqww5SU9.js} +2 -2
  184. package/dist/client/assets/openFileInPreview-D0wySgTe.js +2 -0
  185. package/dist/client/assets/{p4ProjectFile-Dkwk3dWQ.js → p4ProjectFile-BBI5SxD4.js} +2 -2
  186. package/dist/client/assets/{pair-Bc34xPWk.js → pair-DQR36eTM.js} +2 -2
  187. package/dist/client/assets/{pendingSendStore-ettG1x40.js → pendingSendStore-Dxq1oBH6.js} +2 -2
  188. package/dist/client/assets/{phoneViewer-BCeyyPaZ.js → phoneViewer-DLo78qRr.js} +2 -2
  189. package/dist/client/assets/{pierre-icons-C2-xRx0J.js → pierre-icons-uaZzWTro.js} +2 -2
  190. package/dist/client/assets/{popover-CtPuvMeZ.js → popover-DU7x_UNP.js} +2 -2
  191. package/dist/client/assets/{preview-DIIM6Lws.js → preview-CiDRJw3K.js} +2 -2
  192. package/dist/client/assets/{preview-CS0uw3GP.js → preview-DpJtvz_q.js} +2 -2
  193. package/dist/client/assets/previewMiniPlayerStore-D98YBqjW.js +2 -0
  194. package/dist/client/assets/primary-B5Ds-X9y.js +2 -0
  195. package/dist/client/assets/primaryCloudLinkState-7otRI1yH.js +2 -0
  196. package/dist/client/assets/projectFilesQueryState-CgQDudyR.js +2 -0
  197. package/dist/client/assets/{projectScriptEditor-Bp7idsB3.js → projectScriptEditor-BvwaSAI1.js} +2 -2
  198. package/dist/client/assets/providerSkills-BzFbjrTC.js +2 -0
  199. package/dist/client/assets/{pullRequestDetail.logic-8vF2qB9V.js → pullRequestDetail.logic-D9w_E_Dv.js} +3 -3
  200. package/dist/client/assets/{pullRequestIcons-6_4tgVDN.js → pullRequestIcons-gBL3Yt9x.js} +2 -2
  201. package/dist/client/assets/{pullRequestReviewStore-C8_coQYO.js → pullRequestReviewStore-CDUFfLmu.js} +2 -2
  202. package/dist/client/assets/pullRequests-BZ7PzmTm.js +2 -0
  203. package/dist/client/assets/queries-CzRpIoRQ.js +2 -0
  204. package/dist/client/assets/query-B8d0w621.js +2 -0
  205. package/dist/client/assets/radio-group-XlBZKXvU.js +2 -0
  206. package/dist/client/assets/relay-BWVOLzv_.js +2 -0
  207. package/dist/client/assets/{renderScheduler-Cvu4oEGc.js → renderScheduler-B6SrQg1c.js} +2 -2
  208. package/dist/client/assets/{rightPanelStore-D-meSGn7.js → rightPanelStore-BuudmoUr.js} +2 -2
  209. package/dist/client/assets/runtime-DYDOkR3G.js +7 -0
  210. package/dist/client/assets/{runtimeModeConfig-MYD8WQl8.js → runtimeModeConfig-DyiI0NS9.js} +2 -2
  211. package/dist/client/assets/{scheduledTasksSettings.logic-DmlMHwKF.js → scheduledTasksSettings.logic-DK9Z9azP.js} +3 -3
  212. package/dist/client/assets/{scroll-area-D9QT2Odm.js → scroll-area-B1iVi_db.js} +2 -2
  213. package/dist/client/assets/{select-BtqP8nTL.js → select-Dn3MxyiK.js} +2 -2
  214. package/dist/client/assets/{selfImproveFindings-DZS7PCvJ.js → selfImproveFindings-D5ELz2sX.js} +2 -2
  215. package/dist/client/assets/server-DQkamj54.js +2 -0
  216. package/dist/client/assets/session-A0FOa5Fv.js +2 -0
  217. package/dist/client/assets/session-logic-21koHfxl.js +27 -0
  218. package/dist/client/assets/{settings-A-pqSt1Y.js → settings-RZUSGfch.js} +2 -2
  219. package/dist/client/assets/{settings.appearance-C_uChPSz.js → settings.appearance-C2NUZQFB.js} +2 -2
  220. package/dist/client/assets/settings.archived-BOhwFyi3.js +2 -0
  221. package/dist/client/assets/{settings.computer-use-Dg_7f0JL.js → settings.computer-use-BhT0XlhO.js} +2 -2
  222. package/dist/client/assets/settings.connections-CVIPNlOU.js +2 -0
  223. package/dist/client/assets/{settings.data-controls-SDdipjc2.js → settings.data-controls-GIrtB4_J.js} +2 -2
  224. package/dist/client/assets/{settings.decisions-CoyKjdc1.js → settings.decisions-BBnbf4E4.js} +2 -2
  225. package/dist/client/assets/{settings.designs-4eHPAt6y.js → settings.designs-BrpJ4wJk.js} +2 -2
  226. package/dist/client/assets/settings.diagnostics-H0YPr7JD.js +2 -0
  227. package/dist/client/assets/{settings.general-DAWqQIHm.js → settings.general-CuMxiE8w.js} +2 -2
  228. package/dist/client/assets/settings.integrations-bw-NYX6w.js +2 -0
  229. package/dist/client/assets/{settings.keybindings-B0oNRJrN.js → settings.keybindings-Mqx8YmX-.js} +2 -2
  230. package/dist/client/assets/{settings.open-source-licenses-BI8-fEG8.js → settings.open-source-licenses-DppmDqdO.js} +2 -2
  231. package/dist/client/assets/settings.plugins-PhsBK5Nz.js +5 -0
  232. package/dist/client/assets/settings.projects-DvjxFMyV.js +4 -0
  233. package/dist/client/assets/settings.providers-DZac28bF.js +3 -0
  234. package/dist/client/assets/{settings.scheduled-tasks-Bx6ZIK0R.js → settings.scheduled-tasks-_8iDYzJF.js} +2 -2
  235. package/dist/client/assets/{settings.secrets-Dt4ORQnt.js → settings.secrets-B5WZy_fN.js} +2 -2
  236. package/dist/client/assets/{settings.snap-shot-CytMd2pC.js → settings.snap-shot-BThcjeQt.js} +2 -2
  237. package/dist/client/assets/settings.source-control-Cj9K4HE8.js +2 -0
  238. package/dist/client/assets/{settings.storage-BfvQd358.js → settings.storage-D3QQPs1U.js} +2 -2
  239. package/dist/client/assets/settingsLayout-LNYGC372.js +3 -0
  240. package/dist/client/assets/{sidebar-DbrWNN9-.js → sidebar-CCcDCy-Q.js} +2 -2
  241. package/dist/client/assets/{sidebarProjectGrouping-CZnpDNTf.js → sidebarProjectGrouping-Bj_Qatcf.js} +2 -2
  242. package/dist/client/assets/{skeleton-DxuQc9Kk.js → skeleton-dlFZVmO8.js} +2 -2
  243. package/dist/client/assets/{sourceControl-BbrGhAuF.js → sourceControl-Tyc4OKDH.js} +2 -2
  244. package/dist/client/assets/sourceControlClients-ECBkjM0e.js +2 -0
  245. package/dist/client/assets/{spinner-DmRIQvmI.js → spinner-fU7Q2OR1.js} +2 -2
  246. package/dist/client/assets/src-B7vcPG0D.js +15 -0
  247. package/dist/client/assets/terminal-links-CPJORRle.js +2 -0
  248. package/dist/client/assets/terminalSessions-B00GvWIU.js +2 -0
  249. package/dist/client/assets/{textarea-C_3SxeEV.js → textarea-CEng2dlo.js} +2 -2
  250. package/dist/client/assets/{themePalette-DSR5tBE9.js → themePalette-CcasVi_y.js} +3 -3
  251. package/dist/client/assets/{threadCheckpoints-D0dMlqZE.js → threadCheckpoints-D7P5EX0m.js} +2 -2
  252. package/dist/client/assets/{toggle-Zti3zuzr.js → toggle-DN8nwGi8.js} +2 -2
  253. package/dist/client/assets/{toggle-group-D015gcqT.js → toggle-group-Dx-ruC5S.js} +2 -2
  254. package/dist/client/assets/{tooltip-CAzkzAoH.js → tooltip-Da633nbs.js} +2 -2
  255. package/dist/client/assets/uiStateStore-aIXF8Zlu.js +2 -0
  256. package/dist/client/assets/unfold-vertical-CldLe1hB.js +2 -0
  257. package/dist/client/assets/{usage-BJA7zQoS.js → usage-DXoXMoKb.js} +2 -2
  258. package/dist/client/assets/{usageAccess-D5FAb4jV.js → usageAccess-RRnEiTSy.js} +2 -2
  259. package/dist/client/assets/{usageFormat-Njxx7Q49.js → usageFormat-D95Lw1XX.js} +2 -2
  260. package/dist/client/assets/{usageShortcuts-DuJeedG7.js → usageShortcuts-3UXG3hMD.js} +2 -2
  261. package/dist/client/assets/{use-atom-command-DMW6SFOx.js → use-atom-command-BkSai4ZH.js} +2 -2
  262. package/dist/client/assets/{useAriaLabelledBy-E7KNTqMb.js → useAriaLabelledBy-rzE7PQnj.js} +2 -2
  263. package/dist/client/assets/useHandleNewThread-CT3UAzyB.js +2 -0
  264. package/dist/client/assets/{useLocation-hVHAnHTx.js → useLocation-D7ZCVKu2.js} +2 -2
  265. package/dist/client/assets/{useNavigate-B7EiSugn.js → useNavigate-C6_wm78C.js} +2 -2
  266. package/dist/client/assets/{useNavigateBack-BC3GGm7e.js → useNavigateBack-iqJmvild.js} +2 -2
  267. package/dist/client/assets/{useP4ConnectAuthPrompt-D3qxx30I.js → useP4ConnectAuthPrompt-CKTZ-MxU.js} +2 -2
  268. package/dist/client/assets/{useParams-C5b2x5BH.js → useParams-DND-Jy5h.js} +2 -2
  269. package/dist/client/assets/{usePermissionStatus-Zf48W2tu.js → usePermissionStatus-DFJ-2rdQ.js} +2 -2
  270. package/dist/client/assets/{usePopupViewport-Dtwu2x5j.js → usePopupViewport-EARvZG9w.js} +2 -2
  271. package/dist/client/assets/{usePullRequestActions-BtPaWuCg.js → usePullRequestActions-DRrQpPhD.js} +3 -3
  272. package/dist/client/assets/{useRegisterFieldControl-BMmbsxkx.js → useRegisterFieldControl-Byb-EJOb.js} +2 -2
  273. package/dist/client/assets/{useScopedModelAvailability-BIveWOlk.js → useScopedModelAvailability-tXU_0tMY.js} +2 -2
  274. package/dist/client/assets/useSettings-BOuYsEM0.js +3 -0
  275. package/dist/client/assets/utils-DsOiwDNN.js +24 -0
  276. package/dist/client/assets/vcsRefInvalidation-CnjZD1r1.js +2 -0
  277. package/dist/client/assets/welcome-BgxI7gmD.js +2 -0
  278. package/dist/client/index.html +1 -1
  279. package/dist/{mcpResponsePayloads-BBvPAlwj.mjs → mcpResponsePayloads-tqyeJD3c.mjs} +10 -9
  280. package/dist/{ProjectCloneTracker-DAE46hjz.mjs → preview-C_h8Tda3.mjs} +894 -438
  281. package/dist/{renderer-iWfzRWCX.mjs → renderer-BeTlHpQk.mjs} +2 -2
  282. package/dist/{runtime-CllDK9QU.mjs → runtime-BUfUqrrw.mjs} +3 -3
  283. package/dist/{runtimeLayer-CblMBDQ6.mjs → runtimeLayer-5R-ZfBsl.mjs} +3152 -2949
  284. package/dist/{runtimeLayer-D1H3yRj8.mjs → runtimeLayer-DurN_FAN.mjs} +1 -1
  285. package/dist/{server-vm1eH-y1.mjs → server-DuD96ZSr.mjs} +347 -228
  286. package/dist/{sha2-9FUhed4s.mjs → sha2-oCwRxj9g.mjs} +13 -7
  287. package/package.json +1 -1
  288. package/dist/AcpMcpStdioBridge-RQnwhGrw.mjs +0 -3
  289. package/dist/client/assets/AlertDialogRoot-D2Lzxp77.js +0 -2
  290. package/dist/client/assets/ChatGptUsageButton-CM16mB7z.js +0 -2
  291. package/dist/client/assets/ChatMarkdown-LYkpVHJO.js +0 -49
  292. package/dist/client/assets/CheckboxIndicator-CLFg8-A1.js +0 -2
  293. package/dist/client/assets/CodexSetupSection.logic-CNAX4_fV.js +0 -2
  294. package/dist/client/assets/CollapsiblePanel-BlUD5mJC.js +0 -2
  295. package/dist/client/assets/ComboboxClear-DKHwuDAL.js +0 -2
  296. package/dist/client/assets/CompositeRoot-_C3uLH2F.js +0 -2
  297. package/dist/client/assets/DevicePanel-Dvozgov3.js +0 -2
  298. package/dist/client/assets/DeviceSetup-O_9LLGD9.js +0 -2
  299. package/dist/client/assets/DialogTitle-C9j5Tmuy.js +0 -2
  300. package/dist/client/assets/DiffPanel-CDixqNzb.js +0 -2
  301. package/dist/client/assets/FoldedSettingsSection-CrJX4FnL.js +0 -2
  302. package/dist/client/assets/Input-BWhtnCC0.js +0 -2
  303. package/dist/client/assets/JZOYTAAL-BCdmxsmo.js +0 -1
  304. package/dist/client/assets/ModelLiveLayer-CxX5pYmA.js +0 -3
  305. package/dist/client/assets/PanelLayoutControls-CC5OYRRR.js +0 -216
  306. package/dist/client/assets/PopoverHandle-BwqnKm9Y.js +0 -2
  307. package/dist/client/assets/PreviewPanel-BvRNyyKQ.js +0 -2
  308. package/dist/client/assets/ProjectDefaultsSettings-rvN_67Gu.js +0 -2
  309. package/dist/client/assets/ProviderModelPicker-Cq3CogU6.js +0 -2
  310. package/dist/client/assets/PullRequestCodeTab-C5kr72DG.js +0 -6
  311. package/dist/client/assets/RenderErrorBoundary-DgYrYlQR.js +0 -23
  312. package/dist/client/assets/ScheduledTasksSettings-CvbQDrJp.js +0 -6
  313. package/dist/client/assets/SelectScrollUpArrow-Dj2om6Qx.js +0 -2
  314. package/dist/client/assets/ThreadTerminalDrawer-DcYWT4k2.js +0 -5
  315. package/dist/client/assets/TooltipProvider-BzOo4iyi.js +0 -2
  316. package/dist/client/assets/_chat-DoDgVLYz.js +0 -47
  317. package/dist/client/assets/_chat.pull-requests-0Ce1mGUC.js +0 -2
  318. package/dist/client/assets/assets-lJdcWn_Q.js +0 -2
  319. package/dist/client/assets/connect-agent-DsQQcex2.js +0 -2
  320. package/dist/client/assets/diffPanelStore-B-hQEy6C.js +0 -2
  321. package/dist/client/assets/entities-CpJdh0W5.js +0 -2
  322. package/dist/client/assets/fold-vertical-BscQ96iN.js +0 -2
  323. package/dist/client/assets/index-BWKkBtFt.js +0 -3
  324. package/dist/client/assets/main-C8b9a0ht.js +0 -37
  325. package/dist/client/assets/main-CCH0X0zL.css +0 -2
  326. package/dist/client/assets/mediaReference-BIsAfUoY.js +0 -2
  327. package/dist/client/assets/number-field-D6t0GpAB.js +0 -2
  328. package/dist/client/assets/openFileInPreview-DFpXOfx7.js +0 -2
  329. package/dist/client/assets/previewMiniPlayerStore-oJw0qrRM.js +0 -2
  330. package/dist/client/assets/primary-B0bbGdiR.js +0 -2
  331. package/dist/client/assets/primaryCloudLinkState-B6CxZwAR.js +0 -2
  332. package/dist/client/assets/projectFilesQueryState-DpLF9eJd.js +0 -2
  333. package/dist/client/assets/providerSkills-yqPKKW6i.js +0 -2
  334. package/dist/client/assets/pullRequests-u-PJpGXV.js +0 -2
  335. package/dist/client/assets/queries-DDAXRF4r.js +0 -2
  336. package/dist/client/assets/query-DpmTmXUV.js +0 -2
  337. package/dist/client/assets/radio-group-DSfZzUu8.js +0 -2
  338. package/dist/client/assets/relay-CnLeC-mg.js +0 -2
  339. package/dist/client/assets/runtime-DUPVFypn.js +0 -7
  340. package/dist/client/assets/server-BYnv0CK4.js +0 -2
  341. package/dist/client/assets/session-BryEqNW-.js +0 -2
  342. package/dist/client/assets/session-logic-DZfPxiBF.js +0 -26
  343. package/dist/client/assets/settings.archived-BtKfrhpi.js +0 -2
  344. package/dist/client/assets/settings.connections-CHawbHDz.js +0 -2
  345. package/dist/client/assets/settings.diagnostics-BFlcsuN0.js +0 -2
  346. package/dist/client/assets/settings.integrations-CpUf4-MX.js +0 -2
  347. package/dist/client/assets/settings.plugins-B6My9wD7.js +0 -5
  348. package/dist/client/assets/settings.projects-hrhEEIli.js +0 -4
  349. package/dist/client/assets/settings.providers-BKeGnq6G.js +0 -3
  350. package/dist/client/assets/settings.source-control-B6eUVvNg.js +0 -2
  351. package/dist/client/assets/settingsLayout-BijX6mlS.js +0 -3
  352. package/dist/client/assets/sourceControlClients-CG8qRQgm.js +0 -2
  353. package/dist/client/assets/src-BZzGU-vc.js +0 -15
  354. package/dist/client/assets/terminal-links-FD1wyGOp.js +0 -2
  355. package/dist/client/assets/terminalSessions-D1m7FXoa.js +0 -2
  356. package/dist/client/assets/uiStateStore-B0Z02qoV.js +0 -2
  357. package/dist/client/assets/unfold-vertical-DeuiNAAp.js +0 -2
  358. package/dist/client/assets/useHandleNewThread-Cmiu3y4G.js +0 -2
  359. package/dist/client/assets/useSettings-C6RmJr-q.js +0 -3
  360. package/dist/client/assets/utils-Cs97wR6T.js +0 -24
  361. package/dist/client/assets/vcsRefInvalidation-CAa5en8i.js +0 -2
  362. package/dist/client/assets/welcome-BRX7e-eN.js +0 -2
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./rolldown-runtime-CMoAvOD_.mjs";
4
- import { $ as forEach, $i as fail$4, $o as max, $r as addFinalizerExit, $s as sort, A as currentSpan, Aa as LogLevelOrder, Ac as getOrUndefined, Al as assignProperty, An as updateContext, Ar as currentTimeNanos, At as matchEffect, Au as pipe, B as filter$2, Ba as endSpan, Bc as some, Bi as match$1, Bl as symbol, Bn as withParentSpan, Bo as compose, Bt as promise, Ca as pretty, Cn as tryPromise, Cr as isDoneCause, Cu as constVoid, D as context, Da as ClockRef, Dc as getOrElse, Di as makeUnsafe$4, Dn as undefined_, Dr as Clock, Ds as allocate, Du as identity, E as clockWith, Ea as squash, Ec as fromUndefinedOr, Ei as make$78, Eo as void_$3, Er as nextBetween, Es as Prototype, Eu as flow$2, F as exit$3, Fo as make$77, Ft as onInterrupt, Gl as optimize, Gr as succeed$3, Hi as void_$1, Hl as combine, Ho as toPredicate, Hr as mergeAll, Hs as isCanonicalArrayIndex, Ht as provideContext, I as fail$1, Ic as map$7, In as withFiber, Ir as effect, It as option$1, J as flatMapEager, Jc as isGreaterThanOrEqualTo$1, Ji as UnknownError$1, Jn as Class, Jo as infinity, Jr as sync$2, Js as map$4, Jt as request, Ki as NoSuchElementError, Kl as string$2, Kn as zipWith, Ko as fromInputUnsafe, Ks as makeBy, Kt as raceFirst, L as failCause, Lc as match, Ll as equals, Lo as encode$2, Lt as orDie, M as die$1, Mi as fail$2, Ml as normalizeNonEmpty, Mn as void_$2, Mo as ParentSpan, Ms as filter, Mt as onError, N as effectify, Na as asSome, Nc as isSome, Ni as failCause$1, Ns as filterMap$1, Nt as onExit, Nu as pipeArguments, O as contextWith$1, Oc as getOrNull, On as uninterruptible, Os as append, Ot as matchCauseEffect, Ou as memoize, P as ensuring, Pc as liftThrowable, Pi as findErrorOption$1, Pn as whileLoop, Pt as onExitPrimitive, Qi as done, Qn as get$7, Qo as isZero, Qr as addFinalizer, Qt as runForkWith, Ra as contextWith, Rc as none$1, Ri as isFailure, Rr as effectDiscard, Rt as orElseSucceed, S as catchReason, Sc as flatMap$1, Si as into, Sl as format, Sn as timeoutOrElse, So as sync, St as map$6, Su as constUndefined, T as catch_, Ta as reasonAnnotations, Tc as fromNullishOr, Ti as isDoneUnsafe, To as updateContext$1, Tr as Random$1, Ts as omit, Tt as mapError, Tu as dual, U as filterOrElse, Ua as exitIsSuccess, Ui as Done, Ul as hash, Un as withTracerEnabled, Uo as days, Ur as provide$1, Us as isReadonlyArrayNonEmpty, Ut as provideService, Va as exitHasInterrupts, Vi as succeed$5, Vn as withSpan, Vo as has$4, Vs as isArrayNonEmpty, W as filterOrFail, Wc as Number$2, Wn as yieldNow, Wr as provideMerge, X as fn, Xa as fiberInterrupt, Xi as combine$1, Xn as clear$1, Xo as isFinite$1, Xs as of, Xt as retry$1, Yl as symbol$1, Yt as result$1, Z as fnUntraced, Zi as die, Zl as hasProperty, Zr as Scope, Zt as runFork, _ as catchCauseIf, _l as setStackTraceLimit, _r as toStep, _s as getOption$1, _u as backEdges, a as all$5, ac as fail, ai as makeUnsafe$3, an as scoped, as as seconds, at as fromOption, au as isNotUndefined, ba as makeFailReason, bc as filter$1, bi as failCause$2, bl as NodeInspectSymbol, bn as timeout, bo as succeedSome, br as catchDone, bu as constFalse, c as annotateLogs, ca as hasInterruptsOnly, cn as serviceOption, cr as forever, cs as toMillis, ct as ignore$1, cu as isObject, d as asSome$1, da as isCause, dc as isResult, dl as exitSucceed, dn as succeedNone$1, do as makeSpanUnsafe, dr as isSchedule, ds as zero, dt as interruptible, ea as filterInterruptors, ei as close, eo as fiberJoin, er as make$75, es as millis, et as forever$1, f as asVoid, fa as isDieReason, fc as isSuccess$1, fi as TracerEnabled, fn as succeedSome$1, fs as Reference, ft as isEffect, fu as isString, g as catchCause, gc as succeed$1, gl as getStackTraceLimit, gn as tapCause, gr as spaced, gs as get$6, gu as or$1, h as callback, hi as _await, hl as withFiber$1, hn as tap$1, ht as logDebug, i as addFinalizer$1, ia as fromReasons, ic as all$6, ii as make$76, in as scope, io as forkUnsafe, it as forkScoped, j as delay, jc as isNone, jn as useSpan, jo as NativeSpan, jr as monotonicTimeNanos, ki as succeed$4, kn as uninterruptibleMask, ko as DisablePropagation, kr as currentTimeMillis, ln as sleep, lr as fromStep, lt as ignoreCause, ma as isFailReason, mn as sync$1, mo as onExitUnsafe, ms as add$2, mu as isUndefined, n as acquireRelease, na as findErrorOption, nc as filterMap, ni as fork, nl as PipeInspectableProto, nr as set$3, ns as minutes, nt as forkDetach, o as andThen, oc as failVoid, oi as provide, ot as fromResult, ou as isNullish, pc as map$5, pi as TracerTimingEnabled, pn as suspend, ps as Service, pu as isTagged, q as flatMap, qn as equalBatchKeys, qo as hours, qt as repeat, r as acquireUseRelease, rc as headUnsafe, rr as size$2, rs as nanos, rt as forkIn, ru as isNotNull, s as annotateCurrentSpan, sa as hasInterrupts, st as gen, tc as empty$4, tr as remove$4, ts as min, u as as, uc as isFailure$1, un as succeed, ut as interrupt, va as isTimeoutError, vc as contains, vi as doneUnsafe, vl as BaseProto, vn as tapError$1, vo as succeed$2, vs as getOrElse$1, vt as logInfo, w as catchTags, wi as isDone, wn as try_, ws as merge$1, wt as mapEager, x as catchIf, xl as toJson, xn as timeoutOption, xs as getUnsafe, xt as makeSpanScoped, xu as constTrue, y as catchEager, ya as makeDieReason, yc as exists, yi as fail$3, yo as succeedNone, ys as getOrUndefined$1, yt as logWarning, zc as orElse$2, zi as isSuccess } from "./Effect-_Rz7VLdg.mjs";
5
- import { $r as isGreaterThan, $t as make$79, A as NullOr, B as String$2, Bn as decodeUnknownEffect, C as Literals, Cr as Forbidden, Ct as decodeUnknownSync, D as NonEmptyArray, Et as encodeSync, F as OptionFromNullOr, Fr as value$2, Gn as decodeTo, Gr as decode$3, H as Struct, Ht as isMaxLength, I as Record$1, Kt as isPattern, L as RecordFromUrlParams, Mr as toString$2, Mt as instanceOf, Nt as is$2, O as NonEmptyString$1, Ot as encodeUnknownEffect, Pr as make$81, Pt as isBetween, Q as Uint8Array$1, Qr as formatIso, R as Redacted$1, S as Literal, Si as taggedEnum, St as decodeUnknownResult, Tr as Pointer, Tt as encodeEffect, V as StringFromUriComponent, W as TaggedError, Wn as applyToSelfOrLastLinkEncoding, X as URL$2, Xn as isNull, Xr as add$3, Y as Tuple, Yt as isSchemaError, _ as Finite, _i as EncodingError, _n as toType, _r as passthrough, a as BooleanLiterals, ar as unknown$1, br as transformEffect, bt as decodeUnknownExit, c as DateTimeUtc, cr as splitKeyValue, di as subtractDuration, dn as toCodecJson, dr as transformEffect$1, et as Undefined, fn as toCodecStringTree, ft as declare, gr as parseJson$1, ht as decodeExit, i as BooleanFromBit, ii as makeUnsafe$5, in as optionalKey, ir as toEncoded, it as UnknownFromJsonString$1, j as Number$3, jt as fromJsonString, kr as fromInput, l as DateTimeUtcFromString, ln as tag$2, lr as toLowerCase, m as Error$1, mr as compose$1, mt as decodeEffect, n as ArraySchema, nt as Union, o as Cause, oi as now, or as Transformation, pi as toEpochMillis, pr as trim, qr as encode$3, r as Boolean$2, ri as make$80, rn as optional, rt as Unknown, sr as composeTransformation, st as annotateKey, tn as mutable, u as Defect, ur as transform$2, vi as Class$1, vr as stringifyJson, vt as decodeTo$1, wi as map$8, wr as InvalidValue, wt as encode$4, xi as TaggedError$1, xt as decodeUnknownOption, y as Int$1, yn as withDecodingDefault, yt as decodeUnknownEffect$1, z as SchemaError, zn as _is } from "./Schema-APnY3Ozr.mjs";
6
- import { $c as orchestrationV2RunWorkStartedAt, $d as fromWeb, $f as BadArgument, $l as ModelSelection, $m as IsoDateTime, $p as isWithHeaders, Aa as CodexSettings, Af as InvalidUrlError, Ah as fromInputUnsafe$1, Am as defaultInstanceIdForDriver, Ba as ResponseStreamingMode, Bi as OrchestrationDispatchCommandError, Bl as SourceControlProviderError, Cc as OrchestrationV2ProviderSessionJson, Cd as TypeId$18, Cf as setHeaders, Ch as fromInput$1, Cl as ProviderUserInputAnswers, Co as SCRIPT_RUN_COMMAND_PATTERN, Cu as isProviderSendTurnSupportedImageMimeType, Dc as OrchestrationV2ProviderTurnJson, Df as DecodeError, Dh as remove$5, Dl as ThreadPullRequestLink, Dm as ProviderDriverKind, Du as getSlotParseOptions, Ea as AntigravitySettings, Ef as make$83, Eh as merge$2, Fa as DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL, Fl as pullRequestHostOf, Fm as ASSISTANT_CITATION_MAX_COMMENT_LENGTH, Ga as globalIdleCompaction, Gc as OrchestrationV2TurnItemJson, Gl as VcsProcessMissingExitCodeError, Go as EasDeviceHostConfig, Gp as getResponseEncoding, Ha as ServerSettingsError, Hf as isHttpBody, Hl as SourceControlRepositoryError, Ia as DEFAULT_SERVER_SETTINGS, Im as ASSISTANT_CITATION_MAX_TEXT_LENGTH, Ja as makeBinaryPathSetting, Jc as isKnownOrchestrationV2EventType, Jf as urlParams, Jl as VcsProcessSpawnError, Jm as ContextHandoffId, Jp as getStatusSuccessSchema, Ka as isUnconfiguredDefaultInstanceEnabled, Kf as text$9, Kl as VcsProcessOutputLimitError, Kp as getResponseEncodingSchema, Ks as getParamNames, La as GitHubHost, Lc as OrchestrationV2StoredEvent, Ll as resolvePullRequestAuthorFilter, Lm as AssistantCitation, Mc as OrchestrationV2RuntimeRequestJson, Mf as TransportError, Mm as ComposerContextRecord, Mr as P4ProjectFile, Na as DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL, Nf as isHttpClientError, Nm as OrchestrationMessageContext, Nr as P4_PROJECT_FILE_NAME, Nu as getPayloadSchemas, Oc as OrchestrationV2RunAttemptJson, Of as HttpClientError, Om as ProviderInstanceId, Pa as DEFAULT_BACKGROUND_ACTIVITY_PROFILE, Pc as OrchestrationV2SearchThreadInput, Pm as ReviewCommentContextRecord, Pr as PROJECT_FILE_BACKED_SETTINGS, Qd as filterStatusOk$1, Qf as make$84, Ql as VcsUnsupportedOperationError, Qm as EventId, Qp as isStreamUint8Array, Ra as PROJECT_SCOPED_SERVER_SETTING_KEYS, Ri as ApplicationEventMetadata, Rs as RelayManagedEndpointOrigin, Ru as normalize$2, Sd as Path, Sf as setHeader, Sm as MODEL_SLUG_ALIASES_BY_PROVIDER, Tc as OrchestrationV2ProviderThreadJson, Tl as ThreadLinkedPullRequest, Uf as jsonUnsafe, Ui as PROJECT_CLONE_ERROR_MAX_LENGTH, Ul as VcsDriverKind, Va as ServerSettings, Vl as SourceControlProviderKind, Vm as CheckpointScopeId, Vs as RelayManagedEndpointRuntimeConfig, Wa as UsageLimitSourceConfig, Wi as GitCommandError, Wl as VcsProcessExitError, Wp as getPayloadEncoding, Xf as FileTypeId, Xl as VcsProcessTimeoutError, Xp as isNoContent, Ya as makeProviderSettingsSchema, Yc as isOrchestrationV2WorkActive, Yf as FileSystem, Yl as VcsProcessStdinWriteError, Ym as ContextTransferId, Yp as getWithHeadersAnnotation, Zd as TypeId$16, Zf as WatchBackend, Zm as EnvironmentId, Zp as isStreamSchema, _f as make$82, _h as ThreadId, _m as CustomModelSetting, ac as OrchestrationV2ContextTransferJson, af as acceptJson, ah as PositiveInt, bf as put, bh as TurnItemId, cf as bearerToken, ch as ProviderThreadId, cp as ThreadEnvMode, df as bodyJsonUnsafe, dl as ProjectScript, ec as OrchestrationV2AppThreadJson, ef as matchStatus, eh as MessageId, eo as resolveProjectProviderInstanceEnabled, ep as PlatformError, fh as RunAttemptId, gf as get$8, gl as StoredProjectIcon, hc as OrchestrationV2ExecutionNodeJson, ia as isProviderTextGenerationCapable, if as schemaBodyJson, io as withIdleCompaction, ja as CompressMode, jf as StatusCodeError, jm as isProviderDriverKind, ka as ClaudeSettings, kc as OrchestrationV2RunJson, kh as bytes, ku as reflect, lf as bodyFormData, lh as ProviderTurnId, ln as DesktopHostTelemetryMessage, mh as RuntimeRequestId, mu as ChatAttachment, nc as OrchestrationV2CheckpointScopeJson, nd as addUrlAttributes, nf as TypeId$17, nh as NonNegativeInt, nm as allShort, no as secretSetting, od as toHeaders, of as appendUrlParams, oh as ProjectId, om as decodeSchema, pc as OrchestrationV2DomainEventJson, pf as bodyText, ph as RunId, qa as keepUnknownOverrideKeys, qf as uint8Array, ql as VcsProcessOutputReadError, qm as CommandId, ra as isProviderAvailable, rc as OrchestrationV2ContextHandoffJson, rh as PlanId, rm as hasBody, ro as secretSettingsFields, rp as systemError, sc as OrchestrationV2ConversationMessageJson, sf as basicAuth, sh as ProviderSessionId, ta as ServerSelfUpdateError, tc as OrchestrationV2CheckpointJson, td as addHeaderAttributes, th as NodeId, tm as withHeaders, to as resolveProviderInstanceEnabled, tp as badArgument, uh as RawEventId, un as DesktopTelemetryControlMessage, vc as OrchestrationV2PlanArtifact, vf as post, vh as TrimmedNonEmptyString, vm as DEFAULT_MODEL, vu as PROVIDER_SEND_TURN_MAX_FILE_BYTES, wf as setUrl, wm as ModelCapabilities, wo as THREAD_JUMP_KEYBINDING_COMMANDS, xf as setBody, xh as CurrentRedactedNames, xm as DEFAULT_TEXT_GENERATION_MODEL_BY_PROVIDER, xo as MODEL_PICKER_JUMP_KEYBINDING_COMMANDS, yf as prependUrl, yh as TrimmedString, yl as ProviderApprovalDecision, ym as DEFAULT_MODEL_BY_PROVIDER, yu as PROVIDER_SEND_TURN_MAX_IMAGE_BYTES, za as ProjectSettingsOverrides, zc as OrchestrationV2SubagentJson, zi as ApplicationProjectEvent, zm as CheckpointId } from "./sha2-9FUhed4s.mjs";
7
- import { $ as paginate, $t as splitLines$2, A as fromIterable, An as unbounded$1, At as toReadableStreamEffect, B as isStream, Bt as isSink, Cn as publish, D as fromChannel$1, Dn as sliding$1, En as shutdown$1, Fn as await_, Ft as unwrap, G as mapEffect$1, Gt as filterArray, H as map$9, Hn as runIn, I as fromSubscription, In as getCurrent, Jt as mapDone, K as mapError$1, Ln as interrupt$1, Lt as drain, M as fromPubSub, Mn as set$4, Mt as transduce, N as fromPull, Nn as makeUnsafe$6, Nt as transformPull, O as fromEffect, On as subscribe, P as fromQueue, Qt as pipeTo, R as ignore$2, Rn as interruptAll, Sn as unbounded, V as make$88, Vn as join$1, Wt as decodeText$1, Y as mkString, Yt as mapEffect$2, _n as shutdown, _t as splitLines$1, a as changes, an as dropping, b as filterMap$2, bn as take, bt as switchMap, c as debounce, cn as fail$5, ct as runCollect, dt as runFoldEffect, en as make$87, et as pipeThroughChannel, fn as make$86, ft as runForEach, g as fail$6, gn as poll, gt as scoped$1, h as ensuring$1, hn as offerUnsafe, it as rechunk, jn as make$85, k as fromEffectRepeat, kn as take$1, kt as toPull, l as decodeText, ln as failCause$3, lt as runDrain, m as encodeText, mn as offerAll, mt as runHead, nt as provideContext$1, on as end, p as empty$5, pn as offer, q as merge$3, qt as fromTransform, r as catchTag, rn as clear$2, rt as provideService$1, s as concat$1, sn as endUnsafe, st as run$1, t as callback$1, tn as makeUnsafe$7, tt as pipeThroughChannelOrFail, u as die$2, un as failCauseUnsafe, ut as runFold, v as filter$3, vt as succeed$6, wn as publishAll, wt as tap$2, y as filterEffect, yn as sliding, yt as suspend$1, zn as interruptAllAs, zt as fromChannel } from "./Stream-CJtpwu3-.mjs";
4
+ import { $ as forEach, $i as done, $l as hasProperty, $o as isZero, $r as addFinalizerExit, A as currentSpan, Ac as getOrNull, An as updateContext, Ao as DisablePropagation, Ar as currentTimeNanos, At as matchEffect, Au as memoize, B as filter$2, Bc as none$1, Bi as match$1, Bn as withParentSpan, Bt as promise, Cl as toJson, Cn as tryPromise, Co as sync, Cr as isDoneCause, Cu as constTrue, D as context, Da as squash, Dc as fromNullishOr, Di as makeUnsafe$5, Dn as undefined_, Do as void_$3, Dr as Clock, Ds as Prototype, Du as dual, E as clockWith, Ea as reasonAnnotations, Ei as make$79, Eo as updateContext$1, Er as nextBetween, Es as omit, F as exit$3, Fc as isSome, Ft as onInterrupt, Fu as pipeArguments, Gl as hash, Gr as succeed$3, Gs as isReadonlyArrayNonEmpty, Ha as exitHasInterrupts, Hc as some, Hi as void_$1, Hl as symbol, Ho as has$4, Hr as mergeAll, Ht as provideContext, I as fail$1, Ic as liftThrowable, In as withFiber, Io as make$78, Ir as effect, It as option$1, J as flatMapEager, Jl as string$2, Jn as Class, Jo as hours, Jr as sync$2, Js as makeBy, Jt as request, Kc as Number$2, Ki as NoSuchElementError, Kn as zipWith, Kt as raceFirst, L as failCause, Lt as orDie, M as die$1, Mc as getOrUndefined, Mi as fail$2, Ml as assignProperty, Mn as void_$2, Mo as NativeSpan, Mt as onError, Mu as pipe, N as effectify, Nc as isNone, Ni as failCause$1, No as ParentSpan, Ns as filter, Nt as onExit, O as contextWith$1, Oa as ClockRef, Oc as fromUndefinedOr, On as uninterruptible, Os as allocate, Ot as matchCauseEffect, Ou as flow$2, P as ensuring, Pa as asSome, Pi as findErrorOption$1, Pl as normalizeNonEmpty, Pn as whileLoop, Ps as filterMap$1, Pt as onExitPrimitive, Qi as die, Qn as get$8, Qr as addFinalizer, Qs as of, Qt as runForkWith, Rc as map$7, Ri as isFailure, Ro as encode$2, Rr as effectDiscard, Rt as orElseSucceed, S as catchReason, Sc as filter$1, Si as into, Sl as NodeInspectSymbol, Sn as timeoutOrElse, Ss as getUnsafe$1, St as map$6, Su as constFalse, T as catch_, Ti as isDoneUnsafe, Tr as Random$1, Ts as merge$1, Tt as mapError, Tu as constVoid, U as filterOrElse, Ui as Done, Un as withTracerEnabled, Uo as toPredicate, Ur as provide$1, Us as isArrayNonEmpty, Ut as provideService, Va as endSpan, Vc as orElse$2, Vi as succeed$5, Vn as withSpan, Vo as compose, W as filterOrFail, Wa as exitIsSuccess, Wl as combine, Wn as yieldNow, Wo as days, Wr as provideMerge, Ws as isCanonicalArrayIndex, X as fn, Xc as isGreaterThanOrEqualTo$1, Xn as clear$1, Xs as map$4, Xt as retry$1, Yi as UnknownError$1, Yo as infinity, Yt as result$1, Z as fnUntraced, Za as fiberInterrupt, Zi as combine$1, Zl as symbol$1, Zo as isFinite$1, Zr as Scope, Zt as runFork, _ as catchCauseIf, _l as withFiber$1, _r as toStep, _s as get$7, a as all$5, aa as fromReasons, ac as headUnsafe, ai as makeUnsafe$4, an as scoped, ao as forkUnsafe, at as fromOption, au as isNotNull, ba as makeDieReason, bc as contains, bi as failCause$2, bl as BaseProto, bn as timeout, bo as succeedNone, br as catchDone, bs as getOrUndefined$1, c as annotateLogs, ca as hasInterrupts, cc as failVoid, cn as serviceOption, cr as forever, ct as ignore$1, cu as isNullish, d as asSome$1, dn as succeedNone$1, dr as isSchedule, dt as interruptible, ea as fail$4, ei as close, er as make$76, es as max, et as forever$1, f as asVoid, fa as isCause, fc as isFailure$1, fi as TracerEnabled, fn as succeedSome$1, fo as makeSpanUnsafe, fs as zero, ft as isEffect, g as catchCause, gn as tapCause, gr as spaced, gu as isUndefined, h as callback, ha as isFailReason, hc as map$5, hi as _await, hn as tap$1, ho as onExitUnsafe, hs as add$2, ht as logDebug, hu as isTagged, i as addFinalizer$1, ic as filterMap, ii as make$77, il as PipeInspectableProto, in as scope, is as nanos, it as forkScoped, j as delay, ja as LogLevelOrder, jn as useSpan, jr as monotonicTimeNanos, kc as getOrElse, ki as succeed$4, kn as uninterruptibleMask, kr as currentTimeMillis, ks as append, ku as identity, la as hasInterruptsOnly, ln as sleep, lr as fromStep, ls as toMillis, lt as ignoreCause, mc as isSuccess$1, mn as sync$1, ms as Service, mu as isString, n as acquireRelease, ni as fork, nr as set$4, ns as min, nt as forkDetach, o as andThen, oc as all$6, oi as provide, os as seconds, ot as fromResult, pa as isDieReason, pc as isResult, pi as TracerTimingEnabled, pl as exitSucceed, pn as suspend, ps as Reference, q as flatMap, ql as optimize, qn as equalBatchKeys, qo as fromInputUnsafe, qt as repeat, r as acquireUseRelease, ra as findErrorOption, rc as empty$4, rr as size$2, rs as minutes, rt as forkIn, s as annotateCurrentSpan, sc as fail, st as gen, su as isNotUndefined, ta as filterInterruptors, tc as sort, to as fiberJoin, tr as remove$4, ts as millis, u as as, un as succeed, ut as interrupt, uu as isObject, vc as succeed$1, vi as doneUnsafe, vl as getStackTraceLimit, vn as tapError$1, vs as getOption$1, vt as logInfo, vu as or$1, w as catchTags, wa as pretty, wc as flatMap$1, wi as isDone, wl as format, wn as try_, wt as mapEager, wu as constUndefined, x as catchIf, xa as makeFailReason, xc as exists, xn as timeoutOption, xo as succeedSome, xt as makeSpanScoped, y as catchEager, ya as isTimeoutError, yi as fail$3, yl as setStackTraceLimit, yo as succeed$2, ys as getOrElse$1, yt as logWarning, yu as backEdges, za as contextWith, zc as match, zi as isSuccess, zl as equals } from "./Effect-BqRgldaH.mjs";
5
+ import { $r as isGreaterThan, $t as make$80, A as NullOr, B as String$2, Bn as decodeUnknownEffect, C as Literals, Cr as Forbidden, Ct as decodeUnknownSync, D as NonEmptyArray, Et as encodeSync, F as OptionFromNullOr, Fr as value$2, Gn as decodeTo, Gr as decode$3, H as Struct, Ht as isMaxLength, I as Record$1, Kt as isPattern, L as RecordFromUrlParams, Mr as toString$2, Mt as instanceOf, Nt as is$2, O as NonEmptyString$1, Ot as encodeUnknownEffect, Pr as make$82, Pt as isBetween, Q as Uint8Array$1, Qr as formatIso, R as Redacted$1, S as Literal, Si as taggedEnum, St as decodeUnknownResult, Tr as Pointer, Tt as encodeEffect, V as StringFromUriComponent, W as TaggedError, Wn as applyToSelfOrLastLinkEncoding, X as URL$2, Xn as isNull, Xr as add$3, Y as Tuple, Yt as isSchemaError, _ as Finite, _i as EncodingError, _n as toType, _r as passthrough, a as BooleanLiterals, ar as unknown$1, br as transformEffect, bt as decodeUnknownExit, c as DateTimeUtc, cr as splitKeyValue, di as subtractDuration, dn as toCodecJson, dr as transformEffect$1, et as Undefined, fn as toCodecStringTree, ft as declare, gr as parseJson$1, ht as decodeExit, i as BooleanFromBit, ii as makeUnsafe$6, in as optionalKey, ir as toEncoded, it as UnknownFromJsonString$1, j as Number$3, jt as fromJsonString, kr as fromInput, l as DateTimeUtcFromString, ln as tag$2, lr as toLowerCase, m as Error$1, mr as compose$1, mt as decodeEffect, n as ArraySchema, nt as Union, o as Cause, oi as now, or as Transformation, pi as toEpochMillis, pr as trim, qr as encode$3, r as Boolean$2, ri as make$81, rn as optional, rt as Unknown, sr as composeTransformation, st as annotateKey, tn as mutable, u as Defect, ur as transform$2, vi as Class$1, vr as stringifyJson, vt as decodeTo$1, wi as map$8, wr as InvalidValue, wt as encode$4, xi as TaggedError$1, xt as decodeUnknownOption, y as Int$1, yn as withDecodingDefault, yt as decodeUnknownEffect$1, z as SchemaError, zn as _is } from "./Schema-CkGB1Dgx.mjs";
6
+ import { $c as orchestrationV2RunWorkStartedAt, $d as fromWeb, $f as BadArgument, $l as ModelSelection, $m as IsoDateTime, $p as isWithHeaders, Aa as CodexSettings, Af as InvalidUrlError, Ah as fromInputUnsafe$1, Am as defaultInstanceIdForDriver, Ba as ResponseStreamingMode, Bi as OrchestrationDispatchCommandError, Bl as SourceControlProviderError, Cc as OrchestrationV2ProviderSessionJson, Cd as TypeId$19, Cf as setHeaders, Ch as fromInput$1, Cl as ProviderUserInputAnswers, Co as SCRIPT_RUN_COMMAND_PATTERN, Cu as isProviderSendTurnSupportedImageMimeType, Dc as OrchestrationV2ProviderTurnJson, Df as DecodeError, Dh as remove$5, Dl as ThreadPullRequestLink, Dm as ProviderDriverKind, Du as getSlotParseOptions, Ea as AntigravitySettings, Ef as make$84, Eh as merge$2, Fa as DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL, Fl as pullRequestHostOf, Fm as ASSISTANT_CITATION_MAX_COMMENT_LENGTH, Ga as globalIdleCompaction, Gc as OrchestrationV2TurnItemJson, Gl as VcsProcessMissingExitCodeError, Go as EasDeviceHostConfig, Gp as getResponseEncoding, Ha as ServerSettingsError, Hf as isHttpBody, Hl as SourceControlRepositoryError, Ia as DEFAULT_SERVER_SETTINGS, Im as ASSISTANT_CITATION_MAX_TEXT_LENGTH, Ja as makeBinaryPathSetting, Jc as isKnownOrchestrationV2EventType, Jf as urlParams, Jl as VcsProcessSpawnError, Jm as ContextHandoffId, Jp as getStatusSuccessSchema, Ka as isUnconfiguredDefaultInstanceEnabled, Kf as text$9, Kl as VcsProcessOutputLimitError, Kp as getResponseEncodingSchema, Ks as getParamNames, La as GitHubHost, Lc as OrchestrationV2StoredEvent, Ll as resolvePullRequestAuthorFilter, Lm as AssistantCitation, Mc as OrchestrationV2RuntimeRequestJson, Mf as TransportError, Mm as ComposerContextRecord, Mr as P4ProjectFile, Na as DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL, Nf as isHttpClientError, Nm as OrchestrationMessageContext, Nr as P4_PROJECT_FILE_NAME, Nu as getPayloadSchemas, Oc as OrchestrationV2RunAttemptJson, Of as HttpClientError, Om as ProviderInstanceId, Pa as DEFAULT_BACKGROUND_ACTIVITY_PROFILE, Pc as OrchestrationV2SearchThreadInput, Pm as ReviewCommentContextRecord, Pr as PROJECT_FILE_BACKED_SETTINGS, Qd as filterStatusOk$1, Qf as make$85, Ql as VcsUnsupportedOperationError, Qm as EventId, Qp as isStreamUint8Array, Ra as PROJECT_SCOPED_SERVER_SETTING_KEYS, Ri as ApplicationEventMetadata, Rs as RelayManagedEndpointOrigin, Ru as normalize$2, Sd as Path, Sf as setHeader, Sm as MODEL_SLUG_ALIASES_BY_PROVIDER, Tc as OrchestrationV2ProviderThreadJson, Tl as ThreadLinkedPullRequest, Uf as jsonUnsafe, Ui as PROJECT_CLONE_ERROR_MAX_LENGTH, Ul as VcsDriverKind, Va as ServerSettings, Vl as SourceControlProviderKind, Vm as CheckpointScopeId, Vs as RelayManagedEndpointRuntimeConfig, Wa as UsageLimitSourceConfig, Wi as GitCommandError, Wl as VcsProcessExitError, Wp as getPayloadEncoding, Xf as FileTypeId, Xl as VcsProcessTimeoutError, Xp as isNoContent, Ya as makeProviderSettingsSchema, Yc as isOrchestrationV2WorkActive, Yf as FileSystem, Yl as VcsProcessStdinWriteError, Ym as ContextTransferId, Yp as getWithHeadersAnnotation, Zd as TypeId$17, Zf as WatchBackend, Zm as EnvironmentId, Zp as isStreamSchema, _f as make$83, _h as ThreadId, _m as CustomModelSetting, ac as OrchestrationV2ContextTransferJson, af as acceptJson, ah as PositiveInt, bf as put, bh as TurnItemId, cf as bearerToken, ch as ProviderThreadId, cp as ThreadEnvMode, df as bodyJsonUnsafe, dl as ProjectScript, ec as OrchestrationV2AppThreadJson, ef as matchStatus, eh as MessageId, eo as resolveProjectProviderInstanceEnabled, ep as PlatformError, fh as RunAttemptId, gf as get$9, gl as StoredProjectIcon, hc as OrchestrationV2ExecutionNodeJson, ia as isProviderTextGenerationCapable, if as schemaBodyJson, io as withIdleCompaction, ja as CompressMode, jf as StatusCodeError, jm as isProviderDriverKind, ka as ClaudeSettings, kc as OrchestrationV2RunJson, kh as bytes, ku as reflect, lf as bodyFormData, lh as ProviderTurnId, ln as DesktopHostTelemetryMessage, mh as RuntimeRequestId, mu as ChatAttachment, nc as OrchestrationV2CheckpointScopeJson, nd as addUrlAttributes, nf as TypeId$18, nh as NonNegativeInt, nm as allShort, no as secretSetting, od as toHeaders, of as appendUrlParams, oh as ProjectId, om as decodeSchema, pc as OrchestrationV2DomainEventJson, pf as bodyText, ph as RunId, qa as keepUnknownOverrideKeys, qf as uint8Array, ql as VcsProcessOutputReadError, qm as CommandId, ra as isProviderAvailable, rc as OrchestrationV2ContextHandoffJson, rh as PlanId, rm as hasBody, ro as secretSettingsFields, rp as systemError, sc as OrchestrationV2ConversationMessageJson, sf as basicAuth, sh as ProviderSessionId, ta as ServerSelfUpdateError, tc as OrchestrationV2CheckpointJson, td as addHeaderAttributes, th as NodeId, tm as withHeaders, to as resolveProviderInstanceEnabled, tp as badArgument, uh as RawEventId, un as DesktopTelemetryControlMessage, vc as OrchestrationV2PlanArtifact, vf as post, vh as TrimmedNonEmptyString, vm as DEFAULT_MODEL, vu as PROVIDER_SEND_TURN_MAX_FILE_BYTES, wf as setUrl, wm as ModelCapabilities, wo as THREAD_JUMP_KEYBINDING_COMMANDS, xf as setBody, xh as CurrentRedactedNames, xm as DEFAULT_TEXT_GENERATION_MODEL_BY_PROVIDER, xo as MODEL_PICKER_JUMP_KEYBINDING_COMMANDS, yf as prependUrl, yh as TrimmedString, yl as ProviderApprovalDecision, ym as DEFAULT_MODEL_BY_PROVIDER, yu as PROVIDER_SEND_TURN_MAX_IMAGE_BYTES, za as ProjectSettingsOverrides, zc as OrchestrationV2SubagentJson, zi as ApplicationProjectEvent, zm as CheckpointId } from "./sha2-oCwRxj9g.mjs";
7
+ import { $ as paginate, $t as splitLines$2, A as fromIterable, An as unbounded$1, At as toReadableStreamEffect, B as isStream, Bt as isSink, Cn as publish, D as fromChannel$1, Dn as sliding$1, En as shutdown$1, Fn as await_, Ft as unwrap, G as mapEffect$1, Gt as filterArray, H as map$9, Hn as runIn, I as fromSubscription, In as getCurrent, Jt as mapDone, K as mapError$1, Ln as interrupt$1, Lt as drain, M as fromPubSub, Mn as set$5, Mt as transduce, N as fromPull, Nn as makeUnsafe$7, Nt as transformPull, O as fromEffect, On as subscribe, P as fromQueue, Qt as pipeTo, R as ignore$2, Rn as interruptAll, Sn as unbounded, V as make$89, Vn as join$1, Wt as decodeText$1, Y as mkString, Yt as mapEffect$2, _n as shutdown, _t as splitLines$1, a as changes, an as dropping, b as filterMap$2, bn as take, bt as switchMap, c as debounce, cn as fail$5, ct as runCollect, dt as runFoldEffect, en as make$88, et as pipeThroughChannel, fn as make$87, ft as runForEach, g as fail$6, gn as poll, gt as scoped$1, h as ensuring$1, hn as offerUnsafe, it as rechunk, jn as make$86, k as fromEffectRepeat, kn as take$1, kt as toPull, l as decodeText, ln as failCause$3, lt as runDrain, m as encodeText, mn as offerAll, mt as runHead, nt as provideContext$1, on as end, p as empty$5, pn as offer, q as merge$3, qt as fromTransform, r as catchTag, rn as clear$2, rt as provideService$1, s as concat$1, sn as endUnsafe, st as run$1, t as callback$1, tn as makeUnsafe$8, tt as pipeThroughChannelOrFail, u as die$2, un as failCauseUnsafe, ut as runFold, v as filter$3, vt as succeed$6, wn as publishAll, wt as tap$2, y as filterEffect, yn as sliding, yt as suspend$1, zn as interruptAllAs, zt as fromChannel } from "./Stream-DZTo5F3N.mjs";
8
8
  import * as NodeFS from "node:fs";
9
9
  import * as NodeUrl from "node:url";
10
10
  import { fileURLToPath as urlToPath } from "node:url";
@@ -162,9 +162,9 @@ const CurrentMetricAttributes = /*#__PURE__*/ Reference("effect/Metric/CurrentMe
162
162
  * @since 4.0.0
163
163
  */
164
164
  const MetricRegistry = /*#__PURE__*/ Reference("effect/Metric/MetricRegistry", { defaultValue: () => /* @__PURE__ */ new Map() });
165
- const TypeId$15 = "~effect/Metric";
165
+ const TypeId$16 = "~effect/Metric";
166
166
  var Metric$ = class {
167
- [TypeId$15] = TypeId$15;
167
+ [TypeId$16] = TypeId$16;
168
168
  #extraAttributes;
169
169
  #key = "";
170
170
  id;
@@ -185,12 +185,12 @@ var Metric$ = class {
185
185
  return this.hook(context).update(input, context);
186
186
  }
187
187
  hook(context) {
188
- const extraAttributes = get$6(context, CurrentMetricAttributes);
188
+ const extraAttributes = get$7(context, CurrentMetricAttributes);
189
189
  if (extraAttributes !== this.#extraAttributes) {
190
190
  this.#extraAttributes = extraAttributes;
191
191
  this.#key = makeKey(this, mergeAttributes(this.attributes, extraAttributes));
192
192
  }
193
- const registry = get$6(context, MetricRegistry);
193
+ const registry = get$7(context, MetricRegistry);
194
194
  let metadata = registry.get(this.#key);
195
195
  if (isUndefined(metadata)) {
196
196
  metadata = {
@@ -475,7 +475,7 @@ const timer = (name, options) => {
475
475
  * @category mutations
476
476
  * @since 2.0.0
477
477
  */
478
- const update$1 = /*#__PURE__*/ dual(2, (self, input) => contextWith((services) => sync(() => self.updateUnsafe(input, services))));
478
+ const update$2 = /*#__PURE__*/ dual(2, (self, input) => contextWith((services) => sync(() => self.updateUnsafe(input, services))));
479
479
  /**
480
480
  * Returns a new metric that is powered by this one, but which accepts updates
481
481
  * of the specified new type, which must be transformable to the input type of
@@ -608,7 +608,7 @@ const withAttributes = /*#__PURE__*/ dual(2, (self, attributes) => {
608
608
  * @since 4.0.0
609
609
  */
610
610
  const snapshotUnsafe = (context) => {
611
- const registry = get$6(context, MetricRegistry);
611
+ const registry = get$7(context, MetricRegistry);
612
612
  return Array.from(registry.values()).map(({ hooks, ...meta }) => ({
613
613
  ...meta,
614
614
  state: hooks.get(context)
@@ -690,7 +690,7 @@ function addAttributesToContext(attributes) {
690
690
  let current;
691
691
  let merged = {};
692
692
  return (context) => {
693
- const extraAttributes = get$6(context, CurrentMetricAttributes);
693
+ const extraAttributes = get$7(context, CurrentMetricAttributes);
694
694
  if (extraAttributes !== current) {
695
695
  current = extraAttributes;
696
696
  merged = mergeAttributes(extraAttributes, attributes);
@@ -1186,7 +1186,7 @@ var HashMapImpl = class {
1186
1186
  const thatImpl = that;
1187
1187
  if (this.size !== thatImpl.size) return false;
1188
1188
  for (const [key, value] of this) {
1189
- const otherValue = pipe(that, get$5(key));
1189
+ const otherValue = pipe(that, get$6(key));
1190
1190
  if (isNone(otherValue) || !equals(value, otherValue.value)) return false;
1191
1191
  }
1192
1192
  return true;
@@ -1219,7 +1219,7 @@ const isHashMap = (u) => hasProperty(u, HashMapTypeId);
1219
1219
  /** @internal */
1220
1220
  const empty$3 = () => new HashMapImpl(false, 0, emptyNode, 0);
1221
1221
  /** @internal */
1222
- const get$5 = /*#__PURE__*/ dual(2, (self, key) => {
1222
+ const get$6 = /*#__PURE__*/ dual(2, (self, key) => {
1223
1223
  return self._root.get(0, hash(key), key);
1224
1224
  });
1225
1225
  /** @internal */
@@ -1240,7 +1240,7 @@ const setHash = (self, key, hash, value) => {
1240
1240
  return new HashMapImpl(false, impl._edit, newRoot, impl._size + (added.value ? 1 : 0));
1241
1241
  };
1242
1242
  /** @internal */
1243
- const set$2 = /*#__PURE__*/ dual(3, (self, key, value) => {
1243
+ const set$3 = /*#__PURE__*/ dual(3, (self, key, value) => {
1244
1244
  return setHash(self, key, hash(key), value);
1245
1245
  });
1246
1246
  /** @internal */
@@ -1315,7 +1315,7 @@ const has$2 = (self, value) => has$3(keyMap(self), value);
1315
1315
  /** @internal */
1316
1316
  const add$1 = (self, value) => {
1317
1317
  const map = keyMap(self);
1318
- return has$3(map, value) ? self : makeImpl(set$2(map, value, true));
1318
+ return has$3(map, value) ? self : makeImpl(set$3(map, value, true));
1319
1319
  };
1320
1320
  /** @internal */
1321
1321
  const remove$2 = (self, value) => {
@@ -1563,7 +1563,7 @@ const decode$2 = (str) => {
1563
1563
  const decodeString$2 = (str) => map$5(decode$2(str), (_) => decoder.decode(_));
1564
1564
  const decoder = /*#__PURE__*/ new TextDecoder();
1565
1565
  // ../../node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/rcRef.js
1566
- const TypeId$14 = "~effect/RcRef";
1566
+ const TypeId$15 = "~effect/RcRef";
1567
1567
  const stateEmpty = { _tag: "Empty" };
1568
1568
  const stateClosed = { _tag: "Closed" };
1569
1569
  const variance = {
@@ -1571,7 +1571,7 @@ const variance = {
1571
1571
  _E: identity
1572
1572
  };
1573
1573
  var RcRefImpl = class {
1574
- [TypeId$14] = variance;
1574
+ [TypeId$15] = variance;
1575
1575
  pipe() {
1576
1576
  return pipeArguments(this, arguments);
1577
1577
  }
@@ -1588,9 +1588,9 @@ var RcRefImpl = class {
1588
1588
  }
1589
1589
  };
1590
1590
  /** @internal */
1591
- const make$74 = (options) => withFiber((fiber) => {
1591
+ const make$75 = (options) => withFiber((fiber) => {
1592
1592
  const context = fiber.context;
1593
- const scope = get$6(context, Scope);
1593
+ const scope = get$7(context, Scope);
1594
1594
  const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== void 0 ? fromInputUnsafe(options.idleTimeToLive) : void 0);
1595
1595
  return as(addFinalizerExit(scope, () => {
1596
1596
  const state = ref.state;
@@ -1621,7 +1621,7 @@ const getState = (self, restore) => {
1621
1621
  acquired: void 0
1622
1622
  };
1623
1623
  self.state = acquiring;
1624
- const scope = makeUnsafe$3();
1624
+ const scope = makeUnsafe$4();
1625
1625
  const acquire = provideContext(self.acquire, add$2(self.context, Scope, scope)).pipe(flatMap((value) => {
1626
1626
  if (self.state !== acquiring) return interrupt;
1627
1627
  const state = {
@@ -1653,7 +1653,7 @@ const awaitAcquiring = (self, acquiring, restore) => onExit(restore(join$1(acqui
1653
1653
  return interrupt$1(acquiring.fiber);
1654
1654
  });
1655
1655
  /** @internal */
1656
- const get$4 = (self_) => {
1656
+ const get$5 = (self_) => {
1657
1657
  const self = self_;
1658
1658
  return uninterruptibleMask((restore) => flatMap(scope, (scope) => flatMap(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
1659
1659
  };
@@ -1724,7 +1724,7 @@ const release = (self, state) => {
1724
1724
  * @category constructors
1725
1725
  * @since 3.5.0
1726
1726
  */
1727
- const make$73 = make$74;
1727
+ const make$74 = make$75;
1728
1728
  /**
1729
1729
  * Gets the value from an `RcRef`, acquiring it first if needed.
1730
1730
  *
@@ -1770,7 +1770,7 @@ const make$73 = make$74;
1770
1770
  * @category combinators
1771
1771
  * @since 3.5.0
1772
1772
  */
1773
- const get$3 = get$4;
1773
+ const get$4 = get$5;
1774
1774
  // ../../node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/LogLevel.js
1775
1775
  /**
1776
1776
  * Returns all `LogLevel` values in order from `All` through the concrete severities to
@@ -2401,7 +2401,7 @@ const getExtension = (type) => {
2401
2401
  * @category type IDs
2402
2402
  * @since 4.0.0
2403
2403
  */
2404
- const TypeId$13 = "~effect/socket/Socket";
2404
+ const TypeId$14 = "~effect/socket/Socket";
2405
2405
  /**
2406
2406
  * Service tag for bidirectional socket transports.
2407
2407
  *
@@ -2428,8 +2428,8 @@ const Socket = /*#__PURE__*/ Service("effect/socket/Socket");
2428
2428
  * @category constructors
2429
2429
  * @since 4.0.0
2430
2430
  */
2431
- const make$72 = (options) => Socket.of({
2432
- [TypeId$13]: TypeId$13,
2431
+ const make$73 = (options) => Socket.of({
2432
+ [TypeId$14]: TypeId$14,
2433
2433
  reader: options.reader,
2434
2434
  writer: options.writer
2435
2435
  });
@@ -2708,7 +2708,7 @@ const isPausable = (ws) => "pause" in ws && typeof ws.pause === "function";
2708
2708
  */
2709
2709
  const fromWebSocket = (acquire, options) => withFiber((fiber) => {
2710
2710
  let currentWS;
2711
- const latch = makeUnsafe$6(false);
2711
+ const latch = makeUnsafe$7(false);
2712
2712
  const acquireContext = fiber.context;
2713
2713
  const reader = gen(function* () {
2714
2714
  const scope$3 = yield* scope;
@@ -2868,7 +2868,7 @@ const fromWebSocket = (acquire, options) => withFiber((fiber) => {
2868
2868
  write,
2869
2869
  writeAll
2870
2870
  });
2871
- return succeed(make$72({
2871
+ return succeed(make$73({
2872
2872
  reader,
2873
2873
  writer
2874
2874
  }));
@@ -2923,9 +2923,9 @@ const RefProto = {
2923
2923
  * @category constructors
2924
2924
  * @since 4.0.0
2925
2925
  */
2926
- const makeUnsafe$2 = (value) => {
2926
+ const makeUnsafe$3 = (value) => {
2927
2927
  const self = Object.create(RefProto);
2928
- self.ref = make$85(value);
2928
+ self.ref = make$86(value);
2929
2929
  return self;
2930
2930
  };
2931
2931
  /**
@@ -2954,7 +2954,7 @@ const makeUnsafe$2 = (value) => {
2954
2954
  * @category constructors
2955
2955
  * @since 2.0.0
2956
2956
  */
2957
- const make$71 = (value) => sync$1(() => makeUnsafe$2(value));
2957
+ const make$72 = (value) => sync$1(() => makeUnsafe$3(value));
2958
2958
  /**
2959
2959
  * Gets the current value of the Ref.
2960
2960
  *
@@ -2981,7 +2981,7 @@ const make$71 = (value) => sync$1(() => makeUnsafe$2(value));
2981
2981
  * @category getters
2982
2982
  * @since 2.0.0
2983
2983
  */
2984
- const get$2 = (self) => sync$1(() => self.ref.current);
2984
+ const get$3 = (self) => sync$1(() => self.ref.current);
2985
2985
  /**
2986
2986
  * Sets the value of the Ref to the specified value.
2987
2987
  *
@@ -3017,7 +3017,7 @@ const get$2 = (self) => sync$1(() => self.ref.current);
3017
3017
  * @category mutations
3018
3018
  * @since 2.0.0
3019
3019
  */
3020
- const set$1 = /*#__PURE__*/ dual(2, (self, value) => sync$1(() => set$4(self.ref, value)));
3020
+ const set$2 = /*#__PURE__*/ dual(2, (self, value) => sync$1(() => set$5(self.ref, value)));
3021
3021
  /**
3022
3022
  * Gets the current value of the Ref, sets it to the specified value, and returns the previous value atomically.
3023
3023
  *
@@ -3137,7 +3137,7 @@ const getAndUpdate = /*#__PURE__*/ dual(2, (self, f) => sync$1(() => {
3137
3137
  * @category mutations
3138
3138
  * @since 2.0.0
3139
3139
  */
3140
- const modify = /*#__PURE__*/ dual(2, (self, f) => sync$1(() => {
3140
+ const modify$1 = /*#__PURE__*/ dual(2, (self, f) => sync$1(() => {
3141
3141
  const [b, a] = f(self.ref.current);
3142
3142
  self.ref.current = a;
3143
3143
  return b;
@@ -3178,7 +3178,7 @@ const modify = /*#__PURE__*/ dual(2, (self, f) => sync$1(() => {
3178
3178
  * @category mutations
3179
3179
  * @since 2.0.0
3180
3180
  */
3181
- const update = /*#__PURE__*/ dual(2, (self, f) => sync$1(() => {
3181
+ const update$1 = /*#__PURE__*/ dual(2, (self, f) => sync$1(() => {
3182
3182
  self.ref.current = f(self.ref.current);
3183
3183
  }));
3184
3184
  /**
@@ -3213,7 +3213,7 @@ const update = /*#__PURE__*/ dual(2, (self, f) => sync$1(() => {
3213
3213
  */
3214
3214
  const updateAndGet = /*#__PURE__*/ dual(2, (self, f) => sync$1(() => self.ref.current = f(self.ref.current)));
3215
3215
  // ../../node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/http/HttpClient.js
3216
- const TypeId$12 = "~effect/http/HttpClient";
3216
+ const TypeId$13 = "~effect/http/HttpClient";
3217
3217
  /**
3218
3218
  * Service tag for the default outgoing HTTP client service.
3219
3219
  *
@@ -3235,7 +3235,7 @@ const accessor = (method) => (...args) => flatMap(HttpClient, (client) => client
3235
3235
  * @category accessors
3236
3236
  * @since 4.0.0
3237
3237
  */
3238
- const get$1 = /*#__PURE__*/ accessor("get");
3238
+ const get$2 = /*#__PURE__*/ accessor("get");
3239
3239
  /**
3240
3240
  * Transforms a client by wrapping the response effect for each request.
3241
3241
  *
@@ -3276,7 +3276,7 @@ const filterStatusOk = /*#__PURE__*/ transformResponse(/*#__PURE__*/ flatMap(fil
3276
3276
  * @since 4.0.0
3277
3277
  */
3278
3278
  const makeWith$3 = (postprocess, preprocess) => {
3279
- const self = Object.create(Proto$5);
3279
+ const self = Object.create(Proto$6);
3280
3280
  self.preprocess = preprocess;
3281
3281
  self.postprocess = postprocess;
3282
3282
  self.execute = function(request) {
@@ -3284,8 +3284,8 @@ const makeWith$3 = (postprocess, preprocess) => {
3284
3284
  };
3285
3285
  return self;
3286
3286
  };
3287
- const Proto$5 = {
3288
- [TypeId$12]: TypeId$12,
3287
+ const Proto$6 = {
3288
+ [TypeId$13]: TypeId$13,
3289
3289
  pipe() {
3290
3290
  return pipeArguments(this, arguments);
3291
3291
  },
@@ -3294,7 +3294,7 @@ const Proto$5 = {
3294
3294
  return { _id: "effect/HttpClient" };
3295
3295
  },
3296
3296
  .../*#__PURE__*/ Object.fromEntries(/*#__PURE__*/ allShort.map(([fullMethod, method]) => [method, function(url, options) {
3297
- return this.execute(make$82(fullMethod)(url, options));
3297
+ return this.execute(make$83(fullMethod)(url, options));
3298
3298
  }]))
3299
3299
  };
3300
3300
  /**
@@ -3308,10 +3308,10 @@ const Proto$5 = {
3308
3308
  * @category constructors
3309
3309
  * @since 4.0.0
3310
3310
  */
3311
- const make$70 = (f) => makeWith$3((effect) => flatMap(effect, (request) => withFiber((fiber) => {
3311
+ const make$71 = (f) => makeWith$3((effect) => flatMap(effect, (request) => withFiber((fiber) => {
3312
3312
  const scopedController = scopedRequests.get(request);
3313
3313
  const controller = scopedController ?? new AbortController();
3314
- const urlResult = make$83(request.url, request.urlParams, getOrUndefined(request.hash));
3314
+ const urlResult = make$84(request.url, request.urlParams, getOrUndefined(request.hash));
3315
3315
  if (isFailure$1(urlResult)) return fail$1(new HttpClientError({ reason: new InvalidUrlError({
3316
3316
  request,
3317
3317
  cause: urlResult.failure
@@ -3554,8 +3554,8 @@ var InterruptibleResponse = class {
3554
3554
  this.original = original;
3555
3555
  this.controller = controller;
3556
3556
  }
3557
- [TypeId$16] = TypeId$16;
3558
3557
  [TypeId$17] = TypeId$17;
3558
+ [TypeId$18] = TypeId$18;
3559
3559
  applyInterrupt(effect) {
3560
3560
  return suspend(() => {
3561
3561
  responseRegistry.unregister(this.original);
@@ -3762,7 +3762,7 @@ function nominal() {
3762
3762
  * @stability stable
3763
3763
  * @since 4.0.0
3764
3764
  */
3765
- const TypeId$11 = "~effect/Cache";
3765
+ const TypeId$12 = "~effect/Cache";
3766
3766
  /**
3767
3767
  * Creates a cache with dynamic time-to-live based on the result and key.
3768
3768
  *
@@ -3810,9 +3810,9 @@ const TypeId$11 = "~effect/Cache";
3810
3810
  * @since 2.0.0
3811
3811
  */
3812
3812
  const makeWith$2 = (lookup, options) => contextWith((context) => {
3813
- const self = Object.create(Proto$4);
3813
+ const self = Object.create(Proto$5);
3814
3814
  self.lookup = (key) => updateContext$1(lookup(key), (input) => merge$1(context, input));
3815
- self.map = make$75();
3815
+ self.map = make$76();
3816
3816
  self.capacity = options.capacity;
3817
3817
  self.timeToLive = options.timeToLive ? (exit, key) => fromInputUnsafe(options.timeToLive(exit, key)) : defaultTimeToLive;
3818
3818
  return succeed$2(self);
@@ -3886,13 +3886,13 @@ const makeWith$2 = (lookup, options) => contextWith((context) => {
3886
3886
  * @category constructors
3887
3887
  * @since 2.0.0
3888
3888
  */
3889
- const make$69 = (options) => makeWith$2(options.lookup, {
3889
+ const make$70 = (options) => makeWith$2(options.lookup, {
3890
3890
  ...options,
3891
3891
  timeToLive: options.timeToLive !== void 0 ? () => options.timeToLive : defaultTimeToLive
3892
3892
  });
3893
- const Proto$4 = {
3893
+ const Proto$5 = {
3894
3894
  ...PipeInspectableProto,
3895
- [TypeId$11]: TypeId$11,
3895
+ [TypeId$12]: TypeId$12,
3896
3896
  toJSON() {
3897
3897
  return {
3898
3898
  _id: "Cache",
@@ -3998,12 +3998,12 @@ const defaultTimeToLive = (_, _key) => infinity;
3998
3998
  * @category combinators
3999
3999
  * @since 4.0.0
4000
4000
  */
4001
- const get = /*#__PURE__*/ dual(2, (self, key) => withFiber$1((fiber) => {
4002
- const oentry = get$7(self.map, key);
4001
+ const get$1 = /*#__PURE__*/ dual(2, (self, key) => withFiber$1((fiber) => {
4002
+ const oentry = get$8(self.map, key);
4003
4003
  if (isSome(oentry)) {
4004
4004
  remove$4(self.map, key);
4005
4005
  if (!hasExpired(oentry.value, fiber)) {
4006
- set$3(self.map, key, oentry.value);
4006
+ set$4(self.map, key, oentry.value);
4007
4007
  return oentry.value.await(fiber);
4008
4008
  }
4009
4009
  }
@@ -4023,7 +4023,7 @@ const get = /*#__PURE__*/ dual(2, (self, key) => withFiber$1((fiber) => {
4023
4023
  } else if (isFinite$1(ttl)) entry.expiresAt = fiber.getRef(ClockRef).currentTimeMillisUnsafe() + toMillis(ttl);
4024
4024
  });
4025
4025
  const exit = entry.fiber.pollUnsafe();
4026
- if (!skipCache && (exit === void 0 || !exitHasInterrupts(exit))) set$3(self.map, key, entry);
4026
+ if (!skipCache && (exit === void 0 || !exitHasInterrupts(exit))) set$4(self.map, key, entry);
4027
4027
  if (Number.isFinite(self.capacity)) checkCapacity(self);
4028
4028
  return entry.await(fiber);
4029
4029
  }));
@@ -4052,7 +4052,7 @@ var EntryImpl = class {
4052
4052
  }
4053
4053
  };
4054
4054
  const removeEntry = (self, key, entry) => {
4055
- const current = get$7(self.map, key);
4055
+ const current = get$8(self.map, key);
4056
4056
  if (isSome(current) && current.value === entry) remove$4(self.map, key);
4057
4057
  };
4058
4058
  const hasExpired = (entry, fiber) => {
@@ -4176,14 +4176,14 @@ const getOption = /*#__PURE__*/ dual(2, (self, key) => withFiber$1((fiber) => {
4176
4176
  return entry ? asSome(entry.await(fiber)) : succeedNone;
4177
4177
  }));
4178
4178
  const getImpl = (self, key, fiber, isRead = true) => {
4179
- const oentry = get$7(self.map, key);
4179
+ const oentry = get$8(self.map, key);
4180
4180
  if (isNone(oentry)) return;
4181
4181
  else if (hasExpired(oentry.value, fiber)) {
4182
4182
  remove$4(self.map, key);
4183
4183
  return;
4184
4184
  } else if (isRead) {
4185
4185
  remove$4(self.map, key);
4186
- set$3(self.map, key, oentry.value);
4186
+ set$4(self.map, key, oentry.value);
4187
4187
  }
4188
4188
  return oentry.value;
4189
4189
  };
@@ -4320,7 +4320,7 @@ const getSuccess = /*#__PURE__*/ dual(2, (self, key) => withFiber$1((fiber) => {
4320
4320
  * @category combinators
4321
4321
  * @since 4.0.0
4322
4322
  */
4323
- const set = /*#__PURE__*/ dual(3, (self, key, value) => withFiber$1((fiber) => {
4323
+ const set$1 = /*#__PURE__*/ dual(3, (self, key, value) => withFiber$1((fiber) => {
4324
4324
  const exit = exitSucceed(value);
4325
4325
  const entry = new EntryImpl(fiber, exit);
4326
4326
  const ttl = self.timeToLive(exit, key);
@@ -4329,7 +4329,7 @@ const set = /*#__PURE__*/ dual(3, (self, key, value) => withFiber$1((fiber) => {
4329
4329
  return void_$3;
4330
4330
  }
4331
4331
  entry.expiresAt = isFinite$1(ttl) ? fiber.getRef(ClockRef).currentTimeMillisUnsafe() + toMillis(ttl) : void 0;
4332
- set$3(self.map, key, entry);
4332
+ set$4(self.map, key, entry);
4333
4333
  checkCapacity(self);
4334
4334
  return void_$3;
4335
4335
  }));
@@ -4593,7 +4593,7 @@ const refresh = /*#__PURE__*/ dual(2, (self, key) => withFiber$1((fiber) => {
4593
4593
  entry.onInterrupt = () => removeEntry(self, key, entry);
4594
4594
  const existing = getImpl(self, key, fiber, false) !== void 0;
4595
4595
  if (!existing) {
4596
- set$3(self.map, key, entry);
4596
+ set$4(self.map, key, entry);
4597
4597
  checkCapacity(self);
4598
4598
  }
4599
4599
  entry.fiber.addObserver((exit) => {
@@ -4610,7 +4610,7 @@ const refresh = /*#__PURE__*/ dual(2, (self, key) => withFiber$1((fiber) => {
4610
4610
  }
4611
4611
  entry.expiresAt = isFinite$1(ttl) ? fiber.getRef(ClockRef).currentTimeMillisUnsafe() + toMillis(ttl) : void 0;
4612
4612
  if (existing) {
4613
- set$3(self.map, key, entry);
4613
+ set$4(self.map, key, entry);
4614
4614
  checkCapacity(self);
4615
4615
  }
4616
4616
  });
@@ -4903,7 +4903,7 @@ var SourceError = class extends (/*#__PURE__*/ TaggedError$1("SourceError")) {};
4903
4903
  * @since 4.0.0
4904
4904
  */
4905
4905
  const ConfigProvider = /*#__PURE__*/ Reference("effect/ConfigProvider", { defaultValue: () => fromEnv() });
4906
- const Proto$3 = {
4906
+ const Proto$4 = {
4907
4907
  ...PipeInspectableProto,
4908
4908
  toJSON() {
4909
4909
  return { _id: "ConfigProvider" };
@@ -4911,7 +4911,7 @@ const Proto$3 = {
4911
4911
  };
4912
4912
  const identityPath = (path) => path;
4913
4913
  function makeProvider(load, mapInput) {
4914
- const self = Object.create(Proto$3);
4914
+ const self = Object.create(Proto$4);
4915
4915
  self.load = load;
4916
4916
  self.mapInput = mapInput;
4917
4917
  return self;
@@ -4969,7 +4969,7 @@ function makeOrElse(first, second) {
4969
4969
  * @category constructors
4970
4970
  * @since 4.0.0
4971
4971
  */
4972
- function make$68(get) {
4972
+ function make$69(get) {
4973
4973
  return makeSource(get, identityPath);
4974
4974
  }
4975
4975
  /**
@@ -5098,7 +5098,7 @@ function emptyStringAsMissing(value, preserveEmptyStrings) {
5098
5098
  function fromEnvRecord(env, options) {
5099
5099
  const preserveEmptyStrings = options?.preserveEmptyStrings === true;
5100
5100
  const trie = buildEnvTrie(env);
5101
- return make$68((path) => succeed(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
5101
+ return make$69((path) => succeed(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
5102
5102
  }
5103
5103
  /**
5104
5104
  * Creates a `ConfigProvider` backed by environment variables.
@@ -5202,7 +5202,7 @@ function trieNodeAt(root, path) {
5202
5202
  * @stability stable
5203
5203
  * @since 4.0.0
5204
5204
  */
5205
- const TypeId$10 = "~effect/Config";
5205
+ const TypeId$11 = "~effect/Config";
5206
5206
  /**
5207
5207
  * Represents the error type produced when config loading or validation fails.
5208
5208
  *
@@ -5238,20 +5238,20 @@ var ConfigError = class {
5238
5238
  return `ConfigError(${this.message})`;
5239
5239
  }
5240
5240
  };
5241
- const Proto$2 = {
5241
+ const Proto$3 = {
5242
5242
  .../*#__PURE__*/ Prototype({
5243
5243
  label: "Config",
5244
5244
  evaluate(fiber) {
5245
5245
  return this.parse(fiber.getRef(ConfigProvider));
5246
5246
  }
5247
5247
  }),
5248
- [TypeId$10]: TypeId$10,
5248
+ [TypeId$11]: TypeId$11,
5249
5249
  toJSON() {
5250
5250
  return { _id: "Config" };
5251
5251
  }
5252
5252
  };
5253
- function make$67(evaluator) {
5254
- const self = Object.create(Proto$2);
5253
+ function make$68(evaluator) {
5254
+ const self = Object.create(Proto$3);
5255
5255
  self.evaluator = evaluator;
5256
5256
  self.parse = (provider) => flatMapEager(evaluator(provider, []), fromResult);
5257
5257
  return self;
@@ -5285,7 +5285,7 @@ const evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, path
5285
5285
  * @since 2.0.0
5286
5286
  */
5287
5287
  const map$3 = /*#__PURE__*/ dual(2, (self, f) => {
5288
- return make$67((provider, pathPrefix) => map$6(evaluateAt(self, provider, pathPrefix), map$5(f)));
5288
+ return make$68((provider, pathPrefix) => map$6(evaluateAt(self, provider, pathPrefix), map$5(f)));
5289
5289
  });
5290
5290
  /**
5291
5291
  * Transforms the parsed value with a function that may fail.
@@ -5314,7 +5314,7 @@ const map$3 = /*#__PURE__*/ dual(2, (self, f) => {
5314
5314
  * @since 2.0.0
5315
5315
  */
5316
5316
  const mapEffect = /*#__PURE__*/ dual(2, (self, f) => {
5317
- return make$67((provider, pathPrefix) => flatMap(evaluateAt(self, provider, pathPrefix), (resolution) => isSuccess$1(resolution) ? mapEager(f(resolution.success), succeed$1) : succeed(fail(resolution.failure))));
5317
+ return make$68((provider, pathPrefix) => flatMap(evaluateAt(self, provider, pathPrefix), (resolution) => isSuccess$1(resolution) ? mapEager(f(resolution.success), succeed$1) : succeed(fail(resolution.failure))));
5318
5318
  });
5319
5319
  /**
5320
5320
  * Provides a fallback config when parsing fails with a `ConfigError`.
@@ -5360,7 +5360,7 @@ const mapEffect = /*#__PURE__*/ dual(2, (self, f) => {
5360
5360
  * @since 2.0.0
5361
5361
  */
5362
5362
  const orElse = /*#__PURE__*/ dual(2, (self, that) => {
5363
- return make$67((provider, pathPrefix) => matchCauseEffect(evaluateAt(self, provider, pathPrefix), {
5363
+ return make$68((provider, pathPrefix) => matchCauseEffect(evaluateAt(self, provider, pathPrefix), {
5364
5364
  onFailure: (cause) => {
5365
5365
  const error = findErrorOption(cause);
5366
5366
  return isSome(error) && cause.reasons.every(isFailReason) ? evaluateAt(that(error.value), provider, pathPrefix) : failCause(cause);
@@ -5413,7 +5413,7 @@ const orElse = /*#__PURE__*/ dual(2, (self, that) => {
5413
5413
  */
5414
5414
  function all$4(arg) {
5415
5415
  const configs = globalThis.Array.isArray(arg) ? arg : Symbol.iterator in arg ? [...arg] : arg;
5416
- return make$67((provider, pathPrefix) => globalThis.Array.isArray(configs) ? mapEager(all$5(configs.map((config) => evaluateAt(config, provider, pathPrefix))), all$6) : mapEager(all$5(map$8(configs, (config) => evaluateAt(config, provider, pathPrefix))), all$6));
5416
+ return make$68((provider, pathPrefix) => globalThis.Array.isArray(configs) ? mapEager(all$5(configs.map((config) => evaluateAt(config, provider, pathPrefix))), all$6) : mapEager(all$5(map$8(configs, (config) => evaluateAt(config, provider, pathPrefix))), all$6));
5417
5417
  }
5418
5418
  /**
5419
5419
  * Provides a fallback value when the config is absent.
@@ -5452,7 +5452,7 @@ function all$4(arg) {
5452
5452
  * @since 2.0.0
5453
5453
  */
5454
5454
  const withDefault = /*#__PURE__*/ dual(2, (self, defaultValue) => {
5455
- return make$67((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure$1(resolution) ? succeed$1(defaultValue) : resolution));
5455
+ return make$68((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure$1(resolution) ? succeed$1(defaultValue) : resolution));
5456
5456
  });
5457
5457
  /**
5458
5458
  * Makes a config optional: returns `Some(value)` on success and `None` when the
@@ -5652,9 +5652,9 @@ const toConfigCursorAST = /*#__PURE__*/ memoize((root) => {
5652
5652
  function schema(codec, path) {
5653
5653
  const codecStringTree = toCodecStringTree(codec);
5654
5654
  const encodedAst = toEncoded(codecStringTree.ast);
5655
- const decodeCursor = decodeUnknownEffect(make$79(toConfigCursorAST(codecStringTree.ast)));
5655
+ const decodeCursor = decodeUnknownEffect(make$80(toConfigCursorAST(codecStringTree.ast)));
5656
5656
  const localPath = typeof path === "string" ? [path] : path ?? [];
5657
- return make$67((provider, pathPrefix) => {
5657
+ return make$68((provider, pathPrefix) => {
5658
5658
  const fullPath = [...pathPrefix, ...localPath];
5659
5659
  return loadCursor(provider, fullPath).pipe(flatMapEager((cursor) => decodeCursor(cursor).pipe(mapEager(succeed$1), catchEager((issue) => {
5660
5660
  const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
@@ -6037,7 +6037,7 @@ function v7Bytes(timestampMillis, bytes = randomBytes()) {
6037
6037
  * @stability unstable
6038
6038
  * @since 4.0.0
6039
6039
  */
6040
- const TypeId$9 = "~effect/Crypto";
6040
+ const TypeId$10 = "~effect/Crypto";
6041
6041
  /**
6042
6042
  * Service tag for platform cryptography.
6043
6043
  *
@@ -6096,7 +6096,7 @@ const Crypto = /*#__PURE__*/ Service("effect/Crypto");
6096
6096
  * @category constructors
6097
6097
  * @since 4.0.0
6098
6098
  */
6099
- const make$66 = (impl) => {
6099
+ const make$67 = (impl) => {
6100
6100
  const randomBytesUnsafe = impl.randomBytes;
6101
6101
  const randomBytes = (size) => map$6(validateSize("randomBytes", size), randomBytesUnsafe);
6102
6102
  const readUint53 = (bytes) => (bytes[0] & 31) * 2 ** 48 + bytes[1] * 2 ** 40 + bytes[2] * 2 ** 32 + bytes[3] * 2 ** 24 + bytes[4] * 2 ** 16 + bytes[5] * 256 + bytes[6];
@@ -6110,7 +6110,7 @@ const make$66 = (impl) => {
6110
6110
  }
6111
6111
  };
6112
6112
  return Crypto.of({
6113
- [TypeId$9]: TypeId$9,
6113
+ [TypeId$10]: TypeId$10,
6114
6114
  randomBytes,
6115
6115
  nextDoubleUnsafe,
6116
6116
  nextIntUnsafe,
@@ -6165,7 +6165,7 @@ const validateSize = (method, size) => Number.isSafeInteger(size) && size >= 0 ?
6165
6165
  * @stability stable
6166
6166
  * @since 2.0.0
6167
6167
  */
6168
- const TypeId$8 = "~effect/FiberSet";
6168
+ const TypeId$9 = "~effect/FiberSet";
6169
6169
  /**
6170
6170
  * Checks whether a value is a FiberSet.
6171
6171
  *
@@ -6188,9 +6188,9 @@ const TypeId$8 = "~effect/FiberSet";
6188
6188
  * @category guards
6189
6189
  * @since 2.0.0
6190
6190
  */
6191
- const isFiberSet = (u) => hasProperty(u, TypeId$8);
6192
- const Proto$1 = {
6193
- [TypeId$8]: TypeId$8,
6191
+ const isFiberSet = (u) => hasProperty(u, TypeId$9);
6192
+ const Proto$2 = {
6193
+ [TypeId$9]: TypeId$9,
6194
6194
  [Symbol.iterator]() {
6195
6195
  if (this.state._tag === "Closed") return empty$4();
6196
6196
  return this.state.backing[Symbol.iterator]();
@@ -6203,8 +6203,8 @@ const Proto$1 = {
6203
6203
  };
6204
6204
  }
6205
6205
  };
6206
- const makeUnsafe$1 = (backing, deferred) => {
6207
- const self = Object.create(Proto$1);
6206
+ const makeUnsafe$2 = (backing, deferred) => {
6207
+ const self = Object.create(Proto$2);
6208
6208
  self.state = {
6209
6209
  _tag: "Open",
6210
6210
  backing
@@ -6248,7 +6248,7 @@ const makeUnsafe$1 = (backing, deferred) => {
6248
6248
  * @category constructors
6249
6249
  * @since 2.0.0
6250
6250
  */
6251
- const make$65 = () => acquireRelease(sync$1(() => makeUnsafe$1(/* @__PURE__ */ new Set(), makeUnsafe$4())), (set) => suspend(() => {
6251
+ const make$66 = () => acquireRelease(sync$1(() => makeUnsafe$2(/* @__PURE__ */ new Set(), makeUnsafe$5())), (set) => suspend(() => {
6252
6252
  const state = set.state;
6253
6253
  if (state._tag === "Closed") return void_$2;
6254
6254
  set.state = { _tag: "Closed" };
@@ -6470,9 +6470,9 @@ const awaitEmpty = (self) => whileLoop({
6470
6470
  });
6471
6471
  // ../../node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/matcher.js
6472
6472
  /** @internal */
6473
- const TypeId$7 = "~effect/Match/Matcher";
6473
+ const TypeId$8 = "~effect/Match/Matcher";
6474
6474
  const TypeMatcherProto = {
6475
- [TypeId$7]: {
6475
+ [TypeId$8]: {
6476
6476
  _input: identity,
6477
6477
  _filters: identity,
6478
6478
  _remaining: identity,
@@ -6495,7 +6495,7 @@ function makeTypeMatcher(select, cases) {
6495
6495
  return matcher;
6496
6496
  }
6497
6497
  const ValueMatcherProto = {
6498
- [TypeId$7]: {
6498
+ [TypeId$8]: {
6499
6499
  _input: identity,
6500
6500
  _filters: identity,
6501
6501
  _result: identity,
@@ -6941,7 +6941,7 @@ const exhaustive = exhaustive$1;
6941
6941
  * @category type IDs
6942
6942
  * @since 4.0.0
6943
6943
  */
6944
- const TypeId$6 = "~effect/reactivity/Reactivity";
6944
+ const TypeId$7 = "~effect/reactivity/Reactivity";
6945
6945
  /**
6946
6946
  * Service key for reactive invalidation.
6947
6947
  *
@@ -6962,7 +6962,7 @@ const Reactivity = /*#__PURE__*/ Service("effect/reactivity/Reactivity");
6962
6962
  * @category constructors
6963
6963
  * @since 4.0.0
6964
6964
  */
6965
- const make$64 = /*#__PURE__*/ sync$1(() => {
6965
+ const make$65 = /*#__PURE__*/ sync$1(() => {
6966
6966
  const handlers = /* @__PURE__ */ new Map();
6967
6967
  const invalidateUnsafe = (keys) => {
6968
6968
  keysToHashes(keys, (hash) => {
@@ -7002,8 +7002,8 @@ const make$64 = /*#__PURE__*/ sync$1(() => {
7002
7002
  };
7003
7003
  const query = (keys, effect) => gen(function* () {
7004
7004
  const services = yield* context();
7005
- const scope = get$6(services, Scope);
7006
- const results = yield* make$86();
7005
+ const scope = get$7(services, Scope);
7006
+ const results = yield* make$87();
7007
7007
  const runFork = flow$2(runForkWith(services), runIn(scope));
7008
7008
  let running = false;
7009
7009
  let pending = false;
@@ -7040,7 +7040,7 @@ const make$64 = /*#__PURE__*/ sync$1(() => {
7040
7040
  })));
7041
7041
  });
7042
7042
  return Reactivity.of({
7043
- [TypeId$6]: TypeId$6,
7043
+ [TypeId$7]: TypeId$7,
7044
7044
  mutation,
7045
7045
  query,
7046
7046
  stream,
@@ -7058,7 +7058,7 @@ var PendingInvalidation = class extends (/*#__PURE__*/ Service()("effect/reactiv
7058
7058
  * @category layers
7059
7059
  * @since 4.0.0
7060
7060
  */
7061
- const layer$67 = /*#__PURE__*/ effect(Reactivity)(make$64);
7061
+ const layer$67 = /*#__PURE__*/ effect(Reactivity)(make$65);
7062
7062
  function stringOrHash(u) {
7063
7063
  switch (typeof u) {
7064
7064
  case "string":
@@ -7093,7 +7093,7 @@ const keysToHashes = (keys, f) => {
7093
7093
  * @stability unstable
7094
7094
  * @since 4.0.0
7095
7095
  */
7096
- const TypeId$5 = "~effect/sql/SqlError";
7096
+ const TypeId$6 = "~effect/sql/SqlError";
7097
7097
  const ReasonTypeId = "~effect/sql/SqlError/Reason";
7098
7098
  const ReasonFields = {
7099
7099
  cause: /*#__PURE__*/ Defect(),
@@ -7419,7 +7419,7 @@ var SqlError = class extends (/*#__PURE__*/ TaggedError("effect/sql/SqlError")("
7419
7419
  * @stability unstable
7420
7420
  * @since 4.0.0
7421
7421
  */
7422
- [TypeId$5] = TypeId$5;
7422
+ [TypeId$6] = TypeId$6;
7423
7423
  /**
7424
7424
  * Exposes the structured SQL reason as the JavaScript error cause.
7425
7425
  *
@@ -7453,7 +7453,7 @@ var SqlError = class extends (/*#__PURE__*/ TaggedError("effect/sql/SqlError")("
7453
7453
  * @category guards
7454
7454
  * @since 4.0.0
7455
7455
  */
7456
- const isSqlError = (u) => hasProperty(u, TypeId$5);
7456
+ const isSqlError = (u) => hasProperty(u, TypeId$6);
7457
7457
  const sqliteCodeFromCause = (cause) => {
7458
7458
  if (!hasProperty(cause, "code")) return;
7459
7459
  const code = cause.code;
@@ -7686,7 +7686,7 @@ const recordUpdateHelperSingle = (value, omit) => Object.assign(Object.create(Re
7686
7686
  * @category constructors
7687
7687
  * @since 4.0.0
7688
7688
  */
7689
- const make$63 = (acquirer, compiler, spanAttributes, transformRows, borrower) => {
7689
+ const make$64 = (acquirer, compiler, spanAttributes, transformRows, borrower) => {
7690
7690
  const cache = transformRows === void 0 ? constructorCache.noTransforms : constructorCache.transforms;
7691
7691
  if (cache.has(acquirer)) return cache.get(acquirer);
7692
7692
  const self = Object.assign(function sql(strings, ...args) {
@@ -7695,7 +7695,7 @@ const make$63 = (acquirer, compiler, spanAttributes, transformRows, borrower) =>
7695
7695
  throw "absurd";
7696
7696
  }, {
7697
7697
  unsafe(sql, params) {
7698
- return makeUnsafe([literal(sql, params)], acquirer, compiler, spanAttributes, transformRows, borrower);
7698
+ return makeUnsafe$1([literal(sql, params)], acquirer, compiler, spanAttributes, transformRows, borrower);
7699
7699
  },
7700
7700
  literal(sql) {
7701
7701
  return fragment$1([literal(sql)]);
@@ -7746,7 +7746,7 @@ const statement = (acquirer, compiler, strings, args, spanAttributes, transformR
7746
7746
  else segments.push(parameter(arg));
7747
7747
  if (strings[i + 1].length > 0) segments.push(literal(strings[i + 1]));
7748
7748
  }
7749
- return makeUnsafe(segments, acquirer, compiler, spanAttributes, transformRows, borrower);
7749
+ return makeUnsafe$1(segments, acquirer, compiler, spanAttributes, transformRows, borrower);
7750
7750
  };
7751
7751
  /**
7752
7752
  * Creates a helper that joins SQL clauses with a literal separator, optionally
@@ -8099,7 +8099,7 @@ const spanAttribute = (spanAttributes, key) => {
8099
8099
  for (let i = spanAttributes.length - 1; i >= 0; i--) if (spanAttributes[i][0] === key) return spanAttributes[i][1];
8100
8100
  };
8101
8101
  const isNonEmptyString = (u) => typeof u === "string" && u.length > 0;
8102
- const makeUnsafe = (segments, acquirer, compiler, spanAttributes, transformRows, borrower) => {
8102
+ const makeUnsafe$1 = (segments, acquirer, compiler, spanAttributes, transformRows, borrower) => {
8103
8103
  const self = Object.create(StatementProto);
8104
8104
  self.segments = segments;
8105
8105
  self.acquirer = acquirer;
@@ -8176,7 +8176,7 @@ const StatementProto = {
8176
8176
  const withStatement = (self, span, f) => withFiber((fiber) => {
8177
8177
  const transform = fiber.getRef(CurrentTransformer);
8178
8178
  if (transform === void 0) return f(self, fiber);
8179
- return flatMap(transform(self, make$63(self.acquirer, self.compiler, self.spanAttributes, self.transformRows, self.borrower), fiber, span), (statement) => f(statement, fiber));
8179
+ return flatMap(transform(self, make$64(self.acquirer, self.compiler, self.spanAttributes, self.transformRows, self.borrower), fiber, span), (statement) => f(statement, fiber));
8180
8180
  });
8181
8181
  const isSegment = (u) => {
8182
8182
  if (!hasProperty(u, "_tag")) return false;
@@ -8242,7 +8242,7 @@ const neverFragment = /*#__PURE__*/ fragment$1([/*#__PURE__*/ literal("1=0")]);
8242
8242
  * @stability unstable
8243
8243
  * @since 4.0.0
8244
8244
  */
8245
- const TypeId$4 = "~effect/sql/SqlClient";
8245
+ const TypeId$5 = "~effect/sql/SqlClient";
8246
8246
  /**
8247
8247
  * Service tag for the active SQL client service.
8248
8248
  *
@@ -8267,7 +8267,7 @@ let transactionSemaphoreIdCounter = 0;
8267
8267
  * @category constructors
8268
8268
  * @since 4.0.0
8269
8269
  */
8270
- const make$62 = /*#__PURE__*/ fnUntraced(function* (options) {
8270
+ const make$63 = /*#__PURE__*/ fnUntraced(function* (options) {
8271
8271
  const transactionService = options.transactionService ?? TransactionConnection(clientIdCounter++);
8272
8272
  const getConnection = flatMap(serviceOption(transactionService), match({
8273
8273
  onNone: () => options.acquirer,
@@ -8284,7 +8284,7 @@ const make$62 = /*#__PURE__*/ fnUntraced(function* (options) {
8284
8284
  const withTransaction = makeWithTransaction({
8285
8285
  transactionService,
8286
8286
  spanAttributes: options.spanAttributes,
8287
- acquireConnection: flatMap(make$76(), (scope) => provide(transactionAcquirer, scope).pipe(onError((cause) => close(scope, failCause$1(cause))), map$6((conn) => [scope, conn]))),
8287
+ acquireConnection: flatMap(make$77(), (scope) => provide(transactionAcquirer, scope).pipe(onError((cause) => close(scope, failCause$1(cause))), map$6((conn) => [scope, conn]))),
8288
8288
  begin: (conn) => control(conn, beginTransaction),
8289
8289
  savepoint: (conn, id) => control(conn, savepoint(`effect_sql_${id}`)),
8290
8290
  releaseSavepoint: releaseSavepoint ? (conn, id) => control(conn, releaseSavepoint(`effect_sql_${id}`)) : void 0,
@@ -8298,15 +8298,15 @@ const make$62 = /*#__PURE__*/ fnUntraced(function* (options) {
8298
8298
  onNone: () => options.borrower(f),
8299
8299
  onSome: ([conn]) => f(conn)
8300
8300
  }));
8301
- const client = Object.assign(make$63(getConnection, options.compiler, options.spanAttributes, options.transformRows, borrower), {
8302
- [TypeId$4]: TypeId$4,
8301
+ const client = Object.assign(make$64(getConnection, options.compiler, options.spanAttributes, options.transformRows, borrower), {
8302
+ [TypeId$5]: TypeId$5,
8303
8303
  safe: void 0,
8304
8304
  withTransaction,
8305
8305
  transactionService,
8306
8306
  reserve: transactionAcquirer,
8307
8307
  withoutTransforms() {
8308
8308
  if (options.transformRows === void 0) return this;
8309
- const statement = make$63(getConnection, options.compiler.withoutTransform, options.spanAttributes, void 0, borrower);
8309
+ const statement = make$64(getConnection, options.compiler.withoutTransform, options.spanAttributes, void 0, borrower);
8310
8310
  const client = Object.assign(statement, {
8311
8311
  ...this,
8312
8312
  ...statement
@@ -8346,7 +8346,7 @@ const makeWithTransaction = (options) => {
8346
8346
  const connOption = getOption$1(services, options.transactionService);
8347
8347
  const conn = connOption._tag === "Some" ? succeed([void 0, connOption.value[0]]) : options.acquireConnection;
8348
8348
  const id = connOption._tag === "Some" ? connOption.value[1] + 1 : 0;
8349
- const transaction = flatMap(conn, ([scope, conn]) => (id === 0 ? options.begin(conn) : options.savepoint(conn, id)).pipe(flatMap(() => onExitPrimitive(provideContext(restore(effect), services.pipe(add$2(options.transactionService, [conn, id]), add$2(transactionSemaphore, makeUnsafe$7(1)), add$2(ParentSpan, span))), (exit) => {
8349
+ const transaction = flatMap(conn, ([scope, conn]) => (id === 0 ? options.begin(conn) : options.savepoint(conn, id)).pipe(flatMap(() => onExitPrimitive(provideContext(restore(effect), services.pipe(add$2(options.transactionService, [conn, id]), add$2(transactionSemaphore, makeUnsafe$8(1)), add$2(ParentSpan, span))), (exit) => {
8350
8350
  let effect;
8351
8351
  if (isSuccess(exit)) {
8352
8352
  if (id === 0) {
@@ -8367,7 +8367,7 @@ const makeWithTransaction = (options) => {
8367
8367
  if (id > 0 && options.releaseSavepoint) effect = andThen(effect, orDie(options.releaseSavepoint(conn, id)));
8368
8368
  return flatMap(effect, () => exit);
8369
8369
  }, true)), scope ? (eff) => onExitPrimitive(eff, (exit) => close(scope, exit), true) : identity));
8370
- return id === 0 ? transaction : getUnsafe(services, transactionSemaphore).withPermit(transaction);
8370
+ return id === 0 ? transaction : getUnsafe$1(services, transactionSemaphore).withPermit(transaction);
8371
8371
  })));
8372
8372
  };
8373
8373
  /**
@@ -8608,6 +8608,177 @@ const batchN = /*#__PURE__*/ dual(2, (self, n) => {
8608
8608
  collectWhile: (requests) => requests.size < size
8609
8609
  });
8610
8610
  });
8611
+ // ../../node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/SynchronizedRef.js
8612
+ /**
8613
+ * Stores mutable state whose updates run one at a time.
8614
+ *
8615
+ * A `SynchronizedRef<A>` behaves like a `Ref<A>` for reading and simple state
8616
+ * storage, but update and modify operations are serialized so each change sees
8617
+ * a consistent current value. This is especially useful when the next value is
8618
+ * computed by an effect, because the effectful transition is still protected
8619
+ * from concurrent updates. This module includes constructors, reads, writes,
8620
+ * updates, partial updates, and effectful update helpers.
8621
+ *
8622
+ * @stability stable
8623
+ * @since 2.0.0
8624
+ */
8625
+ const TypeId$3 = "~effect/SynchronizedRef";
8626
+ const Proto$1 = {
8627
+ ...PipeInspectableProto,
8628
+ [TypeId$3]: TypeId$3,
8629
+ toJSON() {
8630
+ return {
8631
+ _id: "SynchronizedRef",
8632
+ value: this.backing.ref.current
8633
+ };
8634
+ }
8635
+ };
8636
+ /**
8637
+ * Creates a `SynchronizedRef` synchronously from an initial value.
8638
+ *
8639
+ * **When to use**
8640
+ *
8641
+ * Use when you need synchronous `SynchronizedRef` construction outside an
8642
+ * Effect workflow.
8643
+ *
8644
+ * @stability stable
8645
+ * @category constructors
8646
+ * @since 4.0.0
8647
+ */
8648
+ const makeUnsafe = (value) => {
8649
+ const self = Object.create(Proto$1);
8650
+ self.semaphore = makeUnsafe$8(1);
8651
+ self.backing = makeUnsafe$3(value);
8652
+ return self;
8653
+ };
8654
+ /**
8655
+ * Creates a `SynchronizedRef` from an initial value, wrapped in an `Effect`.
8656
+ *
8657
+ * **When to use**
8658
+ *
8659
+ * Use to create a `SynchronizedRef` inside an Effect program when later updates
8660
+ * may run effects and must be serialized.
8661
+ *
8662
+ * **Details**
8663
+ *
8664
+ * The returned effect constructs a fresh `SynchronizedRef` by delegating to
8665
+ * `makeUnsafe` when the effect is evaluated.
8666
+ *
8667
+ * @see {@link makeUnsafe} for synchronous construction when the caller controls safe initialization
8668
+ * @see {@link Ref.make} for a plain `Ref` when updates do not need effectful synchronization
8669
+ *
8670
+ * @stability stable
8671
+ * @category constructors
8672
+ * @since 2.0.0
8673
+ */
8674
+ const make$62 = (value) => sync$1(() => makeUnsafe(value));
8675
+ /**
8676
+ * Reads the current value synchronously, bypassing the `Effect` API and the
8677
+ * ref's semaphore.
8678
+ *
8679
+ * **When to use**
8680
+ *
8681
+ * Use when you need immediate synchronous access to a `SynchronizedRef` value
8682
+ * in low-level code that can safely read outside an `Effect`.
8683
+ *
8684
+ * @see {@link get} for the Effect-wrapped read when composing inside Effect programs
8685
+ *
8686
+ * @stability stable
8687
+ * @category getters
8688
+ * @since 4.0.0
8689
+ */
8690
+ const getUnsafe = (self) => self.backing.ref.current;
8691
+ /**
8692
+ * Returns an `Effect` that reads the current value of the `SynchronizedRef`.
8693
+ *
8694
+ * **When to use**
8695
+ *
8696
+ * Use to read the current value of a `SynchronizedRef` inside an `Effect`
8697
+ * program without changing it.
8698
+ *
8699
+ * @see {@link getUnsafe} for synchronous reads when the caller controls safe access outside `Effect`
8700
+ *
8701
+ * @stability stable
8702
+ * @category getters
8703
+ * @since 2.0.0
8704
+ */
8705
+ const get = (self) => sync$1(() => getUnsafe(self));
8706
+ /**
8707
+ * Computes a return value and a new ref value atomically, stores the new value,
8708
+ * and returns the computed result.
8709
+ *
8710
+ * **When to use**
8711
+ *
8712
+ * Use to derive a separate result and the next stored `SynchronizedRef` value
8713
+ * from the same current value in one serialized pure update.
8714
+ *
8715
+ * @see {@link modifyEffect} for effectfully deriving both the result and next stored value
8716
+ * @see {@link modifySome} for deriving a result and optionally updating the stored value
8717
+ * @see {@link updateAndGet} for returning the new stored value instead of a separate result
8718
+ *
8719
+ * @stability stable
8720
+ * @category mutations
8721
+ * @since 2.0.0
8722
+ */
8723
+ const modify = /*#__PURE__*/ dual(2, (self, f) => self.semaphore.withPermit(modify$1(self.backing, f)));
8724
+ /**
8725
+ * Runs an effectful modification atomically while holding the ref's semaphore,
8726
+ * stores the new value if the effect succeeds, and returns the computed result.
8727
+ *
8728
+ * **When to use**
8729
+ *
8730
+ * Use to effectfully compute both a separate return value and the next stored
8731
+ * `SynchronizedRef` value in one serialized update.
8732
+ *
8733
+ * @see {@link modify} for the pure variant
8734
+ * @see {@link updateEffect} for effectfully storing a new value without a separate result
8735
+ *
8736
+ * @stability stable
8737
+ * @category mutations
8738
+ * @since 2.0.0
8739
+ */
8740
+ const modifyEffect = /*#__PURE__*/ dual(2, (self, f) => self.semaphore.withPermit(suspend(() => {
8741
+ const value = getUnsafe(self);
8742
+ return map$6(f(value), ([b, a]) => {
8743
+ self.backing.ref.current = a;
8744
+ return b;
8745
+ });
8746
+ })));
8747
+ /**
8748
+ * Sets the value of the `SynchronizedRef`, serialized by the ref's semaphore.
8749
+ *
8750
+ * **When to use**
8751
+ *
8752
+ * Use to replace the current value of a `SynchronizedRef` with a known value
8753
+ * while keeping the write serialized with other synchronized updates.
8754
+ *
8755
+ * @see {@link getAndSet} for replacing the value when the previous value is needed
8756
+ * @see {@link setAndGet} for replacing the value when the new value should be returned
8757
+ * @see {@link update} for deriving the next value from the current value
8758
+ *
8759
+ * @stability stable
8760
+ * @category mutations
8761
+ * @since 2.0.0
8762
+ */
8763
+ const set = /*#__PURE__*/ dual(2, (self, value) => self.semaphore.withPermit(set$2(self.backing, value)));
8764
+ /**
8765
+ * Updates the value of the `SynchronizedRef` with a function, serialized by the
8766
+ * ref's semaphore.
8767
+ *
8768
+ * **When to use**
8769
+ *
8770
+ * Use to apply a pure state transition to a `SynchronizedRef` as a serialized
8771
+ * `Effect`.
8772
+ *
8773
+ * @see {@link updateEffect} for effectfully deriving the next value
8774
+ * @see {@link updateAndGet} for returning the new stored value
8775
+ * @see {@link getAndUpdate} for returning the previous stored value
8776
+ *
8777
+ * @stability stable
8778
+ * @category mutations
8779
+ * @since 2.0.0
8780
+ */
8781
+ const update = /*#__PURE__*/ dual(2, (self, f) => self.semaphore.withPermit(update$1(self.backing, f)));
8611
8782
  // ../../node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Stdio.js
8612
8783
  /**
8613
8784
  * Service contract for command-line arguments and standard input, output, and
@@ -8863,7 +9034,7 @@ var RequestInit = class extends (/*#__PURE__*/ Service()("effect/http/FetchHttpC
8863
9034
  * @category layers
8864
9035
  * @since 4.0.0
8865
9036
  */
8866
- const layer$66 = /*#__PURE__*/ layerMergedContext(/*#__PURE__*/ succeed(/* @__PURE__ */ make$70((request, url, signal, fiber) => {
9037
+ const layer$66 = /*#__PURE__*/ layerMergedContext(/*#__PURE__*/ succeed(/* @__PURE__ */ make$71((request, url, signal, fiber) => {
8867
9038
  const fetch = fiber.getRef(Fetch);
8868
9039
  const options = getOrUndefined$1(fiber.context, RequestInit) ?? {};
8869
9040
  let headers = options.headers ? merge$2(fromInput$1(options.headers), request.headers) : request.headers;
@@ -9054,7 +9225,7 @@ const Proto = {
9054
9225
  .../*#__PURE__*/ Prototype({
9055
9226
  label: "Command",
9056
9227
  evaluate(fiber) {
9057
- return getUnsafe(fiber.context, ChildProcessSpawner).spawn(this);
9228
+ return getUnsafe$1(fiber.context, ChildProcessSpawner).spawn(this);
9058
9229
  }
9059
9230
  }),
9060
9231
  [TypeId]: TypeId
@@ -9531,7 +9702,7 @@ const PathDirectoryListings = Reference("@p4code/shared/shell/PathDirectoryListi
9531
9702
  * names instead of every PATH x PATHEXT candidate per command.
9532
9703
  */
9533
9704
  const withPathDirectoryListings = (effect) => gen(function* () {
9534
- const listings = yield* make$69({
9705
+ const listings = yield* make$70({
9535
9706
  capacity: 1024,
9536
9707
  lookup: listPathDirectory,
9537
9708
  requireServicesAt: "lookup"
@@ -9601,10 +9772,10 @@ const resolveCommandPathForPlatform = fn("shell.resolveCommandPathForPlatform")(
9601
9772
  }
9602
9773
  const listings = yield* PathDirectoryListings;
9603
9774
  for (const pathEntry of pathEntries) {
9604
- let listing = listings && (yield* get(listings, pathEntry));
9775
+ let listing = listings && (yield* get$1(listings, pathEntry));
9605
9776
  if (listings && listing?.names && listing.modified !== (yield* directoryMtime(pathEntry))) {
9606
9777
  yield* invalidate(listings, pathEntry);
9607
- listing = yield* get(listings, pathEntry);
9778
+ listing = yield* get$1(listings, pathEntry);
9608
9779
  }
9609
9780
  for (const candidate of commandCandidates) {
9610
9781
  if (listing?.names && !listing.names.has(candidate.toLowerCase())) continue;
@@ -10084,7 +10255,7 @@ const satisfiesSemverRange = function satisfiesSemverRange(rawVersion, range) {
10084
10255
  patch: Number(versionMatch[3] || 0)
10085
10256
  };
10086
10257
  return range.split("||").some((group) => {
10087
- const comparators = group.trim().split(/\s+/).filter(Boolean);
10258
+ const comparators = group.trim().replace(/(\^|>=|>|<=|<|=)\s+(?=v?\d)/g, "$1").split(/\s+/).filter(Boolean);
10088
10259
  if (comparators.length === 0) return false;
10089
10260
  return comparators.every((comparator) => {
10090
10261
  const match = comparator.trim().match(/^(\^|>=|>|<=|<|=)?\s*v?(\d+(?:\.\d+){0,2})$/);
@@ -10102,8 +10273,8 @@ const satisfiesSemverRange = function satisfiesSemverRange(rawVersion, range) {
10102
10273
  switch (match[1] || "=") {
10103
10274
  case "^":
10104
10275
  if (compared < 0) return false;
10105
- if (target.major > 0) return version.major === target.major;
10106
- if (target.minor > 0) return version.major === 0 && version.minor === target.minor;
10276
+ if (target.major > 0 || targetMatch[2] === void 0) return version.major === target.major;
10277
+ if (target.minor > 0 || targetMatch[3] === void 0) return version.major === 0 && version.minor === target.minor;
10107
10278
  return version.major === 0 && version.minor === 0 && version.patch === target.patch;
10108
10279
  case ">=": return compared >= 0;
10109
10280
  case ">": return compared > 0;
@@ -10886,7 +11057,7 @@ const makeAsyncRotatingFileSink = fnUntraced(function* (options) {
10886
11057
  }).pipe(mapError(failure("prune")));
10887
11058
  const readSize = fs.stat(options.filePath).pipe(map$6((stat) => Number(stat.size)), catch_((cause) => cause.reason._tag === "NotFound" ? succeed(0) : fail$1(failure("read")(cause))));
10888
11059
  let currentSize = yield* readSize;
10889
- const semaphore = yield* make$87(1);
11060
+ const semaphore = yield* make$88(1);
10890
11061
  const rotate = gen(function* () {
10891
11062
  yield* fs.remove(`${options.filePath}.${options.maxFiles}`, { force: true });
10892
11063
  for (let index = options.maxFiles - 1; index >= 1; index--) {
@@ -11085,7 +11256,7 @@ const makeTraceSink = fn("makeTraceSink")(function* (options) {
11085
11256
  let bufferBytes = 0;
11086
11257
  const maxBufferBytes = Math.max(options.maxBytes, 4194304);
11087
11258
  const flushRequests = yield* sliding(1);
11088
- const flushSemaphore = yield* make$87(1);
11259
+ const flushSemaphore = yield* make$88(1);
11089
11260
  let writeFailing = false;
11090
11261
  let droppedCount = 0;
11091
11262
  let failureReported = false;
@@ -11262,8 +11433,8 @@ const makeLocalFileTracer = fn("makeLocalFileTracer")(function* (options) {
11262
11433
  batchWindowMs: options.batchWindowMs,
11263
11434
  ...options.onFlush ? { onFlush: options.onFlush } : {}
11264
11435
  }));
11265
- const delegate = options.delegate ?? make$77({ span: (spanOptions) => new NativeSpan(spanOptions) });
11266
- return make$77({
11436
+ const delegate = options.delegate ?? make$78({ span: (spanOptions) => new NativeSpan(spanOptions) });
11437
+ return make$78({
11267
11438
  span(spanOptions) {
11268
11439
  return new LocalFileSpan(spanOptions, delegate.span(spanOptions), sink.push);
11269
11440
  },
@@ -11409,19 +11580,19 @@ const MISSING_TTL$2 = minutes(1);
11409
11580
  var ProviderLatestVersions = class extends Service()("@p4code/provider-core/server/ProviderLatestVersions") {};
11410
11581
  /** Starts from `seed`, for tests that need a cached entry. */
11411
11582
  const make$57 = fn("ProviderLatestVersions.make")(function* (seed = []) {
11412
- const entries = yield* make$71(new Map(Array.from(seed, ([key, version]) => [key, {
11583
+ const entries = yield* make$72(new Map(Array.from(seed, ([key, version]) => [key, {
11413
11584
  version,
11414
11585
  expiresAt: Number.MAX_SAFE_INTEGER
11415
11586
  }])));
11416
11587
  const cached = fn("ProviderLatestVersions.cached")(function* (key, lookup, options) {
11417
11588
  const now$17 = toEpochMillis(yield* now);
11418
- const inFlight = yield* make$78();
11589
+ const inFlight = yield* make$79();
11419
11590
  const pending = {
11420
11591
  version: null,
11421
11592
  expiresAt: 0,
11422
11593
  inFlight
11423
11594
  };
11424
- return yield* acquireUseRelease(modify(entries, (current) => {
11595
+ return yield* acquireUseRelease(modify$1(entries, (current) => {
11425
11596
  const entry = current.get(key);
11426
11597
  return !options?.fresh && entry && (entry.expiresAt > now$17 || entry.inFlight) ? [entry, current] : [void 0, new Map(current).set(key, pending)];
11427
11598
  }), (existing) => gen(function* () {
@@ -11432,7 +11603,7 @@ const make$57 = fn("ProviderLatestVersions.make")(function* (seed = []) {
11432
11603
  }), (existing, exit) => {
11433
11604
  if (existing) return void_$2;
11434
11605
  const version = isSuccess(exit) ? some(exit.value) : none$1();
11435
- return update(entries, (current) => {
11606
+ return update$1(entries, (current) => {
11436
11607
  if (current.get(key) !== pending) return current;
11437
11608
  const next = new Map(current);
11438
11609
  if (isNone(version)) {
@@ -11450,7 +11621,7 @@ const make$57 = fn("ProviderLatestVersions.make")(function* (seed = []) {
11450
11621
  return ProviderLatestVersions.of({
11451
11622
  cached,
11452
11623
  invalidate: fn("ProviderLatestVersions.invalidate")(function(key) {
11453
- return update(entries, (current) => {
11624
+ return update$1(entries, (current) => {
11454
11625
  const next = new Map(current);
11455
11626
  next.delete(key);
11456
11627
  return next;
@@ -11834,12 +12005,12 @@ const resolveProviderMaintenanceCapabilitiesEffect = fn("resolveProviderMaintena
11834
12005
  * cached, so the next read resolves again.
11835
12006
  */
11836
12007
  const makeCachedProviderMaintenanceResolution = fn("makeCachedProviderMaintenanceResolution")(function* (resolve) {
11837
- const cache = yield* make$69({
12008
+ const cache = yield* make$70({
11838
12009
  capacity: 1,
11839
12010
  timeToLive: MAINTENANCE_CAPABILITIES_CACHE_TTL,
11840
12011
  lookup: () => resolve
11841
12012
  });
11842
- const cached = get(cache, void 0);
12013
+ const cached = get$1(cache, void 0);
11843
12014
  return (options) => options?.fresh ? invalidate(cache, void 0).pipe(andThen(cached)) : cached;
11844
12015
  });
11845
12016
  function deriveVersionAdvisory(input) {
@@ -11881,7 +12052,7 @@ function createProviderVersionAdvisory(input) {
11881
12052
  }
11882
12053
  const fetchNpmLatestVersion = fn("fetchNpmLatestVersion")(function* (packageName) {
11883
12054
  const client = yield* HttpClient;
11884
- const request = get$8(`https://registry.npmjs.org/${encodeURIComponent(packageName)}/latest`).pipe(setHeader("accept", "application/json"));
12055
+ const request = get$9(`https://registry.npmjs.org/${encodeURIComponent(packageName)}/latest`).pipe(setHeader("accept", "application/json"));
11885
12056
  const payload = yield* client.execute(request).pipe(flatMap(filterStatusOk$1), flatMap(schemaBodyJson(NpmLatestVersionResponse)), timeoutOption(LATEST_VERSION_TIMEOUT_MS), orElseSucceed(() => none$1()));
11886
12057
  return isSome(payload) ? nonEmptyString$1(payload.value.version) : null;
11887
12058
  });
@@ -12248,7 +12419,7 @@ const runProcessCore = fn("processRunner.runProcessCore")(function* (spawner, in
12248
12419
  })));
12249
12420
  const stdin = input.stdin;
12250
12421
  const onStdoutChunk = input.onStdoutChunk;
12251
- const writeStdin = stdin === void 0 ? void_$2 : run$1(encodeText(make$88(stdin)), child.stdin).pipe(mapError((cause) => new ProcessStdinError({
12422
+ const writeStdin = stdin === void 0 ? void_$2 : run$1(encodeText(make$89(stdin)), child.stdin).pipe(mapError((cause) => new ProcessStdinError({
12252
12423
  command: input.command,
12253
12424
  argumentCount: input.args.length,
12254
12425
  cwd: input.cwd,
@@ -12321,7 +12492,7 @@ const layer$64 = effect(ProcessRunner, make$56());
12321
12492
  const PINNED_RUNTIME_DIR = "runtime";
12322
12493
  const PINNED_RUNTIME_INSTALL_TIMEOUT = minutes(10);
12323
12494
  const PINNED_RUNTIME_ARCHIVE_FILE = "p4-runtime-archive";
12324
- const pinnedRuntimeInstallLock = makeUnsafe$7(1);
12495
+ const pinnedRuntimeInstallLock = makeUnsafe$8(1);
12325
12496
  /** The exact command that runs a pinned runtime. */
12326
12497
  function pinnedRuntimeCommand(paths) {
12327
12498
  return {
@@ -12365,7 +12536,7 @@ var PinnedRuntimePreflightBlockedError = class extends TaggedError()("PinnedRunt
12365
12536
  }
12366
12537
  };
12367
12538
  const fetchReleaseAsset = fn("cloud.pinned_runtime.fetch_release_asset")(function* (httpClient, url, step, onProgress) {
12368
- return yield* httpClient.execute(get$8(url)).pipe(flatMap(filterStatusOk$1), flatMap(fn(function* (response) {
12539
+ return yield* httpClient.execute(get$9(url)).pipe(flatMap(filterStatusOk$1), flatMap(fn(function* (response) {
12369
12540
  if (onProgress === void 0) return new Uint8Array(yield* response.arrayBuffer);
12370
12541
  const length = Number(response.headers["content-length"]);
12371
12542
  const total = Number.isFinite(length) && length > 0 ? length : void 0;
@@ -12911,7 +13082,7 @@ const makeReader = fnUntraced(function* (options) {
12911
13082
  const request = (input) => withFiber((fiber) => {
12912
13083
  const endsTransaction = endsReadTransaction(input.sql);
12913
13084
  if (stoppedMessage !== void 0) return endsTransaction ? succeed([]) : fail$1(failed(new Error(stoppedMessage), readerFailureMessages.execute, "execute"));
12914
- const safeIntegers = Boolean(get$6(fiber.context, SafeIntegers));
13085
+ const safeIntegers = Boolean(get$7(fiber.context, SafeIntegers));
12915
13086
  return callback((resume) => {
12916
13087
  const id = nextRequestId++;
12917
13088
  pending.set(id, {
@@ -13142,10 +13313,10 @@ const make$55 = fn("makeWithDatabase")(function* (options) {
13142
13313
  capacity: options.prepareCacheSize ?? 200,
13143
13314
  timeToLive: (exit) => isSuccess(exit) ? options.prepareCacheTTL ?? minutes(10) : zero
13144
13315
  });
13145
- const statementFor = (sql, params) => hasLargeBinding(params) ? prepare(sql) : get(prepareCache, sql);
13316
+ const statementFor = (sql, params) => hasLargeBinding(params) ? prepare(sql) : get$1(prepareCache, sql);
13146
13317
  const runStatement = (statement, params, raw) => withFiber((fiber) => {
13147
13318
  try {
13148
- statement.setReadBigInts(Boolean(get$6(fiber.context, SafeIntegers)));
13319
+ statement.setReadBigInts(Boolean(get$7(fiber.context, SafeIntegers)));
13149
13320
  if (hasRows(statement)) {
13150
13321
  const rows = statement.all(...params);
13151
13322
  checkpoint?.();
@@ -13161,7 +13332,7 @@ const make$55 = fn("makeWithDatabase")(function* (options) {
13161
13332
  const run = (sql, params, raw = false) => flatMap(statementFor(sql, params), (s) => runStatement(s, params, raw));
13162
13333
  const runStatementValues = (statement, params) => acquireUseRelease(succeed(statement), (statement) => try_({
13163
13334
  try: () => {
13164
- statement.setReadBigInts(Boolean(get$6(getCurrent().context, SafeIntegers)));
13335
+ statement.setReadBigInts(Boolean(get$7(getCurrent().context, SafeIntegers)));
13165
13336
  if (hasRows(statement)) {
13166
13337
  statement.setReturnArrays(true);
13167
13338
  const rows = statement.all(...params);
@@ -13202,16 +13373,16 @@ const make$55 = fn("makeWithDatabase")(function* (options) {
13202
13373
  }
13203
13374
  });
13204
13375
  });
13205
- const semaphore = yield* make$87(1);
13376
+ const semaphore = yield* make$88(1);
13206
13377
  const connection = yield* makeConnection;
13207
13378
  const acquireReader = options.readerWorker && isFileDatabase ? yield* makeReader(options) : void 0;
13208
- const readerSemaphore = yield* make$87(1);
13379
+ const readerSemaphore = yield* make$88(1);
13209
13380
  const writer = {
13210
13381
  name: "writer",
13211
13382
  lock: semaphore,
13212
13383
  connection
13213
13384
  };
13214
- const route = withFiber((fiber) => acquireReader !== void 0 && get$6(fiber.context, ReadOnly) ? map$6(acquireReader, (readerConnection) => readerConnection === void 0 ? writer : {
13385
+ const route = withFiber((fiber) => acquireReader !== void 0 && get$7(fiber.context, ReadOnly) ? map$6(acquireReader, (readerConnection) => readerConnection === void 0 ? writer : {
13215
13386
  name: "reader",
13216
13387
  lock: readerSemaphore,
13217
13388
  connection: readerConnection
@@ -13231,7 +13402,7 @@ const make$55 = fn("makeWithDatabase")(function* (options) {
13231
13402
  }));
13232
13403
  const transactionAcquirer = flatMap(route, (target) => uninterruptibleMask((restore) => {
13233
13404
  const fiber = getCurrent();
13234
- const scope = getUnsafe(fiber.context, Scope);
13405
+ const scope = getUnsafe$1(fiber.context, Scope);
13235
13406
  const clock = fiber.getRef(Clock);
13236
13407
  const start = clock.monotonicTimeNanosUnsafe();
13237
13408
  return as(tap$1(restore(target.lock.take(1)), () => {
@@ -13240,7 +13411,7 @@ const make$55 = fn("makeWithDatabase")(function* (options) {
13240
13411
  return addFinalizer(scope, target.lock.release(1));
13241
13412
  }), target.connection);
13242
13413
  }));
13243
- const client = yield* make$62({
13414
+ const client = yield* make$63({
13244
13415
  acquirer,
13245
13416
  compiler,
13246
13417
  transactionAcquirer,
@@ -13338,8 +13509,8 @@ function serializedSize(value) {
13338
13509
  const makeLiveStreamBudget = fn("makeLiveStreamBudget")(function* (limits) {
13339
13510
  const maxItems = limits?.maxItems ?? 1e3;
13340
13511
  const maxSerializedBytes = limits?.maxSerializedBytes ?? LIVE_STREAM_MAX_SERIALIZED_BYTES;
13341
- const failed = yield* make$78();
13342
- const cleanupComplete = yield* make$78();
13512
+ const failed = yield* make$79();
13513
+ const cleanupComplete = yield* make$79();
13343
13514
  let failure;
13344
13515
  const retained = /* @__PURE__ */ new Set();
13345
13516
  let retainedSerializedBytes = 0;
@@ -14127,9 +14298,14 @@ function getChangeRequestTerminologyForKind(kind) {
14127
14298
  };
14128
14299
  }
14129
14300
  const SCP_SSH_REMOTE_PATTERN = /^[a-zA-Z0-9._-]+@([^:/]+):/;
14301
+ const USERLESS_SCP_SSH_REMOTE_PATTERN = /^([^@:/\\\s]{2,}):(?!:)\/?[^/\s]+(?:\/[^/\s]+)+\/?$/u;
14302
+ /** Null unless the remote is `host:path`, with no user. */
14303
+ function userlessScpRemoteHost(remoteUrl) {
14304
+ return USERLESS_SCP_SSH_REMOTE_PATTERN.exec(remoteUrl.trim())?.[1] ?? null;
14305
+ }
14130
14306
  function isSshRemoteUrl(remoteUrl) {
14131
14307
  const trimmed = remoteUrl.trim();
14132
- return SCP_SSH_REMOTE_PATTERN.test(trimmed) || trimmed.toLowerCase().startsWith("ssh://");
14308
+ return SCP_SSH_REMOTE_PATTERN.test(trimmed) || trimmed.toLowerCase().startsWith("ssh://") || userlessScpRemoteHost(trimmed) !== null;
14133
14309
  }
14134
14310
  /**
14135
14311
  * Extracts the normalized host used for provider detection. SCP-style and SSH remotes return the
@@ -14138,8 +14314,8 @@ function isSshRemoteUrl(remoteUrl) {
14138
14314
  function parseRemoteHost(remoteUrl) {
14139
14315
  const trimmed = remoteUrl.trim();
14140
14316
  if (trimmed.length === 0) return null;
14141
- const scpMatch = SCP_SSH_REMOTE_PATTERN.exec(trimmed);
14142
- if (scpMatch?.[1]) return scpMatch[1].toLowerCase();
14317
+ const scpHost = SCP_SSH_REMOTE_PATTERN.exec(trimmed)?.[1] ?? userlessScpRemoteHost(trimmed);
14318
+ if (scpHost) return scpHost.toLowerCase();
14143
14319
  try {
14144
14320
  const url = new URL(trimmed);
14145
14321
  return (url.protocol === "ssh:" ? url.hostname : url.host).toLowerCase();
@@ -16199,6 +16375,18 @@ const P4_MCP_TOOL_NAMES = new Set(Object.keys(P4_MCP_TOOLS));
16199
16375
  function normalizeP4McpToolLabel(value) {
16200
16376
  return value.replace(/\s+(?:complete|completed)\s*$/i, "").trim();
16201
16377
  }
16378
+ const toolNameCache = /* @__PURE__ */ new Map();
16379
+ const TOOL_NAME_CACHE_LIMIT = 1e4;
16380
+ const TOOL_NAME_CACHE_MAX_KEY_LENGTH = 256;
16381
+ function resolveP4McpToolName(value) {
16382
+ if (value.length > TOOL_NAME_CACHE_MAX_KEY_LENGTH) return parseP4McpToolName(value);
16383
+ const cached = toolNameCache.get(value);
16384
+ if (cached !== void 0) return cached;
16385
+ const name = parseP4McpToolName(value);
16386
+ if (toolNameCache.size >= TOOL_NAME_CACHE_LIMIT) toolNameCache.clear();
16387
+ toolNameCache.set(value, name);
16388
+ return name;
16389
+ }
16202
16390
  /**
16203
16391
  * ACP agents disagree on how the injected P4 server prefixes its tools:
16204
16392
  * `mcp__p4-code__x` (Claude/Cursor), `p4-code.x` (Codex), plus single
@@ -16206,7 +16394,7 @@ function normalizeP4McpToolLabel(value) {
16206
16394
  * agents. The prefix match is deliberately loose because the display-name
16207
16395
  * inventory is the real gate; unknown tools stay on the generic renderer.
16208
16396
  */
16209
- function resolveP4McpToolName(value) {
16397
+ function parseP4McpToolName(value) {
16210
16398
  const label = normalizeP4McpToolLabel(value);
16211
16399
  const mcpMatch = /^mcp__(?<server>.+?)__(?<tool>.+)$/i.exec(label);
16212
16400
  if (mcpMatch?.groups) {
@@ -16390,6 +16578,17 @@ function htmlRenderFromToolItem(item) {
16390
16578
  const output = compactDynamicToolOutput(item.output);
16391
16579
  return output?.isError ? void 0 : output?.htmlRender;
16392
16580
  }
16581
+ /** The thread-owned file `preview_recording_stop` stored for the agent. */
16582
+ function previewRecordingIdFromToolItem(item) {
16583
+ if (resolveP4McpToolId(item.toolName) !== "preview_recording_stop") return void 0;
16584
+ const budget = {
16585
+ remainingBytes: MAX_PARSED_BYTES,
16586
+ remainingNodes: MAX_ENVELOPE_NODES,
16587
+ exceeded: false
16588
+ };
16589
+ const result = readResult(item.output, budget);
16590
+ return result.failed || budget.exceeded ? void 0 : boundedId(result.data?.id);
16591
+ }
16393
16592
  /**
16394
16593
  * The MCP App a completed tool call carries, if any. The adapter that captured
16395
16594
  * it put the reference in the output, beside the tool's own result. A tool's
@@ -16453,6 +16652,13 @@ function toolOutputImageBlocks(value) {
16453
16652
  function toolOutputImages(value) {
16454
16653
  return toolOutputImageBlocks(value).flatMap((block) => readToolOutputImage(block) ?? []);
16455
16654
  }
16655
+ function mcpToolResultOutput(result) {
16656
+ if (result.structuredContent != null && toolOutputImages(result.content).length > 0) return {
16657
+ content: result.content,
16658
+ structuredContent: result.structuredContent
16659
+ };
16660
+ return result.structuredContent ?? result.content;
16661
+ }
16456
16662
  /**
16457
16663
  * Replaces each image's bytes with `{ type: "image", mimeType }` and keeps its
16458
16664
  * position, so detail reads stay small and clients load the bytes as assets.
@@ -16729,9 +16935,11 @@ function formatProviderSkillDisplayName(skill) {
16729
16935
  }
16730
16936
  const SKILL_TOKEN_REGEX = /(^|\s)\p{Sc}(?![0-9][0-9_]*(?:[kKmMbBtT]|[eE][0-9]+)?(?:\s|$))(?=[a-zA-Z0-9:_-]*[a-zA-Z])([a-zA-Z0-9][a-zA-Z0-9:_-]*)(?=\s|$)/gu;
16731
16937
  function* matchInlineSkills(text, skills) {
16938
+ const byName = /* @__PURE__ */ new Map();
16732
16939
  for (const match of text.matchAll(SKILL_TOKEN_REGEX)) {
16733
16940
  const name = match[2] ?? "";
16734
- const skill = skills.find((candidate) => candidate.name === name);
16941
+ if (!byName.has(name)) byName.set(name, skills.find((candidate) => candidate.name === name));
16942
+ const skill = byName.get(name);
16735
16943
  if (!skill) continue;
16736
16944
  yield {
16737
16945
  start: match.index + (match[1]?.length ?? 0),
@@ -31805,8 +32013,8 @@ function fileLinkLabel(file, parentSuffixByPath) {
31805
32013
  }
31806
32014
  // ../../packages/shared/src/markdownLinks.ts
31807
32015
  const RELATIVE_PATH_PREFIX_PATTERN = /^(~\/|\.{1,2}\/)/;
31808
- const RELATIVE_FILE_PATH_PATTERN = /^(?:[\p{L}\p{M}\p{N}._-]+(?: +[\p{L}\p{M}\p{N}._-]+)*\/)+(?:[\p{L}\p{M}\p{N}._-]+(?: +[\p{L}\p{M}\p{N}._-]+)*(?::\d+){0,2})?$/u;
31809
- const RELATIVE_FILE_NAME_PATTERN = /^[\p{L}\p{M}\p{N}._-]+(?: +[\p{L}\p{M}\p{N}._-]+)*\.[\p{L}\p{M}\p{N}_-]+(?::\d+){0,2}$/u;
32016
+ const RELATIVE_FILE_PATH_PATTERN = /^(?:[\p{L}\p{M}\p{N}._$+@()[\]-]+(?: +[\p{L}\p{M}\p{N}._$+@()[\]-]+)*\/)+(?:[\p{L}\p{M}\p{N}._$+@()[\]-]+(?: +[\p{L}\p{M}\p{N}._$+@()[\]-]+)*(?::\d+){0,2})?$/u;
32017
+ const RELATIVE_FILE_NAME_PATTERN = /^[\p{L}\p{M}\p{N}._$+()[\]-]+(?: +[\p{L}\p{M}\p{N}._$+()[\]-]+)*\.[\p{L}\p{M}\p{N}_-]+(?::\d+){0,2}$/u;
31810
32018
  const EXTERNAL_SCHEME_PATTERN = /^([A-Za-z][A-Za-z0-9+.-]*):(.*)$/;
31811
32019
  const POSITION_SUFFIX_PATTERN = /:\d+(?::\d+)?$/;
31812
32020
  const POSITION_ONLY_PATTERN = /^\d+(?::\d+)?$/;
@@ -51462,12 +51670,13 @@ function searchableMessageSegments(message, cwd, skills = []) {
51462
51670
  return markdownThreadFindText(message.text || (message.streaming ? "" : "(empty response)"), false, cwd, skills, shouldPreserveAssistantLineBreaks(message.text));
51463
51671
  }
51464
51672
  // ../../packages/shared/src/threadSearch.ts
51673
+ const foldCharacters = (text) => text.replace(/ς/g, "σ").replace(/[‘’]/g, "'");
51465
51674
  function foldThreadSearchCase(text) {
51466
- const lowered = text.toLowerCase().replace(/ς/g, "σ");
51675
+ const lowered = foldCharacters(text.toLowerCase());
51467
51676
  if (lowered.length === text.length) return lowered;
51468
51677
  let folded = "";
51469
51678
  for (const character of text) {
51470
- const loweredCharacter = character.toLowerCase().replace(/ς/g, "σ");
51679
+ const loweredCharacter = foldCharacters(character.toLowerCase());
51471
51680
  folded += loweredCharacter.length === character.length ? loweredCharacter : character;
51472
51681
  }
51473
51682
  return folded;
@@ -51647,12 +51856,12 @@ const makeThreadFind = fn("makeThreadFind")(function* (readIndex) {
51647
51856
  });
51648
51857
  });
51649
51858
  });
51650
- const textCache = yield* make$69({
51859
+ const textCache = yield* make$70({
51651
51860
  capacity: 512,
51652
51861
  timeToLive: "1 minute",
51653
51862
  lookup: (key) => sync$1(() => parseText(key))
51654
51863
  });
51655
- const largeTextCache = yield* make$69({
51864
+ const largeTextCache = yield* make$70({
51656
51865
  capacity: 32,
51657
51866
  timeToLive: "1 minute",
51658
51867
  lookup: (key) => sync$1(() => parseText(key))
@@ -51748,7 +51957,7 @@ const makeThreadFind = fn("makeThreadFind")(function* (readIndex) {
51748
51957
  if (cached) return cached;
51749
51958
  const decoded = yield* decode(row);
51750
51959
  const key = textKey(decoded.item, cwd, input.skills ?? []);
51751
- const document = documentFor(decoded, countSegments(yield* get(key.text.length <= 32768 ? textCache : largeTextCache, key), input.query));
51960
+ const document = documentFor(decoded, countSegments(yield* get$1(key.text.length <= 32768 ? textCache : largeTextCache, key), input.query));
51752
51961
  documents.set(row.position, document);
51753
51962
  yield* yieldNow;
51754
51963
  return document;
@@ -51876,7 +52085,9 @@ function isOrchestrationV2SupersededInterrupt(input) {
51876
52085
  }
51877
52086
  /** Index once when reconciling a whole timeline after run/attempt state changes. */
51878
52087
  function createOrchestrationV2TurnItemVisibility(input) {
51879
- const statuses = new Map(input.runs.map((run) => [run.id, run.status]));
52088
+ const statuses = /* @__PURE__ */ new Map();
52089
+ for (const run of input.runs) if (run.status === "rolled_back" || run.status === "cancelled") statuses.set(run.id, run.status);
52090
+ else statuses.delete(run.id);
51880
52091
  const supersededRoots = /* @__PURE__ */ new Map();
51881
52092
  for (const attempt of input.attempts) {
51882
52093
  if (attempt.status !== "superseded") continue;
@@ -51884,7 +52095,11 @@ function createOrchestrationV2TurnItemVisibility(input) {
51884
52095
  if (roots === void 0) supersededRoots.set(attempt.runId, roots = /* @__PURE__ */ new Set());
51885
52096
  roots.add(attempt.rootNodeId);
51886
52097
  }
51887
- const interruptRuns = new Set(input.items.filter((item) => item.type === "run_interrupt_request").map((item) => item.runId));
52098
+ if (statuses.size === 0 && supersededRoots.size === 0) return () => true;
52099
+ const interruptRuns = /* @__PURE__ */ new Set();
52100
+ if (supersededRoots.size > 0) {
52101
+ for (const item of input.items) if (item.type === "run_interrupt_request") interruptRuns.add(item.runId);
52102
+ }
51888
52103
  return (item) => {
51889
52104
  const status = item.runId === null ? void 0 : statuses.get(item.runId);
51890
52105
  if (status === "rolled_back") return false;
@@ -52154,7 +52369,6 @@ function inferImageExtension(input) {
52154
52369
  }
52155
52370
  // src/attachmentStore.ts
52156
52371
  const ATTACHMENT_FILENAME_EXTENSIONS = [...SAFE_IMAGE_FILE_EXTENSIONS, ".bin"];
52157
- const ATTACHMENT_ID_THREAD_SEGMENT_MAX_CHARS = 80;
52158
52372
  const ATTACHMENT_ID_THREAD_SEGMENT_PATTERN = "[a-z0-9_]+(?:-[a-z0-9_]+)*";
52159
52373
  const ATTACHMENT_ID_UUID_PATTERN = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
52160
52374
  const ATTACHMENT_ID_FILE_EXTENSION_PATTERN = "[a-z0-9]{1,10}";
@@ -52163,7 +52377,7 @@ const PENDING_ATTACHMENT_THREAD_SEGMENT = "pending";
52163
52377
  const PENDING_ATTACHMENT_MAX_AGE_MS = 864e5;
52164
52378
  const PARTIAL_UPLOAD_MAX_AGE_MS = 36e5;
52165
52379
  function toSafeThreadAttachmentSegment(threadId) {
52166
- const segment = threadId.trim().toLowerCase().replace(/[^a-z0-9_-]+/gi, "-").replace(/-+/g, "-").replace(/^[-_]+|[-_]+$/g, "").slice(0, ATTACHMENT_ID_THREAD_SEGMENT_MAX_CHARS).replace(/[-_]+$/g, "");
52380
+ const segment = threadId.trim().toLowerCase().replace(/[^a-z0-9_-]+/gi, "-").replace(/-+/g, "-").replace(/^[-_]+|[-_]+$/g, "").slice(0, 80).replace(/[-_]+$/g, "");
52167
52381
  if (segment.length === 0) return null;
52168
52382
  return segment === "pending" ? "_pending" : segment;
52169
52383
  }
@@ -52226,7 +52440,7 @@ function threadHtmlRenderAttachmentIds(threadId, items) {
52226
52440
  const segment = toSafeThreadAttachmentSegment(threadId);
52227
52441
  if (segment === null) return [];
52228
52442
  return Array.from(items).flatMap((item) => {
52229
- const attachmentId = htmlRenderFromToolItem(item)?.attachmentId ?? mcpAppFromToolItem(item)?.attachmentId;
52443
+ const attachmentId = htmlRenderFromToolItem(item)?.attachmentId ?? mcpAppFromToolItem(item)?.attachmentId ?? previewRecordingIdFromToolItem(item);
52230
52444
  return attachmentId !== void 0 && parseThreadSegmentFromAttachmentId(attachmentId) === segment ? [attachmentId] : [];
52231
52445
  });
52232
52446
  }
@@ -52685,7 +52899,7 @@ function buildBoundedThreadProjection(input) {
52685
52899
  turnItems: [],
52686
52900
  visibleTurnItems: []
52687
52901
  });
52688
- const windowBudget = Math.max(0, policy.maxEncodedBytes - dependencyReserve - controlBytes - 1024);
52902
+ const windowBudget = Math.max(Math.max(policy.maxEncodedBytes / 2 - dependencyReserve, 0), policy.maxEncodedBytes - dependencyReserve - controlBytes - 1024);
52689
52903
  const windowPolicy = {
52690
52904
  maxUserTurns: policy.maxUserTurns,
52691
52905
  maxItems: policy.maxItems,
@@ -53141,6 +53355,21 @@ const encodeCheckpointScopePayload = encodeEffect(fromJsonString(OrchestrationV2
53141
53355
  const encodeCheckpointPayload = encodeEffect(fromJsonString(OrchestrationV2CheckpointJson));
53142
53356
  const encodeContextHandoffPayload = encodeEffect(fromJsonString(OrchestrationV2ContextHandoffJson));
53143
53357
  const encodeContextTransferPayload = encodeEffect(fromJsonString(OrchestrationV2ContextTransferJson));
53358
+ const PullRequestThread = OrchestrationV2AppThreadJson.mapFields(({ id, projectId, lineage, creationSource, branch, worktreePath, archivedAt, settledOverride, settledAt, linkedPullRequest, branchPullRequest, pullRequests }) => ({
53359
+ id,
53360
+ projectId,
53361
+ lineage,
53362
+ creationSource,
53363
+ branch,
53364
+ worktreePath,
53365
+ archivedAt,
53366
+ settledOverride,
53367
+ settledAt,
53368
+ linkedPullRequest,
53369
+ branchPullRequest,
53370
+ pullRequests
53371
+ }));
53372
+ const decodePullRequestThread = decodeUnknownEffect$1(fromJsonString(PullRequestThread));
53144
53373
  const decodeThreadPayload = decodeUnknownEffect$1(fromJsonString(OrchestrationV2AppThreadJson));
53145
53374
  const decodeRunPayload = decodeUnknownEffect$1(fromJsonString(OrchestrationV2RunJson));
53146
53375
  const decodeRunAttemptPayload = decodeUnknownEffect$1(fromJsonString(OrchestrationV2RunAttemptJson));
@@ -53393,6 +53622,7 @@ function threadShellFromProjection(projection) {
53393
53622
  ...projection.thread.historyOrigin === void 0 ? {} : { historyOrigin: projection.thread.historyOrigin },
53394
53623
  ...projection.thread.linkOrigin === void 0 ? {} : { linkOrigin: projection.thread.linkOrigin },
53395
53624
  ...projection.thread.delegatedFrom === void 0 ? {} : { delegatedFrom: projection.thread.delegatedFrom },
53625
+ ...projection.thread.launchedByThreadId === void 0 ? {} : { launchedByThreadId: projection.thread.launchedByThreadId },
53396
53626
  latestRunId: latestRun?.id ?? null,
53397
53627
  latestRunRequestedAt: latestRun?.requestedAt ?? null,
53398
53628
  latestRunStartedAt: latestRun?.startedAt ?? null,
@@ -53533,6 +53763,7 @@ function shellFromState(input) {
53533
53763
  ...input.state.thread.historyOrigin === void 0 ? {} : { historyOrigin: input.state.thread.historyOrigin },
53534
53764
  ...input.state.thread.linkOrigin === void 0 ? {} : { linkOrigin: input.state.thread.linkOrigin },
53535
53765
  ...input.state.thread.delegatedFrom === void 0 ? {} : { delegatedFrom: input.state.thread.delegatedFrom },
53766
+ ...input.state.thread.launchedByThreadId === void 0 ? {} : { launchedByThreadId: input.state.thread.launchedByThreadId },
53536
53767
  latestRunId: input.state.latestRunId,
53537
53768
  latestRunRequestedAt: input.state.latestRunRequestedAt,
53538
53769
  latestRunStartedAt: input.state.latestRunStartedAt,
@@ -54648,21 +54879,6 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
54648
54879
  )
54649
54880
  AND request.type = 'run_interrupt_request'
54650
54881
  UNION
54651
- -- An open question or approval stays in the window: clients
54652
- -- build the answer panel from its row, and a run that kept
54653
- -- working pushes the row out of the newest turns.
54654
- SELECT question.rowid AS item_rowid, question.ordinal, question.turn_item_id
54655
- FROM orchestration_v2_projection_runtime_requests AS pending
54656
- JOIN orchestration_v2_projection_turn_items AS question
54657
- ON question.node_id = pending.node_id
54658
- WHERE pending.thread_id = ${threadId}
54659
- AND pending.status = 'pending'
54660
- AND question.thread_id = ${threadId}
54661
- AND question.type IN ('user_input_request', 'approval_request')
54662
- AND ${window.rowLimit} > 0
54663
- AND ${window.anchorItemId ?? null} IS NULL
54664
- AND ${window.requiredRunId ?? null} IS NULL
54665
- UNION
54666
54882
  SELECT latest.item_rowid, latest.ordinal, latest.turn_item_id
54667
54883
  FROM (
54668
54884
  SELECT rowid AS item_rowid, ordinal, turn_item_id
@@ -54774,6 +54990,7 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
54774
54990
  OR (${filter.includeLatestRun === true ? 1 : 0} = 1 AND run_id = (
54775
54991
  SELECT run_id FROM orchestration_v2_projection_runs
54776
54992
  WHERE thread_id = ${threadId}
54993
+ AND (status <> 'cancelled' OR json_extract(payload_json, '$.startedAt') IS NOT NULL)
54777
54994
  ORDER BY ordinal DESC
54778
54995
  LIMIT 1
54779
54996
  )))`}
@@ -55246,7 +55463,7 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
55246
55463
  lastErrorClass: summary.lastErrorClass,
55247
55464
  usageLimitResetAt: summary.usageLimitResetAt,
55248
55465
  latestRunId: RunId.make(row.run_id),
55249
- latestRunCompletedAt: row.completed_at === null ? null : makeUnsafe$5(row.completed_at),
55466
+ latestRunCompletedAt: row.completed_at === null ? null : makeUnsafe$6(row.completed_at),
55250
55467
  updatedAt: thread.updatedAt,
55251
55468
  archivedAt: thread.archivedAt,
55252
55469
  settledOverride: thread.settledOverride,
@@ -55281,6 +55498,7 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
55281
55498
  json_extract(child.payload_json, '$.lineage.relationshipToParent') = 'subagent'
55282
55499
  AND json_extract(child.payload_json, '$.lineage.parentThreadId') IS NOT NULL
55283
55500
  AND json_extract(child.payload_json, '$.forkedFrom.type') = 'node'
55501
+ ELSE 0 END
55284
55502
  AND (EXISTS (
55285
55503
  SELECT 1 FROM orchestration_v2_projection_runs AS requested
55286
55504
  JOIN orchestration_v2_projection_subagents AS task
@@ -55303,7 +55521,6 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
55303
55521
  AND target_thread_id = json_extract(child.payload_json, '$.lineage.parentThreadId')
55304
55522
  AND type = 'subagent_result'
55305
55523
  )))
55306
- ELSE 0 END
55307
55524
  `;
55308
55525
  case "runtime": return sql`
55309
55526
  WITH pending_provider_threads AS MATERIALIZED (
@@ -55643,7 +55860,10 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
55643
55860
  threadId,
55644
55861
  cause
55645
55862
  })));
55646
- const getThreadProjection = (threadId) => readProjection(threadId, /* @__PURE__ */ new Set());
55863
+ const getThreadProjection = (threadId) => sql.withTransaction(readProjection(threadId, /* @__PURE__ */ new Set())).pipe(mapError((cause) => isProjectionStoreThreadNotFoundError(cause) || isProjectionStoreReadError(cause) ? cause : new ProjectionStoreReadError({
55864
+ threadId,
55865
+ cause
55866
+ })));
55647
55867
  const getRuntimeRecoveryProjection = (threadId) => gen(function* () {
55648
55868
  const threadRows = yield* sql`
55649
55869
  SELECT payload_json FROM orchestration_v2_projection_threads
@@ -55864,13 +56084,12 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
55864
56084
  ORDER BY created_at ASC, runtime_request_id ASC
55865
56085
  `,
55866
56086
  sql`
55867
- SELECT message.payload_json FROM orchestration_v2_projection_messages AS message
55868
- WHERE message.thread_id = ${threadId} AND message.streaming = 1
55869
- AND message.run_id IN (
55870
- SELECT run_id FROM orchestration_v2_projection_runs
55871
- WHERE thread_id = ${threadId}
55872
- AND status IN ('queued', 'preparing', 'starting', 'running', 'waiting')
55873
- )
56087
+ SELECT message.payload_json FROM orchestration_v2_projection_runs AS run
56088
+ CROSS JOIN orchestration_v2_projection_messages AS message
56089
+ INDEXED BY orchestration_v2_projection_messages_run_idx ON message.run_id = run.run_id
56090
+ WHERE run.thread_id = ${threadId}
56091
+ AND run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')
56092
+ AND message.thread_id = ${threadId} AND message.streaming = 1
55874
56093
  ORDER BY message.created_at ASC, message.message_id ASC
55875
56094
  `,
55876
56095
  sql`
@@ -56232,7 +56451,8 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
56232
56451
  FROM orchestration_v2_projection_turn_items
56233
56452
  WHERE thread_id = ${threadId}
56234
56453
  AND type = 'dynamic_tool'
56235
- AND (payload_json LIKE '%htmlRender%' OR payload_json LIKE ${`%${MCP_APP_OUTPUT_KEY}%`})
56454
+ AND (payload_json LIKE '%htmlRender%' OR payload_json LIKE ${`%${MCP_APP_OUTPUT_KEY}%`}
56455
+ OR payload_json LIKE '%preview_recording_stop%')
56236
56456
  `,
56237
56457
  sql`
56238
56458
  SELECT DISTINCT json_extract(attachment.value, '$.id') AS id
@@ -56256,6 +56476,18 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
56256
56476
  threadId,
56257
56477
  cause
56258
56478
  })));
56479
+ const getMessagesById = fn("ProjectionStore.getMessagesById")(function* (threadId, messageIds) {
56480
+ if (messageIds.length === 0) return /* @__PURE__ */ new Map();
56481
+ const rows = yield* sql`
56482
+ SELECT message.payload_json
56483
+ FROM json_each(${encodeIdList([...new Set(messageIds)])}) AS requested
56484
+ CROSS JOIN orchestration_v2_projection_messages AS message
56485
+ ON message.message_id = requested.value
56486
+ WHERE message.thread_id = ${threadId}
56487
+ `;
56488
+ const messages = yield* decodeRows(decodeMessagePayload, threadId)(rows);
56489
+ return new Map(messages.map((message) => [message.id, message]));
56490
+ }, (effect, threadId) => effect.pipe(mapError(controlReadError(threadId))));
56259
56491
  const getThreadRecords = (threadId, fields, filter) => sql.withTransaction(readCanonicalProjection(threadId, void 0, fields, filter)).pipe(map$6((projection) => Object.fromEntries([["thread", projection.thread], ...fields.map((field) => [field, projection[field]])])), mapError(controlReadError(threadId)));
56260
56492
  const getThreadSnapshot = (threadId) => sql.withTransaction(gen(function* () {
56261
56493
  const projection = yield* getThreadProjection(threadId);
@@ -56526,6 +56758,21 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
56526
56758
  ...historyAnchor?.threadId === threadId ? { anchorItemId: historyAnchor.itemId } : {},
56527
56759
  ...historyAnchor === void 0 ? {} : { historyAnchor }
56528
56760
  });
56761
+ const retainedIds = new Set(projection.turnItems.map((item) => item.id));
56762
+ const pendingCards = (yield* decodeRows(decodeTurnItemPayload, threadId)(yield* sql`
56763
+ SELECT item.payload_json
56764
+ FROM orchestration_v2_projection_runtime_requests AS request
56765
+ CROSS JOIN orchestration_v2_projection_turn_items AS item
56766
+ ON item.node_id = request.node_id
56767
+ AND item.type IN ('approval_request', 'user_input_request')
56768
+ AND json_extract(item.payload_json, '$.requestId') = request.runtime_request_id
56769
+ WHERE request.thread_id = ${threadId} AND request.status = 'pending'
56770
+ AND item.thread_id = ${threadId}
56771
+ `)).filter((item) => !retainedIds.has(item.id));
56772
+ const windowProjection = pendingCards.length === 0 ? projection : {
56773
+ ...projection,
56774
+ turnItems: [...projection.turnItems, ...pendingCards].toSorted((left, right) => left.ordinal - right.ordinal || left.id.localeCompare(right.id))
56775
+ };
56529
56776
  return {
56530
56777
  schemaVersion: 2,
56531
56778
  snapshotSequence: (yield* sql`
@@ -56535,7 +56782,7 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
56535
56782
  AND aggregate_kind = 'thread'
56536
56783
  AND stream_id = ${threadId}
56537
56784
  `)[0]?.snapshot_sequence ?? 0,
56538
- projection
56785
+ projection: windowProjection
56539
56786
  };
56540
56787
  })).pipe(mapError((cause) => isProjectionStoreThreadNotFoundError(cause) || isProjectionStoreReadError(cause) ? cause : new ProjectionStoreReadError({
56541
56788
  threadId,
@@ -56875,24 +57122,24 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
56875
57122
  const shellThreadStateFromRow = (input) => gen(function* () {
56876
57123
  const { row, runOrdinalsByThreadId, itemCountsByThreadId, providerThreadsByThreadId, pendingTurnItemsByThreadId } = input;
56877
57124
  const thread = yield* decodeThreadPayload(row.payload_json);
56878
- const latestUserAuthoredMessageAt = row.latest_user_authored_message_at === null ? null : makeUnsafe$5(row.latest_user_authored_message_at);
57125
+ const latestUserAuthoredMessageAt = row.latest_user_authored_message_at === null ? null : makeUnsafe$6(row.latest_user_authored_message_at);
56879
57126
  const waitingCards = [row.pending_secret_request_payload_json === null ? null : yield* decodeTurnItemPayload(row.pending_secret_request_payload_json), row.pending_link_request_payload_json === null ? null : yield* decodeTurnItemPayload(row.pending_link_request_payload_json)].filter((item) => item !== null).filter((item) => item.type !== "link_request" || linkCardStillAsks(item, latestUserAuthoredMessageAt));
56880
57127
  const pendingRuntimeRequest = row.pending_request_payload_json !== null ? yield* decodeRuntimeRequestPayload(row.pending_request_payload_json) : secretRequestAsPendingInput(waitingCards.toSorted((left, right) => toEpochMillis(right.updatedAt) - toEpochMillis(left.updatedAt))[0] ?? null);
56881
57128
  let terminalFailureItem = row.terminal_failure_payload_json === null ? null : yield* decodeTurnItemPayload(row.terminal_failure_payload_json);
56882
57129
  let latestRunId = row.latest_run_id === null ? null : RunId.make(row.latest_run_id);
56883
57130
  let latestRunStatus = shellStatusFromStoredRunStatus(row.latest_run_status);
56884
- let latestRunRequestedAt = row.latest_run_requested_at === null ? null : makeUnsafe$5(row.latest_run_requested_at);
56885
- let latestRunStartedAt = row.latest_run_started_at === null ? null : makeUnsafe$5(row.latest_run_started_at);
56886
- let latestRunCompletedAt = row.latest_run_completed_at === null ? null : makeUnsafe$5(row.latest_run_completed_at);
57131
+ let latestRunRequestedAt = row.latest_run_requested_at === null ? null : makeUnsafe$6(row.latest_run_requested_at);
57132
+ let latestRunStartedAt = row.latest_run_started_at === null ? null : makeUnsafe$6(row.latest_run_started_at);
57133
+ let latestRunCompletedAt = row.latest_run_completed_at === null ? null : makeUnsafe$6(row.latest_run_completed_at);
56887
57134
  if (row.blocking_run_id !== null && row.blocking_failure_payload_json !== null) {
56888
57135
  const blockingFailure = yield* decodeTurnItemPayload(row.blocking_failure_payload_json).pipe(orElseSucceed(() => null));
56889
57136
  if (threadErrorSummary(blockingFailure?.type === "error" ? blockingFailure.failure : null, row.last_error).lastErrorClass === "usage_limit" && blockingFailure !== null) {
56890
57137
  terminalFailureItem = blockingFailure;
56891
57138
  latestRunId = RunId.make(row.blocking_run_id);
56892
57139
  latestRunStatus = "failed";
56893
- latestRunRequestedAt = row.blocking_run_requested_at === null ? null : makeUnsafe$5(row.blocking_run_requested_at);
56894
- latestRunStartedAt = row.blocking_run_started_at === null ? null : makeUnsafe$5(row.blocking_run_started_at);
56895
- latestRunCompletedAt = row.blocking_run_completed_at === null ? null : makeUnsafe$5(row.blocking_run_completed_at);
57140
+ latestRunRequestedAt = row.blocking_run_requested_at === null ? null : makeUnsafe$6(row.blocking_run_requested_at);
57141
+ latestRunStartedAt = row.blocking_run_started_at === null ? null : makeUnsafe$6(row.blocking_run_started_at);
57142
+ latestRunCompletedAt = row.blocking_run_completed_at === null ? null : makeUnsafe$6(row.blocking_run_completed_at);
56896
57143
  }
56897
57144
  }
56898
57145
  const pendingBackgroundTasks = [...derivePendingBackgroundWork({
@@ -56915,11 +57162,11 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
56915
57162
  latestRunStartedAt,
56916
57163
  latestRunCompletedAt,
56917
57164
  activeRunId: row.active_run_id === null ? null : RunId.make(row.active_run_id),
56918
- activityRunStartedAt: row.activity_run_started_at === null ? null : makeUnsafe$5(row.activity_run_started_at),
57165
+ activityRunStartedAt: row.activity_run_started_at === null ? null : makeUnsafe$6(row.activity_run_started_at),
56919
57166
  activityRunStatus: row.activity_run_status === "preparing" || row.activity_run_status === "starting" || row.activity_run_status === "running" || row.activity_run_status === "waiting" ? row.activity_run_status : null,
56920
57167
  ...threadErrorSummary(terminalFailureItem?.type === "error" ? terminalFailureItem.failure : null, row.last_error),
56921
57168
  pendingRuntimeRequest,
56922
- latestUserMessageAt: row.latest_user_message_at === null ? null : makeUnsafe$5(row.latest_user_message_at),
57169
+ latestUserMessageAt: row.latest_user_message_at === null ? null : makeUnsafe$6(row.latest_user_message_at),
56923
57170
  latestUserAuthoredMessageAt,
56924
57171
  hasActionableProposedPlan: row.has_actionable_proposed_plan === 1,
56925
57172
  pendingBackgroundTasks,
@@ -57010,6 +57257,30 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
57010
57257
  };
57011
57258
  }).pipe(mapError(shellSnapshotReadError));
57012
57259
  const readShellSnapshot = (options) => readShellSnapshotRows(options).pipe(mapError(shellSnapshotReadError), map$6(decodeShellSnapshot));
57260
+ const getPullRequestSnapshot = fn("ProjectionStore.getPullRequestSnapshot")(function* ({ threadId, unsettledOnly = false }) {
57261
+ const { rows, sequenceRows } = yield* sql.withTransaction(gen(function* () {
57262
+ return {
57263
+ rows: yield* sql`
57264
+ SELECT t.payload_json FROM orchestration_v2_projection_threads t
57265
+ WHERE t.deleted_at IS NULL${threadId === void 0 ? sql` AND json_extract(t.payload_json, '$.archivedAt') IS NULL` : sql` AND t.thread_id = ${threadId}`}${unsettledOnly ? sql` AND json_extract(t.payload_json, '$.settledAt') IS NULL
57266
+ AND json_extract(t.payload_json, '$.settledOverride') IS NOT 'settled'` : sql``}
57267
+ ORDER BY t.updated_at ASC, t.thread_id ASC
57268
+ `,
57269
+ sequenceRows: yield* sql`
57270
+ SELECT MAX(sequence) AS snapshot_sequence FROM orchestration_events
57271
+ WHERE application_event_version = 2 AND aggregate_kind = 'thread'
57272
+ `
57273
+ };
57274
+ }));
57275
+ const threads = yield* forEach(rows, (row) => decodePullRequestThread(row.payload_json).pipe(map$6((thread) => ({
57276
+ ...thread,
57277
+ pullRequests: threadPullRequestsOf(thread)
57278
+ }))));
57279
+ return {
57280
+ snapshotSequence: sequenceRows[0]?.snapshot_sequence ?? 0,
57281
+ threads
57282
+ };
57283
+ }, mapError(shellSnapshotReadError));
57013
57284
  const getShellSnapshot = (options) => sql.withTransaction(readShellSnapshotRows(options)).pipe(mapError(shellSnapshotReadError), flatMap(decodeShellSnapshot));
57014
57285
  const getThreadShell = (threadId) => sql.withTransaction(gen(function* () {
57015
57286
  const rowsByThreadId = /* @__PURE__ */ new Map();
@@ -57063,13 +57334,14 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
57063
57334
  return {
57064
57335
  apply,
57065
57336
  getShellSnapshot,
57337
+ getPullRequestSnapshot,
57066
57338
  readShellSnapshot,
57067
57339
  getThreadShell,
57068
57340
  getThread,
57069
57341
  getThreadsWithPullRequests,
57070
57342
  getThreadWorktreePaths,
57071
57343
  getOpenRemoteDelegatedTasks,
57072
- getThreadProjection,
57344
+ getThreadProjection: (threadId) => getThreadProjection(threadId).pipe(readOnly),
57073
57345
  getTurnStartContext,
57074
57346
  getTurnStartHistory,
57075
57347
  getRuntimeRecoveryProjection,
@@ -57087,6 +57359,7 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
57087
57359
  listAppOwnedChildThreadIds,
57088
57360
  getNextTurnItemOrdinal,
57089
57361
  getTurnItem,
57362
+ getMessagesById: (threadId, messageIds) => getMessagesById(threadId, messageIds).pipe(readOnly),
57090
57363
  getThreadRecords,
57091
57364
  getRuntimeRequest,
57092
57365
  getPlan,
@@ -57104,11 +57377,11 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
57104
57377
  };
57105
57378
  }));
57106
57379
  effect(ProjectionStoreV2, gen(function* () {
57107
- const replayState = yield* make$71(makeProjectionReplayState());
57108
- const sequence = yield* make$71(0);
57380
+ const replayState = yield* make$72(makeProjectionReplayState());
57381
+ const sequence = yield* make$72(0);
57109
57382
  const service = {
57110
57383
  apply: (event) => gen(function* () {
57111
- const result = yield* modify(replayState, (existing) => {
57384
+ const result = yield* modify$1(replayState, (existing) => {
57112
57385
  const next = {
57113
57386
  projections: new Map(existing.projections),
57114
57387
  providerSessionThreadIds: new Map(existing.providerSessionThreadIds),
@@ -57118,10 +57391,10 @@ effect(ProjectionStoreV2, gen(function* () {
57118
57391
  return [void 0, next];
57119
57392
  });
57120
57393
  if (result) return yield* result;
57121
- yield* update(sequence, (current) => current + 1);
57394
+ yield* update$1(sequence, (current) => current + 1);
57122
57395
  }),
57123
57396
  getShellSnapshot: (options) => gen(function* () {
57124
- const selectedThreadIds = [...(yield* get$2(replayState)).projections.entries()].filter(([, projection]) => {
57397
+ const selectedThreadIds = [...(yield* get$3(replayState)).projections.entries()].filter(([, projection]) => {
57125
57398
  if (options?.projectId !== void 0 && projection.thread.projectId !== options.projectId) return false;
57126
57399
  if (options?.location === "active") return projection.thread.archivedAt === null;
57127
57400
  if (options?.location === "archive") return projection.thread.archivedAt !== null;
@@ -57130,28 +57403,35 @@ effect(ProjectionStoreV2, gen(function* () {
57130
57403
  const visible = (yield* forEach(selectedThreadIds.toSorted((left, right) => String(left).localeCompare(String(right))), (threadId) => service.getThreadProjection(threadId).pipe(map$6(threadShellFromProjection)))).filter((thread) => thread.deletedAt === null);
57131
57404
  return {
57132
57405
  schemaVersion: 2,
57133
- snapshotSequence: yield* get$2(sequence),
57406
+ snapshotSequence: yield* get$3(sequence),
57134
57407
  threads: visible.filter((thread) => thread.archivedAt === null),
57135
57408
  archivedThreads: visible.filter((thread) => thread.archivedAt !== null)
57136
57409
  };
57137
57410
  }),
57411
+ getPullRequestSnapshot: ({ threadId, unsettledOnly = false }) => gen(function* () {
57412
+ const threads = threadId === void 0 ? (yield* service.getShellSnapshot({ location: "active" })).threads : [yield* service.getThreadShell(threadId)].flatMap((thread) => thread === null ? [] : [thread]);
57413
+ return {
57414
+ snapshotSequence: yield* get$3(sequence),
57415
+ threads: threads.filter((thread) => !unsettledOnly || thread.settledAt == null && thread.settledOverride !== "settled")
57416
+ };
57417
+ }),
57138
57418
  readShellSnapshot: (options) => service.getShellSnapshot(options).pipe(map$6(succeed)),
57139
57419
  getThreadShell: (threadId) => gen(function* () {
57140
- if (!(yield* get$2(replayState)).projections.has(threadId)) return null;
57420
+ if (!(yield* get$3(replayState)).projections.has(threadId)) return null;
57141
57421
  const shell = yield* service.getThreadProjection(threadId).pipe(map$6(threadShellFromProjection));
57142
57422
  return shell.deletedAt === null ? shell : null;
57143
57423
  }),
57144
57424
  getThread: (threadId) => gen(function* () {
57145
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57425
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57146
57426
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57147
57427
  return projection.thread;
57148
57428
  }),
57149
- getThreadWorktreePaths: () => get$2(replayState).pipe(map$6((state) => [...state.projections.values()].flatMap(({ thread }) => thread.deletedAt === null && thread.archivedAt === null && thread.worktreePath !== null ? [{
57429
+ getThreadWorktreePaths: () => get$3(replayState).pipe(map$6((state) => [...state.projections.values()].flatMap(({ thread }) => thread.deletedAt === null && thread.archivedAt === null && thread.worktreePath !== null ? [{
57150
57430
  threadId: thread.id,
57151
57431
  worktreePath: thread.worktreePath
57152
57432
  }] : []))),
57153
57433
  getOpenRemoteDelegatedTasks: succeed([]),
57154
- getThreadsWithPullRequests: (threadId) => get$2(replayState).pipe(map$6((state) => [...state.projections.values()].map(({ thread }) => thread).filter((thread) => (threadId === void 0 || thread.id === threadId) && thread.deletedAt === null && thread.archivedAt === null && (thread.pullRequests ?? []).length > 0).toSorted((left, right) => toEpochMillis(left.updatedAt) - toEpochMillis(right.updatedAt) || left.id.localeCompare(right.id)).map((thread) => ({
57434
+ getThreadsWithPullRequests: (threadId) => get$3(replayState).pipe(map$6((state) => [...state.projections.values()].map(({ thread }) => thread).filter((thread) => (threadId === void 0 || thread.id === threadId) && thread.deletedAt === null && thread.archivedAt === null && (thread.pullRequests ?? []).length > 0).toSorted((left, right) => toEpochMillis(left.updatedAt) - toEpochMillis(right.updatedAt) || left.id.localeCompare(right.id)).map((thread) => ({
57155
57435
  id: thread.id,
57156
57436
  projectId: thread.projectId,
57157
57437
  lineage: thread.lineage,
@@ -57159,7 +57439,7 @@ effect(ProjectionStoreV2, gen(function* () {
57159
57439
  settledAt: thread.settledAt,
57160
57440
  pullRequests: thread.pullRequests ?? []
57161
57441
  })))),
57162
- getLimitRecoveryCandidates: (options) => get$2(replayState).pipe(map$6((state) => [...state.projections.values()].filter(({ thread }) => thread.deletedAt === null && thread.archivedAt === null).map(threadShellFromProjection).filter((thread) => thread.status === "failed" && thread.lastErrorClass === "usage_limit" && thread.usageLimitResetAt !== null && thread.pendingRuntimeRequest === null).filter((thread) => {
57442
+ getLimitRecoveryCandidates: (options) => get$3(replayState).pipe(map$6((state) => [...state.projections.values()].filter(({ thread }) => thread.deletedAt === null && thread.archivedAt === null).map(threadShellFromProjection).filter((thread) => thread.status === "failed" && thread.lastErrorClass === "usage_limit" && thread.usageLimitResetAt !== null && thread.pendingRuntimeRequest === null).filter((thread) => {
57163
57443
  const resetMs = Date.parse(thread.usageLimitResetAt);
57164
57444
  const nowMs = toEpochMillis(options.now);
57165
57445
  if (!Number.isFinite(resetMs) || resetMs <= toEpochMillis(thread.latestRunCompletedAt ?? thread.updatedAt)) return false;
@@ -57167,12 +57447,12 @@ effect(ProjectionStoreV2, gen(function* () {
57167
57447
  return thread.limitRecovery.autoResume && resetMs <= nowMs && (thread.snoozedUntil == null || toEpochMillis(thread.snoozedUntil) <= nowMs);
57168
57448
  }).toSorted((left, right) => left.id.localeCompare(right.id)))),
57169
57449
  getRecoveryThreadIds: (kind) => gen(function* () {
57170
- const projections = (yield* get$2(replayState)).projections;
57450
+ const projections = (yield* get$3(replayState)).projections;
57171
57451
  return [...projections.values()].filter((projection) => needsRecovery(projection, kind, projection.thread.lineage.parentThreadId === null ? void 0 : projections.get(projection.thread.lineage.parentThreadId))).toSorted((left, right) => toEpochMillis(left.thread.updatedAt) - toEpochMillis(right.thread.updatedAt) || left.thread.id.localeCompare(right.thread.id)).map((projection) => projection.thread.id);
57172
57452
  }),
57173
57453
  getUnreadableThreadIds: () => succeed([]),
57174
57454
  getPendingNativeUserInputs: (threadId, providerTurnId) => gen(function* () {
57175
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57455
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57176
57456
  if (projection === void 0) return {
57177
57457
  runtimeRequests: [],
57178
57458
  nodes: [],
@@ -57188,29 +57468,33 @@ effect(ProjectionStoreV2, gen(function* () {
57188
57468
  };
57189
57469
  }),
57190
57470
  getPlan: (threadId, planId) => gen(function* () {
57191
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57471
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57192
57472
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57193
57473
  return projection.plans.find((plan) => plan.id === planId);
57194
57474
  }),
57195
57475
  hasUnpairedRunInterruptRequest: (threadId, requestId, resultId) => gen(function* () {
57196
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57476
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57197
57477
  return projection !== void 0 && projection.turnItems.some((item) => item.id === requestId) && !projection.turnItems.some((item) => item.id === resultId);
57198
57478
  }),
57199
- isNodeStored: (node) => get$2(replayState).pipe(map$6((state) => {
57479
+ isNodeStored: (node) => get$3(replayState).pipe(map$6((state) => {
57200
57480
  const stored = state.projections.get(node.threadId)?.nodes.find((candidate) => candidate.id === node.id);
57201
57481
  return stored !== void 0 && equals(stored, node);
57202
57482
  })),
57203
- getMessageCount: (threadId) => get$2(replayState).pipe(map$6((state) => state.projections.get(threadId)?.messages.length ?? 0)),
57204
- listAppOwnedChildThreadIds: (threadId) => get$2(replayState).pipe(map$6((state) => [...new Set((state.projections.get(threadId)?.subagents ?? []).flatMap((task) => task.origin === "app_owned" && task.childThreadId !== null ? [task.childThreadId] : []))])),
57205
- getNextTurnItemOrdinal: (threadId) => get$2(replayState).pipe(map$6((state) => (state.projections.get(threadId)?.turnItems.reduce((max, item) => Math.max(max, item.ordinal), 0) ?? 0) + 1)),
57206
- getTurnItem: ({ threadId, itemId }) => get$2(replayState).pipe(map$6((state) => state.projections.get(threadId)?.turnItems.find((item) => item.id === itemId) ?? null)),
57483
+ getMessageCount: (threadId) => get$3(replayState).pipe(map$6((state) => state.projections.get(threadId)?.messages.length ?? 0)),
57484
+ listAppOwnedChildThreadIds: (threadId) => get$3(replayState).pipe(map$6((state) => [...new Set((state.projections.get(threadId)?.subagents ?? []).flatMap((task) => task.origin === "app_owned" && task.childThreadId !== null ? [task.childThreadId] : []))])),
57485
+ getNextTurnItemOrdinal: (threadId) => get$3(replayState).pipe(map$6((state) => (state.projections.get(threadId)?.turnItems.reduce((max, item) => Math.max(max, item.ordinal), 0) ?? 0) + 1)),
57486
+ getTurnItem: ({ threadId, itemId }) => get$3(replayState).pipe(map$6((state) => state.projections.get(threadId)?.turnItems.find((item) => item.id === itemId) ?? null)),
57487
+ getMessagesById: (threadId, messageIds) => get$3(replayState).pipe(map$6((state) => {
57488
+ const requested = new Set(messageIds);
57489
+ return new Map((state.projections.get(threadId)?.messages ?? []).filter((message) => requested.has(message.id)).map((message) => [message.id, message]));
57490
+ })),
57207
57491
  getThreadAttachmentIds: (threadId) => service.getThreadProjection(threadId).pipe(map$6((projection) => [.../* @__PURE__ */ new Set([
57208
57492
  ...projection.messages.flatMap((message) => message.attachments.map((attachment) => attachment.id)),
57209
57493
  ...projection.turnItems.flatMap((item) => item.type === "user_input_request" ? Object.values(item.questionAnswer?.attachmentsByQuestionId ?? {}).flatMap((attachments) => attachments.map((attachment) => attachment.id)) : []),
57210
57494
  ...threadHtmlRenderAttachmentIds(threadId, projection.turnItems.flatMap((item) => item.type === "dynamic_tool" ? [item] : []))
57211
57495
  ])])),
57212
57496
  getThreadRecords: (threadId, fields, filter) => gen(function* () {
57213
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57497
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57214
57498
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57215
57499
  const selected = {
57216
57500
  ...projection,
@@ -57223,12 +57507,12 @@ effect(ProjectionStoreV2, gen(function* () {
57223
57507
  return Object.fromEntries([["thread", projection.thread], ...fields.map((field) => [field, selected[field]])]);
57224
57508
  }),
57225
57509
  getRuntimeRequest: (threadId, requestId) => gen(function* () {
57226
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57510
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57227
57511
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57228
57512
  return projection.runtimeRequests.find((request) => request.id === requestId);
57229
57513
  }),
57230
57514
  getProviderControlContext: (threadId, target) => gen(function* () {
57231
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57515
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57232
57516
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57233
57517
  const providerTurn = projection.providerTurns.find((turn) => turn.id === target.providerTurnId);
57234
57518
  return {
@@ -57240,7 +57524,7 @@ effect(ProjectionStoreV2, gen(function* () {
57240
57524
  };
57241
57525
  }),
57242
57526
  getRunningTurnContext: (threadId) => gen(function* () {
57243
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57527
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57244
57528
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57245
57529
  const run = projection.runs.find((run) => run.status === "running");
57246
57530
  return {
@@ -57250,7 +57534,7 @@ effect(ProjectionStoreV2, gen(function* () {
57250
57534
  };
57251
57535
  }),
57252
57536
  getThreadProviderContext: (threadId, targetInstanceId) => gen(function* () {
57253
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57537
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57254
57538
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57255
57539
  const target = projection.providerThreads.filter((thread) => thread.appThreadId === threadId && thread.ownerNodeId === null && thread.providerInstanceId === targetInstanceId).toSorted((a, b) => toEpochMillis(b.updatedAt) - toEpochMillis(a.updatedAt) || a.id.localeCompare(b.id))[0];
57256
57540
  return {
@@ -57260,7 +57544,7 @@ effect(ProjectionStoreV2, gen(function* () {
57260
57544
  };
57261
57545
  }),
57262
57546
  getRuntimeResponseContext: (threadId, requestId) => gen(function* () {
57263
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57547
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57264
57548
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57265
57549
  const request = projection.runtimeRequests.find((request) => request.id === requestId);
57266
57550
  return {
@@ -57271,7 +57555,7 @@ effect(ProjectionStoreV2, gen(function* () {
57271
57555
  };
57272
57556
  }),
57273
57557
  getCheckpointContext: (threadId) => gen(function* () {
57274
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57558
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57275
57559
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57276
57560
  return {
57277
57561
  runs: projection.runs.map(({ id, ordinal, status }) => ({
@@ -57295,7 +57579,7 @@ effect(ProjectionStoreV2, gen(function* () {
57295
57579
  };
57296
57580
  }),
57297
57581
  getCheckpointCaptureContext: (threadId, target) => gen(function* () {
57298
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57582
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57299
57583
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57300
57584
  const run = projection.runs.find((candidate) => candidate.id === target.runId);
57301
57585
  return {
@@ -57307,18 +57591,18 @@ effect(ProjectionStoreV2, gen(function* () {
57307
57591
  };
57308
57592
  }),
57309
57593
  getRunMessage: (threadId, runId) => gen(function* () {
57310
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57594
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57311
57595
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57312
57596
  const run = projection.runs.find((candidate) => candidate.id === runId);
57313
57597
  return projection.messages.find((message) => message.id === run?.userMessageId);
57314
57598
  }),
57315
57599
  canStartQueuedRun: (threadId) => gen(function* () {
57316
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57600
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57317
57601
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57318
57602
  return projection.thread.archivedAt === null && projection.thread.deletedAt === null && projection.runs.some((run) => run.status === "queued" && run.queueHeld !== true) && !projection.runs.some((run) => run.status === "preparing" || run.status === "starting" || run.status === "running" || run.status === "waiting");
57319
57603
  }),
57320
57604
  getThreadProjection: (threadId) => gen(function* () {
57321
- const { projections: existing, providerThreadInstanceIds } = yield* get$2(replayState);
57605
+ const { projections: existing, providerThreadInstanceIds } = yield* get$3(replayState);
57322
57606
  const readProjection = (targetThreadId, seenThreadIds) => {
57323
57607
  const projection = existing.get(targetThreadId);
57324
57608
  if (!projection) return null;
@@ -57361,7 +57645,7 @@ effect(ProjectionStoreV2, gen(function* () {
57361
57645
  "proposed_plan"
57362
57646
  ].includes(item.type) && (runIds === void 0 || item.runId !== null && runIds.includes(item.runId))))),
57363
57647
  getRuntimeRecoveryProjection: (threadId) => service.getThreadProjection(threadId),
57364
- getThreadSnapshot: (threadId) => service.getThreadProjection(threadId).pipe(flatMap((projection) => get$2(sequence).pipe(map$6((snapshotSequence) => ({
57648
+ getThreadSnapshot: (threadId) => service.getThreadProjection(threadId).pipe(flatMap((projection) => get$3(sequence).pipe(map$6((snapshotSequence) => ({
57365
57649
  schemaVersion: 2,
57366
57650
  snapshotSequence,
57367
57651
  projection
@@ -58319,8 +58603,8 @@ function normalizeServerBackgroundActivitySettings(settings) {
58319
58603
  });
58320
58604
  }
58321
58605
  // ../../packages/shared/src/serverSettings.ts
58322
- const ServerSettingsJson$1 = fromLenientJson(ServerSettings);
58323
- const decodeServerSettingsJson = decodeUnknownOption(ServerSettingsJson$1);
58606
+ const ServerObservabilitySettingsJson = fromLenientJson(Struct({ observability: ServerSettings.fields.observability }));
58607
+ const decodeServerObservabilitySettingsJson = decodeUnknownOption(ServerObservabilitySettingsJson);
58324
58608
  function isModelSelectionProviderEnabled(settings, selection) {
58325
58609
  const instanceConfig = settings.providerInstances[selection.instanceId];
58326
58610
  if (instanceConfig !== void 0) return resolveProviderInstanceEnabled(instanceConfig);
@@ -58402,7 +58686,7 @@ function extractPersistedServerObservabilitySettings(input) {
58402
58686
  };
58403
58687
  }
58404
58688
  function parsePersistedServerObservabilitySettings(raw) {
58405
- const decoded = decodeServerSettingsJson(raw);
58689
+ const decoded = decodeServerObservabilitySettingsJson(raw);
58406
58690
  if (isSome(decoded)) return extractPersistedServerObservabilitySettings(decoded.value);
58407
58691
  return {
58408
58692
  otlpTracesUrl: void 0,
@@ -58430,6 +58714,7 @@ function mergeSettingsEntries(current, patch) {
58430
58714
  else next.set(id, config);
58431
58715
  return Object.fromEntries(next);
58432
58716
  }
58717
+ const byHost = (tokens) => Object.fromEntries(Object.entries(isObject(tokens) ? tokens : {}).map(([host, token]) => [host.trim().toLowerCase(), token]));
58433
58718
  const knownProjectOverrideKeys = new Set(Object.keys(ProjectSettingsOverrides.fields));
58434
58719
  function pickOverrideKeys(entry, known) {
58435
58720
  return Object.fromEntries(Object.entries(entry ?? {}).filter(([key]) => knownProjectOverrideKeys.has(key) === known));
@@ -58616,10 +58901,17 @@ function applyServerSettingsPatch(current, rawPatch) {
58616
58901
  ...patch.worktreesDirectory !== void 0 && patch.worktreesDirectory !== current.worktreesDirectory ? { previousWorktreesDirectories: [...current.previousWorktreesDirectories.filter((directory) => directory !== patch.worktreesDirectory), ...current.worktreesDirectory !== "" && !current.previousWorktreesDirectories.includes(current.worktreesDirectory) ? [current.worktreesDirectory] : []] } : {},
58617
58902
  ...sourceControlHostsPatch !== void 0 ? { sourceControlHosts: {
58618
58903
  ...current.sourceControlHosts,
58619
- ...Object.fromEntries(Object.entries(sourceControlHostsPatch).map(([kind, fields]) => [kind, {
58620
- ...current.sourceControlHosts[kind],
58621
- ...fields
58622
- }]))
58904
+ ...Object.fromEntries(Object.entries(sourceControlHostsPatch).map(([kind, fields]) => {
58905
+ const saved = current.sourceControlHosts[kind];
58906
+ return [kind, {
58907
+ ...saved,
58908
+ ...fields,
58909
+ ...isObject(fields.tokens) && Object.keys(fields.tokens).length > 0 ? { tokens: {
58910
+ ...byHost(saved?.tokens),
58911
+ ...byHost(fields.tokens)
58912
+ } } : {}
58913
+ }];
58914
+ }))
58623
58915
  } } : {},
58624
58916
  ...projectSettingsOverridesPatch !== void 0 ? { projectSettingsOverrides: Object.fromEntries(Object.entries(mergeProjectSettingsOverridesPatch(current.projectSettingsOverrides, projectSettingsOverridesPatch)).filter(([, entry]) => Object.keys(entry).length > 0)) } : {},
58625
58917
  ...patch.defaultModelSelection !== void 0 ? { defaultModelSelection: patch.defaultModelSelection } : {},
@@ -58848,7 +59140,7 @@ const writeFileStringAtomically = (input) => scoped(gen(function* () {
58848
59140
  yield* fs.rename(tempPath, targetPath);
58849
59141
  }));
58850
59142
  // package.json
58851
- var version = "0.9.18";
59143
+ var version = "0.9.19";
58852
59144
  // src/auth/ServerSecretStore.ts
58853
59145
  const secretStoreErrorContext = {
58854
59146
  resource: String$2,
@@ -59330,8 +59622,8 @@ const fromReadableChannel = (options) => fromTransform((_, scope) => readableToP
59330
59622
  */
59331
59623
  const fromDuplex = (options) => fromTransform((upstream, scope) => {
59332
59624
  const duplex = options.evaluate();
59333
- const exit = make$85(void 0);
59334
- const latch = makeUnsafe$6(false);
59625
+ const exit = make$86(void 0);
59626
+ const latch = makeUnsafe$7(false);
59335
59627
  return pullIntoWritable({
59336
59628
  pull: upstream,
59337
59629
  writable: duplex,
@@ -59411,8 +59703,8 @@ const toUint8Array = (readable, options) => map$6(toArrayBuffer(readable, option
59411
59703
  const readableToPullUnsafe = (options) => {
59412
59704
  const readable = options.readable;
59413
59705
  const closeOnDone = options.closeOnDone ?? true;
59414
- const exit = options.exit ?? make$85(void 0);
59415
- const latch = options.latch ?? makeUnsafe$6(false);
59706
+ const exit = options.exit ?? make$86(void 0);
59707
+ const latch = options.latch ?? makeUnsafe$7(false);
59416
59708
  function onReadable() {
59417
59709
  latch.openUnsafe();
59418
59710
  }
@@ -59624,7 +59916,7 @@ function readSourceControlHostSettings(schema, saved) {
59624
59916
  * @module source-control-azure-devops/client/definition
59625
59917
  */
59626
59918
  const CHECKOUT_COMMAND$3 = /^az\s+repos\s+pr\s+checkout\s+(.+)$/i;
59627
- const CHANGE_REQUEST_REFERENCE$3 = /^https:\/\/(?:dev\.azure\.com\/[^/\s]+\/[^/\s]+|[^/\s]+\.visualstudio\.com\/[^/\s]+)\/_git\/[^/\s]+\/pullrequest\/(\d+)(?:[/?#].*)?$/i;
59919
+ const CHANGE_REQUEST_REFERENCE$3 = /^https:\/\/(?:dev\.azure\.com\/[^/\s]+\/[^/\s]+|[^/\s]+\.visualstudio\.com\/(?:DefaultCollection\/)?[^/\s]+)\/_git\/[^/\s]+\/pullrequest\/(\d+)(?:[/?#].*)?$/i;
59628
59920
  /** `az repos pr checkout` names the pull request by `--id`, `-i`, or its first plain argument. */
59629
59921
  function checkoutCommandId(args) {
59630
59922
  const parts = args.trim().split(/\s+/).filter(Boolean);
@@ -59880,7 +60172,7 @@ const definition$2 = defineSourceControlClient({
59880
60172
  * @module source-control-github/client/definition
59881
60173
  */
59882
60174
  const CHECKOUT_COMMAND$1 = /^gh\s+pr\s+checkout\s+(.+)$/i;
59883
- const CHANGE_REQUEST_REFERENCE$1 = /^https:\/\/github\.com\/[^/\s]+\/[^/\s]+\/pull\/(\d+)(?:[/?#].*)?$/i;
60175
+ const CHANGE_REQUEST_REFERENCE$1 = /^https?:\/\/[^/?#\s]+\/[^/\s]+\/[^/\s]+\/pull\/(\d+)(?:[/?#].*)?$/i;
59884
60176
  const KIND$1 = SourceControlProviderKind.make("github");
59885
60177
  const GitHubHostChoice = Struct({
59886
60178
  account: optionalKey(TrimmedNonEmptyString),
@@ -60638,10 +60930,10 @@ const makeTest = (overrides = {}) => gen(function* () {
60638
60930
  ...automaticGitFetchInterval !== void 0 ? { automaticGitFetchInterval } : {},
60639
60931
  ...providerHealthRefreshInterval !== void 0 ? { providerHealthRefreshInterval } : {}
60640
60932
  });
60641
- const currentSettingsRef = yield* make$71(initialSettings);
60642
- const writeSemaphore = yield* make$87(1);
60643
- const getSettings = get$2(currentSettingsRef).pipe(map$6(resolveTextGenerationProvider));
60644
- const updateTestSettings = (update) => writeSemaphore.withPermits(1)(get$2(currentSettingsRef).pipe(flatMap(update), flatMap(normalizeServerSettings), tap$1((nextSettings) => set$1(currentSettingsRef, nextSettings)), map$6(resolveTextGenerationProvider)));
60933
+ const currentSettingsRef = yield* make$72(initialSettings);
60934
+ const writeSemaphore = yield* make$88(1);
60935
+ const getSettings = get$3(currentSettingsRef).pipe(map$6(resolveTextGenerationProvider));
60936
+ const updateTestSettings = (update) => writeSemaphore.withPermits(1)(get$3(currentSettingsRef).pipe(flatMap(update), flatMap(normalizeServerSettings), tap$1((nextSettings) => set$2(currentSettingsRef, nextSettings)), map$6(resolveTextGenerationProvider)));
60645
60937
  return {
60646
60938
  start: void_$2,
60647
60939
  ready: void_$2,
@@ -60876,12 +61168,12 @@ const make$51 = gen(function* () {
60876
61168
  const pathService = yield* Path;
60877
61169
  const secretStore = yield* ServerSecretStore;
60878
61170
  const sql = yield* SqlClient;
60879
- const writeSemaphore = yield* make$87(1);
61171
+ const writeSemaphore = yield* make$88(1);
60880
61172
  const cacheKey = "settings";
60881
61173
  const changesPubSub = yield* unbounded$1();
60882
- const startedRef = yield* make$71(false);
60883
- const startedDeferred = yield* make$78();
60884
- const watcherScope = yield* make$76("sequential");
61174
+ const startedRef = yield* make$72(false);
61175
+ const startedDeferred = yield* make$79();
61176
+ const watcherScope = yield* make$77("sequential");
60885
61177
  yield* addFinalizer$1(() => close(watcherScope, void_$1));
60886
61178
  const emitChange = (settings) => publish(changesPubSub, settings).pipe(asVoid);
60887
61179
  const readConfigExists = fs.exists(settingsPath).pipe(mapError((cause) => new ServerSettingsError({
@@ -61004,7 +61296,7 @@ const make$51 = gen(function* () {
61004
61296
  capacity: 1,
61005
61297
  timeToLive: (exit) => isSuccess(exit) ? infinity : zero
61006
61298
  });
61007
- const getSettingsFromCache = get(settingsCache, cacheKey);
61299
+ const getSettingsFromCache = get$1(settingsCache, cacheKey);
61008
61300
  const materializeSettingsSecrets = (settings) => gen(function* () {
61009
61301
  const storedSecrets = /* @__PURE__ */ new Map();
61010
61302
  const pending = /* @__PURE__ */ new Map();
@@ -61171,7 +61463,7 @@ const make$51 = gen(function* () {
61171
61463
  }
61172
61464
  return materializedExit.value;
61173
61465
  }).pipe(ensuring(invalidateMaterialized)));
61174
- yield* set(settingsCache, cacheKey, next);
61466
+ yield* set$1(settingsCache, cacheKey, next);
61175
61467
  const resolved = resolveTextGenerationProvider(materializedNext);
61176
61468
  materialized = {
61177
61469
  source: next,
@@ -61207,7 +61499,7 @@ const make$51 = gen(function* () {
61207
61499
  return some(linkTargetPath);
61208
61500
  }).pipe(orElseSucceed(() => none$1()));
61209
61501
  const initialLinkTarget = yield* watchLinkTarget;
61210
- const linkTargetEvents = make$88(initialLinkTarget).pipe(concat$1(watchFileChanges(settingsPath).pipe(mapEffect$1(() => watchLinkTarget))), changes, switchMap(match({
61502
+ const linkTargetEvents = make$89(initialLinkTarget).pipe(concat$1(watchFileChanges(settingsPath).pipe(mapEffect$1(() => watchLinkTarget))), changes, switchMap(match({
61211
61503
  onNone: () => empty$5,
61212
61504
  onSome: (linkTargetPath) => watchFileChanges(linkTargetPath).pipe(ignore$2({ log: true }))
61213
61505
  })));
@@ -61216,7 +61508,7 @@ const make$51 = gen(function* () {
61216
61508
  });
61217
61509
  return {
61218
61510
  start: gen(function* () {
61219
- if (!(yield* modify(startedRef, (started) => [!started, true]))) return yield* _await(startedDeferred);
61511
+ if (!(yield* modify$1(startedRef, (started) => [!started, true]))) return yield* _await(startedDeferred);
61220
61512
  const startup = gen(function* () {
61221
61513
  yield* startWatcher;
61222
61514
  yield* invalidate(settingsCache, cacheKey);
@@ -61349,7 +61641,7 @@ const recordDesktopTelemetrySampleHealth = fn("resourceTelemetry.desktopTelemetr
61349
61641
  lastSampleAt: some(sampledAt),
61350
61642
  lastError: none$1()
61351
61643
  };
61352
- yield* set$1(health, next);
61644
+ yield* set$2(health, next);
61353
61645
  yield* publish(healthChanges, next);
61354
61646
  });
61355
61647
  function normalizeReceiverError(error) {
@@ -61400,22 +61692,22 @@ function requireDesktopTelemetryWriteProgress(fd, remainingBytes, written) {
61400
61692
  const make$50 = fn("resourceTelemetry.desktopTelemetryReceiver.make")(function* () {
61401
61693
  const config = yield* ServerConfig;
61402
61694
  const serverSettings = yield* ServerSettingsService;
61403
- const latest = yield* make$71(none$1());
61695
+ const latest = yield* make$72(none$1());
61404
61696
  const receiverStartedAt = yield* now;
61405
- const lastContactAtMs = yield* make$71(initialDesktopTelemetryContactAt(config.desktopTelemetryFd, toEpochMillis(receiverStartedAt)));
61406
- const snapshotStaleAfterMs = yield* make$71(resolveDesktopTelemetrySnapshotStaleAfterMs(DEFAULT_HOST_POWER_ACTIVE_INTERVAL_MS, DEFAULT_HOST_POWER_IDLE_INTERVAL_MS));
61697
+ const lastContactAtMs = yield* make$72(initialDesktopTelemetryContactAt(config.desktopTelemetryFd, toEpochMillis(receiverStartedAt)));
61698
+ const snapshotStaleAfterMs = yield* make$72(resolveDesktopTelemetrySnapshotStaleAfterMs(DEFAULT_HOST_POWER_ACTIVE_INTERVAL_MS, DEFAULT_HOST_POWER_IDLE_INTERVAL_MS));
61407
61699
  const changes = yield* sliding$1(8);
61408
61700
  const healthChanges = yield* sliding$1(4);
61409
- const latestUpdateReport = yield* make$71(none$1());
61701
+ const latestUpdateReport = yield* make$72(none$1());
61410
61702
  const updateReportChanges = yield* sliding$1(16);
61411
- const controlMutex = yield* make$87(1);
61412
- const snapshotMutex = yield* make$87(1);
61413
- const health = yield* make$71({
61703
+ const controlMutex = yield* make$88(1);
61704
+ const snapshotMutex = yield* make$88(1);
61705
+ const health = yield* make$72({
61414
61706
  status: config.desktopTelemetryFd === void 0 ? "unavailable" : "starting",
61415
61707
  lastSampleAt: none$1(),
61416
61708
  lastError: config.desktopTelemetryFd === void 0 ? some(new DesktopTelemetryDescriptorUnavailable({ mode: config.mode }).message) : none$1()
61417
61709
  });
61418
- const updateHealth = (update) => modify(health, (current) => {
61710
+ const updateHealth = (update) => modify$1(health, (current) => {
61419
61711
  const next = update(current);
61420
61712
  return [next, next];
61421
61713
  }).pipe(flatMap((next) => publish(healthChanges, next)), asVoid);
@@ -61448,7 +61740,7 @@ const make$50 = fn("resourceTelemetry.desktopTelemetryReceiver.make")(function*
61448
61740
  type: "setHostPowerIntervals",
61449
61741
  activeIntervalMs,
61450
61742
  idleIntervalMs
61451
- }).pipe(andThen(set$1(snapshotStaleAfterMs, resolveDesktopTelemetrySnapshotStaleAfterMs(activeIntervalMs, idleIntervalMs))));
61743
+ }).pipe(andThen(set$2(snapshotStaleAfterMs, resolveDesktopTelemetrySnapshotStaleAfterMs(activeIntervalMs, idleIntervalMs))));
61452
61744
  };
61453
61745
  if (config.desktopTelemetryControlFd !== void 0) {
61454
61746
  const settingsChanges = yield* serverSettings.subscribeChanges;
@@ -61485,15 +61777,15 @@ const make$50 = fn("resourceTelemetry.desktopTelemetryReceiver.make")(function*
61485
61777
  }));
61486
61778
  return decodeMessage(value).pipe(mapError((cause) => new DesktopTelemetryDecodeFailed({ cause })));
61487
61779
  }), mapError$1(normalizeReceiverError)).pipe(runForEach((message) => {
61488
- const recordContact = now.pipe(flatMap((now) => set$1(lastContactAtMs, some(toEpochMillis(now)))));
61780
+ const recordContact = now.pipe(flatMap((now) => set$2(lastContactAtMs, some(toEpochMillis(now)))));
61489
61781
  if (message.type === "desktopTelemetryHello") return recordContact.pipe(andThen(updateHealth((current) => ({
61490
61782
  ...current,
61491
61783
  status: "healthy",
61492
61784
  lastError: none$1()
61493
61785
  }))));
61494
- if (message.type === "desktopUpdateStatus") return recordContact.pipe(andThen(set$1(latestUpdateReport, some(message))), andThen(publish(updateReportChanges, message)), asVoid);
61495
- const sampledAt = makeUnsafe$5(message.sampledAtUnixMs);
61496
- return snapshotMutex.withPermits(1)(recordContact.pipe(andThen(set$1(latest, some(message))), andThen(updateSampleHealth(sampledAt)), andThen(publish(changes, message)), asVoid));
61786
+ if (message.type === "desktopUpdateStatus") return recordContact.pipe(andThen(set$2(latestUpdateReport, some(message))), andThen(publish(updateReportChanges, message)), asVoid);
61787
+ const sampledAt = makeUnsafe$6(message.sampledAtUnixMs);
61788
+ return snapshotMutex.withPermits(1)(recordContact.pipe(andThen(set$2(latest, some(message))), andThen(updateSampleHealth(sampledAt)), andThen(publish(changes, message)), asVoid));
61497
61789
  }), andThen(updateHealth((current) => ({
61498
61790
  ...current,
61499
61791
  status: "stopped",
@@ -61506,8 +61798,8 @@ const make$50 = fn("resourceTelemetry.desktopTelemetryReceiver.make")(function*
61506
61798
  yield* forever$1(sleep(STALE_CHECK_INTERVAL).pipe(andThen(snapshotMutex.withPermits(1)(gen(function* () {
61507
61799
  const now$15 = yield* now;
61508
61800
  const nowMs = toEpochMillis(now$15);
61509
- const staleAfterMs = yield* get$2(snapshotStaleAfterMs);
61510
- const staleSnapshot = yield* modify(latest, (current) => {
61801
+ const staleAfterMs = yield* get$3(snapshotStaleAfterMs);
61802
+ const staleSnapshot = yield* modify$1(latest, (current) => {
61511
61803
  if (isNone(current) || current.value.power.stale || nowMs - current.value.sampledAtUnixMs < staleAfterMs) return [none$1(), current];
61512
61804
  const stale = {
61513
61805
  ...current.value,
@@ -61519,12 +61811,12 @@ const make$50 = fn("resourceTelemetry.desktopTelemetryReceiver.make")(function*
61519
61811
  return [some(stale), some(stale)];
61520
61812
  });
61521
61813
  if (isNone(staleSnapshot)) {
61522
- if (!isDesktopTelemetryContactStale(yield* get$2(lastContactAtMs), nowMs)) return;
61814
+ if (!isDesktopTelemetryContactStale(yield* get$3(lastContactAtMs), nowMs)) return;
61523
61815
  const staleMessage = new DesktopTelemetryStale({
61524
61816
  fd,
61525
61817
  staleAfterMs: INITIAL_SAMPLE_DEADLINE_MS
61526
61818
  }).message;
61527
- const changed = yield* modify(health, (current) => {
61819
+ const changed = yield* modify$1(health, (current) => {
61528
61820
  if (current.status === "stopped" || isSome(current.lastSampleAt) || current.status === "degraded" && contains(current.lastError, staleMessage)) return [none$1(), current];
61529
61821
  const next = {
61530
61822
  ...current,
@@ -61548,18 +61840,18 @@ const make$50 = fn("resourceTelemetry.desktopTelemetryReceiver.make")(function*
61548
61840
  }))))).pipe(forkScoped);
61549
61841
  }
61550
61842
  return DesktopTelemetryReceiver.of({
61551
- latest: get$2(latest),
61843
+ latest: get$3(latest),
61552
61844
  changes: fromPubSub(changes),
61553
61845
  subscribe: snapshotMutex.withPermits(1)(gen(function* () {
61554
- const initial = yield* get$2(latest);
61846
+ const initial = yield* get$3(latest);
61555
61847
  const subscription = yield* subscribe(changes);
61556
61848
  return {
61557
61849
  latest: initial,
61558
61850
  changes: fromSubscription(subscription)
61559
61851
  };
61560
61852
  })),
61561
- health: get$2(health),
61562
- subscribeHealth: subscribeBeforeSnapshotWithoutMutex(healthChanges, get$2(health)),
61853
+ health: get$3(health),
61854
+ subscribeHealth: subscribeBeforeSnapshotWithoutMutex(healthChanges, get$3(health)),
61563
61855
  setDiagnosticsDemand,
61564
61856
  requestDesktopUpdate: (requestId) => sendControlMessage({
61565
61857
  version: 1,
@@ -61579,7 +61871,7 @@ const make$50 = fn("resourceTelemetry.desktopTelemetryReceiver.make")(function*
61579
61871
  desktopUpdates: gen(function* () {
61580
61872
  const subscription = yield* subscribe(updateReportChanges);
61581
61873
  return {
61582
- latest: yield* get$2(latestUpdateReport),
61874
+ latest: yield* get$3(latestUpdateReport),
61583
61875
  changes: fromSubscription(subscription)
61584
61876
  };
61585
61877
  })
@@ -61607,15 +61899,15 @@ const make$49 = fn("desktopUpdate.desktopAppUpdate.make")(function* () {
61607
61899
  const config = yield* ServerConfig;
61608
61900
  const crypto = yield* Crypto;
61609
61901
  const receiver = yield* DesktopTelemetryReceiver;
61610
- const inFlight = yield* make$71(false);
61902
+ const inFlight = yield* make$72(false);
61611
61903
  const available = config.mode === "desktop" && config.desktopTelemetryControlFd !== void 0;
61612
61904
  const failWith = (reason, cause) => cause === void 0 ? new ServerSelfUpdateError({ reason }) : new ServerSelfUpdateError({
61613
61905
  reason,
61614
61906
  cause
61615
61907
  });
61616
61908
  const consumeReports = (requestId, changes, reportProgress) => gen(function* () {
61617
- const lastStage = yield* make$71(null);
61618
- const emitStage = (stage) => stage === null ? void_$2 : get$2(lastStage).pipe(flatMap((previous) => previous === stage ? void_$2 : set$1(lastStage, stage).pipe(andThen(reportProgress(stage)))));
61909
+ const lastStage = yield* make$72(null);
61910
+ const emitStage = (stage) => stage === null ? void_$2 : get$3(lastStage).pipe(flatMap((previous) => previous === stage ? void_$2 : set$2(lastStage, stage).pipe(andThen(reportProgress(stage)))));
61619
61911
  const terminal = yield* changes.pipe(filter$3((report) => report.requestId === requestId), mapEffect$1((report) => report.outcome === void 0 ? emitStage(desktopUpdateProgressStage(report.state)).pipe(as(none$1())) : succeedSome$1(report)), filterMap$2(match({
61620
61912
  onNone: () => failVoid,
61621
61913
  onSome: succeed$1
@@ -61626,7 +61918,7 @@ const make$49 = fn("desktopUpdate.desktopAppUpdate.make")(function* () {
61626
61918
  yield* emitStage("installing");
61627
61919
  const targetVersion = report.state.downloadedVersion ?? report.state.availableVersion ?? report.state.currentVersion;
61628
61920
  yield* logInfo("Desktop app update prepared for install.", { targetVersion });
61629
- yield* set$1(inFlight, false);
61921
+ yield* set$2(inFlight, false);
61630
61922
  return {
61631
61923
  targetVersion,
61632
61924
  method: "desktop-app",
@@ -61644,7 +61936,7 @@ const make$49 = fn("desktopUpdate.desktopAppUpdate.make")(function* () {
61644
61936
  const { changes } = yield* receiver.desktopUpdates;
61645
61937
  yield* receiver.requestDesktopUpdate(requestId).pipe(mapError((error) => failWith("Could not reach the P4 Code desktop app on this machine.", error)));
61646
61938
  return yield* consumeReports(requestId, changes, reportProgress).pipe(onInterrupt(() => receiver.cancelDesktopUpdate(requestId).pipe(ignore$1)));
61647
- })).pipe(timeout(DESKTOP_UPDATE_TIMEOUT), catchTags({ TimeoutError: () => failWith("The desktop app did not finish the update in time.") }), onError(() => set$1(inFlight, false)));
61939
+ })).pipe(timeout(DESKTOP_UPDATE_TIMEOUT), catchTags({ TimeoutError: () => failWith("The desktop app did not finish the update in time.") }), onError(() => set$2(inFlight, false)));
61648
61940
  });
61649
61941
  const commit = fn("desktopUpdate.desktopAppUpdate.commit")(function* (requestId, onHandoffAccepted = () => void_$2) {
61650
61942
  if (!available) return yield* failWith("This server cannot commit a desktop app update.");
@@ -61652,7 +61944,7 @@ const make$49 = fn("desktopUpdate.desktopAppUpdate.make")(function* () {
61652
61944
  const { latest, changes } = yield* receiver.desktopUpdates;
61653
61945
  const reports = match(latest, {
61654
61946
  onNone: () => changes,
61655
- onSome: (report) => concat$1(make$88(report), changes)
61947
+ onSome: (report) => concat$1(make$89(report), changes)
61656
61948
  });
61657
61949
  yield* uninterruptible(receiver.commitDesktopUpdate(requestId).pipe(mapError((error) => failWith("Could not reach the P4 Code desktop app.", error)), tap$1(() => onHandoffAccepted())));
61658
61950
  return yield* reports.pipe(filter$3((report) => report.requestId === requestId && report.outcome === "failed"), runHead, timeout(DESKTOP_INSTALL_TIMEOUT), catchTags({ TimeoutError: () => failWith("The desktop app did not report an install result in time.") }));
@@ -61841,9 +62133,9 @@ function resolveServerSelfUpdateCapability(input) {
61841
62133
  }
61842
62134
  var ServerSelfUpdate = class extends Service()("@p4code/cli/cloud/selfUpdate/ServerSelfUpdate") {};
61843
62135
  fn("cloud.server_self_update.withRunningThreadContinuation")(function* (input) {
61844
- const desktopContinuationTokens = yield* make$71(empty$1());
62136
+ const desktopContinuationTokens = yield* make$72(empty$1());
61845
62137
  const clearOnError = (effect, threadIds, handoffAccepted) => effect.pipe(catchCause((cause) => (handoffAccepted() && hasInterruptsOnly(cause) ? void_$2 : input.clear(threadIds())).pipe(andThen(failCause(cause)))));
61846
- const update$2 = (request, reportProgress = () => void_$2) => {
62138
+ const update = (request, reportProgress = () => void_$2) => {
61847
62139
  let prepared = false;
61848
62140
  let handoffAccepted = false;
61849
62141
  let continuationThreadIds = [];
@@ -61853,14 +62145,14 @@ fn("cloud.server_self_update.withRunningThreadContinuation")(function* (input) {
61853
62145
  })), asVoid) : void_$2).pipe(andThen(reportProgress(stage))), () => sync$1(() => {
61854
62146
  handoffAccepted = true;
61855
62147
  })).pipe(tap$1((result) => {
61856
- if (result.method === "desktop-app" && result.desktopUpdateToken !== void 0 && request.continueRunningThreads === true) return update(desktopContinuationTokens, add(result.desktopUpdateToken));
62148
+ if (result.method === "desktop-app" && result.desktopUpdateToken !== void 0 && request.continueRunningThreads === true) return update$1(desktopContinuationTokens, add(result.desktopUpdateToken));
61857
62149
  return void_$2;
61858
62150
  })), () => continuationThreadIds, () => handoffAccepted);
61859
62151
  };
61860
62152
  return ServerSelfUpdate.of({
61861
- update: update$2,
62153
+ update,
61862
62154
  commitDesktopUpdate: (requestId) => gen(function* () {
61863
- const shouldContinue = yield* modify(desktopContinuationTokens, (tokens) => [has$1(tokens, requestId), remove$1(tokens, requestId)]);
62155
+ const shouldContinue = yield* modify$1(desktopContinuationTokens, (tokens) => [has$1(tokens, requestId), remove$1(tokens, requestId)]);
61864
62156
  let handoffAccepted = false;
61865
62157
  let continuationThreadIds = [];
61866
62158
  return yield* clearOnError(gen(function* () {
@@ -61868,7 +62160,7 @@ fn("cloud.server_self_update.withRunningThreadContinuation")(function* (input) {
61868
62160
  return yield* input.selfUpdate.commitDesktopUpdate(requestId, () => sync$1(() => {
61869
62161
  handoffAccepted = true;
61870
62162
  }));
61871
- }), () => continuationThreadIds, () => handoffAccepted).pipe(catchCause((cause) => (shouldContinue && !handoffAccepted ? update(desktopContinuationTokens, add(requestId)) : void_$2).pipe(andThen(failCause(cause)))));
62163
+ }), () => continuationThreadIds, () => handoffAccepted).pipe(catchCause((cause) => (shouldContinue && !handoffAccepted ? update$1(desktopContinuationTokens, add(requestId)) : void_$2).pipe(andThen(failCause(cause)))));
61872
62164
  })
61873
62165
  });
61874
62166
  });
@@ -61883,7 +62175,7 @@ const make$47 = fn("cloud.server_self_update.make")(function* () {
61883
62175
  const arch = yield* Architecture;
61884
62176
  const httpClient = yield* HttpClient;
61885
62177
  const releaseBaseUrl = getOrUndefined(yield* String$1(CLI_RELEASE_BASE_URL_ENV).pipe(option));
61886
- const inFlight = yield* make$71(false);
62178
+ const inFlight = yield* make$72(false);
61887
62179
  const capability = serverConfig.mode === "desktop" ? "desktop-managed" : launcher.managed ? "boot-service" : null;
61888
62180
  const failWith = (reason, cause) => cause === void 0 ? new ServerSelfUpdateError({ reason }) : new ServerSelfUpdateError({
61889
62181
  reason,
@@ -61963,7 +62255,7 @@ const make$47 = fn("cloud.server_self_update.make")(function* () {
61963
62255
  method: "boot-service",
61964
62256
  updateId
61965
62257
  };
61966
- }).pipe(onError(() => set$1(inFlight, false)));
62258
+ }).pipe(onError(() => set$2(inFlight, false)));
61967
62259
  });
61968
62260
  return ServerSelfUpdate.of({
61969
62261
  update,
@@ -62632,7 +62924,7 @@ const layer$49 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(f
62632
62924
  };
62633
62925
  };
62634
62926
  const spawn = (command, spawnOptions) => callback((resume) => {
62635
- const deferred = makeUnsafe$4();
62927
+ const deferred = makeUnsafe$5();
62636
62928
  const handle = NodeChildProcess.spawn(command.command, command.args, spawnOptions);
62637
62929
  handle.on("error", (error) => {
62638
62930
  resume(fail$1(toPlatformError("spawn", error, command)));
@@ -62927,7 +63219,7 @@ const digest = (algorithm, data) => try_({
62927
63219
  * @category constructors
62928
63220
  * @since 1.0.0
62929
63221
  */
62930
- const make$44 = /*#__PURE__*/ make$66({
63222
+ const make$44 = /*#__PURE__*/ make$67({
62931
63223
  randomBytes: NodeCrypto.randomBytes,
62932
63224
  digest
62933
63225
  });
@@ -63335,7 +63627,7 @@ const writeFile = (path, data, options) => callback((resume, signal) => {
63335
63627
  resume(fail$1(handleBadArgument("writeFile")(err)));
63336
63628
  }
63337
63629
  });
63338
- const makeFileSystem = /*#__PURE__*/ map$6(/*#__PURE__*/ serviceOption(WatchBackend), (backend) => make$84({
63630
+ const makeFileSystem = /*#__PURE__*/ map$6(/*#__PURE__*/ serviceOption(WatchBackend), (backend) => make$85({
63339
63631
  access,
63340
63632
  chmod,
63341
63633
  chown,
@@ -63443,7 +63735,7 @@ const fileUrlOps = (windows) => ({
63443
63735
  * @since 4.0.0
63444
63736
  */
63445
63737
  const layer$43 = /* @__PURE__ */ succeed$3(Path)({
63446
- [TypeId$18]: TypeId$18,
63738
+ [TypeId$19]: TypeId$19,
63447
63739
  ...NodePath,
63448
63740
  .../*#__PURE__*/ fileUrlOps(void 0)
63449
63741
  });
@@ -63514,7 +63806,7 @@ const layer$41 = /* @__PURE__ */ succeed$3(Stdio, /*#__PURE__*/ make$61({
63514
63806
  const layer$40 = /*#__PURE__*/ effect(Terminal, /*#__PURE__*/ (/* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
63515
63807
  const stdin = process.stdin;
63516
63808
  const stdout = process.stdout;
63517
- const lines = yield* make$86();
63809
+ const lines = yield* make$87();
63518
63810
  let inputEnded = stdin.readableEnded;
63519
63811
  let readlineActive = false;
63520
63812
  const onStdinEnd = () => {
@@ -63523,7 +63815,7 @@ const layer$40 = /*#__PURE__*/ effect(Terminal, /*#__PURE__*/ (/* @__PURE__ */ f
63523
63815
  };
63524
63816
  stdin.once("end", onStdinEnd);
63525
63817
  yield* addFinalizer$1(() => sync$1(() => stdin.off("end", onStdinEnd)));
63526
- const rlRef = yield* make$73({
63818
+ const rlRef = yield* make$74({
63527
63819
  acquire: acquireRelease(sync$1(() => {
63528
63820
  const rl = readline.createInterface({
63529
63821
  input: stdin,
@@ -63557,7 +63849,7 @@ const layer$40 = /*#__PURE__*/ effect(Terminal, /*#__PURE__*/ (/* @__PURE__ */ f
63557
63849
  const columns = sync$1(() => stdout.columns ?? 0);
63558
63850
  const rows = sync$1(() => stdout.rows ?? 0);
63559
63851
  const readInput = gen(function* () {
63560
- const queue = yield* make$86();
63852
+ const queue = yield* make$87();
63561
63853
  const handleKeypress = (s, k) => {
63562
63854
  const userInput = {
63563
63855
  input: fromUndefinedOr(s),
@@ -63584,13 +63876,13 @@ const layer$40 = /*#__PURE__*/ effect(Terminal, /*#__PURE__*/ (/* @__PURE__ */ f
63584
63876
  stdin.on("keypress", handleKeypress);
63585
63877
  if (inputEnded) handleEnd();
63586
63878
  else {
63587
- yield* get$3(rlRef);
63879
+ yield* get$4(rlRef);
63588
63880
  stdin.once("end", handleEnd);
63589
63881
  }
63590
63882
  return queue;
63591
63883
  });
63592
63884
  const readLine = suspend(() => poll(lines).pipe(flatMap(match({
63593
- onNone: () => scoped(andThen(get$3(rlRef), take(lines))),
63885
+ onNone: () => scoped(andThen(get$4(rlRef), take(lines))),
63594
63886
  onSome: succeed
63595
63887
  })), mapError(() => new QuitError({}))));
63596
63888
  const display = (prompt) => uninterruptible(callback((resume) => {
@@ -63695,7 +63987,7 @@ const makeClient = (api, options) => gen(function* () {
63695
63987
  const encodeQuery = map$2(endpoint.query, (schema) => encodeUnknownEffect(schema, parseOptions.query));
63696
63988
  const middlewareKeys = Array.from(onEndpointOptions.middleware, (tag) => `${tag.key}/Client`);
63697
63989
  const endpointFn = fnUntraced(function* (request) {
63698
- let httpRequest = make$82(endpoint.method)(endpoint.path);
63990
+ let httpRequest = make$83(endpoint.method)(endpoint.path);
63699
63991
  if (request !== void 0) {
63700
63992
  if (encodeParams !== void 0) {
63701
63993
  const params = yield* encodeParams(request.params);
@@ -70879,7 +71171,9 @@ const resolveClaudeConfigDirPath = fn("resolveClaudeConfigDirPath")(function* (c
70879
71171
  });
70880
71172
  const SettingsEnv = Struct({
70881
71173
  ANTHROPIC_BASE_URL: optional(String$2),
70882
- CLAUDE_CODE_ENTRYPOINT: optional(String$2)
71174
+ CLAUDE_CODE_ENTRYPOINT: optional(String$2),
71175
+ CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY: optional(Unknown),
71176
+ CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS: optional(Unknown)
70883
71177
  });
70884
71178
  const decodeSettingsEnv = decodeUnknownEffect$1(fromLenientJson(Struct({ env: optional(SettingsEnv) })));
70885
71179
  /** The `env` values P4 Code reads from Claude's user and managed settings; later files win. */
@@ -71338,7 +71632,7 @@ const make$39 = gen(function* () {
71338
71632
  });
71339
71633
  const resolvePath = fn("ProjectFaviconResolver.resolvePath")(function* (cwd, faviconPath) {
71340
71634
  const key = faviconCacheKey(cwd, faviconPath);
71341
- const cached = yield* get(faviconCache, key);
71635
+ const cached = yield* get$1(faviconCache, key);
71342
71636
  if (cached === null) return null;
71343
71637
  const stats = yield* optionOnNotFound(fileSystem.stat(cached)).pipe(mapError((cause) => new ProjectFaviconResolutionError({
71344
71638
  operation: "stat-candidate",
@@ -71348,7 +71642,7 @@ const make$39 = gen(function* () {
71348
71642
  })));
71349
71643
  if (isSome(stats) && stats.value.type === "File") return cached;
71350
71644
  yield* invalidate(faviconCache, key);
71351
- return yield* get(faviconCache, key);
71645
+ return yield* get$1(faviconCache, key);
71352
71646
  });
71353
71647
  return ProjectFaviconResolver.of({ resolvePath });
71354
71648
  });
@@ -71453,7 +71747,7 @@ function normalizeGitRemoteUrl(value) {
71453
71747
  } catch {
71454
71748
  return normalized;
71455
71749
  }
71456
- const scpStyleHostAndPath = /^[a-zA-Z0-9._-]+@([^:/\s]+):([^/\s]+(?:\/[^/\s]+)+)$/i.exec(normalized);
71750
+ const scpStyleHostAndPath = /^[a-zA-Z0-9._-]+@([^:/\s]+):([^/\s]+(?:\/[^/\s]+)+)$/i.exec(normalized) ?? /^([^@:/\\\s]{2,}):(?!:)\/?([^/\s]+(?:\/[^/\s]+)+)$/i.exec(normalized);
71457
71751
  const scpHost = scpStyleHostAndPath?.[1];
71458
71752
  const scpPath = scpStyleHostAndPath?.[2];
71459
71753
  if (scpHost && scpPath) return azureDevOpsRepositoryKey(scpHost, scpPath.split("/")) ?? `${scpHost}/${scpPath}`;
@@ -71684,10 +71978,10 @@ const make$38 = fn("RepositoryIdentityResolver.make")(function* (options = {}) {
71684
71978
  });
71685
71979
  const resolve = fnUntraced(function* (cwd, options) {
71686
71980
  if (options?.refresh) yield* invalidate(repositoryRootCache, cwd);
71687
- const cacheKey = yield* get(repositoryRootCache, cwd);
71981
+ const cacheKey = yield* get$1(repositoryRootCache, cwd);
71688
71982
  if (cacheKey === null) return null;
71689
71983
  if (options?.refresh) yield* invalidate(repositoryIdentityCache, cacheKey);
71690
- return yield* get(repositoryIdentityCache, cacheKey);
71984
+ return yield* get$1(repositoryIdentityCache, cacheKey);
71691
71985
  });
71692
71986
  return RepositoryIdentityResolver.of({ resolve });
71693
71987
  });
@@ -71740,20 +72034,20 @@ const make$37 = fn("ProjectEnrichmentService.make")(function* (options = {}) {
71740
72034
  });
71741
72035
  const makeWorkLane = gen(function* () {
71742
72036
  return {
71743
- pendingRoots: yield* make$71(/* @__PURE__ */ new Set()),
72037
+ pendingRoots: yield* make$72(/* @__PURE__ */ new Set()),
71744
72038
  queue: yield* acquireRelease(dropping(maxPending), (queue) => shutdown(queue))
71745
72039
  };
71746
72040
  });
71747
72041
  const repositoryIdentityLane = yield* makeWorkLane;
71748
72042
  const faviconLane = yield* makeWorkLane;
71749
72043
  const changes = yield* acquireRelease(sliding$1(256), (pubsub) => shutdown$1(pubsub));
71750
- const removePending = (lane, workspaceRoot) => update(lane.pendingRoots, (current) => {
72044
+ const removePending = (lane, workspaceRoot) => update$1(lane.pendingRoots, (current) => {
71751
72045
  if (!current.has(workspaceRoot)) return current;
71752
72046
  const next = new Set(current);
71753
72047
  next.delete(workspaceRoot);
71754
72048
  return next;
71755
72049
  });
71756
- const reservePending = (lane, workspaceRoot) => modify(lane.pendingRoots, (current) => {
72050
+ const reservePending = (lane, workspaceRoot) => modify$1(lane.pendingRoots, (current) => {
71757
72051
  if (current.has(workspaceRoot) || current.size >= maxPending) return [false, current];
71758
72052
  const next = new Set(current);
71759
72053
  next.add(workspaceRoot);
@@ -71765,7 +72059,7 @@ const make$37 = fn("ProjectEnrichmentService.make")(function* (options = {}) {
71765
72059
  cause: pretty(result.cause)
71766
72060
  }) : void_$2;
71767
72061
  const resolveRepositoryIdentity = fn("ProjectEnrichmentService.resolveRepositoryIdentity")(function* (workspaceRoot) {
71768
- const repositoryIdentity = yield* get(repositoryIdentityCache, workspaceRoot);
72062
+ const repositoryIdentity = yield* get$1(repositoryIdentityCache, workspaceRoot);
71769
72063
  yield* logFailure(workspaceRoot, "repositoryIdentity", repositoryIdentity);
71770
72064
  const faviconPath = yield* getSuccess(faviconCache, workspaceRoot);
71771
72065
  const repositoryIdentityResolved = isSuccess(repositoryIdentity);
@@ -71780,7 +72074,7 @@ const make$37 = fn("ProjectEnrichmentService.make")(function* (options = {}) {
71780
72074
  });
71781
72075
  });
71782
72076
  const resolveFavicon = fn("ProjectEnrichmentService.resolveFavicon")(function* (workspaceRoot) {
71783
- const faviconPath = yield* get(faviconCache, workspaceRoot);
72077
+ const faviconPath = yield* get$1(faviconCache, workspaceRoot);
71784
72078
  if (exists(findErrorOption$1(faviconPath), isMissingWorkspaceRoot)) return;
71785
72079
  yield* logFailure(workspaceRoot, "faviconPath", faviconPath);
71786
72080
  });
@@ -71825,7 +72119,7 @@ const make$37 = fn("ProjectEnrichmentService.make")(function* (options = {}) {
71825
72119
  return available;
71826
72120
  });
71827
72121
  const readRepositoryIdentity = fn("ProjectEnrichmentService.readRepositoryIdentity")(function* (workspaceRoot) {
71828
- const resolved = yield* get(repositoryIdentityCache, workspaceRoot);
72122
+ const resolved = yield* get$1(repositoryIdentityCache, workspaceRoot);
71829
72123
  return isSuccess(resolved) ? resolved.value : null;
71830
72124
  });
71831
72125
  const invalidate$1 = fn("ProjectEnrichmentService.invalidate")(function* (workspaceRoots) {
@@ -71854,8 +72148,8 @@ const layer$33 = effect(ProjectEnrichmentService, make$37());
71854
72148
  * not tied to a scope, so it keeps working for as long as anyone references it.
71855
72149
  */
71856
72150
  const make$36 = () => gen(function* () {
71857
- const locks = yield* make$71(/* @__PURE__ */ new Map());
71858
- const acquire = (key) => flatMap(make$87(1), (candidate) => modify(locks, (current) => {
72151
+ const locks = yield* make$72(/* @__PURE__ */ new Map());
72152
+ const acquire = (key) => flatMap(make$88(1), (candidate) => modify$1(locks, (current) => {
71859
72153
  const existing = current.get(key);
71860
72154
  const semaphore = existing?.semaphore ?? candidate;
71861
72155
  const next = new Map(current);
@@ -71865,7 +72159,7 @@ const make$36 = () => gen(function* () {
71865
72159
  });
71866
72160
  return [semaphore, next];
71867
72161
  }));
71868
- const release = (key) => update(locks, (current) => {
72162
+ const release = (key) => update$1(locks, (current) => {
71869
72163
  const existing = current.get(key);
71870
72164
  if (existing === void 0) return current;
71871
72165
  const next = new Map(current);
@@ -71878,7 +72172,7 @@ const make$36 = () => gen(function* () {
71878
72172
  });
71879
72173
  return {
71880
72174
  withLock: (key, effect) => acquireUseRelease(acquire(key), (semaphore) => semaphore.withPermit(effect), () => release(key)),
71881
- activeKeys: map$6(get$2(locks), (current) => Array.from(current.keys()))
72175
+ activeKeys: map$6(get$3(locks), (current) => Array.from(current.keys()))
71882
72176
  };
71883
72177
  });
71884
72178
  // src/observability/Attributes.ts
@@ -71932,14 +72226,14 @@ const secretRequestsTotal = counter("p4_secret_requests_total", { description: "
71932
72226
  /** One-use secret refs a tool tried to use, by result: used, rejected. */
71933
72227
  const secretRefsConsumedTotal = counter("p4_secret_refs_consumed_total", { description: "Secret refs tools tried to use, by result." });
71934
72228
  const metricAttributes = (attributes) => Object.entries(compactMetricAttributes(attributes));
71935
- const increment = (metric, attributes, amount = 1) => update$1(withAttributes(metric, metricAttributes(attributes)), amount);
72229
+ const increment = (metric, attributes, amount = 1) => update$2(withAttributes(metric, metricAttributes(attributes)), amount);
71936
72230
  const recordMetrics = (options, startedAt, exit) => gen(function* () {
71937
72231
  const duration = nanos((yield* monotonicTimeNanos) - startedAt);
71938
72232
  const baseAttributes = typeof options.attributes === "function" ? options.attributes() : options.attributes ?? {};
71939
- if (options.timer) yield* update$1(withAttributes(options.timer, metricAttributes(baseAttributes)), duration);
72233
+ if (options.timer) yield* update$2(withAttributes(options.timer, metricAttributes(baseAttributes)), duration);
71940
72234
  if (options.counter) {
71941
72235
  const outcome = outcomeFromExit(exit);
71942
- yield* update$1(withAttributes(options.counter, metricAttributes({
72236
+ yield* update$2(withAttributes(options.counter, metricAttributes({
71943
72237
  ...baseAttributes,
71944
72238
  outcome,
71945
72239
  ...options.outcomeAttributes ? options.outcomeAttributes(outcome) : {}
@@ -72187,7 +72481,7 @@ var ServerActivation = class extends Reference("p4/serverActivation", { defaultV
72187
72481
  const forkParkedFiber = (effect) => gen(function* () {
72188
72482
  const activation = yield* ServerActivation;
72189
72483
  if (activation === void 0) return yield* forkScoped(effect);
72190
- const parked = yield* make$78();
72484
+ const parked = yield* make$79();
72191
72485
  const fiber = yield* forkScoped(succeed$4(parked, void 0).pipe(andThen(activation), andThen(effect)));
72192
72486
  yield* _await(parked);
72193
72487
  return fiber;
@@ -72390,7 +72684,7 @@ const layer$30 = effect(EffectOutboxV2, gen(function* () {
72390
72684
  const cancellationSignal = (effectId) => {
72391
72685
  const existing = cancellationSignals.get(effectId);
72392
72686
  if (existing !== void 0) return existing;
72393
- const created = makeUnsafe$4();
72687
+ const created = makeUnsafe$5();
72394
72688
  cancellationSignals.set(effectId, created);
72395
72689
  return created;
72396
72690
  };
@@ -72494,7 +72788,7 @@ const layer$30 = effect(EffectOutboxV2, gen(function* () {
72494
72788
  cancellationSignals.delete(effectId);
72495
72789
  }),
72496
72790
  awaitSettled: (effectId) => gen(function* () {
72497
- const signal = settledSignals.get(effectId) ?? makeUnsafe$4();
72791
+ const signal = settledSignals.get(effectId) ?? makeUnsafe$5();
72498
72792
  settledSignals.set(effectId, signal);
72499
72793
  const effect = yield* service.get(effectId);
72500
72794
  if (exists(effect, ({ status }) => status === "pending" || status === "running")) return yield* _await(signal);
@@ -72561,7 +72855,7 @@ const layer$30 = effect(EffectOutboxV2, gen(function* () {
72561
72855
  RETURNING *
72562
72856
  `.pipe(withTracerEnabled(false)))[0];
72563
72857
  if (row === void 0) return none$1();
72564
- cancellationSignals.set(row.effect_id, makeUnsafe$4());
72858
+ cancellationSignals.set(row.effect_id, makeUnsafe$5());
72565
72859
  return some(yield* rowToEffect(row));
72566
72860
  }).pipe(mapError((cause) => new EffectOutboxError({
72567
72861
  operation: "claim",
@@ -72574,7 +72868,7 @@ const layer$30 = effect(EffectOutboxV2, gen(function* () {
72574
72868
  WHERE ${claimableCandidatePredicate()}
72575
72869
  `.pipe(withTracerEnabled(false)))[0]?.available_at;
72576
72870
  if (availableAt === void 0 || availableAt === null) return none$1();
72577
- const parsed = make$80(availableAt);
72871
+ const parsed = make$81(availableAt);
72578
72872
  if (isNone(parsed)) return yield* new EffectOutboxError({
72579
72873
  operation: "next-claimable",
72580
72874
  cause: `Invalid available_at timestamp: ${availableAt}`
@@ -73003,7 +73297,7 @@ const layerBase = effect(EventSinkV2, gen(function* () {
73003
73297
  for (const [type, pubsub] of liveEventsByType) yield* publishAll(pubsub, events.filter((stored) => stored.event.type === type));
73004
73298
  });
73005
73299
  const publishStoredEvents = (events) => eventStore.publishCommitted(events).pipe(andThen(publishLiveEvents(events)));
73006
- const publishLane = yield* make$87(1);
73300
+ const publishLane = yield* make$88(1);
73007
73301
  const commitThenPublish = (transaction, publish) => suspend(() => {
73008
73302
  let holdsLane = false;
73009
73303
  const takeLane = publishLane.take(1).pipe(andThen(sync$1(() => {
@@ -73702,7 +73996,7 @@ function settledOverrideFor(value) {
73702
73996
  return value === "settled" || value === "active" ? value : null;
73703
73997
  }
73704
73998
  function dateTime(value) {
73705
- return makeUnsafe$5(value);
73999
+ return makeUnsafe$6(value);
73706
74000
  }
73707
74001
  function nullableDateTime(value) {
73708
74002
  return value === null ? null : dateTime(value);
@@ -73883,7 +74177,7 @@ const make$34 = gen(function* () {
73883
74177
  AND message.role IN ('user', 'assistant')
73884
74178
  ORDER BY message.created_at DESC, message.message_id DESC
73885
74179
  LIMIT 1
73886
- `;
74180
+ `.pipe(readOnly);
73887
74181
  return [(yield* sql`
73888
74182
  SELECT
73889
74183
  message.message_id,
@@ -73913,10 +74207,10 @@ const make$34 = gen(function* () {
73913
74207
  AND message.role = 'user'
73914
74208
  ORDER BY message.created_at DESC, message.message_id DESC
73915
74209
  LIMIT 1
73916
- `)[0], latest[0]].filter((message, index, selected) => message !== void 0 && selected.findIndex((candidate) => candidate?.message_id === message.message_id) === index);
74210
+ `.pipe(readOnly))[0], latest[0]].filter((message, index, selected) => message !== void 0 && selected.findIndex((candidate) => candidate?.message_id === message.message_id) === index);
73917
74211
  });
73918
74212
  const reconcileShells = gen(function* () {
73919
- const now$5 = formatIso(yield* now);
74213
+ const now$6 = formatIso(yield* now);
73920
74214
  const repairRows = yield* sql`
73921
74215
  SELECT
73922
74216
  thread.thread_id,
@@ -73959,7 +74253,7 @@ const make$34 = gen(function* () {
73959
74253
  OR json_type(projection.payload_json, '$.branchPullRequest') IS NULL
73960
74254
  OR json_type(projection.payload_json, '$.activeOrderKey') IS NULL
73961
74255
  ORDER BY thread.created_at ASC, thread.thread_id ASC
73962
- `;
74256
+ `.pipe(readOnly);
73963
74257
  let repairedThreadCount = 0;
73964
74258
  for (const row of repairRows) {
73965
74259
  const decoded = decodeStoredThread(row.payload_json);
@@ -73986,7 +74280,7 @@ const make$34 = gen(function* () {
73986
74280
  type: "thread.metadata-updated",
73987
74281
  threadId: repaired.id,
73988
74282
  providerInstanceId: repaired.providerInstanceId,
73989
- occurredAt: dateTime(now$5),
74283
+ occurredAt: dateTime(now$6),
73990
74284
  payload: repaired
73991
74285
  }] });
73992
74286
  repairedThreadCount += 1;
@@ -74027,7 +74321,7 @@ const make$34 = gen(function* () {
74027
74321
  AND event.event_type = 'thread.created'
74028
74322
  )
74029
74323
  ORDER BY thread.created_at ASC, thread.thread_id ASC
74030
- `;
74324
+ `.pipe(readOnly);
74031
74325
  let importedThreadCount = repairedThreadCount;
74032
74326
  let importedMessageCount = 0;
74033
74327
  for (const row of rows) {
@@ -74079,7 +74373,7 @@ const make$34 = gen(function* () {
74079
74373
  VALUES (
74080
74374
  ${thread.id},
74081
74375
  ${row.updated_at},
74082
- ${now$5},
74376
+ ${now$6},
74083
74377
  NULL,
74084
74378
  ${previews.length},
74085
74379
  NULL
@@ -74163,11 +74457,11 @@ const make$34 = gen(function* () {
74163
74457
  yield* eventSink.write({ events: batch.flatMap(messageEvents) });
74164
74458
  yield* yieldNow;
74165
74459
  }
74166
- const now$6 = formatIso(yield* now);
74460
+ const now$5 = formatIso(yield* now);
74167
74461
  yield* sql`
74168
74462
  UPDATE orchestration_v2_legacy_imports
74169
74463
  SET
74170
- transcript_imported_at = ${now$6},
74464
+ transcript_imported_at = ${now$5},
74171
74465
  imported_message_count = ${messages.length},
74172
74466
  last_error = NULL
74173
74467
  WHERE thread_id = ${threadId}
@@ -75240,7 +75534,7 @@ const makeIsServerInternalPath = gen(function* () {
75240
75534
  });
75241
75535
  // src/vcs/GitVcsDriverCore.ts
75242
75536
  const DEFAULT_TIMEOUT_MS$3 = 3e4;
75243
- const gitProcesses = makeUnsafe$7(8);
75537
+ const gitProcesses = makeUnsafe$8(8);
75244
75538
  const WORKTREE_REMOVE_TIMEOUT_MS = toMillis(minutes(5));
75245
75539
  const DEFAULT_MAX_OUTPUT_BYTES$1 = 1e6;
75246
75540
  const OUTPUT_TRUNCATED_MARKER$1 = "\n\n[truncated]";
@@ -75262,6 +75556,7 @@ const REVIEW_DIFF_ARGS = [
75262
75556
  "--no-ext-diff",
75263
75557
  "--no-textconv",
75264
75558
  "--minimal",
75559
+ "--submodule=short",
75265
75560
  ...PATCH_RENDER_PREFIX_ARGS
75266
75561
  ];
75267
75562
  const STATUS_UPSTREAM_REFRESH_INTERVAL = seconds(15);
@@ -75587,7 +75882,7 @@ const createTrace2Monitor = fnUntraced(function* (input, progress) {
75587
75882
  suffix: ".json"
75588
75883
  });
75589
75884
  const hookStartByChildKey = /* @__PURE__ */ new Map();
75590
- const traceTailState = yield* make$71({
75885
+ const traceTailState = yield* make$72({
75591
75886
  processedChars: 0,
75592
75887
  remainder: ""
75593
75888
  });
@@ -75635,7 +75930,7 @@ const createTrace2Monitor = fnUntraced(function* (input, progress) {
75635
75930
  });
75636
75931
  }
75637
75932
  });
75638
- const readTraceDelta = (yield* make$87(1)).withPermit(fs.readFileString(traceFilePath).pipe(flatMap((contents) => uninterruptible(modify(traceTailState, ({ processedChars, remainder }) => {
75933
+ const readTraceDelta = (yield* make$88(1)).withPermit(fs.readFileString(traceFilePath).pipe(flatMap((contents) => uninterruptible(modify$1(traceTailState, ({ processedChars, remainder }) => {
75639
75934
  if (contents.length <= processedChars) return [[], {
75640
75935
  processedChars,
75641
75936
  remainder
@@ -75655,7 +75950,7 @@ const createTrace2Monitor = fnUntraced(function* (input, progress) {
75655
75950
  }).pipe(ignoreCause({ log: true }), forkScoped);
75656
75951
  const finalizeTrace2Monitor = fn("finalizeTrace2Monitor")(function* () {
75657
75952
  yield* readTraceDelta;
75658
- const finalLine = yield* modify(traceTailState, ({ processedChars, remainder }) => [remainder.trim(), {
75953
+ const finalLine = yield* modify$1(traceTailState, ({ processedChars, remainder }) => [remainder.trim(), {
75659
75954
  processedChars,
75660
75955
  remainder: ""
75661
75956
  }]);
@@ -75821,7 +76116,7 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
75821
76116
  detail: "Failed to read Git process exit code.",
75822
76117
  cause
75823
76118
  }))),
75824
- input.stdin === void 0 ? void_$2 : run$1(encodeText(make$88(input.stdin)), child.stdin).pipe(mapError((cause) => new GitCommandError({
76119
+ input.stdin === void 0 ? void_$2 : run$1(encodeText(make$89(input.stdin)), child.stdin).pipe(mapError((cause) => new GitCommandError({
75825
76120
  ...gitCommandContext(commandInput),
75826
76121
  detail: "Failed to write Git process input.",
75827
76122
  cause
@@ -75862,7 +76157,7 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
75862
76157
  if (repositoryPaths === null) return effect;
75863
76158
  let lock = sharedConfigLocks.get(repositoryPaths.gitCommonDir);
75864
76159
  if (lock === void 0) {
75865
- lock = makeUnsafe$7(1);
76160
+ lock = makeUnsafe$8(1);
75866
76161
  sharedConfigLocks.set(repositoryPaths.gitCommonDir, lock);
75867
76162
  }
75868
76163
  return lock.withPermit(effect);
@@ -76063,7 +76358,7 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76063
76358
  onFailure: () => zero
76064
76359
  })
76065
76360
  });
76066
- const repositoryPathsRefreshCache = yield* makeWith$2((cwd) => invalidate(repositoryPathsCache, cwd).pipe(andThen(get(repositoryPathsCache, cwd))), {
76361
+ const repositoryPathsRefreshCache = yield* makeWith$2((cwd) => invalidate(repositoryPathsCache, cwd).pipe(andThen(get$1(repositoryPathsCache, cwd))), {
76067
76362
  capacity: REPOSITORY_PATHS_CACHE_CAPACITY,
76068
76363
  timeToLive: match$1({
76069
76364
  onSuccess: (repositoryPaths) => repositoryPaths === null ? NON_REPOSITORY_PATHS_CACHE_TTL : REPOSITORY_PATHS_REFRESH_COALESCE_TTL,
@@ -76073,7 +76368,7 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76073
76368
  const normalizeRepositoryPathsCacheKey = (cwd) => path.normalize(path.resolve(cwd));
76074
76369
  const resolveRepositoryPaths = (cwd, refresh = false) => {
76075
76370
  const cacheKey = normalizeRepositoryPathsCacheKey(cwd);
76076
- return get(refresh ? repositoryPathsRefreshCache : repositoryPathsCache, cacheKey);
76371
+ return get$1(refresh ? repositoryPathsRefreshCache : repositoryPathsCache, cacheKey);
76077
76372
  };
76078
76373
  const defaultBranchCache = yield* makeWith$2((gitCommonDir) => gen(function* () {
76079
76374
  const path = yield* Path;
@@ -76149,12 +76444,22 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76149
76444
  timeToLive: (exit, cacheKey) => isSuccess(exit) ? STATUS_UPSTREAM_REFRESH_INTERVAL : statusUpstreamRefreshFailureCooldown(statusRemoteRefreshFailureCounts.get(statusRemoteRefreshFailureKey(cacheKey)) ?? 1)
76150
76445
  });
76151
76446
  const refreshStatusUpstreamIfStale = fn("refreshStatusUpstreamIfStale")(function* (cwd) {
76152
- const upstream = yield* resolveCurrentUpstream(cwd);
76153
- if (!upstream) return;
76447
+ const headRef = yield* runGitStdout("GitVcsDriver.refreshStatusUpstreamIfStale.headRef", cwd, [
76448
+ "symbolic-ref",
76449
+ "--quiet",
76450
+ "HEAD"
76451
+ ], true).pipe(map$6((stdout) => stdout.trim()));
76452
+ if (headRef.length === 0) return;
76453
+ const remoteName = yield* runGitStdout("GitVcsDriver.refreshStatusUpstreamIfStale.upstreamRemote", cwd, [
76454
+ "for-each-ref",
76455
+ "--format=%(upstream:remotename)",
76456
+ headRef
76457
+ ], true).pipe(map$6((stdout) => stdout.trim()));
76458
+ if (remoteName.length === 0 || remoteName === ".") return;
76154
76459
  const gitCommonDir = yield* resolveGitCommonDir(cwd);
76155
- yield* get(statusRemoteRefreshCache, new StatusRemoteRefreshCacheKey({
76460
+ yield* get$1(statusRemoteRefreshCache, new StatusRemoteRefreshCacheKey({
76156
76461
  gitCommonDir,
76157
- remoteName: upstream.remoteName
76462
+ remoteName
76158
76463
  })).pipe(ignore$1);
76159
76464
  });
76160
76465
  const resolveDefaultBranchName = (cwd, remoteName) => executeGit("GitVcsDriver.resolveDefaultBranchName", cwd, ["symbolic-ref", `refs/remotes/${remoteName}/HEAD`], { allowNonZeroExit: true }).pipe(map$6((result) => {
@@ -76427,8 +76732,8 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76427
76732
  stderrLength: result.stderr.length
76428
76733
  }));
76429
76734
  }), result$1),
76430
- statusCacheKey ? get(defaultBranchCache, statusCacheKey).pipe(orElseSucceed(() => null)) : resolveDefaultBranchName(cwd, "origin").pipe(orElseSucceed(() => null)),
76431
- statusCacheKey ? get(primaryRemoteExistsCache, statusCacheKey).pipe(orElseSucceed(() => false)) : listRemoteNames(cwd).pipe(map$6((remoteNames) => remoteNames.length > 0), orElseSucceed(() => false))
76735
+ statusCacheKey ? get$1(defaultBranchCache, statusCacheKey).pipe(orElseSucceed(() => null)) : resolveDefaultBranchName(cwd, "origin").pipe(orElseSucceed(() => null)),
76736
+ statusCacheKey ? get$1(primaryRemoteExistsCache, statusCacheKey).pipe(orElseSucceed(() => false)) : listRemoteNames(cwd).pipe(map$6((remoteNames) => remoteNames.length > 0), orElseSucceed(() => false))
76432
76737
  ], { concurrency: "unbounded" });
76433
76738
  if (statusResult === null) return NON_REPOSITORY_STATUS_DETAILS;
76434
76739
  if (statusResult.exitCode !== 0) {
@@ -76522,7 +76827,8 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76522
76827
  workingTree: {
76523
76828
  files,
76524
76829
  insertions,
76525
- deletions
76830
+ deletions,
76831
+ ...repositoryPaths?.worktreeRoot ? { rootPath: repositoryPaths.worktreeRoot } : {}
76526
76832
  },
76527
76833
  ...branchChanges ? { branchChanges } : {},
76528
76834
  hasUpstream: upstreamRef !== null,
@@ -76643,6 +76949,8 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76643
76949
  ], { env });
76644
76950
  yield* stageCommitChanges(cwd, filePaths, env);
76645
76951
  const stagedSummary = yield* runGitStdoutWithOptions("GitVcsDriver.prepareCommitContext.stagedSummary", cwd, [
76952
+ "-c",
76953
+ "diff.relative=false",
76646
76954
  "diff",
76647
76955
  "--cached",
76648
76956
  "--name-status"
@@ -76654,6 +76962,8 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76654
76962
  return {
76655
76963
  stagedSummary,
76656
76964
  stagedPatch: yield* runGitStdoutWithOptions("GitVcsDriver.prepareCommitContext.stagedPatch", cwd, [
76965
+ "-c",
76966
+ "diff.relative=false",
76657
76967
  "diff",
76658
76968
  "--no-color",
76659
76969
  "--no-ext-diff",
@@ -76879,12 +77189,16 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76879
77189
  "log",
76880
77190
  "--oneline",
76881
77191
  "--no-color",
77192
+ "--no-decorate",
77193
+ "--no-show-signature",
76882
77194
  commitRange
76883
77195
  ], {
76884
77196
  maxOutputBytes: RANGE_COMMIT_SUMMARY_MAX_OUTPUT_BYTES,
76885
77197
  appendTruncationMarker: true
76886
77198
  }),
76887
77199
  runGitStdoutWithOptions("GitVcsDriver.readRangeContext.diffStat", cwd, [
77200
+ "-c",
77201
+ "diff.relative=false",
76888
77202
  "diff",
76889
77203
  "--stat",
76890
77204
  "--no-color",
@@ -76894,6 +77208,8 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76894
77208
  appendTruncationMarker: true
76895
77209
  }),
76896
77210
  runGitStdoutWithOptions("GitVcsDriver.readRangeContext.diffPatch", cwd, [
77211
+ "-c",
77212
+ "diff.relative=false",
76897
77213
  "diff",
76898
77214
  "--no-color",
76899
77215
  "--no-ext-diff",
@@ -76959,6 +77275,8 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76959
77275
  ...tempIndexConfig,
76960
77276
  "-c",
76961
77277
  "core.preloadIndex=false",
77278
+ "-c",
77279
+ "core.sparseCheckout=false",
76962
77280
  "--literal-pathspecs",
76963
77281
  "add",
76964
77282
  "--intent-to-add",
@@ -76986,9 +77304,9 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76986
77304
  "-z",
76987
77305
  "--",
76988
77306
  ...pathArgs
76989
- ], { maxOutputBytes: REVIEW_METADATA_MAX_OUTPUT_BYTES }).pipe(catchIf((error) => error.outputLength === void 0, () => succeed(null)));
77307
+ ], { maxOutputBytes: REVIEW_METADATA_MAX_OUTPUT_BYTES }).pipe(orElseSucceed(() => null));
76990
77308
  if (untracked === null) return null;
76991
- const paths = splitNullSeparatedGitStdoutPaths(untracked).filter((candidate) => onlyPath === void 0 || candidate === onlyPath);
77309
+ const paths = splitNullSeparatedGitStdoutPaths(untracked).filter((candidate) => onlyPath === void 0 || candidate === onlyPath || candidate === `${onlyPath}/`);
76992
77310
  if (paths.length === 0) return { env: void 0 };
76993
77311
  if (paths.length > REVIEW_UNTRACKED_MAX_FILES) return null;
76994
77312
  return { env: yield* prepareReviewIndex(cwd, paths).pipe(catchTags({ PlatformError: (cause) => fail$1(new GitCommandError({
@@ -77448,7 +77766,7 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
77448
77766
  });
77449
77767
  const listRefsRefreshSnapshotCache = yield* makeWith$2((cacheKey) => suspend(() => {
77450
77768
  const epoch = bumpListRefsEpoch(cacheKey.gitCommonDir);
77451
- return get(listRefsSnapshotCache, new GitRefsSnapshotCacheKey({
77769
+ return get$1(listRefsSnapshotCache, new GitRefsSnapshotCacheKey({
77452
77770
  gitCommonDir: cacheKey.gitCommonDir,
77453
77771
  epoch
77454
77772
  }));
@@ -77460,10 +77778,10 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
77460
77778
  while (true) {
77461
77779
  const generation = currentListRefsGeneration(gitCommonDir);
77462
77780
  const currentEpoch = listRefsEpochByCommonDir.get(gitCommonDir);
77463
- const snapshot = refresh || currentEpoch === void 0 ? yield* get(listRefsRefreshSnapshotCache, new GitRefsRefreshCacheKey({
77781
+ const snapshot = refresh || currentEpoch === void 0 ? yield* get$1(listRefsRefreshSnapshotCache, new GitRefsRefreshCacheKey({
77464
77782
  gitCommonDir,
77465
77783
  generation
77466
- })) : yield* get(listRefsSnapshotCache, new GitRefsSnapshotCacheKey({
77784
+ })) : yield* get$1(listRefsSnapshotCache, new GitRefsSnapshotCacheKey({
77467
77785
  gitCommonDir,
77468
77786
  epoch: currentEpoch
77469
77787
  }));
@@ -77472,7 +77790,7 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
77472
77790
  });
77473
77791
  const invalidateListRefsSnapshot = fn("invalidateListRefsSnapshot")(function* (cwd) {
77474
77792
  const repositoryPathsCacheKey = normalizeRepositoryPathsCacheKey(cwd);
77475
- const repositoryPaths = yield* get(repositoryPathsCache, repositoryPathsCacheKey);
77793
+ const repositoryPaths = yield* get$1(repositoryPathsCache, repositoryPathsCacheKey);
77476
77794
  if (repositoryPaths === null) return;
77477
77795
  const previousGeneration = currentListRefsGeneration(repositoryPaths.gitCommonDir);
77478
77796
  bumpListRefsGeneration(repositoryPaths.gitCommonDir);
@@ -78049,8 +78367,8 @@ const canRetryFullFsync = (stderr) => /fsync error on [^\r\n]+: operation not su
78049
78367
  const make$32 = gen(function* () {
78050
78368
  const processRunner = yield* ProcessRunner;
78051
78369
  const hostPlatform = yield* Platform;
78052
- const vcsProcesses = yield* make$87(VCS_PROCESS_CONCURRENCY);
78053
- const nonGitProcesses = yield* make$87(NON_GIT_PROCESS_CONCURRENCY);
78370
+ const vcsProcesses = yield* make$88(VCS_PROCESS_CONCURRENCY);
78371
+ const nonGitProcesses = yield* make$88(NON_GIT_PROCESS_CONCURRENCY);
78054
78372
  const spawn = (input, baseError) => processRunner.run({
78055
78373
  command: input.command,
78056
78374
  args: input.args,
@@ -78659,6 +78977,8 @@ const makeVcsDriverShape = fn("makeGitVcsDriverShape")(function* () {
78659
78977
  args: [
78660
78978
  ...indexConfig,
78661
78979
  ...durableWrite,
78980
+ "-c",
78981
+ "core.safecrlf=false",
78662
78982
  "add",
78663
78983
  ...sparseCheckout ? ["--sparse"] : [],
78664
78984
  "-A",
@@ -78815,7 +79135,7 @@ const makeVcsDriverShape = fn("makeGitVcsDriverShape")(function* () {
78815
79135
  });
78816
79136
  }
78817
79137
  yield* recreateWorkspace;
78818
- if (yield* hasHeadCommit(input.cwd)) yield* execute({
79138
+ yield* execute({
78819
79139
  operation,
78820
79140
  cwd: input.cwd,
78821
79141
  args: [
@@ -78867,6 +79187,7 @@ const makeVcsDriverShape = fn("makeGitVcsDriverShape")(function* () {
78867
79187
  "--no-color",
78868
79188
  "--no-ext-diff",
78869
79189
  "--no-textconv",
79190
+ "--submodule=short",
78870
79191
  ...PATCH_RENDER_PREFIX_ARGS,
78871
79192
  ...input.ignoreWhitespace ? ["--ignore-all-space"] : [],
78872
79193
  `${fromRevision}^{commit}`,
@@ -79081,7 +79402,7 @@ function sourceControlRefFromInput(input) {
79081
79402
  function repositoryPathFromRemoteUrl(url) {
79082
79403
  const trimmed = url?.trim() ?? "";
79083
79404
  if (trimmed.length === 0) return null;
79084
- const path = /^(?:[^@/\s]+@[^:/\s]+:|(?:ssh|https?|git):\/\/[^/]+\/)((?:[^/\s]+\/)+[^/\s]+?)(?:\.git)?\/?$/iu.exec(trimmed)?.[1]?.trim() ?? "";
79405
+ const path = /^(?:[^@/\s]+@[^:/\s]+:|[^@:/\\\s]{2,}:(?!:)|(?:ssh|https?|git):\/\/[^/]+\/)((?:[^/\s]+\/)+[^/\s]+?)(?:\.git)?\/?$/iu.exec(trimmed)?.[1]?.trim() ?? "";
79085
79406
  return path.length > 0 ? path : null;
79086
79407
  }
79087
79408
  var SourceControlProvider = class extends Service()("@p4code/source-control-core/server/SourceControlProvider") {};
@@ -79128,11 +79449,11 @@ function retryAtFromHeader(value, now) {
79128
79449
  }
79129
79450
  /** @public Service construction is part of the canonical Effect module API. */
79130
79451
  const make$30 = gen(function* () {
79131
- const entries = yield* make$71(/* @__PURE__ */ new Map());
79452
+ const entries = yield* make$72(/* @__PURE__ */ new Map());
79132
79453
  const check = fn("SourceControlRateLimit.check")(function* (input, options) {
79133
79454
  const now = yield* currentTimeMillis;
79134
79455
  const key = normalizedKey(input, yield* CredentialScope);
79135
- const entry = (yield* get$2(entries)).get(key);
79456
+ const entry = (yield* get$3(entries)).get(key);
79136
79457
  if (entry !== void 0 && entry.retryAt > now && options?.allowPaused !== true) return yield* new SourceControlRateLimitPausedError({
79137
79458
  provider: input.provider,
79138
79459
  host: input.host.trim().toLowerCase(),
@@ -79143,7 +79464,7 @@ const make$30 = gen(function* () {
79143
79464
  const recordRateLimit = fn("SourceControlRateLimit.recordRateLimit")(function* (input) {
79144
79465
  const now = yield* currentTimeMillis;
79145
79466
  const key = normalizedKey(input, yield* CredentialScope);
79146
- yield* update(entries, (current) => {
79467
+ yield* update$1(entries, (current) => {
79147
79468
  const previous = current.get(key);
79148
79469
  if (previous !== void 0 && previous.generation > input.lease) {
79149
79470
  if (previous.retryAt <= now && (input.retryAt === void 0 || input.retryAt <= now)) return current;
@@ -79171,7 +79492,7 @@ const make$30 = gen(function* () {
79171
79492
  const recordSuccess = fn("SourceControlRateLimit.recordSuccess")(function* (input) {
79172
79493
  const now = yield* currentTimeMillis;
79173
79494
  const key = normalizedKey(input, yield* CredentialScope);
79174
- yield* update(entries, (current) => {
79495
+ yield* update$1(entries, (current) => {
79175
79496
  const previous = current.get(key);
79176
79497
  if (previous === void 0 || previous.generation !== input.lease || previous.retryAt > now) return current;
79177
79498
  const next = new Map(current);
@@ -79590,10 +79911,10 @@ const make$29 = gen(function* () {
79590
79911
  }
79591
79912
  return yield* new BitbucketRepositoryRemoteNotFoundError({ cwd: input.cwd });
79592
79913
  });
79593
- const getRepositoryFromLocator = (repository) => executeJson("getRepository", get$8(apiUrl(`/repositories/${encodeURIComponent(repository.workspace)}/${encodeURIComponent(repository.repoSlug)}`)), RawBitbucketRepositorySchema);
79914
+ const getRepositoryFromLocator = (repository) => executeJson("getRepository", get$9(apiUrl(`/repositories/${encodeURIComponent(repository.workspace)}/${encodeURIComponent(repository.repoSlug)}`)), RawBitbucketRepositorySchema);
79594
79915
  const getRepository = (input) => resolveRepository(input).pipe(flatMap(getRepositoryFromLocator));
79595
- const getBranchingModelFromLocator = (repository) => executeJson("getBranchingModel", get$8(apiUrl(`/repositories/${encodeURIComponent(repository.workspace)}/${encodeURIComponent(repository.repoSlug)}/branching-model`)), RawBitbucketBranchingModelSchema);
79596
- const getRawPullRequestFromRepository = (repository, reference) => executeJson("getPullRequest", get$8(apiUrl(`/repositories/${encodeURIComponent(repository.workspace)}/${encodeURIComponent(repository.repoSlug)}/pullrequests/${encodeURIComponent(normalizeChangeRequestId$1(reference))}`)), BitbucketPullRequestSchema);
79916
+ const getBranchingModelFromLocator = (repository) => executeJson("getBranchingModel", get$9(apiUrl(`/repositories/${encodeURIComponent(repository.workspace)}/${encodeURIComponent(repository.repoSlug)}/branching-model`)), RawBitbucketBranchingModelSchema);
79917
+ const getRawPullRequestFromRepository = (repository, reference) => executeJson("getPullRequest", get$9(apiUrl(`/repositories/${encodeURIComponent(repository.workspace)}/${encodeURIComponent(repository.repoSlug)}/pullrequests/${encodeURIComponent(normalizeChangeRequestId$1(reference))}`)), BitbucketPullRequestSchema);
79597
79918
  const getRawPullRequest = (input) => resolveRepository(input).pipe(flatMap((repository) => getRawPullRequestFromRepository(repository, input.reference)));
79598
79919
  const readConfigValueNullable = (cwd, key) => git.readConfigValue(cwd, key).pipe(orElseSucceed(() => null));
79599
79920
  const resolveCheckoutRemote = fn("BitbucketApi.resolveCheckoutRemote")(function* (input) {
@@ -79636,7 +79957,7 @@ const make$29 = gen(function* () {
79636
79957
  const send = (input) => {
79637
79958
  const url = trustedUrl(input.url);
79638
79959
  if (url === null) return fail$1(new BitbucketUntrustedUrlError({ host: originOf(input.url) ?? "an unreadable url" }));
79639
- const base = input.method === "GET" ? get$8(url) : input.method === "POST" ? post(url) : input.method === "DELETE" ? make$82("DELETE")(url) : put(url);
79960
+ const base = input.method === "GET" ? get$9(url) : input.method === "POST" ? post(url) : input.method === "DELETE" ? make$83("DELETE")(url) : put(url);
79640
79961
  const withBody = input.body === void 0 ? base : base.pipe(bodyText(input.body, "application/json"));
79641
79962
  return withAuth(withBody).pipe(flatMap(httpClient.execute), mapError((cause) => new BitbucketRequestError({
79642
79963
  operation: "request",
@@ -79673,7 +79994,7 @@ const make$29 = gen(function* () {
79673
79994
  })) }));
79674
79995
  return BitbucketApi.of({
79675
79996
  request,
79676
- probeAuth: currentCredential.pipe(flatMap((credential) => credential === null ? succeed(authFromCredential(null)) : executeJson("probeAuth", get$8(apiUrl("/user")), BitbucketUserSchema).pipe(map$6((user) => ({
79997
+ probeAuth: currentCredential.pipe(flatMap((credential) => credential === null ? succeed(authFromCredential(null)) : executeJson("probeAuth", get$9(apiUrl("/user")), BitbucketUserSchema).pipe(map$6((user) => ({
79677
79998
  status: "authenticated",
79678
79999
  account: nonEmpty(user.username ?? user.display_name ?? user.account_id),
79679
80000
  host: some("bitbucket.org"),
@@ -79687,7 +80008,7 @@ const make$29 = gen(function* () {
79687
80008
  q: bitbucketQueryString([`source.branch.name = "${sourceBranch(input).replaceAll("\"", "\\\"")}"`, bitbucketStateFilter(states)]),
79688
80009
  state: states
79689
80010
  };
79690
- return executeJson("listPullRequests", get$8(apiUrl(`/repositories/${encodeURIComponent(repository.workspace)}/${encodeURIComponent(repository.repoSlug)}/pullrequests`), { urlParams: query }), BitbucketPullRequestListSchema);
80011
+ return executeJson("listPullRequests", get$9(apiUrl(`/repositories/${encodeURIComponent(repository.workspace)}/${encodeURIComponent(repository.repoSlug)}/pullrequests`), { urlParams: query }), BitbucketPullRequestListSchema);
79691
80012
  }), map$6((list) => list.values.map(normalizeBitbucketPullRequestRecord))),
79692
80013
  getPullRequest: (input) => getRawPullRequest(input).pipe(map$6(normalizeBitbucketPullRequestRecord)),
79693
80014
  getRepositoryCloneUrls: (input) => getRepository(input).pipe(map$6(normalizeRepositoryCloneUrls$2)),
@@ -81849,7 +82170,7 @@ function patchHeader(change) {
81849
82170
  const lines = [`diff --git ${oldSide} ${newSide}`];
81850
82171
  if (change.changeKind === "new") lines.push("new file mode 100644");
81851
82172
  if (change.changeKind === "deleted") lines.push("deleted file mode 100644");
81852
- if (change.changeKind === "rename-pure" || change.changeKind === "rename-changed") lines.push(`rename from ${quoteGitPatchPath(change.oldPath)}`, `rename to ${quoteGitPatchPath(change.path)}`);
82173
+ if (change.changeKind === "rename-pure" || change.changeKind === "rename-changed") lines.push(`similarity index ${change.changeKind === "rename-pure" ? 100 : 0}%`, `rename from ${quoteGitPatchPath(change.oldPath)}`, `rename to ${quoteGitPatchPath(change.path)}`);
81853
82174
  lines.push(`--- ${change.changeKind === "new" ? "/dev/null" : oldSide}`, `+++ ${change.changeKind === "deleted" ? "/dev/null" : newSide}`);
81854
82175
  return lines.join("\n");
81855
82176
  }
@@ -82060,7 +82381,7 @@ function toChangeRequest$6(pullRequest) {
82060
82381
  }
82061
82382
  const make$26 = gen(function* () {
82062
82383
  const cli = yield* AzureDevOpsPullRequestCli;
82063
- const diffSpawns = yield* make$87(8);
82384
+ const diffSpawns = yield* make$88(8);
82064
82385
  const readItemContent = (input) => diffSpawns.withPermits(1)(cli.readItemContent(input));
82065
82386
  const fail = (operation) => (error) => new PullRequestProviderError({
82066
82387
  provider: SourceControlProviderKind.make("azure-devops"),
@@ -82522,20 +82843,23 @@ function probeSourceControlProvider(input) {
82522
82843
  auth
82523
82844
  })));
82524
82845
  const spec = input.spec;
82525
- return all$5([probeCli({
82526
- spec,
82527
- process: input.process,
82528
- cwd: input.cwd
82529
- }), input.process.run({
82846
+ const runAuth = (args) => input.process.run({
82530
82847
  operation: "source-control.discovery.auth",
82531
82848
  command: spec.executable,
82532
- args: spec.authArgs,
82849
+ args,
82533
82850
  cwd: input.cwd,
82534
82851
  allowNonZeroExit: true,
82535
82852
  timeoutMs: probeTimeoutMs(spec),
82536
82853
  maxOutputBytes: 8e3,
82537
82854
  appendTruncationMarker: true
82538
- }).pipe(map$6(spec.parseAuth), catch_((cause) => succeed(unknownAuth(getOrUndefined(detailFromCause(cause))))))], { concurrency: "unbounded" }).pipe(map$6(([item, auth]) => ({
82855
+ }).pipe(map$6(spec.parseAuth), catch_((cause) => succeed(unknownAuth(getOrUndefined(detailFromCause(cause))))));
82856
+ const retryArgs = spec.authRetryArgs;
82857
+ const auth = retryArgs === void 0 ? runAuth(spec.authArgs) : runAuth(spec.authArgs).pipe(filterOrElse((result) => result.status !== "unauthenticated", (signedOut) => runAuth(retryArgs).pipe(map$6((retry) => retry.status === "authenticated" ? retry : signedOut))));
82858
+ return all$5([probeCli({
82859
+ spec,
82860
+ process: input.process,
82861
+ cwd: input.cwd
82862
+ }), auth], { concurrency: "unbounded" }).pipe(map$6(([item, auth]) => ({
82539
82863
  ...item,
82540
82864
  auth: item.status === "available" ? auth : unknownAuth("Hosting integration command was not found on the server PATH.")
82541
82865
  })));
@@ -83003,7 +83327,7 @@ function trimmed$2(value) {
83003
83327
  * the other hosts already use.
83004
83328
  */
83005
83329
  function toIsoUtc$1(value) {
83006
- return match(make$80(value), {
83330
+ return match(make$81(value), {
83007
83331
  onNone: () => value,
83008
83332
  onSome: formatIso
83009
83333
  });
@@ -83645,7 +83969,7 @@ const make$24 = gen(function* () {
83645
83969
  getFileRevisions: (input) => input.paths.length === 0 ? succeed({
83646
83970
  revisions: /* @__PURE__ */ new Map(),
83647
83971
  complete: false
83648
- }) : get(revisionPatches, JSON.stringify([input.repository, input.number])).pipe(map$6((diff) => {
83972
+ }) : get$1(revisionPatches, JSON.stringify([input.repository, input.number])).pipe(map$6((diff) => {
83649
83973
  const revisions = new Map(diff.revisions);
83650
83974
  if (!diff.truncated) {
83651
83975
  for (const path of input.paths) if (!revisions.has(path)) revisions.set(path, "");
@@ -84264,7 +84588,7 @@ const make$21 = gen(function* () {
84264
84588
  const { process } = yield* SourceControlHost;
84265
84589
  const fileSystem = yield* FileSystem;
84266
84590
  const httpClient = yield* HttpClient;
84267
- const authLock = yield* make$87(1);
84591
+ const authLock = yield* make$88(1);
84268
84592
  const authenticated = /* @__PURE__ */ new Map();
84269
84593
  const execute = (input) => process.run({
84270
84594
  ...input,
@@ -84361,7 +84685,7 @@ const make$21 = gen(function* () {
84361
84685
  cwd: input.cwd,
84362
84686
  detail: "Invalid Forgejo API path."
84363
84687
  });
84364
- let request = make$82(input.method ?? "GET")(url.toString()).pipe(setHeader("Authorization", `token ${input.token}`));
84688
+ let request = make$83(input.method ?? "GET")(url.toString()).pipe(setHeader("Authorization", `token ${input.token}`));
84365
84689
  if (input.body !== void 0) request = request.pipe(bodyText(input.body, "application/json"));
84366
84690
  const response = yield* httpClient.execute(request).pipe(provideService(RequestInit, { redirect: "manual" }));
84367
84691
  const status = response.status;
@@ -84749,7 +85073,7 @@ function forgejoActor(user) {
84749
85073
  } : null;
84750
85074
  }
84751
85075
  function toIsoUtc(value) {
84752
- return match(make$80(value), {
85076
+ return match(make$81(value), {
84753
85077
  onNone: () => value,
84754
85078
  onSome: formatIso
84755
85079
  });
@@ -85910,7 +86234,7 @@ const make$18 = gen(function* () {
85910
86234
  const token = fromEnv ?? (yield* fromCafe(host));
85911
86235
  return {
85912
86236
  host,
85913
- token: make$81(token),
86237
+ token: make$82(token),
85914
86238
  source: fromEnv !== null ? "env" : "cafe"
85915
86239
  };
85916
86240
  });
@@ -85919,9 +86243,9 @@ const make$18 = gen(function* () {
85919
86243
  timeToLive: (exit) => isSuccess(exit) ? TOKEN_TTL$1 : findErrorOption$1(exit).pipe(exists((error) => error._tag === "GitCafeCliFailedError")) ? zero : MISSING_TTL$1
85920
86244
  });
85921
86245
  return GitCafeCredentials.of({
85922
- get: (host) => fromSettings(host).pipe(flatMap((saved) => saved === null ? get(cache, normalizeHost$2(host)) : succeed({
86246
+ get: (host) => fromSettings(host).pipe(flatMap((saved) => saved === null ? get$1(cache, normalizeHost$2(host)) : succeed({
85923
86247
  host: normalizeHost$2(host),
85924
- token: make$81(saved),
86248
+ token: make$82(saved),
85925
86249
  source: "settings"
85926
86250
  }))),
85927
86251
  invalidate: (host) => invalidate(cache, normalizeHost$2(host)),
@@ -85949,7 +86273,7 @@ const REPOSITORY = /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/u;
85949
86273
  const REMOTE_PATTERNS = [
85950
86274
  /^https?:\/\/(?:[^@/]+@)?([^/:]+)(?::\d+)?\/(.+)$/iu,
85951
86275
  /^ssh:\/\/[^@/]+@([^/:]+)(?::\d+)?\/(.+)$/iu,
85952
- /^[^@/:]+@([^/:]+):(.+)$/u
86276
+ /^(?:[^@/:]+@)?([^/:]+):(.+)$/u
85953
86277
  ];
85954
86278
  /** An `owner/name` repository path, without the `.git` suffix a clone URL carries. */
85955
86279
  function gitCafeRepositoryPath(path) {
@@ -86060,7 +86384,7 @@ const make$17 = gen(function* () {
86060
86384
  const origin = `https://${host}`;
86061
86385
  const method = input.method ?? "GET";
86062
86386
  const send = (url) => {
86063
- const base = make$82(method)(url).pipe(bearerToken(value$2(credential.token)), setHeaders({
86387
+ const base = make$83(method)(url).pipe(bearerToken(value$2(credential.token)), setHeaders({
86064
86388
  accept: "application/json",
86065
86389
  "user-agent": "p4code"
86066
86390
  }));
@@ -86525,7 +86849,7 @@ function toActivity(input) {
86525
86849
  commits: input.commits.items.map((commit) => ({
86526
86850
  oid: commit.oid,
86527
86851
  messageHeadline: commit.summary,
86528
- committedDate: formatIso(makeUnsafe$5(commit.time * 1e3))
86852
+ committedDate: formatIso(makeUnsafe$6(commit.time * 1e3))
86529
86853
  })),
86530
86854
  ...reactions === void 0 ? {} : { reactions: reactions.reactions }
86531
86855
  };
@@ -87462,7 +87786,7 @@ const cloneUrls = (target) => ({
87462
87786
  sshUrl: `ssh@${target.host}:${target.repository}.git`
87463
87787
  });
87464
87788
  /** An scp-like `user@host:path` or `ssh://` remote; HTTPS remotes may carry userinfo too. */
87465
- const isSshRemote = (remoteUrl) => remoteUrl !== void 0 && (/^ssh:\/\//iu.test(remoteUrl) || /^[^/:]+@[^/:]+:/u.test(remoteUrl));
87789
+ const isSshRemote = (remoteUrl) => remoteUrl !== void 0 && isSshRemoteUrl(remoteUrl);
87466
87790
  const pullUrlPattern = /^https:\/\/([^/]+)\/([^/]+\/[^/]+)\/pulls\/(\d+)\/?(?:[?#].*)?$/u;
87467
87791
  const make$15 = gen(function* () {
87468
87792
  const api = yield* GitCafeApi;
@@ -87826,7 +88150,7 @@ const make$14 = gen(function* () {
87826
88150
  const token = fromEnv ?? (yield* fromGh(host, choice).pipe(catchTags({ GitHubNotSignedInError: (error) => choice === void 0 ? fail$1(error) : fromGh(host, void 0) })));
87827
88151
  return {
87828
88152
  host,
87829
- token: make$81(token),
88153
+ token: make$82(token),
87830
88154
  source: fromEnv !== null ? "env" : "gh",
87831
88155
  fingerprint: yield* fingerprintOf(host, token)
87832
88156
  };
@@ -87844,11 +88168,11 @@ const make$14 = gen(function* () {
87844
88168
  const saved = yield* savedToken(host);
87845
88169
  if (saved !== null) return {
87846
88170
  host,
87847
- token: make$81(saved),
88171
+ token: make$82(saved),
87848
88172
  source: "settings",
87849
88173
  fingerprint: yield* fingerprintOf(host, saved)
87850
88174
  };
87851
- return yield* get(cache, cacheKey(host, choice?.account));
88175
+ return yield* get$1(cache, cacheKey(host, choice?.account));
87852
88176
  }),
87853
88177
  invalidate: (rawHost) => {
87854
88178
  const host = normalizeHost$1(rawHost);
@@ -87891,12 +88215,12 @@ function quotaFromHeaders(headers) {
87891
88215
  */
87892
88216
  var GitHubQuota = class extends Service()("@p4code/source-control-github/server/GitHubQuota") {};
87893
88217
  const make$13 = gen(function* () {
87894
- const snapshots = yield* make$71(/* @__PURE__ */ new Map());
88218
+ const snapshots = yield* make$72(/* @__PURE__ */ new Map());
87895
88219
  const keyOf = (host, resource, scope) => `${host.trim().toLowerCase()}\0${resource}\0${scope}`;
87896
88220
  const admit = fn("GitHubQuota.admit")(function* (host, resource, options) {
87897
88221
  const now = yield* currentTimeMillis;
87898
88222
  const key = keyOf(host, resource, yield* CredentialScope);
87899
- const snapshot = (yield* get$2(snapshots)).get(key);
88223
+ const snapshot = (yield* get$3(snapshots)).get(key);
87900
88224
  if (snapshot === void 0 || snapshot.resetAtMs <= now) return;
87901
88225
  const floor = options?.allowReserve === true ? 1 : snapshot.limit * RESERVE_RATIO;
87902
88226
  if (snapshot.remaining >= floor) return;
@@ -87910,7 +88234,7 @@ const make$13 = gen(function* () {
87910
88234
  const quota = quotaFromHeaders(headers);
87911
88235
  if (quota === null) return;
87912
88236
  const key = keyOf(host, quota.resource, yield* CredentialScope);
87913
- yield* update(snapshots, (current) => {
88237
+ yield* update$1(snapshots, (current) => {
87914
88238
  const previous = current.get(key);
87915
88239
  if (previous !== void 0 && quota.resetAtMs < previous.resetAtMs) return current;
87916
88240
  const next = new Map(current);
@@ -88097,7 +88421,7 @@ const make$12 = gen(function* () {
88097
88421
  const credentials = yield* GitHubCredentials;
88098
88422
  const quota = yield* GitHubQuota;
88099
88423
  const limits = yield* SourceControlRateLimit;
88100
- const gate = yield* make$87(CONCURRENCY);
88424
+ const gate = yield* make$88(CONCURRENCY);
88101
88425
  const credential = fn("GitHubApi.credential")(function* (host) {
88102
88426
  const normalized = normalizeHost(host);
88103
88427
  const pinned = yield* PinnedGitHubCredential;
@@ -88221,7 +88545,7 @@ const make$12 = gen(function* () {
88221
88545
  });
88222
88546
  const rest = (input) => {
88223
88547
  const url = `${gitHubApiUrls(input.host).rest}/${input.path.replace(/^\/+/, "")}`;
88224
- const base = make$82(input.method ?? "GET")(url).pipe(setHeader("accept", input.accept ?? "application/vnd.github+json"));
88548
+ const base = make$83(input.method ?? "GET")(url).pipe(setHeader("accept", input.accept ?? "application/vnd.github+json"));
88225
88549
  const withEtag = input.ifNoneMatch === void 0 ? base : base.pipe(setHeader("if-none-match", input.ifNoneMatch));
88226
88550
  const request = input.body === void 0 ? withEtag : withEtag.pipe(bodyJsonUnsafe(input.body));
88227
88551
  return Interactive.pipe(flatMap((interactive) => send({
@@ -88343,7 +88667,7 @@ const UNSUPPORTED_STATUSES = /* @__PURE__ */ new Set([
88343
88667
  const makeChecksRevalidator = gen(function* () {
88344
88668
  const api = yield* GitHubApi;
88345
88669
  const entries = yield* makeWith$2((_key) => sync$1(() => ({
88346
- gate: makeUnsafe$7(1),
88670
+ gate: makeUnsafe$8(1),
88347
88671
  validators: /* @__PURE__ */ new Map(),
88348
88672
  head: null,
88349
88673
  value: null,
@@ -88357,7 +88681,7 @@ const makeChecksRevalidator = gen(function* () {
88357
88681
  const credential = yield* PinnedGitHubCredential;
88358
88682
  if (credential === null) return yield* read;
88359
88683
  const key = `${credential.credentialFingerprint}\0${input.host}\0${input.repository}\0${input.number}`;
88360
- const entry = yield* get(entries, key);
88684
+ const entry = yield* get$1(entries, key);
88361
88685
  return yield* entry.gate.withPermit(gen(function* () {
88362
88686
  if (!entry.supported) return yield* read;
88363
88687
  const fail = (status) => new GitHubApiResponseError({
@@ -90571,7 +90895,11 @@ function toFilesPatch(entries) {
90571
90895
  `diff --git ${quoteGitPatchPath(`a/${oldPath}`)} ${quoteGitPatchPath(`b/${value.filename}`)}`,
90572
90896
  ...status === "added" ? ["new file mode 100644"] : [],
90573
90897
  ...status === "removed" ? ["deleted file mode 100644"] : [],
90574
- ...status === "renamed" ? [`rename from ${quoteGitPatchPath(oldPath)}`, `rename to ${quoteGitPatchPath(value.filename)}`] : [],
90898
+ ...status === "renamed" ? [
90899
+ `similarity index ${hunks.length > 0 || (value.additions ?? 0) + (value.deletions ?? 0) > 0 ? 0 : 100}%`,
90900
+ `rename from ${quoteGitPatchPath(oldPath)}`,
90901
+ `rename to ${quoteGitPatchPath(value.filename)}`
90902
+ ] : [],
90575
90903
  `--- ${status === "added" ? "/dev/null" : quoteGitPatchPath(`a/${oldPath}`)}`,
90576
90904
  `+++ ${status === "removed" ? "/dev/null" : quoteGitPatchPath(`b/${value.filename}`)}`
90577
90905
  ].join("\n");
@@ -90835,8 +91163,14 @@ const cascadeRebaseStack = fn("cascadeRebaseStack")(function* (input) {
90835
91163
  ]).pipe(mapError(failed("fetching", first.number, 0)));
90836
91164
  let parentOld = `origin/${input.base}`;
90837
91165
  let parentNew = `origin/${input.base}`;
91166
+ const mergedParent = input.mergedHeadSha !== void 0 && (yield* git([
91167
+ "merge-base",
91168
+ "--is-ancestor",
91169
+ input.mergedHeadSha,
91170
+ first.headSha
91171
+ ], true).pipe(mapError(failed("reading the fork point", first.number, 0)))).exitCode === 0 ? input.mergedHeadSha : void 0;
90838
91172
  for (const [index, layer] of input.layers.entries()) {
90839
- const upstream = index === 0 ? (yield* git([
91173
+ const upstream = index === 0 ? mergedParent ?? (yield* git([
90840
91174
  "merge-base",
90841
91175
  parentOld,
90842
91176
  layer.headSha
@@ -91007,6 +91341,7 @@ const runGitHubStackAction = fn("runGitHubStackAction")(function* (input) {
91007
91341
  const pr = access.data.repository?.[`pr${layer.number}`];
91008
91342
  return !pr?.headRepository || !pr.maintainerCanModify && !toCanWrite(pr.headRepository.viewerPermission);
91009
91343
  })) return yield* new GitHubStackPermissionError({ ...identity });
91344
+ const mergedHeadSha = stack.layers[stack.layers.indexOf(open[0]) - 1]?.headSha;
91010
91345
  yield* cascadeRebaseStack({
91011
91346
  host: input.host,
91012
91347
  repository: input.repository,
@@ -91015,7 +91350,8 @@ const runGitHubStackAction = fn("runGitHubStackAction")(function* (input) {
91015
91350
  number: layer.number,
91016
91351
  headBranch: layer.headBranch,
91017
91352
  headSha: layer.headSha
91018
- }))
91353
+ })),
91354
+ ...mergedHeadSha === void 0 ? {} : { mergedHeadSha }
91019
91355
  }).pipe(mapError((cause) => cause._tag === "GitHubStackRebaseConflictError" || cause._tag === "GitHubStackRebaseGitError" ? new GitHubStackRebaseFailedError({
91020
91356
  ...identity,
91021
91357
  number: cause.number,
@@ -91515,7 +91851,7 @@ const make$11 = gen(function* () {
91515
91851
  };
91516
91852
  return yield* acquireUseRelease(sync$1(() => {
91517
91853
  const lock = identityLocks.get(key) ?? {
91518
- gate: makeUnsafe$7(1),
91854
+ gate: makeUnsafe$8(1),
91519
91855
  users: 0
91520
91856
  };
91521
91857
  lock.users++;
@@ -95334,7 +95670,11 @@ function decodeMergeRequestDiffsJson(raw) {
95334
95670
  `diff --git ${quoteGitPatchPath(`a/${value.old_path}`)} ${quoteGitPatchPath(`b/${value.new_path}`)}`,
95335
95671
  ...value.new_file === true ? [`new file mode ${value.b_mode ?? "100644"}`] : [],
95336
95672
  ...value.deleted_file === true ? [`deleted file mode ${value.a_mode ?? "100644"}`] : [],
95337
- ...value.renamed_file === true ? [`rename from ${quoteGitPatchPath(value.old_path)}`, `rename to ${quoteGitPatchPath(value.new_path)}`] : [],
95673
+ ...value.renamed_file === true ? [
95674
+ `similarity index ${hunks.length > 0 || value.too_large === true || value.collapsed === true ? 0 : 100}%`,
95675
+ `rename from ${quoteGitPatchPath(value.old_path)}`,
95676
+ `rename to ${quoteGitPatchPath(value.new_path)}`
95677
+ ] : [],
95338
95678
  `--- ${from}`,
95339
95679
  `+++ ${to}`
95340
95680
  ].join("\n");
@@ -96645,6 +96985,11 @@ const discovery = {
96645
96985
  executable: "glab",
96646
96986
  versionArgs: ["--version"],
96647
96987
  authArgs: ["auth", "status"],
96988
+ authRetryArgs: [
96989
+ "auth",
96990
+ "status",
96991
+ "--all"
96992
+ ],
96648
96993
  parseAuth: parseGitLabAuth,
96649
96994
  refineUnknownRemote: refineUnknownGitLabRemote,
96650
96995
  installHint: "Install the GitLab command-line tool (`glab`) from https://gitlab.com/gitlab-org/cli or your package manager (for example `brew install glab`)."
@@ -96883,7 +97228,7 @@ const make$3 = gen(function* () {
96883
97228
  const projectConfig = yield* VcsProjectConfig;
96884
97229
  const git = yield* makeVcsDriver;
96885
97230
  const drivers = { git };
96886
- const get$10 = (kind) => {
97231
+ const get = (kind) => {
96887
97232
  const driver = drivers[kind];
96888
97233
  if (!driver) return fail$1(new VcsUnsupportedOperationError({
96889
97234
  operation: "VcsDriverRegistry.get",
@@ -96904,7 +97249,7 @@ const make$3 = gen(function* () {
96904
97249
  const detectResolvedKind = fn("VcsDriverRegistry.detectResolvedKind")(function* (input) {
96905
97250
  const requestedKind = input.requestedKind;
96906
97251
  if (requestedKind !== "auto" && requestedKind !== "unknown") {
96907
- const driver = yield* get$10(requestedKind);
97252
+ const driver = yield* get(requestedKind);
96908
97253
  return yield* detectWithDriver(requestedKind, driver, input.cwd);
96909
97254
  }
96910
97255
  return yield* detectWithDriver("git", git, input.cwd);
@@ -96939,12 +97284,12 @@ const make$3 = gen(function* () {
96939
97284
  cwd: input.cwd,
96940
97285
  requestedKind
96941
97286
  });
96942
- const cached = yield* get(detectionCache, key);
97287
+ const cached = yield* get$1(detectionCache, key);
96943
97288
  if (cached === null) return null;
96944
97289
  const disk = yield* readDiskState(input.cwd, cached.handle.repository);
96945
97290
  if (disk?.repositoryOnDisk && disk.gitEntries.length === cached.gitEntries.length && disk.gitEntries.every((exists, index) => exists === cached.gitEntries[index])) return cached.handle;
96946
97291
  yield* invalidate(detectionCache, key);
96947
- return (yield* get(detectionCache, key))?.handle ?? null;
97292
+ return (yield* get$1(detectionCache, key))?.handle ?? null;
96948
97293
  });
96949
97294
  const resolve = fn("VcsDriverRegistry.resolve")(function* (input) {
96950
97295
  const detected = yield* detect(input);
@@ -96957,7 +97302,7 @@ const make$3 = gen(function* () {
96957
97302
  });
96958
97303
  });
96959
97304
  return VcsDriverRegistry.of({
96960
- get: get$10,
97305
+ get,
96961
97306
  detect,
96962
97307
  resolve
96963
97308
  });
@@ -97112,7 +97457,7 @@ const makeWithProviders = fn("makeSourceControlProviderRegistryWithProviders")(f
97112
97457
  const vcsRegistry = yield* VcsDriverRegistry;
97113
97458
  const providers = new Map(registrations.map((registration) => [registration.kind, registration.provider]));
97114
97459
  const discoverySpecs = registrations.map((registration) => registration.discovery);
97115
- const get$9 = (kind) => succeed(providers.get(kind) ?? unsupportedProvider(kind));
97460
+ const get = (kind) => succeed(providers.get(kind) ?? unsupportedProvider(kind));
97116
97461
  const detectProviderContext = fn("SourceControlProviderRegistry.detectProviderContext")(function* (cwd) {
97117
97462
  const context = selectProviderContext((yield* (yield* vcsRegistry.resolve({ cwd }).pipe(mapError((error) => new SourceControlProviderError({
97118
97463
  provider: SourceControlProviderKind.make("unknown"),
@@ -97138,7 +97483,7 @@ const makeWithProviders = fn("makeSourceControlProviderRegistryWithProviders")(f
97138
97483
  capacity: PROVIDER_DETECTION_CACHE_CAPACITY,
97139
97484
  timeToLive: (exit) => isSuccess(exit) ? PROVIDER_DETECTION_CACHE_TTL : zero
97140
97485
  });
97141
- const resolveHandle = (input) => (input.context === void 0 ? get(providerContextCache, input.cwd) : refineUnknownRemoteProvider({
97486
+ const resolveHandle = (input) => (input.context === void 0 ? get$1(providerContextCache, input.cwd) : refineUnknownRemoteProvider({
97142
97487
  specs: discoverySpecs,
97143
97488
  process,
97144
97489
  cwd: input.cwd,
@@ -97156,7 +97501,7 @@ const makeWithProviders = fn("makeSourceControlProviderRegistryWithProviders")(f
97156
97501
  const kind = detectSourceControlProviderFromRemoteUrl(input.url.href)?.kind;
97157
97502
  return kind ? providers.get(kind)?.resolveLink?.(input) : void 0;
97158
97503
  },
97159
- get: get$9,
97504
+ get,
97160
97505
  resolveHandle,
97161
97506
  resolve: (input) => resolveHandle(input).pipe(map$6((handle) => handle.provider)),
97162
97507
  discover: forEach(discoverySpecs, (spec) => probeSourceControlProvider({
@@ -97458,17 +97803,17 @@ const nowIso = map$6(now, formatIso);
97458
97803
  /** @public Service construction is part of the canonical Effect module API. */
97459
97804
  const make = gen(function* () {
97460
97805
  const repositories = yield* SourceControlRepositoryService;
97461
- const clones = yield* make$71(/* @__PURE__ */ new Map());
97806
+ const clones = yield* make$72(/* @__PURE__ */ new Map());
97462
97807
  const changes = yield* unbounded$1();
97463
97808
  const retentionFibers = /* @__PURE__ */ new Map();
97464
97809
  let sequence = 0;
97465
- const cloneScope = yield* make$76("parallel");
97810
+ const cloneScope = yield* make$77("parallel");
97466
97811
  yield* addFinalizer$1(() => close(cloneScope, void_$1));
97467
- const actionLock = yield* make$87(1);
97812
+ const actionLock = yield* make$88(1);
97468
97813
  const locked = (effect) => actionLock.withPermits(1)(effect);
97469
- const list = get$2(clones).pipe(map$6((current) => Array.from(current.values(), (tracked) => tracked.snapshot)));
97814
+ const list = get$3(clones).pipe(map$6((current) => Array.from(current.values(), (tracked) => tracked.snapshot)));
97470
97815
  const publish$1 = list.pipe(flatMap((snapshots) => publish(changes, snapshots)));
97471
- const modify$1 = (projectId, mutate) => modify(clones, (current) => {
97816
+ const modify = (projectId, mutate) => modify$1(clones, (current) => {
97472
97817
  const existing = current.get(projectId);
97473
97818
  if (!existing) return [null, current];
97474
97819
  const nextTracked = mutate(existing);
@@ -97488,7 +97833,7 @@ const make = gen(function* () {
97488
97833
  retentionFibers.delete(projectId);
97489
97834
  return fiber ? interrupt$1(fiber).pipe(ignore$1) : void_$2;
97490
97835
  };
97491
- const remove = (projectId) => update(clones, (current) => {
97836
+ const remove = (projectId) => update$1(clones, (current) => {
97492
97837
  if (!current.has(projectId)) return current;
97493
97838
  const next = new Map(current);
97494
97839
  next.delete(projectId);
@@ -97501,7 +97846,7 @@ const make = gen(function* () {
97501
97846
  })), forkDetach);
97502
97847
  retentionFibers.set(projectId, fiber);
97503
97848
  });
97504
- const progress = (projectId, update) => modify$1(projectId, (tracked) => ({
97849
+ const progress = (projectId, update) => modify(projectId, (tracked) => ({
97505
97850
  ...tracked,
97506
97851
  snapshot: {
97507
97852
  ...tracked.snapshot,
@@ -97512,7 +97857,7 @@ const make = gen(function* () {
97512
97857
  })).pipe(asVoid);
97513
97858
  const finish = (projectId, phase, error) => gen(function* () {
97514
97859
  const endedAt = yield* nowIso;
97515
- yield* modify$1(projectId, (tracked) => ({
97860
+ yield* modify(projectId, (tracked) => ({
97516
97861
  ...tracked,
97517
97862
  fiber: null,
97518
97863
  snapshot: {
@@ -97544,10 +97889,10 @@ const make = gen(function* () {
97544
97889
  workspaceRoot: tracked.input.destinationPath
97545
97890
  }).pipe(ignoreCause({ log: true }))), ignoreCause());
97546
97891
  const launch = (projectId) => gen(function* () {
97547
- const tracked = (yield* get$2(clones)).get(projectId);
97892
+ const tracked = (yield* get$3(clones)).get(projectId);
97548
97893
  if (!tracked) return;
97549
97894
  const fiber = yield* runClone(projectId, tracked).pipe(forkIn(cloneScope));
97550
- yield* update(clones, (map) => {
97895
+ yield* update$1(clones, (map) => {
97551
97896
  const existing = map.get(projectId);
97552
97897
  if (!existing) return map;
97553
97898
  const next = new Map(map);
@@ -97575,7 +97920,7 @@ const make = gen(function* () {
97575
97920
  endedAt: null,
97576
97921
  sequence: ++sequence
97577
97922
  };
97578
- if (!(yield* modify(clones, (current) => {
97923
+ if (!(yield* modify$1(clones, (current) => {
97579
97924
  if (Array.from(current.values()).some((tracked) => tracked.snapshot.projectId === input.projectId || tracked.input.destinationPath === prepared.destinationPath)) return [false, current];
97580
97925
  const next = new Map(current);
97581
97926
  next.set(input.projectId, {
@@ -97613,9 +97958,9 @@ const make = gen(function* () {
97613
97958
  repository: prepared.repository
97614
97959
  };
97615
97960
  });
97616
- const get = (projectId) => get$2(clones).pipe(map$6((current) => current.get(projectId)?.snapshot ?? null));
97961
+ const get = (projectId) => get$3(clones).pipe(map$6((current) => current.get(projectId)?.snapshot ?? null));
97617
97962
  const cancel = (projectId) => gen(function* () {
97618
- const tracked = (yield* get$2(clones)).get(projectId);
97963
+ const tracked = (yield* get$3(clones)).get(projectId);
97619
97964
  if (!tracked || tracked.snapshot.phase !== "running" || !tracked.fiber) return false;
97620
97965
  yield* uninterruptible(gen(function* () {
97621
97966
  yield* interrupt$1(tracked.fiber);
@@ -97627,11 +97972,11 @@ const make = gen(function* () {
97627
97972
  return true;
97628
97973
  });
97629
97974
  const retry = (projectId) => gen(function* () {
97630
- const tracked = (yield* get$2(clones)).get(projectId);
97975
+ const tracked = (yield* get$3(clones)).get(projectId);
97631
97976
  if (!tracked || tracked.snapshot.phase !== "failed" && tracked.snapshot.phase !== "cancelled") return false;
97632
97977
  yield* repositories.discardClone(tracked.input.destinationPath);
97633
97978
  const startedAt = yield* nowIso;
97634
- yield* modify$1(projectId, (entry) => ({
97979
+ yield* modify(projectId, (entry) => ({
97635
97980
  ...entry,
97636
97981
  snapshot: {
97637
97982
  ...entry.snapshot,
@@ -97648,7 +97993,7 @@ const make = gen(function* () {
97648
97993
  return true;
97649
97994
  });
97650
97995
  const discard = (projectId) => gen(function* () {
97651
- const tracked = (yield* get$2(clones)).get(projectId);
97996
+ const tracked = (yield* get$3(clones)).get(projectId);
97652
97997
  if (!tracked) return;
97653
97998
  if (tracked.fiber) yield* interrupt$1(tracked.fiber);
97654
97999
  if ((yield* get(projectId))?.phase !== "done") yield* repositories.discardClone(tracked.input.destinationPath).pipe(ignore$1);
@@ -97696,6 +98041,117 @@ function describeCloneFailure(cause) {
97696
98041
  return error instanceof Error && error.message.trim().length > 0 ? error.message : "The repository could not be cloned.";
97697
98042
  }
97698
98043
  const layer = effect(ProjectCloneTracker, make);
97699
- export { ProjectStoreV2 as $, changeRequestUrlFor as $a, schema as $c, markdownLineEnding as $i, withAttributes as $l, HOLD_WEBHOOKS_WHILE_OFFLINE_SECRET as $n, makeManualOnlyProviderMaintenanceCapabilities as $o, threadShellFromProjection as $r, CLI_RELEASE_CHANNELS as $s, WorkspacePathOutsideRootError as $t, makeIsServerInternalPath as A, HTML_RENDER_TOOL_NAME as Aa, when as Ac, usageLimitBlockedRun as Ai, getAndUpdate as Al, writeAllToFileDescriptor as An, PinnedRuntimeInstallError as Ao, otlpResource as Ar, getModelSelectionStringOptionValue as As, withMetrics as At, planThreadDeletion as B, parseKeybindingShortcut as Ba, Int as Bc, projectComposerContextForProvider as Bi, SocketOpenError as Bl, FxSettings as Bn, DEFAULT_TIMEOUT_MS$4 as Bo, fromLenientJson as Br, SpawnExecutableResolution as Bs, flattenTemporaryWorktreeBranchName as Bt, layer$20 as C, readMcpAppCsp as Ca, SpanPropagationEnabled as Cc, backgroundWorkHoldsCompletion as Ci, tap as Cl, layer$51 as Cn, SERVICE_STOP_MARKER_FILE as Co, DEFAULT_PORT as Cr, parseSemver as Cs, terminalRestartsTotal as Ct, VcsProcess as D, HTML_RENDER_MEASURE_FONTS as Da, tag as Dc, latestExecutedRun as Di, withScope as Dl, layer$53 as Dn, parseServiceState as Do, ensureServerDirectories as Dr, createModelCapabilities as Ds, webhookHeldDelay as Dt, layer$21 as E, HTML_RENDER_MAX_HEIGHT as Ea, is as Ec, turnItemUpdateCanEndBackgroundWork as Ei, transformResponse as El, runServicePreflight as En, isExactServiceVersion as Eo, deriveServerPaths as Er, codexModelFamily as Es, webhookDeliveryDuration as Et, hasProjectSettingsOverrides as F, injectHtmlRenderBootstrap as Fa, runtime as Fc, constants as Fi, update as Fl, redactServerSettingsForClient as Fn, pinnedRuntimeVersionsDir as Fo, getBackgroundActivityPresetSettings as Fr, normalizeModelSlug as Fs, RepositoryIdentityResolver as Ft, IdAllocatorV2 as G, UNPUBLISHABLE_THEME_IDS as Ga, Record as Gc, isUncPath as Gi, makeWebSocket as Gl, pipeThroughDuplex as Gn, isCommandMissingCause as Go, NetService as Gr, readPathFromLaunchctl as Gs, parseGitHubRepositoryNameWithOwnerFromRemoteUrl as Gt, layer$24 as H, BUILT_IN_THEME_IDS as Ha, NonEmptyString as Hc, markdownDestinationHostPath as Hi, WebSocketConstructor as Hl, AcpRegistrySettings as Hn, buildSelectOptionDescriptor as Ho, load as Hr, listLoginShellCandidates as Hs, isTemporaryWorktreeBranch as Ht, resolveProjectSettings as I, DEFAULT_KEYBINDINGS as Ia, Crypto as Ic, codes as Ii, updateAndGet as Il, PiSettings as In, ProcessRunner as Io, resolveServerBackgroundActivitySettings as Ir, readCustomModelEntries as Is, layer$34 as It, layer$26 as J, resolveThreadPullRequestChains as Ja, URL$1 as Jc, newProjectFolderName as Ji, decode$2 as Jl, CLOUD_ENDPOINT_CONFIRMED_ORIGIN as Jn, parseGenericCliVersion as Jo, layer$59 as Jr, resolveWindowsEnvironment as Js, sanitizeBranchFragment as Jt, derive as K, legacyThreadPullRequestKey as Ka, Redacted as Kc, isWindowsAbsolutePath as Ki, getType as Kl, toArrayBuffer as Kn, isWindowsCommandNotFound as Ko, layer$58 as Kr, resolveCommandPath as Ks, parseOriginUrlFromGitConfig as Kt, resolveWorktreeCleanup as L, compileResolvedKeybindingRule as La, make$66 as Lc, longestStreak as Li, CloseEvent as Ll, OpenCodeSettings as Ln, layer$64 as Lo, decodeJsonResult as Lr, resolvePromptInjectedEffort as Ls, make$38 as Lt, isFilesystemRoot as M, clampHtmlRenderHeight as Ma, clear as Mc, formatThreadLink as Mi, makeUnsafe$2 as Ml, subscribeBeforeSnapshotWithoutMutex as Mn, launcherOwnsVersionsDir as Mo, parsePersistedServerObservabilitySettings as Mr, getProviderOptionDescriptors as Ms, make$36 as Mt, managedWorktreesDirectories as N, htmlRenderTheme as Na, make$65 as Nc, remarkGfm as Ni, modify as Nl, ServerSettingsService as Nn, pinnedRuntimeCommand as No, resolveReviewGuideModelSelection as Nr, modelSelectionCommandType as Ns, ProjectEnrichmentService as Nt, layer$22 as O, HTML_RENDER_MEASURE_WIDTHS as Oa, tags as Oc, latestRootProviderFailure as Oi, get$2 as Ol, DesktopTelemetryReceiver as On, serviceStateActiveVersion as Oo, layer$57 as Or, formatCodexModelName as Os, webhookRunsTotal as Ot, removeLinkedWorktree as P, htmlRenderThemeFragment as Pa, run as Pc, types as Pi, set$1 as Pl, layer$55 as Pn, pinnedRuntimePaths as Po, resolveSourceControlWriterModelSelection as Pr, modelSelectionsEqual as Ps, layer$33 as Pt, layer$28 as Q, visibleThreadPullRequests as Qa, option as Qc, factorySpace as Qi, update$1 as Ql, CLOUD_MINT_PUBLIC_KEY as Qn, makeCachedProviderMaintenanceResolution as Qo, layer$60 as Qr, CLI_RELEASE_BASE_URL_ENV as Qs, layer$36 as Qt, ProjectService as R, compileResolvedKeybindingsConfig as Ra, Boolean$1 as Rc, assistantCitationsToPlainText as Ri, SocketError as Rl, MuseSettings as Rn, AUTH_PROBE_TIMEOUT_MS as Ro, extractJsonObject as Rr, collectUint8StreamText as Rs, buildTemporaryWorktreeBranchName as Rt, SourceControlRateLimit as S, mcpAppToolCallableByApp as Sa, SqlClient as Sc, resolveAttachmentRelativePath as Si, retryTransient as Sl, ServerSelfUpdate as Sn, SERVICE_STATE_FILE as So, writeFileStringAtomically as Sr, compareSemverVersions as Ss, secretRequestsTotal as St, GitVcsDriver as T, HTML_RENDER_LAYOUT_GUIDE as Ta, exhaustive as Tc, pendingBackgroundTurnItems as Ti, transform$1 as Tl, layer$52 as Tn, decodeServiceLauncherChildMessage as To, ServerConfig as Tr, applyClaudePromptEffortPrefix as Ts, webhookDeliveriesTotal as Tt, LegacyV1ThreadImporter as U, P4_CODE_DARK_THEME_COLORS as Ua, Number$1 as Uc, isExplicitRelativePath as Ui, fromWebSocket as Ul, decode as Un, buildServerProvider as Uo, none as Ur, mergePathEntries as Us, mergeGitStatusParts as Ut, ThreadCommandExecutor as V, parseKeybindingWhenExpression as Va, LogLevel as Vc, remapComposerContextAttachments as Vi, WebSocket as Vl, CursorSettings as Vn, buildBooleanOptionDescriptor as Vo, layerResourceAttributes as Vr, isCommandAvailable as Vs, formatGeneratedBranchName as Vt, layer$25 as W, P4_CODE_LIGHT_THEME_COLORS as Wa, Port as Wc, isNetworkPath as Wi, isSocketError as Wl, fromReadable as Wn, collectStreamAsString as Wo, resolveSignalEndpoint as Wr, readEnvironmentFromLoginShell as Ws, normalizeGitRemoteUrl as Wt, EventSinkV2 as X, threadPullRequestKeysEqual as Xa, map$3 as Xc, unified as Xi, encode$1 as Xl, CLOUD_LINKED_USER_ID as Xn, spawnAndCollect as Xo, applyToProjection as Xr, make$58 as Xs, ProjectFaviconResolver as Xt, randomUuidV4 as Y, threadPullRequestKeyOf as Ya, all$4 as Yc, normalizeProjectPathForComparison as Yi, decodeString$2 as Yl, CLOUD_ENDPOINT_RUNTIME_CONFIG as Yn, providerModelsFromSettings as Yo, ProjectionStoreV2 as Yr, withPathDirectoryListings as Ys, sanitizeFeatureBranchName as Yt, layerFromStores as Z, threadPullRequestsOf as Za, mapEffect as Zc, remarkParse as Zi, snapshotUnsafe as Zl, CLOUD_LINK_REVOKED as Zn, enrichProviderSnapshotWithVersionAdvisory as Zo, emptyProjection as Zr, ChildProcessSpawner as Zs, layer$35 as Zt, FILE_HEADERS_ONLY as _, MCP_APP_OUTPUT_KEY as _a, Terminal as _c, resolveAttachmentPathById as _i, filterStatusOk as _l, layer$45 as _n, void_ as _o, ServerSecretStore as _r, redactCauseCredentials as _s, providerTurnDuration as _t, layer$1 as a, projectThreadProjectionForWire as aa, Arguments as ac, PENDING_ATTACHMENT_THREAD_SEGMENT as ai, invalidate as al, isWithinRoot as an, isSshRemoteUrl as ao, decodeRuntimeConfig as ar, resolveProviderMaintenanceCapabilitiesEffect as as, layerPruneWorker as at, unquoteGitPatchPath as b, injectMcpAppCsp as ba, make$61 as bc, inferImageExtension as bi, mapRequestEffect as bl, layer$50 as bn, SERVICE_LAUNCHER_CONTEXT_ENV as bo, layer$56 as br, OtlpSerialization as bs, rpcRequestsTotal as bt, BUILT_IN_SOURCE_CONTROL_DRIVERS as c, mcpAppFromToolItem as ca, HomeDirectory as cc, chatAttachmentStableKey as ci, make$69 as cl, discoverClaudeSkills as cn, layerFromOrchestrationEventStore as co, isAgentActivityPublishingEnabledValue as cr, DEFAULT_SIGNAL_EXPORT as cs, forkParkedFiber as ct, layer$5 as d, toolOutputImages as da, IsExecutable as dc, createPendingAttachmentId as di, set as dl, expandHomePath as dn, PersistenceDecodeError as do, resolveCliCommand as dr, causeErrorTag as ds, layer$32 as dt, markdownLineEndingOrSpace as ea, cliReleaseChannelIndexUrl as ec, InvalidThreadHistoryCursorError as ei, withDefault as el, WorkspacePaths as en, parseChangeRequestUrl as eo, PUBLISH_AGENT_ACTIVITY_SECRET as er, makePackageManagedProviderMaintenanceResolver as es, layer$29 as et, layer$6 as f, P4_MCP_TOOL_NAMES as fa, Platform as fc, parseAttachmentFileExtension as fi, next$1 as fl, require_dist as fn, PersistenceSqlError as fo, resolveHostCliCommand as fr, decodeOtlpTraceRecords as fs, increment as ft, PullRequestProviderError as g, MCP_APP_MIME_TYPE as ga, QuitError as gc, resolveAttachmentPath as gi, TracerPropagationEnabled as gl, layer$38 as gn, findOneOption as go, SecretStoreEncodeError as gr, makeTraceSink as gs, providerSessionsTotal as gt, firstNonEmptyLine as h, MCP_APP_MAX_HTML_BYTES as ha, isWindows as hc, planAttachmentClaim as hi, TracerDisabledWhen as hl, make$42 as hn, findAll as ho, SecretStoreDecodeError as hr, makeLocalFileTracer as hs, orchestrationEffectQueueWait as ht, SourceControlRepositoryService as i, projectDomainEventForWire as ia, Architecture as ic, decodeThreadHistoryCursor as ii, getSuccess as il, WorkspaceRootStatFailedError as in, getChangeRequestTerminologyForKind as io, decodeConfirmedOrigin as ir, resolveLatestProviderVersion as is, layer$30 as it, extractBranchNameFromRemoteRef as j, blankNonMarkup as ja, awaitEmpty as jc, chatMarkdownImageSources as ji, make$71 as jl, subscribeBeforeSnapshot as jn, ensurePinnedRuntimeInstalled as jo, resolveStaticDir as jr, getProviderOptionCurrentValue as js, normalizeModelMetricLabel as jt, PATCH_RENDER_PREFIX_ARGS as k, HTML_RENDER_THEME_GUIDE as ka, value as kc, runRanAfter as ki, getAndSet as kl, layer$54 as kn, serviceStateHasPendingUpdate as ko, make$53 as kr, getModelSelectionBooleanOptionValue as ks, withCommandMetrics as kt, layer$3 as l, readToolOutputImage as la, Hostname as lc, createAttachmentId as li, makeWith$2 as ll, readClaudeSettingsEnv as ln, OrchestrationEventStore as lo, readHoldWebhooksWhileOffline as lr, OtlpHeadersFromString as ls, CommandReceiptStoreV2 as lt, detailFromCause as m, MCP_APP_EXTENSION_ID as ma, WorkingDirectory as mc, parseThreadSegmentFromAttachmentId as mi, HttpClient as ml, tokenizeCliArgs as mn, makeLiveStreamBudget as mo, SecretStoreConcurrentReadError as mr, layerOtlpSerialization as ms, orchestrationEffectClaimsTotal as mt, layer as n, boundFileChangeForStorage as na, RequestInit as nc, THREAD_HISTORY_SNAPSHOT_ROW_LIMIT as ni, get as nl, WorkspaceRootNotDirectoryError as nn, canonicalRepositoryKey as no, RELAY_ISSUER_SECRET as nr, makeTargetedProviderUpdateAction as ns, PROCESS_BOUND_EFFECT_TYPES as nt, SourceControlProviderRegistry as o, projectTurnItemForDetail as oa, Environment as oc, attachmentFileExtension as oi, invalidateAll as ol, layer$37 as on, sourceControlRepositorySelector as oo, encodeConfirmedOriginJson as or, ProviderLatestVersions as os, ServerActivation as ot, GitHubCredentials as p, resolveP4McpToolDefinition as pa, UserId as pc, parseAttachmentUuid as pi, nextIntBetween as pl, parseCliArgs as pn, bufferLiveStream as po, resolveRootCliCommand as pr, errorTag as ps, metricAttributes as pt, deriveThreadFromProviderThread as q, normalizeThreadPullRequestKey as qa, String$1 as qc, isWindowsDrivePath as qi, isGreaterThanOrEqualTo as ql, toUint8Array as qn, nonEmptyTrimmed as qo, ProjectionMaintenanceV2 as qr, resolveSpawnCommand as qs, resolveAutoFeatureBranchName as qt, rejectCommandsDuringClone as r, capProjectionCheckpointFilesForWire as ra, layer$66 as rc, buildBoundedThreadProjection as ri, getOption as rl, WorkspaceRootNotExistsError as rn, detectSourceControlProviderFromRemoteUrl as ro, RELAY_URL_SECRET as rr, normalizeCommandPath as rs, REPLAY_SAFE_EFFECT_TYPES_AFTER_PROCESS_LOSS as rt, layer$2 as s, MAX_TOOL_OUTPUT_IMAGE_BASE64_LENGTH as sa, ExecutablePath as sc, attachmentRelativePath as si, keys$1 as sl, claudeLaunchArgDirectories as sn, layer$61 as so, encodeEndpointRuntimeConfigJson as sr, layer$65 as ss, forkParked as st, ProjectCloneTracker as t, ok$1 as ta, cliReleaseChannelOf as tc, THREAD_HISTORY_PAGE_POLICY as ti, SourceError as tl, WorkspaceRootCreateFailedError as tn, siblingPullRequestUrl as to, RELAY_ENVIRONMENT_CREDENTIAL_SECRET as tr, makeProviderMaintenanceCapabilities as ts, EffectOutboxV2 as tt, VcsDriverRegistry as u, toolOutputImageBlocks as ua, InvokedAs as uc, createDeterministicAttachmentId as ui, refresh as ul, resolveClaudeConfigDirPath as un, layer$62 as uo, readRelayConnection as ur, OtlpProtocol as us, layerFromApplicationReceipts as ut, formatPatch as v, MCP_APP_RESOURCE_SCHEME as va, isQuitError as vc, sweepStalePendingAttachments as vi, get$1 as vl, ServerEnvironment as vn, layer$63 as vo, isSecretAlreadyExistsError as vr, RotatingFileSink as vs, providerTurnsTotal as vt, repositoryPathFromRemoteUrl as w, readMcpAppPermissions as wa, isSqlError as wc, derivePendingBackgroundWork as wi, tapError as wl, ServiceLauncherClient as wn, compareExactServiceVersions as wo, RuntimeMode as wr, satisfiesSemverRange as ws, terminalSessionsTotal as wt, Interactive as x, injectMcpAppThemeBootstrap as xa, map$2 as xc, parseBase64DataUrl as xi, retry as xl, layerIdentity as xn, SERVICE_RESTART_PENDING_FILE as xo, version as xr, layerJson as xs, secretRefsConsumedTotal as xt, structuredPatch as y, injectMcpAppCookieBootstrap as ya, Stdio as yc, toSafeThreadAttachmentSegment as yi, mapRequest as yl, ServerEnvironmentIdentity as yn, readOnly as yo, isSecretStoreError as yr, makeAsyncRotatingFileSink as ys, rpcRequestDuration as yt, layer$23 as z, mergeWithDefaultKeybindings as za, ConfigError as zc, isAttachmentOnlyBootstrapPrompt as zi, SocketErrorReason as zl, GrokSettings as zn, COMPACT_SLASH_COMMAND as zo, fromJsonStringPretty as zr, CommandResolutionCache as zs, detectSourceControlProviderFromGitRemoteUrl as zt };
98044
+ // ../../packages/shared/src/preview.ts
98045
+ const TAB_ID_PREFIX = "tab_";
98046
+ let nextPreviewTabSequence = 0;
98047
+ /**
98048
+ * Generate a fresh preview tab id. Lives in shared (not contracts) because
98049
+ * the contracts package is schema-only — runtime helpers belong here.
98050
+ */
98051
+ function newPreviewTabId() {
98052
+ nextPreviewTabSequence += 1;
98053
+ return `${TAB_ID_PREFIX}${nextPreviewTabSequence.toString(36)}`;
98054
+ }
98055
+ const LOOPBACK_HOSTS = /* @__PURE__ */ new Set([
98056
+ "localhost",
98057
+ "127.0.0.1",
98058
+ "0.0.0.0",
98059
+ "::1"
98060
+ ]);
98061
+ /** Internal — used by `lsof` parsing where the host string is wire-formatted. */
98062
+ const LSOF_LOCAL_HOST_TOKENS = /* @__PURE__ */ new Set([
98063
+ ...LOOPBACK_HOSTS,
98064
+ "*",
98065
+ "[::]",
98066
+ "[::1]"
98067
+ ]);
98068
+ const LOOPBACK_PREFIX_PATTERN = /^(?:localhost|127\.0\.0\.1|0\.0\.0\.0|\[::1?\])(?::|\/|$)/i;
98069
+ function isLoopbackHost(host) {
98070
+ if (LOOPBACK_HOSTS.has(host)) return true;
98071
+ if (host === "[::1]") return true;
98072
+ return false;
98073
+ }
98074
+ var PreviewUrlNormalizationError = class extends TaggedError()("PreviewUrlNormalizationError", {
98075
+ inputLength: Number$3,
98076
+ reason: Literals([
98077
+ "empty",
98078
+ "parse",
98079
+ "unsupported-protocol"
98080
+ ]),
98081
+ protocol: optional(String$2),
98082
+ cause: optional(Defect())
98083
+ }) {
98084
+ get message() {
98085
+ const protocol = this.protocol === void 0 ? "" : `: ${this.protocol}`;
98086
+ return `Invalid preview URL (${this.reason}${protocol}; input length ${this.inputLength}). Use an http(s) URL or a schemeless host such as localhost:5173. With preview_open, omit url when creating a new tab to open a blank tab.`;
98087
+ }
98088
+ };
98089
+ const isPreviewUrlNormalizationError = is$2(PreviewUrlNormalizationError);
98090
+ function previewUrlProtocol(rawUrl) {
98091
+ return /^([A-Za-z][A-Za-z\d+.-]*):/.exec(rawUrl)?.[1]?.toLowerCase().concat(":");
98092
+ }
98093
+ /**
98094
+ * Registered schemes that are never a bare host, so `ftp:21` or `tel:5551234`
98095
+ * is rejected rather than read as host and port.
98096
+ */
98097
+ const KNOWN_NON_WEB_SCHEMES = /* @__PURE__ */ new Set([
98098
+ "about:",
98099
+ "blob:",
98100
+ "chrome:",
98101
+ "data:",
98102
+ "file:",
98103
+ "ftp:",
98104
+ "javascript:",
98105
+ "mailto:",
98106
+ "sms:",
98107
+ "ssh:",
98108
+ "tel:",
98109
+ "view-source:",
98110
+ "ws:",
98111
+ "wss:"
98112
+ ]);
98113
+ /**
98114
+ * Normalise a free-form URL string into a fully-qualified `http(s)://` URL.
98115
+ *
98116
+ * - Bare loopback hosts (`localhost`, `localhost:5173`) become `http://...`.
98117
+ * - Bare public hosts (`example.com`) become `https://...`.
98118
+ * - Already-qualified URLs are validated and returned as `URL.href`.
98119
+ *
98120
+ * Throws `PreviewUrlNormalizationError` for empty, unparseable, or
98121
+ * unsupported-protocol inputs.
98122
+ */
98123
+ function normalizePreviewUrl(rawUrl) {
98124
+ const trimmed = rawUrl.trim();
98125
+ if (trimmed.length === 0) throw new PreviewUrlNormalizationError({
98126
+ inputLength: rawUrl.length,
98127
+ reason: "empty"
98128
+ });
98129
+ const explicitProtocol = previewUrlProtocol(trimmed);
98130
+ if (explicitProtocol !== void 0 && KNOWN_NON_WEB_SCHEMES.has(explicitProtocol)) throw new PreviewUrlNormalizationError({
98131
+ inputLength: rawUrl.length,
98132
+ reason: "unsupported-protocol",
98133
+ protocol: explicitProtocol
98134
+ });
98135
+ const useHttp = LOOPBACK_PREFIX_PATTERN.test(trimmed);
98136
+ const candidate = trimmed.includes("://") ? trimmed : `${useHttp ? "http" : "https"}://${trimmed}`;
98137
+ let parsed;
98138
+ try {
98139
+ parsed = new URL(candidate);
98140
+ } catch (cause) {
98141
+ throw new PreviewUrlNormalizationError({
98142
+ inputLength: rawUrl.length,
98143
+ reason: "parse",
98144
+ protocol: previewUrlProtocol(candidate),
98145
+ cause
98146
+ });
98147
+ }
98148
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") throw new PreviewUrlNormalizationError({
98149
+ inputLength: rawUrl.length,
98150
+ reason: "unsupported-protocol",
98151
+ protocol: parsed.protocol
98152
+ });
98153
+ return parsed.href;
98154
+ }
98155
+ export { layer$26 as $, normalizeThreadPullRequestKey as $a, LogLevel as $c, newProjectFolderName as $i, WebSocketConstructor as $l, CLOUD_ENDPOINT_CONFIRMED_ORIGIN as $n, nonEmptyTrimmed as $o, layer$59 as $r, resolveSpawnCommand as $s, sanitizeBranchFragment as $t, GitVcsDriver as A, readMcpAppPermissions as Aa, modifyEffect as Ac, pendingBackgroundTurnItems as Ai, get$2 as Al, layer$52 as An, compareExactServiceVersions as Ao, ServerConfig as Ar, satisfiesSemverRange as As, webhookDeliveriesTotal as At, hasProjectSettingsOverrides as B, htmlRenderThemeFragment as Ba, tags as Bc, constants as Bi, get$3 as Bl, redactServerSettingsForClient as Bn, pinnedRuntimePaths as Bo, getBackgroundActivityPresetSettings as Br, modelSelectionsEqual as Bs, RepositoryIdentityResolver as Bt, formatPatch as C, MCP_APP_OUTPUT_KEY as Ca, Terminal as Cc, sweepStalePendingAttachments as Ci, set$1 as Cl, ServerEnvironment as Cn, void_ as Co, isSecretAlreadyExistsError as Cr, redactCauseCredentials as Cs, providerTurnsTotal as Ct, SourceControlRateLimit as D, injectMcpAppThemeBootstrap as Da, get as Dc, resolveAttachmentRelativePath as Di, TracerDisabledWhen as Dl, ServerSelfUpdate as Dn, SERVICE_RESTART_PENDING_FILE as Do, writeFileStringAtomically as Dr, layerJson as Ds, secretRequestsTotal as Dt, Interactive as E, injectMcpAppCsp as Ea, make$61 as Ec, parseBase64DataUrl as Ei, HttpClient as El, layerIdentity as En, SERVICE_LAUNCHER_CONTEXT_ENV as Eo, version as Er, OtlpSerialization as Es, secretRefsConsumedTotal as Et, makeIsServerInternalPath as F, HTML_RENDER_THEME_GUIDE as Fa, SpanPropagationEnabled as Fc, usageLimitBlockedRun as Fi, tap as Fl, writeAllToFileDescriptor as Fn, serviceStateHasPendingUpdate as Fo, otlpResource as Fr, getModelSelectionBooleanOptionValue as Fs, withMetrics as Ft, planThreadDeletion as G, mergeWithDefaultKeybindings as Ga, make$66 as Gc, projectComposerContextForProvider as Gi, set$2 as Gl, FxSettings as Gn, COMPACT_SLASH_COMMAND as Go, fromLenientJson as Gr, CommandResolutionCache as Gs, flattenTemporaryWorktreeBranchName as Gt, resolveWorktreeCleanup as H, DEFAULT_KEYBINDINGS as Ha, when as Hc, longestStreak as Hi, getAndUpdate as Hl, OpenCodeSettings as Hn, ProcessRunner as Ho, decodeJsonResult as Hr, readCustomModelEntries as Hs, make$38 as Ht, extractBranchNameFromRemoteRef as I, HTML_RENDER_TOOL_NAME as Ia, isSqlError as Ic, chatMarkdownImageSources as Ii, tapError as Il, subscribeBeforeSnapshot as In, PinnedRuntimeInstallError as Io, resolveStaticDir as Ir, getModelSelectionStringOptionValue as Is, normalizeModelMetricLabel as It, LegacyV1ThreadImporter as J, BUILT_IN_THEME_IDS as Ja, Crypto as Jc, isExplicitRelativePath as Ji, CloseEvent as Jl, decode as Jn, buildSelectOptionDescriptor as Jo, none as Jr, listLoginShellCandidates as Js, mergeGitStatusParts as Jt, ThreadCommandExecutor as K, parseKeybindingShortcut as Ka, run as Kc, remapComposerContextAttachments as Ki, update$1 as Kl, CursorSettings as Kn, DEFAULT_TIMEOUT_MS$4 as Ko, layerResourceAttributes as Kr, SpawnExecutableResolution as Ks, formatGeneratedBranchName as Kt, isFilesystemRoot as L, blankNonMarkup as La, exhaustive as Lc, formatThreadLink as Li, transform$1 as Ll, subscribeBeforeSnapshotWithoutMutex as Ln, ensurePinnedRuntimeInstalled as Lo, parsePersistedServerObservabilitySettings as Lr, getProviderOptionCurrentValue as Ls, make$36 as Lt, VcsProcess as M, HTML_RENDER_MAX_HEIGHT as Ma, update as Mc, latestExecutedRun as Mi, mapRequestEffect as Ml, layer$53 as Mn, isExactServiceVersion as Mo, ensureServerDirectories as Mr, codexModelFamily as Ms, webhookHeldDelay as Mt, layer$22 as N, HTML_RENDER_MEASURE_FONTS as Na, map$2 as Nc, latestRootProviderFailure as Ni, retry as Nl, DesktopTelemetryReceiver as Nn, parseServiceState as No, layer$57 as Nr, createModelCapabilities as Ns, webhookRunsTotal as Nt, layer$20 as O, mcpAppToolCallableByApp as Oa, make$62 as Oc, backgroundWorkHoldsCompletion as Oi, TracerPropagationEnabled as Ol, layer$51 as On, SERVICE_STATE_FILE as Oo, DEFAULT_PORT as Or, compareSemverVersions as Os, terminalRestartsTotal as Ot, PATCH_RENDER_PREFIX_ARGS as P, HTML_RENDER_MEASURE_WIDTHS as Pa, SqlClient as Pc, runRanAfter as Pi, retryTransient as Pl, layer$54 as Pn, serviceStateActiveVersion as Po, make$53 as Pr, formatCodexModelName as Ps, withCommandMetrics as Pt, deriveThreadFromProviderThread as Q, legacyThreadPullRequestKey as Qa, Int as Qc, isWindowsDrivePath as Qi, WebSocket as Ql, toUint8Array as Qn, isWindowsCommandNotFound as Qo, ProjectionMaintenanceV2 as Qr, resolveCommandPath as Qs, resolveAutoFeatureBranchName as Qt, managedWorktreesDirectories as R, clampHtmlRenderHeight as Ra, is as Rc, remarkGfm as Ri, transformResponse as Rl, ServerSettingsService as Rn, launcherOwnsVersionsDir as Ro, resolveReviewGuideModelSelection as Rr, getProviderOptionDescriptors as Rs, ProjectEnrichmentService as Rt, FILE_HEADERS_ONLY as S, MCP_APP_MIME_TYPE as Sa, QuitError as Sc, resolveAttachmentPathById as Si, refresh as Sl, layer$45 as Sn, findOneOption as So, ServerSecretStore as Sr, makeTraceSink as Ss, providerTurnDuration as St, unquoteGitPatchPath as T, injectMcpAppCookieBootstrap as Ta, Stdio as Tc, inferImageExtension as Ti, nextIntBetween as Tl, layer$50 as Tn, readOnly as To, layer$56 as Tr, makeAsyncRotatingFileSink as Ts, rpcRequestsTotal as Tt, ProjectService as U, compileResolvedKeybindingRule as Ua, awaitEmpty as Uc, assistantCitationsToPlainText as Ui, make$72 as Ul, MuseSettings as Un, layer$64 as Uo, extractJsonObject as Ur, resolvePromptInjectedEffort as Us, buildTemporaryWorktreeBranchName as Ut, resolveProjectSettings as V, injectHtmlRenderBootstrap as Va, value as Vc, codes as Vi, getAndSet as Vl, PiSettings as Vn, pinnedRuntimeVersionsDir as Vo, resolveServerBackgroundActivitySettings as Vr, normalizeModelSlug as Vs, layer$34 as Vt, layer$23 as W, compileResolvedKeybindingsConfig as Wa, clear as Wc, isAttachmentOnlyBootstrapPrompt as Wi, modify$1 as Wl, GrokSettings as Wn, AUTH_PROBE_TIMEOUT_MS as Wo, fromJsonStringPretty as Wr, collectUint8StreamText as Ws, detectSourceControlProviderFromGitRemoteUrl as Wt, IdAllocatorV2 as X, P4_CODE_LIGHT_THEME_COLORS as Xa, Boolean$1 as Xc, isUncPath as Xi, SocketErrorReason as Xl, pipeThroughDuplex as Xn, collectStreamAsString as Xo, NetService as Xr, readEnvironmentFromLoginShell as Xs, parseGitHubRepositoryNameWithOwnerFromRemoteUrl as Xt, layer$25 as Y, P4_CODE_DARK_THEME_COLORS as Ya, make$67 as Yc, isNetworkPath as Yi, SocketError as Yl, fromReadable as Yn, buildServerProvider as Yo, resolveSignalEndpoint as Yr, mergePathEntries as Ys, normalizeGitRemoteUrl as Yt, derive as Z, UNPUBLISHABLE_THEME_IDS as Za, ConfigError as Zc, isWindowsAbsolutePath as Zi, SocketOpenError as Zl, toArrayBuffer as Zn, isCommandMissingCause as Zo, layer$58 as Zr, readPathFromLaunchctl as Zs, parseOriginUrlFromGitConfig as Zt, layer$6 as _, toolOutputImages as _a, IsExecutable as _c, parseAttachmentFileExtension as _i, invalidate as _l, require_dist as _n, PersistenceDecodeError as _o, resolveHostCliCommand as _r, causeErrorTag as _s, increment as _t, normalizePreviewUrl as a, markdownLineEndingOrSpace as aa, CLI_RELEASE_CHANNELS as ac, InvalidThreadHistoryCursorError as ai, String$1 as al, WorkspacePaths as an, changeRequestUrlFor as ao, PUBLISH_AGENT_ACTIVITY_SECRET as ar, makeManualOnlyProviderMaintenanceCapabilities as as, layer$29 as at, isGreaterThanOrEqualTo as au, firstNonEmptyLine as b, MCP_APP_EXTENSION_ID as ba, WorkingDirectory as bc, planAttachmentClaim as bi, make$70 as bl, make$42 as bn, makeLiveStreamBudget as bo, SecretStoreDecodeError as br, layerOtlpSerialization as bs, orchestrationEffectQueueWait as bt, rejectCommandsDuringClone as c, capProjectionCheckpointFilesForWire as ca, RequestInit as cc, buildBoundedThreadProjection as ci, map$3 as cl, WorkspaceRootNotExistsError as cn, canonicalRepositoryKey as co, RELAY_URL_SECRET as cr, makeTargetedProviderUpdateAction as cs, REPLAY_SAFE_EFFECT_TYPES_AFTER_PROCESS_LOSS as ct, encode$1 as cu, SourceControlProviderRegistry as d, projectTurnItemForDetail as da, Arguments as dc, attachmentFileExtension as di, schema as dl, layer$37 as dn, isSshRemoteUrl as do, encodeConfirmedOriginJson as dr, resolveProviderMaintenanceCapabilitiesEffect as ds, ServerActivation as dt, withAttributes as du, normalizeProjectPathForComparison as ea, resolveWindowsEnvironment as ec, ProjectionStoreV2 as ei, NonEmptyString as el, sanitizeFeatureBranchName as en, resolveThreadPullRequestChains as eo, CLOUD_ENDPOINT_RUNTIME_CONFIG as er, parseGenericCliVersion as es, randomUuidV4 as et, fromWebSocket as eu, layer$2 as f, MAX_TOOL_OUTPUT_IMAGE_BASE64_LENGTH as fa, Environment as fc, attachmentRelativePath as fi, withDefault as fl, claudeLaunchArgDirectories as fn, sourceControlRepositorySelector as fo, encodeEndpointRuntimeConfigJson as fr, ProviderLatestVersions as fs, forkParked as ft, layer$5 as g, toolOutputImageBlocks as ga, InvokedAs as gc, createPendingAttachmentId as gi, getSuccess as gl, expandHomePath as gn, layer$62 as go, resolveCliCommand as gr, OtlpProtocol as gs, layer$32 as gt, VcsDriverRegistry as h, readToolOutputImage as ha, Hostname as hc, createDeterministicAttachmentId as hi, getOption as hl, resolveClaudeConfigDirPath as hn, OrchestrationEventStore as ho, readRelayConnection as hr, OtlpHeadersFromString as hs, layerFromApplicationReceipts as ht, newPreviewTabId as i, markdownLineEnding as ia, CLI_RELEASE_BASE_URL_ENV as ic, threadShellFromProjection as ii, Redacted as il, WorkspacePathOutsideRootError as in, visibleThreadPullRequests as io, HOLD_WEBHOOKS_WHILE_OFFLINE_SECRET as ir, makeCachedProviderMaintenanceResolution as is, ProjectStoreV2 as it, getType as iu, layer$21 as j, HTML_RENDER_LAYOUT_GUIDE as ja, set as jc, turnItemUpdateCanEndBackgroundWork as ji, mapRequest as jl, runServicePreflight as jn, decodeServiceLauncherChildMessage as jo, deriveServerPaths as jr, applyClaudePromptEffortPrefix as js, webhookDeliveryDuration as jt, repositoryPathFromRemoteUrl as k, readMcpAppCsp as ka, modify as kc, derivePendingBackgroundWork as ki, filterStatusOk as kl, ServiceLauncherClient as kn, SERVICE_STOP_MARKER_FILE as ko, RuntimeMode as kr, parseSemver as ks, terminalSessionsTotal as kt, SourceControlRepositoryService as l, projectDomainEventForWire as la, layer$66 as lc, decodeThreadHistoryCursor as li, mapEffect as ll, WorkspaceRootStatFailedError as ln, detectSourceControlProviderFromRemoteUrl as lo, decodeConfirmedOrigin as lr, normalizeCommandPath as ls, layer$30 as lt, snapshotUnsafe as lu, layer$3 as m, mcpToolResultOutput as ma, HomeDirectory as mc, createAttachmentId as mi, get$1 as ml, readClaudeSettingsEnv as mn, layerFromOrchestrationEventStore as mo, readHoldWebhooksWhileOffline as mr, DEFAULT_SIGNAL_EXPORT as ms, CommandReceiptStoreV2 as mt, isLoopbackHost as n, remarkParse as na, make$58 as nc, emptyProjection as ni, Port as nl, layer$35 as nn, threadPullRequestKeysEqual as no, CLOUD_LINK_REVOKED as nr, spawnAndCollect as ns, layerFromStores as nt, make$73 as nu, ProjectCloneTracker as o, ok$1 as oa, cliReleaseChannelIndexUrl as oc, THREAD_HISTORY_PAGE_POLICY as oi, URL$1 as ol, WorkspaceRootCreateFailedError as on, parseChangeRequestUrl as oo, RELAY_ENVIRONMENT_CREDENTIAL_SECRET as or, makePackageManagedProviderMaintenanceResolver as os, EffectOutboxV2 as ot, decode$2 as ou, BUILT_IN_SOURCE_CONTROL_DRIVERS as p, mcpAppFromToolItem as pa, ExecutablePath as pc, chatAttachmentStableKey as pi, SourceError as pl, discoverClaudeSkills as pn, layer$61 as po, isAgentActivityPublishingEnabledValue as pr, layer$65 as ps, forkParkedFiber as pt, layer$24 as q, parseKeybindingWhenExpression as qa, runtime as qc, markdownDestinationHostPath as qi, updateAndGet as ql, AcpRegistrySettings as qn, buildBooleanOptionDescriptor as qo, load as qr, isCommandAvailable as qs, isTemporaryWorktreeBranch as qt, isPreviewUrlNormalizationError as r, factorySpace as ra, ChildProcessSpawner as rc, layer$60 as ri, Record as rl, layer$36 as rn, threadPullRequestsOf as ro, CLOUD_MINT_PUBLIC_KEY as rr, enrichProviderSnapshotWithVersionAdvisory as rs, layer$28 as rt, makeWebSocket as ru, layer as s, boundFileChangeForStorage as sa, cliReleaseChannelOf as sc, THREAD_HISTORY_SNAPSHOT_ROW_LIMIT as si, all$4 as sl, WorkspaceRootNotDirectoryError as sn, siblingPullRequestUrl as so, RELAY_ISSUER_SECRET as sr, makeProviderMaintenanceCapabilities as ss, PROCESS_BOUND_EFFECT_TYPES as st, decodeString$2 as su, LSOF_LOCAL_HOST_TOKENS as t, unified as ta, withPathDirectoryListings as tc, applyToProjection as ti, Number$1 as tl, ProjectFaviconResolver as tn, threadPullRequestKeyOf as to, CLOUD_LINKED_USER_ID as tr, providerModelsFromSettings as ts, EventSinkV2 as tt, isSocketError as tu, layer$1 as u, projectThreadProjectionForWire as ua, Architecture as uc, PENDING_ATTACHMENT_THREAD_SEGMENT as ui, option as ul, isWithinRoot as un, getChangeRequestTerminologyForKind as uo, decodeRuntimeConfig as ur, resolveLatestProviderVersion as us, layerPruneWorker as ut, update$2 as uu, GitHubCredentials as v, P4_MCP_TOOL_NAMES as va, Platform as vc, parseAttachmentUuid as vi, invalidateAll as vl, parseCliArgs as vn, PersistenceSqlError as vo, resolveRootCliCommand as vr, decodeOtlpTraceRecords as vs, metricAttributes as vt, structuredPatch as w, MCP_APP_RESOURCE_SCHEME as wa, isQuitError as wc, toSafeThreadAttachmentSegment as wi, next$1 as wl, ServerEnvironmentIdentity as wn, layer$63 as wo, isSecretStoreError as wr, RotatingFileSink as ws, rpcRequestDuration as wt, PullRequestProviderError as x, MCP_APP_MAX_HTML_BYTES as xa, isWindows as xc, resolveAttachmentPath as xi, makeWith$2 as xl, layer$38 as xn, findAll as xo, SecretStoreEncodeError as xr, makeLocalFileTracer as xs, providerSessionsTotal as xt, detailFromCause as y, resolveP4McpToolDefinition as ya, UserId as yc, parseThreadSegmentFromAttachmentId as yi, keys$1 as yl, tokenizeCliArgs as yn, bufferLiveStream as yo, SecretStoreConcurrentReadError as yr, errorTag as ys, orchestrationEffectClaimsTotal as yt, removeLinkedWorktree as z, htmlRenderTheme as za, tag as zc, types as zi, withScope as zl, layer$55 as zn, pinnedRuntimeCommand as zo, resolveSourceControlWriterModelSelection as zr, modelSelectionCommandType as zs, layer$33 as zt };
97700
98156
 
97701
- //# sourceMappingURL=ProjectCloneTracker-DAE46hjz.mjs.map
98157
+ //# sourceMappingURL=preview-C_h8Tda3.mjs.map