@p4code/cli 0.9.18 → 0.9.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AcpMcpStdioBridge-DbCGhPmy.mjs +3 -0
- package/dist/{AcpMcpStdioBridge-4vUttgH1.mjs → AcpMcpStdioBridge-DxIZyDJz.mjs} +4 -4
- package/dist/{Effect-_Rz7VLdg.mjs → Effect-BqRgldaH.mjs} +20 -4
- package/dist/{Schema-APnY3Ozr.mjs → Schema-CkGB1Dgx.mjs} +2 -2
- package/dist/{Stream-CJtpwu3-.mjs → Stream-DZTo5F3N.mjs} +2 -2
- package/dist/{TraceDiagnostics-CeQ-TvdA.mjs → TraceDiagnostics-BYrlvKdA.mjs} +278 -50
- package/dist/bin.mjs +2 -2
- package/dist/{binCli-DzRO6f_z.mjs → binCli-DReuiGmk.mjs} +297 -125
- package/dist/claude-history-worker.mjs +1 -1
- package/dist/{claudeHistoryWorker-B6KX_N9G.mjs → claudeHistoryWorker-Cst8OnLH.mjs} +1 -1
- package/dist/{claudeHistoryWorker-DZ1Ft4NK.mjs → claudeHistoryWorker-r4mV4Dxy.mjs} +2 -2
- package/dist/client/.vite/manifest.json +2139 -2127
- package/dist/client/assets/{2NI2N5EU-Ds9jiLPm.js → 2NI2N5EU-DjM2qwkD.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-BWEQQJHY.js → 4UO7MD6I-BJdq41GZ.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-lcm66GRf.js → 5B3SVYGG-D21CBy6j.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-DegG64te.js → 5GK6JWQ2-DOIdqlC8.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-CDv2ioO3.js → 5N7A7DKN-Bckll9rH.js} +2 -2
- package/dist/client/assets/{5OC2THR4-CaZVvwg8.js → 5OC2THR4-skJPz5iO.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-B8WMtvrw.js → 5S6HY5KT-CRwXaSb1.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-R-et-GtO.js → 6IMQ5BUJ-sJYhkmUL.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-CdOZHr7D.js → 6OLKWJ4F-DY2aNKk1.js} +2 -2
- package/dist/client/assets/{74OO7NKP-DVS5qE0v.js → 74OO7NKP-DpZyVE6P.js} +2 -2
- package/dist/client/assets/{75O6YZUN-B6bJpGs2.js → 75O6YZUN-8DIThGtQ.js} +2 -2
- package/dist/client/assets/{77XECAW3-DDozcJnk.js → 77XECAW3-BE-MTjvu.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-BZd5-ucB.js → ABYRPUBD-DB_eiHX6.js} +2 -2
- package/dist/client/assets/AlertDialogRoot-COfNlajP.js +2 -0
- package/dist/client/assets/{AnimatedHeight-CsOfc5H1.js → AnimatedHeight-BoS1RBdk.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell--2lH1vql.js → AuthSurfaceShell-BM3c1qJe.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-DAb-WdIu.js → BB2UYUI2-BhRNS6b8.js} +2 -2
- package/dist/client/assets/{BUM34MOA-DMU6CGcz.js → BUM34MOA-RvYWUXux.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-BnDJUiDl.js → CEQABKGZ-byct14yE.js} +2 -2
- package/dist/client/assets/{CXAC5362-QKBU6D2s.js → CXAC5362-YcQsQFwj.js} +2 -2
- package/dist/client/assets/ChatGptUsageButton-BQOZ260S.js +2 -0
- package/dist/client/assets/ChatMarkdown-BdoTEVpd.js +49 -0
- package/dist/client/assets/{CheckboxIndicator-CLFg8-A1.js → CheckboxIndicator-Dj91Im5z.js} +2 -2
- package/dist/client/assets/{ClippedText-aNLi0IDp.js → ClippedText-CmBRrYNb.js} +2 -2
- package/dist/client/assets/CodexSetupSection.logic-CseyxFgK.js +2 -0
- package/dist/client/assets/{CollapsiblePanel-BlUD5mJC.js → CollapsiblePanel-BwDr-EKA.js} +2 -2
- package/dist/client/assets/{ComboboxClear-DKHwuDAL.js → ComboboxClear-DeqR6c-6.js} +2 -2
- package/dist/client/assets/{ComboboxGroupLabel-BaZLyLCv.js → ComboboxGroupLabel-Dk-MF4sD.js} +2 -2
- package/dist/client/assets/{CommandBlock-Bg2O3rbF.js → CommandBlock-Cg8P2GXg.js} +2 -2
- package/dist/client/assets/{CompositeRoot-_C3uLH2F.js → CompositeRoot-Cx12XSsh.js} +2 -2
- package/dist/client/assets/{ConnectAgentSurface-D-fMTn_R.js → ConnectAgentSurface-D9MYjA6g.js} +2 -2
- package/dist/client/assets/{ConnectionStatusDot-vOKtZfeV.js → ConnectionStatusDot-BnhNFCMA.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-DvpJAT6K.js → DRLTVNUE-BZ7eTlHc.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-DFSg5DAZ.js → DYY6UVD2-DIWnFjlV.js} +2 -2
- package/dist/client/assets/{DevicePanel-Dvozgov3.js → DevicePanel-CpWnw2HZ.js} +2 -2
- package/dist/client/assets/DeviceSetup-C02U1yvN.js +2 -0
- package/dist/client/assets/{DialogTitle-C9j5Tmuy.js → DialogTitle-5cBExuFs.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-CAml763Q.js → DiffCommentAnnotation-CHYeyesq.js} +3 -3
- package/dist/client/assets/{DiffFileTree-2Y-Da6MW.js → DiffFileTree-zq0G5Jq3.js} +2 -2
- package/dist/client/assets/DiffPanel-ghqOrQdi.js +2 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-Czi5bOUV.js → DiffWorkerPoolProvider-QbRiMHeR.js} +3 -3
- package/dist/client/assets/{EmbeddedDesign-AHra-cLY.js → EmbeddedDesign-ExUecHKZ.js} +6 -6
- package/dist/client/assets/{EnvironmentMachineIcon-BnMVjB89.js → EnvironmentMachineIcon-Lz2YGk0G.js} +2 -2
- package/dist/client/assets/{ExpandableText-gKNgCxfU.js → ExpandableText-B034p2kF.js} +2 -2
- package/dist/client/assets/{FNOVOB4O-D2IqnTWb.js → FNOVOB4O-Cch7VyQQ.js} +2 -2
- package/dist/client/assets/{FieldControl-Bjdbc6Ii.js → FieldControl-H6iQvC-Q.js} +2 -2
- package/dist/client/assets/{FileDiff-Di0hvnyJ.js → FileDiff-C1_8HZ7T.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-2-RLs_YZ.js → FilePreviewPanel-DERxofVe.js} +6 -6
- package/dist/client/assets/FoldedSettingsSection-okCu3zVD.js +2 -0
- package/dist/client/assets/{HDGCDEEZ-AZF834xy.js → HDGCDEEZ-CJ_9BjZ0.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-Dtz-7WMf.js → HSJLKHB7-BvfNYUiJ.js} +2 -2
- package/dist/client/assets/{Icons-BzIBDVKW.js → Icons-DmQwwfAN.js} +2 -2
- package/dist/client/assets/Input-DWc7cRWt.js +2 -0
- package/dist/client/assets/{IntervalSecondsField-Fdrpvkqj.js → IntervalSecondsField-S7jLIub2.js} +2 -2
- package/dist/client/assets/JZOYTAAL-RUIcMwMn.js +1 -0
- package/dist/client/assets/{K3MD6TGW-BPz_yQfQ.js → K3MD6TGW-C513S1_s.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-C-IhAYzY.js → K7RP3OMA-zhgZmSWl.js} +2 -2
- package/dist/client/assets/{KeybindingsSettings.logic-DjD-8Wsr.js → KeybindingsSettings.logic-C6XG7NtX.js} +2 -2
- package/dist/client/assets/{LHDIQX7Q-Dw7FK-yZ.js → LHDIQX7Q-BmjYN5gQ.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-Cp4yLfcO.js → LUXOKEGN-B0Kwi43W.js} +2 -2
- package/dist/client/assets/{LinkMachineSelect-v3ZAAPFG.js → LinkMachineSelect-GyKAeGYQ.js} +2 -2
- package/dist/client/assets/{MathTypeset-CAVYwtpt.js → MathTypeset-DfU_zRMI.js} +2 -2
- package/dist/client/assets/ModelLiveLayer-DjtYQpVe.js +3 -0
- package/dist/client/assets/{N3JZAHOW-sZve4CbV.js → N3JZAHOW-BXB2c-Us.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-DMlKhtdq.js → NUIALGQ3-BkehuL9A.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-B0ChXuQG.js → NoProjectsHero-C-VNr8Ui.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-COhBlGA1.js → O65XPQGZ-CPn-XJue.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-D-y75rjS.js → O7XIQ6OM-DAQPVVnq.js} +2 -2
- package/dist/client/assets/{OFQON5FD-kw-f4mV4.js → OFQON5FD-BKoNBxEK.js} +2 -2
- package/dist/client/assets/{P4ConnectAccountPages-BXM_FJyy.js → P4ConnectAccountPages-C_7SfUQ2.js} +2 -2
- package/dist/client/assets/{P4ConnectSidebarSignIn-D8uwPPR6.js → P4ConnectSidebarSignIn-B6e-wkqI.js} +2 -2
- package/dist/client/assets/{PJQHF43J-Dww1R-k6.js → PJQHF43J-Byb4NdRa.js} +2 -2
- package/dist/client/assets/PanelLayoutControls-BpjspxNc.js +216 -0
- package/dist/client/assets/{PierreEntryIcon-C-5f-jFb.js → PierreEntryIcon-h4qT502J.js} +2 -2
- package/dist/client/assets/{PopoverHandle-BwqnKm9Y.js → PopoverHandle-DEcvmS0k.js} +2 -2
- package/dist/client/assets/PreviewPanel-lT6UT8SC.js +2 -0
- package/dist/client/assets/{ProjectDefaultsSettings-rvN_67Gu.js → ProjectDefaultsSettings-nqWOPUBM.js} +2 -2
- package/dist/client/assets/{ProjectFavicon-CPvmNs3J.js → ProjectFavicon-wwkvNTYJ.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-blbck4gY.js → ProjectIconPickerDialog-CAEx0HQF.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-Cesz5yVS.js → ProjectMonogram-C8btbogu.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-BXGE9cPY.js → ProviderAuthTerminal-Seln-0IQ.js} +2 -2
- package/dist/client/assets/ProviderModelPicker-p5oWTfTD.js +2 -0
- package/dist/client/assets/{ProviderSettingsForm-CRvI8mDe.js → ProviderSettingsForm-DP5cO9tc.js} +2 -2
- package/dist/client/assets/PullRequestCodeTab-BhWK4Zqq.js +6 -0
- package/dist/client/assets/{RHNBAITX-CY4FKVtu.js → RHNBAITX-ZKmIoa8f.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-DK9ZCAf4.js → ReadOnlySourcePreview-C8hhN481.js} +2 -2
- package/dist/client/assets/{RedactedSensitiveText-DrIhPFXw.js → RedactedSensitiveText-BMXImj30.js} +2 -2
- package/dist/client/assets/RenderErrorBoundary-CYWiIuBa.js +23 -0
- package/dist/client/assets/{RightPanelResizeHandle-DBCfKzRv.js → RightPanelResizeHandle-Cog3JVw0.js} +2 -2
- package/dist/client/assets/{SLD4V6NK-Dtrbq5qR.js → SLD4V6NK-BW_1--rc.js} +2 -2
- package/dist/client/assets/{ScheduledTasksSettings-CvbQDrJp.js → ScheduledTasksSettings-D6cHBUhW.js} +6 -6
- package/dist/client/assets/{ScopedSwitch-DQHfQgMZ.js → ScopedSwitch-BzU8Hn6s.js} +2 -2
- package/dist/client/assets/{ScrollAreaCorner-B9Aiu69u.js → ScrollAreaCorner-DFCZuJ0r.js} +2 -2
- package/dist/client/assets/{SecretInput-CxJl9pux.js → SecretInput-CRgvNUgU.js} +2 -2
- package/dist/client/assets/{SelectScrollUpArrow-Dj2om6Qx.js → SelectScrollUpArrow-C-MWJdyw.js} +2 -2
- package/dist/client/assets/{SelfImproveSettingsSection-yFj7aCio.js → SelfImproveSettingsSection--Dcxxm73.js} +2 -2
- package/dist/client/assets/{SettingsPanels-H_7XUe5G.js → SettingsPanels-C79826rW.js} +7 -7
- package/dist/client/assets/{SettingsPanels.logic-BYLv56aj.js → SettingsPanels.logic-DPfiTtgf.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-pJqEfHRd.js → SettingsScopeNotice-C9OAfACb.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-DWShR_RZ.js → SidebarStageBackdrop-syJ1VaYP.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-BFmO9IZ-.js → T3PCR2KE-Bc51hYDo.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-DMeVANpK.js → TKWO2OVW-mV-gJkJw.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-COvYTPCc.js → TSHNXIZL-Bs_azRDw.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-BxOl9N6E.js → ThemeEditorPanel-DvlDdC-r.js} +3 -3
- package/dist/client/assets/{ThreadDetailsItemsMenu-BXQbo6bY.js → ThreadDetailsItemsMenu-DFAwPwtf.js} +44 -44
- package/dist/client/assets/ThreadTerminalDrawer-CBRpijGu.js +5 -0
- package/dist/client/assets/TooltipProvider-DiV5KdTq.js +2 -0
- package/dist/client/assets/{UQJE5E4I-CajoppS3.js → UQJE5E4I-DL8IPyLr.js} +2 -2
- package/dist/client/assets/{USNYFO5S-BQLaJAkC.js → USNYFO5S-CxX5m2eb.js} +2 -2
- package/dist/client/assets/{Virtualizer-kAxtf9JI.js → Virtualizer-hL0IrPqB.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-Bn1CMBLe.js → WEVWDWVA-CCg7BLOe.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-KdZMrP13.js → WorkspaceBreadcrumb-Cok6l_SJ.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-VqvvyrKx.js → WorkspacePageContainer-_--jFIZ8.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-Ca7-ugiS.js → WorkspacePageHeader-CJB6rvZc.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-CPBgn0uR.js → X5RFHQXM-CoEhAoaG.js} +2 -2
- package/dist/client/assets/{X62E3GBT-DEsBFWSE.js → X62E3GBT-v3am3MF5.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-rIiejuIa.js → XBNEOJTC-CNH8QiJb.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-FepTeOr1.js → YHV2MVVZ-BAtBSLld.js} +2 -2
- package/dist/client/assets/{YURCZMG2-Co7j1onF.js → YURCZMG2-B0qIfRPW.js} +2 -2
- package/dist/client/assets/{YVG2LODB-CH8YtqJ9.js → YVG2LODB-7yKJRNqu.js} +2 -2
- package/dist/client/assets/_chat-CPyEKO_k.js +47 -0
- package/dist/client/assets/_chat.design-BkPz6B_R.js +2 -0
- package/dist/client/assets/{_chat.index-DZmhCx_Q.js → _chat.index-DGRldHwy.js} +2 -2
- package/dist/client/assets/{_chat.new-BLxqLetm.js → _chat.new-Be-FWv3w.js} +2 -2
- package/dist/client/assets/_chat.pull-requests-Csb_f8e_.js +2 -0
- package/dist/client/assets/{alert-BdISKl4u.js → alert-D6WJ0q4-.js} +2 -2
- package/dist/client/assets/{alert-dialog-Broi1wym.js → alert-dialog-DsMTn0ZK.js} +2 -2
- package/dist/client/assets/{assetUrls-DyJx-URx.js → assetUrls-CsEDCYyh.js} +2 -2
- package/dist/client/assets/assets-CA-ZYmQr.js +2 -0
- package/dist/client/assets/{browserHistoryStore-zdRsIuMc.js → browserHistoryStore-BVGoot2u.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-aye_Gpt4.js → browserLinkTarget-zjhG9Lyg.js} +2 -2
- package/dist/client/assets/{checkbox-ueGFMqVv.js → checkbox-Cw33xyU7.js} +2 -2
- package/dist/client/assets/{color-picker-CUoPp4AJ.js → color-picker-Bmtarpj9.js} +2 -2
- package/dist/client/assets/{combobox-BfOjf6Iu.js → combobox-D6RfzdE7.js} +2 -2
- package/dist/client/assets/{command-CeMH9lgx.js → command-1dJ-vX2N.js} +2 -2
- package/dist/client/assets/{connect-CQUjsv6p.js → connect-BdyG6QZP.js} +2 -2
- package/dist/client/assets/connect-agent-BZgF1WVU.js +2 -0
- package/dist/client/assets/{design-BL2REeQ-.js → design-9PZeJvkV.js} +2 -2
- package/dist/client/assets/{device-DUMKyegd.js → device-B_zaE4OU.js} +2 -2
- package/dist/client/assets/{dialog-BzESHWgr.js → dialog-5OaxRXCC.js} +2 -2
- package/dist/client/assets/{diffPanelStore-B-hQEy6C.js → diffPanelStore-D3ARjaef.js} +2 -2
- package/dist/client/assets/{diffRendering-BnN6RWwy.js → diffRendering-aGA2PUMV.js} +2 -2
- package/dist/client/assets/{dist--Lo1A95S.js → dist-DQanjDEK.js} +3 -3
- package/dist/client/assets/{draft-input-BozMgkbl.js → draft-input-DM7mC5ty.js} +2 -2
- package/dist/client/assets/{duoViewer-mOZwt5UN.js → duoViewer-WUHHsw83.js} +2 -2
- package/dist/client/assets/{dynamic-3CmgXeht.js → dynamic-BrZIqKQ1.js} +3 -3
- package/dist/client/assets/{embeddedScripts-g3gqCUmg.js → embeddedScripts-Bjon5VEq.js} +2 -2
- package/dist/client/assets/{empty-CeYEMFdG.js → empty-VkAC9qIO.js} +2 -2
- package/dist/client/assets/entities-iVR9hStG.js +2 -0
- package/dist/client/assets/{fileLinks-LQyYck3z.js → fileLinks-ZsyrXe-F.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-CY-keZ2e.js → fileTreeExpansion-CZA6X0sP.js} +2 -2
- package/dist/client/assets/fold-vertical-CN9ryhZz.js +2 -0
- package/dist/client/assets/{getDiffFileInput-ClUa7N40.js → getDiffFileInput-C973oCCO.js} +2 -2
- package/dist/client/assets/{htmlRender-CxBGTvqW.js → htmlRender-DYI6n9Xo.js} +2 -2
- package/dist/client/assets/index-ColdECgE.js +3 -0
- package/dist/client/assets/{input-K95B1E2P.js → input-CiPGmOLv.js} +2 -2
- package/dist/client/assets/{input-group-BAbOiIZs.js → input-group-DOUsG7P-.js} +2 -2
- package/dist/client/assets/{kbd-D9Q8zN3_.js → kbd-C8opCm5n.js} +2 -2
- package/dist/client/assets/{keybindings-C427DPQo.js → keybindings-CbaDrm2P.js} +2 -2
- package/dist/client/assets/{lazy-BDrl-IrZ.js → lazy-BWBxhQ9c.js} +4 -4
- package/dist/client/assets/{lazyRouteComponent-Bi84pz13.js → lazyRouteComponent-BZe6tHvz.js} +2 -2
- package/dist/client/assets/{link-B57I0_wC.js → link-BHR6GsRr.js} +2 -2
- package/dist/client/assets/{linkedPrompt-zM8XlD0_.js → linkedPrompt-CN5vzMKu.js} +2 -2
- package/dist/client/assets/main-i3nSjwXu.css +2 -0
- package/dist/client/assets/main-xeaL6Ue7.js +38 -0
- package/dist/client/assets/mediaReference-D4xASAKr.js +2 -0
- package/dist/client/assets/{mediaSource-BQkNpHYP.js → mediaSource-DJf0a3Hm.js} +2 -2
- package/dist/client/assets/{modelScene-DWYEc7-j.js → modelScene-Dg2T9WKU.js} +2 -2
- package/dist/client/assets/{number-field-D6t0GpAB.js → number-field-BkDsfSCt.js} +2 -2
- package/dist/client/assets/{observeResize-nOwAB2yP.js → observeResize-BESwMMOy.js} +2 -2
- package/dist/client/assets/{onboarding-BpYTNtvC.js → onboarding-7dyWHc7v.js} +2 -2
- package/dist/client/assets/{openFileInPreview-DFpXOfx7.js → openFileInPreview-l71la8rp.js} +2 -2
- package/dist/client/assets/{p4ProjectFile-Dkwk3dWQ.js → p4ProjectFile-CC8L8IBq.js} +2 -2
- package/dist/client/assets/{pair-Bc34xPWk.js → pair-CjGF7d0N.js} +2 -2
- package/dist/client/assets/{pendingSendStore-ettG1x40.js → pendingSendStore-CX8QB7C5.js} +2 -2
- package/dist/client/assets/{phoneViewer-BCeyyPaZ.js → phoneViewer-CpRP0Ylg.js} +2 -2
- package/dist/client/assets/{pierre-icons-C2-xRx0J.js → pierre-icons-CX8MNnZC.js} +2 -2
- package/dist/client/assets/{popover-CtPuvMeZ.js → popover-hyDlWUPU.js} +2 -2
- package/dist/client/assets/{preview-CS0uw3GP.js → preview-DX0t2QY_.js} +2 -2
- package/dist/client/assets/{preview-DIIM6Lws.js → preview-DnCP9Q0k.js} +2 -2
- package/dist/client/assets/{previewMiniPlayerStore-oJw0qrRM.js → previewMiniPlayerStore-DByen2Nk.js} +2 -2
- package/dist/client/assets/{primary-B0bbGdiR.js → primary-BvBZk3BL.js} +2 -2
- package/dist/client/assets/primaryCloudLinkState-CHXPTqr2.js +2 -0
- package/dist/client/assets/{projectFilesQueryState-DpLF9eJd.js → projectFilesQueryState-D1KYNZXm.js} +2 -2
- package/dist/client/assets/{projectScriptEditor-Bp7idsB3.js → projectScriptEditor-Dy8U6TBl.js} +2 -2
- package/dist/client/assets/providerSkills-CpjiWlTj.js +2 -0
- package/dist/client/assets/{pullRequestDetail.logic-8vF2qB9V.js → pullRequestDetail.logic-CHJRE71s.js} +3 -3
- package/dist/client/assets/{pullRequestIcons-6_4tgVDN.js → pullRequestIcons-1lUVOGQJ.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-C8_coQYO.js → pullRequestReviewStore-CUZ0N4F2.js} +2 -2
- package/dist/client/assets/pullRequests-DjzqqdNY.js +2 -0
- package/dist/client/assets/queries-D2fZuj-t.js +2 -0
- package/dist/client/assets/{query-DpmTmXUV.js → query-CeIgbVxh.js} +2 -2
- package/dist/client/assets/{radio-group-DSfZzUu8.js → radio-group-C14CASyG.js} +2 -2
- package/dist/client/assets/relay-aZlRxOWS.js +2 -0
- package/dist/client/assets/{renderScheduler-Cvu4oEGc.js → renderScheduler-BLaTctiX.js} +2 -2
- package/dist/client/assets/{rightPanelStore-D-meSGn7.js → rightPanelStore-Bt0unAo8.js} +2 -2
- package/dist/client/assets/runtime-D5AfNyNA.js +7 -0
- package/dist/client/assets/{runtimeModeConfig-MYD8WQl8.js → runtimeModeConfig-DymGoV55.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-DmlMHwKF.js → scheduledTasksSettings.logic-BjvsiCPJ.js} +3 -3
- package/dist/client/assets/{scroll-area-D9QT2Odm.js → scroll-area-D2D-AlvC.js} +2 -2
- package/dist/client/assets/{select-BtqP8nTL.js → select-CE2f-g-3.js} +2 -2
- package/dist/client/assets/{selfImproveFindings-DZS7PCvJ.js → selfImproveFindings-Bhi6QF1b.js} +2 -2
- package/dist/client/assets/{server-BYnv0CK4.js → server-B2y_yoz_.js} +2 -2
- package/dist/client/assets/{session-BryEqNW-.js → session-Dt_Dt-Og.js} +2 -2
- package/dist/client/assets/session-logic-CPQJM-gL.js +27 -0
- package/dist/client/assets/{settings-A-pqSt1Y.js → settings-BIR_Igib.js} +2 -2
- package/dist/client/assets/{settings.appearance-C_uChPSz.js → settings.appearance-D0uNLG6m.js} +2 -2
- package/dist/client/assets/settings.archived-DHE_0aGh.js +2 -0
- package/dist/client/assets/{settings.computer-use-Dg_7f0JL.js → settings.computer-use-CNVg4Kl5.js} +2 -2
- package/dist/client/assets/settings.connections-Bt5upKXR.js +2 -0
- package/dist/client/assets/{settings.data-controls-SDdipjc2.js → settings.data-controls-Bu-fCPHf.js} +2 -2
- package/dist/client/assets/{settings.decisions-CoyKjdc1.js → settings.decisions-B9lckxtw.js} +2 -2
- package/dist/client/assets/{settings.designs-4eHPAt6y.js → settings.designs-CLLnQttY.js} +2 -2
- package/dist/client/assets/settings.diagnostics-Bl2X85nQ.js +2 -0
- package/dist/client/assets/{settings.general-DAWqQIHm.js → settings.general-CJSdSR2k.js} +2 -2
- package/dist/client/assets/settings.integrations-DRpNV9D5.js +2 -0
- package/dist/client/assets/{settings.keybindings-B0oNRJrN.js → settings.keybindings-BPtpYe84.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-BI8-fEG8.js → settings.open-source-licenses-DYpshDh1.js} +2 -2
- package/dist/client/assets/{settings.plugins-B6My9wD7.js → settings.plugins-C9ZOoiar.js} +4 -4
- package/dist/client/assets/settings.projects-CMHQJUvG.js +4 -0
- package/dist/client/assets/settings.providers-Bfr9fIiF.js +3 -0
- package/dist/client/assets/{settings.scheduled-tasks-Bx6ZIK0R.js → settings.scheduled-tasks-BEYOe2xs.js} +2 -2
- package/dist/client/assets/{settings.secrets-Dt4ORQnt.js → settings.secrets-DIyDPOQx.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-CytMd2pC.js → settings.snap-shot-DmjWtA3x.js} +2 -2
- package/dist/client/assets/settings.source-control-DvaOZ7kM.js +2 -0
- package/dist/client/assets/{settings.storage-BfvQd358.js → settings.storage-B4XbjYVO.js} +2 -2
- package/dist/client/assets/settingsLayout-Ds1fJJk7.js +3 -0
- package/dist/client/assets/{sidebar-DbrWNN9-.js → sidebar-4oe_dr6q.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-CZnpDNTf.js → sidebarProjectGrouping-RQlsFe56.js} +2 -2
- package/dist/client/assets/{skeleton-DxuQc9Kk.js → skeleton-D6RVfMa8.js} +2 -2
- package/dist/client/assets/{sourceControl-BbrGhAuF.js → sourceControl-BhvxhaEx.js} +2 -2
- package/dist/client/assets/sourceControlClients-Bs5R87fg.js +2 -0
- package/dist/client/assets/{spinner-DmRIQvmI.js → spinner-C-qDE4WQ.js} +2 -2
- package/dist/client/assets/src-R7EkrVcv.js +15 -0
- package/dist/client/assets/terminal-links-BohHFDfc.js +2 -0
- package/dist/client/assets/terminalSessions-Cnj30QDx.js +2 -0
- package/dist/client/assets/{textarea-C_3SxeEV.js → textarea-CWbMGhL9.js} +2 -2
- package/dist/client/assets/{themePalette-DSR5tBE9.js → themePalette-B_fGWNEh.js} +3 -3
- package/dist/client/assets/{threadCheckpoints-D0dMlqZE.js → threadCheckpoints-B88N2CXf.js} +2 -2
- package/dist/client/assets/{toggle-Zti3zuzr.js → toggle-CKr6iZUR.js} +2 -2
- package/dist/client/assets/{toggle-group-D015gcqT.js → toggle-group-B1WN0Pgy.js} +2 -2
- package/dist/client/assets/{tooltip-CAzkzAoH.js → tooltip-CCYU8XGM.js} +2 -2
- package/dist/client/assets/uiStateStore-BZ4RuLIL.js +2 -0
- package/dist/client/assets/unfold-vertical-CldLe1hB.js +2 -0
- package/dist/client/assets/{usage-BJA7zQoS.js → usage-GID8Ml88.js} +2 -2
- package/dist/client/assets/{usageAccess-D5FAb4jV.js → usageAccess-B0nqd8U-.js} +2 -2
- package/dist/client/assets/{usageFormat-Njxx7Q49.js → usageFormat-CUSzTPTq.js} +2 -2
- package/dist/client/assets/{usageShortcuts-DuJeedG7.js → usageShortcuts-jGu1QJHr.js} +2 -2
- package/dist/client/assets/{use-atom-command-DMW6SFOx.js → use-atom-command-QDd_NqJQ.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-E7KNTqMb.js → useAriaLabelledBy-CJvtvui4.js} +2 -2
- package/dist/client/assets/useHandleNewThread-ClgC6Lcw.js +2 -0
- package/dist/client/assets/{useLocation-hVHAnHTx.js → useLocation-KvBZAN7v.js} +2 -2
- package/dist/client/assets/{useNavigate-B7EiSugn.js → useNavigate-DXSBYc-k.js} +2 -2
- package/dist/client/assets/{useNavigateBack-BC3GGm7e.js → useNavigateBack-DzR35iiJ.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-D3qxx30I.js → useP4ConnectAuthPrompt-DMl-0U53.js} +2 -2
- package/dist/client/assets/{useParams-C5b2x5BH.js → useParams-D9reDvT8.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-Zf48W2tu.js → usePermissionStatus-C5YvHVz-.js} +2 -2
- package/dist/client/assets/{usePopupViewport-Dtwu2x5j.js → usePopupViewport-D7yp2NvZ.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-BtPaWuCg.js → usePullRequestActions-CJvtylIq.js} +2 -2
- package/dist/client/assets/{useRegisterFieldControl-BMmbsxkx.js → useRegisterFieldControl-D-hYtXkm.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-BIveWOlk.js → useScopedModelAvailability-DGPFTMHL.js} +2 -2
- package/dist/client/assets/useSettings-BJR7Rf97.js +3 -0
- package/dist/client/assets/utils-DkKLB01I.js +24 -0
- package/dist/client/assets/vcsRefInvalidation-Bnup-5J0.js +2 -0
- package/dist/client/assets/welcome-CMuTnFAm.js +2 -0
- package/dist/client/index.html +1 -1
- package/dist/{mcpResponsePayloads-BBvPAlwj.mjs → mcpResponsePayloads-tqyeJD3c.mjs} +10 -9
- package/dist/{ProjectCloneTracker-DAE46hjz.mjs → preview-DcFC_OYY.mjs} +902 -438
- package/dist/{renderer-iWfzRWCX.mjs → renderer-CswgrCon.mjs} +2 -2
- package/dist/{runtime-CllDK9QU.mjs → runtime-Bec3_bh8.mjs} +3 -3
- package/dist/{runtimeLayer-D1H3yRj8.mjs → runtimeLayer-B6H9jZgZ.mjs} +1 -1
- package/dist/{runtimeLayer-CblMBDQ6.mjs → runtimeLayer-D4LpzNmS.mjs} +3263 -2983
- package/dist/{server-vm1eH-y1.mjs → server-4nWc1d6L.mjs} +385 -229
- package/dist/{sha2-9FUhed4s.mjs → sha2-BfCJmkJJ.mjs} +47 -8
- package/package.json +1 -1
- package/dist/AcpMcpStdioBridge-RQnwhGrw.mjs +0 -3
- package/dist/client/assets/AlertDialogRoot-D2Lzxp77.js +0 -2
- package/dist/client/assets/ChatGptUsageButton-CM16mB7z.js +0 -2
- package/dist/client/assets/ChatMarkdown-LYkpVHJO.js +0 -49
- package/dist/client/assets/CodexSetupSection.logic-CNAX4_fV.js +0 -2
- package/dist/client/assets/DeviceSetup-O_9LLGD9.js +0 -2
- package/dist/client/assets/DiffPanel-CDixqNzb.js +0 -2
- package/dist/client/assets/FoldedSettingsSection-CrJX4FnL.js +0 -2
- package/dist/client/assets/Input-BWhtnCC0.js +0 -2
- package/dist/client/assets/JZOYTAAL-BCdmxsmo.js +0 -1
- package/dist/client/assets/ModelLiveLayer-CxX5pYmA.js +0 -3
- package/dist/client/assets/PanelLayoutControls-CC5OYRRR.js +0 -216
- package/dist/client/assets/PreviewPanel-BvRNyyKQ.js +0 -2
- package/dist/client/assets/ProviderModelPicker-Cq3CogU6.js +0 -2
- package/dist/client/assets/PullRequestCodeTab-C5kr72DG.js +0 -6
- package/dist/client/assets/RenderErrorBoundary-DgYrYlQR.js +0 -23
- package/dist/client/assets/ThreadTerminalDrawer-DcYWT4k2.js +0 -5
- package/dist/client/assets/TooltipProvider-BzOo4iyi.js +0 -2
- package/dist/client/assets/_chat-DoDgVLYz.js +0 -47
- package/dist/client/assets/_chat.design-C593M39o.js +0 -2
- package/dist/client/assets/_chat.pull-requests-0Ce1mGUC.js +0 -2
- package/dist/client/assets/assets-lJdcWn_Q.js +0 -2
- package/dist/client/assets/connect-agent-DsQQcex2.js +0 -2
- package/dist/client/assets/entities-CpJdh0W5.js +0 -2
- package/dist/client/assets/fold-vertical-BscQ96iN.js +0 -2
- package/dist/client/assets/index-BWKkBtFt.js +0 -3
- package/dist/client/assets/main-C8b9a0ht.js +0 -37
- package/dist/client/assets/main-CCH0X0zL.css +0 -2
- package/dist/client/assets/mediaReference-BIsAfUoY.js +0 -2
- package/dist/client/assets/primaryCloudLinkState-B6CxZwAR.js +0 -2
- package/dist/client/assets/providerSkills-yqPKKW6i.js +0 -2
- package/dist/client/assets/pullRequests-u-PJpGXV.js +0 -2
- package/dist/client/assets/queries-DDAXRF4r.js +0 -2
- package/dist/client/assets/relay-CnLeC-mg.js +0 -2
- package/dist/client/assets/runtime-DUPVFypn.js +0 -7
- package/dist/client/assets/session-logic-DZfPxiBF.js +0 -26
- package/dist/client/assets/settings.archived-BtKfrhpi.js +0 -2
- package/dist/client/assets/settings.connections-CHawbHDz.js +0 -2
- package/dist/client/assets/settings.diagnostics-BFlcsuN0.js +0 -2
- package/dist/client/assets/settings.integrations-CpUf4-MX.js +0 -2
- package/dist/client/assets/settings.projects-hrhEEIli.js +0 -4
- package/dist/client/assets/settings.providers-BKeGnq6G.js +0 -3
- package/dist/client/assets/settings.source-control-B6eUVvNg.js +0 -2
- package/dist/client/assets/settingsLayout-BijX6mlS.js +0 -3
- package/dist/client/assets/sourceControlClients-CG8qRQgm.js +0 -2
- package/dist/client/assets/src-BZzGU-vc.js +0 -15
- package/dist/client/assets/terminal-links-FD1wyGOp.js +0 -2
- package/dist/client/assets/terminalSessions-D1m7FXoa.js +0 -2
- package/dist/client/assets/uiStateStore-B0Z02qoV.js +0 -2
- package/dist/client/assets/unfold-vertical-DeuiNAAp.js +0 -2
- package/dist/client/assets/useHandleNewThread-Cmiu3y4G.js +0 -2
- package/dist/client/assets/useSettings-C6RmJr-q.js +0 -3
- package/dist/client/assets/utils-Cs97wR6T.js +0 -24
- package/dist/client/assets/vcsRefInvalidation-CAa5en8i.js +0 -2
- 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,
|
|
4
|
-
import { A as NullOr, B as String$6, C as Literals$
|
|
5
|
-
import { $c as
|
|
6
|
-
import { Di as OrchestratorMcpThreadReadResult,
|
|
7
|
-
import { Gn as round, Un as Order, Y as mkString, bn as take, l as decodeText } from "./Stream-
|
|
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$
|
|
9
|
-
import { i as runAcpMcpCliFastPath, r as mcpToolSession } from "./AcpMcpStdioBridge-
|
|
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-DcFC_OYY.mjs";
|
|
6
|
+
import { $d as filterStatusOk, Ap as AuthRelayWriteScope, Cd as Path, Di as OrchestratorMcpThreadReadResult, Fd as empty$2, Gr as AgentAssetKind, Gu as params, Hr as AgentAsset, Hs as RelayOkResponse, Hu as add, Jm as CommandId, Jr as AgentAssetWriteInput, Kr as AgentAssetListFilter, Ma as DATABASE_COMPACTION_RECOMMENDED_BYTES, Mp as AuthStandardClientScopes, Pf as isHttpClientError, Qm as EnvironmentId, Sp as AuthMcpClientAccess, Ti as OrchestratorMcpThreadListResult, Ur as AgentAssetFiles, Vr as AGENT_ASSET_TOTAL_MAX_BYTES, Wr as AgentAssetId, Xf as FileSystem, Xi as EnvironmentThemeFile, Xu as addressFormattedWith, Yr as agentAssetTotalBytes, Zi as EnvironmentThemeId, _f as get$1, af as schemaBodyJson, ah as PortSchema, bp as AuthGrantScope, bs as EnvironmentHttpCommonError, cd as HttpServerRequest, cs as DesktopAppActivationResponse, fi as OrchestratorMcpFailure, fs as DesktopBackendBootstrap, gf as del, ji as OrchestratorMcpThreadWaitResult, js as formatConnectReachable, ki as OrchestratorMcpThreadSendResult, kp as AuthRelayReadScope, lf as bearerToken, mh as RunId, na as environmentThemeFileHasColors, oh as PositiveInt, op as ExecutionEnvironmentDescriptor, qr as AgentAssetName, qu as serve, sh as ProjectId, ss as DesktopAppActivationErrorCode, t as sha256, vh as ThreadId, vs as EnvironmentHttpApi, yh as TrimmedNonEmptyString, zd as jsonUnsafe, zm as AuthSessionId } from "./sha2-BfCJmkJJ.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-BYrlvKdA.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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
8606
|
-
const
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
9666
|
-
const connectLogoutCommand = make$
|
|
9667
|
-
const connectCommand$1 = make$
|
|
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$
|
|
9856
|
+
const make$2 = fn("HubAuth.make")(function* (limits) {
|
|
9815
9857
|
const { tokenHashes } = yield* HubConfig;
|
|
9816
|
-
const state = yield* make$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
10367
|
-
const syncCommand = make$
|
|
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
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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-
|
|
11003
|
+
const { layerProjectService } = yield* promise(() => import("./runtimeLayer-B6H9jZgZ.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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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-
|
|
11652
|
+
const { runServer } = yield* promise(() => import("./server-4nWc1d6L.mjs"));
|
|
11497
11653
|
const logLevel = yield* LogLevel;
|
|
11498
|
-
const
|
|
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$
|
|
11519
|
-
const serveCommand = make$
|
|
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$
|
|
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)
|
|
11860
|
-
|
|
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$
|
|
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$
|
|
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$
|
|
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-
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
13711
|
-
make$
|
|
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-
|
|
13918
|
+
//# sourceMappingURL=binCli-DReuiGmk.mjs.map
|