@p4code/cli 0.9.18 → 0.9.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/dist/AcpMcpStdioBridge-DbCGhPmy.mjs +3 -0
  2. package/dist/{AcpMcpStdioBridge-4vUttgH1.mjs → AcpMcpStdioBridge-DxIZyDJz.mjs} +4 -4
  3. package/dist/{Effect-_Rz7VLdg.mjs → Effect-BqRgldaH.mjs} +20 -4
  4. package/dist/{Schema-APnY3Ozr.mjs → Schema-CkGB1Dgx.mjs} +2 -2
  5. package/dist/{Stream-CJtpwu3-.mjs → Stream-DZTo5F3N.mjs} +2 -2
  6. package/dist/{TraceDiagnostics-CeQ-TvdA.mjs → TraceDiagnostics-BU8mTsuy.mjs} +278 -50
  7. package/dist/bin.mjs +2 -2
  8. package/dist/{binCli-DzRO6f_z.mjs → binCli-CJGD6FcB.mjs} +297 -125
  9. package/dist/claude-history-worker.mjs +1 -1
  10. package/dist/{claudeHistoryWorker-B6KX_N9G.mjs → claudeHistoryWorker-Cst8OnLH.mjs} +1 -1
  11. package/dist/{claudeHistoryWorker-DZ1Ft4NK.mjs → claudeHistoryWorker-r4mV4Dxy.mjs} +2 -2
  12. package/dist/client/.vite/manifest.json +2143 -2131
  13. package/dist/client/assets/{2NI2N5EU-Ds9jiLPm.js → 2NI2N5EU-dXNVRqH0.js} +2 -2
  14. package/dist/client/assets/{4UO7MD6I-BWEQQJHY.js → 4UO7MD6I-BnTV2LIU.js} +2 -2
  15. package/dist/client/assets/{5B3SVYGG-lcm66GRf.js → 5B3SVYGG-BW_NJOn9.js} +2 -2
  16. package/dist/client/assets/{5GK6JWQ2-DegG64te.js → 5GK6JWQ2-zR4M88FU.js} +2 -2
  17. package/dist/client/assets/{5N7A7DKN-CDv2ioO3.js → 5N7A7DKN-DIzrmjXm.js} +2 -2
  18. package/dist/client/assets/{5OC2THR4-CaZVvwg8.js → 5OC2THR4-D9gz0spY.js} +2 -2
  19. package/dist/client/assets/{5S6HY5KT-B8WMtvrw.js → 5S6HY5KT-BFO1LsJz.js} +2 -2
  20. package/dist/client/assets/{6IMQ5BUJ-R-et-GtO.js → 6IMQ5BUJ-CflGSI2z.js} +2 -2
  21. package/dist/client/assets/{6OLKWJ4F-CdOZHr7D.js → 6OLKWJ4F-B_-tUtQE.js} +2 -2
  22. package/dist/client/assets/{74OO7NKP-DVS5qE0v.js → 74OO7NKP-CNFGk064.js} +2 -2
  23. package/dist/client/assets/{75O6YZUN-B6bJpGs2.js → 75O6YZUN-DSw7e3qz.js} +2 -2
  24. package/dist/client/assets/{77XECAW3-DDozcJnk.js → 77XECAW3-C1endahg.js} +2 -2
  25. package/dist/client/assets/{ABYRPUBD-BZd5-ucB.js → ABYRPUBD-DGyrlbqz.js} +2 -2
  26. package/dist/client/assets/AlertDialogRoot-CfwItD_i.js +2 -0
  27. package/dist/client/assets/{AnimatedHeight-CsOfc5H1.js → AnimatedHeight-DG3oq8Fl.js} +2 -2
  28. package/dist/client/assets/{AuthSurfaceShell--2lH1vql.js → AuthSurfaceShell-uHFuClfP.js} +2 -2
  29. package/dist/client/assets/{BB2UYUI2-DAb-WdIu.js → BB2UYUI2-DJtfqV3f.js} +2 -2
  30. package/dist/client/assets/{BUM34MOA-DMU6CGcz.js → BUM34MOA-B4MgXIYY.js} +2 -2
  31. package/dist/client/assets/{CEQABKGZ-BnDJUiDl.js → CEQABKGZ-CnWbDLSz.js} +2 -2
  32. package/dist/client/assets/{CXAC5362-QKBU6D2s.js → CXAC5362-DdZ6n5qP.js} +2 -2
  33. package/dist/client/assets/ChatGptUsageButton-Dg1SR7pz.js +2 -0
  34. package/dist/client/assets/ChatMarkdown-eJNo9q4b.js +49 -0
  35. package/dist/client/assets/CheckboxIndicator-BpGIx6Ze.js +2 -0
  36. package/dist/client/assets/{ClippedText-aNLi0IDp.js → ClippedText-Cny-j-4e.js} +2 -2
  37. package/dist/client/assets/CodexSetupSection.logic-C4KEUUA1.js +2 -0
  38. package/dist/client/assets/CollapsiblePanel-vHsKk5wM.js +2 -0
  39. package/dist/client/assets/ComboboxClear-DI8al7ca.js +2 -0
  40. package/dist/client/assets/{ComboboxGroupLabel-BaZLyLCv.js → ComboboxGroupLabel-9alK0hYt.js} +2 -2
  41. package/dist/client/assets/{CommandBlock-Bg2O3rbF.js → CommandBlock-BOYakQHx.js} +2 -2
  42. package/dist/client/assets/CompositeRoot-OiiGu5cn.js +2 -0
  43. package/dist/client/assets/{ConnectAgentSurface-D-fMTn_R.js → ConnectAgentSurface-D9vE8btn.js} +2 -2
  44. package/dist/client/assets/{ConnectionStatusDot-vOKtZfeV.js → ConnectionStatusDot-DL0Hsk-v.js} +2 -2
  45. package/dist/client/assets/{DRLTVNUE-DvpJAT6K.js → DRLTVNUE-D99K7hWK.js} +2 -2
  46. package/dist/client/assets/{DYY6UVD2-DFSg5DAZ.js → DYY6UVD2-BF6iP9-o.js} +2 -2
  47. package/dist/client/assets/DevicePanel-BzIRsUjQ.js +2 -0
  48. package/dist/client/assets/DeviceSetup-DQqwNSXQ.js +2 -0
  49. package/dist/client/assets/DialogTitle-BNEjkHZl.js +2 -0
  50. package/dist/client/assets/{DiffCommentAnnotation-CAml763Q.js → DiffCommentAnnotation-DOn5F9Vx.js} +3 -3
  51. package/dist/client/assets/{DiffFileTree-2Y-Da6MW.js → DiffFileTree-C7d_tSjH.js} +2 -2
  52. package/dist/client/assets/DiffPanel-zzTYLQBt.js +2 -0
  53. package/dist/client/assets/{DiffWorkerPoolProvider-Czi5bOUV.js → DiffWorkerPoolProvider-CHaL1Ona.js} +3 -3
  54. package/dist/client/assets/{EmbeddedDesign-AHra-cLY.js → EmbeddedDesign-DZezJSS1.js} +8 -8
  55. package/dist/client/assets/{EnvironmentMachineIcon-BnMVjB89.js → EnvironmentMachineIcon-BrYDn6tR.js} +2 -2
  56. package/dist/client/assets/{ExpandableText-gKNgCxfU.js → ExpandableText-BsOIEd28.js} +2 -2
  57. package/dist/client/assets/{FNOVOB4O-D2IqnTWb.js → FNOVOB4O-B07Bu4_g.js} +2 -2
  58. package/dist/client/assets/{FieldControl-Bjdbc6Ii.js → FieldControl-Ua5R3Une.js} +2 -2
  59. package/dist/client/assets/{FileDiff-Di0hvnyJ.js → FileDiff-CAhD0qa4.js} +2 -2
  60. package/dist/client/assets/{FilePreviewPanel-2-RLs_YZ.js → FilePreviewPanel-Ptxxfl5h.js} +6 -6
  61. package/dist/client/assets/FoldedSettingsSection-C-4eZXtv.js +2 -0
  62. package/dist/client/assets/{HDGCDEEZ-AZF834xy.js → HDGCDEEZ-BiCUaNcl.js} +2 -2
  63. package/dist/client/assets/{HSJLKHB7-Dtz-7WMf.js → HSJLKHB7-MsC8mniI.js} +2 -2
  64. package/dist/client/assets/{Icons-BzIBDVKW.js → Icons-D8Idteuf.js} +2 -2
  65. package/dist/client/assets/Input-BtekXNnW.js +2 -0
  66. package/dist/client/assets/{IntervalSecondsField-Fdrpvkqj.js → IntervalSecondsField-Aqwzi0Sz.js} +2 -2
  67. package/dist/client/assets/JZOYTAAL-B8yh1QUr.js +1 -0
  68. package/dist/client/assets/{K3MD6TGW-BPz_yQfQ.js → K3MD6TGW-CkU_KXkd.js} +2 -2
  69. package/dist/client/assets/{K7RP3OMA-C-IhAYzY.js → K7RP3OMA-DLs66X2w.js} +2 -2
  70. package/dist/client/assets/{KeybindingsSettings.logic-DjD-8Wsr.js → KeybindingsSettings.logic-DNTed1xn.js} +2 -2
  71. package/dist/client/assets/{LHDIQX7Q-Dw7FK-yZ.js → LHDIQX7Q-BOSadp0O.js} +2 -2
  72. package/dist/client/assets/{LUXOKEGN-Cp4yLfcO.js → LUXOKEGN-qg2nPaOP.js} +2 -2
  73. package/dist/client/assets/{LinkMachineSelect-v3ZAAPFG.js → LinkMachineSelect-CQIJcmq4.js} +2 -2
  74. package/dist/client/assets/{MathTypeset-CAVYwtpt.js → MathTypeset-B_2pC76G.js} +2 -2
  75. package/dist/client/assets/ModelLiveLayer-BdDN1RwJ.js +3 -0
  76. package/dist/client/assets/{N3JZAHOW-sZve4CbV.js → N3JZAHOW-DkFZrX8t.js} +2 -2
  77. package/dist/client/assets/{NUIALGQ3-DMlKhtdq.js → NUIALGQ3-DF_hOTNF.js} +2 -2
  78. package/dist/client/assets/{NoProjectsHero-B0ChXuQG.js → NoProjectsHero-DIDw2XWy.js} +2 -2
  79. package/dist/client/assets/{O65XPQGZ-COhBlGA1.js → O65XPQGZ-DX7_CzKu.js} +2 -2
  80. package/dist/client/assets/{O7XIQ6OM-D-y75rjS.js → O7XIQ6OM-mHLqolvI.js} +2 -2
  81. package/dist/client/assets/{OFQON5FD-kw-f4mV4.js → OFQON5FD-Suig0WTF.js} +2 -2
  82. package/dist/client/assets/{P4ConnectAccountPages-BXM_FJyy.js → P4ConnectAccountPages-naPvNZLz.js} +2 -2
  83. package/dist/client/assets/{P4ConnectSidebarSignIn-D8uwPPR6.js → P4ConnectSidebarSignIn-D2rgfUAh.js} +2 -2
  84. package/dist/client/assets/{PJQHF43J-Dww1R-k6.js → PJQHF43J-7rnsehAx.js} +2 -2
  85. package/dist/client/assets/PanelLayoutControls-D6h4yyW-.js +216 -0
  86. package/dist/client/assets/{PierreEntryIcon-C-5f-jFb.js → PierreEntryIcon-0R4z7KQU.js} +2 -2
  87. package/dist/client/assets/PopoverHandle-BxV9_kh8.js +2 -0
  88. package/dist/client/assets/PreviewPanel-DCN5UudG.js +2 -0
  89. package/dist/client/assets/ProjectDefaultsSettings-BVdLNACE.js +2 -0
  90. package/dist/client/assets/{ProjectFavicon-CPvmNs3J.js → ProjectFavicon-DJmxMkvz.js} +3 -3
  91. package/dist/client/assets/{ProjectIconPickerDialog-blbck4gY.js → ProjectIconPickerDialog-3Bcbbvvc.js} +2 -2
  92. package/dist/client/assets/{ProjectMonogram-Cesz5yVS.js → ProjectMonogram-Bb9wZVNY.js} +2 -2
  93. package/dist/client/assets/{ProviderAuthTerminal-BXGE9cPY.js → ProviderAuthTerminal-mgY-tn0M.js} +2 -2
  94. package/dist/client/assets/ProviderModelPicker-D3VH0Z__.js +2 -0
  95. package/dist/client/assets/{ProviderSettingsForm-CRvI8mDe.js → ProviderSettingsForm-CGySH9bP.js} +2 -2
  96. package/dist/client/assets/PullRequestCodeTab-D-J3laup.js +6 -0
  97. package/dist/client/assets/{RHNBAITX-CY4FKVtu.js → RHNBAITX-Ddcb7a4G.js} +2 -2
  98. package/dist/client/assets/{ReadOnlySourcePreview-DK9ZCAf4.js → ReadOnlySourcePreview-CUrcvaQB.js} +2 -2
  99. package/dist/client/assets/{RedactedSensitiveText-DrIhPFXw.js → RedactedSensitiveText-DiLAhy4C.js} +2 -2
  100. package/dist/client/assets/RenderErrorBoundary-DNjP1Gq4.js +23 -0
  101. package/dist/client/assets/{RightPanelResizeHandle-DBCfKzRv.js → RightPanelResizeHandle-BKZPxtjZ.js} +2 -2
  102. package/dist/client/assets/{SLD4V6NK-Dtrbq5qR.js → SLD4V6NK-CAdpUQd9.js} +2 -2
  103. package/dist/client/assets/ScheduledTasksSettings-BIqva7uG.js +6 -0
  104. package/dist/client/assets/{ScopedSwitch-DQHfQgMZ.js → ScopedSwitch-CjWqxV6P.js} +2 -2
  105. package/dist/client/assets/{ScrollAreaCorner-B9Aiu69u.js → ScrollAreaCorner-BNGMax5h.js} +2 -2
  106. package/dist/client/assets/{SecretInput-CxJl9pux.js → SecretInput-F_2AS4sm.js} +2 -2
  107. package/dist/client/assets/SelectScrollUpArrow-r18qpNEu.js +2 -0
  108. package/dist/client/assets/{SelfImproveSettingsSection-yFj7aCio.js → SelfImproveSettingsSection-dyJbezur.js} +2 -2
  109. package/dist/client/assets/{SettingsPanels-H_7XUe5G.js → SettingsPanels-BwrWyM3f.js} +7 -7
  110. package/dist/client/assets/{SettingsPanels.logic-BYLv56aj.js → SettingsPanels.logic-DWRYwc9b.js} +2 -2
  111. package/dist/client/assets/{SettingsScopeNotice-pJqEfHRd.js → SettingsScopeNotice-DpC9Q9ae.js} +2 -2
  112. package/dist/client/assets/{SidebarStageBackdrop-DWShR_RZ.js → SidebarStageBackdrop-ByWEF0y2.js} +2 -2
  113. package/dist/client/assets/{T3PCR2KE-BFmO9IZ-.js → T3PCR2KE-BsP9x4U3.js} +2 -2
  114. package/dist/client/assets/{TKWO2OVW-DMeVANpK.js → TKWO2OVW-BONiqXri.js} +2 -2
  115. package/dist/client/assets/{TSHNXIZL-COvYTPCc.js → TSHNXIZL-CLTZIB-s.js} +2 -2
  116. package/dist/client/assets/{ThemeEditorPanel-BxOl9N6E.js → ThemeEditorPanel-C7o3GtWa.js} +3 -3
  117. package/dist/client/assets/{ThreadDetailsItemsMenu-BXQbo6bY.js → ThreadDetailsItemsMenu-Bq_XM62t.js} +40 -40
  118. package/dist/client/assets/ThreadTerminalDrawer-CD5oxZhC.js +5 -0
  119. package/dist/client/assets/TooltipProvider-DPt8xz_3.js +2 -0
  120. package/dist/client/assets/{UQJE5E4I-CajoppS3.js → UQJE5E4I-BS_wwVFT.js} +2 -2
  121. package/dist/client/assets/{USNYFO5S-BQLaJAkC.js → USNYFO5S-CpDVNtuT.js} +2 -2
  122. package/dist/client/assets/{Virtualizer-kAxtf9JI.js → Virtualizer-BWztABfX.js} +2 -2
  123. package/dist/client/assets/{WEVWDWVA-Bn1CMBLe.js → WEVWDWVA-4IVaqPOG.js} +2 -2
  124. package/dist/client/assets/{WorkspaceBreadcrumb-KdZMrP13.js → WorkspaceBreadcrumb-BHensDdi.js} +2 -2
  125. package/dist/client/assets/{WorkspacePageContainer-VqvvyrKx.js → WorkspacePageContainer-CCJOwHlv.js} +2 -2
  126. package/dist/client/assets/{WorkspacePageHeader-Ca7-ugiS.js → WorkspacePageHeader-C9Tpr_np.js} +2 -2
  127. package/dist/client/assets/{X5RFHQXM-CPBgn0uR.js → X5RFHQXM-DO1k5hPx.js} +2 -2
  128. package/dist/client/assets/{X62E3GBT-DEsBFWSE.js → X62E3GBT-DR5ebldd.js} +2 -2
  129. package/dist/client/assets/{XBNEOJTC-rIiejuIa.js → XBNEOJTC-D6Kx02Ci.js} +2 -2
  130. package/dist/client/assets/{YHV2MVVZ-FepTeOr1.js → YHV2MVVZ-B7xQdu1d.js} +2 -2
  131. package/dist/client/assets/{YURCZMG2-Co7j1onF.js → YURCZMG2-vpRi9ruy.js} +2 -2
  132. package/dist/client/assets/{YVG2LODB-CH8YtqJ9.js → YVG2LODB-BPr-N_Eh.js} +2 -2
  133. package/dist/client/assets/_chat-B7MuBHoN.js +47 -0
  134. package/dist/client/assets/{_chat.design-C593M39o.js → _chat.design-JY93KEj-.js} +2 -2
  135. package/dist/client/assets/{_chat.index-DZmhCx_Q.js → _chat.index-BLQil4HT.js} +2 -2
  136. package/dist/client/assets/{_chat.new-BLxqLetm.js → _chat.new-BUUjlaam.js} +3 -3
  137. package/dist/client/assets/_chat.pull-requests-hoMASTBm.js +2 -0
  138. package/dist/client/assets/{alert-BdISKl4u.js → alert-Eh-IusVP.js} +2 -2
  139. package/dist/client/assets/{alert-dialog-Broi1wym.js → alert-dialog-BxwvNOYD.js} +2 -2
  140. package/dist/client/assets/{assetUrls-DyJx-URx.js → assetUrls-Bk8CvVQ5.js} +2 -2
  141. package/dist/client/assets/assets-w0TTeveX.js +2 -0
  142. package/dist/client/assets/{browserHistoryStore-zdRsIuMc.js → browserHistoryStore-CQgs_U0x.js} +2 -2
  143. package/dist/client/assets/{browserLinkTarget-aye_Gpt4.js → browserLinkTarget-BD9wK52f.js} +2 -2
  144. package/dist/client/assets/{checkbox-ueGFMqVv.js → checkbox-CDoyvSyH.js} +2 -2
  145. package/dist/client/assets/{color-picker-CUoPp4AJ.js → color-picker-BOsv4n_B.js} +2 -2
  146. package/dist/client/assets/{combobox-BfOjf6Iu.js → combobox-BJsEk7ze.js} +2 -2
  147. package/dist/client/assets/{command-CeMH9lgx.js → command-Cg83G2rG.js} +2 -2
  148. package/dist/client/assets/{connect-CQUjsv6p.js → connect-C7ENaX3L.js} +2 -2
  149. package/dist/client/assets/connect-agent-BEYL9KOm.js +2 -0
  150. package/dist/client/assets/{design-BL2REeQ-.js → design-pZfTAgOJ.js} +2 -2
  151. package/dist/client/assets/{device-DUMKyegd.js → device-CG5GzxuX.js} +2 -2
  152. package/dist/client/assets/{dialog-BzESHWgr.js → dialog-wBelv1Ac.js} +2 -2
  153. package/dist/client/assets/diffPanelStore-C8bCQWTi.js +2 -0
  154. package/dist/client/assets/{diffRendering-BnN6RWwy.js → diffRendering-C_l9f0DJ.js} +2 -2
  155. package/dist/client/assets/{dist--Lo1A95S.js → dist-1X_vspyy.js} +3 -3
  156. package/dist/client/assets/{draft-input-BozMgkbl.js → draft-input-BhYlt4Pu.js} +2 -2
  157. package/dist/client/assets/{duoViewer-mOZwt5UN.js → duoViewer-C9zEhnho.js} +2 -2
  158. package/dist/client/assets/{dynamic-3CmgXeht.js → dynamic--1QgBotz.js} +3 -3
  159. package/dist/client/assets/{embeddedScripts-g3gqCUmg.js → embeddedScripts-B_jWJYkI.js} +2 -2
  160. package/dist/client/assets/{empty-CeYEMFdG.js → empty-CJnssipy.js} +2 -2
  161. package/dist/client/assets/entities-CRXY8xy3.js +2 -0
  162. package/dist/client/assets/{fileLinks-LQyYck3z.js → fileLinks-Bg40qEqI.js} +2 -2
  163. package/dist/client/assets/{fileTreeExpansion-CY-keZ2e.js → fileTreeExpansion-C_MZA2Fb.js} +2 -2
  164. package/dist/client/assets/fold-vertical-CN9ryhZz.js +2 -0
  165. package/dist/client/assets/{getDiffFileInput-ClUa7N40.js → getDiffFileInput-PLuWhYlb.js} +2 -2
  166. package/dist/client/assets/{htmlRender-CxBGTvqW.js → htmlRender-DNX1FsUO.js} +2 -2
  167. package/dist/client/assets/index-BeP8Inse.js +3 -0
  168. package/dist/client/assets/{input-K95B1E2P.js → input-Cd-93Wp0.js} +2 -2
  169. package/dist/client/assets/{input-group-BAbOiIZs.js → input-group-CsS-Psw7.js} +2 -2
  170. package/dist/client/assets/{kbd-D9Q8zN3_.js → kbd-DB5SHS11.js} +2 -2
  171. package/dist/client/assets/{keybindings-C427DPQo.js → keybindings-DBugaGH3.js} +2 -2
  172. package/dist/client/assets/{lazy-BDrl-IrZ.js → lazy-8c6T_8yh.js} +4 -4
  173. package/dist/client/assets/{lazyRouteComponent-Bi84pz13.js → lazyRouteComponent-DtOhACEQ.js} +2 -2
  174. package/dist/client/assets/{link-B57I0_wC.js → link-BrJlIcQX.js} +2 -2
  175. package/dist/client/assets/{linkedPrompt-zM8XlD0_.js → linkedPrompt-CN6Qis59.js} +2 -2
  176. package/dist/client/assets/main-CNyrs4J_.js +37 -0
  177. package/dist/client/assets/main-h6l_SQzg.css +2 -0
  178. package/dist/client/assets/mediaReference-CJpFszQ0.js +2 -0
  179. package/dist/client/assets/{mediaSource-BQkNpHYP.js → mediaSource-D0cInV6V.js} +2 -2
  180. package/dist/client/assets/{modelScene-DWYEc7-j.js → modelScene-BmBrNhLd.js} +2 -2
  181. package/dist/client/assets/number-field-CSK9SRbZ.js +2 -0
  182. package/dist/client/assets/{observeResize-nOwAB2yP.js → observeResize-CFw3_anS.js} +2 -2
  183. package/dist/client/assets/{onboarding-BpYTNtvC.js → onboarding-Eqww5SU9.js} +2 -2
  184. package/dist/client/assets/openFileInPreview-D0wySgTe.js +2 -0
  185. package/dist/client/assets/{p4ProjectFile-Dkwk3dWQ.js → p4ProjectFile-BBI5SxD4.js} +2 -2
  186. package/dist/client/assets/{pair-Bc34xPWk.js → pair-DQR36eTM.js} +2 -2
  187. package/dist/client/assets/{pendingSendStore-ettG1x40.js → pendingSendStore-Dxq1oBH6.js} +2 -2
  188. package/dist/client/assets/{phoneViewer-BCeyyPaZ.js → phoneViewer-DLo78qRr.js} +2 -2
  189. package/dist/client/assets/{pierre-icons-C2-xRx0J.js → pierre-icons-uaZzWTro.js} +2 -2
  190. package/dist/client/assets/{popover-CtPuvMeZ.js → popover-DU7x_UNP.js} +2 -2
  191. package/dist/client/assets/{preview-DIIM6Lws.js → preview-CiDRJw3K.js} +2 -2
  192. package/dist/client/assets/{preview-CS0uw3GP.js → preview-DpJtvz_q.js} +2 -2
  193. package/dist/client/assets/previewMiniPlayerStore-D98YBqjW.js +2 -0
  194. package/dist/client/assets/primary-B5Ds-X9y.js +2 -0
  195. package/dist/client/assets/primaryCloudLinkState-7otRI1yH.js +2 -0
  196. package/dist/client/assets/projectFilesQueryState-CgQDudyR.js +2 -0
  197. package/dist/client/assets/{projectScriptEditor-Bp7idsB3.js → projectScriptEditor-BvwaSAI1.js} +2 -2
  198. package/dist/client/assets/providerSkills-BzFbjrTC.js +2 -0
  199. package/dist/client/assets/{pullRequestDetail.logic-8vF2qB9V.js → pullRequestDetail.logic-D9w_E_Dv.js} +3 -3
  200. package/dist/client/assets/{pullRequestIcons-6_4tgVDN.js → pullRequestIcons-gBL3Yt9x.js} +2 -2
  201. package/dist/client/assets/{pullRequestReviewStore-C8_coQYO.js → pullRequestReviewStore-CDUFfLmu.js} +2 -2
  202. package/dist/client/assets/pullRequests-BZ7PzmTm.js +2 -0
  203. package/dist/client/assets/queries-CzRpIoRQ.js +2 -0
  204. package/dist/client/assets/query-B8d0w621.js +2 -0
  205. package/dist/client/assets/radio-group-XlBZKXvU.js +2 -0
  206. package/dist/client/assets/relay-BWVOLzv_.js +2 -0
  207. package/dist/client/assets/{renderScheduler-Cvu4oEGc.js → renderScheduler-B6SrQg1c.js} +2 -2
  208. package/dist/client/assets/{rightPanelStore-D-meSGn7.js → rightPanelStore-BuudmoUr.js} +2 -2
  209. package/dist/client/assets/runtime-DYDOkR3G.js +7 -0
  210. package/dist/client/assets/{runtimeModeConfig-MYD8WQl8.js → runtimeModeConfig-DyiI0NS9.js} +2 -2
  211. package/dist/client/assets/{scheduledTasksSettings.logic-DmlMHwKF.js → scheduledTasksSettings.logic-DK9Z9azP.js} +3 -3
  212. package/dist/client/assets/{scroll-area-D9QT2Odm.js → scroll-area-B1iVi_db.js} +2 -2
  213. package/dist/client/assets/{select-BtqP8nTL.js → select-Dn3MxyiK.js} +2 -2
  214. package/dist/client/assets/{selfImproveFindings-DZS7PCvJ.js → selfImproveFindings-D5ELz2sX.js} +2 -2
  215. package/dist/client/assets/server-DQkamj54.js +2 -0
  216. package/dist/client/assets/session-A0FOa5Fv.js +2 -0
  217. package/dist/client/assets/session-logic-21koHfxl.js +27 -0
  218. package/dist/client/assets/{settings-A-pqSt1Y.js → settings-RZUSGfch.js} +2 -2
  219. package/dist/client/assets/{settings.appearance-C_uChPSz.js → settings.appearance-C2NUZQFB.js} +2 -2
  220. package/dist/client/assets/settings.archived-BOhwFyi3.js +2 -0
  221. package/dist/client/assets/{settings.computer-use-Dg_7f0JL.js → settings.computer-use-BhT0XlhO.js} +2 -2
  222. package/dist/client/assets/settings.connections-CVIPNlOU.js +2 -0
  223. package/dist/client/assets/{settings.data-controls-SDdipjc2.js → settings.data-controls-GIrtB4_J.js} +2 -2
  224. package/dist/client/assets/{settings.decisions-CoyKjdc1.js → settings.decisions-BBnbf4E4.js} +2 -2
  225. package/dist/client/assets/{settings.designs-4eHPAt6y.js → settings.designs-BrpJ4wJk.js} +2 -2
  226. package/dist/client/assets/settings.diagnostics-H0YPr7JD.js +2 -0
  227. package/dist/client/assets/{settings.general-DAWqQIHm.js → settings.general-CuMxiE8w.js} +2 -2
  228. package/dist/client/assets/settings.integrations-bw-NYX6w.js +2 -0
  229. package/dist/client/assets/{settings.keybindings-B0oNRJrN.js → settings.keybindings-Mqx8YmX-.js} +2 -2
  230. package/dist/client/assets/{settings.open-source-licenses-BI8-fEG8.js → settings.open-source-licenses-DppmDqdO.js} +2 -2
  231. package/dist/client/assets/settings.plugins-PhsBK5Nz.js +5 -0
  232. package/dist/client/assets/settings.projects-DvjxFMyV.js +4 -0
  233. package/dist/client/assets/settings.providers-DZac28bF.js +3 -0
  234. package/dist/client/assets/{settings.scheduled-tasks-Bx6ZIK0R.js → settings.scheduled-tasks-_8iDYzJF.js} +2 -2
  235. package/dist/client/assets/{settings.secrets-Dt4ORQnt.js → settings.secrets-B5WZy_fN.js} +2 -2
  236. package/dist/client/assets/{settings.snap-shot-CytMd2pC.js → settings.snap-shot-BThcjeQt.js} +2 -2
  237. package/dist/client/assets/settings.source-control-Cj9K4HE8.js +2 -0
  238. package/dist/client/assets/{settings.storage-BfvQd358.js → settings.storage-D3QQPs1U.js} +2 -2
  239. package/dist/client/assets/settingsLayout-LNYGC372.js +3 -0
  240. package/dist/client/assets/{sidebar-DbrWNN9-.js → sidebar-CCcDCy-Q.js} +2 -2
  241. package/dist/client/assets/{sidebarProjectGrouping-CZnpDNTf.js → sidebarProjectGrouping-Bj_Qatcf.js} +2 -2
  242. package/dist/client/assets/{skeleton-DxuQc9Kk.js → skeleton-dlFZVmO8.js} +2 -2
  243. package/dist/client/assets/{sourceControl-BbrGhAuF.js → sourceControl-Tyc4OKDH.js} +2 -2
  244. package/dist/client/assets/sourceControlClients-ECBkjM0e.js +2 -0
  245. package/dist/client/assets/{spinner-DmRIQvmI.js → spinner-fU7Q2OR1.js} +2 -2
  246. package/dist/client/assets/src-B7vcPG0D.js +15 -0
  247. package/dist/client/assets/terminal-links-CPJORRle.js +2 -0
  248. package/dist/client/assets/terminalSessions-B00GvWIU.js +2 -0
  249. package/dist/client/assets/{textarea-C_3SxeEV.js → textarea-CEng2dlo.js} +2 -2
  250. package/dist/client/assets/{themePalette-DSR5tBE9.js → themePalette-CcasVi_y.js} +3 -3
  251. package/dist/client/assets/{threadCheckpoints-D0dMlqZE.js → threadCheckpoints-D7P5EX0m.js} +2 -2
  252. package/dist/client/assets/{toggle-Zti3zuzr.js → toggle-DN8nwGi8.js} +2 -2
  253. package/dist/client/assets/{toggle-group-D015gcqT.js → toggle-group-Dx-ruC5S.js} +2 -2
  254. package/dist/client/assets/{tooltip-CAzkzAoH.js → tooltip-Da633nbs.js} +2 -2
  255. package/dist/client/assets/uiStateStore-aIXF8Zlu.js +2 -0
  256. package/dist/client/assets/unfold-vertical-CldLe1hB.js +2 -0
  257. package/dist/client/assets/{usage-BJA7zQoS.js → usage-DXoXMoKb.js} +2 -2
  258. package/dist/client/assets/{usageAccess-D5FAb4jV.js → usageAccess-RRnEiTSy.js} +2 -2
  259. package/dist/client/assets/{usageFormat-Njxx7Q49.js → usageFormat-D95Lw1XX.js} +2 -2
  260. package/dist/client/assets/{usageShortcuts-DuJeedG7.js → usageShortcuts-3UXG3hMD.js} +2 -2
  261. package/dist/client/assets/{use-atom-command-DMW6SFOx.js → use-atom-command-BkSai4ZH.js} +2 -2
  262. package/dist/client/assets/{useAriaLabelledBy-E7KNTqMb.js → useAriaLabelledBy-rzE7PQnj.js} +2 -2
  263. package/dist/client/assets/useHandleNewThread-CT3UAzyB.js +2 -0
  264. package/dist/client/assets/{useLocation-hVHAnHTx.js → useLocation-D7ZCVKu2.js} +2 -2
  265. package/dist/client/assets/{useNavigate-B7EiSugn.js → useNavigate-C6_wm78C.js} +2 -2
  266. package/dist/client/assets/{useNavigateBack-BC3GGm7e.js → useNavigateBack-iqJmvild.js} +2 -2
  267. package/dist/client/assets/{useP4ConnectAuthPrompt-D3qxx30I.js → useP4ConnectAuthPrompt-CKTZ-MxU.js} +2 -2
  268. package/dist/client/assets/{useParams-C5b2x5BH.js → useParams-DND-Jy5h.js} +2 -2
  269. package/dist/client/assets/{usePermissionStatus-Zf48W2tu.js → usePermissionStatus-DFJ-2rdQ.js} +2 -2
  270. package/dist/client/assets/{usePopupViewport-Dtwu2x5j.js → usePopupViewport-EARvZG9w.js} +2 -2
  271. package/dist/client/assets/{usePullRequestActions-BtPaWuCg.js → usePullRequestActions-DRrQpPhD.js} +3 -3
  272. package/dist/client/assets/{useRegisterFieldControl-BMmbsxkx.js → useRegisterFieldControl-Byb-EJOb.js} +2 -2
  273. package/dist/client/assets/{useScopedModelAvailability-BIveWOlk.js → useScopedModelAvailability-tXU_0tMY.js} +2 -2
  274. package/dist/client/assets/useSettings-BOuYsEM0.js +3 -0
  275. package/dist/client/assets/utils-DsOiwDNN.js +24 -0
  276. package/dist/client/assets/vcsRefInvalidation-CnjZD1r1.js +2 -0
  277. package/dist/client/assets/welcome-BgxI7gmD.js +2 -0
  278. package/dist/client/index.html +1 -1
  279. package/dist/{mcpResponsePayloads-BBvPAlwj.mjs → mcpResponsePayloads-tqyeJD3c.mjs} +10 -9
  280. package/dist/{ProjectCloneTracker-DAE46hjz.mjs → preview-C_h8Tda3.mjs} +894 -438
  281. package/dist/{renderer-iWfzRWCX.mjs → renderer-BeTlHpQk.mjs} +2 -2
  282. package/dist/{runtime-CllDK9QU.mjs → runtime-BUfUqrrw.mjs} +3 -3
  283. package/dist/{runtimeLayer-CblMBDQ6.mjs → runtimeLayer-5R-ZfBsl.mjs} +3152 -2949
  284. package/dist/{runtimeLayer-D1H3yRj8.mjs → runtimeLayer-DurN_FAN.mjs} +1 -1
  285. package/dist/{server-vm1eH-y1.mjs → server-DuD96ZSr.mjs} +347 -228
  286. package/dist/{sha2-9FUhed4s.mjs → sha2-oCwRxj9g.mjs} +13 -7
  287. package/package.json +1 -1
  288. package/dist/AcpMcpStdioBridge-RQnwhGrw.mjs +0 -3
  289. package/dist/client/assets/AlertDialogRoot-D2Lzxp77.js +0 -2
  290. package/dist/client/assets/ChatGptUsageButton-CM16mB7z.js +0 -2
  291. package/dist/client/assets/ChatMarkdown-LYkpVHJO.js +0 -49
  292. package/dist/client/assets/CheckboxIndicator-CLFg8-A1.js +0 -2
  293. package/dist/client/assets/CodexSetupSection.logic-CNAX4_fV.js +0 -2
  294. package/dist/client/assets/CollapsiblePanel-BlUD5mJC.js +0 -2
  295. package/dist/client/assets/ComboboxClear-DKHwuDAL.js +0 -2
  296. package/dist/client/assets/CompositeRoot-_C3uLH2F.js +0 -2
  297. package/dist/client/assets/DevicePanel-Dvozgov3.js +0 -2
  298. package/dist/client/assets/DeviceSetup-O_9LLGD9.js +0 -2
  299. package/dist/client/assets/DialogTitle-C9j5Tmuy.js +0 -2
  300. package/dist/client/assets/DiffPanel-CDixqNzb.js +0 -2
  301. package/dist/client/assets/FoldedSettingsSection-CrJX4FnL.js +0 -2
  302. package/dist/client/assets/Input-BWhtnCC0.js +0 -2
  303. package/dist/client/assets/JZOYTAAL-BCdmxsmo.js +0 -1
  304. package/dist/client/assets/ModelLiveLayer-CxX5pYmA.js +0 -3
  305. package/dist/client/assets/PanelLayoutControls-CC5OYRRR.js +0 -216
  306. package/dist/client/assets/PopoverHandle-BwqnKm9Y.js +0 -2
  307. package/dist/client/assets/PreviewPanel-BvRNyyKQ.js +0 -2
  308. package/dist/client/assets/ProjectDefaultsSettings-rvN_67Gu.js +0 -2
  309. package/dist/client/assets/ProviderModelPicker-Cq3CogU6.js +0 -2
  310. package/dist/client/assets/PullRequestCodeTab-C5kr72DG.js +0 -6
  311. package/dist/client/assets/RenderErrorBoundary-DgYrYlQR.js +0 -23
  312. package/dist/client/assets/ScheduledTasksSettings-CvbQDrJp.js +0 -6
  313. package/dist/client/assets/SelectScrollUpArrow-Dj2om6Qx.js +0 -2
  314. package/dist/client/assets/ThreadTerminalDrawer-DcYWT4k2.js +0 -5
  315. package/dist/client/assets/TooltipProvider-BzOo4iyi.js +0 -2
  316. package/dist/client/assets/_chat-DoDgVLYz.js +0 -47
  317. package/dist/client/assets/_chat.pull-requests-0Ce1mGUC.js +0 -2
  318. package/dist/client/assets/assets-lJdcWn_Q.js +0 -2
  319. package/dist/client/assets/connect-agent-DsQQcex2.js +0 -2
  320. package/dist/client/assets/diffPanelStore-B-hQEy6C.js +0 -2
  321. package/dist/client/assets/entities-CpJdh0W5.js +0 -2
  322. package/dist/client/assets/fold-vertical-BscQ96iN.js +0 -2
  323. package/dist/client/assets/index-BWKkBtFt.js +0 -3
  324. package/dist/client/assets/main-C8b9a0ht.js +0 -37
  325. package/dist/client/assets/main-CCH0X0zL.css +0 -2
  326. package/dist/client/assets/mediaReference-BIsAfUoY.js +0 -2
  327. package/dist/client/assets/number-field-D6t0GpAB.js +0 -2
  328. package/dist/client/assets/openFileInPreview-DFpXOfx7.js +0 -2
  329. package/dist/client/assets/previewMiniPlayerStore-oJw0qrRM.js +0 -2
  330. package/dist/client/assets/primary-B0bbGdiR.js +0 -2
  331. package/dist/client/assets/primaryCloudLinkState-B6CxZwAR.js +0 -2
  332. package/dist/client/assets/projectFilesQueryState-DpLF9eJd.js +0 -2
  333. package/dist/client/assets/providerSkills-yqPKKW6i.js +0 -2
  334. package/dist/client/assets/pullRequests-u-PJpGXV.js +0 -2
  335. package/dist/client/assets/queries-DDAXRF4r.js +0 -2
  336. package/dist/client/assets/query-DpmTmXUV.js +0 -2
  337. package/dist/client/assets/radio-group-DSfZzUu8.js +0 -2
  338. package/dist/client/assets/relay-CnLeC-mg.js +0 -2
  339. package/dist/client/assets/runtime-DUPVFypn.js +0 -7
  340. package/dist/client/assets/server-BYnv0CK4.js +0 -2
  341. package/dist/client/assets/session-BryEqNW-.js +0 -2
  342. package/dist/client/assets/session-logic-DZfPxiBF.js +0 -26
  343. package/dist/client/assets/settings.archived-BtKfrhpi.js +0 -2
  344. package/dist/client/assets/settings.connections-CHawbHDz.js +0 -2
  345. package/dist/client/assets/settings.diagnostics-BFlcsuN0.js +0 -2
  346. package/dist/client/assets/settings.integrations-CpUf4-MX.js +0 -2
  347. package/dist/client/assets/settings.plugins-B6My9wD7.js +0 -5
  348. package/dist/client/assets/settings.projects-hrhEEIli.js +0 -4
  349. package/dist/client/assets/settings.providers-BKeGnq6G.js +0 -3
  350. package/dist/client/assets/settings.source-control-B6eUVvNg.js +0 -2
  351. package/dist/client/assets/settingsLayout-BijX6mlS.js +0 -3
  352. package/dist/client/assets/sourceControlClients-CG8qRQgm.js +0 -2
  353. package/dist/client/assets/src-BZzGU-vc.js +0 -15
  354. package/dist/client/assets/terminal-links-FD1wyGOp.js +0 -2
  355. package/dist/client/assets/terminalSessions-D1m7FXoa.js +0 -2
  356. package/dist/client/assets/uiStateStore-B0Z02qoV.js +0 -2
  357. package/dist/client/assets/unfold-vertical-DeuiNAAp.js +0 -2
  358. package/dist/client/assets/useHandleNewThread-Cmiu3y4G.js +0 -2
  359. package/dist/client/assets/useSettings-C6RmJr-q.js +0 -3
  360. package/dist/client/assets/utils-Cs97wR6T.js +0 -24
  361. package/dist/client/assets/vcsRefInvalidation-CAa5en8i.js +0 -2
  362. package/dist/client/assets/welcome-BRX7e-eN.js +0 -2
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { $ as forEach, Ac as getOrUndefined, Al as assignProperty, As as empty, Au as pipe, Bc as some, Br as launch, Bt as promise, C as catchTag, Ca as pretty, Cc as flatten, Cn as tryPromise, Dc as getOrElse, Dt as match$2, Du as identity, Ec as fromUndefinedOr, Es as Prototype, F as exit, Fs as findFirstIndex, G as findFirst$1, Go as fromInput, Gr as succeed$3, Hr as mergeAll, Ht as provideContext, I as fail, Ir as effect, Is as findLast, It as option, Js as map$4, Kt as raceFirst, L as failCause, Lc as match$1, Lt as orDie, Mn as void_, Mt as onError, Nc as isSome, Nu as pipeArguments, Oc as getOrNull, P as ensuring, Ps as findFirst, Rc as none, Ri as isFailure, Rr as effectDiscard, Rt as orElseSucceed, Sl as format, Sn as timeoutOrElse, Ss as make$5, St as map$3, T as catch_, Tt as mapError, Tu as dual, Ur as provide$1, Us as isReadonlyArrayNonEmpty, Ut as provideService, Vn as withSpan, Vr as merge, Vt as provide, W as filterOrFail, Wo as format$1, Wr as provideMerge, X as fn, Xl as compose, Xr as unwrap, Ys as match, Yt as result, Z as fnUntraced, Zl as hasProperty, Zs as reduce, a as all, ac as fail$1, an as scoped, as as seconds, au as isNotUndefined, b as catchFilter, bc as filter, bn as timeout, c as annotateLogs, cs as toMillis, ct as ignore, di as MinimumLogLevel, dn as succeedNone, es as millis, f as asVoid, fc as isSuccess$1, fn as succeedSome, fs as Reference, ft as isEffect, gc as succeed$2, h as callback, hn as tap, hs as empty$1, ht as logDebug, jc as isNone, kr as currentTimeMillis, ln as sleep, ls as toMinutes, mn as sync, mt as log, n as acquireRelease, o as andThen, p as cached, pn as suspend, ps as Service, q as flatMap$1, r as acquireUseRelease, sn as service, st as gen, u as as, un as succeed$1, ut as interrupt, vn as tapError, w as catchTags, wn as try_, x as catchIf, xc as firstSomeOf, xn as timeoutOption, yc as exists, yt as logWarning, zc as orElse, zi as isSuccess } from "./Effect-_Rz7VLdg.mjs";
4
- import { A as NullOr, B as String$6, C as Literals$2, Et as encodeSync, Fr as value, H as Struct, I as Record, J as TrueLiterals, Lt as isGreaterThanOrEqualTo, Nt as is, Pr as make$6, Qr as formatIso, S as Literal, Si as taggedEnum, Tt as encodeEffect, W as TaggedError, Z as URLFromString, _ as Finite, a as BooleanLiterals, bt as decodeUnknownExit, d as Duration, dr as transformEffect, dt as check, en as makeFilter, fn as toCodecStringTree, g as FalseLiterals, hi as toUtc, ii as makeUnsafe, in as optionalKey, j as Number$2, jt as fromJsonString, kn as assign, n as ArraySchema, nt as Union, oi as now, pn as toEncoded, r as Boolean$4, ri as make$7, rn as optional$3, rt as Unknown, u as Defect, v as FiniteFromString, vt as decodeTo, wr as InvalidValue$1, xt as decodeUnknownOption, y as Int$5, yt as decodeUnknownEffect, z as SchemaError } from "./Schema-APnY3Ozr.mjs";
5
- import { $c as schema, $s as CLI_RELEASE_CHANNELS, Ao as PinnedRuntimeInstallError, Bc as Int$6, Br as fromLenientJson, Co as SERVICE_STOP_MARKER_FILE, Cr as DEFAULT_PORT, Do as parseServiceState, Dr as ensureServerDirectories, En as runServicePreflight, Eo as isExactServiceVersion, Er as deriveServerPaths, Fo as pinnedRuntimeVersionsDir, Ga as UNPUBLISHABLE_THEME_IDS, Gr as NetService, Ha as BUILT_IN_THEME_IDS, Hr as load, Ic as Crypto, Il as updateAndGet, Io as ProcessRunner, It as layer$19, Jc as URL$1, Jr as layer$9, Kc as Redacted$3, Kr as layer$24, Lo as layer$12, Lr as decodeJsonResult, Mo as launcherOwnsVersionsDir, Mr as parsePersistedServerObservabilitySettings, No as pinnedRuntimeCommand, Ol as get, Oo as serviceStateActiveVersion, Or as layer$14, Pn as layer$17, Po as pinnedRuntimePaths, Pt as layer$18, Qc as option$1, Qr as layer$11, Qs as CLI_RELEASE_BASE_URL_ENV, Qt as layer$22, R as ProjectService, Rc as Boolean$5, Sc as SqlClient, So as SERVICE_STATE_FILE, Sr as writeFileStringAtomically, To as decodeServiceLauncherChildMessage, Tr as ServerConfig, Ur as none$1, Vc as LogLevel$1, Vs as isCommandAvailable, Wc as Port, Wr as resolveSignalEndpoint, Xc as map$5, Xn as CLOUD_LINKED_USER_ID, Xs as make$8, Yc as all$1, Zc as mapEffect$1, Zn as CLOUD_LINK_REVOKED, Zs as ChildProcessSpawner, Zt as layer$20, _c as Terminal, _o as void_$1, _r as ServerSecretStore, bn as layer$16, bo as SERVICE_LAUNCHER_CONTEXT_ENV, br as layer$15, cr as isAgentActivityPublishingEnabledValue, cs as DEFAULT_SIGNAL_EXPORT, dc as IsExecutable, dr as resolveCliCommand, ec as cliReleaseChannelIndexUrl, el as withDefault$2, en as WorkspacePaths, er as PUBLISH_AGENT_ACTIVITY_SECRET, fc as Platform, gc as QuitError, gn as layer$23, go as findOneOption, hn as make$9, ho as findAll, ic as Architecture, jl as make$10, jo as ensurePinnedRuntimeInstalled, jr as resolveStaticDir, ko as serviceStateHasPendingUpdate, kr as make$11, ls as OtlpHeadersFromString, mc as WorkingDirectory, ml as HttpClient, oc as Environment, on as layer$21, pc as UserId, pr as resolveRootCliCommand, qc as String$7, qr as ProjectionMaintenanceV2, qs as resolveSpawnCommand, rc as layer$13, rr as RELAY_URL_SECRET, sc as ExecutablePath, so as layer$10, tc as cliReleaseChannelOf, uc as InvokedAs, us as OtlpProtocol, vc as isQuitError, vo as layer$8, wc as isSqlError, wo as compareExactServiceVersions, wr as RuntimeMode, xo as SERVICE_RESTART_PENDING_FILE, xr as version, yc as Stdio, yn as ServerEnvironmentIdentity, zc as ConfigError, zr as fromJsonStringPretty } from "./ProjectCloneTracker-DAE46hjz.mjs";
6
- import { Di as OrchestratorMcpThreadReadResult, Gr as AgentAssetKind, Hr as AgentAsset, Hs as RelayOkResponse, Jr as AgentAssetWriteInput, Kr as AgentAssetListFilter, Ku as serve, Ma as DATABASE_COMPACTION_RECOMMENDED_BYTES, Nf as isHttpClientError, Op as AuthRelayReadScope, Pd as empty$2, Qd as filterStatusOk, Rd as jsonUnsafe, Rm as AuthSessionId, Sd as Path, Ti as OrchestratorMcpThreadListResult, Ur as AgentAssetFiles, Vr as AGENT_ASSET_TOTAL_MAX_BYTES, Vu as add, Wr as AgentAssetId, Wu as params, Xi as EnvironmentThemeFile, Yf as FileSystem, Yr as agentAssetTotalBytes, Yu as addressFormattedWith, Zi as EnvironmentThemeId, Zm as EnvironmentId, _h as ThreadId, ah as PositiveInt, ap as ExecutionEnvironmentDescriptor, bs as EnvironmentHttpCommonError, cf as bearerToken, cs as DesktopAppActivationResponse, fi as OrchestratorMcpFailure, fs as DesktopBackendBootstrap, gf as get$1, hf as del, if as schemaBodyJson, ih as PortSchema, ji as OrchestratorMcpThreadWaitResult, jp as AuthStandardClientScopes, js as formatConnectReachable, ki as OrchestratorMcpThreadSendResult, kp as AuthRelayWriteScope, na as environmentThemeFileHasColors, oh as ProjectId, ph as RunId, qm as CommandId, qr as AgentAssetName, sd as HttpServerRequest, ss as DesktopAppActivationErrorCode, t as sha256, vh as TrimmedNonEmptyString, vs as EnvironmentHttpApi, xp as AuthMcpClientAccess, yp as AuthGrantScope } from "./sha2-9FUhed4s.mjs";
7
- import { Gn as round, Un as Order, Y as mkString, bn as take, l as decodeText } from "./Stream-CJtpwu3-.mjs";
8
- import { $ as readCliDesiredLinkMode, An as errorExitCode, At as isLoopbackHost$1, B as deviceAuthorizationLogin, Ct as clearPersistedServerRuntimeState, Dt as buildPairingUrl, Et as readPersistedServerRuntimeState, Ft as EnvironmentAuth, H as hasCloudPublicConfig, I as readTailscaleStatus, It as INTERNAL_ADMINISTRATIVE_BOOTSTRAP_SUBJECT, K as layer$27, L as CloudCliAuthorizationError, Ln as error, Mn as makeRunMain, N as ensureTailscaleServe, Nt as renderTerminalQrCode, O as RELAY_CLIENT_LOG_FILE, Pt as resolveHeadlessConnectionString, Q as readCliDesiredCloudLink, R as CloudCliTokenManager, Rn as log$1, T as formatReachabilityFailure, U as relayUrlConfig, V as layer$26, X as clearPersistedCloudLink, Xt as layerRuntime, Z as dropRevokedCloudLink, _ as layer$31, _t as sandboxDisabled, at as layerCloudflared, bt as layer$25, c as readPublishedThemes, ct as DEBIAN_PACKAGES, d as projectMutationOperation, dt as PreviewBrowserRootError, et as setCliDesiredCloudLink, f as acquireServerOwnership, g as HubLink, gt as sandboxBlocked, h as layer$30, ht as missingLibraries, i as toRotatedTracePaths, in as make$12, it as RelayClient, j as buildTailscaleHttpsBaseUrl, jn as errorReported, jt as isWildcardHost, kt as formatHostForUrl, l as readThemeFileGuarded, m as layer$29, nn as layerConfig, o as MAX_THEME_FILE_BYTES, ot as APPARMOR_PROFILE, p as AssetSync, pt as SETUP_SUBCOMMAND, q as layer$28, r as streamTraceFileLines, rn as fromRecord, rt as withRelayClientTracing, st as APPARMOR_PROFILE_PATH, wt as isProcessAlive, x as filterRelayResponse, xn as resolveBaseDir, y as layerHeadlessRelayClient, yn as expandHomePath, yt as PeerLinks, z as CloudCliTokenManagerError, zn as warn } from "./TraceDiagnostics-CeQ-TvdA.mjs";
9
- import { i as runAcpMcpCliFastPath, r as mcpToolSession } from "./AcpMcpStdioBridge-4vUttgH1.mjs";
3
+ import { $ as forEach, $l as hasProperty, $s as reduce, Ac as getOrNull, At as matchEffect, Bc as none, Br as launch, Bt as promise, C as catchTag, Cc as firstSomeOf, Cn as tryPromise, Cs as make$6, Ds as Prototype, Dt as match$2, Du as dual, F as exit, Fc as isSome, Fs as findFirst, Fu as pipeArguments, G as findFirst$1, Go as format$1, Gr as succeed$3, Gs as isReadonlyArrayNonEmpty, Hc as some, Hr as mergeAll, Ht as provideContext, I as fail, Ir as effect, Is as findFirstIndex, It as option, Ko as fromInput, Kt as raceFirst, L as failCause, Ls as findLast, Lt as orDie, Mc as getOrUndefined, Ml as assignProperty, Mn as void_, Mt as onError, Mu as pipe, Nc as isNone, Oc as fromUndefinedOr, P as ensuring, Ql as compose, Ri as isFailure, Rr as effectDiscard, Rt as orElseSucceed, Sc as filter, Sn as timeoutOrElse, St as map$3, T as catch_, Tc as flatten, Tt as mapError, Ur as provide$1, Ut as provideService, Vc as orElse, Vn as withSpan, Vr as merge, Vt as provide, W as filterOrFail, Wr as provideMerge, X as fn, Xr as unwrap, Xs as map$4, Yt as result, Z as fnUntraced, Zs as match, a as all, an as scoped, b as catchFilter, bn as timeout, c as annotateLogs, ct as ignore, di as MinimumLogLevel, dn as succeedNone, f as asVoid, fn as succeedSome, ft as isEffect, gs as empty$1, h as callback, hn as tap, ht as logDebug, js as empty, kc as getOrElse, kr as currentTimeMillis, ku as identity, ln as sleep, ls as toMillis, mc as isSuccess$1, mn as sync, ms as Service, mt as log, n as acquireRelease, o as andThen, os as seconds, p as cached, pn as suspend, ps as Reference, q as flatMap$1, r as acquireUseRelease, sc as fail$1, sn as service, st as gen, su as isNotUndefined, ts as millis, u as as, un as succeed$1, us as toMinutes, ut as interrupt, vc as succeed$2, vn as tapError, w as catchTags, wa as pretty, wl as format, wn as try_, x as catchIf, xc as exists, xn as timeoutOption, yt as logWarning, zc as match$1, zi as isSuccess } from "./Effect-BqRgldaH.mjs";
4
+ import { A as NullOr, B as String$6, C as Literals$3, Et as encodeSync, Fr as value, H as Struct, I as Record, J as TrueLiterals, Lt as isGreaterThanOrEqualTo, Nt as is, Pr as make$7, Qr as formatIso, S as Literal, Si as taggedEnum, Tt as encodeEffect, W as TaggedError, Z as URLFromString, _ as Finite, a as BooleanLiterals, bt as decodeUnknownExit, d as Duration, dr as transformEffect, dt as check, en as makeFilter, fn as toCodecStringTree, g as FalseLiterals, hi as toUtc, ii as makeUnsafe, in as optionalKey, j as Number$2, jt as fromJsonString, kn as assign, n as ArraySchema, nt as Union, oi as now, pn as toEncoded, r as Boolean$4, ri as make$8, rn as optional$3, rt as Unknown, u as Defect, v as FiniteFromString, vt as decodeTo, wr as InvalidValue$1, xt as decodeUnknownOption, y as Int$5, yt as decodeUnknownEffect, z as SchemaError } from "./Schema-CkGB1Dgx.mjs";
5
+ import { $c as LogLevel$1, $r as layer$9, $s as resolveSpawnCommand, Ao as compareExactServiceVersions, Ar as ServerConfig, Bl as get, Bo as pinnedRuntimePaths, Cc as Terminal, Co as void_$1, Do as SERVICE_RESTART_PENDING_FILE, Dr as writeFileStringAtomically, El as HttpClient, Eo as SERVICE_LAUNCHER_CONTEXT_ENV, Er as version, Fo as serviceStateHasPendingUpdate, Gr as fromLenientJson, Ho as ProcessRunner, Hr as decodeJsonResult, Ic as isSqlError, Io as PinnedRuntimeInstallError, Ir as resolveStaticDir, Ja as BUILT_IN_THEME_IDS, Jc as Crypto, Jr as none$1, Lo as ensurePinnedRuntimeInstalled, Lr as parsePersistedServerObservabilitySettings, Mo as isExactServiceVersion, Mr as ensureServerDirectories, No as parseServiceState, Nr as layer$14, Oo as SERVICE_STATE_FILE, Or as DEFAULT_PORT, Pc as SqlClient, Po as serviceStateActiveVersion, Pr as make$12, Qc as Int$6, Qr as ProjectionMaintenanceV2, Ro as launcherOwnsVersionsDir, Sc as QuitError, So as findOneOption, Sr as ServerSecretStore, Tc as Stdio, Tn as layer$16, Tr as layer$15, U as ProjectService, Ul as make$11, Uo as layer$12, Vo as pinnedRuntimeVersionsDir, Vt as layer$19, Wr as fromJsonStringPretty, Xc as Boolean$5, Xr as NetService, Yr as resolveSignalEndpoint, Za as UNPUBLISHABLE_THEME_IDS, Zc as ConfigError, Zr as layer$24, _c as IsExecutable, ac as CLI_RELEASE_CHANNELS, al as String$7, an as WorkspacePaths, ar as PUBLISH_AGENT_ACTIVITY_SECRET, bc as WorkingDirectory, bn as make$10, cl as map$5, cr as RELAY_URL_SECRET, dl as schema, dn as layer$21, fc as Environment, fl as withDefault$2, gc as InvokedAs, gr as resolveCliCommand, gs as OtlpProtocol, hs as OtlpHeadersFromString, ic as CLI_RELEASE_BASE_URL_ENV, il as Redacted$3, jn as runServicePreflight, jo as decodeServiceLauncherChildMessage, jr as deriveServerPaths, ko as SERVICE_STOP_MARKER_FILE, kr as RuntimeMode, lc as layer$13, ll as mapEffect$1, ms as DEFAULT_SIGNAL_EXPORT, nc as make$9, nl as Port, nn as layer$20, nr as CLOUD_LINK_REVOKED, oc as cliReleaseChannelIndexUrl, ol as URL$1, pc as ExecutablePath, po as layer$10, pr as isAgentActivityPublishingEnabledValue, ql as updateAndGet, qr as load, qs as isCommandAvailable, rc as ChildProcessSpawner, ri as layer$11, rn as layer$22, sc as cliReleaseChannelOf, sl as all$1, t as LSOF_LOCAL_HOST_TOKENS, tr as CLOUD_LINKED_USER_ID, uc as Architecture, ul as option$1, vc as Platform, vr as resolveRootCliCommand, wc as isQuitError, wn as ServerEnvironmentIdentity, wo as layer$8, xn as layer$23, xo as findAll, yc as UserId, zn as layer$17, zo as pinnedRuntimeCommand, zt as layer$18 } from "./preview-C_h8Tda3.mjs";
6
+ import { Di as OrchestratorMcpThreadReadResult, Gr as AgentAssetKind, Hr as AgentAsset, Hs as RelayOkResponse, Jr as AgentAssetWriteInput, Kr as AgentAssetListFilter, Ku as serve, Ma as DATABASE_COMPACTION_RECOMMENDED_BYTES, Nf as isHttpClientError, Op as AuthRelayReadScope, Pd as empty$2, Qd as filterStatusOk, Rd as jsonUnsafe, Rm as AuthSessionId, Sd as Path, Ti as OrchestratorMcpThreadListResult, Ur as AgentAssetFiles, Vr as AGENT_ASSET_TOTAL_MAX_BYTES, Vu as add, Wr as AgentAssetId, Wu as params, Xi as EnvironmentThemeFile, Yf as FileSystem, Yr as agentAssetTotalBytes, Yu as addressFormattedWith, Zi as EnvironmentThemeId, Zm as EnvironmentId, _h as ThreadId, ah as PositiveInt, ap as ExecutionEnvironmentDescriptor, bs as EnvironmentHttpCommonError, cf as bearerToken, cs as DesktopAppActivationResponse, fi as OrchestratorMcpFailure, fs as DesktopBackendBootstrap, gf as get$1, hf as del, if as schemaBodyJson, ih as PortSchema, ji as OrchestratorMcpThreadWaitResult, jp as AuthStandardClientScopes, js as formatConnectReachable, ki as OrchestratorMcpThreadSendResult, kp as AuthRelayWriteScope, na as environmentThemeFileHasColors, oh as ProjectId, ph as RunId, qm as CommandId, qr as AgentAssetName, sd as HttpServerRequest, ss as DesktopAppActivationErrorCode, t as sha256, vh as TrimmedNonEmptyString, vs as EnvironmentHttpApi, xp as AuthMcpClientAccess, yp as AuthGrantScope } from "./sha2-oCwRxj9g.mjs";
7
+ import { Gn as round, Un as Order, Y as mkString, bn as take, l as decodeText } from "./Stream-DZTo5F3N.mjs";
8
+ import { $ as readCliDesiredLinkMode, An as errorExitCode, At as isLoopbackHost$1, B as deviceAuthorizationLogin, Ct as clearPersistedServerRuntimeState, Dt as buildPairingUrl, Et as readPersistedServerRuntimeState, Ft as EnvironmentAuth, H as hasCloudPublicConfig, I as readTailscaleStatus, It as INTERNAL_ADMINISTRATIVE_BOOTSTRAP_SUBJECT, K as layer$27, L as CloudCliAuthorizationError, Ln as error, Mn as makeRunMain, N as ensureTailscaleServe, Nt as renderTerminalQrCode, O as RELAY_CLIENT_LOG_FILE, Pt as resolveHeadlessConnectionString, Q as readCliDesiredCloudLink, R as CloudCliTokenManager, Rn as log$1, T as formatReachabilityFailure, U as relayUrlConfig, V as layer$26, X as clearPersistedCloudLink, Xt as layerRuntime, Z as dropRevokedCloudLink, _ as layer$31, _t as sandboxDisabled, at as layerCloudflared, bt as layer$25, c as readPublishedThemes, ct as DEBIAN_PACKAGES, d as projectMutationOperation, dt as PreviewBrowserRootError, et as setCliDesiredCloudLink, f as acquireServerOwnership, g as HubLink, gt as sandboxBlocked, h as layer$30, ht as missingLibraries, i as toRotatedTracePaths, in as make$13, it as RelayClient, j as buildTailscaleHttpsBaseUrl, jn as errorReported, jt as isWildcardHost, kt as formatHostForUrl, l as readThemeFileGuarded, m as layer$29, nn as layerConfig, o as MAX_THEME_FILE_BYTES, ot as APPARMOR_PROFILE, p as AssetSync, pt as SETUP_SUBCOMMAND, q as layer$28, r as streamTraceFileLines, rn as fromRecord, rt as withRelayClientTracing, st as APPARMOR_PROFILE_PATH, wt as isProcessAlive, x as filterRelayResponse, xn as resolveBaseDir, y as layerHeadlessRelayClient, yn as expandHomePath, yt as PeerLinks, z as CloudCliTokenManagerError, zn as warn } from "./TraceDiagnostics-BU8mTsuy.mjs";
9
+ import { i as runAcpMcpCliFastPath, r as mcpToolSession } from "./AcpMcpStdioBridge-DxIZyDJz.mjs";
10
10
  import * as NodeFS from "node:fs";
