@p4code/cli 0.9.18 → 0.9.20

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 (342) 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-BYrlvKdA.mjs} +278 -50
  7. package/dist/bin.mjs +2 -2
  8. package/dist/{binCli-DzRO6f_z.mjs → binCli-DReuiGmk.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 +2139 -2127
  13. package/dist/client/assets/{2NI2N5EU-Ds9jiLPm.js → 2NI2N5EU-DjM2qwkD.js} +2 -2
  14. package/dist/client/assets/{4UO7MD6I-BWEQQJHY.js → 4UO7MD6I-BJdq41GZ.js} +2 -2
  15. package/dist/client/assets/{5B3SVYGG-lcm66GRf.js → 5B3SVYGG-D21CBy6j.js} +2 -2
  16. package/dist/client/assets/{5GK6JWQ2-DegG64te.js → 5GK6JWQ2-DOIdqlC8.js} +2 -2
  17. package/dist/client/assets/{5N7A7DKN-CDv2ioO3.js → 5N7A7DKN-Bckll9rH.js} +2 -2
  18. package/dist/client/assets/{5OC2THR4-CaZVvwg8.js → 5OC2THR4-skJPz5iO.js} +2 -2
  19. package/dist/client/assets/{5S6HY5KT-B8WMtvrw.js → 5S6HY5KT-CRwXaSb1.js} +2 -2
  20. package/dist/client/assets/{6IMQ5BUJ-R-et-GtO.js → 6IMQ5BUJ-sJYhkmUL.js} +2 -2
  21. package/dist/client/assets/{6OLKWJ4F-CdOZHr7D.js → 6OLKWJ4F-DY2aNKk1.js} +2 -2
  22. package/dist/client/assets/{74OO7NKP-DVS5qE0v.js → 74OO7NKP-DpZyVE6P.js} +2 -2
  23. package/dist/client/assets/{75O6YZUN-B6bJpGs2.js → 75O6YZUN-8DIThGtQ.js} +2 -2
  24. package/dist/client/assets/{77XECAW3-DDozcJnk.js → 77XECAW3-BE-MTjvu.js} +2 -2
  25. package/dist/client/assets/{ABYRPUBD-BZd5-ucB.js → ABYRPUBD-DB_eiHX6.js} +2 -2
  26. package/dist/client/assets/AlertDialogRoot-COfNlajP.js +2 -0
  27. package/dist/client/assets/{AnimatedHeight-CsOfc5H1.js → AnimatedHeight-BoS1RBdk.js} +2 -2
  28. package/dist/client/assets/{AuthSurfaceShell--2lH1vql.js → AuthSurfaceShell-BM3c1qJe.js} +2 -2
  29. package/dist/client/assets/{BB2UYUI2-DAb-WdIu.js → BB2UYUI2-BhRNS6b8.js} +2 -2
  30. package/dist/client/assets/{BUM34MOA-DMU6CGcz.js → BUM34MOA-RvYWUXux.js} +2 -2
  31. package/dist/client/assets/{CEQABKGZ-BnDJUiDl.js → CEQABKGZ-byct14yE.js} +2 -2
  32. package/dist/client/assets/{CXAC5362-QKBU6D2s.js → CXAC5362-YcQsQFwj.js} +2 -2
  33. package/dist/client/assets/ChatGptUsageButton-BQOZ260S.js +2 -0
  34. package/dist/client/assets/ChatMarkdown-BdoTEVpd.js +49 -0
  35. package/dist/client/assets/{CheckboxIndicator-CLFg8-A1.js → CheckboxIndicator-Dj91Im5z.js} +2 -2
  36. package/dist/client/assets/{ClippedText-aNLi0IDp.js → ClippedText-CmBRrYNb.js} +2 -2
  37. package/dist/client/assets/CodexSetupSection.logic-CseyxFgK.js +2 -0
  38. package/dist/client/assets/{CollapsiblePanel-BlUD5mJC.js → CollapsiblePanel-BwDr-EKA.js} +2 -2
  39. package/dist/client/assets/{ComboboxClear-DKHwuDAL.js → ComboboxClear-DeqR6c-6.js} +2 -2
  40. package/dist/client/assets/{ComboboxGroupLabel-BaZLyLCv.js → ComboboxGroupLabel-Dk-MF4sD.js} +2 -2
  41. package/dist/client/assets/{CommandBlock-Bg2O3rbF.js → CommandBlock-Cg8P2GXg.js} +2 -2
  42. package/dist/client/assets/{CompositeRoot-_C3uLH2F.js → CompositeRoot-Cx12XSsh.js} +2 -2
  43. package/dist/client/assets/{ConnectAgentSurface-D-fMTn_R.js → ConnectAgentSurface-D9MYjA6g.js} +2 -2
  44. package/dist/client/assets/{ConnectionStatusDot-vOKtZfeV.js → ConnectionStatusDot-BnhNFCMA.js} +2 -2
  45. package/dist/client/assets/{DRLTVNUE-DvpJAT6K.js → DRLTVNUE-BZ7eTlHc.js} +2 -2
  46. package/dist/client/assets/{DYY6UVD2-DFSg5DAZ.js → DYY6UVD2-DIWnFjlV.js} +2 -2
  47. package/dist/client/assets/{DevicePanel-Dvozgov3.js → DevicePanel-CpWnw2HZ.js} +2 -2
  48. package/dist/client/assets/DeviceSetup-C02U1yvN.js +2 -0
  49. package/dist/client/assets/{DialogTitle-C9j5Tmuy.js → DialogTitle-5cBExuFs.js} +2 -2
  50. package/dist/client/assets/{DiffCommentAnnotation-CAml763Q.js → DiffCommentAnnotation-CHYeyesq.js} +3 -3
  51. package/dist/client/assets/{DiffFileTree-2Y-Da6MW.js → DiffFileTree-zq0G5Jq3.js} +2 -2
  52. package/dist/client/assets/DiffPanel-ghqOrQdi.js +2 -0
  53. package/dist/client/assets/{DiffWorkerPoolProvider-Czi5bOUV.js → DiffWorkerPoolProvider-QbRiMHeR.js} +3 -3
  54. package/dist/client/assets/{EmbeddedDesign-AHra-cLY.js → EmbeddedDesign-ExUecHKZ.js} +6 -6
  55. package/dist/client/assets/{EnvironmentMachineIcon-BnMVjB89.js → EnvironmentMachineIcon-Lz2YGk0G.js} +2 -2
  56. package/dist/client/assets/{ExpandableText-gKNgCxfU.js → ExpandableText-B034p2kF.js} +2 -2
  57. package/dist/client/assets/{FNOVOB4O-D2IqnTWb.js → FNOVOB4O-Cch7VyQQ.js} +2 -2
  58. package/dist/client/assets/{FieldControl-Bjdbc6Ii.js → FieldControl-H6iQvC-Q.js} +2 -2
  59. package/dist/client/assets/{FileDiff-Di0hvnyJ.js → FileDiff-C1_8HZ7T.js} +2 -2
  60. package/dist/client/assets/{FilePreviewPanel-2-RLs_YZ.js → FilePreviewPanel-DERxofVe.js} +6 -6
  61. package/dist/client/assets/FoldedSettingsSection-okCu3zVD.js +2 -0
  62. package/dist/client/assets/{HDGCDEEZ-AZF834xy.js → HDGCDEEZ-CJ_9BjZ0.js} +2 -2
  63. package/dist/client/assets/{HSJLKHB7-Dtz-7WMf.js → HSJLKHB7-BvfNYUiJ.js} +2 -2
  64. package/dist/client/assets/{Icons-BzIBDVKW.js → Icons-DmQwwfAN.js} +2 -2
  65. package/dist/client/assets/Input-DWc7cRWt.js +2 -0
  66. package/dist/client/assets/{IntervalSecondsField-Fdrpvkqj.js → IntervalSecondsField-S7jLIub2.js} +2 -2
  67. package/dist/client/assets/JZOYTAAL-RUIcMwMn.js +1 -0
  68. package/dist/client/assets/{K3MD6TGW-BPz_yQfQ.js → K3MD6TGW-C513S1_s.js} +2 -2
  69. package/dist/client/assets/{K7RP3OMA-C-IhAYzY.js → K7RP3OMA-zhgZmSWl.js} +2 -2
  70. package/dist/client/assets/{KeybindingsSettings.logic-DjD-8Wsr.js → KeybindingsSettings.logic-C6XG7NtX.js} +2 -2
  71. package/dist/client/assets/{LHDIQX7Q-Dw7FK-yZ.js → LHDIQX7Q-BmjYN5gQ.js} +2 -2
  72. package/dist/client/assets/{LUXOKEGN-Cp4yLfcO.js → LUXOKEGN-B0Kwi43W.js} +2 -2
  73. package/dist/client/assets/{LinkMachineSelect-v3ZAAPFG.js → LinkMachineSelect-GyKAeGYQ.js} +2 -2
  74. package/dist/client/assets/{MathTypeset-CAVYwtpt.js → MathTypeset-DfU_zRMI.js} +2 -2
  75. package/dist/client/assets/ModelLiveLayer-DjtYQpVe.js +3 -0
  76. package/dist/client/assets/{N3JZAHOW-sZve4CbV.js → N3JZAHOW-BXB2c-Us.js} +2 -2
  77. package/dist/client/assets/{NUIALGQ3-DMlKhtdq.js → NUIALGQ3-BkehuL9A.js} +2 -2
  78. package/dist/client/assets/{NoProjectsHero-B0ChXuQG.js → NoProjectsHero-C-VNr8Ui.js} +2 -2
  79. package/dist/client/assets/{O65XPQGZ-COhBlGA1.js → O65XPQGZ-CPn-XJue.js} +2 -2
  80. package/dist/client/assets/{O7XIQ6OM-D-y75rjS.js → O7XIQ6OM-DAQPVVnq.js} +2 -2
  81. package/dist/client/assets/{OFQON5FD-kw-f4mV4.js → OFQON5FD-BKoNBxEK.js} +2 -2
  82. package/dist/client/assets/{P4ConnectAccountPages-BXM_FJyy.js → P4ConnectAccountPages-C_7SfUQ2.js} +2 -2
  83. package/dist/client/assets/{P4ConnectSidebarSignIn-D8uwPPR6.js → P4ConnectSidebarSignIn-B6e-wkqI.js} +2 -2
  84. package/dist/client/assets/{PJQHF43J-Dww1R-k6.js → PJQHF43J-Byb4NdRa.js} +2 -2
  85. package/dist/client/assets/PanelLayoutControls-BpjspxNc.js +216 -0
  86. package/dist/client/assets/{PierreEntryIcon-C-5f-jFb.js → PierreEntryIcon-h4qT502J.js} +2 -2
  87. package/dist/client/assets/{PopoverHandle-BwqnKm9Y.js → PopoverHandle-DEcvmS0k.js} +2 -2
  88. package/dist/client/assets/PreviewPanel-lT6UT8SC.js +2 -0
  89. package/dist/client/assets/{ProjectDefaultsSettings-rvN_67Gu.js → ProjectDefaultsSettings-nqWOPUBM.js} +2 -2
  90. package/dist/client/assets/{ProjectFavicon-CPvmNs3J.js → ProjectFavicon-wwkvNTYJ.js} +3 -3
  91. package/dist/client/assets/{ProjectIconPickerDialog-blbck4gY.js → ProjectIconPickerDialog-CAEx0HQF.js} +2 -2
  92. package/dist/client/assets/{ProjectMonogram-Cesz5yVS.js → ProjectMonogram-C8btbogu.js} +2 -2
  93. package/dist/client/assets/{ProviderAuthTerminal-BXGE9cPY.js → ProviderAuthTerminal-Seln-0IQ.js} +2 -2
  94. package/dist/client/assets/ProviderModelPicker-p5oWTfTD.js +2 -0
  95. package/dist/client/assets/{ProviderSettingsForm-CRvI8mDe.js → ProviderSettingsForm-DP5cO9tc.js} +2 -2
  96. package/dist/client/assets/PullRequestCodeTab-BhWK4Zqq.js +6 -0
  97. package/dist/client/assets/{RHNBAITX-CY4FKVtu.js → RHNBAITX-ZKmIoa8f.js} +2 -2
  98. package/dist/client/assets/{ReadOnlySourcePreview-DK9ZCAf4.js → ReadOnlySourcePreview-C8hhN481.js} +2 -2
  99. package/dist/client/assets/{RedactedSensitiveText-DrIhPFXw.js → RedactedSensitiveText-BMXImj30.js} +2 -2
  100. package/dist/client/assets/RenderErrorBoundary-CYWiIuBa.js +23 -0
  101. package/dist/client/assets/{RightPanelResizeHandle-DBCfKzRv.js → RightPanelResizeHandle-Cog3JVw0.js} +2 -2
  102. package/dist/client/assets/{SLD4V6NK-Dtrbq5qR.js → SLD4V6NK-BW_1--rc.js} +2 -2
  103. package/dist/client/assets/{ScheduledTasksSettings-CvbQDrJp.js → ScheduledTasksSettings-D6cHBUhW.js} +6 -6
  104. package/dist/client/assets/{ScopedSwitch-DQHfQgMZ.js → ScopedSwitch-BzU8Hn6s.js} +2 -2
  105. package/dist/client/assets/{ScrollAreaCorner-B9Aiu69u.js → ScrollAreaCorner-DFCZuJ0r.js} +2 -2
  106. package/dist/client/assets/{SecretInput-CxJl9pux.js → SecretInput-CRgvNUgU.js} +2 -2
  107. package/dist/client/assets/{SelectScrollUpArrow-Dj2om6Qx.js → SelectScrollUpArrow-C-MWJdyw.js} +2 -2
  108. package/dist/client/assets/{SelfImproveSettingsSection-yFj7aCio.js → SelfImproveSettingsSection--Dcxxm73.js} +2 -2
  109. package/dist/client/assets/{SettingsPanels-H_7XUe5G.js → SettingsPanels-C79826rW.js} +7 -7
  110. package/dist/client/assets/{SettingsPanels.logic-BYLv56aj.js → SettingsPanels.logic-DPfiTtgf.js} +2 -2
  111. package/dist/client/assets/{SettingsScopeNotice-pJqEfHRd.js → SettingsScopeNotice-C9OAfACb.js} +2 -2
  112. package/dist/client/assets/{SidebarStageBackdrop-DWShR_RZ.js → SidebarStageBackdrop-syJ1VaYP.js} +2 -2
  113. package/dist/client/assets/{T3PCR2KE-BFmO9IZ-.js → T3PCR2KE-Bc51hYDo.js} +2 -2
  114. package/dist/client/assets/{TKWO2OVW-DMeVANpK.js → TKWO2OVW-mV-gJkJw.js} +2 -2
  115. package/dist/client/assets/{TSHNXIZL-COvYTPCc.js → TSHNXIZL-Bs_azRDw.js} +2 -2
  116. package/dist/client/assets/{ThemeEditorPanel-BxOl9N6E.js → ThemeEditorPanel-DvlDdC-r.js} +3 -3
  117. package/dist/client/assets/{ThreadDetailsItemsMenu-BXQbo6bY.js → ThreadDetailsItemsMenu-DFAwPwtf.js} +44 -44
  118. package/dist/client/assets/ThreadTerminalDrawer-CBRpijGu.js +5 -0
  119. package/dist/client/assets/TooltipProvider-DiV5KdTq.js +2 -0
  120. package/dist/client/assets/{UQJE5E4I-CajoppS3.js → UQJE5E4I-DL8IPyLr.js} +2 -2
  121. package/dist/client/assets/{USNYFO5S-BQLaJAkC.js → USNYFO5S-CxX5m2eb.js} +2 -2
  122. package/dist/client/assets/{Virtualizer-kAxtf9JI.js → Virtualizer-hL0IrPqB.js} +2 -2
  123. package/dist/client/assets/{WEVWDWVA-Bn1CMBLe.js → WEVWDWVA-CCg7BLOe.js} +2 -2
  124. package/dist/client/assets/{WorkspaceBreadcrumb-KdZMrP13.js → WorkspaceBreadcrumb-Cok6l_SJ.js} +2 -2
  125. package/dist/client/assets/{WorkspacePageContainer-VqvvyrKx.js → WorkspacePageContainer-_--jFIZ8.js} +2 -2
  126. package/dist/client/assets/{WorkspacePageHeader-Ca7-ugiS.js → WorkspacePageHeader-CJB6rvZc.js} +2 -2
  127. package/dist/client/assets/{X5RFHQXM-CPBgn0uR.js → X5RFHQXM-CoEhAoaG.js} +2 -2
  128. package/dist/client/assets/{X62E3GBT-DEsBFWSE.js → X62E3GBT-v3am3MF5.js} +2 -2
  129. package/dist/client/assets/{XBNEOJTC-rIiejuIa.js → XBNEOJTC-CNH8QiJb.js} +2 -2
  130. package/dist/client/assets/{YHV2MVVZ-FepTeOr1.js → YHV2MVVZ-BAtBSLld.js} +2 -2
  131. package/dist/client/assets/{YURCZMG2-Co7j1onF.js → YURCZMG2-B0qIfRPW.js} +2 -2
  132. package/dist/client/assets/{YVG2LODB-CH8YtqJ9.js → YVG2LODB-7yKJRNqu.js} +2 -2
  133. package/dist/client/assets/_chat-CPyEKO_k.js +47 -0
  134. package/dist/client/assets/_chat.design-BkPz6B_R.js +2 -0
  135. package/dist/client/assets/{_chat.index-DZmhCx_Q.js → _chat.index-DGRldHwy.js} +2 -2
  136. package/dist/client/assets/{_chat.new-BLxqLetm.js → _chat.new-Be-FWv3w.js} +2 -2
  137. package/dist/client/assets/_chat.pull-requests-Csb_f8e_.js +2 -0
  138. package/dist/client/assets/{alert-BdISKl4u.js → alert-D6WJ0q4-.js} +2 -2
  139. package/dist/client/assets/{alert-dialog-Broi1wym.js → alert-dialog-DsMTn0ZK.js} +2 -2
  140. package/dist/client/assets/{assetUrls-DyJx-URx.js → assetUrls-CsEDCYyh.js} +2 -2
  141. package/dist/client/assets/assets-CA-ZYmQr.js +2 -0
  142. package/dist/client/assets/{browserHistoryStore-zdRsIuMc.js → browserHistoryStore-BVGoot2u.js} +2 -2
  143. package/dist/client/assets/{browserLinkTarget-aye_Gpt4.js → browserLinkTarget-zjhG9Lyg.js} +2 -2
  144. package/dist/client/assets/{checkbox-ueGFMqVv.js → checkbox-Cw33xyU7.js} +2 -2
  145. package/dist/client/assets/{color-picker-CUoPp4AJ.js → color-picker-Bmtarpj9.js} +2 -2
  146. package/dist/client/assets/{combobox-BfOjf6Iu.js → combobox-D6RfzdE7.js} +2 -2
  147. package/dist/client/assets/{command-CeMH9lgx.js → command-1dJ-vX2N.js} +2 -2
  148. package/dist/client/assets/{connect-CQUjsv6p.js → connect-BdyG6QZP.js} +2 -2
  149. package/dist/client/assets/connect-agent-BZgF1WVU.js +2 -0
  150. package/dist/client/assets/{design-BL2REeQ-.js → design-9PZeJvkV.js} +2 -2
  151. package/dist/client/assets/{device-DUMKyegd.js → device-B_zaE4OU.js} +2 -2
  152. package/dist/client/assets/{dialog-BzESHWgr.js → dialog-5OaxRXCC.js} +2 -2
  153. package/dist/client/assets/{diffPanelStore-B-hQEy6C.js → diffPanelStore-D3ARjaef.js} +2 -2
  154. package/dist/client/assets/{diffRendering-BnN6RWwy.js → diffRendering-aGA2PUMV.js} +2 -2
  155. package/dist/client/assets/{dist--Lo1A95S.js → dist-DQanjDEK.js} +3 -3
  156. package/dist/client/assets/{draft-input-BozMgkbl.js → draft-input-DM7mC5ty.js} +2 -2
  157. package/dist/client/assets/{duoViewer-mOZwt5UN.js → duoViewer-WUHHsw83.js} +2 -2
  158. package/dist/client/assets/{dynamic-3CmgXeht.js → dynamic-BrZIqKQ1.js} +3 -3
  159. package/dist/client/assets/{embeddedScripts-g3gqCUmg.js → embeddedScripts-Bjon5VEq.js} +2 -2
  160. package/dist/client/assets/{empty-CeYEMFdG.js → empty-VkAC9qIO.js} +2 -2
  161. package/dist/client/assets/entities-iVR9hStG.js +2 -0
  162. package/dist/client/assets/{fileLinks-LQyYck3z.js → fileLinks-ZsyrXe-F.js} +2 -2
  163. package/dist/client/assets/{fileTreeExpansion-CY-keZ2e.js → fileTreeExpansion-CZA6X0sP.js} +2 -2
  164. package/dist/client/assets/fold-vertical-CN9ryhZz.js +2 -0
  165. package/dist/client/assets/{getDiffFileInput-ClUa7N40.js → getDiffFileInput-C973oCCO.js} +2 -2
  166. package/dist/client/assets/{htmlRender-CxBGTvqW.js → htmlRender-DYI6n9Xo.js} +2 -2
  167. package/dist/client/assets/index-ColdECgE.js +3 -0
  168. package/dist/client/assets/{input-K95B1E2P.js → input-CiPGmOLv.js} +2 -2
  169. package/dist/client/assets/{input-group-BAbOiIZs.js → input-group-DOUsG7P-.js} +2 -2
  170. package/dist/client/assets/{kbd-D9Q8zN3_.js → kbd-C8opCm5n.js} +2 -2
  171. package/dist/client/assets/{keybindings-C427DPQo.js → keybindings-CbaDrm2P.js} +2 -2
  172. package/dist/client/assets/{lazy-BDrl-IrZ.js → lazy-BWBxhQ9c.js} +4 -4
  173. package/dist/client/assets/{lazyRouteComponent-Bi84pz13.js → lazyRouteComponent-BZe6tHvz.js} +2 -2
  174. package/dist/client/assets/{link-B57I0_wC.js → link-BHR6GsRr.js} +2 -2
  175. package/dist/client/assets/{linkedPrompt-zM8XlD0_.js → linkedPrompt-CN5vzMKu.js} +2 -2
  176. package/dist/client/assets/main-i3nSjwXu.css +2 -0
  177. package/dist/client/assets/main-xeaL6Ue7.js +38 -0
  178. package/dist/client/assets/mediaReference-D4xASAKr.js +2 -0
  179. package/dist/client/assets/{mediaSource-BQkNpHYP.js → mediaSource-DJf0a3Hm.js} +2 -2
  180. package/dist/client/assets/{modelScene-DWYEc7-j.js → modelScene-Dg2T9WKU.js} +2 -2
  181. package/dist/client/assets/{number-field-D6t0GpAB.js → number-field-BkDsfSCt.js} +2 -2
  182. package/dist/client/assets/{observeResize-nOwAB2yP.js → observeResize-BESwMMOy.js} +2 -2
  183. package/dist/client/assets/{onboarding-BpYTNtvC.js → onboarding-7dyWHc7v.js} +2 -2
  184. package/dist/client/assets/{openFileInPreview-DFpXOfx7.js → openFileInPreview-l71la8rp.js} +2 -2
  185. package/dist/client/assets/{p4ProjectFile-Dkwk3dWQ.js → p4ProjectFile-CC8L8IBq.js} +2 -2
  186. package/dist/client/assets/{pair-Bc34xPWk.js → pair-CjGF7d0N.js} +2 -2
  187. package/dist/client/assets/{pendingSendStore-ettG1x40.js → pendingSendStore-CX8QB7C5.js} +2 -2
  188. package/dist/client/assets/{phoneViewer-BCeyyPaZ.js → phoneViewer-CpRP0Ylg.js} +2 -2
  189. package/dist/client/assets/{pierre-icons-C2-xRx0J.js → pierre-icons-CX8MNnZC.js} +2 -2
  190. package/dist/client/assets/{popover-CtPuvMeZ.js → popover-hyDlWUPU.js} +2 -2
  191. package/dist/client/assets/{preview-CS0uw3GP.js → preview-DX0t2QY_.js} +2 -2
  192. package/dist/client/assets/{preview-DIIM6Lws.js → preview-DnCP9Q0k.js} +2 -2
  193. package/dist/client/assets/{previewMiniPlayerStore-oJw0qrRM.js → previewMiniPlayerStore-DByen2Nk.js} +2 -2
  194. package/dist/client/assets/{primary-B0bbGdiR.js → primary-BvBZk3BL.js} +2 -2
  195. package/dist/client/assets/primaryCloudLinkState-CHXPTqr2.js +2 -0
  196. package/dist/client/assets/{projectFilesQueryState-DpLF9eJd.js → projectFilesQueryState-D1KYNZXm.js} +2 -2
  197. package/dist/client/assets/{projectScriptEditor-Bp7idsB3.js → projectScriptEditor-Dy8U6TBl.js} +2 -2
  198. package/dist/client/assets/providerSkills-CpjiWlTj.js +2 -0
  199. package/dist/client/assets/{pullRequestDetail.logic-8vF2qB9V.js → pullRequestDetail.logic-CHJRE71s.js} +3 -3
  200. package/dist/client/assets/{pullRequestIcons-6_4tgVDN.js → pullRequestIcons-1lUVOGQJ.js} +2 -2
  201. package/dist/client/assets/{pullRequestReviewStore-C8_coQYO.js → pullRequestReviewStore-CUZ0N4F2.js} +2 -2
  202. package/dist/client/assets/pullRequests-DjzqqdNY.js +2 -0
  203. package/dist/client/assets/queries-D2fZuj-t.js +2 -0
  204. package/dist/client/assets/{query-DpmTmXUV.js → query-CeIgbVxh.js} +2 -2
  205. package/dist/client/assets/{radio-group-DSfZzUu8.js → radio-group-C14CASyG.js} +2 -2
  206. package/dist/client/assets/relay-aZlRxOWS.js +2 -0
  207. package/dist/client/assets/{renderScheduler-Cvu4oEGc.js → renderScheduler-BLaTctiX.js} +2 -2
  208. package/dist/client/assets/{rightPanelStore-D-meSGn7.js → rightPanelStore-Bt0unAo8.js} +2 -2
  209. package/dist/client/assets/runtime-D5AfNyNA.js +7 -0
  210. package/dist/client/assets/{runtimeModeConfig-MYD8WQl8.js → runtimeModeConfig-DymGoV55.js} +2 -2
  211. package/dist/client/assets/{scheduledTasksSettings.logic-DmlMHwKF.js → scheduledTasksSettings.logic-BjvsiCPJ.js} +3 -3
  212. package/dist/client/assets/{scroll-area-D9QT2Odm.js → scroll-area-D2D-AlvC.js} +2 -2
  213. package/dist/client/assets/{select-BtqP8nTL.js → select-CE2f-g-3.js} +2 -2
  214. package/dist/client/assets/{selfImproveFindings-DZS7PCvJ.js → selfImproveFindings-Bhi6QF1b.js} +2 -2
  215. package/dist/client/assets/{server-BYnv0CK4.js → server-B2y_yoz_.js} +2 -2
  216. package/dist/client/assets/{session-BryEqNW-.js → session-Dt_Dt-Og.js} +2 -2
  217. package/dist/client/assets/session-logic-CPQJM-gL.js +27 -0
  218. package/dist/client/assets/{settings-A-pqSt1Y.js → settings-BIR_Igib.js} +2 -2
  219. package/dist/client/assets/{settings.appearance-C_uChPSz.js → settings.appearance-D0uNLG6m.js} +2 -2
  220. package/dist/client/assets/settings.archived-DHE_0aGh.js +2 -0
  221. package/dist/client/assets/{settings.computer-use-Dg_7f0JL.js → settings.computer-use-CNVg4Kl5.js} +2 -2
  222. package/dist/client/assets/settings.connections-Bt5upKXR.js +2 -0
  223. package/dist/client/assets/{settings.data-controls-SDdipjc2.js → settings.data-controls-Bu-fCPHf.js} +2 -2
  224. package/dist/client/assets/{settings.decisions-CoyKjdc1.js → settings.decisions-B9lckxtw.js} +2 -2
  225. package/dist/client/assets/{settings.designs-4eHPAt6y.js → settings.designs-CLLnQttY.js} +2 -2
  226. package/dist/client/assets/settings.diagnostics-Bl2X85nQ.js +2 -0
  227. package/dist/client/assets/{settings.general-DAWqQIHm.js → settings.general-CJSdSR2k.js} +2 -2
  228. package/dist/client/assets/settings.integrations-DRpNV9D5.js +2 -0
  229. package/dist/client/assets/{settings.keybindings-B0oNRJrN.js → settings.keybindings-BPtpYe84.js} +2 -2
  230. package/dist/client/assets/{settings.open-source-licenses-BI8-fEG8.js → settings.open-source-licenses-DYpshDh1.js} +2 -2
  231. package/dist/client/assets/{settings.plugins-B6My9wD7.js → settings.plugins-C9ZOoiar.js} +4 -4
  232. package/dist/client/assets/settings.projects-CMHQJUvG.js +4 -0
  233. package/dist/client/assets/settings.providers-Bfr9fIiF.js +3 -0
  234. package/dist/client/assets/{settings.scheduled-tasks-Bx6ZIK0R.js → settings.scheduled-tasks-BEYOe2xs.js} +2 -2
  235. package/dist/client/assets/{settings.secrets-Dt4ORQnt.js → settings.secrets-DIyDPOQx.js} +2 -2
  236. package/dist/client/assets/{settings.snap-shot-CytMd2pC.js → settings.snap-shot-DmjWtA3x.js} +2 -2
  237. package/dist/client/assets/settings.source-control-DvaOZ7kM.js +2 -0
  238. package/dist/client/assets/{settings.storage-BfvQd358.js → settings.storage-B4XbjYVO.js} +2 -2
  239. package/dist/client/assets/settingsLayout-Ds1fJJk7.js +3 -0
  240. package/dist/client/assets/{sidebar-DbrWNN9-.js → sidebar-4oe_dr6q.js} +2 -2
  241. package/dist/client/assets/{sidebarProjectGrouping-CZnpDNTf.js → sidebarProjectGrouping-RQlsFe56.js} +2 -2
  242. package/dist/client/assets/{skeleton-DxuQc9Kk.js → skeleton-D6RVfMa8.js} +2 -2
  243. package/dist/client/assets/{sourceControl-BbrGhAuF.js → sourceControl-BhvxhaEx.js} +2 -2
  244. package/dist/client/assets/sourceControlClients-Bs5R87fg.js +2 -0
  245. package/dist/client/assets/{spinner-DmRIQvmI.js → spinner-C-qDE4WQ.js} +2 -2
  246. package/dist/client/assets/src-R7EkrVcv.js +15 -0
  247. package/dist/client/assets/terminal-links-BohHFDfc.js +2 -0
  248. package/dist/client/assets/terminalSessions-Cnj30QDx.js +2 -0
  249. package/dist/client/assets/{textarea-C_3SxeEV.js → textarea-CWbMGhL9.js} +2 -2
  250. package/dist/client/assets/{themePalette-DSR5tBE9.js → themePalette-B_fGWNEh.js} +3 -3
  251. package/dist/client/assets/{threadCheckpoints-D0dMlqZE.js → threadCheckpoints-B88N2CXf.js} +2 -2
  252. package/dist/client/assets/{toggle-Zti3zuzr.js → toggle-CKr6iZUR.js} +2 -2
  253. package/dist/client/assets/{toggle-group-D015gcqT.js → toggle-group-B1WN0Pgy.js} +2 -2
  254. package/dist/client/assets/{tooltip-CAzkzAoH.js → tooltip-CCYU8XGM.js} +2 -2
  255. package/dist/client/assets/uiStateStore-BZ4RuLIL.js +2 -0
  256. package/dist/client/assets/unfold-vertical-CldLe1hB.js +2 -0
  257. package/dist/client/assets/{usage-BJA7zQoS.js → usage-GID8Ml88.js} +2 -2
  258. package/dist/client/assets/{usageAccess-D5FAb4jV.js → usageAccess-B0nqd8U-.js} +2 -2
  259. package/dist/client/assets/{usageFormat-Njxx7Q49.js → usageFormat-CUSzTPTq.js} +2 -2
  260. package/dist/client/assets/{usageShortcuts-DuJeedG7.js → usageShortcuts-jGu1QJHr.js} +2 -2
  261. package/dist/client/assets/{use-atom-command-DMW6SFOx.js → use-atom-command-QDd_NqJQ.js} +2 -2
  262. package/dist/client/assets/{useAriaLabelledBy-E7KNTqMb.js → useAriaLabelledBy-CJvtvui4.js} +2 -2
  263. package/dist/client/assets/useHandleNewThread-ClgC6Lcw.js +2 -0
  264. package/dist/client/assets/{useLocation-hVHAnHTx.js → useLocation-KvBZAN7v.js} +2 -2
  265. package/dist/client/assets/{useNavigate-B7EiSugn.js → useNavigate-DXSBYc-k.js} +2 -2
  266. package/dist/client/assets/{useNavigateBack-BC3GGm7e.js → useNavigateBack-DzR35iiJ.js} +2 -2
  267. package/dist/client/assets/{useP4ConnectAuthPrompt-D3qxx30I.js → useP4ConnectAuthPrompt-DMl-0U53.js} +2 -2
  268. package/dist/client/assets/{useParams-C5b2x5BH.js → useParams-D9reDvT8.js} +2 -2
  269. package/dist/client/assets/{usePermissionStatus-Zf48W2tu.js → usePermissionStatus-C5YvHVz-.js} +2 -2
  270. package/dist/client/assets/{usePopupViewport-Dtwu2x5j.js → usePopupViewport-D7yp2NvZ.js} +2 -2
  271. package/dist/client/assets/{usePullRequestActions-BtPaWuCg.js → usePullRequestActions-CJvtylIq.js} +2 -2
  272. package/dist/client/assets/{useRegisterFieldControl-BMmbsxkx.js → useRegisterFieldControl-D-hYtXkm.js} +2 -2
  273. package/dist/client/assets/{useScopedModelAvailability-BIveWOlk.js → useScopedModelAvailability-DGPFTMHL.js} +2 -2
  274. package/dist/client/assets/useSettings-BJR7Rf97.js +3 -0
  275. package/dist/client/assets/utils-DkKLB01I.js +24 -0
  276. package/dist/client/assets/vcsRefInvalidation-Bnup-5J0.js +2 -0
  277. package/dist/client/assets/welcome-CMuTnFAm.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-DcFC_OYY.mjs} +902 -438
  281. package/dist/{renderer-iWfzRWCX.mjs → renderer-CswgrCon.mjs} +2 -2
  282. package/dist/{runtime-CllDK9QU.mjs → runtime-Bec3_bh8.mjs} +3 -3
  283. package/dist/{runtimeLayer-D1H3yRj8.mjs → runtimeLayer-B6H9jZgZ.mjs} +1 -1
  284. package/dist/{runtimeLayer-CblMBDQ6.mjs → runtimeLayer-D4LpzNmS.mjs} +3263 -2983
  285. package/dist/{server-vm1eH-y1.mjs → server-4nWc1d6L.mjs} +385 -229
  286. package/dist/{sha2-9FUhed4s.mjs → sha2-BfCJmkJJ.mjs} +47 -8
  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/CodexSetupSection.logic-CNAX4_fV.js +0 -2
  293. package/dist/client/assets/DeviceSetup-O_9LLGD9.js +0 -2
  294. package/dist/client/assets/DiffPanel-CDixqNzb.js +0 -2
  295. package/dist/client/assets/FoldedSettingsSection-CrJX4FnL.js +0 -2
  296. package/dist/client/assets/Input-BWhtnCC0.js +0 -2
  297. package/dist/client/assets/JZOYTAAL-BCdmxsmo.js +0 -1
  298. package/dist/client/assets/ModelLiveLayer-CxX5pYmA.js +0 -3
  299. package/dist/client/assets/PanelLayoutControls-CC5OYRRR.js +0 -216
  300. package/dist/client/assets/PreviewPanel-BvRNyyKQ.js +0 -2
  301. package/dist/client/assets/ProviderModelPicker-Cq3CogU6.js +0 -2
  302. package/dist/client/assets/PullRequestCodeTab-C5kr72DG.js +0 -6
  303. package/dist/client/assets/RenderErrorBoundary-DgYrYlQR.js +0 -23
  304. package/dist/client/assets/ThreadTerminalDrawer-DcYWT4k2.js +0 -5
  305. package/dist/client/assets/TooltipProvider-BzOo4iyi.js +0 -2
  306. package/dist/client/assets/_chat-DoDgVLYz.js +0 -47
  307. package/dist/client/assets/_chat.design-C593M39o.js +0 -2
  308. package/dist/client/assets/_chat.pull-requests-0Ce1mGUC.js +0 -2
  309. package/dist/client/assets/assets-lJdcWn_Q.js +0 -2
  310. package/dist/client/assets/connect-agent-DsQQcex2.js +0 -2
  311. package/dist/client/assets/entities-CpJdh0W5.js +0 -2
  312. package/dist/client/assets/fold-vertical-BscQ96iN.js +0 -2
  313. package/dist/client/assets/index-BWKkBtFt.js +0 -3
  314. package/dist/client/assets/main-C8b9a0ht.js +0 -37
  315. package/dist/client/assets/main-CCH0X0zL.css +0 -2
  316. package/dist/client/assets/mediaReference-BIsAfUoY.js +0 -2
  317. package/dist/client/assets/primaryCloudLinkState-B6CxZwAR.js +0 -2
  318. package/dist/client/assets/providerSkills-yqPKKW6i.js +0 -2
  319. package/dist/client/assets/pullRequests-u-PJpGXV.js +0 -2
  320. package/dist/client/assets/queries-DDAXRF4r.js +0 -2
  321. package/dist/client/assets/relay-CnLeC-mg.js +0 -2
  322. package/dist/client/assets/runtime-DUPVFypn.js +0 -7
  323. package/dist/client/assets/session-logic-DZfPxiBF.js +0 -26
  324. package/dist/client/assets/settings.archived-BtKfrhpi.js +0 -2
  325. package/dist/client/assets/settings.connections-CHawbHDz.js +0 -2
  326. package/dist/client/assets/settings.diagnostics-BFlcsuN0.js +0 -2
  327. package/dist/client/assets/settings.integrations-CpUf4-MX.js +0 -2
  328. package/dist/client/assets/settings.projects-hrhEEIli.js +0 -4
  329. package/dist/client/assets/settings.providers-BKeGnq6G.js +0 -3
  330. package/dist/client/assets/settings.source-control-B6eUVvNg.js +0 -2
  331. package/dist/client/assets/settingsLayout-BijX6mlS.js +0 -3
  332. package/dist/client/assets/sourceControlClients-CG8qRQgm.js +0 -2
  333. package/dist/client/assets/src-BZzGU-vc.js +0 -15
  334. package/dist/client/assets/terminal-links-FD1wyGOp.js +0 -2
  335. package/dist/client/assets/terminalSessions-D1m7FXoa.js +0 -2
  336. package/dist/client/assets/uiStateStore-B0Z02qoV.js +0 -2
  337. package/dist/client/assets/unfold-vertical-DeuiNAAp.js +0 -2
  338. package/dist/client/assets/useHandleNewThread-Cmiu3y4G.js +0 -2
  339. package/dist/client/assets/useSettings-C6RmJr-q.js +0 -3
  340. package/dist/client/assets/utils-Cs97wR6T.js +0 -24
  341. package/dist/client/assets/vcsRefInvalidation-CAa5en8i.js +0 -2
  342. 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 { $d as filterStatusOk$1, $f as make$85, $l as VcsUnsupportedOperationError, $m as EventId, $p as isStreamUint8Array, Aa as CodexSettings, Ah as bytes, Au as reflect, Ba as ResponseStreamingMode, Bi as OrchestrationDispatchCommandError, Bm as CheckpointId, Cc as OrchestrationV2ProviderSessionJson, Cd as Path, Cf as setHeader, Cm as MODEL_SLUG_ALIASES_BY_PROVIDER, Co as SCRIPT_RUN_COMMAND_PATTERN, Dc as OrchestrationV2ProviderTurnJson, Df as make$84, Dh as merge$2, Ea as AntigravitySettings, El as ThreadLinkedPullRequest, Fa as DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL, Fm as ReviewCommentContextRecord, Ga as globalIdleCompaction, Gl as VcsProcessExitError, Go as EasDeviceHostConfig, Gp as getPayloadEncoding, Ha as ServerSettingsError, Hl as SourceControlProviderKind, Hm as CheckpointScopeId, Ia as DEFAULT_SERVER_SETTINGS, Il as pullRequestHostOf, Im as ASSISTANT_CITATION_MAX_COMMENT_LENGTH, Ja as makeBinaryPathSetting, Jf as uint8Array, Jl as VcsProcessOutputReadError, Jm as CommandId, Ka as isUnconfiguredDefaultInstanceEnabled, Kc as OrchestrationV2TurnItemJson, Kl as VcsProcessMissingExitCodeError, Kp as getResponseEncoding, Ks as getParamNames, La as GitHubHost, Lc as OrchestrationV2StoredEvent, Lm as ASSISTANT_CITATION_MAX_TEXT_LENGTH, Mc as OrchestrationV2RuntimeRequestJson, Mf as StatusCodeError, Mm as isProviderDriverKind, Mr as P4ProjectFile, Na as DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL, Nf as TransportError, Nm as ComposerContextRecord, Nr as P4_PROJECT_FILE_NAME, Oc as OrchestrationV2RunAttemptJson, Of as DecodeError, Oh as remove$5, Ol as ThreadPullRequestLink, Om as ProviderDriverKind, Ou as getSlotParseOptions, Pa as DEFAULT_BACKGROUND_ACTIVITY_PROFILE, Pc as OrchestrationV2SearchThreadInput, Pf as isHttpClientError, Pm as OrchestrationMessageContext, Pr as PROJECT_FILE_BACKED_SETTINGS, Pu as getPayloadSchemas, Qd as TypeId$17, Qf as WatchBackend, Qm as EnvironmentId, Qp as isStreamSchema, Ra as PROJECT_SCOPED_SERVER_SETTING_KEYS, Ri as ApplicationEventMetadata, Rl as resolvePullRequestAuthorFilter, Rm as AssistantCitation, Rs as RelayManagedEndpointOrigin, Sf as setBody, Sh as CurrentRedactedNames, Sm as DEFAULT_TEXT_GENERATION_MODEL_BY_PROVIDER, Tc as OrchestrationV2ProviderThreadJson, Tf as setUrl, Tm as ModelCapabilities, Uf as isHttpBody, Ui as PROJECT_CLONE_ERROR_MAX_LENGTH, Ul as SourceControlRepositoryError, Va as ServerSettings, Vl as SourceControlProviderError, Vs as RelayManagedEndpointRuntimeConfig, Wa as UsageLimitSourceConfig, Wf as jsonUnsafe, Wi as GitCommandError, Wl as VcsDriverKind, Xc as isOrchestrationV2WorkActive, Xf as FileSystem, Xl as VcsProcessStdinWriteError, Xm as ContextTransferId, Xp as getWithHeadersAnnotation, Ya as makeProviderSettingsSchema, Yc as isKnownOrchestrationV2EventType, Yf as urlParams, Yl as VcsProcessSpawnError, Ym as ContextHandoffId, Yp as getStatusSuccessSchema, Zf as FileTypeId, Zl as VcsProcessTimeoutError, Zp as isNoContent, _f as get$9, _l as StoredProjectIcon, ac as OrchestrationV2ContextTransferJson, af as schemaBodyJson, bf as prependUrl, bh as TrimmedString, bl as ProviderApprovalDecision, bm as DEFAULT_MODEL_BY_PROVIDER, bu as PROVIDER_SEND_TURN_MAX_IMAGE_BYTES, cf as basicAuth, ch as ProviderSessionId, dh as RawEventId, ec as OrchestrationV2AppThreadJson, ef as fromWeb, eh as IsoDateTime, el as orchestrationV2RunWorkStartedAt, em as isWithHeaders, eo as resolveProjectProviderInstanceEnabled, ep as BadArgument, eu as ModelSelection, ff as bodyJsonUnsafe, fl as ProjectScript, hc as OrchestrationV2ExecutionNodeJson, hh as RuntimeRequestId, hu as ChatAttachment, ia as isProviderTextGenerationCapable, ih as PlanId, im as hasBody, io as withIdleCompaction, ip as systemError, ja as CompressMode, jf as InvalidUrlError, jh as fromInputUnsafe$1, jm as defaultInstanceIdForDriver, ka as ClaudeSettings, kc as OrchestrationV2RunJson, kf as HttpClientError, km as ProviderInstanceId, lf as bearerToken, lh as ProviderThreadId, ln as DesktopHostTelemetryMessage, lp as ThreadEnvMode, mf as bodyText, mh as RunId, nc as OrchestrationV2CheckpointScopeJson, nd as addHeaderAttributes, nh as NodeId, nm as withHeaders, no as secretSetting, np as badArgument, of as acceptJson, oh as PositiveInt, pc as OrchestrationV2DomainEventJson, ph as RunAttemptId, qa as keepUnknownOverrideKeys, qf as text$9, ql as VcsProcessOutputLimitError, qp as getResponseEncodingSchema, ra as isProviderAvailable, rc as OrchestrationV2ContextHandoffJson, rd as addUrlAttributes, rf as TypeId$18, rh as NonNegativeInt, rm as allShort, ro as secretSettingsFields, sc as OrchestrationV2ConversationMessageJson, sd as toHeaders, sf as appendUrlParams, sh as ProjectId, sm as decodeSchema, ta as ServerSelfUpdateError, tc as OrchestrationV2CheckpointJson, tf as matchStatus, th as MessageId, to as resolveProviderInstanceEnabled, tp as PlatformError, uf as bodyFormData, uh as ProviderTurnId, un as DesktopTelemetryControlMessage, vc as OrchestrationV2PlanArtifact, vf as make$83, vh as ThreadId, vm as CustomModelSetting, wd as TypeId$19, wf as setHeaders, wh as fromInput$1, wl as ProviderUserInputAnswers, wo as THREAD_JUMP_KEYBINDING_COMMANDS, wu as isProviderSendTurnSupportedImageMimeType, xf as put, xh as TurnItemId, xo as MODEL_PICKER_JUMP_KEYBINDING_COMMANDS, yf as post, yh as TrimmedNonEmptyString, ym as DEFAULT_MODEL, yu as PROVIDER_SEND_TURN_MAX_FILE_BYTES, za as ProjectSettingsOverrides, zc as OrchestrationV2SubagentJson, zi as ApplicationProjectEvent, zu as normalize$2 } from "./sha2-BfCJmkJJ.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();