11
11
  import * as NodeOS from "node:os";
12
12
  import * as NodePath from "node:path";
@@ -813,7 +813,7 @@ const Choice = (choices) => {
813
813
  * @category constructors
814
814
  * @since 4.0.0
815
815
  */
816
- const Redacted$2 = /*#__PURE__*/ makePrimitive("Redacted", (value) => succeed$1(make$6(value)));
816
+ const Redacted$2 = /*#__PURE__*/ makePrimitive("Redacted", (value) => succeed$1(make$7(value)));
817
817
  /**
818
818
  * Gets a human-readable type name for a primitive.
819
819
  *
@@ -1318,7 +1318,7 @@ const map$2 = /*#__PURE__*/ dual(2, (self, f) => flatMap(self, (a) => succeed(f(
1318
1318
  * @category constructors
1319
1319
  * @since 4.0.0
1320
1320
  */
1321
- const Password = (options) => basePrompt(options, "password").pipe(map$2(make$6));
1321
+ const Password = (options) => basePrompt(options, "password").pipe(map$2(make$7));
1322
1322
  /**
1323
1323
  * Runs a prompt by reading terminal input and rendering prompt frames until the
1324
1324
  * prompt submits a value.
@@ -2913,7 +2913,7 @@ const ChoiceWithValue$1 = (kind, name, choices) => makeSingle({
2913
2913
  * @category constructors
2914
2914
  * @since 4.0.0
2915
2915
  */
2916
- const Literals$1 = (kind, name, choices) => {
2916
+ const Literals$2 = (kind, name, choices) => {
2917
2917
  const mappedChoices = choices.map((value) => [value, value]);
2918
2918
  return ChoiceWithValue$1(kind, name, mappedChoices);
2919
2919
  };
@@ -2981,7 +2981,7 @@ const FLAG_DASH_REGEXP = /^-+/;
2981
2981
  * @category combinators
2982
2982
  * @since 4.0.0
2983
2983
  */
2984
- const withAlias$1 = /*#__PURE__*/ dual(2, (self, alias) => {
2984
+ const withAlias$2 = /*#__PURE__*/ dual(2, (self, alias) => {
2985
2985
  return transformSingle(self, (single) => makeSingle({
2986
2986
  ...single,
2987
2987
  aliases: [...single.aliases, alias.replace(FLAG_DASH_REGEXP, "")]
@@ -3528,6 +3528,23 @@ const String$2 = (name) => String$3(argumentKind, name);
3528
3528
  */
3529
3529
  const Int$1 = (name) => Int$2(argumentKind, name);
3530
3530
  /**
3531
+ * Creates a positional choice argument.
3532
+ *
3533
+ * **Example** (Creating a choice argument)
3534
+ *
3535
+ * ```ts import.meta.vitest
3536
+ * import { Argument } from "effect/cli"
3537
+ *
3538
+ * const environment = Argument.Literals("environment", ["dev", "staging", "prod"])
3539
+ * environment.kind // => "argument"
3540
+ * ```
3541
+ *
3542
+ * @stability unstable
3543
+ * @category constructors
3544
+ * @since 4.0.0
3545
+ */
3546
+ const Literals$1 = (name, choices) => Literals$2(argumentKind, name, choices);
3547
+ /**
3531
3548
  * Makes a positional argument optional.
3532
3549
  *
3533
3550
  * **Example** (Making an argument optional)
@@ -4864,7 +4881,7 @@ const ChoiceWithValue = (name, choices) => ChoiceWithValue$1(flagKind, name, cho
4864
4881
  * @category constructors
4865
4882
  * @since 4.0.0
4866
4883
  */
4867
- const Literals = (name, literals) => Literals$1(flagKind, name, literals);
4884
+ const Literals = (name, literals) => Literals$2(flagKind, name, literals);
4868
4885
  /**
4869
4886
  * Creates a string flag whose parsed value is wrapped in `Redacted.Redacted` so
4870
4887
  * stringification and logging redact the value.
@@ -4941,7 +4958,7 @@ const Redacted = (name) => Redacted$1(flagKind, name);
4941
4958
  * @category aliasing
4942
4959
  * @since 4.0.0
4943
4960
  */
4944
- const withAlias = /*#__PURE__*/ dual(2, (self, alias) => withAlias$1(self, alias));
4961
+ const withAlias$1 = /*#__PURE__*/ dual(2, (self, alias) => withAlias$2(self, alias));
4945
4962
  /**
4946
4963
  * Adds a description to a flag for help documentation.
4947
4964
  *
@@ -5741,7 +5758,7 @@ let settingIdCounter = 0;
5741
5758
  * @since 4.0.0
5742
5759
  */
5743
5760
  const Help = /*#__PURE__*/ Action({
5744
- flag: /*#__PURE__*/ Boolean$1("help").pipe(/*#__PURE__*/ withAlias("h"), /*#__PURE__*/ withDescription$1("Show help information"), /*#__PURE__*/ withDefault(false)),
5761
+ flag: /*#__PURE__*/ Boolean$1("help").pipe(/*#__PURE__*/ withAlias$1("h"), /*#__PURE__*/ withDescription$1("Show help information"), /*#__PURE__*/ withDefault(false)),
5745
5762
  run: /*#__PURE__*/ fnUntraced(function* (_, { builtIns, command, commandPath }) {
5746
5763
  const formatter = yield* Formatter;
5747
5764
  const helpDoc = yield* getHelpForCommandPath(command, commandPath, builtIns);
@@ -5760,7 +5777,7 @@ const Help = /*#__PURE__*/ Action({
5760
5777
  * @since 4.0.0
5761
5778
  */
5762
5779
  const Version = /*#__PURE__*/ Action({
5763
- flag: /*#__PURE__*/ Boolean$1("version").pipe(/*#__PURE__*/ withAlias("v"), /*#__PURE__*/ withDescription$1("Show version information"), /*#__PURE__*/ withDefault(false)),
5780
+ flag: /*#__PURE__*/ Boolean$1("version").pipe(/*#__PURE__*/ withAlias$1("v"), /*#__PURE__*/ withDescription$1("Show version information"), /*#__PURE__*/ withDefault(false)),
5764
5781
  run: /*#__PURE__*/ fnUntraced(function* (_, { command, version }) {
5765
5782
  const formatter = yield* Formatter;
5766
5783
  yield* log$1(formatter.formatVersion(command.name, version));
@@ -6789,7 +6806,7 @@ const isCommand = (u) => hasProperty(u, TypeId);
6789
6806
  * @category constructors
6790
6807
  * @since 4.0.0
6791
6808
  */
6792
- const make$4 = (name, config, handler) => {
6809
+ const make$5 = (name, config, handler) => {
6793
6810
  const parsedConfig = parseConfig(config ?? {});
6794
6811
  return makeCommand({
6795
6812
  name,
@@ -7064,6 +7081,22 @@ const withDescription = /*#__PURE__*/ dual(2, (self, description) => makeCommand
7064
7081
  description
7065
7082
  }));
7066
7083
  /**
7084
+ * Sets an alias for a command.
7085
+ *
7086
+ * **Details**
7087
+ *
7088
+ * Aliases are accepted as alternate subcommand names during parsing and are
7089
+ * shown in help output as `name, alias`.
7090
+ *
7091
+ * @stability unstable
7092
+ * @category combinators
7093
+ * @since 4.0.0
7094
+ */
7095
+ const withAlias = /*#__PURE__*/ dual(2, (self, alias) => makeCommand({
7096
+ ...toImpl(self),
7097
+ alias
7098
+ }));
7099
+ /**
7067
7100
  * Omits a subcommand from parent help output, shell completions, and
7068
7101
  * "did you mean?" suggestions while keeping it fully invocable by exact name.
7069
7102
  *
@@ -7348,7 +7381,7 @@ const runWith = (command, config) => {
7348
7381
  }
7349
7382
  const services = match$1(logLevel, {
7350
7383
  onNone: () => empty$1(),
7351
- onSome: (level) => make$5(MinimumLogLevel, level)
7384
+ onSome: (level) => make$6(MinimumLogLevel, level)
7352
7385
  });
7353
7386
  yield* provideContext(program, services);
7354
7387
  }, catchFilter((error) => isCliError(error) && error._tag === "ShowHelp" ? succeed$2(error) : fail$1(error), (error) => andThen(showHelp(command, error, config.renderErrors !== false), fail(error))), catchFilter((error) => config.renderErrors !== false && isCliError(error) && error._tag === "UserError" ? succeed$2(error) : fail$1(error), (error) => andThen(showUserError(error), fail(error))), catchFilter((e) => isQuitError(e) ? succeed$2(e) : fail$1(e), (_) => interrupt));
@@ -7648,7 +7681,7 @@ var BootServiceInstallError = class extends TaggedError()("BootServiceInstallErr
7648
7681
  return "Could not set up the P4 Code background service.";
7649
7682
  }
7650
7683
  };
7651
- const BootServiceProblem = Literals$2([
7684
+ const BootServiceProblem = Literals$3([
7652
7685
  "user-manager-unavailable",
7653
7686
  "linger-unavailable",
7654
7687
  "linger-disabled",
@@ -7689,7 +7722,7 @@ var BootServiceDowngradeRefusedError = class extends TaggedError()("BootServiceD
7689
7722
  }
7690
7723
  };
7691
7724
  var BootService = class extends Service()("@p4code/cli/cloud/bootService") {};
7692
- const make$3 = fn("cloud.boot_service.make")(function* (input) {
7725
+ const make$4 = fn("cloud.boot_service.make")(function* (input) {
7693
7726
  const hostExecPath = yield* ExecutablePath;
7694
7727
  const platform = yield* Platform;
7695
7728
  const arch = yield* Architecture;
@@ -7980,7 +8013,7 @@ const make$3 = fn("cloud.boot_service.make")(function* (input) {
7980
8013
  status
7981
8014
  });
7982
8015
  });
7983
- const layer$7 = (input) => effect(BootService, make$3(input));
8016
+ const layer$7 = (input) => effect(BootService, make$4(input));
7984
8017
  // src/persistence/DatabaseMaintenance.ts
7985
8018
  var DatabaseMissingError = class extends TaggedError()("DatabaseMissingError", { path: String$6 }) {
7986
8019
  get message() {
@@ -8059,7 +8092,7 @@ const lockExclusively = (databasePath) => gen(function* () {
8059
8092
  }) : cause));
8060
8093
  yield* sql`COMMIT`;
8061
8094
  });
8062
- const make$2 = gen(function* () {
8095
+ const make$3 = gen(function* () {
8063
8096
  const fs = yield* FileSystem;
8064
8097
  const path = yield* Path;
8065
8098
  const legacyPath = (databasePath) => path.join(path.dirname(databasePath), "state.sqlite");
@@ -8130,7 +8163,7 @@ const make$2 = gen(function* () {
8130
8163
  removeLegacyDatabase
8131
8164
  });
8132
8165
  });
8133
- const layer$6 = effect(DatabaseMaintenance, make$2);
8166
+ const layer$6 = effect(DatabaseMaintenance, make$3);
8134
8167
  // src/bootstrap.ts
8135
8168
  var BootstrapFdStatError = class extends TaggedError()("BootstrapFdStatError", {
8136
8169
  fd: Number$2,
@@ -8286,7 +8319,7 @@ const devUrlFlag = String$1("dev-url").pipe(withSchema(URLFromString), withDescr
8286
8319
  const noBrowserFlag = Boolean$1("no-browser").pipe(withDescription$1("Disable automatic browser opening."), optional);
8287
8320
  const bootstrapFdFlag = Int("bootstrap-fd").pipe(withSchema(Int$5), withDescription$1("Read one-time bootstrap secrets from the given file descriptor."), optional);
8288
8321
  const autoBootstrapProjectFromCwdFlag = Boolean$1("auto-bootstrap-project-from-cwd").pipe(withDescription$1("Create a project for the current working directory on startup when missing."), optional);
8289
- const logWebSocketEventsFlag = Boolean$1("log-websocket-events").pipe(withDescription$1("Emit server-side logs for outbound WebSocket push traffic (equivalent to P4CODE_LOG_WS_EVENTS)."), withAlias("log-ws-events"), optional);
8322
+ const logWebSocketEventsFlag = Boolean$1("log-websocket-events").pipe(withDescription$1("Emit server-side logs for outbound WebSocket push traffic (equivalent to P4CODE_LOG_WS_EVENTS)."), withAlias$1("log-ws-events"), optional);
8290
8323
  const tailscaleServeFlag = Boolean$1("tailscale-serve").pipe(withDescription$1("Configure Tailscale Serve to expose this backend over HTTPS on the Tailnet."), optional);
8291
8324
  const tailscaleServePortFlag$1 = Int("tailscale-serve-port").pipe(withSchema(PortSchema), withDescription$1("HTTPS port for Tailscale Serve when --tailscale-serve is enabled."), optional);
8292
8325
  const traceFileConfig = String$7("P4CODE_TRACE_FILE").pipe(option$1, map$5(getOrUndefined));
@@ -8318,7 +8351,7 @@ const EnvServerConfig = all$1({
8318
8351
  tailscaleServeEnabled: Boolean$5("P4CODE_TAILSCALE_SERVE").pipe(option$1, map$5(getOrUndefined)),
8319
8352
  tailscaleServePort: Port("P4CODE_TAILSCALE_SERVE_PORT").pipe(option$1, map$5(getOrUndefined))
8320
8353
  });
8321
- const DevAuthTokenConfig = Redacted$3("P4CODE_DEV_AUTH_TOKEN").pipe(map$5((token) => make$6(value(token).trim())), mapEffect$1((token) => value(token).length === 0 || value(token).length >= 32 ? succeed$1(token) : fail(new ConfigError(new SchemaError(new InvalidValue$1({ message: "P4CODE_DEV_AUTH_TOKEN must contain at least 32 characters." }))))), option$1, map$5(filter((token) => value(token).length > 0)), map$5(getOrUndefined));
8354
+ const DevAuthTokenConfig = Redacted$3("P4CODE_DEV_AUTH_TOKEN").pipe(map$5((token) => make$7(value(token).trim())), mapEffect$1((token) => value(token).length === 0 || value(token).length >= 32 ? succeed$1(token) : fail(new ConfigError(new SchemaError(new InvalidValue$1({ message: "P4CODE_DEV_AUTH_TOKEN must contain at least 32 characters." }))))), option$1, map$5(filter((token) => value(token).length > 0)), map$5(getOrUndefined));
8322
8355
  const authLocationFlags = {
8323
8356
  baseDir: baseDirFlag$1,
8324
8357
  devUrl: devUrlFlag
@@ -8351,6 +8384,7 @@ const loadPersistedObservabilitySettings = fn(function* (settingsPath) {
8351
8384
  });
8352
8385
  const resolveServerConfig = (flags, cliLogLevel, options) => gen(function* () {
8353
8386
  const { findAvailablePort } = yield* NetService;
8387
+ const selectAutomaticPort = options?.selectAutomaticPort ?? findAvailablePort;
8354
8388
  const path = yield* Path;
8355
8389
  const fs = yield* FileSystem;
8356
8390
  const env = yield* EnvServerConfig;
@@ -8376,7 +8410,7 @@ const resolveServerConfig = (flags, cliLogLevel, options) => gen(function* () {
8376
8410
  onSome: (value) => succeed$1(value),
8377
8411
  onNone: () => {
8378
8412
  if (mode === "desktop") return succeed$1(DEFAULT_PORT);
8379
- return findAvailablePort(DEFAULT_PORT);
8413
+ return selectAutomaticPort(DEFAULT_PORT);
8380
8414
  }
8381
8415
  });
8382
8416
  const devUrl = getOrElse(resolveOptionPrecedence(normalizedFlags.devUrl, fromUndefinedOr(env.devUrl)), () => void 0);
@@ -8573,13 +8607,13 @@ function formatServiceStatus(status, cliVersion) {
8573
8607
  const runServiceCommand = fn("cli.service.run")(function* (flags, run) {
8574
8608
  const logLevel = yield* LogLevel;
8575
8609
  const config = yield* resolveCliAuthConfig(flags, logLevel);
8576
- return yield* run.pipe(provide(layer$5(config)));
8610
+ return yield* run.pipe(provide(merge(layer$5(config), layer$14(config))));
8577
8611
  });
8578
8612
  const serviceReconcileFlags = {
8579
8613
  ...projectLocationFlags,
8580
8614
  allowDowngrade: Boolean$1("allow-downgrade").pipe(withDescription$1("Allow replacing a newer installed service with this older CLI version."), withDefault(false))
8581
8615
  };
8582
- const serviceInstallCommand = make$4("install", serviceReconcileFlags).pipe(withDescription("Install P4 Code as a background service for this user."), withHandler((flags) => runServiceCommand(flags, gen(function* () {
8616
+ const serviceInstallCommand = make$5("install", serviceReconcileFlags).pipe(withDescription("Install P4 Code as a background service for this user."), withHandler((flags) => runServiceCommand(flags, gen(function* () {
8583
8617
  const result = yield* reconcileService({ allowDowngrade: flags.allowDowngrade });
8584
8618
  if (!result.changed) {
8585
8619
  yield* log$1(`P4 Code service is already installed with @p4code/cli@${version}.`);
@@ -8587,7 +8621,7 @@ const serviceInstallCommand = make$4("install", serviceReconcileFlags).pipe(with
8587
8621
  }
8588
8622
  yield* log$1(`${result.previouslyInstalled ? "Updated" : "Installed"} P4 Code service with @p4code/cli@${version}.\nLogs: ${result.plan.logPath}`);
8589
8623
  }))));
8590
- const serviceUpdateCommand = make$4("update", serviceReconcileFlags).pipe(withDescription("Deprecated. Run `p4c update` to move to a newer release."), unlisted, withHandler((flags) => runServiceCommand(flags, gen(function* () {
8624
+ const serviceUpdateCommand = make$5("update", serviceReconcileFlags).pipe(withDescription("Deprecated. Run `p4c update` to move to a newer release."), unlisted, withHandler((flags) => runServiceCommand(flags, gen(function* () {
8591
8625
  yield* log$1("`p4c service update` is deprecated: run `p4c update` to move to a newer release, or `p4c service install` to repair the service. Repairing now.");
8592
8626
  const result = yield* reconcileService({ allowDowngrade: flags.allowDowngrade });
8593
8627
  if (!result.changed) {
@@ -8596,17 +8630,25 @@ const serviceUpdateCommand = make$4("update", serviceReconcileFlags).pipe(withDe
8596
8630
  }
8597
8631
  yield* log$1(`${result.previouslyInstalled ? "Updated" : "Installed"} P4 Code service with @p4code/cli@${version}.\nLogs: ${result.plan.logPath}`);
8598
8632
  }))));
8599
- const serviceRestartCommand = make$4("restart", projectLocationFlags).pipe(withDescription("Restart the background service. Picks up a version installed by `p4c update` that was not restarted at the time."), withHandler((flags) => runServiceCommand(flags, gen(function* () {
8633
+ const serviceRestartCommand = make$5("restart", projectLocationFlags).pipe(withDescription("Restart the background service. Picks up a version installed by `p4c update` that was not restarted at the time."), withHandler((flags) => runServiceCommand(flags, gen(function* () {
8600
8634
  const service = yield* BootService;
8601
8635
  const status = yield* service.status;
8602
8636
  const restarted = yield* service.restart;
8603
8637
  yield* log$1(restarted ? `Restarted the P4 Code service${status.installedVersion === void 0 ? "" : ` on @p4code/cli@${status.installedVersion}`}.` : "P4 Code service is not installed.");
8604
8638
  }))));
8605
- const serviceUninstallCommand = make$4("uninstall", projectLocationFlags).pipe(withDescription("Stop and remove the P4 Code background service."), withHandler((flags) => runServiceCommand(flags, gen(function* () {
8606
- const removed = yield* (yield* BootService).uninstall;
8639
+ const serviceUninstallCommand = make$5("uninstall", projectLocationFlags).pipe(withDescription("Stop and remove the P4 Code background service."), withHandler((flags) => runServiceCommand(flags, gen(function* () {
8640
+ const service = yield* BootService;
8641
+ const path = yield* Path;
8642
+ const { baseDir } = yield* ServerConfig;
8643
+ const installedBaseDir = yield* service.status.pipe(map$3((status) => status.installedBaseDir), orElseSucceed(() => void 0));
8644
+ if (installedBaseDir !== void 0 && path.resolve(installedBaseDir) !== path.resolve(baseDir)) {
8645
+ yield* log$1("The installed service runs another P4 Code home, so it was not removed. Pass its --base-dir.");
8646
+ return;
8647
+ }
8648
+ const removed = yield* service.uninstall;
8607
8649
  yield* log$1(removed ? "Removed the P4 Code service." : "P4 Code service is not installed.");
8608
8650
  }))));
8609
- const serviceStatusCommand = make$4("status", projectLocationFlags).pipe(withDescription("Show whether the P4 Code background service is installed."), withHandler((flags) => runServiceCommand(flags, gen(function* () {
8651
+ const serviceStatusCommand = make$5("status", projectLocationFlags).pipe(withDescription("Show whether the P4 Code background service is installed."), withHandler((flags) => runServiceCommand(flags, gen(function* () {
8610
8652
  const service = yield* BootService;
8611
8653
  yield* log$1(formatServiceStatus(yield* service.status, version));
8612
8654
  }))));
@@ -8645,7 +8687,7 @@ const recoverServiceOnboardingOffer = (offer) => offer.pipe(catchTags({
8645
8687
  BootServiceUpdatePendingError: (error) => warn(`Background setup did not finish: ${error.message}`).pipe(as(false)),
8646
8688
  BootServiceDowngradeRefusedError: (error) => warn(`Background setup did not finish: ${error.message}`).pipe(as(false))
8647
8689
  }));
8648
- const serviceCommand = make$4("service").pipe(withDescription("Manage the P4 Code background service."), withSubcommands([
8690
+ const serviceCommand = make$5("service").pipe(withDescription("Manage the P4 Code background service."), withSubcommands([
8649
8691
  serviceInstallCommand,
8650
8692
  serviceRestartCommand,
8651
8693
  serviceUninstallCommand,
@@ -8706,7 +8748,7 @@ const runDoctor = fn("runDoctor")(function* (databasePath, options) {
8706
8748
  yield* log$1("\nDeleted the database from before 0.1.0.");
8707
8749
  }
8708
8750
  });
8709
- const doctorCommand = make$4("doctor", {
8751
+ const doctorCommand = make$5("doctor", {
8710
8752
  ...projectLocationFlags,
8711
8753
  fix: Boolean$1("fix").pipe(withDescription$1("Apply the recommended repairs without prompting."), withDefault(false)),
8712
8754
  dryRun: Boolean$1("dry-run").pipe(withDescription$1("Show the repairs without changing anything, even with --fix."), withDefault(false))
@@ -8784,9 +8826,9 @@ const runMain = /* @__PURE__ */ makeRunMain(({ fiber, teardown }) => {
8784
8826
  * graph loads; these definitions keep the commands wired for help and for
8785
8827
  * anything that drives the full CLI programmatically.
8786
8828
  */
8787
- const acpMcpBridgeCommand = make$4("acp-mcp-bridge").pipe(withDescription("Bridge P4 Code's MCP endpoint to stdio for ACP agents."), unlisted, withHandler(() => promise(() => runAcpMcpCliFastPath("acp-mcp-bridge", []))));
8829
+ const acpMcpBridgeCommand = make$5("acp-mcp-bridge").pipe(withDescription("Bridge P4 Code's MCP endpoint to stdio for ACP agents."), unlisted, withHandler(() => promise(() => runAcpMcpCliFastPath("acp-mcp-bridge", []))));
8788
8830
  /** Terminal fallback for ACP agents that do not expose injected MCP servers. */
8789
- const acpMcpCallCommand = make$4("acp-mcp-call", {
8831
+ const acpMcpCallCommand = make$5("acp-mcp-call", {
8790
8832
  tool: String$2("tool"),
8791
8833
  argumentsJson: String$2("arguments-json")
8792
8834
  }).pipe(withDescription("Call one P4 Code MCP tool from an ACP agent terminal."), unlisted, withHandler(({ tool, argumentsJson }) => promise(() => runAcpMcpCliFastPath("acp-mcp-call", [tool, argumentsJson]))));
@@ -8907,7 +8949,7 @@ const labelFlag$2 = String$1("label").pipe(withDescription$1("Optional human-rea
8907
8949
  const subjectFlag = String$1("subject").pipe(withDescription$1("Optional session subject."), optional);
8908
8950
  const baseUrlFlag = String$1("base-url").pipe(withSchema(URLFromString.pipe(check(makeFilter((url) => url.protocol === "http:" || url.protocol === "https:", { expected: "an http:// or https:// URL" })))), withDescription$1("Optional public base URL used to print a ready `/pair#token=...` link."), optional);
8909
8951
  const tokenOnlyFlag = Boolean$1("token-only").pipe(withDescription$1("Print only the issued bearer token."), withDefault(false));
8910
- const pairingCreateCommand = make$4("create", {
8952
+ const pairingCreateCommand = make$5("create", {
8911
8953
  ...authLocationFlags,
8912
8954
  scopes: authScopesFlag(AuthStandardClientScopes),
8913
8955
  ttl: ttlFlag$1,
@@ -8926,26 +8968,26 @@ const pairingCreateCommand = make$4("create", {
8926
8968
  });
8927
8969
  yield* log$1(output);
8928
8970
  }), { quietLogs: flags.json })));
8929
- const pairingListCommand = make$4("list", {
8971
+ const pairingListCommand = make$5("list", {
8930
8972
  ...authLocationFlags,
8931
8973
  json: jsonFlag$3
8932
8974
  }).pipe(withDescription("List active client pairing tokens without revealing their secrets."), withHandler((flags) => runWithEnvironmentAuth(flags, (environmentAuth) => gen(function* () {
8933
8975
  const pairingLinks = yield* environmentAuth.listPairingLinks({ excludeSubjects: [INTERNAL_ADMINISTRATIVE_BOOTSTRAP_SUBJECT] });
8934
8976
  yield* log$1(formatPairingCredentialList(pairingLinks, { json: flags.json }));
8935
8977
  }), { quietLogs: flags.json })));
8936
- const pairingRevokeCommand = make$4("revoke", {
8978
+ const pairingRevokeCommand = make$5("revoke", {
8937
8979
  ...authLocationFlags,
8938
8980
  id: String$2("id").pipe(withDescription$2("Pairing credential id to revoke."))
8939
8981
  }).pipe(withDescription("Revoke an active client pairing token."), withHandler((flags) => runWithEnvironmentAuth(flags, (environmentAuth) => gen(function* () {
8940
8982
  const revoked = yield* environmentAuth.revokePairingLink(flags.id);
8941
8983
  yield* log$1(revoked ? `Revoked pairing credential ${flags.id}.\n` : `No active pairing credential found for ${flags.id}.\n`);
8942
8984
  }))));
8943
- const pairingCommand = make$4("pairing").pipe(withDescription("Manage one-time client pairing tokens."), withSubcommands([
8985
+ const pairingCommand = make$5("pairing").pipe(withDescription("Manage one-time client pairing tokens."), withSubcommands([
8944
8986
  pairingCreateCommand,
8945
8987
  pairingListCommand,
8946
8988
  pairingRevokeCommand
8947
8989
  ]));
8948
- const sessionIssueCommand = make$4("issue", {
8990
+ const sessionIssueCommand = make$5("issue", {
8949
8991
  ...authLocationFlags,
8950
8992
  scopes: authScopesFlag(AuthStandardClientScopes),
8951
8993
  ttl: ttlFlag$1,
@@ -8965,26 +9007,26 @@ const sessionIssueCommand = make$4("issue", {
8965
9007
  tokenOnly: flags.tokenOnly
8966
9008
  }));
8967
9009
  }), { quietLogs: flags.json || flags.tokenOnly })));
8968
- const sessionListCommand = make$4("list", {
9010
+ const sessionListCommand = make$5("list", {
8969
9011
  ...authLocationFlags,
8970
9012
  json: jsonFlag$3
8971
9013
  }).pipe(withDescription("List active sessions without revealing bearer tokens."), withHandler((flags) => runWithEnvironmentAuth(flags, (environmentAuth) => gen(function* () {
8972
9014
  const sessions = yield* environmentAuth.listSessions();
8973
9015
  yield* log$1(formatSessionList(sessions, { json: flags.json }));
8974
9016
  }), { quietLogs: flags.json })));
8975
- const sessionRevokeCommand = make$4("revoke", {
9017
+ const sessionRevokeCommand = make$5("revoke", {
8976
9018
  ...authLocationFlags,
8977
9019
  sessionId: String$2("session-id").pipe(withDescription$2("Session id to revoke."), withSchema$1(AuthSessionId))
8978
9020
  }).pipe(withDescription("Revoke an active session."), withHandler((flags) => runWithEnvironmentAuth(flags, (environmentAuth) => gen(function* () {
8979
9021
  const revoked = yield* environmentAuth.revokeSession(flags.sessionId);
8980
9022
  yield* log$1(revoked ? `Revoked session ${flags.sessionId}.\n` : `No active session found for ${flags.sessionId}.\n`);
8981
9023
  }))));
8982
- const sessionCommand = make$4("session").pipe(withDescription("Manage bearer sessions."), withSubcommands([
9024
+ const sessionCommand = make$5("session").pipe(withDescription("Manage bearer sessions."), withSubcommands([
8983
9025
  sessionIssueCommand,
8984
9026
  sessionListCommand,
8985
9027
  sessionRevokeCommand
8986
9028
  ]));
8987
- const authCommand = make$4("auth").pipe(withDescription("Manage the local auth control plane for headless deployments."), withSubcommands([pairingCommand, sessionCommand]));
9029
+ const authCommand = make$5("auth").pipe(withDescription("Manage the local auth control plane for headless deployments."), withSubcommands([pairingCommand, sessionCommand]));
8988
9030
  // src/cli/environment.ts
8989
9031
  /**
8990
9032
  * Links live in this environment's database and secret store, so these
@@ -8998,7 +9040,7 @@ const runWithPeerLinks = fn("environment.runWithPeerLinks")(function* (flags, ru
8998
9040
  const jsonFlag$2 = Boolean$1("json").pipe(withDescription$1("Emit JSON instead of human-readable output."), withDefault(false));
8999
9041
  const encodeLinks = encodeEffect(fromJsonString(ArraySchema(toEncoded(Unknown))));
9000
9042
  const formatLinks = (links) => links.length === 0 ? "No linked environments.\n" : `${links.map((link) => `${link.label} (${link.environmentId})\n ${link.enabled === false ? `paused, ${link.status}` : link.status}, access ${link.access}, expires ${formatIso(link.expiresAt)}\n ${link.urls.join(", ")}${link.lastError === null ? "" : `\n last error: ${link.lastError}`}`).join("\n\n")}\n`;
9001
- const environmentLinkCommand = make$4("link", {
9043
+ const environmentLinkCommand = make$5("link", {
9002
9044
  ...authLocationFlags,
9003
9045
  url: String$2("url").pipe(withDescription$2("Where the other environment answers: its P4 Connect, Tailscale, LAN or loopback address.")),
9004
9046
  alternateUrl: String$1("url").pipe(withDescription$1("Another address for the same environment, tried after the first."), atLeast(0)),
@@ -9013,28 +9055,28 @@ const environmentLinkCommand = make$4("link", {
9013
9055
  });
9014
9056
  yield* log$1(`Linked ${linked.label} (${linked.environmentId}) with ${linked.access} access, until ${formatIso(linked.expiresAt)}.\n`);
9015
9057
  }))));
9016
- const environmentListCommand = make$4("list", {
9058
+ const environmentListCommand = make$5("list", {
9017
9059
  ...authLocationFlags,
9018
9060
  json: jsonFlag$2
9019
9061
  }).pipe(withDescription("List linked environments and whether each answers now."), withHandler((flags) => runWithPeerLinks(flags, (links) => gen(function* () {
9020
9062
  const listed = yield* links.list;
9021
9063
  yield* log$1(flags.json ? `${yield* encodeLinks(listed)}\n` : formatLinks(listed));
9022
9064
  }), { quietLogs: flags.json })));
9023
- const environmentUnlinkCommand = make$4("unlink", {
9065
+ const environmentUnlinkCommand = make$5("unlink", {
9024
9066
  ...authLocationFlags,
9025
9067
  environmentId: String$2("environment-id").pipe(withDescription$2("The linked environment's id, from `p4c environment list`."))
9026
9068
  }).pipe(withDescription("Forget a linked environment here. Revoke it in that environment's Connections to end its session there too."), withHandler((flags) => runWithPeerLinks(flags, (links) => gen(function* () {
9027
9069
  const removed = yield* links.unlink(EnvironmentId.make(flags.environmentId));
9028
9070
  yield* log$1(removed ? `Forgot ${flags.environmentId}. Revoke it in that environment's Connections to end its session there.\n` : `No linked environment ${flags.environmentId}.\n`);
9029
9071
  }))));
9030
- const environmentSetEnabledCommand = (name) => make$4(name, {
9072
+ const environmentSetEnabledCommand = (name) => make$5(name, {
9031
9073
  ...authLocationFlags,
9032
9074
  environmentId: String$2("environment-id").pipe(withDescription$2("The linked environment's id, from `p4c environment list`."))
9033
9075
  }).pipe(withDescription(name === "pause" ? "Pause a link: agents here start nothing new there. Work already running there finishes." : "Resume a paused link, so agents here can work there again."), withHandler((flags) => runWithPeerLinks(flags, (links) => gen(function* () {
9034
9076
  const link = yield* links.setEnabled(EnvironmentId.make(flags.environmentId), name === "resume");
9035
9077
  yield* log$1(`${name === "pause" ? "Paused" : "Resumed"} the link to ${link.label} (${link.environmentId}).\n`);
9036
9078
  }))));
9037
- const environmentCommand = make$4("environment").pipe(withDescription("Link other P4 Code environments, so agents here can work there."), withSubcommands([
9079
+ const environmentCommand = make$5("environment").pipe(withDescription("Link other P4 Code environments, so agents here can work there."), withSubcommands([
9038
9080
  environmentLinkCommand,
9039
9081
  environmentListCommand,
9040
9082
  environmentUnlinkCommand,
@@ -9244,7 +9286,7 @@ const runAppCommand = fn("cli.app")(function* (flags) {
9244
9286
  });
9245
9287
  yield* log$1(`Opened ${workspaceRoot} in P4 Code.`);
9246
9288
  });
9247
- const appCommand = make$4("app", {
9289
+ const appCommand = make$5("app", {
9248
9290
  baseDir: baseDirFlag$1,
9249
9291
  workspaceRoot: String$2("path").pipe(withDescription$2("Project directory. Default: current directory."), optional$1)
9250
9292
  }).pipe(withDescription("Open a project in the running P4 Code desktop app."), withHandler(runAppCommand));
@@ -9271,7 +9313,7 @@ var BrowserSetupStepError = class extends TaggedError()("BrowserSetupStepError",
9271
9313
  };
9272
9314
  /** Runs one setup command, streaming its output, and fails with its exit code. */
9273
9315
  const runStep = fn("browserSetup.runStep")(function* (step, command, args) {
9274
- const exitCode = yield* (yield* ChildProcessSpawner).exitCode(make$8(command, args, {
9316
+ const exitCode = yield* (yield* ChildProcessSpawner).exitCode(make$9(command, args, {
9275
9317
  stdin: "inherit",
9276
9318
  stdout: "inherit",
9277
9319
  stderr: "inherit"
@@ -9292,7 +9334,7 @@ const setupBaseDir = fn("browserSetup.baseDir")(function* (explicit) {
9292
9334
  const env = yield* Environment;
9293
9335
  const raw = getOrUndefined(explicit) ?? env.P4CODE_HOME;
9294
9336
  if (raw !== void 0 || env.SUDO_USER === void 0) return yield* resolveBaseDir(raw);
9295
- const home = (yield* (yield* ChildProcessSpawner).string(make$8("getent", ["passwd", env.SUDO_USER], {
9337
+ const home = (yield* (yield* ChildProcessSpawner).string(make$9("getent", ["passwd", env.SUDO_USER], {
9296
9338
  stdin: "ignore",
9297
9339
  stderr: "ignore"
9298
9340
  })).pipe(orElseSucceed(() => ""))).trim().split(":")[5];
@@ -9301,7 +9343,7 @@ const setupBaseDir = fn("browserSetup.baseDir")(function* (explicit) {
9301
9343
  });
9302
9344
  /** Whether apt has an installable candidate for `name`. */
9303
9345
  const aptOffers = fn("browserSetup.aptOffers")(function* (name) {
9304
- const policy = yield* (yield* ChildProcessSpawner).string(make$8("apt-cache", ["policy", name], {
9346
+ const policy = yield* (yield* ChildProcessSpawner).string(make$9("apt-cache", ["policy", name], {
9305
9347
  stdin: "ignore",
9306
9348
  stderr: "ignore"
9307
9349
  })).pipe(orElseSucceed(() => ""));
@@ -9319,7 +9361,7 @@ const installedBrowser = fn("browserSetup.installedBrowser")(function* (baseDir)
9319
9361
  }
9320
9362
  return none();
9321
9363
  });
9322
- const browserSetupCommand = make$4("setup", { baseDir: baseDirFlag$1 }).pipe(withDescription("Set up this Linux host for P4's browser: allow Chrome's sandbox and install its libraries."), withHandler(({ baseDir }) => gen(function* () {
9364
+ const browserSetupCommand = make$5("setup", { baseDir: baseDirFlag$1 }).pipe(withDescription("Set up this Linux host for P4's browser: allow Chrome's sandbox and install its libraries."), withHandler(({ baseDir }) => gen(function* () {
9323
9365
  if ((yield* Platform) !== "linux") return yield* log$1("Nothing to set up: P4's browser runs as is on this system.");
9324
9366
  const fs = yield* FileSystem;
9325
9367
  const isRoot = (yield* UserId) === 0;
@@ -9359,7 +9401,7 @@ const browserSetupCommand = make$4("setup", { baseDir: baseDirFlag$1 }).pipe(wit
9359
9401
  }
9360
9402
  yield* log$1(rootWarning ?? "This host is ready for P4's browser.");
9361
9403
  })));
9362
- const browserCommand = make$4("browser").pipe(withDescription("Manage P4's headless browser on this host."), withSubcommands([browserSetupCommand]));
9404
+ const browserCommand = make$5("browser").pipe(withDescription("Manage P4's headless browser on this host."), withSubcommands([browserSetupCommand]));
9363
9405
  // src/cli/connect.ts
9364
9406
  const jsonFlag$1 = Boolean$1("json").pipe(withDescription$1("Emit JSON instead of human-readable output."), withDefault(false));
9365
9407
  const isCloudCliTokenManagerError = is(CloudCliTokenManagerError);
@@ -9467,7 +9509,7 @@ const runLiveCloudUnlink = fn("cloud.cli.run_live_unlink")(function* () {
9467
9509
  const runtimeState = yield* readPersistedServerRuntimeState(config.serverRuntimeStatePath);
9468
9510
  if (isNone(runtimeState)) return { status: "not-running" };
9469
9511
  const environmentAuth = yield* EnvironmentAuth;
9470
- const result = yield* exit(withCloudCliSessionToken(environmentAuth, AuthRelayWriteScope, (token) => make$9(EnvironmentHttpApi, { baseUrl: runtimeState.value.origin }).pipe(flatMap$1((client) => client.connect.unlink({ headers: { authorization: `Bearer ${token}` } })), timeout(CLOUD_CLI_LIVE_SERVER_TIMEOUT))));
9512
+ const result = yield* exit(withCloudCliSessionToken(environmentAuth, AuthRelayWriteScope, (token) => make$10(EnvironmentHttpApi, { baseUrl: runtimeState.value.origin }).pipe(flatMap$1((client) => client.connect.unlink({ headers: { authorization: `Bearer ${token}` } })), timeout(CLOUD_CLI_LIVE_SERVER_TIMEOUT))));
9471
9513
  return isSuccess(result) ? { status: "succeeded" } : {
9472
9514
  status: "failed",
9473
9515
  cause: result.cause
@@ -9482,7 +9524,7 @@ const checkLiveReachability = fn("cloud.cli.check_live_reachability")(function*
9482
9524
  const runtimeState = yield* readPersistedServerRuntimeState(config.serverRuntimeStatePath);
9483
9525
  if (isNone(runtimeState)) return null;
9484
9526
  const environmentAuth = yield* EnvironmentAuth;
9485
- return yield* withCloudCliSessionToken(environmentAuth, AuthRelayReadScope, (token) => make$9(EnvironmentHttpApi, { baseUrl: runtimeState.value.origin }).pipe(flatMap$1((client) => client.connect.checkReachability({ headers: { authorization: `Bearer ${token}` } })), timeout(CLOUD_CLI_REACHABILITY_TIMEOUT))).pipe(orElseSucceed(() => null));
9527
+ return yield* withCloudCliSessionToken(environmentAuth, AuthRelayReadScope, (token) => make$10(EnvironmentHttpApi, { baseUrl: runtimeState.value.origin }).pipe(flatMap$1((client) => client.connect.checkReachability({ headers: { authorization: `Bearer ${token}` } })), timeout(CLOUD_CLI_REACHABILITY_TIMEOUT))).pipe(orElseSucceed(() => null));
9486
9528
  });
9487
9529
  function formatAlertBox(text) {
9488
9530
  const lines = text.split("\n");
@@ -9581,7 +9623,7 @@ const linkEnvironmentForConnect = fn("cloud.cli.link_environment")(function* (op
9581
9623
  if (publishOnly) yield* (yield* ServerSecretStore).set(PUBLISH_AGENT_ACTIVITY_SECRET, stringToBytes("true"));
9582
9624
  return { identity };
9583
9625
  });
9584
- const connectLoginCommand = make$4("login", {
9626
+ const connectLoginCommand = make$5("login", {
9585
9627
  ...projectLocationFlags,
9586
9628
  headless: headlessFlag
9587
9629
  }).pipe(withDescription("Authorize the P4 Connect CLI without enabling remote access."), withHandler((flags) => runCloudCommand(flags, gen(function* () {
@@ -9589,7 +9631,7 @@ const connectLoginCommand = make$4("login", {
9589
9631
  const identity = yield* authorizeCli(flags);
9590
9632
  yield* log$1(`✓ Signed in${connectedAs(identity)}`);
9591
9633
  }))));
9592
- const connectLinkCommand = make$4("link", {
9634
+ const connectLinkCommand = make$5("link", {
9593
9635
  ...projectLocationFlags,
9594
9636
  headless: headlessFlag,
9595
9637
  publishOnly: Boolean$1("publish-only").pipe(withDescription$1("Link to publish agent activity only — no managed tunnel. Reach this environment out of band (e.g. Tailscale)."), withDefault(false))
@@ -9601,7 +9643,7 @@ const connectLinkCommand = make$4("link", {
9601
9643
  yield* log$1(flags.publishOnly ? `✓ Authorized${connectedAs(linked.identity)}\n\nNext\n Start P4 to publish agent activity (no managed tunnel).` : `✓ Authorized${connectedAs(linked.identity)}\n\nNext\n Start the server with \`${serveCommand}\` to make this machine reachable.`);
9602
9644
  }
9603
9645
  }))));
9604
- const connectStatusCommand = make$4("status", {
9646
+ const connectStatusCommand = make$5("status", {
9605
9647
  ...projectLocationFlags,
9606
9648
  json: jsonFlag$1
9607
9649
  }).pipe(withDescription("Show P4 Connect setup and check that other devices can reach this machine."), withHandler((flags) => runCloudCommand(flags, gen(function* () {
@@ -9633,7 +9675,7 @@ const connectStatusCommand = make$4("status", {
9633
9675
  };
9634
9676
  yield* log$1(formatCloudStatus(status, { json: flags.json }));
9635
9677
  }), { quietLogs: flags.json })));
9636
- const connectPublishCommand = make$4("publish", {
9678
+ const connectPublishCommand = make$5("publish", {
9637
9679
  ...projectLocationFlags,
9638
9680
  disable: Boolean$1("disable").pipe(withDescription$1("Stop publishing agent activity to your mobile clients."), withDefault(false))
9639
9681
  }).pipe(withDescription("Toggle publishing agent activity (push notifications and Live Activities) to your mobile clients."), withHandler((flags) => runCloudCommand(flags, gen(function* () {
@@ -9662,9 +9704,9 @@ const connectPublishCommand = make$4("publish", {
9662
9704
  yield* setCliDesiredCloudLink(true, "publish_only");
9663
9705
  yield* log$1("Restart P4 to finish authorizing this environment to publish (no managed tunnel is created).");
9664
9706
  }))));
9665
- const connectUnlinkCommand = make$4("unlink", { ...projectLocationFlags }).pipe(withDescription("Disable P4 Connect while retaining the stored authorization."), withHandler((flags) => runCloudCommand(flags, disconnectCloud({ clearAuthorization: false }))));
9666
- const connectLogoutCommand = make$4("logout", { ...projectLocationFlags }).pipe(withDescription("Disable P4 Connect and clear the stored CLI authorization."), withHandler((flags) => runCloudCommand(flags, disconnectCloud({ clearAuthorization: true }))));
9667
- const connectCommand$1 = make$4("connect", {
9707
+ const connectUnlinkCommand = make$5("unlink", { ...projectLocationFlags }).pipe(withDescription("Disable P4 Connect while retaining the stored authorization."), withHandler((flags) => runCloudCommand(flags, disconnectCloud({ clearAuthorization: false }))));
9708
+ const connectLogoutCommand = make$5("logout", { ...projectLocationFlags }).pipe(withDescription("Disable P4 Connect and clear the stored CLI authorization."), withHandler((flags) => runCloudCommand(flags, disconnectCloud({ clearAuthorization: true }))));
9709
+ const connectCommand$1 = make$5("connect", {
9668
9710
  ...projectLocationFlags,
9669
9711
  headless: headlessFlag
9670
9712
  }).pipe(withDescription("Set up P4 Connect for this machine."), withHandler((flags) => runCloudCommand(flags, gen(function* () {
@@ -9811,9 +9853,9 @@ const recordFailure = (state, now, limits) => {
9811
9853
  };
9812
9854
  };
9813
9855
  var HubAuth = class extends Service()("@p4code/cli/hub/HubAuth") {};
9814
- const make$1 = fn("HubAuth.make")(function* (limits) {
9856
+ const make$2 = fn("HubAuth.make")(function* (limits) {
9815
9857
  const { tokenHashes } = yield* HubConfig;
9816
- const state = yield* make$10({
9858
+ const state = yield* make$11({
9817
9859
  windowStartMillis: 0,
9818
9860
  failures: 0,
9819
9861
  blockedUntilMillis: 0
@@ -9834,7 +9876,7 @@ const make$1 = fn("HubAuth.make")(function* (limits) {
9834
9876
  });
9835
9877
  return HubAuth.of({ authenticate });
9836
9878
  });
9837
- const layer$3 = effect(HubAuth, make$1(DEFAULT_LIMITS));
9879
+ const layer$3 = effect(HubAuth, make$2(DEFAULT_LIMITS));
9838
9880
  // src/hub/HubAgentAssets.ts
9839
9881
  /**
9840
9882
  * The hub's store of user-scope agent assets.
@@ -9846,7 +9888,7 @@ const layer$3 = effect(HubAuth, make$1(DEFAULT_LIMITS));
9846
9888
  * @module HubAgentAssets
9847
9889
  */
9848
9890
  var HubAssetStoreError = class extends TaggedError()("HubAssetStoreError", {
9849
- operation: Literals$2([
9891
+ operation: Literals$3([
9850
9892
  "list",
9851
9893
  "get",
9852
9894
  "write",
@@ -9882,7 +9924,7 @@ const AGENT_ASSET_COLUMNS = `
9882
9924
  created_at AS "createdAt",
9883
9925
  updated_at AS "updatedAt"
9884
9926
  `;
9885
- const make = gen(function* () {
9927
+ const make$1 = gen(function* () {
9886
9928
  const sql = yield* SqlClient;
9887
9929
  const crypto = yield* Crypto;
9888
9930
  const upsertRow = void_$1({
@@ -10007,7 +10049,7 @@ const make = gen(function* () {
10007
10049
  remove
10008
10050
  });
10009
10051
  });
10010
- const layer$2 = effect(HubAgentAssets, make);
10052
+ const layer$2 = effect(HubAgentAssets, make$1);
10011
10053
  // src/hub/HubHttpRoutes.ts
10012
10054
  /**
10013
10055
  * The hub's HTTP surface: an unauthenticated `/health` and the bearer-guarded
@@ -10172,7 +10214,7 @@ var _003_AgentAssets_default = gen(function* () {
10172
10214
  *
10173
10215
  * @module HubPersistence
10174
10216
  */
10175
- const runHubMigrations = make$12({});
10217
+ const runHubMigrations = make$13({});
10176
10218
  const setup = effectDiscard(gen(function* () {
10177
10219
  const sql = yield* SqlClient;
10178
10220
  yield* sql`PRAGMA journal_mode = WAL;`;
@@ -10280,7 +10322,7 @@ const resolveHubPaths = fn("resolveHubPaths")(function* (baseDirFlag) {
10280
10322
  });
10281
10323
  const baseDirFlag = String$1("base-dir").pipe(withDescription$1("Base directory for hub state. Defaults to the P4 Code home directory."), optional);
10282
10324
  const labelFlag$1 = String$1("label").pipe(withDescription$1("Name of the server this token is for, for example `studio`."));
10283
- const serveHubCommand = make$4("serve", {
10325
+ const serveHubCommand = make$5("serve", {
10284
10326
  baseDir: baseDirFlag,
10285
10327
  host: String$1("host").pipe(withDescription$1("Interface to bind. Defaults to 127.0.0.1."), optional),
10286
10328
  port: Int("port").pipe(withDescription$1("Port for the hub HTTP server."), optional)
@@ -10299,7 +10341,7 @@ const serveHubCommand = make$4("serve", {
10299
10341
  if (config.tokenHashes.size === 0) yield* error("No server tokens are registered, so every request will be rejected.\nMint one with: p4c hub token add --label studio");
10300
10342
  return yield* runHub.pipe(provide(layer$4(config)));
10301
10343
  })));
10302
- const addTokenCommand = make$4("add", {
10344
+ const addTokenCommand = make$5("add", {
10303
10345
  baseDir: baseDirFlag,
10304
10346
  label: labelFlag$1
10305
10347
  }).pipe(withDescription("Mint a bearer token for one server and print it once."), withHandler((flags) => gen(function* () {
@@ -10327,13 +10369,13 @@ const addTokenCommand = make$4("add", {
10327
10369
  "Restart the hub for it to take effect."
10328
10370
  ].join("\n"));
10329
10371
  })));
10330
- const listTokensCommand = make$4("list", { baseDir: baseDirFlag }).pipe(withDescription("List the servers authorized to reach this hub."), withHandler((flags) => gen(function* () {
10372
+ const listTokensCommand = make$5("list", { baseDir: baseDirFlag }).pipe(withDescription("List the servers authorized to reach this hub."), withHandler((flags) => gen(function* () {
10331
10373
  const paths = yield* resolveHubPaths(flags.baseDir);
10332
10374
  const file = yield* readHubTokenFile(paths.tokensPath);
10333
10375
  if (file.tokens.length === 0) return yield* log$1("No servers are authorized.");
10334
10376
  for (const record of file.tokens) yield* log$1(`${record.label}\t${record.createdAt}`);
10335
10377
  })));
10336
- const revokeTokenCommand = make$4("revoke", {
10378
+ const revokeTokenCommand = make$5("revoke", {
10337
10379
  baseDir: baseDirFlag,
10338
10380
  label: labelFlag$1
10339
10381
  }).pipe(withDescription("Revoke one server's token."), withHandler((flags) => gen(function* () {
@@ -10351,7 +10393,7 @@ const runAgainstServerState = fn("hub.cli.runAgainstServerState")(function* (fla
10351
10393
  const layer = layer$29.pipe(provideMerge(layer$30), provideMerge(layer$31), provide$1(layer$17.pipe(provide$1(mergeAll(layer$15, layerConfig)))), provide$1(layer$15), provide$1(layer$13), provide$1(layer$14(config)), provide$1(succeed$3(MinimumLogLevel, config.logLevel)));
10352
10394
  return yield* run.pipe(provide(layer));
10353
10395
  });
10354
- const connectCommand = make$4("connect", {
10396
+ const connectCommand = make$5("connect", {
10355
10397
  ...projectLocationFlags,
10356
10398
  url: String$2("url").pipe(withDescription$2("The hub's URL.")),
10357
10399
  token: Redacted("token").pipe(withDescription$1("Bearer token minted on the hub with `p4c hub token add`."))
@@ -10363,8 +10405,8 @@ const connectCommand = make$4("connect", {
10363
10405
  yield* AssetSync.pipe(flatMap$1((sync) => sync.forget));
10364
10406
  yield* log$1("Linked. The running server picks this up at its next sync; run `p4c hub sync` to sync now.");
10365
10407
  }))));
10366
- const disconnectCommand = make$4("disconnect", { ...projectLocationFlags }).pipe(withDescription("Stop syncing this machine with a hub. Files already synced stay."), withHandler((flags) => runAgainstServerState(flags, HubLink.pipe(flatMap$1((link) => link.disconnect), andThen(log$1("Disconnected from the hub."))))));
10367
- const syncCommand = make$4("sync", { ...projectLocationFlags }).pipe(withDescription("Sync skills, subagents and memory with the linked hub now."), withHandler((flags) => runAgainstServerState(flags, gen(function* () {
10408
+ const disconnectCommand = make$5("disconnect", { ...projectLocationFlags }).pipe(withDescription("Stop syncing this machine with a hub. Files already synced stay."), withHandler((flags) => runAgainstServerState(flags, HubLink.pipe(flatMap$1((link) => link.disconnect), andThen(log$1("Disconnected from the hub."))))));
10409
+ const syncCommand = make$5("sync", { ...projectLocationFlags }).pipe(withDescription("Sync skills, subagents and memory with the linked hub now."), withHandler((flags) => runAgainstServerState(flags, gen(function* () {
10368
10410
  const report = yield* AssetSync.pipe(flatMap$1((sync) => sync.run));
10369
10411
  if (!report.ran) return yield* log$1("No hub is linked. Run `p4c hub connect`.");
10370
10412
  if (report.unavailable !== null) return yield* error(`Sync skipped: ${report.unavailable}.`);
@@ -10374,16 +10416,47 @@ const syncCommand = make$4("sync", { ...projectLocationFlags }).pipe(withDescrip
10374
10416
  yield* log$1(`Removed: ${names(report.removed)}`);
10375
10417
  for (const entry of [...report.conflicts, ...report.refused]) yield* log$1(`Skipped ${entry.kind}:${entry.name} (${entry.reason})`);
10376
10418
  }))));
10377
- const hubCommand = make$4("hub").pipe(withDescription("Run and manage the P4 Code hub."), withSubcommands([
10419
+ const removeCommand = make$5("remove", {
10420
+ ...projectLocationFlags,
10421
+ kind: Literals$1("kind", [
10422
+ "skill",
10423
+ "agent",
10424
+ "memory",
10425
+ "mcp"
10426
+ ]).pipe(withDescription$2("What the asset is: skill, agent (a subagent), memory, or mcp.")),
10427
+ name: String$2("name").pipe(withDescription$2("The asset's name, for example `ship` or `CLAUDE.md`.")),
10428
+ yes: Boolean$1("yes").pipe(withAlias$1("y"), withDescription$1("Remove without asking. Required from a script, where there is no prompt."), withDefault(false))
10429
+ }).pipe(withAlias("rm"), withDescription("Remove a synced skill, subagent, memory file or MCP server from the hub and every linked machine."), withHandler((flags) => gen(function* () {
10430
+ const label = `${flags.kind}:${flags.name}`;
10431
+ const failed = (detail) => error(detail).pipe(andThen(sync(() => {
10432
+ process.exitCode = 1;
10433
+ })));
10434
+ if (!flags.yes) {
10435
+ if (!(process.stdin.isTTY && process.stdout.isTTY)) return yield* failed(`Not a terminal, so ${label} was not removed. Rerun with --yes.`);
10436
+ if (!(yield* run$2(Confirm({
10437
+ message: `Remove ${label} from the hub, this machine and every linked machine?`,
10438
+ initial: false
10439
+ })).pipe(catchTags({ QuitError: () => succeed$1(false) })))) return yield* log$1("Nothing was removed.");
10440
+ }
10441
+ return yield* runAgainstServerState(flags, AssetSync.pipe(flatMap$1((sync) => sync.unpublish({
10442
+ kind: flags.kind,
10443
+ name: flags.name
10444
+ })), matchEffect({
10445
+ onFailure: (error) => failed(error.detail),
10446
+ onSuccess: (report) => log$1(report.removedFromHub ? `Removed ${label} from the hub${report.removedLocally ? " and this machine" : ""}. Other machines drop their unchanged copies at their next sync.` : `${label} was already gone from the hub. Settled this machine's copy.`)
10447
+ })));
10448
+ })));
10449
+ const hubCommand = make$5("hub").pipe(withDescription("Run and manage the P4 Code hub."), withSubcommands([
10378
10450
  serveHubCommand,
10379
- make$4("token").pipe(withDescription("Manage the bearer tokens servers use to reach this hub."), withSubcommands([
10451
+ make$5("token").pipe(withDescription("Manage the bearer tokens servers use to reach this hub."), withSubcommands([
10380
10452
  addTokenCommand,
10381
10453
  listTokensCommand,
10382
10454
  revokeTokenCommand
10383
10455
  ])),
10384
10456
  connectCommand,
10385
10457
  disconnectCommand,
10386
- syncCommand
10458
+ syncCommand,
10459
+ removeCommand
10387
10460
  ]));
10388
10461
  // ../../packages/shared/src/devHome.ts
10389
10462
  /**
@@ -10590,7 +10663,7 @@ const makePairServerConfig = fn(function* (input) {
10590
10663
  const { baseDir, variant, state } = input.target;
10591
10664
  const devUrl = state.devUrl !== void 0 ? new URL(state.devUrl) : void 0;
10592
10665
  const derivedPaths = yield* deriveServerPaths(baseDir, variant === "dev" ? DEV_VARIANT_PLACEHOLDER_URL : void 0, {});
10593
- return make$11({
10666
+ return make$12({
10594
10667
  logLevel: input.logLevel,
10595
10668
  traceMinLevel: "Info",
10596
10669
  traceTimingEnabled: false,
@@ -10687,7 +10760,7 @@ const ttlFlag = String$1("ttl").pipe(withSchema(DurationFromString), withDescrip
10687
10760
  const labelFlag = String$1("label").pipe(withDescription$1("Optional label shown in the server's connections list."), optional);
10688
10761
  const tailscaleFlag = Boolean$1("tailscale").pipe(withDescription$1("Publish the server over Tailscale Serve HTTPS and pair through the tailnet URL."), withDefault(false));
10689
10762
  const tailscaleServePortFlag = Int("tailscale-serve-port").pipe(withSchema(PortSchema), withDescription$1("HTTPS port for Tailscale Serve when --tailscale is enabled."), withDefault(443));
10690
- const pairCommand = make$4("pair", {
10763
+ const pairCommand = make$5("pair", {
10691
10764
  baseDir: baseDirFlag$1,
10692
10765
  scopes: authScopesFlag(AuthStandardClientScopes),
10693
10766
  ttl: ttlFlag,
@@ -10843,7 +10916,7 @@ const withProjectCliSessionToken = (environmentAuth, run) => acquireUseRelease(e
10843
10916
  scopes: AuthStandardClientScopes,
10844
10917
  label: "p4 project cli"
10845
10918
  }), (issued) => run(issued.token), (issued) => environmentAuth.revokeSession(issued.sessionId).pipe(ignore({ log: true })));
10846
- const makeLiveServerClient = (origin) => make$9(EnvironmentHttpApi, { baseUrl: origin });
10919
+ const makeLiveServerClient = (origin) => make$10(EnvironmentHttpApi, { baseUrl: origin });
10847
10920
  const normalizeWorkspaceRootForProjectCommand = fn("normalizeWorkspaceRootForProjectCommand")(function* (workspaceRoot) {
10848
10921
  return yield* (yield* WorkspacePaths).normalizeWorkspaceRoot(workspaceRoot);
10849
10922
  });
@@ -10927,7 +11000,7 @@ const runProjectMutation = fn("runProjectMutation")(function* (flags, run) {
10927
11000
  });
10928
11001
  yield* log$1(output);
10929
11002
  }));
10930
- const { layerProjectService } = yield* promise(() => import("./runtimeLayer-D1H3yRj8.mjs"));
11003
+ const { layerProjectService } = yield* promise(() => import("./runtimeLayer-DurN_FAN.mjs"));
10931
11004
  const layerOfflineRuntime = makeProjectCliRuntimeLayer(layerProjectService).pipe(provide$1(layer$14(config)), provide$1(succeed$3(MinimumLogLevel, minimumLogLevel)));
10932
11005
  yield* acquireServerOwnership(config.serverRuntimeStatePath).pipe(provide(layer$12));
10933
11006
  yield* clearPersistedServerRuntimeState(config.serverRuntimeStatePath);
@@ -10943,7 +11016,7 @@ const runProjectMutation = fn("runProjectMutation")(function* (flags, run) {
10943
11016
  }).pipe(provide(layerOfflineRuntime));
10944
11017
  }).pipe(scoped, provide(mergeAll(layerRuntime, layer$21).pipe(provideMerge(layer$13), provide$1(layer$14(config)), provide$1(succeed$3(MinimumLogLevel, minimumLogLevel)))));
10945
11018
  });
10946
- const projectAddCommand = make$4("add", {
11019
+ const projectAddCommand = make$5("add", {
10947
11020
  ...projectLocationFlags,
10948
11021
  workspaceRoot: String$2("path").pipe(withDescription$2("Workspace root to add as a project.")),
10949
11022
  title: String$1("title").pipe(withDescription$1("Optional project title."), optional)
@@ -10966,7 +11039,7 @@ const projectAddCommand = make$4("add", {
10966
11039
  });
10967
11040
  return `Added project ${projectId} (${title}) at ${workspaceRoot}.`;
10968
11041
  }))));
10969
- const projectRemoveCommand = make$4("remove", {
11042
+ const projectRemoveCommand = make$5("remove", {
10970
11043
  ...projectLocationFlags,
10971
11044
  project: String$2("project").pipe(withDescription$2("Project id or workspace root to remove.")),
10972
11045
  force: Boolean$1("force").pipe(withDescription$1("Delete the project and all of its threads."), withDefault(false))
@@ -10983,7 +11056,7 @@ const projectRemoveCommand = make$4("remove", {
10983
11056
  });
10984
11057
  return `Removed project ${project.id} (${project.title}).`;
10985
11058
  }))));
10986
- const projectRenameCommand = make$4("rename", {
11059
+ const projectRenameCommand = make$5("rename", {
10987
11060
  ...projectLocationFlags,
10988
11061
  project: String$2("project").pipe(withDescription$2("Project id or workspace root to rename.")),
10989
11062
  title: String$2("title").pipe(withDescription$2("New project title."))
@@ -11002,7 +11075,7 @@ const projectRenameCommand = make$4("rename", {
11002
11075
  });
11003
11076
  return `Renamed project ${project.id} to ${nextTitle}.`;
11004
11077
  }))));
11005
- const projectCommand = make$4("project").pipe(withDescription("Manage projects."), withSubcommands([
11078
+ const projectCommand = make$5("project").pipe(withDescription("Manage projects."), withSubcommands([
11006
11079
  projectAddCommand,
11007
11080
  projectRemoveCommand,
11008
11081
  projectRenameCommand
@@ -11369,7 +11442,7 @@ const threadArgument = String$2("thread").pipe(withDescription$2("Thread id."));
11369
11442
  const decodeThreadIdValue = decodeUnknownEffect(ThreadId);
11370
11443
  const decodeTitle = decodeUnknownEffect(TrimmedNonEmptyString);
11371
11444
  const decodeThreadId = (value) => decodeThreadIdValue(value.trim()).pipe(mapError(() => new ThreadUsageError({ detail: `'${value}' is not a thread id.` })));
11372
- const threadListCommand = make$4("list", {
11445
+ const threadListCommand = make$5("list", {
11373
11446
  ...projectLocationFlags,
11374
11447
  project: String$1("project").pipe(withDescription$1("Project id or a path inside the project. Defaults to this directory."), withDefault(".")),
11375
11448
  json: jsonFlag
@@ -11390,7 +11463,7 @@ const threadListCommand = make$4("list", {
11390
11463
  if (flags.json) return yield* printJson(threads);
11391
11464
  for (const thread of threads) yield* log$1(`${thread.threadId} ${thread.status.padEnd(11)} ${thread.title}`);
11392
11465
  })).pipe(reportThreadErrors)));
11393
- const threadStartCommand = make$4("start", {
11466
+ const threadStartCommand = make$5("start", {
11394
11467
  ...projectLocationFlags,
11395
11468
  project: String$2("project").pipe(withDescription$2("Project id or a path inside the project, such as .")),
11396
11469
  message: messageArgument,
@@ -11429,7 +11502,7 @@ const threadStartCommand = make$4("start", {
11429
11502
  yield* flags.json ? printJson(launched) : log$1(launched.threadId);
11430
11503
  }));
11431
11504
  }).pipe(reportThreadErrors)));
11432
- const threadSendCommand = make$4("send", {
11505
+ const threadSendCommand = make$5("send", {
11433
11506
  ...projectLocationFlags,
11434
11507
  thread: threadArgument,
11435
11508
  message: messageArgument,
@@ -11452,7 +11525,7 @@ const threadSendCommand = make$4("send", {
11452
11525
  yield* flags.json ? printJson(sent) : log$1(sent.delivery === "queued" ? "Queued." : "Sent.");
11453
11526
  }));
11454
11527
  }).pipe(reportThreadErrors)));
11455
- const threadShowCommand = make$4("show", {
11528
+ const threadShowCommand = make$5("show", {
11456
11529
  ...projectLocationFlags,
11457
11530
  thread: threadArgument,
11458
11531
  messages: Int("messages").pipe(withDescription$1("How many of the latest messages to print."), withDefault(10)),
@@ -11481,21 +11554,108 @@ const threadShowCommand = make$4("show", {
11481
11554
  for (const entry of messages) yield* log$1(`\n[${entry.role}]\n${entry.text}`);
11482
11555
  }));
11483
11556
  }).pipe(reportThreadErrors)));
11484
- const threadCommand = make$4("thread").pipe(withDescription("Start, message, and read threads on the running server."), withSubcommands([
11557
+ const threadCommand = make$5("thread").pipe(withDescription("Start, message, and read threads on the running server."), withSubcommands([
11485
11558
  threadListCommand,
11486
11559
  threadStartCommand,
11487
11560
  threadSendCommand,
11488
11561
  threadShowCommand
11489
11562
  ]));
11563
+ // src/process/windowsTcpListeners.ts
11564
+ const NETSTAT_TIMEOUT = seconds(5);
11565
+ /** `netstat -ano` lists every connection, not just listeners; ~80 bytes per row, sized for ~200k rows. */
11566
+ const NETSTAT_MAX_OUTPUT_BYTES = 16777216;
11567
+ const parseWindowsTcpListenerLine = (line) => {
11568
+ const fields = line.trim().split(/\s+/);
11569
+ if (fields.length < 4 || fields[0]?.toUpperCase() !== "TCP") return null;
11570
+ const localEndpoint = fields[1] ?? "";
11571
+ if (!(fields[2] ?? "").endsWith(":0")) return null;
11572
+ const lastColon = localEndpoint.lastIndexOf(":");
11573
+ if (lastColon <= 0) return null;
11574
+ const host = localEndpoint.slice(0, lastColon);
11575
+ if (!LSOF_LOCAL_HOST_TOKENS.has(host) && host !== "::") return null;
11576
+ const port = Number(localEndpoint.slice(lastColon + 1));
11577
+ if (!Number.isInteger(port) || port <= 0 || port >= 65536) return null;
11578
+ const pid = Number(fields.at(-1));
11579
+ return {
11580
+ port,
11581
+ pid: Number.isInteger(pid) && pid > 0 ? pid : null
11582
+ };
11583
+ };
11584
+ const parseWindowsTcpListeners = (raw) => raw.split(/\r?\n/g).flatMap((line) => {
11585
+ const listener = parseWindowsTcpListenerLine(line);
11586
+ return listener === null ? [] : [listener];
11587
+ });
11588
+ const exitedWithError = (result) => result.code !== null && result.code !== 0;
11589
+ /** Resolves to `null` when either query exits nonzero. */
11590
+ const queryWindowsTcpListeners = fn("windowsTcpListeners.query")(function* (processRunner, netstatCommand) {
11591
+ const runNetstat = (protocol) => processRunner.run({
11592
+ command: netstatCommand,
11593
+ args: [
11594
+ "-ano",
11595
+ "-p",
11596
+ protocol
11597
+ ],
11598
+ timeout: NETSTAT_TIMEOUT,
11599
+ maxOutputBytes: NETSTAT_MAX_OUTPUT_BYTES
11600
+ });
11601
+ const [tcp4, tcp6] = yield* all([runNetstat("tcp"), runNetstat("tcpv6")], { concurrency: 2 });
11602
+ if (exitedWithError(tcp4) || exitedWithError(tcp6)) return null;
11603
+ return parseWindowsTcpListeners(`${tcp4.stdout}\n${tcp6.stdout}`);
11604
+ });
11605
+ // src/cli/automaticPort.ts
11606
+ const KERNEL_RELEASE_PATH = "/proc/sys/kernel/osrelease";
11607
+ const WINDOWS_NETSTAT_PATH = String.raw`C:\Windows\System32\netstat.exe`;
11608
+ const FALLBACK_ATTEMPTS = 8;
11609
+ /**
11610
+ * Picks the startup port when none was configured. Under WSL's default NAT networking, Windows
11611
+ * reaches the server through localhost forwarding, which fails for a port a Windows process
11612
+ * already listens on even though WSL can bind it.
11613
+ */
11614
+ const make = gen(function* () {
11615
+ const net = yield* NetService;
11616
+ const fs = yield* FileSystem;
11617
+ const processRunner = yield* ProcessRunner;
11618
+ const isWsl = fs.readFileString(KERNEL_RELEASE_PATH).pipe(map$3((release) => release.toLowerCase().includes("microsoft")), orElseSucceed(() => false));
11619
+ const readWindowsHostListeners = gen(function* () {
11620
+ const netstat = yield* processRunner.run({
11621
+ command: "wslpath",
11622
+ args: ["-u", WINDOWS_NETSTAT_PATH],
11623
+ timeout: seconds(5)
11624
+ });
11625
+ const netstatPath = netstat.stdout.trim();
11626
+ if (netstat.code !== null && netstat.code !== 0 || netstatPath.length === 0) return null;
11627
+ const listeners = yield* queryWindowsTcpListeners(processRunner, netstatPath);
11628
+ if (listeners === null) return null;
11629
+ return new Set(listeners.map((listener) => listener.port));
11630
+ }).pipe(orElseSucceed(() => null));
11631
+ return fn("automaticPort.select")(function* (preferred) {
11632
+ if (!(yield* isWsl)) return yield* net.findAvailablePort(preferred);
11633
+ const windows = yield* readWindowsHostListeners;
11634
+ if (windows === null) {
11635
+ yield* logWarning("Could not list Windows TCP listeners from WSL; Windows may be unable to reach the selected port. Pass --port to choose one.");
11636
+ return yield* net.findAvailablePort(preferred);
11637
+ }
11638
+ if (!windows.has(preferred) && (yield* net.isPortAvailableOnLoopback(preferred))) return preferred;
11639
+ for (let attempt = 0; attempt < FALLBACK_ATTEMPTS; attempt += 1) {
11640
+ const port = yield* net.reserveLoopbackPort();
11641
+ if (!windows.has(port)) return port;
11642
+ }
11643
+ return yield* new UserError({ cause: "Windows is already using every port P4 Code tried. Pass --port or set P4CODE_PORT to a port Windows is not using." });
11644
+ });
11645
+ });
11490
11646
  // src/cli/server.ts
11491
11647
  const encodeCommand = encodeEffect(fromJsonString(String$6));
11492
11648
  function ignoreClosedLauncherPipe(error) {
11493
11649
  if (error.code !== "EPIPE" && error.code !== "ERR_STREAM_DESTROYED") throw error;
11494
11650
  }
11495
11651
  const runServerCommand = (flags, options) => gen(function* () {
11496
- const { runServer } = yield* promise(() => import("./server-vm1eH-y1.mjs"));
11652
+ const { runServer } = yield* promise(() => import("./server-DuD96ZSr.mjs"));
11497
11653
  const logLevel = yield* LogLevel;
11498
- const config = yield* resolveServerConfig(flags, logLevel, options);
11654
+ const selectAutomaticPort = yield* make.pipe(provide(layer$12));
11655
+ const config = yield* resolveServerConfig(flags, logLevel, {
11656
+ ...options,
11657
+ selectAutomaticPort
11658
+ });
11499
11659
  if (config.mode === "desktop" && config.desktopBootstrapToken !== void 0) yield* sync(() => {
11500
11660
  process.stdout.on("error", ignoreClosedLauncherPipe);
11501
11661
  process.stderr.on("error", ignoreClosedLauncherPipe);
@@ -11515,8 +11675,8 @@ const runDefaultServerCommand = (flags) => gen(function* () {
11515
11675
  }
11516
11676
  return yield* runServerCommand(flags, { rejectRunningServer: true });
11517
11677
  });
11518
- const startCommand = make$4("start", { ...sharedServerCommandFlags }).pipe(withDescription("Run the P4 Code server."), withHandler((flags) => runServerCommand(flags, { rejectRunningServer: true })));
11519
- const serveCommand = make$4("serve", { ...sharedServerCommandFlags }).pipe(withDescription("Run the P4 Code server without opening a browser and print headless pairing details."), withHandler((flags) => runServerCommand(flags, {
11678
+ const startCommand = make$5("start", { ...sharedServerCommandFlags }).pipe(withDescription("Run the P4 Code server."), withHandler((flags) => runServerCommand(flags, { rejectRunningServer: true })));
11679
+ const serveCommand = make$5("serve", { ...sharedServerCommandFlags }).pipe(withDescription("Run the P4 Code server without opening a browser and print headless pairing details."), withHandler((flags) => runServerCommand(flags, {
11520
11680
  startupPresentation: "headless",
11521
11681
  forceAutoBootstrapProjectFromCwd: false
11522
11682
  })));
@@ -11676,10 +11836,10 @@ const updateFlags = {
11676
11836
  ...projectLocationFlags,
11677
11837
  channel: Literals("channel", CLI_RELEASE_CHANNELS).pipe(withDescription$1("Release channel to follow. Defaults to the channel this p4 was published on."), optional),
11678
11838
  allowDowngrade: Boolean$1("allow-downgrade").pipe(withDescription$1("Allow moving to an older version than the one running."), withDefault(false)),
11679
- yes: Boolean$1("yes").pipe(withAlias("y"), withDescription$1("Restart the background service without asking. Required to restart it from a script, where there is no prompt."), withDefault(false))
11839
+ yes: Boolean$1("yes").pipe(withAlias$1("y"), withDescription$1("Restart the background service without asking. Required to restart it from a script, where there is no prompt."), withDefault(false))
11680
11840
  };
11681
11841
  const versionArgument = String$2("version").pipe(withDescription$2("Exact version to install. Defaults to the newest release on the channel."), optional$1);
11682
- const updateCommand = make$4("update", {
11842
+ const updateCommand = make$5("update", {
11683
11843
  ...updateFlags,
11684
11844
  version: versionArgument
11685
11845
  }).pipe(withDescription("Download a newer p4 and switch this machine to it, including the background service when one is installed."), withHandler((flags) => gen(function* () {
@@ -11856,8 +12016,10 @@ const runUpdate = fn("cli.update.run")(function* (input) {
11856
12016
  else yield* log$1(` Run ${runtime.entryPath}\n`);
11857
12017
  if (serviceUpdated) yield* log$1(` Background service restarted on ${targetVersion}`);
11858
12018
  else if (serviceInstalled && serviceCurrent) yield* log$1(` Background service already on ${targetVersion}`);
11859
- else if (serviceInstalled) yield* log$1(` Background service still running ${serviceVersion ?? "an unknown version"}. Run \`p4c service restart\` when you are ready to switch it to ${targetVersion}.`);
11860
- else if (status.installed && !servesThisHome) yield* log$1(` The background service serves ${status.installedBaseDir ?? "another P4 home"} and was left unchanged.`);
12019
+ else if (serviceInstalled) {
12020
+ const running = serviceVersion === void 0 ? "an unknown version" : restartPending ? `the version before ${serviceVersion}` : serviceVersion;
12021
+ yield* log$1(` Background service still running ${running}. Run \`p4c service restart\` when you are ready to switch it to ${targetVersion}.`);
12022
+ } else if (status.installed && !servesThisHome) yield* log$1(` The background service serves ${status.installedBaseDir ?? "another P4 home"} and was left unchanged.`);
11861
12023
  if (foreground !== void 0) yield* log$1(` A server started by hand is still running at ${foreground.origin} (pid ${foreground.pid}). Stop it and start it again to pick up ${targetVersion}.`);
11862
12024
  });
11863
12025
  // src/cli/uninstall.ts
@@ -11924,9 +12086,9 @@ const planUninstall = fn("cli.uninstall.plan")(function* (input) {
11924
12086
  userdataDir: path.join(input.baseDir, "userdata")
11925
12087
  };
11926
12088
  });
11927
- const uninstallCommand = make$4("uninstall", {
12089
+ const uninstallCommand = make$5("uninstall", {
11928
12090
  ...projectLocationFlags,
11929
- yes: Boolean$1("yes").pipe(withAlias("y"), withDescription$1("Remove everything without asking. Required from a script, where there is no prompt."), withDefault(false))
12091
+ yes: Boolean$1("yes").pipe(withAlias$1("y"), withDescription$1("Remove everything without asking. Required from a script, where there is no prompt."), withDefault(false))
11930
12092
  }).pipe(withDescription("Remove p4 from this machine: the background service, the launcher, and every downloaded version. Your projects and threads are kept."), withHandler((flags) => gen(function* () {
11931
12093
  const logLevel = yield* LogLevel;
11932
12094
  const config = yield* resolveCliAuthConfig(flags, logLevel);
@@ -12146,6 +12308,15 @@ const filesystemBackupSpaceProbe = {
12146
12308
  },
12147
12309
  canClone: backupCanClone
12148
12310
  };
12311
+ async function removeAbandonedBackupCopies(backupRoot) {
12312
+ for (const entry of await NodeFSP.readdir(backupRoot)) {
12313
+ if (!entry.endsWith(".staging")) continue;
12314
+ await NodeFSP.rm(NodePath.join(backupRoot, entry), {
12315
+ recursive: true,
12316
+ force: true
12317
+ }).catch(() => void 0);
12318
+ }
12319
+ }
12149
12320
  /**
12150
12321
  * Returns a client-visible reason when the pre-update database backup cannot
12151
12322
  * fit, or undefined when it can. Runs before the server is stopped so a full
@@ -12162,6 +12333,7 @@ async function databaseBackupBlocker(baseDir, dbPath, probe = {}) {
12162
12333
  recursive: true,
12163
12334
  mode: 448
12164
12335
  });
12336
+ await removeAbandonedBackupCopies(backupRoot);
12165
12337
  const [files, free] = await Promise.all([statDatabaseFiles(dbPath), readFreeBytes(backupRoot)]);
12166
12338
  const size = files.reduce((total, file) => total + file.size, 0);
12167
12339
  const fullCopyBytes = size * 1.05;
@@ -12687,7 +12859,7 @@ async function main() {
12687
12859
  * CLI's fiber rather than under `runMain`, whose signal handler would
12688
12860
  * interrupt the fiber and exit while the child is still being terminated.
12689
12861
  */
12690
- const serviceLauncherCommand = make$4("__service-launcher").pipe(unlisted, withHandler(() => sync(() => {
12862
+ const serviceLauncherCommand = make$5("__service-launcher").pipe(unlisted, withHandler(() => sync(() => {
12691
12863
  main().catch((cause) => {
12692
12864
  const error = cause instanceof Error ? cause : new Error(String(cause));
12693
12865
  process.stderr.write(`[service-launcher] ${error.message}\n`);
@@ -12701,11 +12873,11 @@ const serviceLauncherCommand = make$4("__service-launcher").pipe(unlisted, withH
12701
12873
  * single-executable has no Node to run a script with, so the adapter invokes
12702
12874
  * this hidden subcommand on its own executable instead.
12703
12875
  */
12704
- const claudeHistoryCommand = make$4("__claude-history", {
12876
+ const claudeHistoryCommand = make$5("__claude-history", {
12705
12877
  method: String$2("method"),
12706
12878
  sessionId: String$2("session-id"),
12707
12879
  options: String$2("options").pipe(optional$1)
12708
- }).pipe(unlisted, withHandler(({ method, sessionId, options }) => promise(() => import("./claudeHistoryWorker-B6KX_N9G.mjs")).pipe(flatMap$1(({ runClaudeHistoryWorker }) => promise(() => runClaudeHistoryWorker(method, sessionId, options._tag === "Some" ? options.value : void 0))))));
12880
+ }).pipe(unlisted, withHandler(({ method, sessionId, options }) => promise(() => import("./claudeHistoryWorker-Cst8OnLH.mjs")).pipe(flatMap$1(({ runClaudeHistoryWorker }) => promise(() => runClaudeHistoryWorker(method, sessionId, options._tag === "Some" ? options.value : void 0))))));
12709
12881
  // src/cli/sshHelper.ts
12710
12882
  /**
12711
12883
  * Small helpers the SSH launch script needs on the remote host. The script
@@ -12739,7 +12911,7 @@ const answersOnLoopback = (port) => new Promise((resolve) => {
12739
12911
  socket.once("error", () => resolve(false));
12740
12912
  });
12741
12913
  /** Prints the first free loopback port from the preferred one, scanning `window` ports. */
12742
- const pickPort = make$4("pick-port", {
12914
+ const pickPort = make$5("pick-port", {
12743
12915
  portFile: String$2("port-file"),
12744
12916
  defaultPort: Int$1("default-port"),
12745
12917
  scanWindow: Int$1("scan-window")
@@ -12773,7 +12945,7 @@ const probe = (port, probeTimeoutMs) => new Promise((resolve) => {
12773
12945
  request.once("error", () => resolve(false));
12774
12946
  });
12775
12947
  /** Exits 0 once the loopback server answers, 1 when the deadline passes first. */
12776
- const waitReady = make$4("wait-ready", {
12948
+ const waitReady = make$5("wait-ready", {
12777
12949
  port: Int$1("port"),
12778
12950
  timeoutMs: Int$1("timeout-ms"),
12779
12951
  probeTimeoutMs: Int$1("probe-timeout-ms")
@@ -12786,7 +12958,7 @@ const waitReady = make$4("wait-ready", {
12786
12958
  process.exitCode = 1;
12787
12959
  })));
12788
12960
  /** Prints `<pid> <port>` for a live default-home server, or exits 1. */
12789
- const runtimePort = make$4("runtime-port", { runtimeFile: String$2("runtime-file") }).pipe(withHandler(({ runtimeFile }) => sync(() => {
12961
+ const runtimePort = make$5("runtime-port", { runtimeFile: String$2("runtime-file") }).pipe(withHandler(({ runtimeFile }) => sync(() => {
12790
12962
  try {
12791
12963
  const runtime = JSON.parse(NodeFS.readFileSync(runtimeFile, "utf8"));
12792
12964
  const pid = Number(runtime.pid);
@@ -12806,13 +12978,13 @@ const runtimePort = make$4("runtime-port", { runtimeFile: String$2("runtime-file
12806
12978
  process.exitCode = 1;
12807
12979
  }
12808
12980
  })));
12809
- const sshHelperCommand = make$4("__ssh-helper").pipe(unlisted, withSubcommands([
12981
+ const sshHelperCommand = make$5("__ssh-helper").pipe(unlisted, withSubcommands([
12810
12982
  pickPort,
12811
12983
  waitReady,
12812
12984
  runtimePort
12813
12985
  ]));
12814
12986
  // src/cli/servicePreflight.ts
12815
- const servicePreflightCommand = make$4("__service-preflight", {
12987
+ const servicePreflightCommand = make$5("__service-preflight", {
12816
12988
  databasePath: String$1("database-path"),
12817
12989
  launcherProtocol: Int("launcher-protocol")
12818
12990
  }).pipe(unlisted, withHandler(({ databasePath, launcherProtocol }) => log$1(JSON.stringify(runServicePreflight({
@@ -13132,7 +13304,7 @@ const resolvableThemeIds = fn(function* (themesDir) {
13132
13304
  const published = yield* readPublishedThemes(themesDir);
13133
13305
  return [...BUILT_IN_THEME_IDS, ...published.map((theme) => theme.id)].toSorted();
13134
13306
  });
13135
- const themeSetCommand = make$4("set", {
13307
+ const themeSetCommand = make$5("set", {
13136
13308
  baseDir: baseDirFlag$1,
13137
13309
  id: String$1("id").pipe(withDescription$1("Theme id to publish a file under, instead of its filename."), optional),
13138
13310
  theme: String$2("theme").pipe(withDescription$2("A theme id (a built-in, or one this machine publishes — themes/nightfall.json is \"nightfall\"), or a path to a theme JSON file to publish and set in one step."))
@@ -13172,7 +13344,7 @@ const themeSetCommand = make$4("set", {
13172
13344
  yield* cleanupPublish;
13173
13345
  yield* log$1(targetIsFile ? `Published ${target} as "${themeId}" and set it as the environment theme.\n` : `Environment theme set to "${themeId}" in ${paths.settingsPath}.\n`);
13174
13346
  })));
13175
- const themeClearCommand = make$4("clear", { baseDir: baseDirFlag$1 }).pipe(withDescription("Remove the environment's theme; clients keep what they have."), withHandler((flags) => gen(function* () {
13347
+ const themeClearCommand = make$5("clear", { baseDir: baseDirFlag$1 }).pipe(withDescription("Remove the environment's theme; clients keep what they have."), withHandler((flags) => gen(function* () {
13176
13348
  const paths = yield* resolveThemePaths(flags.baseDir);
13177
13349
  yield* writeDefaultTheme({
13178
13350
  settingsPath: paths.settingsPath,
@@ -13180,7 +13352,7 @@ const themeClearCommand = make$4("clear", { baseDir: baseDirFlag$1 }).pipe(withD
13180
13352
  });
13181
13353
  yield* log$1(`Environment theme cleared in ${paths.settingsPath}.\n`);
13182
13354
  })));
13183
- const themeShowCommand = make$4("show", { baseDir: baseDirFlag$1 }).pipe(withDescription("Show the environment's theme and its published themes."), withHandler((flags) => gen(function* () {
13355
+ const themeShowCommand = make$5("show", { baseDir: baseDirFlag$1 }).pipe(withDescription("Show the environment's theme and its published themes."), withHandler((flags) => gen(function* () {
13184
13356
  const paths = yield* resolveThemePaths(flags.baseDir);
13185
13357
  const { settings } = yield* readSettingsObject(paths.settingsPath);
13186
13358
  const defaultTheme = typeof settings.defaultTheme === "string" && settings.defaultTheme.length > 0 ? settings.defaultTheme : null;
@@ -13188,7 +13360,7 @@ const themeShowCommand = make$4("show", { baseDir: baseDirFlag$1 }).pipe(withDes
13188
13360
  yield* log$1(defaultTheme === null ? "Environment theme: not set.\n" : `Environment theme: "${defaultTheme}".\n`);
13189
13361
  yield* log$1(published.length === 0 ? `Published themes: none (publish into ${paths.themesDir}).\n` : `Published themes: ${published.join(", ")}.\n`);
13190
13362
  })));
13191
- const themeCommand = make$4("theme").pipe(withDescription("Inspect and set environment-wide theme defaults."), withSubcommands([
13363
+ const themeCommand = make$5("theme").pipe(withDescription("Inspect and set environment-wide theme defaults."), withSubcommands([
13192
13364
  themeSetCommand,
13193
13365
  themeClearCommand,
13194
13366
  themeShowCommand
@@ -13230,7 +13402,7 @@ function makeTraceSpanSummary(sinceMs = -Infinity) {
13230
13402
  return;
13231
13403
  }
13232
13404
  const endMs = span.endTimeUnixNano / 1e6;
13233
- if (isNone(make$7(endMs))) {
13405
+ if (isNone(make$8(endMs))) {
13234
13406
  skippedLineCount += 1;
13235
13407
  return;
13236
13408
  }
@@ -13310,7 +13482,7 @@ function formatTraceSummary(summary, limit) {
13310
13482
  ...summary.spans.length > limit ? ["", `${summary.spans.length - limit} more span names. Use --limit to show more.`] : []
13311
13483
  ].join("\n");
13312
13484
  }
13313
- const traceSummaryCommand = make$4("summary", {
13485
+ const traceSummaryCommand = make$5("summary", {
13314
13486
  baseDir: baseDirFlag$1,
13315
13487
  since: String$1("since").pipe(withSchema(DurationFromString), withDescription$1("Only count spans that ended in this window, for example 30m or 2h."), optional),
13316
13488
  limit: Int("limit").pipe(withSchema(PositiveInt), withDescription$1("Number of span names to show, busiest first."), withDefault(25))
@@ -13325,7 +13497,7 @@ const traceSummaryCommand = make$4("summary", {
13325
13497
  const summary = summarizer.finish();
13326
13498
  yield* log$1(summary.spanCount === 0 ? `No spans found in ${traceFilePath} or its rotated files${sinceMs === void 0 ? "" : " in that window"}.${summary.skippedLineCount > 0 ? ` Skipped ${summary.skippedLineCount} lines that are not spans.` : ""}` : formatTraceSummary(summary, flags.limit));
13327
13499
  })));
13328
- const traceCommand = make$4("trace").pipe(withDescription("Inspect the local server trace file."), withSubcommands([traceSummaryCommand]));
13500
+ const traceCommand = make$5("trace").pipe(withDescription("Inspect the local server trace file."), withSubcommands([traceSummaryCommand]));
13329
13501
  // src/cli/triagePrompt.ts
13330
13502
  /**
13331
13503
  * All text `p4c triage` hands to the coding agent. Kept as bare template strings
@@ -13622,7 +13794,7 @@ const runInteractiveSession = (input) => callback((resume) => {
13622
13794
  }))));
13623
13795
  child.once("exit", (code, signal) => resume(succeed$1(code ?? (signal === null ? 0 : 1))));
13624
13796
  });
13625
- const triageCommand = make$4("triage", {
13797
+ const triageCommand = make$5("triage", {
13626
13798
  baseDir: baseDirFlag$1,
13627
13799
  agent: Literals("agent", ["claude", "codex"]).pipe(withDescription$1("Agent CLI to use. Default: ask when both are installed."), optional),
13628
13800
  model: String$1("model").pipe(withDescription$1("Model passed through to the agent CLI. Default: the agent's default."), optional)
@@ -13703,12 +13875,12 @@ var ConnectPublicConfigMissingError = class extends UserError {
13703
13875
  return connectPublicConfigMissingMessage;
13704
13876
  }
13705
13877
  };
13706
- const connectUnavailableCommand = make$4("connect", { command: String$2("command").pipe(variadic) }).pipe(withDescription("P4 Connect is unavailable in builds without public configuration."), unlisted, withHandler(() => fail(new ShowHelp({
13878
+ const connectUnavailableCommand = make$5("connect", { command: String$2("command").pipe(variadic) }).pipe(withDescription("P4 Connect is unavailable in builds without public configuration."), unlisted, withHandler(() => fail(new ShowHelp({
13707
13879
  commandPath: ["p4c", "connect"],
13708
13880
  errors: [new ConnectPublicConfigMissingError({ cause: connectPublicConfigMissingMessage })]
13709
13881
  }))));
13710
- const makeCli = ({ cloudEnabled = hasCloudPublicConfig } = {}) => make$4("p4c", { ...sharedServerCommandFlags }).pipe(withDescription("Run the P4 Code server."), withHandler(runDefaultServerCommand), withSubcommands([
13711
- make$4("help").pipe(withDescription("Show command help."), withHandler(() => fail(new ShowHelp({
13882
+ const makeCli = ({ cloudEnabled = hasCloudPublicConfig } = {}) => make$5("p4c", { ...sharedServerCommandFlags }).pipe(withDescription("Run the P4 Code server."), withHandler(runDefaultServerCommand), withSubcommands([
13883
+ make$5("help").pipe(withDescription("Show command help."), withHandler(() => fail(new ShowHelp({
13712
13884
  commandPath: ["p4c"],
13713
13885
  errors: []
13714
13886
  })))),
@@ -13743,4 +13915,4 @@ function runCli() {
13743
13915
  }
13744
13916
  export { runCli };
13745
13917
 
13746
- //# sourceMappingURL=binCli-DzRO6f_z.mjs.map
13918
+ //# sourceMappingURL=binCli-CJGD6FcB.mjs.map