@@ -16028,6 +16204,12 @@ const P4_MCP_TOOLS = {
16028
16204
  "Organized",
16029
16205
  "a thread"
16030
16206
  ], "thread-organize"),
16207
+ p4_sweep: tool([
16208
+ "Update",
16209
+ "Updating",
16210
+ "Updated",
16211
+ "the sweep"
16212
+ ], "thread-organize"),
16031
16213
  p4_thread_update: tool([
16032
16214
  "Update",
16033
16215
  "Updating",
@@ -16199,6 +16381,18 @@ const P4_MCP_TOOL_NAMES = new Set(Object.keys(P4_MCP_TOOLS));
16199
16381
  function normalizeP4McpToolLabel(value) {
16200
16382
  return value.replace(/\s+(?:complete|completed)\s*$/i, "").trim();
16201
16383
  }
16384
+ const toolNameCache = /* @__PURE__ */ new Map();
16385
+ const TOOL_NAME_CACHE_LIMIT = 1e4;
16386
+ const TOOL_NAME_CACHE_MAX_KEY_LENGTH = 256;
16387
+ function resolveP4McpToolName(value) {
16388
+ if (value.length > TOOL_NAME_CACHE_MAX_KEY_LENGTH) return parseP4McpToolName(value);
16389
+ const cached = toolNameCache.get(value);
16390
+ if (cached !== void 0) return cached;
16391
+ const name = parseP4McpToolName(value);
16392
+ if (toolNameCache.size >= TOOL_NAME_CACHE_LIMIT) toolNameCache.clear();
16393
+ toolNameCache.set(value, name);
16394
+ return name;
16395
+ }
16202
16396
  /**
16203
16397
  * ACP agents disagree on how the injected P4 server prefixes its tools:
16204
16398
  * `mcp__p4-code__x` (Claude/Cursor), `p4-code.x` (Codex), plus single
@@ -16206,7 +16400,7 @@ function normalizeP4McpToolLabel(value) {
16206
16400
  * agents. The prefix match is deliberately loose because the display-name
16207
16401
  * inventory is the real gate; unknown tools stay on the generic renderer.
16208
16402
  */
16209
- function resolveP4McpToolName(value) {
16403
+ function parseP4McpToolName(value) {
16210
16404
  const label = normalizeP4McpToolLabel(value);
16211
16405
  const mcpMatch = /^mcp__(?<server>.+?)__(?<tool>.+)$/i.exec(label);
16212
16406
  if (mcpMatch?.groups) {
@@ -16390,6 +16584,17 @@ function htmlRenderFromToolItem(item) {
16390
16584
  const output = compactDynamicToolOutput(item.output);
16391
16585
  return output?.isError ? void 0 : output?.htmlRender;
16392
16586
  }
16587
+ /** The thread-owned file `preview_recording_stop` stored for the agent. */
16588
+ function previewRecordingIdFromToolItem(item) {
16589
+ if (resolveP4McpToolId(item.toolName) !== "preview_recording_stop") return void 0;
16590
+ const budget = {
16591
+ remainingBytes: MAX_PARSED_BYTES,
16592
+ remainingNodes: MAX_ENVELOPE_NODES,
16593
+ exceeded: false
16594
+ };
16595
+ const result = readResult(item.output, budget);
16596
+ return result.failed || budget.exceeded ? void 0 : boundedId(result.data?.id);
16597
+ }
16393
16598
  /**
16394
16599
  * The MCP App a completed tool call carries, if any. The adapter that captured
16395
16600
  * it put the reference in the output, beside the tool's own result. A tool's
@@ -16453,6 +16658,13 @@ function toolOutputImageBlocks(value) {
16453
16658
  function toolOutputImages(value) {
16454
16659
  return toolOutputImageBlocks(value).flatMap((block) => readToolOutputImage(block) ?? []);
16455
16660
  }
16661
+ function mcpToolResultOutput(result) {
16662
+ if (result.structuredContent != null && toolOutputImages(result.content).length > 0) return {
16663
+ content: result.content,
16664
+ structuredContent: result.structuredContent
16665
+ };
16666
+ return result.structuredContent ?? result.content;
16667
+ }
16456
16668
  /**
16457
16669
  * Replaces each image's bytes with `{ type: "image", mimeType }` and keeps its
16458
16670
  * position, so detail reads stay small and clients load the bytes as assets.
@@ -16729,9 +16941,11 @@ function formatProviderSkillDisplayName(skill) {
16729
16941
  }
16730
16942
  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
16943
  function* matchInlineSkills(text, skills) {
16944
+ const byName = /* @__PURE__ */ new Map();
16732
16945
  for (const match of text.matchAll(SKILL_TOKEN_REGEX)) {
16733
16946
  const name = match[2] ?? "";
16734
- const skill = skills.find((candidate) => candidate.name === name);
16947
+ if (!byName.has(name)) byName.set(name, skills.find((candidate) => candidate.name === name));
16948
+ const skill = byName.get(name);
16735
16949
  if (!skill) continue;
16736
16950
  yield {
16737
16951
  start: match.index + (match[1]?.length ?? 0),
@@ -31805,8 +32019,8 @@ function fileLinkLabel(file, parentSuffixByPath) {
31805
32019
  }
31806
32020
  // ../../packages/shared/src/markdownLinks.ts
31807
32021
  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;
32022
+ 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;
32023
+ 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
32024
  const EXTERNAL_SCHEME_PATTERN = /^([A-Za-z][A-Za-z0-9+.-]*):(.*)$/;
31811
32025
  const POSITION_SUFFIX_PATTERN = /:\d+(?::\d+)?$/;
31812
32026
  const POSITION_ONLY_PATTERN = /^\d+(?::\d+)?$/;
@@ -51462,12 +51676,13 @@ function searchableMessageSegments(message, cwd, skills = []) {
51462
51676
  return markdownThreadFindText(message.text || (message.streaming ? "" : "(empty response)"), false, cwd, skills, shouldPreserveAssistantLineBreaks(message.text));
51463
51677
  }
51464
51678
  // ../../packages/shared/src/threadSearch.ts
51679
+ const foldCharacters = (text) => text.replace(/ς/g, "σ").replace(/[‘’]/g, "'");
51465
51680
  function foldThreadSearchCase(text) {
51466
- const lowered = text.toLowerCase().replace(/ς/g, "σ");
51681
+ const lowered = foldCharacters(text.toLowerCase());
51467
51682
  if (lowered.length === text.length) return lowered;
51468
51683
  let folded = "";
51469
51684
  for (const character of text) {
51470
- const loweredCharacter = character.toLowerCase().replace(/ς/g, "σ");
51685
+ const loweredCharacter = foldCharacters(character.toLowerCase());
51471
51686
  folded += loweredCharacter.length === character.length ? loweredCharacter : character;
51472
51687
  }
51473
51688
  return folded;
@@ -51647,12 +51862,12 @@ const makeThreadFind = fn("makeThreadFind")(function* (readIndex) {
51647
51862
  });
51648
51863
  });
51649
51864
  });
51650
- const textCache = yield* make$69({
51865
+ const textCache = yield* make$70({
51651
51866
  capacity: 512,
51652
51867
  timeToLive: "1 minute",
51653
51868
  lookup: (key) => sync$1(() => parseText(key))
51654
51869
  });
51655
- const largeTextCache = yield* make$69({
51870
+ const largeTextCache = yield* make$70({
51656
51871
  capacity: 32,
51657
51872
  timeToLive: "1 minute",
51658
51873
  lookup: (key) => sync$1(() => parseText(key))
@@ -51748,7 +51963,7 @@ const makeThreadFind = fn("makeThreadFind")(function* (readIndex) {
51748
51963
  if (cached) return cached;
51749
51964
  const decoded = yield* decode(row);
51750
51965
  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));
51966
+ const document = documentFor(decoded, countSegments(yield* get$1(key.text.length <= 32768 ? textCache : largeTextCache, key), input.query));
51752
51967
  documents.set(row.position, document);
51753
51968
  yield* yieldNow;
51754
51969
  return document;
@@ -51876,7 +52091,9 @@ function isOrchestrationV2SupersededInterrupt(input) {
51876
52091
  }
51877
52092
  /** Index once when reconciling a whole timeline after run/attempt state changes. */
51878
52093
  function createOrchestrationV2TurnItemVisibility(input) {
51879
- const statuses = new Map(input.runs.map((run) => [run.id, run.status]));
52094
+ const statuses = /* @__PURE__ */ new Map();
52095
+ for (const run of input.runs) if (run.status === "rolled_back" || run.status === "cancelled") statuses.set(run.id, run.status);
52096
+ else statuses.delete(run.id);
51880
52097
  const supersededRoots = /* @__PURE__ */ new Map();
51881
52098
  for (const attempt of input.attempts) {
51882
52099
  if (attempt.status !== "superseded") continue;
@@ -51884,7 +52101,11 @@ function createOrchestrationV2TurnItemVisibility(input) {
51884
52101
  if (roots === void 0) supersededRoots.set(attempt.runId, roots = /* @__PURE__ */ new Set());
51885
52102
  roots.add(attempt.rootNodeId);
51886
52103
  }
51887
- const interruptRuns = new Set(input.items.filter((item) => item.type === "run_interrupt_request").map((item) => item.runId));
52104
+ if (statuses.size === 0 && supersededRoots.size === 0) return () => true;
52105
+ const interruptRuns = /* @__PURE__ */ new Set();
52106
+ if (supersededRoots.size > 0) {
52107
+ for (const item of input.items) if (item.type === "run_interrupt_request") interruptRuns.add(item.runId);
52108
+ }
51888
52109
  return (item) => {
51889
52110
  const status = item.runId === null ? void 0 : statuses.get(item.runId);
51890
52111
  if (status === "rolled_back") return false;
@@ -52154,7 +52375,6 @@ function inferImageExtension(input) {
52154
52375
  }
52155
52376
  // src/attachmentStore.ts
52156
52377
  const ATTACHMENT_FILENAME_EXTENSIONS = [...SAFE_IMAGE_FILE_EXTENSIONS, ".bin"];
52157
- const ATTACHMENT_ID_THREAD_SEGMENT_MAX_CHARS = 80;
52158
52378
  const ATTACHMENT_ID_THREAD_SEGMENT_PATTERN = "[a-z0-9_]+(?:-[a-z0-9_]+)*";
52159
52379
  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
52380
  const ATTACHMENT_ID_FILE_EXTENSION_PATTERN = "[a-z0-9]{1,10}";
@@ -52163,7 +52383,7 @@ const PENDING_ATTACHMENT_THREAD_SEGMENT = "pending";
52163
52383
  const PENDING_ATTACHMENT_MAX_AGE_MS = 864e5;
52164
52384
  const PARTIAL_UPLOAD_MAX_AGE_MS = 36e5;
52165
52385
  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, "");
52386
+ const segment = threadId.trim().toLowerCase().replace(/[^a-z0-9_-]+/gi, "-").replace(/-+/g, "-").replace(/^[-_]+|[-_]+$/g, "").slice(0, 80).replace(/[-_]+$/g, "");
52167
52387
  if (segment.length === 0) return null;
52168
52388
  return segment === "pending" ? "_pending" : segment;
52169
52389
  }
@@ -52226,7 +52446,7 @@ function threadHtmlRenderAttachmentIds(threadId, items) {
52226
52446
  const segment = toSafeThreadAttachmentSegment(threadId);
52227
52447
  if (segment === null) return [];
52228
52448
  return Array.from(items).flatMap((item) => {
52229
- const attachmentId = htmlRenderFromToolItem(item)?.attachmentId ?? mcpAppFromToolItem(item)?.attachmentId;
52449
+ const attachmentId = htmlRenderFromToolItem(item)?.attachmentId ?? mcpAppFromToolItem(item)?.attachmentId ?? previewRecordingIdFromToolItem(item);
52230
52450
  return attachmentId !== void 0 && parseThreadSegmentFromAttachmentId(attachmentId) === segment ? [attachmentId] : [];
52231
52451
  });
52232
52452
  }
@@ -52685,7 +52905,7 @@ function buildBoundedThreadProjection(input) {
52685
52905
  turnItems: [],
52686
52906
  visibleTurnItems: []
52687
52907
  });
52688
- const windowBudget = Math.max(0, policy.maxEncodedBytes - dependencyReserve - controlBytes - 1024);
52908
+ const windowBudget = Math.max(Math.max(policy.maxEncodedBytes / 2 - dependencyReserve, 0), policy.maxEncodedBytes - dependencyReserve - controlBytes - 1024);
52689
52909
  const windowPolicy = {
52690
52910
  maxUserTurns: policy.maxUserTurns,
52691
52911
  maxItems: policy.maxItems,
@@ -53141,6 +53361,21 @@ const encodeCheckpointScopePayload = encodeEffect(fromJsonString(OrchestrationV2
53141
53361
  const encodeCheckpointPayload = encodeEffect(fromJsonString(OrchestrationV2CheckpointJson));
53142
53362
  const encodeContextHandoffPayload = encodeEffect(fromJsonString(OrchestrationV2ContextHandoffJson));
53143
53363
  const encodeContextTransferPayload = encodeEffect(fromJsonString(OrchestrationV2ContextTransferJson));
53364
+ const PullRequestThread = OrchestrationV2AppThreadJson.mapFields(({ id, projectId, lineage, creationSource, branch, worktreePath, archivedAt, settledOverride, settledAt, linkedPullRequest, branchPullRequest, pullRequests }) => ({
53365
+ id,
53366
+ projectId,
53367
+ lineage,
53368
+ creationSource,
53369
+ branch,
53370
+ worktreePath,
53371
+ archivedAt,
53372
+ settledOverride,
53373
+ settledAt,
53374
+ linkedPullRequest,
53375
+ branchPullRequest,
53376
+ pullRequests
53377
+ }));
53378
+ const decodePullRequestThread = decodeUnknownEffect$1(fromJsonString(PullRequestThread));
53144
53379
  const decodeThreadPayload = decodeUnknownEffect$1(fromJsonString(OrchestrationV2AppThreadJson));
53145
53380
  const decodeRunPayload = decodeUnknownEffect$1(fromJsonString(OrchestrationV2RunJson));
53146
53381
  const decodeRunAttemptPayload = decodeUnknownEffect$1(fromJsonString(OrchestrationV2RunAttemptJson));
@@ -53393,6 +53628,8 @@ function threadShellFromProjection(projection) {
53393
53628
  ...projection.thread.historyOrigin === void 0 ? {} : { historyOrigin: projection.thread.historyOrigin },
53394
53629
  ...projection.thread.linkOrigin === void 0 ? {} : { linkOrigin: projection.thread.linkOrigin },
53395
53630
  ...projection.thread.delegatedFrom === void 0 ? {} : { delegatedFrom: projection.thread.delegatedFrom },
53631
+ ...projection.thread.launchedByThreadId === void 0 ? {} : { launchedByThreadId: projection.thread.launchedByThreadId },
53632
+ ...projection.thread.sweep == null ? {} : { sweep: projection.thread.sweep },
53396
53633
  latestRunId: latestRun?.id ?? null,
53397
53634
  latestRunRequestedAt: latestRun?.requestedAt ?? null,
53398
53635
  latestRunStartedAt: latestRun?.startedAt ?? null,
@@ -53533,6 +53770,8 @@ function shellFromState(input) {
53533
53770
  ...input.state.thread.historyOrigin === void 0 ? {} : { historyOrigin: input.state.thread.historyOrigin },
53534
53771
  ...input.state.thread.linkOrigin === void 0 ? {} : { linkOrigin: input.state.thread.linkOrigin },
53535
53772
  ...input.state.thread.delegatedFrom === void 0 ? {} : { delegatedFrom: input.state.thread.delegatedFrom },
53773
+ ...input.state.thread.launchedByThreadId === void 0 ? {} : { launchedByThreadId: input.state.thread.launchedByThreadId },
53774
+ ...input.state.thread.sweep == null ? {} : { sweep: input.state.thread.sweep },
53536
53775
  latestRunId: input.state.latestRunId,
53537
53776
  latestRunRequestedAt: input.state.latestRunRequestedAt,
53538
53777
  latestRunStartedAt: input.state.latestRunStartedAt,
@@ -54648,21 +54887,6 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
54648
54887
  )
54649
54888
  AND request.type = 'run_interrupt_request'
54650
54889
  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
54890
  SELECT latest.item_rowid, latest.ordinal, latest.turn_item_id
54667
54891
  FROM (
54668
54892
  SELECT rowid AS item_rowid, ordinal, turn_item_id
@@ -54774,6 +54998,7 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
54774
54998
  OR (${filter.includeLatestRun === true ? 1 : 0} = 1 AND run_id = (
54775
54999
  SELECT run_id FROM orchestration_v2_projection_runs
54776
55000
  WHERE thread_id = ${threadId}
55001
+ AND (status <> 'cancelled' OR json_extract(payload_json, '$.startedAt') IS NOT NULL)
54777
55002
  ORDER BY ordinal DESC
54778
55003
  LIMIT 1
54779
55004
  )))`}
@@ -55246,7 +55471,7 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
55246
55471
  lastErrorClass: summary.lastErrorClass,
55247
55472
  usageLimitResetAt: summary.usageLimitResetAt,
55248
55473
  latestRunId: RunId.make(row.run_id),
55249
- latestRunCompletedAt: row.completed_at === null ? null : makeUnsafe$5(row.completed_at),
55474
+ latestRunCompletedAt: row.completed_at === null ? null : makeUnsafe$6(row.completed_at),
55250
55475
  updatedAt: thread.updatedAt,
55251
55476
  archivedAt: thread.archivedAt,
55252
55477
  settledOverride: thread.settledOverride,
@@ -55281,6 +55506,7 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
55281
55506
  json_extract(child.payload_json, '$.lineage.relationshipToParent') = 'subagent'
55282
55507
  AND json_extract(child.payload_json, '$.lineage.parentThreadId') IS NOT NULL
55283
55508
  AND json_extract(child.payload_json, '$.forkedFrom.type') = 'node'
55509
+ ELSE 0 END
55284
55510
  AND (EXISTS (
55285
55511
  SELECT 1 FROM orchestration_v2_projection_runs AS requested
55286
55512
  JOIN orchestration_v2_projection_subagents AS task
@@ -55303,7 +55529,6 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
55303
55529
  AND target_thread_id = json_extract(child.payload_json, '$.lineage.parentThreadId')
55304
55530
  AND type = 'subagent_result'
55305
55531
  )))
55306
- ELSE 0 END
55307
55532
  `;
55308
55533
  case "runtime": return sql`
55309
55534
  WITH pending_provider_threads AS MATERIALIZED (
@@ -55643,7 +55868,10 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
55643
55868
  threadId,
55644
55869
  cause
55645
55870
  })));
55646
- const getThreadProjection = (threadId) => readProjection(threadId, /* @__PURE__ */ new Set());
55871
+ const getThreadProjection = (threadId) => sql.withTransaction(readProjection(threadId, /* @__PURE__ */ new Set())).pipe(mapError((cause) => isProjectionStoreThreadNotFoundError(cause) || isProjectionStoreReadError(cause) ? cause : new ProjectionStoreReadError({
55872
+ threadId,
55873
+ cause
55874
+ })));
55647
55875
  const getRuntimeRecoveryProjection = (threadId) => gen(function* () {
55648
55876
  const threadRows = yield* sql`
55649
55877
  SELECT payload_json FROM orchestration_v2_projection_threads
@@ -55864,13 +56092,12 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
55864
56092
  ORDER BY created_at ASC, runtime_request_id ASC
55865
56093
  `,
55866
56094
  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
- )
56095
+ SELECT message.payload_json FROM orchestration_v2_projection_runs AS run
56096
+ CROSS JOIN orchestration_v2_projection_messages AS message
56097
+ INDEXED BY orchestration_v2_projection_messages_run_idx ON message.run_id = run.run_id
56098
+ WHERE run.thread_id = ${threadId}
56099
+ AND run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')
56100
+ AND message.thread_id = ${threadId} AND message.streaming = 1
55874
56101
  ORDER BY message.created_at ASC, message.message_id ASC
55875
56102
  `,
55876
56103
  sql`
@@ -56232,7 +56459,8 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
56232
56459
  FROM orchestration_v2_projection_turn_items
56233
56460
  WHERE thread_id = ${threadId}
56234
56461
  AND type = 'dynamic_tool'
56235
- AND (payload_json LIKE '%htmlRender%' OR payload_json LIKE ${`%${MCP_APP_OUTPUT_KEY}%`})
56462
+ AND (payload_json LIKE '%htmlRender%' OR payload_json LIKE ${`%${MCP_APP_OUTPUT_KEY}%`}
56463
+ OR payload_json LIKE '%preview_recording_stop%')
56236
56464
  `,
56237
56465
  sql`
56238
56466
  SELECT DISTINCT json_extract(attachment.value, '$.id') AS id
@@ -56256,6 +56484,18 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
56256
56484
  threadId,
56257
56485
  cause
56258
56486
  })));
56487
+ const getMessagesById = fn("ProjectionStore.getMessagesById")(function* (threadId, messageIds) {
56488
+ if (messageIds.length === 0) return /* @__PURE__ */ new Map();
56489
+ const rows = yield* sql`
56490
+ SELECT message.payload_json
56491
+ FROM json_each(${encodeIdList([...new Set(messageIds)])}) AS requested
56492
+ CROSS JOIN orchestration_v2_projection_messages AS message
56493
+ ON message.message_id = requested.value
56494
+ WHERE message.thread_id = ${threadId}
56495
+ `;
56496
+ const messages = yield* decodeRows(decodeMessagePayload, threadId)(rows);
56497
+ return new Map(messages.map((message) => [message.id, message]));
56498
+ }, (effect, threadId) => effect.pipe(mapError(controlReadError(threadId))));
56259
56499
  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
56500
  const getThreadSnapshot = (threadId) => sql.withTransaction(gen(function* () {
56261
56501
  const projection = yield* getThreadProjection(threadId);
@@ -56526,6 +56766,21 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
56526
56766
  ...historyAnchor?.threadId === threadId ? { anchorItemId: historyAnchor.itemId } : {},
56527
56767
  ...historyAnchor === void 0 ? {} : { historyAnchor }
56528
56768
  });
56769
+ const retainedIds = new Set(projection.turnItems.map((item) => item.id));
56770
+ const pendingCards = (yield* decodeRows(decodeTurnItemPayload, threadId)(yield* sql`
56771
+ SELECT item.payload_json
56772
+ FROM orchestration_v2_projection_runtime_requests AS request
56773
+ CROSS JOIN orchestration_v2_projection_turn_items AS item
56774
+ ON item.node_id = request.node_id
56775
+ AND item.type IN ('approval_request', 'user_input_request')
56776
+ AND json_extract(item.payload_json, '$.requestId') = request.runtime_request_id
56777
+ WHERE request.thread_id = ${threadId} AND request.status = 'pending'
56778
+ AND item.thread_id = ${threadId}
56779
+ `)).filter((item) => !retainedIds.has(item.id));
56780
+ const windowProjection = pendingCards.length === 0 ? projection : {
56781
+ ...projection,
56782
+ turnItems: [...projection.turnItems, ...pendingCards].toSorted((left, right) => left.ordinal - right.ordinal || left.id.localeCompare(right.id))
56783
+ };
56529
56784
  return {
56530
56785
  schemaVersion: 2,
56531
56786
  snapshotSequence: (yield* sql`
@@ -56535,7 +56790,7 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
56535
56790
  AND aggregate_kind = 'thread'
56536
56791
  AND stream_id = ${threadId}
56537
56792
  `)[0]?.snapshot_sequence ?? 0,
56538
- projection
56793
+ projection: windowProjection
56539
56794
  };
56540
56795
  })).pipe(mapError((cause) => isProjectionStoreThreadNotFoundError(cause) || isProjectionStoreReadError(cause) ? cause : new ProjectionStoreReadError({
56541
56796
  threadId,
@@ -56875,24 +57130,24 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
56875
57130
  const shellThreadStateFromRow = (input) => gen(function* () {
56876
57131
  const { row, runOrdinalsByThreadId, itemCountsByThreadId, providerThreadsByThreadId, pendingTurnItemsByThreadId } = input;
56877
57132
  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);
57133
+ const latestUserAuthoredMessageAt = row.latest_user_authored_message_at === null ? null : makeUnsafe$6(row.latest_user_authored_message_at);
56879
57134
  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
57135
  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
57136
  let terminalFailureItem = row.terminal_failure_payload_json === null ? null : yield* decodeTurnItemPayload(row.terminal_failure_payload_json);
56882
57137
  let latestRunId = row.latest_run_id === null ? null : RunId.make(row.latest_run_id);
56883
57138
  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);
57139
+ let latestRunRequestedAt = row.latest_run_requested_at === null ? null : makeUnsafe$6(row.latest_run_requested_at);
57140
+ let latestRunStartedAt = row.latest_run_started_at === null ? null : makeUnsafe$6(row.latest_run_started_at);
57141
+ let latestRunCompletedAt = row.latest_run_completed_at === null ? null : makeUnsafe$6(row.latest_run_completed_at);
56887
57142
  if (row.blocking_run_id !== null && row.blocking_failure_payload_json !== null) {
56888
57143
  const blockingFailure = yield* decodeTurnItemPayload(row.blocking_failure_payload_json).pipe(orElseSucceed(() => null));
56889
57144
  if (threadErrorSummary(blockingFailure?.type === "error" ? blockingFailure.failure : null, row.last_error).lastErrorClass === "usage_limit" && blockingFailure !== null) {
56890
57145
  terminalFailureItem = blockingFailure;
56891
57146
  latestRunId = RunId.make(row.blocking_run_id);
56892
57147
  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);
57148
+ latestRunRequestedAt = row.blocking_run_requested_at === null ? null : makeUnsafe$6(row.blocking_run_requested_at);
57149
+ latestRunStartedAt = row.blocking_run_started_at === null ? null : makeUnsafe$6(row.blocking_run_started_at);
57150
+ latestRunCompletedAt = row.blocking_run_completed_at === null ? null : makeUnsafe$6(row.blocking_run_completed_at);
56896
57151
  }
56897
57152
  }
56898
57153
  const pendingBackgroundTasks = [...derivePendingBackgroundWork({
@@ -56915,11 +57170,11 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
56915
57170
  latestRunStartedAt,
56916
57171
  latestRunCompletedAt,
56917
57172
  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),
57173
+ activityRunStartedAt: row.activity_run_started_at === null ? null : makeUnsafe$6(row.activity_run_started_at),
56919
57174
  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
57175
  ...threadErrorSummary(terminalFailureItem?.type === "error" ? terminalFailureItem.failure : null, row.last_error),
56921
57176
  pendingRuntimeRequest,
56922
- latestUserMessageAt: row.latest_user_message_at === null ? null : makeUnsafe$5(row.latest_user_message_at),
57177
+ latestUserMessageAt: row.latest_user_message_at === null ? null : makeUnsafe$6(row.latest_user_message_at),
56923
57178
  latestUserAuthoredMessageAt,
56924
57179
  hasActionableProposedPlan: row.has_actionable_proposed_plan === 1,
56925
57180
  pendingBackgroundTasks,
@@ -57010,6 +57265,30 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
57010
57265
  };
57011
57266
  }).pipe(mapError(shellSnapshotReadError));
57012
57267
  const readShellSnapshot = (options) => readShellSnapshotRows(options).pipe(mapError(shellSnapshotReadError), map$6(decodeShellSnapshot));
57268
+ const getPullRequestSnapshot = fn("ProjectionStore.getPullRequestSnapshot")(function* ({ threadId, unsettledOnly = false }) {
57269
+ const { rows, sequenceRows } = yield* sql.withTransaction(gen(function* () {
57270
+ return {
57271
+ rows: yield* sql`
57272
+ SELECT t.payload_json FROM orchestration_v2_projection_threads t
57273
+ 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
57274
+ AND json_extract(t.payload_json, '$.settledOverride') IS NOT 'settled'` : sql``}
57275
+ ORDER BY t.updated_at ASC, t.thread_id ASC
57276
+ `,
57277
+ sequenceRows: yield* sql`
57278
+ SELECT MAX(sequence) AS snapshot_sequence FROM orchestration_events
57279
+ WHERE application_event_version = 2 AND aggregate_kind = 'thread'
57280
+ `
57281
+ };
57282
+ }));
57283
+ const threads = yield* forEach(rows, (row) => decodePullRequestThread(row.payload_json).pipe(map$6((thread) => ({
57284
+ ...thread,
57285
+ pullRequests: threadPullRequestsOf(thread)
57286
+ }))));
57287
+ return {
57288
+ snapshotSequence: sequenceRows[0]?.snapshot_sequence ?? 0,
57289
+ threads
57290
+ };
57291
+ }, mapError(shellSnapshotReadError));
57013
57292
  const getShellSnapshot = (options) => sql.withTransaction(readShellSnapshotRows(options)).pipe(mapError(shellSnapshotReadError), flatMap(decodeShellSnapshot));
57014
57293
  const getThreadShell = (threadId) => sql.withTransaction(gen(function* () {
57015
57294
  const rowsByThreadId = /* @__PURE__ */ new Map();
@@ -57063,13 +57342,14 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
57063
57342
  return {
57064
57343
  apply,
57065
57344
  getShellSnapshot,
57345
+ getPullRequestSnapshot,
57066
57346
  readShellSnapshot,
57067
57347
  getThreadShell,
57068
57348
  getThread,
57069
57349
  getThreadsWithPullRequests,
57070
57350
  getThreadWorktreePaths,
57071
57351
  getOpenRemoteDelegatedTasks,
57072
- getThreadProjection,
57352
+ getThreadProjection: (threadId) => getThreadProjection(threadId).pipe(readOnly),
57073
57353
  getTurnStartContext,
57074
57354
  getTurnStartHistory,
57075
57355
  getRuntimeRecoveryProjection,
@@ -57087,6 +57367,7 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
57087
57367
  listAppOwnedChildThreadIds,
57088
57368
  getNextTurnItemOrdinal,
57089
57369
  getTurnItem,
57370
+ getMessagesById: (threadId, messageIds) => getMessagesById(threadId, messageIds).pipe(readOnly),
57090
57371
  getThreadRecords,
57091
57372
  getRuntimeRequest,
57092
57373
  getPlan,
@@ -57104,11 +57385,11 @@ const layer$60 = effect(ProjectionStoreV2, gen(function* () {
57104
57385
  };
57105
57386
  }));
57106
57387
  effect(ProjectionStoreV2, gen(function* () {
57107
- const replayState = yield* make$71(makeProjectionReplayState());
57108
- const sequence = yield* make$71(0);
57388
+ const replayState = yield* make$72(makeProjectionReplayState());
57389
+ const sequence = yield* make$72(0);
57109
57390
  const service = {
57110
57391
  apply: (event) => gen(function* () {
57111
- const result = yield* modify(replayState, (existing) => {
57392
+ const result = yield* modify$1(replayState, (existing) => {
57112
57393
  const next = {
57113
57394
  projections: new Map(existing.projections),
57114
57395
  providerSessionThreadIds: new Map(existing.providerSessionThreadIds),
@@ -57118,10 +57399,10 @@ effect(ProjectionStoreV2, gen(function* () {
57118
57399
  return [void 0, next];
57119
57400
  });
57120
57401
  if (result) return yield* result;
57121
- yield* update(sequence, (current) => current + 1);
57402
+ yield* update$1(sequence, (current) => current + 1);
57122
57403
  }),
57123
57404
  getShellSnapshot: (options) => gen(function* () {
57124
- const selectedThreadIds = [...(yield* get$2(replayState)).projections.entries()].filter(([, projection]) => {
57405
+ const selectedThreadIds = [...(yield* get$3(replayState)).projections.entries()].filter(([, projection]) => {
57125
57406
  if (options?.projectId !== void 0 && projection.thread.projectId !== options.projectId) return false;
57126
57407
  if (options?.location === "active") return projection.thread.archivedAt === null;
57127
57408
  if (options?.location === "archive") return projection.thread.archivedAt !== null;
@@ -57130,28 +57411,35 @@ effect(ProjectionStoreV2, gen(function* () {
57130
57411
  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
57412
  return {
57132
57413
  schemaVersion: 2,
57133
- snapshotSequence: yield* get$2(sequence),
57414
+ snapshotSequence: yield* get$3(sequence),
57134
57415
  threads: visible.filter((thread) => thread.archivedAt === null),
57135
57416
  archivedThreads: visible.filter((thread) => thread.archivedAt !== null)
57136
57417
  };
57137
57418
  }),
57419
+ getPullRequestSnapshot: ({ threadId, unsettledOnly = false }) => gen(function* () {
57420
+ const threads = threadId === void 0 ? (yield* service.getShellSnapshot({ location: "active" })).threads : [yield* service.getThreadShell(threadId)].flatMap((thread) => thread === null ? [] : [thread]);
57421
+ return {
57422
+ snapshotSequence: yield* get$3(sequence),
57423
+ threads: threads.filter((thread) => !unsettledOnly || thread.settledAt == null && thread.settledOverride !== "settled")
57424
+ };
57425
+ }),
57138
57426
  readShellSnapshot: (options) => service.getShellSnapshot(options).pipe(map$6(succeed)),
57139
57427
  getThreadShell: (threadId) => gen(function* () {
57140
- if (!(yield* get$2(replayState)).projections.has(threadId)) return null;
57428
+ if (!(yield* get$3(replayState)).projections.has(threadId)) return null;
57141
57429
  const shell = yield* service.getThreadProjection(threadId).pipe(map$6(threadShellFromProjection));
57142
57430
  return shell.deletedAt === null ? shell : null;
57143
57431
  }),
57144
57432
  getThread: (threadId) => gen(function* () {
57145
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57433
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57146
57434
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57147
57435
  return projection.thread;
57148
57436
  }),
57149
- getThreadWorktreePaths: () => get$2(replayState).pipe(map$6((state) => [...state.projections.values()].flatMap(({ thread }) => thread.deletedAt === null && thread.archivedAt === null && thread.worktreePath !== null ? [{
57437
+ getThreadWorktreePaths: () => get$3(replayState).pipe(map$6((state) => [...state.projections.values()].flatMap(({ thread }) => thread.deletedAt === null && thread.archivedAt === null && thread.worktreePath !== null ? [{
57150
57438
  threadId: thread.id,
57151
57439
  worktreePath: thread.worktreePath
57152
57440
  }] : []))),
57153
57441
  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) => ({
57442
+ 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
57443
  id: thread.id,
57156
57444
  projectId: thread.projectId,
57157
57445
  lineage: thread.lineage,
@@ -57159,7 +57447,7 @@ effect(ProjectionStoreV2, gen(function* () {
57159
57447
  settledAt: thread.settledAt,
57160
57448
  pullRequests: thread.pullRequests ?? []
57161
57449
  })))),
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) => {
57450
+ 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
57451
  const resetMs = Date.parse(thread.usageLimitResetAt);
57164
57452
  const nowMs = toEpochMillis(options.now);
57165
57453
  if (!Number.isFinite(resetMs) || resetMs <= toEpochMillis(thread.latestRunCompletedAt ?? thread.updatedAt)) return false;
@@ -57167,12 +57455,12 @@ effect(ProjectionStoreV2, gen(function* () {
57167
57455
  return thread.limitRecovery.autoResume && resetMs <= nowMs && (thread.snoozedUntil == null || toEpochMillis(thread.snoozedUntil) <= nowMs);
57168
57456
  }).toSorted((left, right) => left.id.localeCompare(right.id)))),
57169
57457
  getRecoveryThreadIds: (kind) => gen(function* () {
57170
- const projections = (yield* get$2(replayState)).projections;
57458
+ const projections = (yield* get$3(replayState)).projections;
57171
57459
  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
57460
  }),
57173
57461
  getUnreadableThreadIds: () => succeed([]),
57174
57462
  getPendingNativeUserInputs: (threadId, providerTurnId) => gen(function* () {
57175
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57463
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57176
57464
  if (projection === void 0) return {
57177
57465
  runtimeRequests: [],
57178
57466
  nodes: [],
@@ -57188,29 +57476,33 @@ effect(ProjectionStoreV2, gen(function* () {
57188
57476
  };
57189
57477
  }),
57190
57478
  getPlan: (threadId, planId) => gen(function* () {
57191
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57479
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57192
57480
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57193
57481
  return projection.plans.find((plan) => plan.id === planId);
57194
57482
  }),
57195
57483
  hasUnpairedRunInterruptRequest: (threadId, requestId, resultId) => gen(function* () {
57196
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57484
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57197
57485
  return projection !== void 0 && projection.turnItems.some((item) => item.id === requestId) && !projection.turnItems.some((item) => item.id === resultId);
57198
57486
  }),
57199
- isNodeStored: (node) => get$2(replayState).pipe(map$6((state) => {
57487
+ isNodeStored: (node) => get$3(replayState).pipe(map$6((state) => {
57200
57488
  const stored = state.projections.get(node.threadId)?.nodes.find((candidate) => candidate.id === node.id);
57201
57489
  return stored !== void 0 && equals(stored, node);
57202
57490
  })),
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)),
57491
+ getMessageCount: (threadId) => get$3(replayState).pipe(map$6((state) => state.projections.get(threadId)?.messages.length ?? 0)),
57492
+ 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] : []))])),
57493
+ 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)),
57494
+ getTurnItem: ({ threadId, itemId }) => get$3(replayState).pipe(map$6((state) => state.projections.get(threadId)?.turnItems.find((item) => item.id === itemId) ?? null)),
57495
+ getMessagesById: (threadId, messageIds) => get$3(replayState).pipe(map$6((state) => {
57496
+ const requested = new Set(messageIds);
57497
+ return new Map((state.projections.get(threadId)?.messages ?? []).filter((message) => requested.has(message.id)).map((message) => [message.id, message]));
57498
+ })),
57207
57499
  getThreadAttachmentIds: (threadId) => service.getThreadProjection(threadId).pipe(map$6((projection) => [.../* @__PURE__ */ new Set([
57208
57500
  ...projection.messages.flatMap((message) => message.attachments.map((attachment) => attachment.id)),
57209
57501
  ...projection.turnItems.flatMap((item) => item.type === "user_input_request" ? Object.values(item.questionAnswer?.attachmentsByQuestionId ?? {}).flatMap((attachments) => attachments.map((attachment) => attachment.id)) : []),
57210
57502
  ...threadHtmlRenderAttachmentIds(threadId, projection.turnItems.flatMap((item) => item.type === "dynamic_tool" ? [item] : []))
57211
57503
  ])])),
57212
57504
  getThreadRecords: (threadId, fields, filter) => gen(function* () {
57213
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57505
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57214
57506
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57215
57507
  const selected = {
57216
57508
  ...projection,
@@ -57223,12 +57515,12 @@ effect(ProjectionStoreV2, gen(function* () {
57223
57515
  return Object.fromEntries([["thread", projection.thread], ...fields.map((field) => [field, selected[field]])]);
57224
57516
  }),
57225
57517
  getRuntimeRequest: (threadId, requestId) => gen(function* () {
57226
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57518
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57227
57519
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57228
57520
  return projection.runtimeRequests.find((request) => request.id === requestId);
57229
57521
  }),
57230
57522
  getProviderControlContext: (threadId, target) => gen(function* () {
57231
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57523
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57232
57524
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57233
57525
  const providerTurn = projection.providerTurns.find((turn) => turn.id === target.providerTurnId);
57234
57526
  return {
@@ -57240,7 +57532,7 @@ effect(ProjectionStoreV2, gen(function* () {
57240
57532
  };
57241
57533
  }),
57242
57534
  getRunningTurnContext: (threadId) => gen(function* () {
57243
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57535
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57244
57536
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57245
57537
  const run = projection.runs.find((run) => run.status === "running");
57246
57538
  return {
@@ -57250,7 +57542,7 @@ effect(ProjectionStoreV2, gen(function* () {
57250
57542
  };
57251
57543
  }),
57252
57544
  getThreadProviderContext: (threadId, targetInstanceId) => gen(function* () {
57253
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57545
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57254
57546
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57255
57547
  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
57548
  return {
@@ -57260,7 +57552,7 @@ effect(ProjectionStoreV2, gen(function* () {
57260
57552
  };
57261
57553
  }),
57262
57554
  getRuntimeResponseContext: (threadId, requestId) => gen(function* () {
57263
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57555
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57264
57556
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57265
57557
  const request = projection.runtimeRequests.find((request) => request.id === requestId);
57266
57558
  return {
@@ -57271,7 +57563,7 @@ effect(ProjectionStoreV2, gen(function* () {
57271
57563
  };
57272
57564
  }),
57273
57565
  getCheckpointContext: (threadId) => gen(function* () {
57274
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57566
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57275
57567
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57276
57568
  return {
57277
57569
  runs: projection.runs.map(({ id, ordinal, status }) => ({
@@ -57295,7 +57587,7 @@ effect(ProjectionStoreV2, gen(function* () {
57295
57587
  };
57296
57588
  }),
57297
57589
  getCheckpointCaptureContext: (threadId, target) => gen(function* () {
57298
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57590
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57299
57591
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57300
57592
  const run = projection.runs.find((candidate) => candidate.id === target.runId);
57301
57593
  return {
@@ -57307,18 +57599,18 @@ effect(ProjectionStoreV2, gen(function* () {
57307
57599
  };
57308
57600
  }),
57309
57601
  getRunMessage: (threadId, runId) => gen(function* () {
57310
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57602
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57311
57603
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57312
57604
  const run = projection.runs.find((candidate) => candidate.id === runId);
57313
57605
  return projection.messages.find((message) => message.id === run?.userMessageId);
57314
57606
  }),
57315
57607
  canStartQueuedRun: (threadId) => gen(function* () {
57316
- const projection = (yield* get$2(replayState)).projections.get(threadId);
57608
+ const projection = (yield* get$3(replayState)).projections.get(threadId);
57317
57609
  if (projection === void 0) return yield* new ProjectionStoreThreadNotFoundError({ threadId });
57318
57610
  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
57611
  }),
57320
57612
  getThreadProjection: (threadId) => gen(function* () {
57321
- const { projections: existing, providerThreadInstanceIds } = yield* get$2(replayState);
57613
+ const { projections: existing, providerThreadInstanceIds } = yield* get$3(replayState);
57322
57614
  const readProjection = (targetThreadId, seenThreadIds) => {
57323
57615
  const projection = existing.get(targetThreadId);
57324
57616
  if (!projection) return null;
@@ -57361,7 +57653,7 @@ effect(ProjectionStoreV2, gen(function* () {
57361
57653
  "proposed_plan"
57362
57654
  ].includes(item.type) && (runIds === void 0 || item.runId !== null && runIds.includes(item.runId))))),
57363
57655
  getRuntimeRecoveryProjection: (threadId) => service.getThreadProjection(threadId),
57364
- getThreadSnapshot: (threadId) => service.getThreadProjection(threadId).pipe(flatMap((projection) => get$2(sequence).pipe(map$6((snapshotSequence) => ({
57656
+ getThreadSnapshot: (threadId) => service.getThreadProjection(threadId).pipe(flatMap((projection) => get$3(sequence).pipe(map$6((snapshotSequence) => ({
57365
57657
  schemaVersion: 2,
57366
57658
  snapshotSequence,
57367
57659
  projection
@@ -58319,8 +58611,8 @@ function normalizeServerBackgroundActivitySettings(settings) {
58319
58611
  });
58320
58612
  }
58321
58613
  // ../../packages/shared/src/serverSettings.ts
58322
- const ServerSettingsJson$1 = fromLenientJson(ServerSettings);
58323
- const decodeServerSettingsJson = decodeUnknownOption(ServerSettingsJson$1);
58614
+ const ServerObservabilitySettingsJson = fromLenientJson(Struct({ observability: ServerSettings.fields.observability }));
58615
+ const decodeServerObservabilitySettingsJson = decodeUnknownOption(ServerObservabilitySettingsJson);
58324
58616
  function isModelSelectionProviderEnabled(settings, selection) {
58325
58617
  const instanceConfig = settings.providerInstances[selection.instanceId];
58326
58618
  if (instanceConfig !== void 0) return resolveProviderInstanceEnabled(instanceConfig);
@@ -58402,7 +58694,7 @@ function extractPersistedServerObservabilitySettings(input) {
58402
58694
  };
58403
58695
  }
58404
58696
  function parsePersistedServerObservabilitySettings(raw) {
58405
- const decoded = decodeServerSettingsJson(raw);
58697
+ const decoded = decodeServerObservabilitySettingsJson(raw);
58406
58698
  if (isSome(decoded)) return extractPersistedServerObservabilitySettings(decoded.value);
58407
58699
  return {
58408
58700
  otlpTracesUrl: void 0,
@@ -58430,6 +58722,7 @@ function mergeSettingsEntries(current, patch) {
58430
58722
  else next.set(id, config);
58431
58723
  return Object.fromEntries(next);
58432
58724
  }
58725
+ const byHost = (tokens) => Object.fromEntries(Object.entries(isObject(tokens) ? tokens : {}).map(([host, token]) => [host.trim().toLowerCase(), token]));
58433
58726
  const knownProjectOverrideKeys = new Set(Object.keys(ProjectSettingsOverrides.fields));
58434
58727
  function pickOverrideKeys(entry, known) {
58435
58728
  return Object.fromEntries(Object.entries(entry ?? {}).filter(([key]) => knownProjectOverrideKeys.has(key) === known));
@@ -58616,10 +58909,17 @@ function applyServerSettingsPatch(current, rawPatch) {
58616
58909
  ...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
58910
  ...sourceControlHostsPatch !== void 0 ? { sourceControlHosts: {
58618
58911
  ...current.sourceControlHosts,
58619
- ...Object.fromEntries(Object.entries(sourceControlHostsPatch).map(([kind, fields]) => [kind, {
58620
- ...current.sourceControlHosts[kind],
58621
- ...fields
58622
- }]))
58912
+ ...Object.fromEntries(Object.entries(sourceControlHostsPatch).map(([kind, fields]) => {
58913
+ const saved = current.sourceControlHosts[kind];
58914
+ return [kind, {
58915
+ ...saved,
58916
+ ...fields,
58917
+ ...isObject(fields.tokens) && Object.keys(fields.tokens).length > 0 ? { tokens: {
58918
+ ...byHost(saved?.tokens),
58919
+ ...byHost(fields.tokens)
58920
+ } } : {}
58921
+ }];
58922
+ }))
58623
58923
  } } : {},
58624
58924
  ...projectSettingsOverridesPatch !== void 0 ? { projectSettingsOverrides: Object.fromEntries(Object.entries(mergeProjectSettingsOverridesPatch(current.projectSettingsOverrides, projectSettingsOverridesPatch)).filter(([, entry]) => Object.keys(entry).length > 0)) } : {},
58625
58925
  ...patch.defaultModelSelection !== void 0 ? { defaultModelSelection: patch.defaultModelSelection } : {},
@@ -58848,7 +59148,7 @@ const writeFileStringAtomically = (input) => scoped(gen(function* () {
58848
59148
  yield* fs.rename(tempPath, targetPath);
58849
59149
  }));
58850
59150
  // package.json
58851
- var version = "0.9.18";
59151
+ var version = "0.9.20";
58852
59152
  // src/auth/ServerSecretStore.ts
58853
59153
  const secretStoreErrorContext = {
58854
59154
  resource: String$2,
@@ -59330,8 +59630,8 @@ const fromReadableChannel = (options) => fromTransform((_, scope) => readableToP
59330
59630
  */
59331
59631
  const fromDuplex = (options) => fromTransform((upstream, scope) => {
59332
59632
  const duplex = options.evaluate();
59333
- const exit = make$85(void 0);
59334
- const latch = makeUnsafe$6(false);
59633
+ const exit = make$86(void 0);
59634
+ const latch = makeUnsafe$7(false);
59335
59635
  return pullIntoWritable({
59336
59636
  pull: upstream,
59337
59637
  writable: duplex,
@@ -59411,8 +59711,8 @@ const toUint8Array = (readable, options) => map$6(toArrayBuffer(readable, option
59411
59711
  const readableToPullUnsafe = (options) => {
59412
59712
  const readable = options.readable;
59413
59713
  const closeOnDone = options.closeOnDone ?? true;
59414
- const exit = options.exit ?? make$85(void 0);
59415
- const latch = options.latch ?? makeUnsafe$6(false);
59714
+ const exit = options.exit ?? make$86(void 0);
59715
+ const latch = options.latch ?? makeUnsafe$7(false);
59416
59716
  function onReadable() {
59417
59717
  latch.openUnsafe();
59418
59718
  }
@@ -59624,7 +59924,7 @@ function readSourceControlHostSettings(schema, saved) {
59624
59924
  * @module source-control-azure-devops/client/definition
59625
59925
  */
59626
59926
  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;
59927
+ const CHANGE_REQUEST_REFERENCE$3 = /^https:\/\/(?:dev\.azure\.com\/[^/\s]+\/[^/\s]+|[^/\s]+\.visualstudio\.com\/(?:DefaultCollection\/)?[^/\s]+)\/_git\/[^/\s]+\/pullrequest\/(\d+)(?:[/?#].*)?$/i;
59628
59928
  /** `az repos pr checkout` names the pull request by `--id`, `-i`, or its first plain argument. */
59629
59929
  function checkoutCommandId(args) {
59630
59930
  const parts = args.trim().split(/\s+/).filter(Boolean);
@@ -59880,7 +60180,7 @@ const definition$2 = defineSourceControlClient({
59880
60180
  * @module source-control-github/client/definition
59881
60181
  */
59882
60182
  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;
60183
+ const CHANGE_REQUEST_REFERENCE$1 = /^https?:\/\/[^/?#\s]+\/[^/\s]+\/[^/\s]+\/pull\/(\d+)(?:[/?#].*)?$/i;
59884
60184
  const KIND$1 = SourceControlProviderKind.make("github");
59885
60185
  const GitHubHostChoice = Struct({
59886
60186
  account: optionalKey(TrimmedNonEmptyString),
@@ -60638,10 +60938,10 @@ const makeTest = (overrides = {}) => gen(function* () {
60638
60938
  ...automaticGitFetchInterval !== void 0 ? { automaticGitFetchInterval } : {},
60639
60939
  ...providerHealthRefreshInterval !== void 0 ? { providerHealthRefreshInterval } : {}
60640
60940
  });
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)));
60941
+ const currentSettingsRef = yield* make$72(initialSettings);
60942
+ const writeSemaphore = yield* make$88(1);
60943
+ const getSettings = get$3(currentSettingsRef).pipe(map$6(resolveTextGenerationProvider));
60944
+ 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
60945
  return {
60646
60946
  start: void_$2,
60647
60947
  ready: void_$2,
@@ -60876,12 +61176,12 @@ const make$51 = gen(function* () {
60876
61176
  const pathService = yield* Path;
60877
61177
  const secretStore = yield* ServerSecretStore;
60878
61178
  const sql = yield* SqlClient;
60879
- const writeSemaphore = yield* make$87(1);
61179
+ const writeSemaphore = yield* make$88(1);
60880
61180
  const cacheKey = "settings";
60881
61181
  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");
61182
+ const startedRef = yield* make$72(false);
61183
+ const startedDeferred = yield* make$79();
61184
+ const watcherScope = yield* make$77("sequential");
60885
61185
  yield* addFinalizer$1(() => close(watcherScope, void_$1));
60886
61186
  const emitChange = (settings) => publish(changesPubSub, settings).pipe(asVoid);
60887
61187
  const readConfigExists = fs.exists(settingsPath).pipe(mapError((cause) => new ServerSettingsError({
@@ -61004,7 +61304,7 @@ const make$51 = gen(function* () {
61004
61304
  capacity: 1,
61005
61305
  timeToLive: (exit) => isSuccess(exit) ? infinity : zero
61006
61306
  });
61007
- const getSettingsFromCache = get(settingsCache, cacheKey);
61307
+ const getSettingsFromCache = get$1(settingsCache, cacheKey);
61008
61308
  const materializeSettingsSecrets = (settings) => gen(function* () {
61009
61309
  const storedSecrets = /* @__PURE__ */ new Map();
61010
61310
  const pending = /* @__PURE__ */ new Map();
@@ -61171,7 +61471,7 @@ const make$51 = gen(function* () {
61171
61471
  }
61172
61472
  return materializedExit.value;
61173
61473
  }).pipe(ensuring(invalidateMaterialized)));
61174
- yield* set(settingsCache, cacheKey, next);
61474
+ yield* set$1(settingsCache, cacheKey, next);
61175
61475
  const resolved = resolveTextGenerationProvider(materializedNext);
61176
61476
  materialized = {
61177
61477
  source: next,
@@ -61207,7 +61507,7 @@ const make$51 = gen(function* () {
61207
61507
  return some(linkTargetPath);
61208
61508
  }).pipe(orElseSucceed(() => none$1()));
61209
61509
  const initialLinkTarget = yield* watchLinkTarget;
61210
- const linkTargetEvents = make$88(initialLinkTarget).pipe(concat$1(watchFileChanges(settingsPath).pipe(mapEffect$1(() => watchLinkTarget))), changes, switchMap(match({
61510
+ const linkTargetEvents = make$89(initialLinkTarget).pipe(concat$1(watchFileChanges(settingsPath).pipe(mapEffect$1(() => watchLinkTarget))), changes, switchMap(match({
61211
61511
  onNone: () => empty$5,
61212
61512
  onSome: (linkTargetPath) => watchFileChanges(linkTargetPath).pipe(ignore$2({ log: true }))
61213
61513
  })));
@@ -61216,7 +61516,7 @@ const make$51 = gen(function* () {
61216
61516
  });
61217
61517
  return {
61218
61518
  start: gen(function* () {
61219
- if (!(yield* modify(startedRef, (started) => [!started, true]))) return yield* _await(startedDeferred);
61519
+ if (!(yield* modify$1(startedRef, (started) => [!started, true]))) return yield* _await(startedDeferred);
61220
61520
  const startup = gen(function* () {
61221
61521
  yield* startWatcher;
61222
61522
  yield* invalidate(settingsCache, cacheKey);
@@ -61349,7 +61649,7 @@ const recordDesktopTelemetrySampleHealth = fn("resourceTelemetry.desktopTelemetr
61349
61649
  lastSampleAt: some(sampledAt),
61350
61650
  lastError: none$1()
61351
61651
  };
61352
- yield* set$1(health, next);
61652
+ yield* set$2(health, next);
61353
61653
  yield* publish(healthChanges, next);
61354
61654
  });
61355
61655
  function normalizeReceiverError(error) {
@@ -61400,22 +61700,22 @@ function requireDesktopTelemetryWriteProgress(fd, remainingBytes, written) {
61400
61700
  const make$50 = fn("resourceTelemetry.desktopTelemetryReceiver.make")(function* () {
61401
61701
  const config = yield* ServerConfig;
61402
61702
  const serverSettings = yield* ServerSettingsService;
61403
- const latest = yield* make$71(none$1());
61703
+ const latest = yield* make$72(none$1());
61404
61704
  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));
61705
+ const lastContactAtMs = yield* make$72(initialDesktopTelemetryContactAt(config.desktopTelemetryFd, toEpochMillis(receiverStartedAt)));
61706
+ const snapshotStaleAfterMs = yield* make$72(resolveDesktopTelemetrySnapshotStaleAfterMs(DEFAULT_HOST_POWER_ACTIVE_INTERVAL_MS, DEFAULT_HOST_POWER_IDLE_INTERVAL_MS));
61407
61707
  const changes = yield* sliding$1(8);
61408
61708
  const healthChanges = yield* sliding$1(4);
61409
- const latestUpdateReport = yield* make$71(none$1());
61709
+ const latestUpdateReport = yield* make$72(none$1());
61410
61710
  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({
61711
+ const controlMutex = yield* make$88(1);
61712
+ const snapshotMutex = yield* make$88(1);
61713
+ const health = yield* make$72({
61414
61714
  status: config.desktopTelemetryFd === void 0 ? "unavailable" : "starting",
61415
61715
  lastSampleAt: none$1(),
61416
61716
  lastError: config.desktopTelemetryFd === void 0 ? some(new DesktopTelemetryDescriptorUnavailable({ mode: config.mode }).message) : none$1()
61417
61717
  });
61418
- const updateHealth = (update) => modify(health, (current) => {
61718
+ const updateHealth = (update) => modify$1(health, (current) => {
61419
61719
  const next = update(current);
61420
61720
  return [next, next];
61421
61721
  }).pipe(flatMap((next) => publish(healthChanges, next)), asVoid);
@@ -61448,7 +61748,7 @@ const make$50 = fn("resourceTelemetry.desktopTelemetryReceiver.make")(function*
61448
61748
  type: "setHostPowerIntervals",
61449
61749
  activeIntervalMs,
61450
61750
  idleIntervalMs
61451
- }).pipe(andThen(set$1(snapshotStaleAfterMs, resolveDesktopTelemetrySnapshotStaleAfterMs(activeIntervalMs, idleIntervalMs))));
61751
+ }).pipe(andThen(set$2(snapshotStaleAfterMs, resolveDesktopTelemetrySnapshotStaleAfterMs(activeIntervalMs, idleIntervalMs))));
61452
61752
  };
61453
61753
  if (config.desktopTelemetryControlFd !== void 0) {
61454
61754
  const settingsChanges = yield* serverSettings.subscribeChanges;
@@ -61485,15 +61785,15 @@ const make$50 = fn("resourceTelemetry.desktopTelemetryReceiver.make")(function*
61485
61785
  }));
61486
61786
  return decodeMessage(value).pipe(mapError((cause) => new DesktopTelemetryDecodeFailed({ cause })));
61487
61787
  }), mapError$1(normalizeReceiverError)).pipe(runForEach((message) => {
61488
- const recordContact = now.pipe(flatMap((now) => set$1(lastContactAtMs, some(toEpochMillis(now)))));
61788
+ const recordContact = now.pipe(flatMap((now) => set$2(lastContactAtMs, some(toEpochMillis(now)))));
61489
61789
  if (message.type === "desktopTelemetryHello") return recordContact.pipe(andThen(updateHealth((current) => ({
61490
61790
  ...current,
61491
61791
  status: "healthy",
61492
61792
  lastError: none$1()
61493
61793
  }))));
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));
61794
+ if (message.type === "desktopUpdateStatus") return recordContact.pipe(andThen(set$2(latestUpdateReport, some(message))), andThen(publish(updateReportChanges, message)), asVoid);
61795
+ const sampledAt = makeUnsafe$6(message.sampledAtUnixMs);
61796
+ return snapshotMutex.withPermits(1)(recordContact.pipe(andThen(set$2(latest, some(message))), andThen(updateSampleHealth(sampledAt)), andThen(publish(changes, message)), asVoid));
61497
61797
  }), andThen(updateHealth((current) => ({
61498
61798
  ...current,
61499
61799
  status: "stopped",
@@ -61506,8 +61806,8 @@ const make$50 = fn("resourceTelemetry.desktopTelemetryReceiver.make")(function*
61506
61806
  yield* forever$1(sleep(STALE_CHECK_INTERVAL).pipe(andThen(snapshotMutex.withPermits(1)(gen(function* () {
61507
61807
  const now$15 = yield* now;
61508
61808
  const nowMs = toEpochMillis(now$15);
61509
- const staleAfterMs = yield* get$2(snapshotStaleAfterMs);
61510
- const staleSnapshot = yield* modify(latest, (current) => {
61809
+ const staleAfterMs = yield* get$3(snapshotStaleAfterMs);
61810
+ const staleSnapshot = yield* modify$1(latest, (current) => {
61511
61811
  if (isNone(current) || current.value.power.stale || nowMs - current.value.sampledAtUnixMs < staleAfterMs) return [none$1(), current];
61512
61812
  const stale = {
61513
61813
  ...current.value,
@@ -61519,12 +61819,12 @@ const make$50 = fn("resourceTelemetry.desktopTelemetryReceiver.make")(function*
61519
61819
  return [some(stale), some(stale)];
61520
61820
  });
61521
61821
  if (isNone(staleSnapshot)) {
61522
- if (!isDesktopTelemetryContactStale(yield* get$2(lastContactAtMs), nowMs)) return;
61822
+ if (!isDesktopTelemetryContactStale(yield* get$3(lastContactAtMs), nowMs)) return;
61523
61823
  const staleMessage = new DesktopTelemetryStale({
61524
61824
  fd,
61525
61825
  staleAfterMs: INITIAL_SAMPLE_DEADLINE_MS
61526
61826
  }).message;
61527
- const changed = yield* modify(health, (current) => {
61827
+ const changed = yield* modify$1(health, (current) => {
61528
61828
  if (current.status === "stopped" || isSome(current.lastSampleAt) || current.status === "degraded" && contains(current.lastError, staleMessage)) return [none$1(), current];
61529
61829
  const next = {
61530
61830
  ...current,
@@ -61548,18 +61848,18 @@ const make$50 = fn("resourceTelemetry.desktopTelemetryReceiver.make")(function*
61548
61848
  }))))).pipe(forkScoped);
61549
61849
  }
61550
61850
  return DesktopTelemetryReceiver.of({
61551
- latest: get$2(latest),
61851
+ latest: get$3(latest),
61552
61852
  changes: fromPubSub(changes),
61553
61853
  subscribe: snapshotMutex.withPermits(1)(gen(function* () {
61554
- const initial = yield* get$2(latest);
61854
+ const initial = yield* get$3(latest);
61555
61855
  const subscription = yield* subscribe(changes);
61556
61856
  return {
61557
61857
  latest: initial,
61558
61858
  changes: fromSubscription(subscription)
61559
61859
  };
61560
61860
  })),
61561
- health: get$2(health),
61562
- subscribeHealth: subscribeBeforeSnapshotWithoutMutex(healthChanges, get$2(health)),
61861
+ health: get$3(health),
61862
+ subscribeHealth: subscribeBeforeSnapshotWithoutMutex(healthChanges, get$3(health)),
61563
61863
  setDiagnosticsDemand,
61564
61864
  requestDesktopUpdate: (requestId) => sendControlMessage({
61565
61865
  version: 1,
@@ -61579,7 +61879,7 @@ const make$50 = fn("resourceTelemetry.desktopTelemetryReceiver.make")(function*
61579
61879
  desktopUpdates: gen(function* () {
61580
61880
  const subscription = yield* subscribe(updateReportChanges);
61581
61881
  return {
61582
- latest: yield* get$2(latestUpdateReport),
61882
+ latest: yield* get$3(latestUpdateReport),
61583
61883
  changes: fromSubscription(subscription)
61584
61884
  };
61585
61885
  })
@@ -61607,15 +61907,15 @@ const make$49 = fn("desktopUpdate.desktopAppUpdate.make")(function* () {
61607
61907
  const config = yield* ServerConfig;
61608
61908
  const crypto = yield* Crypto;
61609
61909
  const receiver = yield* DesktopTelemetryReceiver;
61610
- const inFlight = yield* make$71(false);
61910
+ const inFlight = yield* make$72(false);
61611
61911
  const available = config.mode === "desktop" && config.desktopTelemetryControlFd !== void 0;
61612
61912
  const failWith = (reason, cause) => cause === void 0 ? new ServerSelfUpdateError({ reason }) : new ServerSelfUpdateError({
61613
61913
  reason,
61614
61914
  cause
61615
61915
  });
61616
61916
  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)))));
61917
+ const lastStage = yield* make$72(null);
61918
+ 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
61919
  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
61920
  onNone: () => failVoid,
61621
61921
  onSome: succeed$1
@@ -61626,7 +61926,7 @@ const make$49 = fn("desktopUpdate.desktopAppUpdate.make")(function* () {
61626
61926
  yield* emitStage("installing");
61627
61927
  const targetVersion = report.state.downloadedVersion ?? report.state.availableVersion ?? report.state.currentVersion;
61628
61928
  yield* logInfo("Desktop app update prepared for install.", { targetVersion });
61629
- yield* set$1(inFlight, false);
61929
+ yield* set$2(inFlight, false);
61630
61930
  return {
61631
61931
  targetVersion,
61632
61932
  method: "desktop-app",
@@ -61644,7 +61944,7 @@ const make$49 = fn("desktopUpdate.desktopAppUpdate.make")(function* () {
61644
61944
  const { changes } = yield* receiver.desktopUpdates;
61645
61945
  yield* receiver.requestDesktopUpdate(requestId).pipe(mapError((error) => failWith("Could not reach the P4 Code desktop app on this machine.", error)));
61646
61946
  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)));
61947
+ })).pipe(timeout(DESKTOP_UPDATE_TIMEOUT), catchTags({ TimeoutError: () => failWith("The desktop app did not finish the update in time.") }), onError(() => set$2(inFlight, false)));
61648
61948
  });
61649
61949
  const commit = fn("desktopUpdate.desktopAppUpdate.commit")(function* (requestId, onHandoffAccepted = () => void_$2) {
61650
61950
  if (!available) return yield* failWith("This server cannot commit a desktop app update.");
@@ -61652,7 +61952,7 @@ const make$49 = fn("desktopUpdate.desktopAppUpdate.make")(function* () {
61652
61952
  const { latest, changes } = yield* receiver.desktopUpdates;
61653
61953
  const reports = match(latest, {
61654
61954
  onNone: () => changes,
61655
- onSome: (report) => concat$1(make$88(report), changes)
61955
+ onSome: (report) => concat$1(make$89(report), changes)
61656
61956
  });
61657
61957
  yield* uninterruptible(receiver.commitDesktopUpdate(requestId).pipe(mapError((error) => failWith("Could not reach the P4 Code desktop app.", error)), tap$1(() => onHandoffAccepted())));
61658
61958
  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 +62141,9 @@ function resolveServerSelfUpdateCapability(input) {
61841
62141
  }
61842
62142
  var ServerSelfUpdate = class extends Service()("@p4code/cli/cloud/selfUpdate/ServerSelfUpdate") {};
61843
62143
  fn("cloud.server_self_update.withRunningThreadContinuation")(function* (input) {
61844
- const desktopContinuationTokens = yield* make$71(empty$1());
62144
+ const desktopContinuationTokens = yield* make$72(empty$1());
61845
62145
  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) => {
62146
+ const update = (request, reportProgress = () => void_$2) => {
61847
62147
  let prepared = false;
61848
62148
  let handoffAccepted = false;
61849
62149
  let continuationThreadIds = [];
@@ -61853,14 +62153,14 @@ fn("cloud.server_self_update.withRunningThreadContinuation")(function* (input) {
61853
62153
  })), asVoid) : void_$2).pipe(andThen(reportProgress(stage))), () => sync$1(() => {
61854
62154
  handoffAccepted = true;
61855
62155
  })).pipe(tap$1((result) => {
61856
- if (result.method === "desktop-app" && result.desktopUpdateToken !== void 0 && request.continueRunningThreads === true) return update(desktopContinuationTokens, add(result.desktopUpdateToken));
62156
+ if (result.method === "desktop-app" && result.desktopUpdateToken !== void 0 && request.continueRunningThreads === true) return update$1(desktopContinuationTokens, add(result.desktopUpdateToken));
61857
62157
  return void_$2;
61858
62158
  })), () => continuationThreadIds, () => handoffAccepted);
61859
62159
  };
61860
62160
  return ServerSelfUpdate.of({
61861
- update: update$2,
62161
+ update,
61862
62162
  commitDesktopUpdate: (requestId) => gen(function* () {
61863
- const shouldContinue = yield* modify(desktopContinuationTokens, (tokens) => [has$1(tokens, requestId), remove$1(tokens, requestId)]);
62163
+ const shouldContinue = yield* modify$1(desktopContinuationTokens, (tokens) => [has$1(tokens, requestId), remove$1(tokens, requestId)]);
61864
62164
  let handoffAccepted = false;
61865
62165
  let continuationThreadIds = [];
61866
62166
  return yield* clearOnError(gen(function* () {
@@ -61868,7 +62168,7 @@ fn("cloud.server_self_update.withRunningThreadContinuation")(function* (input) {
61868
62168
  return yield* input.selfUpdate.commitDesktopUpdate(requestId, () => sync$1(() => {
61869
62169
  handoffAccepted = true;
61870
62170
  }));
61871
- }), () => continuationThreadIds, () => handoffAccepted).pipe(catchCause((cause) => (shouldContinue && !handoffAccepted ? update(desktopContinuationTokens, add(requestId)) : void_$2).pipe(andThen(failCause(cause)))));
62171
+ }), () => continuationThreadIds, () => handoffAccepted).pipe(catchCause((cause) => (shouldContinue && !handoffAccepted ? update$1(desktopContinuationTokens, add(requestId)) : void_$2).pipe(andThen(failCause(cause)))));
61872
62172
  })
61873
62173
  });
61874
62174
  });
@@ -61883,7 +62183,7 @@ const make$47 = fn("cloud.server_self_update.make")(function* () {
61883
62183
  const arch = yield* Architecture;
61884
62184
  const httpClient = yield* HttpClient;
61885
62185
  const releaseBaseUrl = getOrUndefined(yield* String$1(CLI_RELEASE_BASE_URL_ENV).pipe(option));
61886
- const inFlight = yield* make$71(false);
62186
+ const inFlight = yield* make$72(false);
61887
62187
  const capability = serverConfig.mode === "desktop" ? "desktop-managed" : launcher.managed ? "boot-service" : null;
61888
62188
  const failWith = (reason, cause) => cause === void 0 ? new ServerSelfUpdateError({ reason }) : new ServerSelfUpdateError({
61889
62189
  reason,
@@ -61963,7 +62263,7 @@ const make$47 = fn("cloud.server_self_update.make")(function* () {
61963
62263
  method: "boot-service",
61964
62264
  updateId
61965
62265
  };
61966
- }).pipe(onError(() => set$1(inFlight, false)));
62266
+ }).pipe(onError(() => set$2(inFlight, false)));
61967
62267
  });
61968
62268
  return ServerSelfUpdate.of({
61969
62269
  update,
@@ -62632,7 +62932,7 @@ const layer$49 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(f
62632
62932
  };
62633
62933
  };
62634
62934
  const spawn = (command, spawnOptions) => callback((resume) => {
62635
- const deferred = makeUnsafe$4();
62935
+ const deferred = makeUnsafe$5();
62636
62936
  const handle = NodeChildProcess.spawn(command.command, command.args, spawnOptions);
62637
62937
  handle.on("error", (error) => {
62638
62938
  resume(fail$1(toPlatformError("spawn", error, command)));
@@ -62927,7 +63227,7 @@ const digest = (algorithm, data) => try_({
62927
63227
  * @category constructors
62928
63228
  * @since 1.0.0
62929
63229
  */
62930
- const make$44 = /*#__PURE__*/ make$66({
63230
+ const make$44 = /*#__PURE__*/ make$67({
62931
63231
  randomBytes: NodeCrypto.randomBytes,
62932
63232
  digest
62933
63233
  });
@@ -63335,7 +63635,7 @@ const writeFile = (path, data, options) => callback((resume, signal) => {
63335
63635
  resume(fail$1(handleBadArgument("writeFile")(err)));
63336
63636
  }
63337
63637
  });
63338
- const makeFileSystem = /*#__PURE__*/ map$6(/*#__PURE__*/ serviceOption(WatchBackend), (backend) => make$84({
63638
+ const makeFileSystem = /*#__PURE__*/ map$6(/*#__PURE__*/ serviceOption(WatchBackend), (backend) => make$85({
63339
63639
  access,
63340
63640
  chmod,
63341
63641
  chown,
@@ -63443,7 +63743,7 @@ const fileUrlOps = (windows) => ({
63443
63743
  * @since 4.0.0
63444
63744
  */
63445
63745
  const layer$43 = /* @__PURE__ */ succeed$3(Path)({
63446
- [TypeId$18]: TypeId$18,
63746
+ [TypeId$19]: TypeId$19,
63447
63747
  ...NodePath,
63448
63748
  .../*#__PURE__*/ fileUrlOps(void 0)
63449
63749
  });
@@ -63514,7 +63814,7 @@ const layer$41 = /* @__PURE__ */ succeed$3(Stdio, /*#__PURE__*/ make$61({
63514
63814
  const layer$40 = /*#__PURE__*/ effect(Terminal, /*#__PURE__*/ (/* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
63515
63815
  const stdin = process.stdin;
63516
63816
  const stdout = process.stdout;
63517
- const lines = yield* make$86();
63817
+ const lines = yield* make$87();
63518
63818
  let inputEnded = stdin.readableEnded;
63519
63819
  let readlineActive = false;
63520
63820
  const onStdinEnd = () => {
@@ -63523,7 +63823,7 @@ const layer$40 = /*#__PURE__*/ effect(Terminal, /*#__PURE__*/ (/* @__PURE__ */ f
63523
63823
  };
63524
63824
  stdin.once("end", onStdinEnd);
63525
63825
  yield* addFinalizer$1(() => sync$1(() => stdin.off("end", onStdinEnd)));
63526
- const rlRef = yield* make$73({
63826
+ const rlRef = yield* make$74({
63527
63827
  acquire: acquireRelease(sync$1(() => {
63528
63828
  const rl = readline.createInterface({
63529
63829
  input: stdin,
@@ -63557,7 +63857,7 @@ const layer$40 = /*#__PURE__*/ effect(Terminal, /*#__PURE__*/ (/* @__PURE__ */ f
63557
63857
  const columns = sync$1(() => stdout.columns ?? 0);
63558
63858
  const rows = sync$1(() => stdout.rows ?? 0);
63559
63859
  const readInput = gen(function* () {
63560
- const queue = yield* make$86();
63860
+ const queue = yield* make$87();
63561
63861
  const handleKeypress = (s, k) => {
63562
63862
  const userInput = {
63563
63863
  input: fromUndefinedOr(s),
@@ -63584,13 +63884,13 @@ const layer$40 = /*#__PURE__*/ effect(Terminal, /*#__PURE__*/ (/* @__PURE__ */ f
63584
63884
  stdin.on("keypress", handleKeypress);
63585
63885
  if (inputEnded) handleEnd();
63586
63886
  else {
63587
- yield* get$3(rlRef);
63887
+ yield* get$4(rlRef);
63588
63888
  stdin.once("end", handleEnd);
63589
63889
  }
63590
63890
  return queue;
63591
63891
  });
63592
63892
  const readLine = suspend(() => poll(lines).pipe(flatMap(match({
63593
- onNone: () => scoped(andThen(get$3(rlRef), take(lines))),
63893
+ onNone: () => scoped(andThen(get$4(rlRef), take(lines))),
63594
63894
  onSome: succeed
63595
63895
  })), mapError(() => new QuitError({}))));
63596
63896
  const display = (prompt) => uninterruptible(callback((resume) => {
@@ -63695,7 +63995,7 @@ const makeClient = (api, options) => gen(function* () {
63695
63995
  const encodeQuery = map$2(endpoint.query, (schema) => encodeUnknownEffect(schema, parseOptions.query));
63696
63996
  const middlewareKeys = Array.from(onEndpointOptions.middleware, (tag) => `${tag.key}/Client`);
63697
63997
  const endpointFn = fnUntraced(function* (request) {
63698
- let httpRequest = make$82(endpoint.method)(endpoint.path);
63998
+ let httpRequest = make$83(endpoint.method)(endpoint.path);
63699
63999
  if (request !== void 0) {
63700
64000
  if (encodeParams !== void 0) {
63701
64001
  const params = yield* encodeParams(request.params);
@@ -70879,7 +71179,9 @@ const resolveClaudeConfigDirPath = fn("resolveClaudeConfigDirPath")(function* (c
70879
71179
  });
70880
71180
  const SettingsEnv = Struct({
70881
71181
  ANTHROPIC_BASE_URL: optional(String$2),
70882
- CLAUDE_CODE_ENTRYPOINT: optional(String$2)
71182
+ CLAUDE_CODE_ENTRYPOINT: optional(String$2),
71183
+ CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY: optional(Unknown),
71184
+ CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS: optional(Unknown)
70883
71185
  });
70884
71186
  const decodeSettingsEnv = decodeUnknownEffect$1(fromLenientJson(Struct({ env: optional(SettingsEnv) })));
70885
71187
  /** The `env` values P4 Code reads from Claude's user and managed settings; later files win. */
@@ -71338,7 +71640,7 @@ const make$39 = gen(function* () {
71338
71640
  });
71339
71641
  const resolvePath = fn("ProjectFaviconResolver.resolvePath")(function* (cwd, faviconPath) {
71340
71642
  const key = faviconCacheKey(cwd, faviconPath);
71341
- const cached = yield* get(faviconCache, key);
71643
+ const cached = yield* get$1(faviconCache, key);
71342
71644
  if (cached === null) return null;
71343
71645
  const stats = yield* optionOnNotFound(fileSystem.stat(cached)).pipe(mapError((cause) => new ProjectFaviconResolutionError({
71344
71646
  operation: "stat-candidate",
@@ -71348,7 +71650,7 @@ const make$39 = gen(function* () {
71348
71650
  })));
71349
71651
  if (isSome(stats) && stats.value.type === "File") return cached;
71350
71652
  yield* invalidate(faviconCache, key);
71351
- return yield* get(faviconCache, key);
71653
+ return yield* get$1(faviconCache, key);
71352
71654
  });
71353
71655
  return ProjectFaviconResolver.of({ resolvePath });
71354
71656
  });
@@ -71453,7 +71755,7 @@ function normalizeGitRemoteUrl(value) {
71453
71755
  } catch {
71454
71756
  return normalized;
71455
71757
  }
71456
- const scpStyleHostAndPath = /^[a-zA-Z0-9._-]+@([^:/\s]+):([^/\s]+(?:\/[^/\s]+)+)$/i.exec(normalized);
71758
+ const scpStyleHostAndPath = /^[a-zA-Z0-9._-]+@([^:/\s]+):([^/\s]+(?:\/[^/\s]+)+)$/i.exec(normalized) ?? /^([^@:/\\\s]{2,}):(?!:)\/?([^/\s]+(?:\/[^/\s]+)+)$/i.exec(normalized);
71457
71759
  const scpHost = scpStyleHostAndPath?.[1];
71458
71760
  const scpPath = scpStyleHostAndPath?.[2];
71459
71761
  if (scpHost && scpPath) return azureDevOpsRepositoryKey(scpHost, scpPath.split("/")) ?? `${scpHost}/${scpPath}`;
@@ -71684,10 +71986,10 @@ const make$38 = fn("RepositoryIdentityResolver.make")(function* (options = {}) {
71684
71986
  });
71685
71987
  const resolve = fnUntraced(function* (cwd, options) {
71686
71988
  if (options?.refresh) yield* invalidate(repositoryRootCache, cwd);
71687
- const cacheKey = yield* get(repositoryRootCache, cwd);
71989
+ const cacheKey = yield* get$1(repositoryRootCache, cwd);
71688
71990
  if (cacheKey === null) return null;
71689
71991
  if (options?.refresh) yield* invalidate(repositoryIdentityCache, cacheKey);
71690
- return yield* get(repositoryIdentityCache, cacheKey);
71992
+ return yield* get$1(repositoryIdentityCache, cacheKey);
71691
71993
  });
71692
71994
  return RepositoryIdentityResolver.of({ resolve });
71693
71995
  });
@@ -71740,20 +72042,20 @@ const make$37 = fn("ProjectEnrichmentService.make")(function* (options = {}) {
71740
72042
  });
71741
72043
  const makeWorkLane = gen(function* () {
71742
72044
  return {
71743
- pendingRoots: yield* make$71(/* @__PURE__ */ new Set()),
72045
+ pendingRoots: yield* make$72(/* @__PURE__ */ new Set()),
71744
72046
  queue: yield* acquireRelease(dropping(maxPending), (queue) => shutdown(queue))
71745
72047
  };
71746
72048
  });
71747
72049
  const repositoryIdentityLane = yield* makeWorkLane;
71748
72050
  const faviconLane = yield* makeWorkLane;
71749
72051
  const changes = yield* acquireRelease(sliding$1(256), (pubsub) => shutdown$1(pubsub));
71750
- const removePending = (lane, workspaceRoot) => update(lane.pendingRoots, (current) => {
72052
+ const removePending = (lane, workspaceRoot) => update$1(lane.pendingRoots, (current) => {
71751
72053
  if (!current.has(workspaceRoot)) return current;
71752
72054
  const next = new Set(current);
71753
72055
  next.delete(workspaceRoot);
71754
72056
  return next;
71755
72057
  });
71756
- const reservePending = (lane, workspaceRoot) => modify(lane.pendingRoots, (current) => {
72058
+ const reservePending = (lane, workspaceRoot) => modify$1(lane.pendingRoots, (current) => {
71757
72059
  if (current.has(workspaceRoot) || current.size >= maxPending) return [false, current];
71758
72060
  const next = new Set(current);
71759
72061
  next.add(workspaceRoot);
@@ -71765,7 +72067,7 @@ const make$37 = fn("ProjectEnrichmentService.make")(function* (options = {}) {
71765
72067
  cause: pretty(result.cause)
71766
72068
  }) : void_$2;
71767
72069
  const resolveRepositoryIdentity = fn("ProjectEnrichmentService.resolveRepositoryIdentity")(function* (workspaceRoot) {
71768
- const repositoryIdentity = yield* get(repositoryIdentityCache, workspaceRoot);
72070
+ const repositoryIdentity = yield* get$1(repositoryIdentityCache, workspaceRoot);
71769
72071
  yield* logFailure(workspaceRoot, "repositoryIdentity", repositoryIdentity);
71770
72072
  const faviconPath = yield* getSuccess(faviconCache, workspaceRoot);
71771
72073
  const repositoryIdentityResolved = isSuccess(repositoryIdentity);
@@ -71780,7 +72082,7 @@ const make$37 = fn("ProjectEnrichmentService.make")(function* (options = {}) {
71780
72082
  });
71781
72083
  });
71782
72084
  const resolveFavicon = fn("ProjectEnrichmentService.resolveFavicon")(function* (workspaceRoot) {
71783
- const faviconPath = yield* get(faviconCache, workspaceRoot);
72085
+ const faviconPath = yield* get$1(faviconCache, workspaceRoot);
71784
72086
  if (exists(findErrorOption$1(faviconPath), isMissingWorkspaceRoot)) return;
71785
72087
  yield* logFailure(workspaceRoot, "faviconPath", faviconPath);
71786
72088
  });
@@ -71825,7 +72127,7 @@ const make$37 = fn("ProjectEnrichmentService.make")(function* (options = {}) {
71825
72127
  return available;
71826
72128
  });
71827
72129
  const readRepositoryIdentity = fn("ProjectEnrichmentService.readRepositoryIdentity")(function* (workspaceRoot) {
71828
- const resolved = yield* get(repositoryIdentityCache, workspaceRoot);
72130
+ const resolved = yield* get$1(repositoryIdentityCache, workspaceRoot);
71829
72131
  return isSuccess(resolved) ? resolved.value : null;
71830
72132
  });
71831
72133
  const invalidate$1 = fn("ProjectEnrichmentService.invalidate")(function* (workspaceRoots) {
@@ -71854,8 +72156,8 @@ const layer$33 = effect(ProjectEnrichmentService, make$37());
71854
72156
  * not tied to a scope, so it keeps working for as long as anyone references it.
71855
72157
  */
71856
72158
  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) => {
72159
+ const locks = yield* make$72(/* @__PURE__ */ new Map());
72160
+ const acquire = (key) => flatMap(make$88(1), (candidate) => modify$1(locks, (current) => {
71859
72161
  const existing = current.get(key);
71860
72162
  const semaphore = existing?.semaphore ?? candidate;
71861
72163
  const next = new Map(current);
@@ -71865,7 +72167,7 @@ const make$36 = () => gen(function* () {
71865
72167
  });
71866
72168
  return [semaphore, next];
71867
72169
  }));
71868
- const release = (key) => update(locks, (current) => {
72170
+ const release = (key) => update$1(locks, (current) => {
71869
72171
  const existing = current.get(key);
71870
72172
  if (existing === void 0) return current;
71871
72173
  const next = new Map(current);
@@ -71878,7 +72180,7 @@ const make$36 = () => gen(function* () {
71878
72180
  });
71879
72181
  return {
71880
72182
  withLock: (key, effect) => acquireUseRelease(acquire(key), (semaphore) => semaphore.withPermit(effect), () => release(key)),
71881
- activeKeys: map$6(get$2(locks), (current) => Array.from(current.keys()))
72183
+ activeKeys: map$6(get$3(locks), (current) => Array.from(current.keys()))
71882
72184
  };
71883
72185
  });
71884
72186
  // src/observability/Attributes.ts
@@ -71932,14 +72234,14 @@ const secretRequestsTotal = counter("p4_secret_requests_total", { description: "
71932
72234
  /** One-use secret refs a tool tried to use, by result: used, rejected. */
71933
72235
  const secretRefsConsumedTotal = counter("p4_secret_refs_consumed_total", { description: "Secret refs tools tried to use, by result." });
71934
72236
  const metricAttributes = (attributes) => Object.entries(compactMetricAttributes(attributes));
71935
- const increment = (metric, attributes, amount = 1) => update$1(withAttributes(metric, metricAttributes(attributes)), amount);
72237
+ const increment = (metric, attributes, amount = 1) => update$2(withAttributes(metric, metricAttributes(attributes)), amount);
71936
72238
  const recordMetrics = (options, startedAt, exit) => gen(function* () {
71937
72239
  const duration = nanos((yield* monotonicTimeNanos) - startedAt);
71938
72240
  const baseAttributes = typeof options.attributes === "function" ? options.attributes() : options.attributes ?? {};
71939
- if (options.timer) yield* update$1(withAttributes(options.timer, metricAttributes(baseAttributes)), duration);
72241
+ if (options.timer) yield* update$2(withAttributes(options.timer, metricAttributes(baseAttributes)), duration);
71940
72242
  if (options.counter) {
71941
72243
  const outcome = outcomeFromExit(exit);
71942
- yield* update$1(withAttributes(options.counter, metricAttributes({
72244
+ yield* update$2(withAttributes(options.counter, metricAttributes({
71943
72245
  ...baseAttributes,
71944
72246
  outcome,
71945
72247
  ...options.outcomeAttributes ? options.outcomeAttributes(outcome) : {}
@@ -72187,7 +72489,7 @@ var ServerActivation = class extends Reference("p4/serverActivation", { defaultV
72187
72489
  const forkParkedFiber = (effect) => gen(function* () {
72188
72490
  const activation = yield* ServerActivation;
72189
72491
  if (activation === void 0) return yield* forkScoped(effect);
72190
- const parked = yield* make$78();
72492
+ const parked = yield* make$79();
72191
72493
  const fiber = yield* forkScoped(succeed$4(parked, void 0).pipe(andThen(activation), andThen(effect)));
72192
72494
  yield* _await(parked);
72193
72495
  return fiber;
@@ -72390,7 +72692,7 @@ const layer$30 = effect(EffectOutboxV2, gen(function* () {
72390
72692
  const cancellationSignal = (effectId) => {
72391
72693
  const existing = cancellationSignals.get(effectId);
72392
72694
  if (existing !== void 0) return existing;
72393
- const created = makeUnsafe$4();
72695
+ const created = makeUnsafe$5();
72394
72696
  cancellationSignals.set(effectId, created);
72395
72697
  return created;
72396
72698
  };
@@ -72494,7 +72796,7 @@ const layer$30 = effect(EffectOutboxV2, gen(function* () {
72494
72796
  cancellationSignals.delete(effectId);
72495
72797
  }),
72496
72798
  awaitSettled: (effectId) => gen(function* () {
72497
- const signal = settledSignals.get(effectId) ?? makeUnsafe$4();
72799
+ const signal = settledSignals.get(effectId) ?? makeUnsafe$5();
72498
72800
  settledSignals.set(effectId, signal);
72499
72801
  const effect = yield* service.get(effectId);
72500
72802
  if (exists(effect, ({ status }) => status === "pending" || status === "running")) return yield* _await(signal);
@@ -72561,7 +72863,7 @@ const layer$30 = effect(EffectOutboxV2, gen(function* () {
72561
72863
  RETURNING *
72562
72864
  `.pipe(withTracerEnabled(false)))[0];
72563
72865
  if (row === void 0) return none$1();
72564
- cancellationSignals.set(row.effect_id, makeUnsafe$4());
72866
+ cancellationSignals.set(row.effect_id, makeUnsafe$5());
72565
72867
  return some(yield* rowToEffect(row));
72566
72868
  }).pipe(mapError((cause) => new EffectOutboxError({
72567
72869
  operation: "claim",
@@ -72574,7 +72876,7 @@ const layer$30 = effect(EffectOutboxV2, gen(function* () {
72574
72876
  WHERE ${claimableCandidatePredicate()}
72575
72877
  `.pipe(withTracerEnabled(false)))[0]?.available_at;
72576
72878
  if (availableAt === void 0 || availableAt === null) return none$1();
72577
- const parsed = make$80(availableAt);
72879
+ const parsed = make$81(availableAt);
72578
72880
  if (isNone(parsed)) return yield* new EffectOutboxError({
72579
72881
  operation: "next-claimable",
72580
72882
  cause: `Invalid available_at timestamp: ${availableAt}`
@@ -73003,7 +73305,7 @@ const layerBase = effect(EventSinkV2, gen(function* () {
73003
73305
  for (const [type, pubsub] of liveEventsByType) yield* publishAll(pubsub, events.filter((stored) => stored.event.type === type));
73004
73306
  });
73005
73307
  const publishStoredEvents = (events) => eventStore.publishCommitted(events).pipe(andThen(publishLiveEvents(events)));
73006
- const publishLane = yield* make$87(1);
73308
+ const publishLane = yield* make$88(1);
73007
73309
  const commitThenPublish = (transaction, publish) => suspend(() => {
73008
73310
  let holdsLane = false;
73009
73311
  const takeLane = publishLane.take(1).pipe(andThen(sync$1(() => {
@@ -73702,7 +74004,7 @@ function settledOverrideFor(value) {
73702
74004
  return value === "settled" || value === "active" ? value : null;
73703
74005
  }
73704
74006
  function dateTime(value) {
73705
- return makeUnsafe$5(value);
74007
+ return makeUnsafe$6(value);
73706
74008
  }
73707
74009
  function nullableDateTime(value) {
73708
74010
  return value === null ? null : dateTime(value);
@@ -73883,7 +74185,7 @@ const make$34 = gen(function* () {
73883
74185
  AND message.role IN ('user', 'assistant')
73884
74186
  ORDER BY message.created_at DESC, message.message_id DESC
73885
74187
  LIMIT 1
73886
- `;
74188
+ `.pipe(readOnly);
73887
74189
  return [(yield* sql`
73888
74190
  SELECT
73889
74191
  message.message_id,
@@ -73913,10 +74215,10 @@ const make$34 = gen(function* () {
73913
74215
  AND message.role = 'user'
73914
74216
  ORDER BY message.created_at DESC, message.message_id DESC
73915
74217
  LIMIT 1
73916
- `)[0], latest[0]].filter((message, index, selected) => message !== void 0 && selected.findIndex((candidate) => candidate?.message_id === message.message_id) === index);
74218
+ `.pipe(readOnly))[0], latest[0]].filter((message, index, selected) => message !== void 0 && selected.findIndex((candidate) => candidate?.message_id === message.message_id) === index);
73917
74219
  });
73918
74220
  const reconcileShells = gen(function* () {
73919
- const now$5 = formatIso(yield* now);
74221
+ const now$6 = formatIso(yield* now);
73920
74222
  const repairRows = yield* sql`
73921
74223
  SELECT
73922
74224
  thread.thread_id,
@@ -73959,7 +74261,7 @@ const make$34 = gen(function* () {
73959
74261
  OR json_type(projection.payload_json, '$.branchPullRequest') IS NULL
73960
74262
  OR json_type(projection.payload_json, '$.activeOrderKey') IS NULL
73961
74263
  ORDER BY thread.created_at ASC, thread.thread_id ASC
73962
- `;
74264
+ `.pipe(readOnly);
73963
74265
  let repairedThreadCount = 0;
73964
74266
  for (const row of repairRows) {
73965
74267
  const decoded = decodeStoredThread(row.payload_json);
@@ -73986,7 +74288,7 @@ const make$34 = gen(function* () {
73986
74288
  type: "thread.metadata-updated",
73987
74289
  threadId: repaired.id,
73988
74290
  providerInstanceId: repaired.providerInstanceId,
73989
- occurredAt: dateTime(now$5),
74291
+ occurredAt: dateTime(now$6),
73990
74292
  payload: repaired
73991
74293
  }] });
73992
74294
  repairedThreadCount += 1;
@@ -74027,7 +74329,7 @@ const make$34 = gen(function* () {
74027
74329
  AND event.event_type = 'thread.created'
74028
74330
  )
74029
74331
  ORDER BY thread.created_at ASC, thread.thread_id ASC
74030
- `;
74332
+ `.pipe(readOnly);
74031
74333
  let importedThreadCount = repairedThreadCount;
74032
74334
  let importedMessageCount = 0;
74033
74335
  for (const row of rows) {
@@ -74079,7 +74381,7 @@ const make$34 = gen(function* () {
74079
74381
  VALUES (
74080
74382
  ${thread.id},
74081
74383
  ${row.updated_at},
74082
- ${now$5},
74384
+ ${now$6},
74083
74385
  NULL,
74084
74386
  ${previews.length},
74085
74387
  NULL
@@ -74163,11 +74465,11 @@ const make$34 = gen(function* () {
74163
74465
  yield* eventSink.write({ events: batch.flatMap(messageEvents) });
74164
74466
  yield* yieldNow;
74165
74467
  }
74166
- const now$6 = formatIso(yield* now);
74468
+ const now$5 = formatIso(yield* now);
74167
74469
  yield* sql`
74168
74470
  UPDATE orchestration_v2_legacy_imports
74169
74471
  SET
74170
- transcript_imported_at = ${now$6},
74472
+ transcript_imported_at = ${now$5},
74171
74473
  imported_message_count = ${messages.length},
74172
74474
  last_error = NULL
74173
74475
  WHERE thread_id = ${threadId}
@@ -75240,7 +75542,7 @@ const makeIsServerInternalPath = gen(function* () {
75240
75542
  });
75241
75543
  // src/vcs/GitVcsDriverCore.ts
75242
75544
  const DEFAULT_TIMEOUT_MS$3 = 3e4;
75243
- const gitProcesses = makeUnsafe$7(8);
75545
+ const gitProcesses = makeUnsafe$8(8);
75244
75546
  const WORKTREE_REMOVE_TIMEOUT_MS = toMillis(minutes(5));
75245
75547
  const DEFAULT_MAX_OUTPUT_BYTES$1 = 1e6;
75246
75548
  const OUTPUT_TRUNCATED_MARKER$1 = "\n\n[truncated]";
@@ -75262,6 +75564,7 @@ const REVIEW_DIFF_ARGS = [
75262
75564
  "--no-ext-diff",
75263
75565
  "--no-textconv",
75264
75566
  "--minimal",
75567
+ "--submodule=short",
75265
75568
  ...PATCH_RENDER_PREFIX_ARGS
75266
75569
  ];
75267
75570
  const STATUS_UPSTREAM_REFRESH_INTERVAL = seconds(15);
@@ -75587,7 +75890,7 @@ const createTrace2Monitor = fnUntraced(function* (input, progress) {
75587
75890
  suffix: ".json"
75588
75891
  });
75589
75892
  const hookStartByChildKey = /* @__PURE__ */ new Map();
75590
- const traceTailState = yield* make$71({
75893
+ const traceTailState = yield* make$72({
75591
75894
  processedChars: 0,
75592
75895
  remainder: ""
75593
75896
  });
@@ -75635,7 +75938,7 @@ const createTrace2Monitor = fnUntraced(function* (input, progress) {
75635
75938
  });
75636
75939
  }
75637
75940
  });
75638
- const readTraceDelta = (yield* make$87(1)).withPermit(fs.readFileString(traceFilePath).pipe(flatMap((contents) => uninterruptible(modify(traceTailState, ({ processedChars, remainder }) => {
75941
+ const readTraceDelta = (yield* make$88(1)).withPermit(fs.readFileString(traceFilePath).pipe(flatMap((contents) => uninterruptible(modify$1(traceTailState, ({ processedChars, remainder }) => {
75639
75942
  if (contents.length <= processedChars) return [[], {
75640
75943
  processedChars,
75641
75944
  remainder
@@ -75655,7 +75958,7 @@ const createTrace2Monitor = fnUntraced(function* (input, progress) {
75655
75958
  }).pipe(ignoreCause({ log: true }), forkScoped);
75656
75959
  const finalizeTrace2Monitor = fn("finalizeTrace2Monitor")(function* () {
75657
75960
  yield* readTraceDelta;
75658
- const finalLine = yield* modify(traceTailState, ({ processedChars, remainder }) => [remainder.trim(), {
75961
+ const finalLine = yield* modify$1(traceTailState, ({ processedChars, remainder }) => [remainder.trim(), {
75659
75962
  processedChars,
75660
75963
  remainder: ""
75661
75964
  }]);
@@ -75821,7 +76124,7 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
75821
76124
  detail: "Failed to read Git process exit code.",
75822
76125
  cause
75823
76126
  }))),
75824
- input.stdin === void 0 ? void_$2 : run$1(encodeText(make$88(input.stdin)), child.stdin).pipe(mapError((cause) => new GitCommandError({
76127
+ input.stdin === void 0 ? void_$2 : run$1(encodeText(make$89(input.stdin)), child.stdin).pipe(mapError((cause) => new GitCommandError({
75825
76128
  ...gitCommandContext(commandInput),
75826
76129
  detail: "Failed to write Git process input.",
75827
76130
  cause
@@ -75862,7 +76165,7 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
75862
76165
  if (repositoryPaths === null) return effect;
75863
76166
  let lock = sharedConfigLocks.get(repositoryPaths.gitCommonDir);
75864
76167
  if (lock === void 0) {
75865
- lock = makeUnsafe$7(1);
76168
+ lock = makeUnsafe$8(1);
75866
76169
  sharedConfigLocks.set(repositoryPaths.gitCommonDir, lock);
75867
76170
  }
75868
76171
  return lock.withPermit(effect);
@@ -76063,7 +76366,7 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76063
76366
  onFailure: () => zero
76064
76367
  })
76065
76368
  });
76066
- const repositoryPathsRefreshCache = yield* makeWith$2((cwd) => invalidate(repositoryPathsCache, cwd).pipe(andThen(get(repositoryPathsCache, cwd))), {
76369
+ const repositoryPathsRefreshCache = yield* makeWith$2((cwd) => invalidate(repositoryPathsCache, cwd).pipe(andThen(get$1(repositoryPathsCache, cwd))), {
76067
76370
  capacity: REPOSITORY_PATHS_CACHE_CAPACITY,
76068
76371
  timeToLive: match$1({
76069
76372
  onSuccess: (repositoryPaths) => repositoryPaths === null ? NON_REPOSITORY_PATHS_CACHE_TTL : REPOSITORY_PATHS_REFRESH_COALESCE_TTL,
@@ -76073,7 +76376,7 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76073
76376
  const normalizeRepositoryPathsCacheKey = (cwd) => path.normalize(path.resolve(cwd));
76074
76377
  const resolveRepositoryPaths = (cwd, refresh = false) => {
76075
76378
  const cacheKey = normalizeRepositoryPathsCacheKey(cwd);
76076
- return get(refresh ? repositoryPathsRefreshCache : repositoryPathsCache, cacheKey);
76379
+ return get$1(refresh ? repositoryPathsRefreshCache : repositoryPathsCache, cacheKey);
76077
76380
  };
76078
76381
  const defaultBranchCache = yield* makeWith$2((gitCommonDir) => gen(function* () {
76079
76382
  const path = yield* Path;
@@ -76149,12 +76452,22 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76149
76452
  timeToLive: (exit, cacheKey) => isSuccess(exit) ? STATUS_UPSTREAM_REFRESH_INTERVAL : statusUpstreamRefreshFailureCooldown(statusRemoteRefreshFailureCounts.get(statusRemoteRefreshFailureKey(cacheKey)) ?? 1)
76150
76453
  });
76151
76454
  const refreshStatusUpstreamIfStale = fn("refreshStatusUpstreamIfStale")(function* (cwd) {
76152
- const upstream = yield* resolveCurrentUpstream(cwd);
76153
- if (!upstream) return;
76455
+ const headRef = yield* runGitStdout("GitVcsDriver.refreshStatusUpstreamIfStale.headRef", cwd, [
76456
+ "symbolic-ref",
76457
+ "--quiet",
76458
+ "HEAD"
76459
+ ], true).pipe(map$6((stdout) => stdout.trim()));
76460
+ if (headRef.length === 0) return;
76461
+ const remoteName = yield* runGitStdout("GitVcsDriver.refreshStatusUpstreamIfStale.upstreamRemote", cwd, [
76462
+ "for-each-ref",
76463
+ "--format=%(upstream:remotename)",
76464
+ headRef
76465
+ ], true).pipe(map$6((stdout) => stdout.trim()));
76466
+ if (remoteName.length === 0 || remoteName === ".") return;
76154
76467
  const gitCommonDir = yield* resolveGitCommonDir(cwd);
76155
- yield* get(statusRemoteRefreshCache, new StatusRemoteRefreshCacheKey({
76468
+ yield* get$1(statusRemoteRefreshCache, new StatusRemoteRefreshCacheKey({
76156
76469
  gitCommonDir,
76157
- remoteName: upstream.remoteName
76470
+ remoteName
76158
76471
  })).pipe(ignore$1);
76159
76472
  });
76160
76473
  const resolveDefaultBranchName = (cwd, remoteName) => executeGit("GitVcsDriver.resolveDefaultBranchName", cwd, ["symbolic-ref", `refs/remotes/${remoteName}/HEAD`], { allowNonZeroExit: true }).pipe(map$6((result) => {
@@ -76427,8 +76740,8 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76427
76740
  stderrLength: result.stderr.length
76428
76741
  }));
76429
76742
  }), 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))
76743
+ statusCacheKey ? get$1(defaultBranchCache, statusCacheKey).pipe(orElseSucceed(() => null)) : resolveDefaultBranchName(cwd, "origin").pipe(orElseSucceed(() => null)),
76744
+ statusCacheKey ? get$1(primaryRemoteExistsCache, statusCacheKey).pipe(orElseSucceed(() => false)) : listRemoteNames(cwd).pipe(map$6((remoteNames) => remoteNames.length > 0), orElseSucceed(() => false))
76432
76745
  ], { concurrency: "unbounded" });
76433
76746
  if (statusResult === null) return NON_REPOSITORY_STATUS_DETAILS;
76434
76747
  if (statusResult.exitCode !== 0) {
@@ -76522,7 +76835,8 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76522
76835
  workingTree: {
76523
76836
  files,
76524
76837
  insertions,
76525
- deletions
76838
+ deletions,
76839
+ ...repositoryPaths?.worktreeRoot ? { rootPath: repositoryPaths.worktreeRoot } : {}
76526
76840
  },
76527
76841
  ...branchChanges ? { branchChanges } : {},
76528
76842
  hasUpstream: upstreamRef !== null,
@@ -76643,6 +76957,8 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76643
76957
  ], { env });
76644
76958
  yield* stageCommitChanges(cwd, filePaths, env);
76645
76959
  const stagedSummary = yield* runGitStdoutWithOptions("GitVcsDriver.prepareCommitContext.stagedSummary", cwd, [
76960
+ "-c",
76961
+ "diff.relative=false",
76646
76962
  "diff",
76647
76963
  "--cached",
76648
76964
  "--name-status"
@@ -76654,6 +76970,8 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76654
76970
  return {
76655
76971
  stagedSummary,
76656
76972
  stagedPatch: yield* runGitStdoutWithOptions("GitVcsDriver.prepareCommitContext.stagedPatch", cwd, [
76973
+ "-c",
76974
+ "diff.relative=false",
76657
76975
  "diff",
76658
76976
  "--no-color",
76659
76977
  "--no-ext-diff",
@@ -76879,12 +77197,16 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76879
77197
  "log",
76880
77198
  "--oneline",
76881
77199
  "--no-color",
77200
+ "--no-decorate",
77201
+ "--no-show-signature",
76882
77202
  commitRange
76883
77203
  ], {
76884
77204
  maxOutputBytes: RANGE_COMMIT_SUMMARY_MAX_OUTPUT_BYTES,
76885
77205
  appendTruncationMarker: true
76886
77206
  }),
76887
77207
  runGitStdoutWithOptions("GitVcsDriver.readRangeContext.diffStat", cwd, [
77208
+ "-c",
77209
+ "diff.relative=false",
76888
77210
  "diff",
76889
77211
  "--stat",
76890
77212
  "--no-color",
@@ -76894,6 +77216,8 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76894
77216
  appendTruncationMarker: true
76895
77217
  }),
76896
77218
  runGitStdoutWithOptions("GitVcsDriver.readRangeContext.diffPatch", cwd, [
77219
+ "-c",
77220
+ "diff.relative=false",
76897
77221
  "diff",
76898
77222
  "--no-color",
76899
77223
  "--no-ext-diff",
@@ -76959,6 +77283,8 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76959
77283
  ...tempIndexConfig,
76960
77284
  "-c",
76961
77285
  "core.preloadIndex=false",
77286
+ "-c",
77287
+ "core.sparseCheckout=false",
76962
77288
  "--literal-pathspecs",
76963
77289
  "add",
76964
77290
  "--intent-to-add",
@@ -76986,9 +77312,9 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
76986
77312
  "-z",
76987
77313
  "--",
76988
77314
  ...pathArgs
76989
- ], { maxOutputBytes: REVIEW_METADATA_MAX_OUTPUT_BYTES }).pipe(catchIf((error) => error.outputLength === void 0, () => succeed(null)));
77315
+ ], { maxOutputBytes: REVIEW_METADATA_MAX_OUTPUT_BYTES }).pipe(orElseSucceed(() => null));
76990
77316
  if (untracked === null) return null;
76991
- const paths = splitNullSeparatedGitStdoutPaths(untracked).filter((candidate) => onlyPath === void 0 || candidate === onlyPath);
77317
+ const paths = splitNullSeparatedGitStdoutPaths(untracked).filter((candidate) => onlyPath === void 0 || candidate === onlyPath || candidate === `${onlyPath}/`);
76992
77318
  if (paths.length === 0) return { env: void 0 };
76993
77319
  if (paths.length > REVIEW_UNTRACKED_MAX_FILES) return null;
76994
77320
  return { env: yield* prepareReviewIndex(cwd, paths).pipe(catchTags({ PlatformError: (cause) => fail$1(new GitCommandError({
@@ -77448,7 +77774,7 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
77448
77774
  });
77449
77775
  const listRefsRefreshSnapshotCache = yield* makeWith$2((cacheKey) => suspend(() => {
77450
77776
  const epoch = bumpListRefsEpoch(cacheKey.gitCommonDir);
77451
- return get(listRefsSnapshotCache, new GitRefsSnapshotCacheKey({
77777
+ return get$1(listRefsSnapshotCache, new GitRefsSnapshotCacheKey({
77452
77778
  gitCommonDir: cacheKey.gitCommonDir,
77453
77779
  epoch
77454
77780
  }));
@@ -77460,10 +77786,10 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
77460
77786
  while (true) {
77461
77787
  const generation = currentListRefsGeneration(gitCommonDir);
77462
77788
  const currentEpoch = listRefsEpochByCommonDir.get(gitCommonDir);
77463
- const snapshot = refresh || currentEpoch === void 0 ? yield* get(listRefsRefreshSnapshotCache, new GitRefsRefreshCacheKey({
77789
+ const snapshot = refresh || currentEpoch === void 0 ? yield* get$1(listRefsRefreshSnapshotCache, new GitRefsRefreshCacheKey({
77464
77790
  gitCommonDir,
77465
77791
  generation
77466
- })) : yield* get(listRefsSnapshotCache, new GitRefsSnapshotCacheKey({
77792
+ })) : yield* get$1(listRefsSnapshotCache, new GitRefsSnapshotCacheKey({
77467
77793
  gitCommonDir,
77468
77794
  epoch: currentEpoch
77469
77795
  }));
@@ -77472,7 +77798,7 @@ const makeGitVcsDriverCore = fn("makeGitVcsDriverCore")(function* () {
77472
77798
  });
77473
77799
  const invalidateListRefsSnapshot = fn("invalidateListRefsSnapshot")(function* (cwd) {
77474
77800
  const repositoryPathsCacheKey = normalizeRepositoryPathsCacheKey(cwd);
77475
- const repositoryPaths = yield* get(repositoryPathsCache, repositoryPathsCacheKey);
77801
+ const repositoryPaths = yield* get$1(repositoryPathsCache, repositoryPathsCacheKey);
77476
77802
  if (repositoryPaths === null) return;
77477
77803
  const previousGeneration = currentListRefsGeneration(repositoryPaths.gitCommonDir);
77478
77804
  bumpListRefsGeneration(repositoryPaths.gitCommonDir);
@@ -78049,8 +78375,8 @@ const canRetryFullFsync = (stderr) => /fsync error on [^\r\n]+: operation not su
78049
78375
  const make$32 = gen(function* () {
78050
78376
  const processRunner = yield* ProcessRunner;
78051
78377
  const hostPlatform = yield* Platform;
78052
- const vcsProcesses = yield* make$87(VCS_PROCESS_CONCURRENCY);
78053
- const nonGitProcesses = yield* make$87(NON_GIT_PROCESS_CONCURRENCY);
78378
+ const vcsProcesses = yield* make$88(VCS_PROCESS_CONCURRENCY);
78379
+ const nonGitProcesses = yield* make$88(NON_GIT_PROCESS_CONCURRENCY);
78054
78380
  const spawn = (input, baseError) => processRunner.run({
78055
78381
  command: input.command,
78056
78382
  args: input.args,
@@ -78659,6 +78985,8 @@ const makeVcsDriverShape = fn("makeGitVcsDriverShape")(function* () {
78659
78985
  args: [
78660
78986
  ...indexConfig,
78661
78987
  ...durableWrite,
78988
+ "-c",
78989
+ "core.safecrlf=false",
78662
78990
  "add",
78663
78991
  ...sparseCheckout ? ["--sparse"] : [],
78664
78992
  "-A",
@@ -78815,7 +79143,7 @@ const makeVcsDriverShape = fn("makeGitVcsDriverShape")(function* () {
78815
79143
  });
78816
79144
  }
78817
79145
  yield* recreateWorkspace;
78818
- if (yield* hasHeadCommit(input.cwd)) yield* execute({
79146
+ yield* execute({
78819
79147
  operation,
78820
79148
  cwd: input.cwd,
78821
79149
  args: [
@@ -78867,6 +79195,7 @@ const makeVcsDriverShape = fn("makeGitVcsDriverShape")(function* () {
78867
79195
  "--no-color",
78868
79196
  "--no-ext-diff",
78869
79197
  "--no-textconv",
79198
+ "--submodule=short",
78870
79199
  ...PATCH_RENDER_PREFIX_ARGS,
78871
79200
  ...input.ignoreWhitespace ? ["--ignore-all-space"] : [],
78872
79201
  `${fromRevision}^{commit}`,
@@ -79081,7 +79410,7 @@ function sourceControlRefFromInput(input) {
79081
79410
  function repositoryPathFromRemoteUrl(url) {
79082
79411
  const trimmed = url?.trim() ?? "";
79083
79412
  if (trimmed.length === 0) return null;
79084
- const path = /^(?:[^@/\s]+@[^:/\s]+:|(?:ssh|https?|git):\/\/[^/]+\/)((?:[^/\s]+\/)+[^/\s]+?)(?:\.git)?\/?$/iu.exec(trimmed)?.[1]?.trim() ?? "";
79413
+ const path = /^(?:[^@/\s]+@[^:/\s]+:|[^@:/\\\s]{2,}:(?!:)|(?:ssh|https?|git):\/\/[^/]+\/)((?:[^/\s]+\/)+[^/\s]+?)(?:\.git)?\/?$/iu.exec(trimmed)?.[1]?.trim() ?? "";
79085
79414
  return path.length > 0 ? path : null;
79086
79415
  }
79087
79416
  var SourceControlProvider = class extends Service()("@p4code/source-control-core/server/SourceControlProvider") {};
@@ -79128,11 +79457,11 @@ function retryAtFromHeader(value, now) {
79128
79457
  }
79129
79458
  /** @public Service construction is part of the canonical Effect module API. */
79130
79459
  const make$30 = gen(function* () {
79131
- const entries = yield* make$71(/* @__PURE__ */ new Map());
79460
+ const entries = yield* make$72(/* @__PURE__ */ new Map());
79132
79461
  const check = fn("SourceControlRateLimit.check")(function* (input, options) {
79133
79462
  const now = yield* currentTimeMillis;
79134
79463
  const key = normalizedKey(input, yield* CredentialScope);
79135
- const entry = (yield* get$2(entries)).get(key);
79464
+ const entry = (yield* get$3(entries)).get(key);
79136
79465
  if (entry !== void 0 && entry.retryAt > now && options?.allowPaused !== true) return yield* new SourceControlRateLimitPausedError({
79137
79466
  provider: input.provider,
79138
79467
  host: input.host.trim().toLowerCase(),
@@ -79143,7 +79472,7 @@ const make$30 = gen(function* () {
79143
79472
  const recordRateLimit = fn("SourceControlRateLimit.recordRateLimit")(function* (input) {
79144
79473
  const now = yield* currentTimeMillis;
79145
79474
  const key = normalizedKey(input, yield* CredentialScope);
79146
- yield* update(entries, (current) => {
79475
+ yield* update$1(entries, (current) => {
79147
79476
  const previous = current.get(key);
79148
79477
  if (previous !== void 0 && previous.generation > input.lease) {
79149
79478
  if (previous.retryAt <= now && (input.retryAt === void 0 || input.retryAt <= now)) return current;
@@ -79171,7 +79500,7 @@ const make$30 = gen(function* () {
79171
79500
  const recordSuccess = fn("SourceControlRateLimit.recordSuccess")(function* (input) {
79172
79501
  const now = yield* currentTimeMillis;
79173
79502
  const key = normalizedKey(input, yield* CredentialScope);
79174
- yield* update(entries, (current) => {
79503
+ yield* update$1(entries, (current) => {
79175
79504
  const previous = current.get(key);
79176
79505
  if (previous === void 0 || previous.generation !== input.lease || previous.retryAt > now) return current;
79177
79506
  const next = new Map(current);
@@ -79590,10 +79919,10 @@ const make$29 = gen(function* () {
79590
79919
  }
79591
79920
  return yield* new BitbucketRepositoryRemoteNotFoundError({ cwd: input.cwd });
79592
79921
  });
79593
- const getRepositoryFromLocator = (repository) => executeJson("getRepository", get$8(apiUrl(`/repositories/${encodeURIComponent(repository.workspace)}/${encodeURIComponent(repository.repoSlug)}`)), RawBitbucketRepositorySchema);
79922
+ const getRepositoryFromLocator = (repository) => executeJson("getRepository", get$9(apiUrl(`/repositories/${encodeURIComponent(repository.workspace)}/${encodeURIComponent(repository.repoSlug)}`)), RawBitbucketRepositorySchema);
79594
79923
  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);
79924
+ const getBranchingModelFromLocator = (repository) => executeJson("getBranchingModel", get$9(apiUrl(`/repositories/${encodeURIComponent(repository.workspace)}/${encodeURIComponent(repository.repoSlug)}/branching-model`)), RawBitbucketBranchingModelSchema);
79925
+ const getRawPullRequestFromRepository = (repository, reference) => executeJson("getPullRequest", get$9(apiUrl(`/repositories/${encodeURIComponent(repository.workspace)}/${encodeURIComponent(repository.repoSlug)}/pullrequests/${encodeURIComponent(normalizeChangeRequestId$1(reference))}`)), BitbucketPullRequestSchema);
79597
79926
  const getRawPullRequest = (input) => resolveRepository(input).pipe(flatMap((repository) => getRawPullRequestFromRepository(repository, input.reference)));
79598
79927
  const readConfigValueNullable = (cwd, key) => git.readConfigValue(cwd, key).pipe(orElseSucceed(() => null));
79599
79928
  const resolveCheckoutRemote = fn("BitbucketApi.resolveCheckoutRemote")(function* (input) {
@@ -79636,7 +79965,7 @@ const make$29 = gen(function* () {
79636
79965
  const send = (input) => {
79637
79966
  const url = trustedUrl(input.url);
79638
79967
  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);
79968
+ const base = input.method === "GET" ? get$9(url) : input.method === "POST" ? post(url) : input.method === "DELETE" ? make$83("DELETE")(url) : put(url);
79640
79969
  const withBody = input.body === void 0 ? base : base.pipe(bodyText(input.body, "application/json"));
79641
79970
  return withAuth(withBody).pipe(flatMap(httpClient.execute), mapError((cause) => new BitbucketRequestError({
79642
79971
  operation: "request",
@@ -79673,7 +80002,7 @@ const make$29 = gen(function* () {
79673
80002
  })) }));
79674
80003
  return BitbucketApi.of({
79675
80004
  request,
79676
- probeAuth: currentCredential.pipe(flatMap((credential) => credential === null ? succeed(authFromCredential(null)) : executeJson("probeAuth", get$8(apiUrl("/user")), BitbucketUserSchema).pipe(map$6((user) => ({
80005
+ probeAuth: currentCredential.pipe(flatMap((credential) => credential === null ? succeed(authFromCredential(null)) : executeJson("probeAuth", get$9(apiUrl("/user")), BitbucketUserSchema).pipe(map$6((user) => ({
79677
80006
  status: "authenticated",
79678
80007
  account: nonEmpty(user.username ?? user.display_name ?? user.account_id),
79679
80008
  host: some("bitbucket.org"),
@@ -79687,7 +80016,7 @@ const make$29 = gen(function* () {
79687
80016
  q: bitbucketQueryString([`source.branch.name = "${sourceBranch(input).replaceAll("\"", "\\\"")}"`, bitbucketStateFilter(states)]),
79688
80017
  state: states
79689
80018
  };
79690
- return executeJson("listPullRequests", get$8(apiUrl(`/repositories/${encodeURIComponent(repository.workspace)}/${encodeURIComponent(repository.repoSlug)}/pullrequests`), { urlParams: query }), BitbucketPullRequestListSchema);
80019
+ return executeJson("listPullRequests", get$9(apiUrl(`/repositories/${encodeURIComponent(repository.workspace)}/${encodeURIComponent(repository.repoSlug)}/pullrequests`), { urlParams: query }), BitbucketPullRequestListSchema);
79691
80020
  }), map$6((list) => list.values.map(normalizeBitbucketPullRequestRecord))),
79692
80021
  getPullRequest: (input) => getRawPullRequest(input).pipe(map$6(normalizeBitbucketPullRequestRecord)),
79693
80022
  getRepositoryCloneUrls: (input) => getRepository(input).pipe(map$6(normalizeRepositoryCloneUrls$2)),
@@ -81849,7 +82178,7 @@ function patchHeader(change) {
81849
82178
  const lines = [`diff --git ${oldSide} ${newSide}`];
81850
82179
  if (change.changeKind === "new") lines.push("new file mode 100644");
81851
82180
  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)}`);
82181
+ 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
82182
  lines.push(`--- ${change.changeKind === "new" ? "/dev/null" : oldSide}`, `+++ ${change.changeKind === "deleted" ? "/dev/null" : newSide}`);
81854
82183
  return lines.join("\n");
81855
82184
  }
@@ -82060,7 +82389,7 @@ function toChangeRequest$6(pullRequest) {
82060
82389
  }
82061
82390
  const make$26 = gen(function* () {
82062
82391
  const cli = yield* AzureDevOpsPullRequestCli;
82063
- const diffSpawns = yield* make$87(8);
82392
+ const diffSpawns = yield* make$88(8);
82064
82393
  const readItemContent = (input) => diffSpawns.withPermits(1)(cli.readItemContent(input));
82065
82394
  const fail = (operation) => (error) => new PullRequestProviderError({
82066
82395
  provider: SourceControlProviderKind.make("azure-devops"),
@@ -82522,20 +82851,23 @@ function probeSourceControlProvider(input) {
82522
82851
  auth
82523
82852
  })));
82524
82853
  const spec = input.spec;
82525
- return all$5([probeCli({
82526
- spec,
82527
- process: input.process,
82528
- cwd: input.cwd
82529
- }), input.process.run({
82854
+ const runAuth = (args) => input.process.run({
82530
82855
  operation: "source-control.discovery.auth",
82531
82856
  command: spec.executable,
82532
- args: spec.authArgs,
82857
+ args,
82533
82858
  cwd: input.cwd,
82534
82859
  allowNonZeroExit: true,
82535
82860
  timeoutMs: probeTimeoutMs(spec),
82536
82861
  maxOutputBytes: 8e3,
82537
82862
  appendTruncationMarker: true
82538
- }).pipe(map$6(spec.parseAuth), catch_((cause) => succeed(unknownAuth(getOrUndefined(detailFromCause(cause))))))], { concurrency: "unbounded" }).pipe(map$6(([item, auth]) => ({
82863
+ }).pipe(map$6(spec.parseAuth), catch_((cause) => succeed(unknownAuth(getOrUndefined(detailFromCause(cause))))));
82864
+ const retryArgs = spec.authRetryArgs;
82865
+ 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))));
82866
+ return all$5([probeCli({
82867
+ spec,
82868
+ process: input.process,
82869
+ cwd: input.cwd
82870
+ }), auth], { concurrency: "unbounded" }).pipe(map$6(([item, auth]) => ({
82539
82871
  ...item,
82540
82872
  auth: item.status === "available" ? auth : unknownAuth("Hosting integration command was not found on the server PATH.")
82541
82873
  })));
@@ -83003,7 +83335,7 @@ function trimmed$2(value) {
83003
83335
  * the other hosts already use.
83004
83336
  */
83005
83337
  function toIsoUtc$1(value) {
83006
- return match(make$80(value), {
83338
+ return match(make$81(value), {
83007
83339
  onNone: () => value,
83008
83340
  onSome: formatIso
83009
83341
  });
@@ -83645,7 +83977,7 @@ const make$24 = gen(function* () {
83645
83977
  getFileRevisions: (input) => input.paths.length === 0 ? succeed({
83646
83978
  revisions: /* @__PURE__ */ new Map(),
83647
83979
  complete: false
83648
- }) : get(revisionPatches, JSON.stringify([input.repository, input.number])).pipe(map$6((diff) => {
83980
+ }) : get$1(revisionPatches, JSON.stringify([input.repository, input.number])).pipe(map$6((diff) => {
83649
83981
  const revisions = new Map(diff.revisions);
83650
83982
  if (!diff.truncated) {
83651
83983
  for (const path of input.paths) if (!revisions.has(path)) revisions.set(path, "");
@@ -84264,7 +84596,7 @@ const make$21 = gen(function* () {
84264
84596
  const { process } = yield* SourceControlHost;
84265
84597
  const fileSystem = yield* FileSystem;
84266
84598
  const httpClient = yield* HttpClient;
84267
- const authLock = yield* make$87(1);
84599
+ const authLock = yield* make$88(1);
84268
84600
  const authenticated = /* @__PURE__ */ new Map();
84269
84601
  const execute = (input) => process.run({
84270
84602
  ...input,
@@ -84361,7 +84693,7 @@ const make$21 = gen(function* () {
84361
84693
  cwd: input.cwd,
84362
84694
  detail: "Invalid Forgejo API path."
84363
84695
  });
84364
- let request = make$82(input.method ?? "GET")(url.toString()).pipe(setHeader("Authorization", `token ${input.token}`));
84696
+ let request = make$83(input.method ?? "GET")(url.toString()).pipe(setHeader("Authorization", `token ${input.token}`));
84365
84697
  if (input.body !== void 0) request = request.pipe(bodyText(input.body, "application/json"));
84366
84698
  const response = yield* httpClient.execute(request).pipe(provideService(RequestInit, { redirect: "manual" }));
84367
84699
  const status = response.status;
@@ -84749,7 +85081,7 @@ function forgejoActor(user) {
84749
85081
  } : null;
84750
85082
  }
84751
85083
  function toIsoUtc(value) {
84752
- return match(make$80(value), {
85084
+ return match(make$81(value), {
84753
85085
  onNone: () => value,
84754
85086
  onSome: formatIso
84755
85087
  });
@@ -85910,7 +86242,7 @@ const make$18 = gen(function* () {
85910
86242
  const token = fromEnv ?? (yield* fromCafe(host));
85911
86243
  return {
85912
86244
  host,
85913
- token: make$81(token),
86245
+ token: make$82(token),
85914
86246
  source: fromEnv !== null ? "env" : "cafe"
85915
86247
  };
85916
86248
  });
@@ -85919,9 +86251,9 @@ const make$18 = gen(function* () {
85919
86251
  timeToLive: (exit) => isSuccess(exit) ? TOKEN_TTL$1 : findErrorOption$1(exit).pipe(exists((error) => error._tag === "GitCafeCliFailedError")) ? zero : MISSING_TTL$1
85920
86252
  });
85921
86253
  return GitCafeCredentials.of({
85922
- get: (host) => fromSettings(host).pipe(flatMap((saved) => saved === null ? get(cache, normalizeHost$2(host)) : succeed({
86254
+ get: (host) => fromSettings(host).pipe(flatMap((saved) => saved === null ? get$1(cache, normalizeHost$2(host)) : succeed({
85923
86255
  host: normalizeHost$2(host),
85924
- token: make$81(saved),
86256
+ token: make$82(saved),
85925
86257
  source: "settings"
85926
86258
  }))),
85927
86259
  invalidate: (host) => invalidate(cache, normalizeHost$2(host)),
@@ -85949,7 +86281,7 @@ const REPOSITORY = /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/u;
85949
86281
  const REMOTE_PATTERNS = [
85950
86282
  /^https?:\/\/(?:[^@/]+@)?([^/:]+)(?::\d+)?\/(.+)$/iu,
85951
86283
  /^ssh:\/\/[^@/]+@([^/:]+)(?::\d+)?\/(.+)$/iu,
85952
- /^[^@/:]+@([^/:]+):(.+)$/u
86284
+ /^(?:[^@/:]+@)?([^/:]+):(.+)$/u
85953
86285
  ];
85954
86286
  /** An `owner/name` repository path, without the `.git` suffix a clone URL carries. */
85955
86287
  function gitCafeRepositoryPath(path) {
@@ -86060,7 +86392,7 @@ const make$17 = gen(function* () {
86060
86392
  const origin = `https://${host}`;
86061
86393
  const method = input.method ?? "GET";
86062
86394
  const send = (url) => {
86063
- const base = make$82(method)(url).pipe(bearerToken(value$2(credential.token)), setHeaders({
86395
+ const base = make$83(method)(url).pipe(bearerToken(value$2(credential.token)), setHeaders({
86064
86396
  accept: "application/json",
86065
86397
  "user-agent": "p4code"
86066
86398
  }));
@@ -86525,7 +86857,7 @@ function toActivity(input) {
86525
86857
  commits: input.commits.items.map((commit) => ({
86526
86858
  oid: commit.oid,
86527
86859
  messageHeadline: commit.summary,
86528
- committedDate: formatIso(makeUnsafe$5(commit.time * 1e3))
86860
+ committedDate: formatIso(makeUnsafe$6(commit.time * 1e3))
86529
86861
  })),
86530
86862
  ...reactions === void 0 ? {} : { reactions: reactions.reactions }
86531
86863
  };
@@ -87462,7 +87794,7 @@ const cloneUrls = (target) => ({
87462
87794
  sshUrl: `ssh@${target.host}:${target.repository}.git`
87463
87795
  });
87464
87796
  /** 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));
87797
+ const isSshRemote = (remoteUrl) => remoteUrl !== void 0 && isSshRemoteUrl(remoteUrl);
87466
87798
  const pullUrlPattern = /^https:\/\/([^/]+)\/([^/]+\/[^/]+)\/pulls\/(\d+)\/?(?:[?#].*)?$/u;
87467
87799
  const make$15 = gen(function* () {
87468
87800
  const api = yield* GitCafeApi;
@@ -87826,7 +88158,7 @@ const make$14 = gen(function* () {
87826
88158
  const token = fromEnv ?? (yield* fromGh(host, choice).pipe(catchTags({ GitHubNotSignedInError: (error) => choice === void 0 ? fail$1(error) : fromGh(host, void 0) })));
87827
88159
  return {
87828
88160
  host,
87829
- token: make$81(token),
88161
+ token: make$82(token),
87830
88162
  source: fromEnv !== null ? "env" : "gh",
87831
88163
  fingerprint: yield* fingerprintOf(host, token)
87832
88164
  };
@@ -87844,11 +88176,11 @@ const make$14 = gen(function* () {
87844
88176
  const saved = yield* savedToken(host);
87845
88177
  if (saved !== null) return {
87846
88178
  host,
87847
- token: make$81(saved),
88179
+ token: make$82(saved),
87848
88180
  source: "settings",
87849
88181
  fingerprint: yield* fingerprintOf(host, saved)
87850
88182
  };
87851
- return yield* get(cache, cacheKey(host, choice?.account));
88183
+ return yield* get$1(cache, cacheKey(host, choice?.account));
87852
88184
  }),
87853
88185
  invalidate: (rawHost) => {
87854
88186
  const host = normalizeHost$1(rawHost);
@@ -87891,12 +88223,12 @@ function quotaFromHeaders(headers) {
87891
88223
  */
87892
88224
  var GitHubQuota = class extends Service()("@p4code/source-control-github/server/GitHubQuota") {};
87893
88225
  const make$13 = gen(function* () {
87894
- const snapshots = yield* make$71(/* @__PURE__ */ new Map());
88226
+ const snapshots = yield* make$72(/* @__PURE__ */ new Map());
87895
88227
  const keyOf = (host, resource, scope) => `${host.trim().toLowerCase()}\0${resource}\0${scope}`;
87896
88228
  const admit = fn("GitHubQuota.admit")(function* (host, resource, options) {
87897
88229
  const now = yield* currentTimeMillis;
87898
88230
  const key = keyOf(host, resource, yield* CredentialScope);
87899
- const snapshot = (yield* get$2(snapshots)).get(key);
88231
+ const snapshot = (yield* get$3(snapshots)).get(key);
87900
88232
  if (snapshot === void 0 || snapshot.resetAtMs <= now) return;
87901
88233
  const floor = options?.allowReserve === true ? 1 : snapshot.limit * RESERVE_RATIO;
87902
88234
  if (snapshot.remaining >= floor) return;
@@ -87910,7 +88242,7 @@ const make$13 = gen(function* () {
87910
88242
  const quota = quotaFromHeaders(headers);
87911
88243
  if (quota === null) return;
87912
88244
  const key = keyOf(host, quota.resource, yield* CredentialScope);
87913
- yield* update(snapshots, (current) => {
88245
+ yield* update$1(snapshots, (current) => {
87914
88246
  const previous = current.get(key);
87915
88247
  if (previous !== void 0 && quota.resetAtMs < previous.resetAtMs) return current;
87916
88248
  const next = new Map(current);
@@ -88097,7 +88429,7 @@ const make$12 = gen(function* () {
88097
88429
  const credentials = yield* GitHubCredentials;
88098
88430
  const quota = yield* GitHubQuota;
88099
88431
  const limits = yield* SourceControlRateLimit;
88100
- const gate = yield* make$87(CONCURRENCY);
88432
+ const gate = yield* make$88(CONCURRENCY);
88101
88433
  const credential = fn("GitHubApi.credential")(function* (host) {
88102
88434
  const normalized = normalizeHost(host);
88103
88435
  const pinned = yield* PinnedGitHubCredential;
@@ -88221,7 +88553,7 @@ const make$12 = gen(function* () {
88221
88553
  });
88222
88554
  const rest = (input) => {
88223
88555
  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"));
88556
+ const base = make$83(input.method ?? "GET")(url).pipe(setHeader("accept", input.accept ?? "application/vnd.github+json"));
88225
88557
  const withEtag = input.ifNoneMatch === void 0 ? base : base.pipe(setHeader("if-none-match", input.ifNoneMatch));
88226
88558
  const request = input.body === void 0 ? withEtag : withEtag.pipe(bodyJsonUnsafe(input.body));
88227
88559
  return Interactive.pipe(flatMap((interactive) => send({
@@ -88343,7 +88675,7 @@ const UNSUPPORTED_STATUSES = /* @__PURE__ */ new Set([
88343
88675
  const makeChecksRevalidator = gen(function* () {
88344
88676
  const api = yield* GitHubApi;
88345
88677
  const entries = yield* makeWith$2((_key) => sync$1(() => ({
88346
- gate: makeUnsafe$7(1),
88678
+ gate: makeUnsafe$8(1),
88347
88679
  validators: /* @__PURE__ */ new Map(),
88348
88680
  head: null,
88349
88681
  value: null,
@@ -88357,7 +88689,7 @@ const makeChecksRevalidator = gen(function* () {
88357
88689
  const credential = yield* PinnedGitHubCredential;
88358
88690
  if (credential === null) return yield* read;
88359
88691
  const key = `${credential.credentialFingerprint}\0${input.host}\0${input.repository}\0${input.number}`;
88360
- const entry = yield* get(entries, key);
88692
+ const entry = yield* get$1(entries, key);
88361
88693
  return yield* entry.gate.withPermit(gen(function* () {
88362
88694
  if (!entry.supported) return yield* read;
88363
88695
  const fail = (status) => new GitHubApiResponseError({
@@ -90571,7 +90903,11 @@ function toFilesPatch(entries) {
90571
90903
  `diff --git ${quoteGitPatchPath(`a/${oldPath}`)} ${quoteGitPatchPath(`b/${value.filename}`)}`,
90572
90904
  ...status === "added" ? ["new file mode 100644"] : [],
90573
90905
  ...status === "removed" ? ["deleted file mode 100644"] : [],
90574
- ...status === "renamed" ? [`rename from ${quoteGitPatchPath(oldPath)}`, `rename to ${quoteGitPatchPath(value.filename)}`] : [],
90906
+ ...status === "renamed" ? [
90907
+ `similarity index ${hunks.length > 0 || (value.additions ?? 0) + (value.deletions ?? 0) > 0 ? 0 : 100}%`,
90908
+ `rename from ${quoteGitPatchPath(oldPath)}`,
90909
+ `rename to ${quoteGitPatchPath(value.filename)}`
90910
+ ] : [],
90575
90911
  `--- ${status === "added" ? "/dev/null" : quoteGitPatchPath(`a/${oldPath}`)}`,
90576
90912
  `+++ ${status === "removed" ? "/dev/null" : quoteGitPatchPath(`b/${value.filename}`)}`
90577
90913
  ].join("\n");
@@ -90835,8 +91171,14 @@ const cascadeRebaseStack = fn("cascadeRebaseStack")(function* (input) {
90835
91171
  ]).pipe(mapError(failed("fetching", first.number, 0)));
90836
91172
  let parentOld = `origin/${input.base}`;
90837
91173
  let parentNew = `origin/${input.base}`;
91174
+ const mergedParent = input.mergedHeadSha !== void 0 && (yield* git([
91175
+ "merge-base",
91176
+ "--is-ancestor",
91177
+ input.mergedHeadSha,
91178
+ first.headSha
91179
+ ], true).pipe(mapError(failed("reading the fork point", first.number, 0)))).exitCode === 0 ? input.mergedHeadSha : void 0;
90838
91180
  for (const [index, layer] of input.layers.entries()) {
90839
- const upstream = index === 0 ? (yield* git([
91181
+ const upstream = index === 0 ? mergedParent ?? (yield* git([
90840
91182
  "merge-base",
90841
91183
  parentOld,
90842
91184
  layer.headSha
@@ -91007,6 +91349,7 @@ const runGitHubStackAction = fn("runGitHubStackAction")(function* (input) {
91007
91349
  const pr = access.data.repository?.[`pr${layer.number}`];
91008
91350
  return !pr?.headRepository || !pr.maintainerCanModify && !toCanWrite(pr.headRepository.viewerPermission);
91009
91351
  })) return yield* new GitHubStackPermissionError({ ...identity });
91352
+ const mergedHeadSha = stack.layers[stack.layers.indexOf(open[0]) - 1]?.headSha;
91010
91353
  yield* cascadeRebaseStack({
91011
91354
  host: input.host,
91012
91355
  repository: input.repository,
@@ -91015,7 +91358,8 @@ const runGitHubStackAction = fn("runGitHubStackAction")(function* (input) {
91015
91358
  number: layer.number,
91016
91359
  headBranch: layer.headBranch,
91017
91360
  headSha: layer.headSha
91018
- }))
91361
+ })),
91362
+ ...mergedHeadSha === void 0 ? {} : { mergedHeadSha }
91019
91363
  }).pipe(mapError((cause) => cause._tag === "GitHubStackRebaseConflictError" || cause._tag === "GitHubStackRebaseGitError" ? new GitHubStackRebaseFailedError({
91020
91364
  ...identity,
91021
91365
  number: cause.number,
@@ -91515,7 +91859,7 @@ const make$11 = gen(function* () {
91515
91859
  };
91516
91860
  return yield* acquireUseRelease(sync$1(() => {
91517
91861
  const lock = identityLocks.get(key) ?? {
91518
- gate: makeUnsafe$7(1),
91862
+ gate: makeUnsafe$8(1),
91519
91863
  users: 0
91520
91864
  };
91521
91865
  lock.users++;
@@ -95334,7 +95678,11 @@ function decodeMergeRequestDiffsJson(raw) {
95334
95678
  `diff --git ${quoteGitPatchPath(`a/${value.old_path}`)} ${quoteGitPatchPath(`b/${value.new_path}`)}`,
95335
95679
  ...value.new_file === true ? [`new file mode ${value.b_mode ?? "100644"}`] : [],
95336
95680
  ...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)}`] : [],
95681
+ ...value.renamed_file === true ? [
95682
+ `similarity index ${hunks.length > 0 || value.too_large === true || value.collapsed === true ? 0 : 100}%`,
95683
+ `rename from ${quoteGitPatchPath(value.old_path)}`,
95684
+ `rename to ${quoteGitPatchPath(value.new_path)}`
95685
+ ] : [],
95338
95686
  `--- ${from}`,
95339
95687
  `+++ ${to}`
95340
95688
  ].join("\n");
@@ -96645,6 +96993,11 @@ const discovery = {
96645
96993
  executable: "glab",
96646
96994
  versionArgs: ["--version"],
96647
96995
  authArgs: ["auth", "status"],
96996
+ authRetryArgs: [
96997
+ "auth",
96998
+ "status",
96999
+ "--all"
97000
+ ],
96648
97001
  parseAuth: parseGitLabAuth,
96649
97002
  refineUnknownRemote: refineUnknownGitLabRemote,
96650
97003
  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 +97236,7 @@ const make$3 = gen(function* () {
96883
97236
  const projectConfig = yield* VcsProjectConfig;
96884
97237
  const git = yield* makeVcsDriver;
96885
97238
  const drivers = { git };
96886
- const get$10 = (kind) => {
97239
+ const get = (kind) => {
96887
97240
  const driver = drivers[kind];
96888
97241
  if (!driver) return fail$1(new VcsUnsupportedOperationError({
96889
97242
  operation: "VcsDriverRegistry.get",
@@ -96904,7 +97257,7 @@ const make$3 = gen(function* () {
96904
97257
  const detectResolvedKind = fn("VcsDriverRegistry.detectResolvedKind")(function* (input) {
96905
97258
  const requestedKind = input.requestedKind;
96906
97259
  if (requestedKind !== "auto" && requestedKind !== "unknown") {
96907
- const driver = yield* get$10(requestedKind);
97260
+ const driver = yield* get(requestedKind);
96908
97261
  return yield* detectWithDriver(requestedKind, driver, input.cwd);
96909
97262
  }
96910
97263
  return yield* detectWithDriver("git", git, input.cwd);
@@ -96939,12 +97292,12 @@ const make$3 = gen(function* () {
96939
97292
  cwd: input.cwd,
96940
97293
  requestedKind
96941
97294
  });
96942
- const cached = yield* get(detectionCache, key);
97295
+ const cached = yield* get$1(detectionCache, key);
96943
97296
  if (cached === null) return null;
96944
97297
  const disk = yield* readDiskState(input.cwd, cached.handle.repository);
96945
97298
  if (disk?.repositoryOnDisk && disk.gitEntries.length === cached.gitEntries.length && disk.gitEntries.every((exists, index) => exists === cached.gitEntries[index])) return cached.handle;
96946
97299
  yield* invalidate(detectionCache, key);
96947
- return (yield* get(detectionCache, key))?.handle ?? null;
97300
+ return (yield* get$1(detectionCache, key))?.handle ?? null;
96948
97301
  });
96949
97302
  const resolve = fn("VcsDriverRegistry.resolve")(function* (input) {
96950
97303
  const detected = yield* detect(input);
@@ -96957,7 +97310,7 @@ const make$3 = gen(function* () {
96957
97310
  });
96958
97311
  });
96959
97312
  return VcsDriverRegistry.of({
96960
- get: get$10,
97313
+ get,
96961
97314
  detect,
96962
97315
  resolve
96963
97316
  });
@@ -97112,7 +97465,7 @@ const makeWithProviders = fn("makeSourceControlProviderRegistryWithProviders")(f
97112
97465
  const vcsRegistry = yield* VcsDriverRegistry;
97113
97466
  const providers = new Map(registrations.map((registration) => [registration.kind, registration.provider]));
97114
97467
  const discoverySpecs = registrations.map((registration) => registration.discovery);
97115
- const get$9 = (kind) => succeed(providers.get(kind) ?? unsupportedProvider(kind));
97468
+ const get = (kind) => succeed(providers.get(kind) ?? unsupportedProvider(kind));
97116
97469
  const detectProviderContext = fn("SourceControlProviderRegistry.detectProviderContext")(function* (cwd) {
97117
97470
  const context = selectProviderContext((yield* (yield* vcsRegistry.resolve({ cwd }).pipe(mapError((error) => new SourceControlProviderError({
97118
97471
  provider: SourceControlProviderKind.make("unknown"),
@@ -97138,7 +97491,7 @@ const makeWithProviders = fn("makeSourceControlProviderRegistryWithProviders")(f
97138
97491
  capacity: PROVIDER_DETECTION_CACHE_CAPACITY,
97139
97492
  timeToLive: (exit) => isSuccess(exit) ? PROVIDER_DETECTION_CACHE_TTL : zero
97140
97493
  });
97141
- const resolveHandle = (input) => (input.context === void 0 ? get(providerContextCache, input.cwd) : refineUnknownRemoteProvider({
97494
+ const resolveHandle = (input) => (input.context === void 0 ? get$1(providerContextCache, input.cwd) : refineUnknownRemoteProvider({
97142
97495
  specs: discoverySpecs,
97143
97496
  process,
97144
97497
  cwd: input.cwd,
@@ -97156,7 +97509,7 @@ const makeWithProviders = fn("makeSourceControlProviderRegistryWithProviders")(f
97156
97509
  const kind = detectSourceControlProviderFromRemoteUrl(input.url.href)?.kind;
97157
97510
  return kind ? providers.get(kind)?.resolveLink?.(input) : void 0;
97158
97511
  },
97159
- get: get$9,
97512
+ get,
97160
97513
  resolveHandle,
97161
97514
  resolve: (input) => resolveHandle(input).pipe(map$6((handle) => handle.provider)),
97162
97515
  discover: forEach(discoverySpecs, (spec) => probeSourceControlProvider({
@@ -97458,17 +97811,17 @@ const nowIso = map$6(now, formatIso);
97458
97811
  /** @public Service construction is part of the canonical Effect module API. */
97459
97812
  const make = gen(function* () {
97460
97813
  const repositories = yield* SourceControlRepositoryService;
97461
- const clones = yield* make$71(/* @__PURE__ */ new Map());
97814
+ const clones = yield* make$72(/* @__PURE__ */ new Map());
97462
97815
  const changes = yield* unbounded$1();
97463
97816
  const retentionFibers = /* @__PURE__ */ new Map();
97464
97817
  let sequence = 0;
97465
- const cloneScope = yield* make$76("parallel");
97818
+ const cloneScope = yield* make$77("parallel");
97466
97819
  yield* addFinalizer$1(() => close(cloneScope, void_$1));
97467
- const actionLock = yield* make$87(1);
97820
+ const actionLock = yield* make$88(1);
97468
97821
  const locked = (effect) => actionLock.withPermits(1)(effect);
97469
- const list = get$2(clones).pipe(map$6((current) => Array.from(current.values(), (tracked) => tracked.snapshot)));
97822
+ const list = get$3(clones).pipe(map$6((current) => Array.from(current.values(), (tracked) => tracked.snapshot)));
97470
97823
  const publish$1 = list.pipe(flatMap((snapshots) => publish(changes, snapshots)));
97471
- const modify$1 = (projectId, mutate) => modify(clones, (current) => {
97824
+ const modify = (projectId, mutate) => modify$1(clones, (current) => {
97472
97825
  const existing = current.get(projectId);
97473
97826
  if (!existing) return [null, current];
97474
97827
  const nextTracked = mutate(existing);
@@ -97488,7 +97841,7 @@ const make = gen(function* () {
97488
97841
  retentionFibers.delete(projectId);
97489
97842
  return fiber ? interrupt$1(fiber).pipe(ignore$1) : void_$2;
97490
97843
  };
97491
- const remove = (projectId) => update(clones, (current) => {
97844
+ const remove = (projectId) => update$1(clones, (current) => {
97492
97845
  if (!current.has(projectId)) return current;
97493
97846
  const next = new Map(current);
97494
97847
  next.delete(projectId);
@@ -97501,7 +97854,7 @@ const make = gen(function* () {
97501
97854
  })), forkDetach);
97502
97855
  retentionFibers.set(projectId, fiber);
97503
97856
  });
97504
- const progress = (projectId, update) => modify$1(projectId, (tracked) => ({
97857
+ const progress = (projectId, update) => modify(projectId, (tracked) => ({
97505
97858
  ...tracked,
97506
97859
  snapshot: {
97507
97860
  ...tracked.snapshot,
@@ -97512,7 +97865,7 @@ const make = gen(function* () {
97512
97865
  })).pipe(asVoid);
97513
97866
  const finish = (projectId, phase, error) => gen(function* () {
97514
97867
  const endedAt = yield* nowIso;
97515
- yield* modify$1(projectId, (tracked) => ({
97868
+ yield* modify(projectId, (tracked) => ({
97516
97869
  ...tracked,
97517
97870
  fiber: null,
97518
97871
  snapshot: {
@@ -97544,10 +97897,10 @@ const make = gen(function* () {
97544
97897
  workspaceRoot: tracked.input.destinationPath
97545
97898
  }).pipe(ignoreCause({ log: true }))), ignoreCause());
97546
97899
  const launch = (projectId) => gen(function* () {
97547
- const tracked = (yield* get$2(clones)).get(projectId);
97900
+ const tracked = (yield* get$3(clones)).get(projectId);
97548
97901
  if (!tracked) return;
97549
97902
  const fiber = yield* runClone(projectId, tracked).pipe(forkIn(cloneScope));
97550
- yield* update(clones, (map) => {
97903
+ yield* update$1(clones, (map) => {
97551
97904
  const existing = map.get(projectId);
97552
97905
  if (!existing) return map;
97553
97906
  const next = new Map(map);
@@ -97575,7 +97928,7 @@ const make = gen(function* () {
97575
97928
  endedAt: null,
97576
97929
  sequence: ++sequence
97577
97930
  };
97578
- if (!(yield* modify(clones, (current) => {
97931
+ if (!(yield* modify$1(clones, (current) => {
97579
97932
  if (Array.from(current.values()).some((tracked) => tracked.snapshot.projectId === input.projectId || tracked.input.destinationPath === prepared.destinationPath)) return [false, current];
97580
97933
  const next = new Map(current);
97581
97934
  next.set(input.projectId, {
@@ -97613,9 +97966,9 @@ const make = gen(function* () {
97613
97966
  repository: prepared.repository
97614
97967
  };
97615
97968
  });
97616
- const get = (projectId) => get$2(clones).pipe(map$6((current) => current.get(projectId)?.snapshot ?? null));
97969
+ const get = (projectId) => get$3(clones).pipe(map$6((current) => current.get(projectId)?.snapshot ?? null));
97617
97970
  const cancel = (projectId) => gen(function* () {
97618
- const tracked = (yield* get$2(clones)).get(projectId);
97971
+ const tracked = (yield* get$3(clones)).get(projectId);
97619
97972
  if (!tracked || tracked.snapshot.phase !== "running" || !tracked.fiber) return false;
97620
97973
  yield* uninterruptible(gen(function* () {
97621
97974
  yield* interrupt$1(tracked.fiber);
@@ -97627,11 +97980,11 @@ const make = gen(function* () {
97627
97980
  return true;
97628
97981
  });
97629
97982
  const retry = (projectId) => gen(function* () {
97630
- const tracked = (yield* get$2(clones)).get(projectId);
97983
+ const tracked = (yield* get$3(clones)).get(projectId);
97631
97984
  if (!tracked || tracked.snapshot.phase !== "failed" && tracked.snapshot.phase !== "cancelled") return false;
97632
97985
  yield* repositories.discardClone(tracked.input.destinationPath);
97633
97986
  const startedAt = yield* nowIso;
97634
- yield* modify$1(projectId, (entry) => ({
97987
+ yield* modify(projectId, (entry) => ({
97635
97988
  ...entry,
97636
97989
  snapshot: {
97637
97990
  ...entry.snapshot,
@@ -97648,7 +98001,7 @@ const make = gen(function* () {
97648
98001
  return true;
97649
98002
  });
97650
98003
  const discard = (projectId) => gen(function* () {
97651
- const tracked = (yield* get$2(clones)).get(projectId);
98004
+ const tracked = (yield* get$3(clones)).get(projectId);
97652
98005
  if (!tracked) return;
97653
98006
  if (tracked.fiber) yield* interrupt$1(tracked.fiber);
97654
98007
  if ((yield* get(projectId))?.phase !== "done") yield* repositories.discardClone(tracked.input.destinationPath).pipe(ignore$1);
@@ -97696,6 +98049,117 @@ function describeCloneFailure(cause) {
97696
98049
  return error instanceof Error && error.message.trim().length > 0 ? error.message : "The repository could not be cloned.";
97697
98050
  }
97698
98051
  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 };
98052
+ // ../../packages/shared/src/preview.ts
98053
+ const TAB_ID_PREFIX = "tab_";
98054
+ let nextPreviewTabSequence = 0;
98055
+ /**
98056
+ * Generate a fresh preview tab id. Lives in shared (not contracts) because
98057
+ * the contracts package is schema-only — runtime helpers belong here.
98058
+ */
98059
+ function newPreviewTabId() {
98060
+ nextPreviewTabSequence += 1;
98061
+ return `${TAB_ID_PREFIX}${nextPreviewTabSequence.toString(36)}`;
98062
+ }
98063
+ const LOOPBACK_HOSTS = /* @__PURE__ */ new Set([
98064
+ "localhost",
98065
+ "127.0.0.1",
98066
+ "0.0.0.0",
98067
+ "::1"
98068
+ ]);
98069
+ /** Internal — used by `lsof` parsing where the host string is wire-formatted. */
98070
+ const LSOF_LOCAL_HOST_TOKENS = /* @__PURE__ */ new Set([
98071
+ ...LOOPBACK_HOSTS,
98072
+ "*",
98073
+ "[::]",
98074
+ "[::1]"
98075
+ ]);
98076
+ const LOOPBACK_PREFIX_PATTERN = /^(?:localhost|127\.0\.0\.1|0\.0\.0\.0|\[::1?\])(?::|\/|$)/i;
98077
+ function isLoopbackHost(host) {
98078
+ if (LOOPBACK_HOSTS.has(host)) return true;
98079
+ if (host === "[::1]") return true;
98080
+ return false;
98081
+ }
98082
+ var PreviewUrlNormalizationError = class extends TaggedError()("PreviewUrlNormalizationError", {
98083
+ inputLength: Number$3,
98084
+ reason: Literals([
98085
+ "empty",
98086
+ "parse",
98087
+ "unsupported-protocol"
98088
+ ]),
98089
+ protocol: optional(String$2),
98090
+ cause: optional(Defect())
98091
+ }) {
98092
+ get message() {
98093
+ const protocol = this.protocol === void 0 ? "" : `: ${this.protocol}`;
98094
+ 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.`;
98095
+ }
98096
+ };
98097
+ const isPreviewUrlNormalizationError = is$2(PreviewUrlNormalizationError);
98098
+ function previewUrlProtocol(rawUrl) {
98099
+ return /^([A-Za-z][A-Za-z\d+.-]*):/.exec(rawUrl)?.[1]?.toLowerCase().concat(":");
98100
+ }
98101
+ /**
98102
+ * Registered schemes that are never a bare host, so `ftp:21` or `tel:5551234`
98103
+ * is rejected rather than read as host and port.
98104
+ */
98105
+ const KNOWN_NON_WEB_SCHEMES = /* @__PURE__ */ new Set([
98106
+ "about:",
98107
+ "blob:",
98108
+ "chrome:",
98109
+ "data:",
98110
+ "file:",
98111
+ "ftp:",
98112
+ "javascript:",
98113
+ "mailto:",
98114
+ "sms:",
98115
+ "ssh:",
98116
+ "tel:",
98117
+ "view-source:",
98118
+ "ws:",
98119
+ "wss:"
98120
+ ]);
98121
+ /**
98122
+ * Normalise a free-form URL string into a fully-qualified `http(s)://` URL.
98123
+ *
98124
+ * - Bare loopback hosts (`localhost`, `localhost:5173`) become `http://...`.
98125
+ * - Bare public hosts (`example.com`) become `https://...`.
98126
+ * - Already-qualified URLs are validated and returned as `URL.href`.
98127
+ *
98128
+ * Throws `PreviewUrlNormalizationError` for empty, unparseable, or
98129
+ * unsupported-protocol inputs.
98130
+ */
98131
+ function normalizePreviewUrl(rawUrl) {
98132
+ const trimmed = rawUrl.trim();
98133
+ if (trimmed.length === 0) throw new PreviewUrlNormalizationError({
98134
+ inputLength: rawUrl.length,
98135
+ reason: "empty"
98136
+ });
98137
+ const explicitProtocol = previewUrlProtocol(trimmed);
98138
+ if (explicitProtocol !== void 0 && KNOWN_NON_WEB_SCHEMES.has(explicitProtocol)) throw new PreviewUrlNormalizationError({
98139
+ inputLength: rawUrl.length,
98140
+ reason: "unsupported-protocol",
98141
+ protocol: explicitProtocol
98142
+ });
98143
+ const useHttp = LOOPBACK_PREFIX_PATTERN.test(trimmed);
98144
+ const candidate = trimmed.includes("://") ? trimmed : `${useHttp ? "http" : "https"}://${trimmed}`;
98145
+ let parsed;
98146
+ try {
98147
+ parsed = new URL(candidate);
98148
+ } catch (cause) {
98149
+ throw new PreviewUrlNormalizationError({
98150
+ inputLength: rawUrl.length,
98151
+ reason: "parse",
98152
+ protocol: previewUrlProtocol(candidate),
98153
+ cause
98154
+ });
98155
+ }
98156
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") throw new PreviewUrlNormalizationError({
98157
+ inputLength: rawUrl.length,
98158
+ reason: "unsupported-protocol",
98159
+ protocol: parsed.protocol
98160
+ });
98161
+ return parsed.href;
98162
+ }
98163
+ 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
98164
 
97701
- //# sourceMappingURL=ProjectCloneTracker-DAE46hjz.mjs.map
98165
+ //# sourceMappingURL=preview-DcFC_OYY.mjs.map