@seanhogg/builderforce-agents 2026.10.3 → 2026.10.4
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/{agent-CxhUn-aN.js → agent-Cu57zjv6.js} +1 -1
- package/dist/{agent-CiEaiH-p.js → agent-LoZ_09Jv.js} +1 -1
- package/dist/{agents-DkKFDcYq.js → agents-Dgrr6E7S.js} +1 -1
- package/dist/{agents-IZrPoZIi.js → agents-DiRof4zA.js} +1 -1
- package/dist/{audio-preflight-COZAlqnx.js → audio-preflight-Cg4vjX8I.js} +1 -1
- package/dist/{auth-choice-CrYQF7zX.js → auth-choice-BJmosINc.js} +1 -1
- package/dist/{auth-choice-DhUBmu6y.js → auth-choice-CDoW8QDy.js} +1 -1
- package/dist/{auth-choice.apply-Botyf6Sg.js → auth-choice.apply-25j_lhua.js} +1 -1
- package/dist/{auth-choice.apply-k9tk1hGj.js → auth-choice.apply-CE1TC_Ts.js} +1 -1
- package/dist/{auth-choice.apply-Cch5UXis.js → auth-choice.apply-DSHzvYNu.js} +1 -1
- package/dist/{auth-choice.apply-CXRcLO-h.js → auth-choice.apply-ND2C2oSe.js} +1 -1
- package/dist/{auth-choice.apply.transformers-BkN8HlZJ.js → auth-choice.apply.transformers-BF-qyu2L.js} +1 -1
- package/dist/{auth-choice.apply.transformers-B9SieNNk.js → auth-choice.apply.transformers-CBQbUAwr.js} +1 -1
- package/dist/{auth-choice.apply.transformers-D02W3zy7.js → auth-choice.apply.transformers-DE9QrzbX.js} +1 -1
- package/dist/{auth-choice.apply.transformers-Dnr7Izx1.js → auth-choice.apply.transformers-vr05ATPq.js} +1 -1
- package/dist/{banner-Bd45EXyp.js → banner-Bx4c92N8.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/{builderforce-BxVfTQsc.js → builderforce-DHU87PJG.js} +1 -1
- package/dist/{builderforce-C86noipf.js → builderforce-DgYCZ3Up.js} +1 -1
- package/dist/bundled/boot-md/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +1 -1
- package/dist/{channel-options-BHetVK54.js → channel-options-BZoCW2EZ.js} +1 -1
- package/dist/{channel-options-D5PmuxT-.js → channel-options-DAkHvC-x.js} +1 -1
- package/dist/{channel-web-B5QgCj6B.js → channel-web-BWEX1FnI.js} +1 -1
- package/dist/{channels-cli-sHtDH37K.js → channels-cli-DHFIXbTT.js} +1 -1
- package/dist/{channels-cli-CgZqXqUm.js → channels-cli-DvkQEBwz.js} +1 -1
- package/dist/chrome-CbBg1ngA.js +4 -0
- package/dist/{cli-DKoe6Ywl.js → cli-C9bsC2UP.js} +1 -1
- package/dist/{cli-DlaHihmr.js → cli-DnMFuBeA.js} +1 -1
- package/dist/{command-registry-FQIQbQAx.js → command-registry-DUOpdtcT.js} +1 -1
- package/dist/{command-registry-BhyY4aXy.js → command-registry-DrRz6Wgg.js} +1 -1
- package/dist/{completion-cli-D86ydD3X.js → completion-cli-BtLeKqh_.js} +1 -1
- package/dist/{completion-cli-H4iKy2_f.js → completion-cli-Cq33pQdJ.js} +1 -1
- package/dist/{completion-cli-CoFRiwNp.js → completion-cli-EbyCUnCP.js} +1 -1
- package/dist/{completion-cli-DF6vmGRs.js → completion-cli-mzQa8oTd.js} +1 -1
- package/dist/{config-cli-D6KAk3vw.js → config-cli-BIQl_nrn.js} +1 -1
- package/dist/{config-cli-9HoPtGDR.js → config-cli-Dw1pr9MW.js} +1 -1
- package/dist/{configure-B_FvthXy.js → configure-B1HJIRSM.js} +1 -1
- package/dist/{configure-CYwCU0Hw.js → configure-BPX5i4at.js} +1 -1
- package/dist/{configure-BgZGeNXf.js → configure-CKm9_xkS.js} +1 -1
- package/dist/{configure-6QCgecON.js → configure-CQPFd8N9.js} +1 -1
- package/dist/{deps-jUQM2eq1.js → deps-DN7fhGiB.js} +1 -1
- package/dist/{doctor-completion-CZrfkBfj.js → doctor-completion-B7JXY8EJ.js} +1 -1
- package/dist/{doctor-completion-BSbAN5p1.js → doctor-completion-BEVC1EV7.js} +1 -1
- package/dist/{embedded-CA0n2tyG.js → embedded-BBM-usEa.js} +7 -7
- package/dist/{embedded-SSuKQ6Yc.js → embedded-CIuP-6Ex.js} +2 -2
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +1 -1
- package/dist/{gateway-cli-8SuDvuCq.js → gateway-cli-CvdguqNO.js} +2 -2
- package/dist/{gateway-cli-D5pW1jLs.js → gateway-cli-DvMzpFIF.js} +2 -2
- package/dist/{health-BLW40WUJ.js → health-Bd0YvHPq.js} +1 -1
- package/dist/{health-DqZB_jd8.js → health-CcUquV5P.js} +1 -1
- package/dist/{health-Cggr6c-2.js → health-CoTbsx1p.js} +1 -1
- package/dist/{hooks-cli-BQZjt-Fk.js → hooks-cli-D1mx0_F_.js} +1 -1
- package/dist/{hooks-cli-D5Zt0sN4.js → hooks-cli-Dr0hMOiz.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/llm-slug-generator.js +1 -1
- package/dist/{models-DH9Vrv7O.js → models-D3MukbTO.js} +1 -1
- package/dist/{models-cli-DLZZwy_m.js → models-cli-CBUEjJ_T.js} +1 -1
- package/dist/{models-cli-CAaWi4TX.js → models-cli-nD2MyRO3.js} +1 -1
- package/dist/{models-bp562zNz.js → models-px2EtCBB.js} +1 -1
- package/dist/{onboard-pzmSj6MG.js → onboard-CelRLEbD.js} +1 -1
- package/dist/{onboard-CpFQ-bpz.js → onboard-D_Ja6cJL.js} +1 -1
- package/dist/{onboard-channels-BsMS0Ehd.js → onboard-channels-C5v3gxTE.js} +1 -1
- package/dist/{onboard-channels-D1FMu5M8.js → onboard-channels-CEMtoVzX.js} +1 -1
- package/dist/{onboard-channels-CKWKLbTn.js → onboard-channels-DIvxrZLb.js} +1 -1
- package/dist/{onboard-channels-CqXCWPaQ.js → onboard-channels-pPjt4AF5.js} +1 -1
- package/dist/{onboard-interactive-BAcb1Yd8.js → onboard-interactive-BIVMtUaZ.js} +1 -1
- package/dist/{onboard-interactive-COTt-hGf.js → onboard-interactive-CeQp6fAt.js} +1 -1
- package/dist/{onboard-interactive-B_YG0JwA.js → onboard-interactive-D3YgFz9n.js} +1 -1
- package/dist/{onboard-interactive-BdwTeKJ2.js → onboard-interactive-tVpsWM3V.js} +1 -1
- package/dist/{onboarding-C8IDtM8O.js → onboarding-B9P9Rocf.js} +2 -2
- package/dist/{onboarding-BhMZqtBx.js → onboarding-DXxufSuN.js} +2 -2
- package/dist/{onboarding.finalize-DpyMh92r.js → onboarding.finalize-BJbv33Sa.js} +1 -1
- package/dist/{onboarding.finalize-DEhEHZPV.js → onboarding.finalize-CiIdxWgH.js} +1 -1
- package/dist/{outbound-send-deps-CKOfRpqk.js → outbound-send-deps-DL5n0r7v.js} +1 -1
- package/dist/{plugin-registry-Bi-9AQMd.js → plugin-registry-B5gTbK3m.js} +1 -1
- package/dist/{plugin-registry-nxUQWv6l.js → plugin-registry-CBXZbshG.js} +1 -1
- package/dist/{plugin-registry-BlKyKAq2.js → plugin-registry-DEWbh_9i.js} +1 -1
- package/dist/{plugin-registry-CqGq9jzk.js → plugin-registry-Glc-xriO.js} +1 -1
- package/dist/plugin-sdk/{channel-web-C3UtHX6b.js → channel-web-CW5s6vEZ.js} +1 -1
- package/dist/plugin-sdk/index.js +1 -1
- package/dist/plugin-sdk/{reply-BTKDKB2t.js → reply-pngAtrhW.js} +2 -2
- package/dist/plugin-sdk/{web-CsPSK9U2.js → web-DfrDkFj_.js} +1 -1
- package/dist/{plugins-CUhWH9-E.js → plugins-BJNBD6Si.js} +1 -1
- package/dist/{plugins-B8Lge-oB.js → plugins-BZnMash4.js} +1 -1
- package/dist/{plugins-cli-c36MSKiX.js → plugins-cli-Cv_bwpr4.js} +1 -1
- package/dist/{plugins-cli-CgjC_YvF.js → plugins-cli-DkFN_JgK.js} +1 -1
- package/dist/{program-QMtnfrM_.js → program-DYU1raxm.js} +2 -2
- package/dist/{program-context-BgCNjcCh.js → program-context-D4S-3zNt.js} +1 -1
- package/dist/{prompt-select-styled-CWG9o2CX.js → prompt-select-styled-BhKY5Oj4.js} +1 -1
- package/dist/{prompt-select-styled-m1_NXutn.js → prompt-select-styled-D1StbM6j.js} +1 -1
- package/dist/{provider-auth-helpers-BFCTgzr_.js → provider-auth-helpers-5ZQb3SEz.js} +1 -1
- package/dist/{provider-auth-helpers-D0eiRpeb.js → provider-auth-helpers-Cibq8oDi.js} +1 -1
- package/dist/{provider-dispatcher-Djomkp5i.js → provider-dispatcher-Bwaplzm8.js} +1 -1
- package/dist/{provider-dispatcher-B6kumPDM.js → provider-dispatcher-kL8Yl9XU.js} +1 -1
- package/dist/{push-apns-DalSFp-6.js → push-apns-BXmSvfvx.js} +1 -1
- package/dist/{push-apns-DwSjHMuA.js → push-apns-C9hsLIBU.js} +1 -1
- package/dist/{pw-ai-1DyAPekE.js → pw-ai-BLyUwyRC.js} +1 -1
- package/dist/{register.agent-BZn434eF.js → register.agent-C4x77WJe.js} +1 -1
- package/dist/{register.agent-DNaHcARI.js → register.agent-CbP_v3k5.js} +1 -1
- package/dist/{register.configure-GTH7BPIx.js → register.configure-B-j2lVkz.js} +1 -1
- package/dist/{register.configure-Bflad790.js → register.configure-BsBerk8U.js} +1 -1
- package/dist/{register.maintenance-Dl7P66Jm.js → register.maintenance-B83yzc-P.js} +1 -1
- package/dist/{register.maintenance-B1XK1zeY.js → register.maintenance-WLPWJ7vr.js} +1 -1
- package/dist/{register.message-CJS3PPCy.js → register.message-BVo8xLbS.js} +1 -1
- package/dist/{register.message-CA5LiG16.js → register.message-DZ9zcORn.js} +1 -1
- package/dist/{register.onboard-Bj6wFSzC.js → register.onboard-CWCqKyU7.js} +1 -1
- package/dist/{register.onboard-4y1mzgCn.js → register.onboard-D9mB9MLj.js} +1 -1
- package/dist/{register.setup-Cvk8SB1q.js → register.setup-BMFb9IC4.js} +1 -1
- package/dist/{register.setup-zLIWO_nF.js → register.setup-C22fWTFR.js} +1 -1
- package/dist/{register.status-health-sessions-CjxA4ATI.js → register.status-health-sessions-BqMqFeMA.js} +1 -1
- package/dist/{register.status-health-sessions-CIYKmgKO.js → register.status-health-sessions-C-jqKRZ5.js} +1 -1
- package/dist/{register.subclis-Ua7PkPpv.js → register.subclis-Ceyv8kgc.js} +1 -1
- package/dist/{register.subclis-Ct4QBaKi.js → register.subclis-DxcQwaQg.js} +1 -1
- package/dist/{reply-gZ_yr2mJ.js → reply-BeKidf2F.js} +4 -4
- package/dist/{run-main-Cyc_C0B-.js → run-main-EhlBxGJB.js} +1 -1
- package/dist/{runner-C1sy_uJN.js → runner-P3IfAnSL.js} +3 -3
- package/dist/{server-node-events-CSsH-eIF.js → server-node-events-BZuSkcbo.js} +1 -1
- package/dist/{server-node-events-Bz_Qo5BV.js → server-node-events-CIsEZSfR.js} +1 -1
- package/dist/{session-dirs-fh5kvbyH.js → session-dirs-DH7k5ehu.js} +1 -1
- package/dist/{session-dirs-DVL9vHmq.js → session-dirs-DgwMogyJ.js} +1 -1
- package/dist/{status-sAc6yoa3.js → status-BY0kS_wo.js} +1 -1
- package/dist/{status-SPonEO1J.js → status-B_SXw9W4.js} +1 -1
- package/dist/{status-DZYF4S6_.js → status-BqEzSHhZ.js} +1 -1
- package/dist/{status-ChEjU5un.js → status-Ca-hgLW_.js} +1 -1
- package/dist/{status-CpxCM8BO.js → status-_KIJcQH-.js} +1 -1
- package/dist/{subagent-registry-BHP3_ka8.js → subagent-registry-98yia-RN.js} +4 -4
- package/dist/{subagent-registry-BYK0Wq_w.js → subagent-registry-Ch9dN-TR.js} +1 -1
- package/dist/{subagent-registry-DR5M5QUP.js → subagent-registry-CiYeuaym.js} +1 -1
- package/dist/{tui-Ujq2bTco.js → tui-BIpdEy5i.js} +2 -2
- package/dist/{tui-BsMw6I4Y.js → tui-DeG1am8h.js} +2 -2
- package/dist/{tui-cli-CLYxMYyC.js → tui-cli-3mxSu-O0.js} +1 -1
- package/dist/{tui-cli-BBKMdwDt.js → tui-cli-CXRFHYWv.js} +1 -1
- package/dist/{update-cli-uQLI7RCN.js → update-cli-BYhJHTZ0.js} +1 -1
- package/dist/{update-cli-BKcCNOzz.js → update-cli-DkgHl95y.js} +1 -1
- package/dist/{web-Bkk568P6.js → web--D7qJmx6.js} +1 -1
- package/dist/{web-wR7gzEVJ.js → web-CgypI7gs.js} +1 -1
- package/dist/{web-CGo9DnE4.js → web-DKmwaw7q.js} +1 -1
- package/dist/{web-DktK5vCb.js → web-Dvcfg5Kd.js} +1 -1
- package/extensions/memory-lancedb/package.json +2 -2
- package/package.json +1 -1
- package/dist/chrome-CAuboFG7.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as resolveStateDir}from"./paths-5FcIFMsj.js";import{B as theme,C as shortenHomePath,S as shortenHomeInString,_ as resolveConfigDir,b as resolveUserPath}from"./utils-DbaBVFaK.js";import"./embedded-helpers-DHfhLu2W.js";import"./reply-
|
|
1
|
+
import{g as resolveStateDir}from"./paths-5FcIFMsj.js";import{B as theme,C as shortenHomePath,S as shortenHomeInString,_ as resolveConfigDir,b as resolveUserPath}from"./utils-DbaBVFaK.js";import"./embedded-helpers-DHfhLu2W.js";import"./reply-BeKidf2F.js";import"./session-key-EoB0qaG9.js";import"./builderforce-root-D64_sXEi.js";import{i as defaultRuntime}from"./subsystem-B3TqcCrZ.js";import"./registry-TdK-aV05.js";import"./logger-Bch0bx9c.js";import"./exec-DdcIjeyn.js";import"./agent-scope-DPtjOxzp.js";import"./model-selection-DlYajIzF.js";import"./env-file-BI2jpOmF.js";import"./boolean-Cn4K2fc9.js";import"./env-BHP32i7Q.js";import"./src-CQLQD-1r.js";import{c as writeConfigFile,r as loadConfig}from"./io-DhUMGsxN.js";import{a as resolveBundledPluginsDir,d as applyExclusiveSlotSelection,f as defaultSlotIdForKey,t as clearPluginManifestRegistryCache}from"./manifest-registry-CBVaj2md.js";import"./config-lGOyM6Kq.js";import"./runner-CDpBWK3-.js";import"./model-catalog-BQUEoIev.js";import"./sandbox-Cq6rH4hg.js";import"./chrome-BW8dGyxs.js";import{u as promptYesNo}from"./tailscale-0ey4P_at.js";import"./auth-C4PxZEj8.js";import"./server-context-1YSNvKDs.js";import"./frontmatter-DpzOtLJz.js";import"./skills-vjE49XV9.js";import"./plugin-skills-RFjYtysK.js";import"./routes-DsdK6VOy.js";import"./redact-BT5hARuQ.js";import"./errors-BK3rMW8O.js";import"./paths-CejDLFxE.js";import"./ssrf-DHJTyOuH.js";import"./image-ops-D7Ex-H05.js";import"./store-Nf9BxXC7.js";import"./ports-B-SXoPqJ.js";import"./trash-DlNzpifq.js";import"./sessions-Dv212g1O.js";import"./message-channel-BW_q2nVi.js";import"./plugins-C0lu7LGS.js";import"./accounts-2InvZDx2.js";import"./accounts-CrKsbGuP.js";import"./accounts-BnsrG5TA.js";import"./bindings-qYFdqpJ3.js";import"./send-DSwQqUiD.js";import"./send-BGZYkspG.js";import"./paths-DCzWXtSj.js";import"./tool-images-CR9Y0R5I.js";import"./tool-display-Dx-rz3CF.js";import"./fetch-guard-DxN_CtRp.js";import"./api-key-rotation-BbNoamfM.js";import"./fetch-CMEvVIy8.js";import"./sqlite-BxinAVYp.js";import"./tokens-Ct4DyfhX.js";import"./project-context-store-BPhHGfFl.js";import"./with-timeout-DTcvZn3s.js";import"./deliver-CrB451sO.js";import"./send-ZCmcplsV.js";import"./workspace-eFrsAV2Q.js";import"./reply-prefix-BwtP84WV.js";import"./memory-cli-Dgqoendm.js";import"./manager-pjodgk3H.js";import"./retry-Jis-ZZfm.js";import"./client-BxPDO8Ed.js";import"./call-DLeUWFtQ.js";import"./common-W8GhA4hE.js";import"./chunk-B9aj7NGY.js";import"./markdown-tables-iDNbGky8.js";import"./ir-EgWVNCXR.js";import"./render-CSLaFZoy.js";import"./builderforcellm-syscheck-BpNlQ4Rx.js";import"./send-iQicMwPr.js";import"./outbound-attachment-BR2FQu7J.js";import"./fetch-B6_hd7w9.js";import"./delivery-queue-BZWZDdpJ.js";import"./channel-activity-GeHNfvd4.js";import"./tables-D5WcKZWq.js";import"./pairing-store-PKyjZas4.js";import{t as formatDocsLink}from"./links-CYRGsVCu.js";import"./cli-utils-BLNnV_WG.js";import"./help-format-NhTn4dWd.js";import"./progress-OKwbfa23.js";import"./resolve-route-EE2-ObOq.js";import"./replies-BhjI7rPj.js";import"./refresh-Cyy0oi_E.js";import"./coding-tools.policy-DQxeoYmD.js";import"./send-C9xXqEqr.js";import"./onboard-helpers-DHGeaHZA.js";import"./prompt-style-BwwmGo3-.js";import"./pairing-labels-BpeDWVFP.js";import"./session-cost-usage-BDkGtjt9.js";import"./provider-usage-BqXFLAwn.js";import"./active-listener-DBdxNyOd.js";import"./exec-approvals-kmxxyvIe.js";import"./nodes-screen-BWDONgPE.js";import"./project-context-Dp8w9r_P.js";import"./control-service-Bkbx5ybP.js";import"./stagger-NaB6u1z1.js";import"./channel-selection-BjcuqdFb.js";import"./mamba-state-engine-DPAATSLG.js";import"./transformers-stream-QS2dnQob.js";import{c as resolveArchiveKind}from"./install-safe-path-BUT0oL1h.js";import"./npm-registry-spec-BKmYHCba.js";import"./skill-scanner-CN9z0hSY.js";import{i as resolvePluginInstallDir,n as installPluginFromNpmSpec,r as installPluginFromPath,t as recordPluginInstall}from"./installs-D4ygbqdx.js";import{t as renderTable}from"./table-BKeTpiIp.js";import{t as buildPluginStatusReport}from"./status-BY0kS_wo.js";import{n as updateNpmInstalledPlugins}from"./update-ZO5TpOJ4.js";import fs from"node:fs";import os from"node:os";import path from"node:path";import fs$1 from"node:fs/promises";function tryRelative(root,filePath){let rel=path.relative(root,filePath);return!rel||rel===`.`||rel===`..`||rel.startsWith(`..${path.sep}`)||rel.startsWith(`../`)||rel.startsWith(`..\\`)||path.isAbsolute(rel)?null:rel.replaceAll(`\\`,`/`)}function resolvePluginSourceRoots(params){return{stock:resolveBundledPluginsDir(),global:path.join(resolveConfigDir(),`extensions`),workspace:params.workspaceDir?path.join(params.workspaceDir,`.builderforce`,`extensions`):void 0}}function formatPluginSourceForTable(plugin,roots){let raw=plugin.source;if(plugin.origin===`bundled`&&roots.stock){let rel=tryRelative(roots.stock,raw);if(rel)return{value:`stock:${rel}`,rootKey:`stock`}}if(plugin.origin===`workspace`&&roots.workspace){let rel=tryRelative(roots.workspace,raw);if(rel)return{value:`workspace:${rel}`,rootKey:`workspace`}}if(plugin.origin===`global`&&roots.global){let rel=tryRelative(roots.global,raw);if(rel)return{value:`global:${rel}`,rootKey:`global`}}return{value:shortenHomeInString(raw)}}function resolveUninstallDirectoryTarget(params){if(!params.hasInstall||params.installRecord?.source===`path`)return null;let defaultPath;try{defaultPath=resolvePluginInstallDir(params.pluginId,params.extensionsDir)}catch{return null}let configuredPath=params.installRecord?.installPath;return configuredPath&&path.resolve(configuredPath)===path.resolve(defaultPath)?configuredPath:defaultPath}function removePluginFromConfig(cfg,pluginId){let actions={entry:!1,install:!1,allowlist:!1,loadPath:!1,memorySlot:!1},pluginsConfig=cfg.plugins??{},entries=pluginsConfig.entries;if(entries&&pluginId in entries){let{[pluginId]:_,...rest}=entries;entries=Object.keys(rest).length>0?rest:void 0,actions.entry=!0}let installs=pluginsConfig.installs,installRecord=installs?.[pluginId];if(installs&&pluginId in installs){let{[pluginId]:_,...rest}=installs;installs=Object.keys(rest).length>0?rest:void 0,actions.install=!0}let allow=pluginsConfig.allow;Array.isArray(allow)&&allow.includes(pluginId)&&(allow=allow.filter(id=>id!==pluginId),allow.length===0&&(allow=void 0),actions.allowlist=!0);let load=pluginsConfig.load;if(installRecord?.source===`path`&&installRecord.sourcePath){let sourcePath=installRecord.sourcePath,loadPaths=load?.paths;if(Array.isArray(loadPaths)&&loadPaths.includes(sourcePath)){let nextLoadPaths=loadPaths.filter(p=>p!==sourcePath);load=nextLoadPaths.length>0?{...load,paths:nextLoadPaths}:void 0,actions.loadPath=!0}}let slots=pluginsConfig.slots;slots?.memory===pluginId&&(slots={...slots,memory:defaultSlotIdForKey(`memory`)},actions.memorySlot=!0),slots&&Object.keys(slots).length===0&&(slots=void 0);let cleanedPlugins={...pluginsConfig,entries,installs,allow,load,slots};return cleanedPlugins.entries===void 0&&delete cleanedPlugins.entries,cleanedPlugins.installs===void 0&&delete cleanedPlugins.installs,cleanedPlugins.allow===void 0&&delete cleanedPlugins.allow,cleanedPlugins.load===void 0&&delete cleanedPlugins.load,cleanedPlugins.slots===void 0&&delete cleanedPlugins.slots,{config:{...cfg,plugins:Object.keys(cleanedPlugins).length>0?cleanedPlugins:void 0},actions}}async function uninstallPlugin(params){let{config,pluginId,deleteFiles=!0,extensionsDir}=params,hasEntry=pluginId in(config.plugins?.entries??{}),hasInstall=pluginId in(config.plugins?.installs??{});if(!hasEntry&&!hasInstall)return{ok:!1,error:`Plugin not found: ${pluginId}`};let installRecord=config.plugins?.installs?.[pluginId],isLinked=installRecord?.source===`path`,{config:newConfig,actions:configActions}=removePluginFromConfig(config,pluginId),actions={...configActions,directory:!1},warnings=[],deleteTarget=deleteFiles&&!isLinked?resolveUninstallDirectoryTarget({pluginId,hasInstall,installRecord,extensionsDir}):null;if(deleteTarget){let existed=await fs$1.access(deleteTarget).then(()=>!0).catch(()=>!1)??!1;try{await fs$1.rm(deleteTarget,{recursive:!0,force:!0}),actions.directory=existed}catch(error){warnings.push(`Failed to remove plugin directory ${deleteTarget}: ${error instanceof Error?error.message:String(error)}`)}}return{ok:!0,config:newConfig,pluginId,actions,warnings}}function resolveFileNpmSpecToLocalPath(raw){let trimmed=raw.trim();if(!trimmed.toLowerCase().startsWith(`file:`))return null;let rest=trimmed.slice(5);return rest?rest.startsWith(`///`)?{ok:!0,path:rest.slice(2)}:rest.startsWith(`//localhost/`)?{ok:!0,path:rest.slice(11)}:rest.startsWith(`//`)?{ok:!1,error:`unsupported file: URL host (expected "file:<path>" or "file:///abs/path")`}:{ok:!0,path:rest}:{ok:!1,error:`unsupported file: spec: missing path`}}function formatPluginLine(plugin,verbose=!1){let status=plugin.status===`loaded`?theme.success(`loaded`):plugin.status===`disabled`?theme.warn(`disabled`):theme.error(`error`),name=theme.command(plugin.name||plugin.id),idSuffix=plugin.name&&plugin.name!==plugin.id?theme.muted(` (${plugin.id})`):``,desc=plugin.description?theme.muted(plugin.description.length>60?`${plugin.description.slice(0,57)}...`:plugin.description):theme.muted(`(no description)`);if(!verbose)return`${name}${idSuffix} ${status} - ${desc}`;let parts=[`${name}${idSuffix} ${status}`,` source: ${theme.muted(shortenHomeInString(plugin.source))}`,` origin: ${plugin.origin}`];return plugin.version&&parts.push(` version: ${plugin.version}`),plugin.providerIds.length>0&&parts.push(` providers: ${plugin.providerIds.join(`, `)}`),plugin.error&&parts.push(theme.error(` error: ${plugin.error}`)),parts.join(`
|
|
2
2
|
`)}function applySlotSelectionForPlugin(config,pluginId){let report=buildPluginStatusReport({config}),plugin=report.plugins.find(entry=>entry.id===pluginId);if(!plugin)return{config,warnings:[]};let result=applyExclusiveSlotSelection({config,selectedId:plugin.id,selectedKind:plugin.kind,registry:report});return{config:result.config,warnings:result.warnings}}function createPluginInstallLogger(){return{info:msg=>defaultRuntime.log(msg),warn:msg=>defaultRuntime.log(theme.warn(msg))}}function enablePluginInConfig(config,pluginId){return{...config,plugins:{...config.plugins,entries:{...config.plugins?.entries,[pluginId]:{...config.plugins?.entries?.[pluginId],enabled:!0}}}}}function logSlotWarnings(warnings){if(warnings.length!==0)for(let warning of warnings)defaultRuntime.log(theme.warn(warning))}function registerPluginsCli(program){let plugins=program.command(`plugins`).description(`Manage BuilderForceAgents plugins and extensions`).addHelpText(`after`,()=>`\n${theme.muted(`Docs:`)} ${formatDocsLink(`/cli/plugins`,`docs.builderforce.ai/cli/plugins`)}\n`);plugins.command(`list`).description(`List discovered plugins`).option(`--json`,`Print JSON`).option(`--enabled`,`Only show enabled plugins`,!1).option(`--verbose`,`Show detailed entries`,!1).action(opts=>{let report=buildPluginStatusReport(),list=opts.enabled?report.plugins.filter(p=>p.status===`loaded`):report.plugins;if(opts.json){let payload={workspaceDir:report.workspaceDir,plugins:list,diagnostics:report.diagnostics};defaultRuntime.log(JSON.stringify(payload,null,2));return}if(list.length===0){defaultRuntime.log(theme.muted(`No plugins found.`));return}let loaded=list.filter(p=>p.status===`loaded`).length;if(defaultRuntime.log(`${theme.heading(`Plugins`)} ${theme.muted(`(${loaded}/${list.length} loaded)`)}`),!opts.verbose){let tableWidth=Math.max(60,(process.stdout.columns??120)-1),sourceRoots=resolvePluginSourceRoots({workspaceDir:report.workspaceDir}),usedRoots=new Set,rows=list.map(plugin=>{let desc=plugin.description?theme.muted(plugin.description):``,formattedSource=formatPluginSourceForTable(plugin,sourceRoots);formattedSource.rootKey&&usedRoots.add(formattedSource.rootKey);let sourceLine=desc?`${formattedSource.value}\n${desc}`:formattedSource.value;return{Name:plugin.name||plugin.id,ID:plugin.name&&plugin.name!==plugin.id?plugin.id:``,Status:plugin.status===`loaded`?theme.success(`loaded`):plugin.status===`disabled`?theme.warn(`disabled`):theme.error(`error`),Source:sourceLine,Version:plugin.version??``}});if(usedRoots.size>0){defaultRuntime.log(theme.muted(`Source roots:`));for(let key of[`stock`,`workspace`,`global`]){if(!usedRoots.has(key))continue;let dir=sourceRoots[key];dir&&defaultRuntime.log(` ${theme.command(`${key}:`)} ${theme.muted(dir)}`)}defaultRuntime.log(``)}defaultRuntime.log(renderTable({width:tableWidth,columns:[{key:`Name`,header:`Name`,minWidth:14,flex:!0},{key:`ID`,header:`ID`,minWidth:10,flex:!0},{key:`Status`,header:`Status`,minWidth:10},{key:`Source`,header:`Source`,minWidth:26,flex:!0},{key:`Version`,header:`Version`,minWidth:8}],rows}).trimEnd());return}let lines=[];for(let plugin of list)lines.push(formatPluginLine(plugin,!0)),lines.push(``);defaultRuntime.log(lines.join(`
|
|
3
3
|
`).trim())}),plugins.command(`info`).description(`Show plugin details`).argument(`<id>`,`Plugin id`).option(`--json`,`Print JSON`).action((id,opts)=>{let plugin=buildPluginStatusReport().plugins.find(p=>p.id===id||p.name===id);plugin||(defaultRuntime.error(`Plugin not found: ${id}`),process.exit(1));let install=loadConfig().plugins?.installs?.[plugin.id];if(opts.json){defaultRuntime.log(JSON.stringify(plugin,null,2));return}let lines=[];lines.push(theme.heading(plugin.name||plugin.id)),plugin.name&&plugin.name!==plugin.id&&lines.push(theme.muted(`id: ${plugin.id}`)),plugin.description&&lines.push(plugin.description),lines.push(``),lines.push(`${theme.muted(`Status:`)} ${plugin.status}`),lines.push(`${theme.muted(`Source:`)} ${shortenHomeInString(plugin.source)}`),lines.push(`${theme.muted(`Origin:`)} ${plugin.origin}`),plugin.version&&lines.push(`${theme.muted(`Version:`)} ${plugin.version}`),plugin.toolNames.length>0&&lines.push(`${theme.muted(`Tools:`)} ${plugin.toolNames.join(`, `)}`),plugin.hookNames.length>0&&lines.push(`${theme.muted(`Hooks:`)} ${plugin.hookNames.join(`, `)}`),plugin.gatewayMethods.length>0&&lines.push(`${theme.muted(`Gateway methods:`)} ${plugin.gatewayMethods.join(`, `)}`),plugin.providerIds.length>0&&lines.push(`${theme.muted(`Providers:`)} ${plugin.providerIds.join(`, `)}`),plugin.cliCommands.length>0&&lines.push(`${theme.muted(`CLI commands:`)} ${plugin.cliCommands.join(`, `)}`),plugin.services.length>0&&lines.push(`${theme.muted(`Services:`)} ${plugin.services.join(`, `)}`),plugin.error&&lines.push(`${theme.error(`Error:`)} ${plugin.error}`),install&&(lines.push(``),lines.push(`${theme.muted(`Install:`)} ${install.source}`),install.spec&&lines.push(`${theme.muted(`Spec:`)} ${install.spec}`),install.sourcePath&&lines.push(`${theme.muted(`Source path:`)} ${shortenHomePath(install.sourcePath)}`),install.installPath&&lines.push(`${theme.muted(`Install path:`)} ${shortenHomePath(install.installPath)}`),install.version&&lines.push(`${theme.muted(`Recorded version:`)} ${install.version}`),install.installedAt&&lines.push(`${theme.muted(`Installed at:`)} ${install.installedAt}`)),defaultRuntime.log(lines.join(`
|
|
4
4
|
`))}),plugins.command(`enable`).description(`Enable a plugin in config`).argument(`<id>`,`Plugin id`).action(async id=>{let cfg=loadConfig(),next={...cfg,plugins:{...cfg.plugins,entries:{...cfg.plugins?.entries,[id]:{...cfg.plugins?.entries?.[id],enabled:!0}}}},slotResult=applySlotSelectionForPlugin(next,id);next=slotResult.config,await writeConfigFile(next),logSlotWarnings(slotResult.warnings),defaultRuntime.log(`Enabled plugin "${id}". Restart the gateway to apply.`)}),plugins.command(`disable`).description(`Disable a plugin in config`).argument(`<id>`,`Plugin id`).action(async id=>{let cfg=loadConfig();await writeConfigFile({...cfg,plugins:{...cfg.plugins,entries:{...cfg.plugins?.entries,[id]:{...cfg.plugins?.entries?.[id],enabled:!1}}}}),defaultRuntime.log(`Disabled plugin "${id}". Restart the gateway to apply.`)}),plugins.command(`uninstall`).description(`Uninstall a plugin`).argument(`<id>`,`Plugin id`).option(`--keep-files`,`Keep installed files on disk`,!1).option(`--keep-config`,`Deprecated alias for --keep-files`,!1).option(`--force`,`Skip confirmation prompt`,!1).option(`--dry-run`,`Show what would be removed without making changes`,!1).action(async(id,opts)=>{let cfg=loadConfig(),report=buildPluginStatusReport({config:cfg}),extensionsDir=path.join(resolveStateDir(process.env,os.homedir),`extensions`),keepFiles=!!(opts.keepFiles||opts.keepConfig);opts.keepConfig&&defaultRuntime.log(theme.warn("`--keep-config` is deprecated, use `--keep-files`."));let plugin=report.plugins.find(p=>p.id===id||p.name===id),pluginId=plugin?.id??id,hasEntry=pluginId in(cfg.plugins?.entries??{}),hasInstall=pluginId in(cfg.plugins?.installs??{});!hasEntry&&!hasInstall&&(plugin?defaultRuntime.error(`Plugin "${pluginId}" is not managed by plugins config/install records and cannot be uninstalled.`):defaultRuntime.error(`Plugin not found: ${id}`),process.exit(1));let install=cfg.plugins?.installs?.[pluginId],isLinked=install?.source===`path`,preview=[];hasEntry&&preview.push(`config entry`),hasInstall&&preview.push(`install record`),cfg.plugins?.allow?.includes(pluginId)&&preview.push(`allowlist entry`),isLinked&&install?.sourcePath&&cfg.plugins?.load?.paths?.includes(install.sourcePath)&&preview.push(`load path`),cfg.plugins?.slots?.memory===pluginId&&preview.push(`memory slot (will reset to "memory-core")`);let deleteTarget=keepFiles?null:resolveUninstallDirectoryTarget({pluginId,hasInstall,installRecord:install,extensionsDir});deleteTarget&&preview.push(`directory: ${shortenHomePath(deleteTarget)}`);let pluginName=plugin?.name||pluginId;if(defaultRuntime.log(`Plugin: ${theme.command(pluginName)}${pluginName===pluginId?``:theme.muted(` (${pluginId})`)}`),defaultRuntime.log(`Will remove: ${preview.length>0?preview.join(`, `):`(nothing)`}`),opts.dryRun){defaultRuntime.log(theme.muted(`Dry run, no changes made.`));return}if(!opts.force&&!await promptYesNo(`Uninstall plugin "${pluginId}"?`)){defaultRuntime.log(`Cancelled.`);return}let result=await uninstallPlugin({config:cfg,pluginId,deleteFiles:!keepFiles,extensionsDir});result.ok||(defaultRuntime.error(result.error),process.exit(1));for(let warning of result.warnings)defaultRuntime.log(theme.warn(warning));await writeConfigFile(result.config);let removed=[];result.actions.entry&&removed.push(`config entry`),result.actions.install&&removed.push(`install record`),result.actions.allowlist&&removed.push(`allowlist`),result.actions.loadPath&&removed.push(`load path`),result.actions.memorySlot&&removed.push(`memory slot`),result.actions.directory&&removed.push(`directory`),defaultRuntime.log(`Uninstalled plugin "${pluginId}". Removed: ${removed.length>0?removed.join(`, `):`nothing`}.`),defaultRuntime.log(`Restart the gateway to apply changes.`)}),plugins.command(`install`).description(`Install a plugin (path, archive, or npm spec)`).argument(`<path-or-spec>`,`Path (.ts/.js/.zip/.tgz/.tar.gz) or an npm package spec`).option(`-l, --link`,`Link a local path instead of copying`,!1).action(async(raw,opts)=>{let fileSpec=resolveFileNpmSpecToLocalPath(raw);fileSpec&&!fileSpec.ok&&(defaultRuntime.error(fileSpec.error),process.exit(1));let resolved=resolveUserPath(fileSpec&&fileSpec.ok?fileSpec.path:raw),cfg=loadConfig();if(fs.existsSync(resolved)){if(opts.link){let existing=cfg.plugins?.load?.paths??[],merged=Array.from(new Set([...existing,resolved])),probe=await installPluginFromPath({path:resolved,dryRun:!0});probe.ok||(defaultRuntime.error(probe.error),process.exit(1));let next=enablePluginInConfig({...cfg,plugins:{...cfg.plugins,load:{...cfg.plugins?.load,paths:merged}}},probe.pluginId);next=recordPluginInstall(next,{pluginId:probe.pluginId,source:`path`,sourcePath:resolved,installPath:resolved,version:probe.version});let slotResult=applySlotSelectionForPlugin(next,probe.pluginId);next=slotResult.config,await writeConfigFile(next),logSlotWarnings(slotResult.warnings),defaultRuntime.log(`Linked plugin path: ${shortenHomePath(resolved)}`),defaultRuntime.log(`Restart the gateway to load plugins.`);return}let result=await installPluginFromPath({path:resolved,logger:createPluginInstallLogger()});result.ok||(defaultRuntime.error(result.error),process.exit(1)),clearPluginManifestRegistryCache();let next=enablePluginInConfig(cfg,result.pluginId),source=resolveArchiveKind(resolved)?`archive`:`path`;next=recordPluginInstall(next,{pluginId:result.pluginId,source,sourcePath:resolved,installPath:result.targetDir,version:result.version});let slotResult=applySlotSelectionForPlugin(next,result.pluginId);next=slotResult.config,await writeConfigFile(next),logSlotWarnings(slotResult.warnings),defaultRuntime.log(`Installed plugin: ${result.pluginId}`),defaultRuntime.log(`Restart the gateway to load plugins.`);return}opts.link&&(defaultRuntime.error("`--link` requires a local path."),process.exit(1)),(raw.startsWith(`.`)||raw.startsWith(`~`)||path.isAbsolute(raw)||raw.endsWith(`.ts`)||raw.endsWith(`.js`)||raw.endsWith(`.mjs`)||raw.endsWith(`.cjs`)||raw.endsWith(`.tgz`)||raw.endsWith(`.tar.gz`)||raw.endsWith(`.tar`)||raw.endsWith(`.zip`))&&(defaultRuntime.error(`Path not found: ${resolved}`),process.exit(1));let result=await installPluginFromNpmSpec({spec:raw,logger:createPluginInstallLogger()});result.ok||(defaultRuntime.error(result.error),process.exit(1)),clearPluginManifestRegistryCache();let next=enablePluginInConfig(cfg,result.pluginId);next=recordPluginInstall(next,{pluginId:result.pluginId,source:`npm`,spec:raw,installPath:result.targetDir,version:result.version});let slotResult=applySlotSelectionForPlugin(next,result.pluginId);next=slotResult.config,await writeConfigFile(next),logSlotWarnings(slotResult.warnings),defaultRuntime.log(`Installed plugin: ${result.pluginId}`),defaultRuntime.log(`Restart the gateway to load plugins.`)}),plugins.command(`update`).description(`Update installed plugins (npm installs only)`).argument(`[id]`,`Plugin id (omit with --all)`).option(`--all`,`Update all tracked plugins`,!1).option(`--dry-run`,`Show what would change without writing`,!1).action(async(id,opts)=>{let cfg=loadConfig(),installs=cfg.plugins?.installs??{},targets=opts.all?Object.keys(installs):id?[id]:[];if(targets.length===0){if(opts.all){defaultRuntime.log(`No npm-installed plugins to update.`);return}defaultRuntime.error(`Provide a plugin id or use --all.`),process.exit(1)}let result=await updateNpmInstalledPlugins({config:cfg,pluginIds:targets,dryRun:opts.dryRun,logger:{info:msg=>defaultRuntime.log(msg),warn:msg=>defaultRuntime.log(theme.warn(msg))}});for(let outcome of result.outcomes){if(outcome.status===`error`){defaultRuntime.log(theme.error(outcome.message));continue}if(outcome.status===`skipped`){defaultRuntime.log(theme.warn(outcome.message));continue}defaultRuntime.log(outcome.message)}!opts.dryRun&&result.changed&&(await writeConfigFile(result.config),defaultRuntime.log(`Restart the gateway to load plugins.`))}),plugins.command(`doctor`).description(`Report plugin load issues`).action(()=>{let report=buildPluginStatusReport(),errors=report.plugins.filter(p=>p.status===`error`),diags=report.diagnostics.filter(d=>d.level===`error`);if(errors.length===0&&diags.length===0){defaultRuntime.log(`No plugin issues detected.`);return}let lines=[];if(errors.length>0){lines.push(theme.error(`Plugin errors:`));for(let entry of errors)lines.push(`- ${entry.id}: ${entry.error??`failed to load`} (${entry.source})`)}if(diags.length>0){lines.length>0&&lines.push(``),lines.push(theme.warn(`Diagnostics:`));for(let diag of diags){let target=diag.pluginId?`${diag.pluginId}: `:``;lines.push(`- ${target}${diag.message}`)}}let docs=formatDocsLink(`/plugin`,`docs.builderforce.ai/plugin`);lines.push(``),lines.push(`${theme.muted(`Docs:`)} ${docs}`),defaultRuntime.log(lines.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as resolveStateDir}from"./paths-BHg-VHB4.js";import"./registry-Cv7CoWAs.js";import{S as shortenHomePath,g as resolveConfigDir,x as shortenHomeInString,y as resolveUserPath,z as theme}from"./utils-BP60e80M.js";import{p as defaultRuntime}from"./subsystem-C4b1Von0.js";import"./boolean-ssGoaBPk.js";import"./env-BoE8QSib.js";import"./warning-filter-nSTjpMIH.js";import"./auth-profiles-BcStSGQ1.js";import"./logger-AbH8mdkv.js";import"./session-key-D--2AEus.js";import"./builderforce-root-D3-p8W2n.js";import"./exec-CGuYALEs.js";import"./agent-scope-BcoQBOwz.js";import"./env-file-BIKVpYUN.js";import"./src-DMo2gLcR.js";import{c as writeConfigFile,r as loadConfig}from"./io-wLHeSE2L.js";import{a as resolveBundledPluginsDir,d as applyExclusiveSlotSelection,f as defaultSlotIdForKey,t as clearPluginManifestRegistryCache}from"./manifest-registry-DZdPjBqs.js";import"./config-DBrFbWRm.js";import"./model-discovery-CfknTieh.js";import"./model-catalog-CVRB77_N.js";import"./frontmatter-CoaI_oW6.js";import"./skills-CC5ozaMz.js";import"./plugin-skills-DUy_aY2T.js";import"./refresh-B38IMhwx.js";import"./client-BlsvYCEu.js";import"./call-Gj5Bi_oV.js";import"./message-channel-BjZV4RTT.js";import"./subagent-registry-
|
|
1
|
+
import{g as resolveStateDir}from"./paths-BHg-VHB4.js";import"./registry-Cv7CoWAs.js";import{S as shortenHomePath,g as resolveConfigDir,x as shortenHomeInString,y as resolveUserPath,z as theme}from"./utils-BP60e80M.js";import{p as defaultRuntime}from"./subsystem-C4b1Von0.js";import"./boolean-ssGoaBPk.js";import"./env-BoE8QSib.js";import"./warning-filter-nSTjpMIH.js";import"./auth-profiles-BcStSGQ1.js";import"./logger-AbH8mdkv.js";import"./session-key-D--2AEus.js";import"./builderforce-root-D3-p8W2n.js";import"./exec-CGuYALEs.js";import"./agent-scope-BcoQBOwz.js";import"./env-file-BIKVpYUN.js";import"./src-DMo2gLcR.js";import{c as writeConfigFile,r as loadConfig}from"./io-wLHeSE2L.js";import{a as resolveBundledPluginsDir,d as applyExclusiveSlotSelection,f as defaultSlotIdForKey,t as clearPluginManifestRegistryCache}from"./manifest-registry-DZdPjBqs.js";import"./config-DBrFbWRm.js";import"./model-discovery-CfknTieh.js";import"./model-catalog-CVRB77_N.js";import"./frontmatter-CoaI_oW6.js";import"./skills-CC5ozaMz.js";import"./plugin-skills-DUy_aY2T.js";import"./refresh-B38IMhwx.js";import"./client-BlsvYCEu.js";import"./call-Gj5Bi_oV.js";import"./message-channel-BjZV4RTT.js";import"./subagent-registry-98yia-RN.js";import"./sessions-C5jAGWOS.js";import"./project-context-store-BFOv5caq.js";import"./tokens-BNwTTeJb.js";import"./plugins-DJGW_fnS.js";import"./accounts-Z5bJpNrG.js";import"./bindings-D0uket3l.js";import"./send-CgMJqDBP.js";import"./send-DfpZ9T_M.js";import"./with-timeout-ftXvzlo8.js";import"./deliver-DDFTiLT4.js";import"./accounts-DoJYLMfS.js";import"./send-5Vokn3Uv.js";import"./image-ops-Bg9yFwjX.js";import"./redact-bWj_-q3j.js";import"./errors-t5wHPcwh.js";import"./embedded-helpers-CsRjxr3I.js";import"./sandbox-bEma8jFA.js";import"./chrome-Kt4wxGF2.js";import{l as promptYesNo}from"./tailscale-CgCG7AVQ.js";import"./auth-BNeS9xde.js";import"./server-context-0vSm_r2R.js";import"./routes-BLhXC8oU.js";import"./paths-GamzES41.js";import"./ssrf-BiSQzdcA.js";import"./store-C5LmVaEC.js";import"./ports-LqFTyTSK.js";import"./trash-zs6gNxed.js";import"./accounts-BT-NzzBc.js";import"./paths-BQ9W7Bs0.js";import"./tool-images-DV2HMmx4.js";import"./workspace-BnrYivUM.js";import"./reply-prefix-9hmbzubX.js";import"./sqlite-BEgCClMz.js";import"./memory-cli-BBsTN63-.js";import"./manager-BXMwSRz1.js";import"./gemini-auth-qrDeJkh5.js";import"./retry-Cc6xusE8.js";import"./common-BRdxH-uH.js";import"./runner-qhKGerma.js";import"./tool-display-BIswnHaq.js";import"./chunk-hYck1V5_.js";import"./markdown-tables-CpqWBduK.js";import"./fetch-guard-CoGEds8D.js";import"./fetch-CUsKv8oj.js";import"./ir-CTE1iR41.js";import"./render-1ABBE2Y6.js";import"./builderforcellm-syscheck-BTolQUtx.js";import"./session-utils-DDDkCdFF.js";import"./coding-tools.policy-CtBT-KXm.js";import"./pairing-store-sCqmKjk2.js";import"./fetch-CrbOFvsL.js";import"./exec-approvals-Cn0K-HtJ.js";import"./nodes-screen-OI7tHqlU.js";import"./session-cost-usage-BgZfN_WR.js";import"./provider-usage-nRVDmUHj.js";import"./send-COUZMiIL.js";import"./outbound-attachment-Bed_0M10.js";import"./delivery-queue-DQXq7KUU.js";import"./project-context-De5-TWPH.js";import"./control-service-DYVIKl0J.js";import"./stagger-CUH5rlmS.js";import"./channel-selection-CLFizn8u.js";import"./send-CWzV8Zdx.js";import"./resolve-route-D3X-bXU-.js";import"./channel-activity-By7lsk7N.js";import"./tables-XzBUkZcJ.js";import{t as formatDocsLink}from"./links-B6LU5cXN.js";import"./cli-utils-ByV85M53.js";import"./help-format-DIDk_7gh.js";import"./progress-BQMO_-7I.js";import"./replies-CiPwT32C.js";import"./onboard-helpers-Xl1gvLzt.js";import"./prompt-style-CZOeG0sw.js";import"./pairing-labels-DVbgCApx.js";import"./active-listener-BC31MA4v.js";import"./mamba-state-engine-CViPpwyy.js";import"./transformers-stream-nSL4Xu31.js";import{c as resolveArchiveKind}from"./install-safe-path-BxCb3BJW.js";import"./npm-registry-spec-DXx5hKYJ.js";import"./skill-scanner-B9E9x-dj.js";import{i as resolvePluginInstallDir,n as installPluginFromNpmSpec,r as installPluginFromPath,t as recordPluginInstall}from"./installs-DwlFaoUO.js";import{t as renderTable}from"./table-CiK88EDX.js";import{t as buildPluginStatusReport}from"./status-Ca-hgLW_.js";import{n as updateNpmInstalledPlugins}from"./update-x4JvJWi6.js";import os from"node:os";import path from"node:path";import fs from"node:fs";import fs$1 from"node:fs/promises";function tryRelative(root,filePath){let rel=path.relative(root,filePath);return!rel||rel===`.`||rel===`..`||rel.startsWith(`..${path.sep}`)||rel.startsWith(`../`)||rel.startsWith(`..\\`)||path.isAbsolute(rel)?null:rel.replaceAll(`\\`,`/`)}function resolvePluginSourceRoots(params){return{stock:resolveBundledPluginsDir(),global:path.join(resolveConfigDir(),`extensions`),workspace:params.workspaceDir?path.join(params.workspaceDir,`.builderforce`,`extensions`):void 0}}function formatPluginSourceForTable(plugin,roots){let raw=plugin.source;if(plugin.origin===`bundled`&&roots.stock){let rel=tryRelative(roots.stock,raw);if(rel)return{value:`stock:${rel}`,rootKey:`stock`}}if(plugin.origin===`workspace`&&roots.workspace){let rel=tryRelative(roots.workspace,raw);if(rel)return{value:`workspace:${rel}`,rootKey:`workspace`}}if(plugin.origin===`global`&&roots.global){let rel=tryRelative(roots.global,raw);if(rel)return{value:`global:${rel}`,rootKey:`global`}}return{value:shortenHomeInString(raw)}}function resolveUninstallDirectoryTarget(params){if(!params.hasInstall||params.installRecord?.source===`path`)return null;let defaultPath;try{defaultPath=resolvePluginInstallDir(params.pluginId,params.extensionsDir)}catch{return null}let configuredPath=params.installRecord?.installPath;return configuredPath&&path.resolve(configuredPath)===path.resolve(defaultPath)?configuredPath:defaultPath}function removePluginFromConfig(cfg,pluginId){let actions={entry:!1,install:!1,allowlist:!1,loadPath:!1,memorySlot:!1},pluginsConfig=cfg.plugins??{},entries=pluginsConfig.entries;if(entries&&pluginId in entries){let{[pluginId]:_,...rest}=entries;entries=Object.keys(rest).length>0?rest:void 0,actions.entry=!0}let installs=pluginsConfig.installs,installRecord=installs?.[pluginId];if(installs&&pluginId in installs){let{[pluginId]:_,...rest}=installs;installs=Object.keys(rest).length>0?rest:void 0,actions.install=!0}let allow=pluginsConfig.allow;Array.isArray(allow)&&allow.includes(pluginId)&&(allow=allow.filter(id=>id!==pluginId),allow.length===0&&(allow=void 0),actions.allowlist=!0);let load=pluginsConfig.load;if(installRecord?.source===`path`&&installRecord.sourcePath){let sourcePath=installRecord.sourcePath,loadPaths=load?.paths;if(Array.isArray(loadPaths)&&loadPaths.includes(sourcePath)){let nextLoadPaths=loadPaths.filter(p=>p!==sourcePath);load=nextLoadPaths.length>0?{...load,paths:nextLoadPaths}:void 0,actions.loadPath=!0}}let slots=pluginsConfig.slots;slots?.memory===pluginId&&(slots={...slots,memory:defaultSlotIdForKey(`memory`)},actions.memorySlot=!0),slots&&Object.keys(slots).length===0&&(slots=void 0);let cleanedPlugins={...pluginsConfig,entries,installs,allow,load,slots};return cleanedPlugins.entries===void 0&&delete cleanedPlugins.entries,cleanedPlugins.installs===void 0&&delete cleanedPlugins.installs,cleanedPlugins.allow===void 0&&delete cleanedPlugins.allow,cleanedPlugins.load===void 0&&delete cleanedPlugins.load,cleanedPlugins.slots===void 0&&delete cleanedPlugins.slots,{config:{...cfg,plugins:Object.keys(cleanedPlugins).length>0?cleanedPlugins:void 0},actions}}async function uninstallPlugin(params){let{config,pluginId,deleteFiles=!0,extensionsDir}=params,hasEntry=pluginId in(config.plugins?.entries??{}),hasInstall=pluginId in(config.plugins?.installs??{});if(!hasEntry&&!hasInstall)return{ok:!1,error:`Plugin not found: ${pluginId}`};let installRecord=config.plugins?.installs?.[pluginId],isLinked=installRecord?.source===`path`,{config:newConfig,actions:configActions}=removePluginFromConfig(config,pluginId),actions={...configActions,directory:!1},warnings=[],deleteTarget=deleteFiles&&!isLinked?resolveUninstallDirectoryTarget({pluginId,hasInstall,installRecord,extensionsDir}):null;if(deleteTarget){let existed=await fs$1.access(deleteTarget).then(()=>!0).catch(()=>!1)??!1;try{await fs$1.rm(deleteTarget,{recursive:!0,force:!0}),actions.directory=existed}catch(error){warnings.push(`Failed to remove plugin directory ${deleteTarget}: ${error instanceof Error?error.message:String(error)}`)}}return{ok:!0,config:newConfig,pluginId,actions,warnings}}function resolveFileNpmSpecToLocalPath(raw){let trimmed=raw.trim();if(!trimmed.toLowerCase().startsWith(`file:`))return null;let rest=trimmed.slice(5);return rest?rest.startsWith(`///`)?{ok:!0,path:rest.slice(2)}:rest.startsWith(`//localhost/`)?{ok:!0,path:rest.slice(11)}:rest.startsWith(`//`)?{ok:!1,error:`unsupported file: URL host (expected "file:<path>" or "file:///abs/path")`}:{ok:!0,path:rest}:{ok:!1,error:`unsupported file: spec: missing path`}}function formatPluginLine(plugin,verbose=!1){let status=plugin.status===`loaded`?theme.success(`loaded`):plugin.status===`disabled`?theme.warn(`disabled`):theme.error(`error`),name=theme.command(plugin.name||plugin.id),idSuffix=plugin.name&&plugin.name!==plugin.id?theme.muted(` (${plugin.id})`):``,desc=plugin.description?theme.muted(plugin.description.length>60?`${plugin.description.slice(0,57)}...`:plugin.description):theme.muted(`(no description)`);if(!verbose)return`${name}${idSuffix} ${status} - ${desc}`;let parts=[`${name}${idSuffix} ${status}`,` source: ${theme.muted(shortenHomeInString(plugin.source))}`,` origin: ${plugin.origin}`];return plugin.version&&parts.push(` version: ${plugin.version}`),plugin.providerIds.length>0&&parts.push(` providers: ${plugin.providerIds.join(`, `)}`),plugin.error&&parts.push(theme.error(` error: ${plugin.error}`)),parts.join(`
|
|
2
2
|
`)}function applySlotSelectionForPlugin(config,pluginId){let report=buildPluginStatusReport({config}),plugin=report.plugins.find(entry=>entry.id===pluginId);if(!plugin)return{config,warnings:[]};let result=applyExclusiveSlotSelection({config,selectedId:plugin.id,selectedKind:plugin.kind,registry:report});return{config:result.config,warnings:result.warnings}}function createPluginInstallLogger(){return{info:msg=>defaultRuntime.log(msg),warn:msg=>defaultRuntime.log(theme.warn(msg))}}function enablePluginInConfig(config,pluginId){return{...config,plugins:{...config.plugins,entries:{...config.plugins?.entries,[pluginId]:{...config.plugins?.entries?.[pluginId],enabled:!0}}}}}function logSlotWarnings(warnings){if(warnings.length!==0)for(let warning of warnings)defaultRuntime.log(theme.warn(warning))}function registerPluginsCli(program){let plugins=program.command(`plugins`).description(`Manage BuilderForceAgents plugins and extensions`).addHelpText(`after`,()=>`\n${theme.muted(`Docs:`)} ${formatDocsLink(`/cli/plugins`,`docs.builderforce.ai/cli/plugins`)}\n`);plugins.command(`list`).description(`List discovered plugins`).option(`--json`,`Print JSON`).option(`--enabled`,`Only show enabled plugins`,!1).option(`--verbose`,`Show detailed entries`,!1).action(opts=>{let report=buildPluginStatusReport(),list=opts.enabled?report.plugins.filter(p=>p.status===`loaded`):report.plugins;if(opts.json){let payload={workspaceDir:report.workspaceDir,plugins:list,diagnostics:report.diagnostics};defaultRuntime.log(JSON.stringify(payload,null,2));return}if(list.length===0){defaultRuntime.log(theme.muted(`No plugins found.`));return}let loaded=list.filter(p=>p.status===`loaded`).length;if(defaultRuntime.log(`${theme.heading(`Plugins`)} ${theme.muted(`(${loaded}/${list.length} loaded)`)}`),!opts.verbose){let tableWidth=Math.max(60,(process.stdout.columns??120)-1),sourceRoots=resolvePluginSourceRoots({workspaceDir:report.workspaceDir}),usedRoots=new Set,rows=list.map(plugin=>{let desc=plugin.description?theme.muted(plugin.description):``,formattedSource=formatPluginSourceForTable(plugin,sourceRoots);formattedSource.rootKey&&usedRoots.add(formattedSource.rootKey);let sourceLine=desc?`${formattedSource.value}\n${desc}`:formattedSource.value;return{Name:plugin.name||plugin.id,ID:plugin.name&&plugin.name!==plugin.id?plugin.id:``,Status:plugin.status===`loaded`?theme.success(`loaded`):plugin.status===`disabled`?theme.warn(`disabled`):theme.error(`error`),Source:sourceLine,Version:plugin.version??``}});if(usedRoots.size>0){defaultRuntime.log(theme.muted(`Source roots:`));for(let key of[`stock`,`workspace`,`global`]){if(!usedRoots.has(key))continue;let dir=sourceRoots[key];dir&&defaultRuntime.log(` ${theme.command(`${key}:`)} ${theme.muted(dir)}`)}defaultRuntime.log(``)}defaultRuntime.log(renderTable({width:tableWidth,columns:[{key:`Name`,header:`Name`,minWidth:14,flex:!0},{key:`ID`,header:`ID`,minWidth:10,flex:!0},{key:`Status`,header:`Status`,minWidth:10},{key:`Source`,header:`Source`,minWidth:26,flex:!0},{key:`Version`,header:`Version`,minWidth:8}],rows}).trimEnd());return}let lines=[];for(let plugin of list)lines.push(formatPluginLine(plugin,!0)),lines.push(``);defaultRuntime.log(lines.join(`
|
|
3
3
|
`).trim())}),plugins.command(`info`).description(`Show plugin details`).argument(`<id>`,`Plugin id`).option(`--json`,`Print JSON`).action((id,opts)=>{let plugin=buildPluginStatusReport().plugins.find(p=>p.id===id||p.name===id);plugin||(defaultRuntime.error(`Plugin not found: ${id}`),process.exit(1));let install=loadConfig().plugins?.installs?.[plugin.id];if(opts.json){defaultRuntime.log(JSON.stringify(plugin,null,2));return}let lines=[];lines.push(theme.heading(plugin.name||plugin.id)),plugin.name&&plugin.name!==plugin.id&&lines.push(theme.muted(`id: ${plugin.id}`)),plugin.description&&lines.push(plugin.description),lines.push(``),lines.push(`${theme.muted(`Status:`)} ${plugin.status}`),lines.push(`${theme.muted(`Source:`)} ${shortenHomeInString(plugin.source)}`),lines.push(`${theme.muted(`Origin:`)} ${plugin.origin}`),plugin.version&&lines.push(`${theme.muted(`Version:`)} ${plugin.version}`),plugin.toolNames.length>0&&lines.push(`${theme.muted(`Tools:`)} ${plugin.toolNames.join(`, `)}`),plugin.hookNames.length>0&&lines.push(`${theme.muted(`Hooks:`)} ${plugin.hookNames.join(`, `)}`),plugin.gatewayMethods.length>0&&lines.push(`${theme.muted(`Gateway methods:`)} ${plugin.gatewayMethods.join(`, `)}`),plugin.providerIds.length>0&&lines.push(`${theme.muted(`Providers:`)} ${plugin.providerIds.join(`, `)}`),plugin.cliCommands.length>0&&lines.push(`${theme.muted(`CLI commands:`)} ${plugin.cliCommands.join(`, `)}`),plugin.services.length>0&&lines.push(`${theme.muted(`Services:`)} ${plugin.services.join(`, `)}`),plugin.error&&lines.push(`${theme.error(`Error:`)} ${plugin.error}`),install&&(lines.push(``),lines.push(`${theme.muted(`Install:`)} ${install.source}`),install.spec&&lines.push(`${theme.muted(`Spec:`)} ${install.spec}`),install.sourcePath&&lines.push(`${theme.muted(`Source path:`)} ${shortenHomePath(install.sourcePath)}`),install.installPath&&lines.push(`${theme.muted(`Install path:`)} ${shortenHomePath(install.installPath)}`),install.version&&lines.push(`${theme.muted(`Recorded version:`)} ${install.version}`),install.installedAt&&lines.push(`${theme.muted(`Installed at:`)} ${install.installedAt}`)),defaultRuntime.log(lines.join(`
|
|
4
4
|
`))}),plugins.command(`enable`).description(`Enable a plugin in config`).argument(`<id>`,`Plugin id`).action(async id=>{let cfg=loadConfig(),next={...cfg,plugins:{...cfg.plugins,entries:{...cfg.plugins?.entries,[id]:{...cfg.plugins?.entries?.[id],enabled:!0}}}},slotResult=applySlotSelectionForPlugin(next,id);next=slotResult.config,await writeConfigFile(next),logSlotWarnings(slotResult.warnings),defaultRuntime.log(`Enabled plugin "${id}". Restart the gateway to apply.`)}),plugins.command(`disable`).description(`Disable a plugin in config`).argument(`<id>`,`Plugin id`).action(async id=>{let cfg=loadConfig();await writeConfigFile({...cfg,plugins:{...cfg.plugins,entries:{...cfg.plugins?.entries,[id]:{...cfg.plugins?.entries?.[id],enabled:!1}}}}),defaultRuntime.log(`Disabled plugin "${id}". Restart the gateway to apply.`)}),plugins.command(`uninstall`).description(`Uninstall a plugin`).argument(`<id>`,`Plugin id`).option(`--keep-files`,`Keep installed files on disk`,!1).option(`--keep-config`,`Deprecated alias for --keep-files`,!1).option(`--force`,`Skip confirmation prompt`,!1).option(`--dry-run`,`Show what would be removed without making changes`,!1).action(async(id,opts)=>{let cfg=loadConfig(),report=buildPluginStatusReport({config:cfg}),extensionsDir=path.join(resolveStateDir(process.env,os.homedir),`extensions`),keepFiles=!!(opts.keepFiles||opts.keepConfig);opts.keepConfig&&defaultRuntime.log(theme.warn("`--keep-config` is deprecated, use `--keep-files`."));let plugin=report.plugins.find(p=>p.id===id||p.name===id),pluginId=plugin?.id??id,hasEntry=pluginId in(cfg.plugins?.entries??{}),hasInstall=pluginId in(cfg.plugins?.installs??{});!hasEntry&&!hasInstall&&(plugin?defaultRuntime.error(`Plugin "${pluginId}" is not managed by plugins config/install records and cannot be uninstalled.`):defaultRuntime.error(`Plugin not found: ${id}`),process.exit(1));let install=cfg.plugins?.installs?.[pluginId],isLinked=install?.source===`path`,preview=[];hasEntry&&preview.push(`config entry`),hasInstall&&preview.push(`install record`),cfg.plugins?.allow?.includes(pluginId)&&preview.push(`allowlist entry`),isLinked&&install?.sourcePath&&cfg.plugins?.load?.paths?.includes(install.sourcePath)&&preview.push(`load path`),cfg.plugins?.slots?.memory===pluginId&&preview.push(`memory slot (will reset to "memory-core")`);let deleteTarget=keepFiles?null:resolveUninstallDirectoryTarget({pluginId,hasInstall,installRecord:install,extensionsDir});deleteTarget&&preview.push(`directory: ${shortenHomePath(deleteTarget)}`);let pluginName=plugin?.name||pluginId;if(defaultRuntime.log(`Plugin: ${theme.command(pluginName)}${pluginName===pluginId?``:theme.muted(` (${pluginId})`)}`),defaultRuntime.log(`Will remove: ${preview.length>0?preview.join(`, `):`(nothing)`}`),opts.dryRun){defaultRuntime.log(theme.muted(`Dry run, no changes made.`));return}if(!opts.force&&!await promptYesNo(`Uninstall plugin "${pluginId}"?`)){defaultRuntime.log(`Cancelled.`);return}let result=await uninstallPlugin({config:cfg,pluginId,deleteFiles:!keepFiles,extensionsDir});result.ok||(defaultRuntime.error(result.error),process.exit(1));for(let warning of result.warnings)defaultRuntime.log(theme.warn(warning));await writeConfigFile(result.config);let removed=[];result.actions.entry&&removed.push(`config entry`),result.actions.install&&removed.push(`install record`),result.actions.allowlist&&removed.push(`allowlist`),result.actions.loadPath&&removed.push(`load path`),result.actions.memorySlot&&removed.push(`memory slot`),result.actions.directory&&removed.push(`directory`),defaultRuntime.log(`Uninstalled plugin "${pluginId}". Removed: ${removed.length>0?removed.join(`, `):`nothing`}.`),defaultRuntime.log(`Restart the gateway to apply changes.`)}),plugins.command(`install`).description(`Install a plugin (path, archive, or npm spec)`).argument(`<path-or-spec>`,`Path (.ts/.js/.zip/.tgz/.tar.gz) or an npm package spec`).option(`-l, --link`,`Link a local path instead of copying`,!1).action(async(raw,opts)=>{let fileSpec=resolveFileNpmSpecToLocalPath(raw);fileSpec&&!fileSpec.ok&&(defaultRuntime.error(fileSpec.error),process.exit(1));let resolved=resolveUserPath(fileSpec&&fileSpec.ok?fileSpec.path:raw),cfg=loadConfig();if(fs.existsSync(resolved)){if(opts.link){let existing=cfg.plugins?.load?.paths??[],merged=Array.from(new Set([...existing,resolved])),probe=await installPluginFromPath({path:resolved,dryRun:!0});probe.ok||(defaultRuntime.error(probe.error),process.exit(1));let next=enablePluginInConfig({...cfg,plugins:{...cfg.plugins,load:{...cfg.plugins?.load,paths:merged}}},probe.pluginId);next=recordPluginInstall(next,{pluginId:probe.pluginId,source:`path`,sourcePath:resolved,installPath:resolved,version:probe.version});let slotResult=applySlotSelectionForPlugin(next,probe.pluginId);next=slotResult.config,await writeConfigFile(next),logSlotWarnings(slotResult.warnings),defaultRuntime.log(`Linked plugin path: ${shortenHomePath(resolved)}`),defaultRuntime.log(`Restart the gateway to load plugins.`);return}let result=await installPluginFromPath({path:resolved,logger:createPluginInstallLogger()});result.ok||(defaultRuntime.error(result.error),process.exit(1)),clearPluginManifestRegistryCache();let next=enablePluginInConfig(cfg,result.pluginId),source=resolveArchiveKind(resolved)?`archive`:`path`;next=recordPluginInstall(next,{pluginId:result.pluginId,source,sourcePath:resolved,installPath:result.targetDir,version:result.version});let slotResult=applySlotSelectionForPlugin(next,result.pluginId);next=slotResult.config,await writeConfigFile(next),logSlotWarnings(slotResult.warnings),defaultRuntime.log(`Installed plugin: ${result.pluginId}`),defaultRuntime.log(`Restart the gateway to load plugins.`);return}opts.link&&(defaultRuntime.error("`--link` requires a local path."),process.exit(1)),(raw.startsWith(`.`)||raw.startsWith(`~`)||path.isAbsolute(raw)||raw.endsWith(`.ts`)||raw.endsWith(`.js`)||raw.endsWith(`.mjs`)||raw.endsWith(`.cjs`)||raw.endsWith(`.tgz`)||raw.endsWith(`.tar.gz`)||raw.endsWith(`.tar`)||raw.endsWith(`.zip`))&&(defaultRuntime.error(`Path not found: ${resolved}`),process.exit(1));let result=await installPluginFromNpmSpec({spec:raw,logger:createPluginInstallLogger()});result.ok||(defaultRuntime.error(result.error),process.exit(1)),clearPluginManifestRegistryCache();let next=enablePluginInConfig(cfg,result.pluginId);next=recordPluginInstall(next,{pluginId:result.pluginId,source:`npm`,spec:raw,installPath:result.targetDir,version:result.version});let slotResult=applySlotSelectionForPlugin(next,result.pluginId);next=slotResult.config,await writeConfigFile(next),logSlotWarnings(slotResult.warnings),defaultRuntime.log(`Installed plugin: ${result.pluginId}`),defaultRuntime.log(`Restart the gateway to load plugins.`)}),plugins.command(`update`).description(`Update installed plugins (npm installs only)`).argument(`[id]`,`Plugin id (omit with --all)`).option(`--all`,`Update all tracked plugins`,!1).option(`--dry-run`,`Show what would change without writing`,!1).action(async(id,opts)=>{let cfg=loadConfig(),installs=cfg.plugins?.installs??{},targets=opts.all?Object.keys(installs):id?[id]:[];if(targets.length===0){if(opts.all){defaultRuntime.log(`No npm-installed plugins to update.`);return}defaultRuntime.error(`Provide a plugin id or use --all.`),process.exit(1)}let result=await updateNpmInstalledPlugins({config:cfg,pluginIds:targets,dryRun:opts.dryRun,logger:{info:msg=>defaultRuntime.log(msg),warn:msg=>defaultRuntime.log(theme.warn(msg))}});for(let outcome of result.outcomes){if(outcome.status===`error`){defaultRuntime.log(theme.error(outcome.message));continue}if(outcome.status===`skipped`){defaultRuntime.log(theme.warn(outcome.message));continue}defaultRuntime.log(outcome.message)}!opts.dryRun&&result.changed&&(await writeConfigFile(result.config),defaultRuntime.log(`Restart the gateway to load plugins.`))}),plugins.command(`doctor`).description(`Report plugin load issues`).action(()=>{let report=buildPluginStatusReport(),errors=report.plugins.filter(p=>p.status===`error`),diags=report.diagnostics.filter(d=>d.level===`error`);if(errors.length===0&&diags.length===0){defaultRuntime.log(`No plugin issues detected.`);return}let lines=[];if(errors.length>0){lines.push(theme.error(`Plugin errors:`));for(let entry of errors)lines.push(`- ${entry.id}: ${entry.error??`failed to load`} (${entry.source})`)}if(diags.length>0){lines.length>0&&lines.push(``),lines.push(theme.warn(`Diagnostics:`));for(let diag of diags){let target=diag.pluginId?`${diag.pluginId}: `:``;lines.push(`- ${target}${diag.message}`)}}let docs=formatDocsLink(`/plugin`,`docs.builderforce.ai/plugin`);lines.push(``),lines.push(`${theme.muted(`Docs:`)} ${docs}`),defaultRuntime.log(lines.join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./paths-BHg-VHB4.js";import{c as hasHelpOrVersion,n as getCommandPath,o as getVerboseFlag}from"./argv-BgQk38nl.js";import"./registry-Cv7CoWAs.js";import{N as setVerbose,R as isRich,c as escapeRegExp,z as theme}from"./utils-BP60e80M.js";import{p as defaultRuntime}from"./subsystem-C4b1Von0.js";import"./boolean-ssGoaBPk.js";import{t as isTruthyEnvValue}from"./env-BoE8QSib.js";import"./warning-filter-nSTjpMIH.js";import"./auth-profiles-BcStSGQ1.js";import{n as replaceCliName,r as resolveCliName}from"./command-format-DTMaGKs7.js";import"./logger-AbH8mdkv.js";import"./session-key-D--2AEus.js";import"./builderforce-root-D3-p8W2n.js";import"./exec-CGuYALEs.js";import"./agent-scope-BcoQBOwz.js";import"./env-file-BIKVpYUN.js";import"./src-DMo2gLcR.js";import{U as VERSION}from"./io-wLHeSE2L.js";import"./manifest-registry-DZdPjBqs.js";import"./config-DBrFbWRm.js";import"./model-discovery-CfknTieh.js";import"./model-catalog-CVRB77_N.js";import"./frontmatter-CoaI_oW6.js";import"./skills-CC5ozaMz.js";import"./plugin-skills-DUy_aY2T.js";import"./refresh-B38IMhwx.js";import"./client-BlsvYCEu.js";import"./call-Gj5Bi_oV.js";import"./message-channel-BjZV4RTT.js";import"./subagent-registry-
|
|
2
|
-
`);program.addHelpText(`afterAll`,({command})=>{if(command!==program)return``;let docs=formatDocsLink(`/cli`,`docs.builderforce.ai/cli`);return`\n${theme.heading(`Examples:`)}\n${fmtExamples}\n\n${theme.muted(`Docs:`)} ${docs}\n`})}function setProcessTitleForCommand(actionCommand){let current=actionCommand;for(;current.parent&¤t.parent.parent;)current=current.parent;let name=current.name(),cliName=resolveCliName();!name||name===cliName||(process.title=`${cliName}-${name}`)}const PLUGIN_REQUIRED_COMMANDS=new Set([`message`,`channels`,`directory`]);function registerPreActionHooks(program,programVersion){program.hook(`preAction`,async(_thisCommand,actionCommand)=>{setProcessTitleForCommand(actionCommand);let argv=process.argv;if(hasHelpOrVersion(argv))return;let commandPath=getCommandPath(argv,2);isTruthyEnvValue(process.env.BUILDERFORCE_AGENTS_HIDE_BANNER)||commandPath[0]===`update`||commandPath[0]===`completion`||commandPath[0]===`plugins`&&commandPath[1]===`update`||emitCliBanner(programVersion);let verbose=getVerboseFlag(argv,{includeDebug:!0});if(setVerbose(verbose),verbose||(process.env.NODE_NO_WARNINGS??=`1`),commandPath[0]===`doctor`||commandPath[0]===`completion`)return;let{ensureConfigReady}=await import(`./config-guard-B-IzBQ1f.js`);if(await ensureConfigReady({runtime:defaultRuntime,commandPath}),PLUGIN_REQUIRED_COMMANDS.has(commandPath[0])){let{ensurePluginRegistryLoaded}=await import(`./plugin-registry-
|
|
1
|
+
import"./paths-BHg-VHB4.js";import{c as hasHelpOrVersion,n as getCommandPath,o as getVerboseFlag}from"./argv-BgQk38nl.js";import"./registry-Cv7CoWAs.js";import{N as setVerbose,R as isRich,c as escapeRegExp,z as theme}from"./utils-BP60e80M.js";import{p as defaultRuntime}from"./subsystem-C4b1Von0.js";import"./boolean-ssGoaBPk.js";import{t as isTruthyEnvValue}from"./env-BoE8QSib.js";import"./warning-filter-nSTjpMIH.js";import"./auth-profiles-BcStSGQ1.js";import{n as replaceCliName,r as resolveCliName}from"./command-format-DTMaGKs7.js";import"./logger-AbH8mdkv.js";import"./session-key-D--2AEus.js";import"./builderforce-root-D3-p8W2n.js";import"./exec-CGuYALEs.js";import"./agent-scope-BcoQBOwz.js";import"./env-file-BIKVpYUN.js";import"./src-DMo2gLcR.js";import{U as VERSION}from"./io-wLHeSE2L.js";import"./manifest-registry-DZdPjBqs.js";import"./config-DBrFbWRm.js";import"./model-discovery-CfknTieh.js";import"./model-catalog-CVRB77_N.js";import"./frontmatter-CoaI_oW6.js";import"./skills-CC5ozaMz.js";import"./plugin-skills-DUy_aY2T.js";import"./refresh-B38IMhwx.js";import"./client-BlsvYCEu.js";import"./call-Gj5Bi_oV.js";import"./message-channel-BjZV4RTT.js";import"./subagent-registry-98yia-RN.js";import"./sessions-C5jAGWOS.js";import"./project-context-store-BFOv5caq.js";import"./tokens-BNwTTeJb.js";import"./plugins-DJGW_fnS.js";import"./accounts-Z5bJpNrG.js";import"./bindings-D0uket3l.js";import"./send-CgMJqDBP.js";import"./send-DfpZ9T_M.js";import"./with-timeout-ftXvzlo8.js";import"./deliver-DDFTiLT4.js";import"./accounts-DoJYLMfS.js";import"./send-5Vokn3Uv.js";import"./image-ops-Bg9yFwjX.js";import"./redact-bWj_-q3j.js";import"./errors-t5wHPcwh.js";import"./embedded-helpers-CsRjxr3I.js";import"./sandbox-bEma8jFA.js";import"./chrome-Kt4wxGF2.js";import"./tailscale-CgCG7AVQ.js";import"./auth-BNeS9xde.js";import"./server-context-0vSm_r2R.js";import"./routes-BLhXC8oU.js";import"./paths-GamzES41.js";import"./ssrf-BiSQzdcA.js";import"./store-C5LmVaEC.js";import"./ports-LqFTyTSK.js";import"./trash-zs6gNxed.js";import"./accounts-BT-NzzBc.js";import"./paths-BQ9W7Bs0.js";import"./tool-images-DV2HMmx4.js";import"./workspace-BnrYivUM.js";import"./reply-prefix-9hmbzubX.js";import"./sqlite-BEgCClMz.js";import"./memory-cli-BBsTN63-.js";import"./manager-BXMwSRz1.js";import"./gemini-auth-qrDeJkh5.js";import"./retry-Cc6xusE8.js";import"./common-BRdxH-uH.js";import"./runner-qhKGerma.js";import"./tool-display-BIswnHaq.js";import"./chunk-hYck1V5_.js";import"./markdown-tables-CpqWBduK.js";import"./fetch-guard-CoGEds8D.js";import"./fetch-CUsKv8oj.js";import"./ir-CTE1iR41.js";import"./render-1ABBE2Y6.js";import"./builderforcellm-syscheck-BTolQUtx.js";import"./session-utils-DDDkCdFF.js";import"./coding-tools.policy-CtBT-KXm.js";import"./pairing-store-sCqmKjk2.js";import"./fetch-CrbOFvsL.js";import"./exec-approvals-Cn0K-HtJ.js";import"./nodes-screen-OI7tHqlU.js";import"./session-cost-usage-BgZfN_WR.js";import"./provider-usage-nRVDmUHj.js";import"./send-COUZMiIL.js";import"./outbound-attachment-Bed_0M10.js";import"./delivery-queue-DQXq7KUU.js";import"./project-context-De5-TWPH.js";import"./control-service-DYVIKl0J.js";import"./stagger-CUH5rlmS.js";import"./channel-selection-CLFizn8u.js";import"./send-CWzV8Zdx.js";import"./resolve-route-D3X-bXU-.js";import"./channel-activity-By7lsk7N.js";import"./tables-XzBUkZcJ.js";import{t as formatDocsLink}from"./links-B6LU5cXN.js";import"./cli-utils-ByV85M53.js";import"./help-format-DIDk_7gh.js";import"./progress-BQMO_-7I.js";import"./replies-CiPwT32C.js";import"./onboard-helpers-Xl1gvLzt.js";import"./prompt-style-CZOeG0sw.js";import"./pairing-labels-DVbgCApx.js";import"./active-listener-BC31MA4v.js";import"./mamba-state-engine-CViPpwyy.js";import"./transformers-stream-nSL4Xu31.js";import"./catalog-myy00TyP.js";import"./plugin-registry-B5gTbK3m.js";import{n as resolveCliChannelOptions}from"./channel-options-DAkHvC-x.js";import{t as getSubCliCommandsWithSubcommands}from"./register.subclis-DxcQwaQg.js";import{a as registerProgramCommands,n as getCoreCliCommandsWithSubcommands}from"./command-registry-DUOpdtcT.js";import{n as setProgramContext}from"./program-context-D37YNAO5.js";import"./ports-DWKqfHru.js";import{n as formatCliBannerLine,r as hasEmittedCliBanner,t as emitCliBanner}from"./banner-Bx4c92N8.js";import{Command}from"commander";function createProgramContext(){let channelOptions=resolveCliChannelOptions();return{programVersion:VERSION,channelOptions,messageChannelOptions:channelOptions.join(`|`),agentChannelOptions:[`last`,...channelOptions].join(`|`)}}const CLI_NAME=resolveCliName(),CLI_NAME_PATTERN=escapeRegExp(CLI_NAME),ROOT_COMMANDS_WITH_SUBCOMMANDS=new Set([...getCoreCliCommandsWithSubcommands(),...getSubCliCommandsWithSubcommands()]),EXAMPLES=[[`builderforce models --help`,`Show detailed help for the models command.`],[`builderforce channels login --verbose`,`Link personal WhatsApp Web and show QR + connection logs.`],[`builderforce message send --target +15555550123 --message "Hi" --json`,`Send via your web session and print JSON result.`],[`builderforce gateway --port 18789`,`Run the WebSocket Gateway locally.`],[`builderforce --dev gateway`,`Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.`],[`builderforce gateway --force`,`Kill anything bound to the default gateway port, then start it.`],[`builderforce gateway ...`,`Gateway control via WebSocket.`],[`builderforce agent --to +15555550123 --message "Run summary" --deliver`,`Talk directly to the agent using the Gateway; optionally send the WhatsApp reply.`],[`builderforce message send --channel telegram --target @mychat --message "Hi"`,`Send via your Telegram bot.`]];function configureProgramHelp(program,ctx){program.name(CLI_NAME).description(``).version(ctx.programVersion).option(`--dev`,`Dev profile: isolate state under ~/.builderforce-dev, default gateway port 19001, and shift derived ports (browser/canvas)`).option(`--profile <name>`,`Use a named profile (isolates BUILDERFORCE_AGENTS_STATE_DIR/BUILDERFORCE_AGENTS_CONFIG_PATH under ~/.builderforce-<name>)`),program.option(`--no-color`,`Disable ANSI colors`,!1),program.helpOption(`-h, --help`,`Display help for command`),program.helpCommand(`help [command]`,`Display help for command`),program.configureHelp({sortSubcommands:!0,sortOptions:!0,optionTerm:option=>theme.option(option.flags),subcommandTerm:cmd=>{let hasSubcommands=cmd.parent===program&&ROOT_COMMANDS_WITH_SUBCOMMANDS.has(cmd.name());return theme.command(hasSubcommands?`${cmd.name()} *`:cmd.name())}});let formatHelpOutput=str=>{let output=str;return RegExp(`^Usage:\\s+${CLI_NAME_PATTERN}\\s+\\[options\\]\\s+\\[command\\]\\s*$`,`m`).test(output)&&/^Commands:/m.test(output)&&(output=output.replace(/^Commands:/m,`Commands:\n ${theme.muted(`Hint: commands suffixed with * have subcommands. Run <command> --help for details.`)}`)),output.replace(/^Usage:/gm,theme.heading(`Usage:`)).replace(/^Options:/gm,theme.heading(`Options:`)).replace(/^Commands:/gm,theme.heading(`Commands:`))};program.configureOutput({writeOut:str=>{process.stdout.write(formatHelpOutput(str))},writeErr:str=>{process.stderr.write(formatHelpOutput(str))},outputError:(str,write)=>write(theme.error(str))}),(process.argv.includes(`-V`)||process.argv.includes(`--version`)||process.argv.includes(`-v`))&&(console.log(ctx.programVersion),process.exit(0)),program.addHelpText(`beforeAll`,()=>{if(hasEmittedCliBanner())return``;let rich=isRich();return`\n${formatCliBannerLine(ctx.programVersion,{richTty:rich})}\n`});let fmtExamples=EXAMPLES.map(([cmd,desc])=>` ${theme.command(replaceCliName(cmd,CLI_NAME))}\n ${theme.muted(desc)}`).join(`
|
|
2
|
+
`);program.addHelpText(`afterAll`,({command})=>{if(command!==program)return``;let docs=formatDocsLink(`/cli`,`docs.builderforce.ai/cli`);return`\n${theme.heading(`Examples:`)}\n${fmtExamples}\n\n${theme.muted(`Docs:`)} ${docs}\n`})}function setProcessTitleForCommand(actionCommand){let current=actionCommand;for(;current.parent&¤t.parent.parent;)current=current.parent;let name=current.name(),cliName=resolveCliName();!name||name===cliName||(process.title=`${cliName}-${name}`)}const PLUGIN_REQUIRED_COMMANDS=new Set([`message`,`channels`,`directory`]);function registerPreActionHooks(program,programVersion){program.hook(`preAction`,async(_thisCommand,actionCommand)=>{setProcessTitleForCommand(actionCommand);let argv=process.argv;if(hasHelpOrVersion(argv))return;let commandPath=getCommandPath(argv,2);isTruthyEnvValue(process.env.BUILDERFORCE_AGENTS_HIDE_BANNER)||commandPath[0]===`update`||commandPath[0]===`completion`||commandPath[0]===`plugins`&&commandPath[1]===`update`||emitCliBanner(programVersion);let verbose=getVerboseFlag(argv,{includeDebug:!0});if(setVerbose(verbose),verbose||(process.env.NODE_NO_WARNINGS??=`1`),commandPath[0]===`doctor`||commandPath[0]===`completion`)return;let{ensureConfigReady}=await import(`./config-guard-B-IzBQ1f.js`);if(await ensureConfigReady({runtime:defaultRuntime,commandPath}),PLUGIN_REQUIRED_COMMANDS.has(commandPath[0])){let{ensurePluginRegistryLoaded}=await import(`./plugin-registry-CBXZbshG.js`);ensurePluginRegistryLoaded()}})}function buildProgram(){let program=new Command,ctx=createProgramContext(),argv=process.argv;return setProgramContext(program,ctx),configureProgramHelp(program,ctx),registerPreActionHooks(program,ctx.programVersion),registerProgramCommands(program,ctx,argv),program.option(`-m, --message <text>`,`Start a session and send this as the first message`).action(async opts=>{let{runBuilderForceAgentsSession}=await import(`./builderforce-DHU87PJG.js`);await runBuilderForceAgentsSession(process.cwd(),{message:opts.message})}),program}export{buildProgram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as isTruthyEnvValue}from"./env-BHP32i7Q.js";import{r as resolveActionArgs}from"./helpers-WeAzElGL.js";const HELP_FLAGS=new Set([`-h`,`--help`]),VERSION_FLAGS=new Set([`-v`,`-V`,`--version`]);function hasHelpOrVersion(argv){return argv.some(arg=>HELP_FLAGS.has(arg)||VERSION_FLAGS.has(arg))?!0:getPrimaryCommand(argv)===`help`}function hasFlag(argv,name){let args=argv.slice(2);for(let arg of args){if(arg===`--`)break;if(arg===name)return!0}return!1}function getVerboseFlag(argv,options){return!!(hasFlag(argv,`--verbose`)||options?.includeDebug&&hasFlag(argv,`--debug`))}function getCommandPath(argv,depth=2){let args=argv.slice(2),path=[];for(let i=0;i<args.length;i+=1){let arg=args[i];if(arg&&(arg===`--`||!arg.startsWith(`-`)&&(path.push(arg),path.length>=depth)))break}return path}function getPrimaryCommand(argv){let[primary]=getCommandPath(argv,1);return primary??null}function buildParseArgv(params){let baseArgv=params.rawArgs&¶ms.rawArgs.length>0?params.rawArgs:params.fallbackArgv&¶ms.fallbackArgv.length>0?params.fallbackArgv:process.argv,programName=params.programName??``,normalizedArgv=programName&&baseArgv[0]===programName||baseArgv[0]?.endsWith(`builderforce`)||baseArgv[0]?.endsWith(`builderforce`)?baseArgv.slice(1):baseArgv,executable=(normalizedArgv[0]?.split(/[/\\]/).pop()??``).toLowerCase();return normalizedArgv.length>=2&&(isNodeExecutable(executable)||isBunExecutable(executable))?normalizedArgv:[`node`,programName||`builderforce`,...normalizedArgv]}const nodeExecutablePattern=/^node-\d+(?:\.\d+)*(?:\.exe)?$/;function isNodeExecutable(executable){return executable===`node`||executable===`node.exe`||executable===`nodejs`||executable===`nodejs.exe`||nodeExecutablePattern.test(executable)}function isBunExecutable(executable){return executable===`bun`||executable===`bun.exe`}async function reparseProgramFromActionArgs(program,actionArgs){let actionCommand=actionArgs.at(-1),rawArgs=(actionCommand?.parent??program).rawArgs,actionArgsList=resolveActionArgs(actionCommand),fallbackArgv=actionCommand?.name()?[actionCommand.name(),...actionArgsList]:actionArgsList,parseArgv=buildParseArgv({programName:program.name(),rawArgs,fallbackArgv});await program.parseAsync(parseArgv)}const shouldRegisterPrimaryOnly=argv=>!(isTruthyEnvValue(process.env.BUILDERFORCE_AGENTS_DISABLE_LAZY_SUBCOMMANDS)||hasHelpOrVersion(argv)),shouldEagerRegisterSubcommands=_argv=>isTruthyEnvValue(process.env.BUILDERFORCE_AGENTS_DISABLE_LAZY_SUBCOMMANDS),loadConfig=async()=>{let{loadConfig:_load}=await import(`./io-C-mfrsSN.js`);return _load()},entries=[{name:`acp`,description:`Agent Control Protocol tools`,hasSubcommands:!0,register:async program=>{(await import(`./acp-cli-DVaekN8J.js`)).registerAcpCli(program)}},{name:`gateway`,description:`Run, inspect, and query the WebSocket Gateway`,hasSubcommands:!0,register:async program=>{(await import(`./gateway-cli-D5pW1jLs.js`)).registerGatewayCli(program)}},{name:`daemon`,description:`Gateway service (legacy alias)`,hasSubcommands:!0,register:async program=>{(await import(`./daemon-cli-_dmCI6te.js`)).registerDaemonCli(program)}},{name:`logs`,description:`Tail gateway file logs via RPC`,hasSubcommands:!1,register:async program=>{(await import(`./logs-cli-cz58cCec.js`)).registerLogsCli(program)}},{name:`usage`,description:`Show provider usage / quota (and workspace spend via gateway)`,hasSubcommands:!1,register:async program=>{(await import(`./usage-cli-CDDN5KkW.js`)).registerUsageCli(program)}},{name:`system`,description:`System events, heartbeat, and presence`,hasSubcommands:!0,register:async program=>{(await import(`./system-cli-DDPistQu.js`)).registerSystemCli(program)}},{name:`models`,description:`Discover, scan, and configure models`,hasSubcommands:!0,register:async program=>{(await import(`./models-cli-CAaWi4TX.js`)).registerModelsCli(program)}},{name:`approvals`,description:`Manage exec approvals (gateway or node host)`,hasSubcommands:!0,register:async program=>{(await import(`./exec-approvals-cli-CdVQeNCT.js`)).registerExecApprovalsCli(program)}},{name:`nodes`,description:`Manage gateway-owned node pairing and node commands`,hasSubcommands:!0,register:async program=>{(await import(`./nodes-cli-Bifan_fg.js`)).registerNodesCli(program)}},{name:`devices`,description:`Device pairing + token management`,hasSubcommands:!0,register:async program=>{(await import(`./devices-cli-DRjcg3Uu.js`)).registerDevicesCli(program)}},{name:`node`,description:`Run and manage the headless node host service`,hasSubcommands:!0,register:async program=>{(await import(`./node-cli-C-4o0PGx.js`)).registerNodeCli(program)}},{name:`sandbox`,description:`Manage sandbox containers for agent isolation`,hasSubcommands:!0,register:async program=>{(await import(`./sandbox-cli-Ck-qKH4D.js`)).registerSandboxCli(program)}},{name:`tui`,description:`Open a terminal UI connected to the Gateway`,hasSubcommands:!1,register:async program=>{(await import(`./tui-cli-CLYxMYyC.js`)).registerTuiCli(program)}},{name:`cron`,description:`Manage cron jobs via the Gateway scheduler`,hasSubcommands:!0,register:async program=>{(await import(`./cron-cli-CR4iDQos.js`)).registerCronCli(program)}},{name:`workflow`,description:`Trigger Builderforce workflows from the CLI / CI`,hasSubcommands:!0,register:async program=>{(await import(`./workflow-cli-ZQhkuCM5.js`)).registerWorkflowCli(program)}},{name:`dns`,description:`DNS helpers for wide-area discovery (Tailscale + CoreDNS)`,hasSubcommands:!0,register:async program=>{(await import(`./dns-cli-CT345ShR.js`)).registerDnsCli(program)}},{name:`docs`,description:`Search the live BuilderForceAgents docs`,hasSubcommands:!1,register:async program=>{(await import(`./docs-cli-B3qeVFrN.js`)).registerDocsCli(program)}},{name:`hooks`,description:`Manage internal agent hooks`,hasSubcommands:!0,register:async program=>{(await import(`./hooks-cli-BQZjt-Fk.js`)).registerHooksCli(program)}},{name:`webhooks`,description:`Webhook helpers and integrations`,hasSubcommands:!0,register:async program=>{(await import(`./webhooks-cli-Fk0iB2K2.js`)).registerWebhooksCli(program)}},{name:`qr`,description:`Generate iOS pairing QR/setup code`,hasSubcommands:!1,register:async program=>{(await import(`./qr-cli-Qd8rfeer.js`)).registerQrCli(program)}},{name:`agentbot`,description:`Legacy agentbot command aliases`,hasSubcommands:!0,register:async program=>{(await import(`./agentbot-cli-DgIdhxnB.js`)).registerAgentbotCli(program)}},{name:`pairing`,description:`Secure DM pairing (approve inbound requests)`,hasSubcommands:!0,register:async program=>{let{registerPluginCliCommands}=await import(`./cli-DlaHihmr.js`);registerPluginCliCommands(program,await loadConfig()),(await import(`./pairing-cli-BZQ9Wp_a.js`)).registerPairingCli(program)}},{name:`plugins`,description:`Manage BuilderForceAgents plugins and extensions`,hasSubcommands:!0,register:async program=>{(await import(`./plugins-cli-c36MSKiX.js`)).registerPluginsCli(program);let{registerPluginCliCommands}=await import(`./cli-DlaHihmr.js`);registerPluginCliCommands(program,await loadConfig())}},{name:`channels`,description:`Manage connected chat channels (Telegram, Discord, etc.)`,hasSubcommands:!0,register:async program=>{(await import(`./channels-cli-sHtDH37K.js`)).registerChannelsCli(program)}},{name:`directory`,description:`Lookup contact and group IDs (self, peers, groups) for supported chat channels`,hasSubcommands:!0,register:async program=>{(await import(`./directory-cli-B0EmhYST.js`)).registerDirectoryCli(program)}},{name:`security`,description:`Security tools and local config audits`,hasSubcommands:!0,register:async program=>{(await import(`./security-cli-BNunJnZq.js`)).registerSecurityCli(program)}},{name:`skills`,description:`List and inspect available skills`,hasSubcommands:!0,register:async program=>{(await import(`./skills-cli-CF4Wo8uB.js`)).registerSkillsCli(program)}},{name:`update`,description:`Update BuilderForceAgents and inspect update channel status`,hasSubcommands:!0,register:async program=>{(await import(`./update-cli-uQLI7RCN.js`)).registerUpdateCli(program)}},{name:`completion`,description:`Generate shell completion script`,hasSubcommands:!1,register:async program=>{(await import(`./completion-cli-H4iKy2_f.js`)).registerCompletionCli(program)}}];function getSubCliEntries(){return entries}function getSubCliCommandsWithSubcommands(){return entries.filter(entry=>entry.hasSubcommands).map(entry=>entry.name)}function removeCommand$1(program,command){let commands=program.commands,index=commands.indexOf(command);index>=0&&commands.splice(index,1)}async function registerSubCliByName(program,name){let entry=entries.find(candidate=>candidate.name===name);if(!entry)return!1;let existing=program.commands.find(cmd=>cmd.name()===entry.name);return existing&&removeCommand$1(program,existing),await entry.register(program),!0}function registerLazyCommand(program,entry){let placeholder=program.command(entry.name).description(entry.description);placeholder.allowUnknownOption(!0),placeholder.allowExcessArguments(!0),placeholder.action(async(...actionArgs)=>{removeCommand$1(program,placeholder),await entry.register(program),await reparseProgramFromActionArgs(program,actionArgs)})}function registerSubCliCommands(program,argv=process.argv){if(shouldEagerRegisterSubcommands(argv)){for(let entry of entries)entry.register(program);return}let primary=getPrimaryCommand(argv);if(primary&&shouldRegisterPrimaryOnly(argv)){let entry=entries.find(candidate=>candidate.name===primary);if(entry){registerLazyCommand(program,entry);return}}for(let candidate of entries)registerLazyCommand(program,candidate)}const shouldRegisterCorePrimaryOnly=argv=>!hasHelpOrVersion(argv),coreEntries=[{commands:[{name:`setup`,description:`Initialize local config and agent workspace`,hasSubcommands:!1}],register:async({program})=>{(await import(`./register.setup-Cvk8SB1q.js`)).registerSetupCommand(program)}},{commands:[{name:`onboard`,description:`Interactive onboarding wizard for gateway, workspace, and skills`,hasSubcommands:!1}],register:async({program})=>{(await import(`./register.onboard-4y1mzgCn.js`)).registerOnboardCommand(program)}},{commands:[{name:`connect`,description:`Register this machine as an agent host in a Builderforce workspace`,hasSubcommands:!1}],register:async({program})=>{(await import(`./register.connect-CGFzlF_X.js`)).registerConnectCommand(program)}},{commands:[{name:`configure`,description:`Interactive setup wizard for credentials, channels, gateway, and agent defaults`,hasSubcommands:!1}],register:async({program})=>{(await import(`./register.configure-Bflad790.js`)).registerConfigureCommand(program)}},{commands:[{name:`config`,description:`Non-interactive config helpers (get/set/unset). Default: starts setup wizard.`,hasSubcommands:!0}],register:async({program})=>{(await import(`./config-cli-D6KAk3vw.js`)).registerConfigCli(program)}},{commands:[{name:`doctor`,description:`Health checks + quick fixes for the gateway and channels`,hasSubcommands:!1},{name:`dashboard`,description:`Open the Control UI with your current token`,hasSubcommands:!1},{name:`reset`,description:`Reset local config/state (keeps the CLI installed)`,hasSubcommands:!1},{name:`stop`,description:`Stop the running gateway service`,hasSubcommands:!1},{name:`uninstall`,description:`Uninstall the gateway service + local data (CLI remains)`,hasSubcommands:!1}],register:async({program})=>{(await import(`./register.maintenance-Dl7P66Jm.js`)).registerMaintenanceCommands(program)}},{commands:[{name:`message`,description:`Send, read, and manage messages`,hasSubcommands:!0}],register:async({program,ctx})=>{(await import(`./register.message-CJS3PPCy.js`)).registerMessageCommands(program,ctx)}},{commands:[{name:`memory`,description:`Search and reindex memory files`,hasSubcommands:!0}],register:async({program})=>{(await import(`./memory-cli-CkEi9E2L.js`)).registerMemoryCli(program)}},{commands:[{name:`agent`,description:`Run one agent turn via the Gateway`,hasSubcommands:!1},{name:`agents`,description:`Manage isolated agents (workspaces, auth, routing)`,hasSubcommands:!0}],register:async({program,ctx})=>{(await import(`./register.agent-DNaHcARI.js`)).registerAgentCommands(program,{agentChannelOptions:ctx.agentChannelOptions})}},{commands:[{name:`status`,description:`Show channel health and recent session recipients`,hasSubcommands:!1},{name:`health`,description:`Fetch health from the running gateway`,hasSubcommands:!1},{name:`sessions`,description:`List stored conversation sessions`,hasSubcommands:!1}],register:async({program})=>{(await import(`./register.status-health-sessions-CjxA4ATI.js`)).registerStatusHealthSessionsCommands(program)}},{commands:[{name:`browser`,description:`Manage BuilderForceAgents's dedicated browser (Chrome/Chromium)`,hasSubcommands:!0}],register:async({program})=>{(await import(`./browser-cli-piNgOtdg.js`)).registerBrowserCli(program)}},{commands:[{name:`init`,description:`Initialize a project with builderForceAgents`,hasSubcommands:!1},{name:`project`,description:`Manage builderForceAgents project context`,hasSubcommands:!0},{name:`workforce`,description:`Manage Builderforce Workforce agents (custom trained LLMs)`,hasSubcommands:!0}],register:async({program})=>{let mod=await import(`./builderforce-C86noipf.js`);program.addCommand(mod.createInitCommand()),program.addCommand(mod.createBuilderForceAgentsCommand()),program.addCommand(mod.createAgentCommand())}}];function collectCoreCliCommandNames(predicate){let seen=new Set,names=[];for(let entry of coreEntries)for(let command of entry.commands)predicate&&!predicate(command)||seen.has(command.name)||(seen.add(command.name),names.push(command.name));return names}function getCoreCliCommandNames(){return collectCoreCliCommandNames()}function getCoreCliCommandsWithSubcommands(){return collectCoreCliCommandNames(command=>command.hasSubcommands)}function removeCommand(program,command){let commands=program.commands,index=commands.indexOf(command);index>=0&&commands.splice(index,1)}function removeEntryCommands(program,entry){for(let cmd of entry.commands){let existing=program.commands.find(c=>c.name()===cmd.name);existing&&removeCommand(program,existing)}}function registerLazyCoreCommand(program,ctx,entry,command){let placeholder=program.command(command.name).description(command.description);placeholder.allowUnknownOption(!0),placeholder.allowExcessArguments(!0),placeholder.action(async(...actionArgs)=>{removeEntryCommands(program,entry),await entry.register({program,ctx,argv:process.argv}),await reparseProgramFromActionArgs(program,actionArgs)})}async function registerCoreCliByName(program,ctx,name,argv=process.argv){let entry=coreEntries.find(candidate=>candidate.commands.some(cmd=>cmd.name===name));return entry?(removeEntryCommands(program,entry),await entry.register({program,ctx,argv}),!0):!1}function registerCoreCliCommands(program,ctx,argv){let primary=getPrimaryCommand(argv);if(primary&&shouldRegisterCorePrimaryOnly(argv)){let entry=coreEntries.find(candidate=>candidate.commands.some(cmd=>cmd.name===primary));if(entry){let cmd=entry.commands.find(c=>c.name===primary);cmd&®isterLazyCoreCommand(program,ctx,entry,cmd);return}}for(let entry of coreEntries)for(let cmd of entry.commands)registerLazyCoreCommand(program,ctx,entry,cmd)}function registerProgramCommands(program,ctx,argv=process.argv){registerCoreCliCommands(program,ctx,argv),registerSubCliCommands(program,argv)}const PROGRAM_CONTEXT_SYMBOL=Symbol.for(`builderforce.cli.programContext`);function setProgramContext(program,ctx){program[PROGRAM_CONTEXT_SYMBOL]=ctx}function getProgramContext(program){return program[PROGRAM_CONTEXT_SYMBOL]}export{registerCoreCliByName as a,getSubCliEntries as c,getVerboseFlag as d,hasHelpOrVersion as f,getCoreCliCommandsWithSubcommands as i,registerSubCliByName as l,setProgramContext as n,registerProgramCommands as o,getCoreCliCommandNames as r,getSubCliCommandsWithSubcommands as s,getProgramContext as t,getCommandPath as u};
|
|
1
|
+
import{t as isTruthyEnvValue}from"./env-BHP32i7Q.js";import{r as resolveActionArgs}from"./helpers-WeAzElGL.js";const HELP_FLAGS=new Set([`-h`,`--help`]),VERSION_FLAGS=new Set([`-v`,`-V`,`--version`]);function hasHelpOrVersion(argv){return argv.some(arg=>HELP_FLAGS.has(arg)||VERSION_FLAGS.has(arg))?!0:getPrimaryCommand(argv)===`help`}function hasFlag(argv,name){let args=argv.slice(2);for(let arg of args){if(arg===`--`)break;if(arg===name)return!0}return!1}function getVerboseFlag(argv,options){return!!(hasFlag(argv,`--verbose`)||options?.includeDebug&&hasFlag(argv,`--debug`))}function getCommandPath(argv,depth=2){let args=argv.slice(2),path=[];for(let i=0;i<args.length;i+=1){let arg=args[i];if(arg&&(arg===`--`||!arg.startsWith(`-`)&&(path.push(arg),path.length>=depth)))break}return path}function getPrimaryCommand(argv){let[primary]=getCommandPath(argv,1);return primary??null}function buildParseArgv(params){let baseArgv=params.rawArgs&¶ms.rawArgs.length>0?params.rawArgs:params.fallbackArgv&¶ms.fallbackArgv.length>0?params.fallbackArgv:process.argv,programName=params.programName??``,normalizedArgv=programName&&baseArgv[0]===programName||baseArgv[0]?.endsWith(`builderforce`)||baseArgv[0]?.endsWith(`builderforce`)?baseArgv.slice(1):baseArgv,executable=(normalizedArgv[0]?.split(/[/\\]/).pop()??``).toLowerCase();return normalizedArgv.length>=2&&(isNodeExecutable(executable)||isBunExecutable(executable))?normalizedArgv:[`node`,programName||`builderforce`,...normalizedArgv]}const nodeExecutablePattern=/^node-\d+(?:\.\d+)*(?:\.exe)?$/;function isNodeExecutable(executable){return executable===`node`||executable===`node.exe`||executable===`nodejs`||executable===`nodejs.exe`||nodeExecutablePattern.test(executable)}function isBunExecutable(executable){return executable===`bun`||executable===`bun.exe`}async function reparseProgramFromActionArgs(program,actionArgs){let actionCommand=actionArgs.at(-1),rawArgs=(actionCommand?.parent??program).rawArgs,actionArgsList=resolveActionArgs(actionCommand),fallbackArgv=actionCommand?.name()?[actionCommand.name(),...actionArgsList]:actionArgsList,parseArgv=buildParseArgv({programName:program.name(),rawArgs,fallbackArgv});await program.parseAsync(parseArgv)}const shouldRegisterPrimaryOnly=argv=>!(isTruthyEnvValue(process.env.BUILDERFORCE_AGENTS_DISABLE_LAZY_SUBCOMMANDS)||hasHelpOrVersion(argv)),shouldEagerRegisterSubcommands=_argv=>isTruthyEnvValue(process.env.BUILDERFORCE_AGENTS_DISABLE_LAZY_SUBCOMMANDS),loadConfig=async()=>{let{loadConfig:_load}=await import(`./io-C-mfrsSN.js`);return _load()},entries=[{name:`acp`,description:`Agent Control Protocol tools`,hasSubcommands:!0,register:async program=>{(await import(`./acp-cli-DVaekN8J.js`)).registerAcpCli(program)}},{name:`gateway`,description:`Run, inspect, and query the WebSocket Gateway`,hasSubcommands:!0,register:async program=>{(await import(`./gateway-cli-DvMzpFIF.js`)).registerGatewayCli(program)}},{name:`daemon`,description:`Gateway service (legacy alias)`,hasSubcommands:!0,register:async program=>{(await import(`./daemon-cli-_dmCI6te.js`)).registerDaemonCli(program)}},{name:`logs`,description:`Tail gateway file logs via RPC`,hasSubcommands:!1,register:async program=>{(await import(`./logs-cli-cz58cCec.js`)).registerLogsCli(program)}},{name:`usage`,description:`Show provider usage / quota (and workspace spend via gateway)`,hasSubcommands:!1,register:async program=>{(await import(`./usage-cli-CDDN5KkW.js`)).registerUsageCli(program)}},{name:`system`,description:`System events, heartbeat, and presence`,hasSubcommands:!0,register:async program=>{(await import(`./system-cli-DDPistQu.js`)).registerSystemCli(program)}},{name:`models`,description:`Discover, scan, and configure models`,hasSubcommands:!0,register:async program=>{(await import(`./models-cli-nD2MyRO3.js`)).registerModelsCli(program)}},{name:`approvals`,description:`Manage exec approvals (gateway or node host)`,hasSubcommands:!0,register:async program=>{(await import(`./exec-approvals-cli-CdVQeNCT.js`)).registerExecApprovalsCli(program)}},{name:`nodes`,description:`Manage gateway-owned node pairing and node commands`,hasSubcommands:!0,register:async program=>{(await import(`./nodes-cli-Bifan_fg.js`)).registerNodesCli(program)}},{name:`devices`,description:`Device pairing + token management`,hasSubcommands:!0,register:async program=>{(await import(`./devices-cli-DRjcg3Uu.js`)).registerDevicesCli(program)}},{name:`node`,description:`Run and manage the headless node host service`,hasSubcommands:!0,register:async program=>{(await import(`./node-cli-C-4o0PGx.js`)).registerNodeCli(program)}},{name:`sandbox`,description:`Manage sandbox containers for agent isolation`,hasSubcommands:!0,register:async program=>{(await import(`./sandbox-cli-Ck-qKH4D.js`)).registerSandboxCli(program)}},{name:`tui`,description:`Open a terminal UI connected to the Gateway`,hasSubcommands:!1,register:async program=>{(await import(`./tui-cli-3mxSu-O0.js`)).registerTuiCli(program)}},{name:`cron`,description:`Manage cron jobs via the Gateway scheduler`,hasSubcommands:!0,register:async program=>{(await import(`./cron-cli-CR4iDQos.js`)).registerCronCli(program)}},{name:`workflow`,description:`Trigger Builderforce workflows from the CLI / CI`,hasSubcommands:!0,register:async program=>{(await import(`./workflow-cli-ZQhkuCM5.js`)).registerWorkflowCli(program)}},{name:`dns`,description:`DNS helpers for wide-area discovery (Tailscale + CoreDNS)`,hasSubcommands:!0,register:async program=>{(await import(`./dns-cli-CT345ShR.js`)).registerDnsCli(program)}},{name:`docs`,description:`Search the live BuilderForceAgents docs`,hasSubcommands:!1,register:async program=>{(await import(`./docs-cli-B3qeVFrN.js`)).registerDocsCli(program)}},{name:`hooks`,description:`Manage internal agent hooks`,hasSubcommands:!0,register:async program=>{(await import(`./hooks-cli-D1mx0_F_.js`)).registerHooksCli(program)}},{name:`webhooks`,description:`Webhook helpers and integrations`,hasSubcommands:!0,register:async program=>{(await import(`./webhooks-cli-Fk0iB2K2.js`)).registerWebhooksCli(program)}},{name:`qr`,description:`Generate iOS pairing QR/setup code`,hasSubcommands:!1,register:async program=>{(await import(`./qr-cli-Qd8rfeer.js`)).registerQrCli(program)}},{name:`agentbot`,description:`Legacy agentbot command aliases`,hasSubcommands:!0,register:async program=>{(await import(`./agentbot-cli-DgIdhxnB.js`)).registerAgentbotCli(program)}},{name:`pairing`,description:`Secure DM pairing (approve inbound requests)`,hasSubcommands:!0,register:async program=>{let{registerPluginCliCommands}=await import(`./cli-DnMFuBeA.js`);registerPluginCliCommands(program,await loadConfig()),(await import(`./pairing-cli-BZQ9Wp_a.js`)).registerPairingCli(program)}},{name:`plugins`,description:`Manage BuilderForceAgents plugins and extensions`,hasSubcommands:!0,register:async program=>{(await import(`./plugins-cli-Cv_bwpr4.js`)).registerPluginsCli(program);let{registerPluginCliCommands}=await import(`./cli-DnMFuBeA.js`);registerPluginCliCommands(program,await loadConfig())}},{name:`channels`,description:`Manage connected chat channels (Telegram, Discord, etc.)`,hasSubcommands:!0,register:async program=>{(await import(`./channels-cli-DHFIXbTT.js`)).registerChannelsCli(program)}},{name:`directory`,description:`Lookup contact and group IDs (self, peers, groups) for supported chat channels`,hasSubcommands:!0,register:async program=>{(await import(`./directory-cli-B0EmhYST.js`)).registerDirectoryCli(program)}},{name:`security`,description:`Security tools and local config audits`,hasSubcommands:!0,register:async program=>{(await import(`./security-cli-BNunJnZq.js`)).registerSecurityCli(program)}},{name:`skills`,description:`List and inspect available skills`,hasSubcommands:!0,register:async program=>{(await import(`./skills-cli-CF4Wo8uB.js`)).registerSkillsCli(program)}},{name:`update`,description:`Update BuilderForceAgents and inspect update channel status`,hasSubcommands:!0,register:async program=>{(await import(`./update-cli-BYhJHTZ0.js`)).registerUpdateCli(program)}},{name:`completion`,description:`Generate shell completion script`,hasSubcommands:!1,register:async program=>{(await import(`./completion-cli-Cq33pQdJ.js`)).registerCompletionCli(program)}}];function getSubCliEntries(){return entries}function getSubCliCommandsWithSubcommands(){return entries.filter(entry=>entry.hasSubcommands).map(entry=>entry.name)}function removeCommand$1(program,command){let commands=program.commands,index=commands.indexOf(command);index>=0&&commands.splice(index,1)}async function registerSubCliByName(program,name){let entry=entries.find(candidate=>candidate.name===name);if(!entry)return!1;let existing=program.commands.find(cmd=>cmd.name()===entry.name);return existing&&removeCommand$1(program,existing),await entry.register(program),!0}function registerLazyCommand(program,entry){let placeholder=program.command(entry.name).description(entry.description);placeholder.allowUnknownOption(!0),placeholder.allowExcessArguments(!0),placeholder.action(async(...actionArgs)=>{removeCommand$1(program,placeholder),await entry.register(program),await reparseProgramFromActionArgs(program,actionArgs)})}function registerSubCliCommands(program,argv=process.argv){if(shouldEagerRegisterSubcommands(argv)){for(let entry of entries)entry.register(program);return}let primary=getPrimaryCommand(argv);if(primary&&shouldRegisterPrimaryOnly(argv)){let entry=entries.find(candidate=>candidate.name===primary);if(entry){registerLazyCommand(program,entry);return}}for(let candidate of entries)registerLazyCommand(program,candidate)}const shouldRegisterCorePrimaryOnly=argv=>!hasHelpOrVersion(argv),coreEntries=[{commands:[{name:`setup`,description:`Initialize local config and agent workspace`,hasSubcommands:!1}],register:async({program})=>{(await import(`./register.setup-BMFb9IC4.js`)).registerSetupCommand(program)}},{commands:[{name:`onboard`,description:`Interactive onboarding wizard for gateway, workspace, and skills`,hasSubcommands:!1}],register:async({program})=>{(await import(`./register.onboard-D9mB9MLj.js`)).registerOnboardCommand(program)}},{commands:[{name:`connect`,description:`Register this machine as an agent host in a Builderforce workspace`,hasSubcommands:!1}],register:async({program})=>{(await import(`./register.connect-CGFzlF_X.js`)).registerConnectCommand(program)}},{commands:[{name:`configure`,description:`Interactive setup wizard for credentials, channels, gateway, and agent defaults`,hasSubcommands:!1}],register:async({program})=>{(await import(`./register.configure-BsBerk8U.js`)).registerConfigureCommand(program)}},{commands:[{name:`config`,description:`Non-interactive config helpers (get/set/unset). Default: starts setup wizard.`,hasSubcommands:!0}],register:async({program})=>{(await import(`./config-cli-BIQl_nrn.js`)).registerConfigCli(program)}},{commands:[{name:`doctor`,description:`Health checks + quick fixes for the gateway and channels`,hasSubcommands:!1},{name:`dashboard`,description:`Open the Control UI with your current token`,hasSubcommands:!1},{name:`reset`,description:`Reset local config/state (keeps the CLI installed)`,hasSubcommands:!1},{name:`stop`,description:`Stop the running gateway service`,hasSubcommands:!1},{name:`uninstall`,description:`Uninstall the gateway service + local data (CLI remains)`,hasSubcommands:!1}],register:async({program})=>{(await import(`./register.maintenance-B83yzc-P.js`)).registerMaintenanceCommands(program)}},{commands:[{name:`message`,description:`Send, read, and manage messages`,hasSubcommands:!0}],register:async({program,ctx})=>{(await import(`./register.message-BVo8xLbS.js`)).registerMessageCommands(program,ctx)}},{commands:[{name:`memory`,description:`Search and reindex memory files`,hasSubcommands:!0}],register:async({program})=>{(await import(`./memory-cli-CkEi9E2L.js`)).registerMemoryCli(program)}},{commands:[{name:`agent`,description:`Run one agent turn via the Gateway`,hasSubcommands:!1},{name:`agents`,description:`Manage isolated agents (workspaces, auth, routing)`,hasSubcommands:!0}],register:async({program,ctx})=>{(await import(`./register.agent-CbP_v3k5.js`)).registerAgentCommands(program,{agentChannelOptions:ctx.agentChannelOptions})}},{commands:[{name:`status`,description:`Show channel health and recent session recipients`,hasSubcommands:!1},{name:`health`,description:`Fetch health from the running gateway`,hasSubcommands:!1},{name:`sessions`,description:`List stored conversation sessions`,hasSubcommands:!1}],register:async({program})=>{(await import(`./register.status-health-sessions-BqMqFeMA.js`)).registerStatusHealthSessionsCommands(program)}},{commands:[{name:`browser`,description:`Manage BuilderForceAgents's dedicated browser (Chrome/Chromium)`,hasSubcommands:!0}],register:async({program})=>{(await import(`./browser-cli-piNgOtdg.js`)).registerBrowserCli(program)}},{commands:[{name:`init`,description:`Initialize a project with builderForceAgents`,hasSubcommands:!1},{name:`project`,description:`Manage builderForceAgents project context`,hasSubcommands:!0},{name:`workforce`,description:`Manage Builderforce Workforce agents (custom trained LLMs)`,hasSubcommands:!0}],register:async({program})=>{let mod=await import(`./builderforce-DgYCZ3Up.js`);program.addCommand(mod.createInitCommand()),program.addCommand(mod.createBuilderForceAgentsCommand()),program.addCommand(mod.createAgentCommand())}}];function collectCoreCliCommandNames(predicate){let seen=new Set,names=[];for(let entry of coreEntries)for(let command of entry.commands)predicate&&!predicate(command)||seen.has(command.name)||(seen.add(command.name),names.push(command.name));return names}function getCoreCliCommandNames(){return collectCoreCliCommandNames()}function getCoreCliCommandsWithSubcommands(){return collectCoreCliCommandNames(command=>command.hasSubcommands)}function removeCommand(program,command){let commands=program.commands,index=commands.indexOf(command);index>=0&&commands.splice(index,1)}function removeEntryCommands(program,entry){for(let cmd of entry.commands){let existing=program.commands.find(c=>c.name()===cmd.name);existing&&removeCommand(program,existing)}}function registerLazyCoreCommand(program,ctx,entry,command){let placeholder=program.command(command.name).description(command.description);placeholder.allowUnknownOption(!0),placeholder.allowExcessArguments(!0),placeholder.action(async(...actionArgs)=>{removeEntryCommands(program,entry),await entry.register({program,ctx,argv:process.argv}),await reparseProgramFromActionArgs(program,actionArgs)})}async function registerCoreCliByName(program,ctx,name,argv=process.argv){let entry=coreEntries.find(candidate=>candidate.commands.some(cmd=>cmd.name===name));return entry?(removeEntryCommands(program,entry),await entry.register({program,ctx,argv}),!0):!1}function registerCoreCliCommands(program,ctx,argv){let primary=getPrimaryCommand(argv);if(primary&&shouldRegisterCorePrimaryOnly(argv)){let entry=coreEntries.find(candidate=>candidate.commands.some(cmd=>cmd.name===primary));if(entry){let cmd=entry.commands.find(c=>c.name===primary);cmd&®isterLazyCoreCommand(program,ctx,entry,cmd);return}}for(let entry of coreEntries)for(let cmd of entry.commands)registerLazyCoreCommand(program,ctx,entry,cmd)}function registerProgramCommands(program,ctx,argv=process.argv){registerCoreCliCommands(program,ctx,argv),registerSubCliCommands(program,argv)}const PROGRAM_CONTEXT_SYMBOL=Symbol.for(`builderforce.cli.programContext`);function setProgramContext(program,ctx){program[PROGRAM_CONTEXT_SYMBOL]=ctx}function getProgramContext(program){return program[PROGRAM_CONTEXT_SYMBOL]}export{registerCoreCliByName as a,getSubCliEntries as c,getVerboseFlag as d,hasHelpOrVersion as f,getCoreCliCommandsWithSubcommands as i,registerSubCliByName as l,setProgramContext as n,registerProgramCommands as o,getCoreCliCommandNames as r,getSubCliCommandsWithSubcommands as s,getProgramContext as t,getCommandPath as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as resolveIsNixMode,f as resolveLegacyStateDirs,g as resolveStateDir,m as resolveOAuthDir,p as resolveNewStateDir,t as CONFIG_PATH,u as resolveGatewayPort,y as resolveRequiredHomeDir}from"./paths-BHg-VHB4.js";import{C as sleep,S as shortenHomePath,W as getResolvedLoggerSettings,_ as resolveHomeDir$1,d as isRecord,y as resolveUserPath}from"./utils-BP60e80M.js";import{p as defaultRuntime}from"./subsystem-C4b1Von0.js";import{t as isTruthyEnvValue}from"./env-BoE8QSib.js";import{H as resolveConfiguredModelRef,It as resolveApiKeyForProvider,N as getModelRefStatus,S as updateAuthProfileStoreWithLock,W as resolveHooksGmailModel,an as DEFAULT_MODEL,b as ensureAuthProfileStore,hn as CODEX_CLI_PROFILE_ID,mn as CLAUDE_CLI_PROFILE_ID,o as resolveProfileUnusableUntilForDisplay,on as DEFAULT_PROVIDER,p as repairOAuthProfileIdMismatch,s as resolveApiKeyForProfile}from"./auth-profiles-BcStSGQ1.js";import{t as formatCliCommand}from"./command-format-DTMaGKs7.js";import{a as buildAgentMainSessionKey,d as normalizeAgentId,i as DEFAULT_MAIN_KEY,n as DEFAULT_ACCOUNT_ID}from"./session-key-D--2AEus.js";import{t as resolveBuilderForceAgentsPackageRoot}from"./builderforce-root-D3-p8W2n.js";import{n as runExec,t as runCommandWithTimeout}from"./exec-CGuYALEs.js";import{A as resolveWorkspaceFilePath,c as resolveAgentWorkspaceDir,i as resolveAgentDir,l as resolveDefaultAgentId,p as DEFAULT_AGENTS_FILENAME}from"./agent-scope-BcoQBOwz.js";import{a as readConfigFileSnapshot,c as writeConfigFile,p as BuilderForceAgentsSchema}from"./io-wLHeSE2L.js";import{t as migrateLegacyConfig}from"./config-DBrFbWRm.js";import{r as loadModelCatalog}from"./model-catalog-CVRB77_N.js";import{t as buildWorkspaceSkillStatus}from"./skills-status-DILzO06u.js";import{n as callGateway,t as buildGatewayConnectionDetails}from"./call-Gj5Bi_oV.js";import{l as resolveGatewayBindHost,n as isLoopbackHost}from"./net-BDBv0ZGP.js";import{Mn as buildAuthHealthSummary,Nn as formatRemainingShort,jn as DEFAULT_OAUTH_WARN_MS,w as loadBuilderForceAgentsPlugins}from"./subagent-registry-
|
|
1
|
+
import{d as resolveIsNixMode,f as resolveLegacyStateDirs,g as resolveStateDir,m as resolveOAuthDir,p as resolveNewStateDir,t as CONFIG_PATH,u as resolveGatewayPort,y as resolveRequiredHomeDir}from"./paths-BHg-VHB4.js";import{C as sleep,S as shortenHomePath,W as getResolvedLoggerSettings,_ as resolveHomeDir$1,d as isRecord,y as resolveUserPath}from"./utils-BP60e80M.js";import{p as defaultRuntime}from"./subsystem-C4b1Von0.js";import{t as isTruthyEnvValue}from"./env-BoE8QSib.js";import{H as resolveConfiguredModelRef,It as resolveApiKeyForProvider,N as getModelRefStatus,S as updateAuthProfileStoreWithLock,W as resolveHooksGmailModel,an as DEFAULT_MODEL,b as ensureAuthProfileStore,hn as CODEX_CLI_PROFILE_ID,mn as CLAUDE_CLI_PROFILE_ID,o as resolveProfileUnusableUntilForDisplay,on as DEFAULT_PROVIDER,p as repairOAuthProfileIdMismatch,s as resolveApiKeyForProfile}from"./auth-profiles-BcStSGQ1.js";import{t as formatCliCommand}from"./command-format-DTMaGKs7.js";import{a as buildAgentMainSessionKey,d as normalizeAgentId,i as DEFAULT_MAIN_KEY,n as DEFAULT_ACCOUNT_ID}from"./session-key-D--2AEus.js";import{t as resolveBuilderForceAgentsPackageRoot}from"./builderforce-root-D3-p8W2n.js";import{n as runExec,t as runCommandWithTimeout}from"./exec-CGuYALEs.js";import{A as resolveWorkspaceFilePath,c as resolveAgentWorkspaceDir,i as resolveAgentDir,l as resolveDefaultAgentId,p as DEFAULT_AGENTS_FILENAME}from"./agent-scope-BcoQBOwz.js";import{a as readConfigFileSnapshot,c as writeConfigFile,p as BuilderForceAgentsSchema}from"./io-wLHeSE2L.js";import{t as migrateLegacyConfig}from"./config-DBrFbWRm.js";import{r as loadModelCatalog}from"./model-catalog-CVRB77_N.js";import{t as buildWorkspaceSkillStatus}from"./skills-status-DILzO06u.js";import{n as callGateway,t as buildGatewayConnectionDetails}from"./call-Gj5Bi_oV.js";import{l as resolveGatewayBindHost,n as isLoopbackHost}from"./net-BDBv0ZGP.js";import{Mn as buildAuthHealthSummary,Nn as formatRemainingShort,jn as DEFAULT_OAUTH_WARN_MS,w as loadBuilderForceAgentsPlugins}from"./subagent-registry-98yia-RN.js";import{A as canonicalizeMainSessionAlias,N as resolveMainSessionKey,X as cleanStaleLockFiles,a as loadSessionStore,c as saveSessionStore}from"./sessions-C5jAGWOS.js";import{c as listTelegramAccountIds,l as resolveTelegramAccount,n as listChannelPlugins}from"./plugins-DJGW_fnS.js";import{D as DEFAULT_SANDBOX_IMAGE,E as DEFAULT_SANDBOX_COMMON_IMAGE,T as DEFAULT_SANDBOX_BROWSER_IMAGE,f as resolveSandboxScope}from"./sandbox-bEma8jFA.js";import{i as resolveGatewayAuth}from"./auth-BNeS9xde.js";import{a as formatPortDiagnostics,n as inspectPortUsage}from"./ports-LqFTyTSK.js";import{c as resolveStorePath,n as resolveSessionFilePath,s as resolveSessionTranscriptsDirForAgent}from"./paths-BQ9W7Bs0.js";import{c as resolveGatewayLaunchAgentLabel,d as resolveGatewaySystemdServiceName,f as resolveGatewayWindowsTaskName,m as resolveNodeLaunchAgentLabel}from"./constants-OUTpFkXP.js";import{c as getDefaultMemoryDirs,l as getDefaultMemoryFilePaths}from"./sqlite-BEgCClMz.js";import{r as resolveMemorySearchConfig}from"./manager-BXMwSRz1.js";import{t as formatDurationCompact}from"./format-duration-BwzoPIex.js";import{f as printWizardHeader,m as randomToken,n as applyWizardMetadata,s as guardCancel}from"./onboard-helpers-Xl1gvLzt.js";import{n as isWSLEnv,t as isWSL}from"./wsl-BrsNH7_s.js";import{n as stylePromptMessage,r as stylePromptTitle,t as stylePromptHint}from"./prompt-style-CZOeG0sw.js";import{t as note$1}from"./note-BvXfFmlu.js";import{t as resolveChannelDefaultAccountId}from"./helpers-DDS6DSK4.js";import{t as applyPluginAutoEnable}from"./plugin-auto-enable-Cxqw7Sa6.js";import{t as isWithinDir}from"./path-safety-B5rQrmGv.js";import{t as collectChannelStatusIssues}from"./channels-status-issues-DLF6QGGM.js";import{a as gatewayInstallErrorHint,f as renderSystemNodeWarning,i as buildGatewayInstallPlan,m as resolveSystemNodeInfo,n as GATEWAY_DAEMON_RUNTIME_OPTIONS,t as DEFAULT_GATEWAY_DAEMON_RUNTIME}from"./daemon-runtime-Cw90ZSZ3.js";import{r as isSystemdUserServiceAvailable}from"./systemd-DpT8tcbh.js";import{a as launchAgentPlistExists,i as isLaunchAgentLoaded,o as repairLaunchAgentBootstrap,r as isLaunchAgentListed,s as resolveGatewayLogPaths,t as resolveGatewayService}from"./service-ugwM110q.js";import{a as isSystemdUnavailableDetail,c as auditGatewayServiceConfig,l as needsNodeRuntimeMigration,o as renderSystemdUnavailableHints,s as SERVICE_AUDIT_CODES,y as formatRuntimeStatus}from"./lifecycle-core-BKBNM5Qc.js";import{t as readLastGatewayErrorLine}from"./diagnostics-D4pveUt2.js";import{a as renderGatewayServiceCleanupHints,i as findExtraGatewayServices}from"./daemon-cli-BDt8u6j0.js";import{r as healthCommand}from"./health-Bd0YvHPq.js";import{n as resolveControlUiDistIndexHealth,r as resolveControlUiDistIndexPathForRoot}from"./control-ui-assets-BweA3rDY.js";import{n as isNumericTelegramUserId,r as normalizeTelegramAllowFromEntry,t as resolveDmAllowState}from"./dm-policy-shared-CxgBbL4N.js";import{n as runGatewayUpdate,t as resolveAgentSessionDirs}from"./session-dirs-DH7k5ehu.js";import{n as logConfigUpdated}from"./logging-CRzk-5ye.js";import{t as ensureSystemdUserLingerInteractive}from"./systemd-linger-CuzOv-tn.js";import{t as formatHealthCheckFailure}from"./health-format-CtcXvo40.js";import{n as doctorShellCompletion}from"./doctor-completion-B7JXY8EJ.js";import{execFile}from"node:child_process";import os from"node:os";import path from"node:path";import fs from"node:fs";import{promisify}from"node:util";import JSON5 from"json5";import fs$1 from"node:fs/promises";import{confirm,intro,outro,select}from"@clack/prompts";async function maybeRepairAnthropicOAuthProfileId(cfg,prompter){let repair=repairOAuthProfileIdMismatch({cfg,store:await ensureAuthProfileStore(),provider:`anthropic`,legacyProfileId:`anthropic:default`});return!repair.migrated||repair.changes.length===0||(note$1(repair.changes.map(c=>`- ${c}`).join(`
|
|
2
2
|
`),`Auth profiles`),!await prompter.confirm({message:`Update Anthropic OAuth profile id in config now?`,initialValue:!0}))?cfg:repair.config}function pruneAuthOrder(order,profileIds){if(!order)return{next:order,changed:!1};let changed=!1,next={};for(let[provider,list]of Object.entries(order)){let filtered=list.filter(id=>!profileIds.has(id));filtered.length!==list.length&&(changed=!0),filtered.length>0&&(next[provider]=filtered)}return{next:Object.keys(next).length>0?next:void 0,changed}}function pruneAuthProfiles(cfg,profileIds){let profiles=cfg.auth?.profiles,order=cfg.auth?.order,nextProfiles=profiles?{...profiles}:void 0,changed=!1;if(nextProfiles)for(let id of profileIds)id in nextProfiles&&(delete nextProfiles[id],changed=!0);let prunedOrder=pruneAuthOrder(order,profileIds);if(prunedOrder.changed&&(changed=!0),!changed)return{next:cfg,changed:!1};let nextAuth=nextProfiles||prunedOrder.next?{...cfg.auth,profiles:nextProfiles&&Object.keys(nextProfiles).length>0?nextProfiles:void 0,order:prunedOrder.next}:void 0;return{next:{...cfg,auth:nextAuth},changed:!0}}async function maybeRemoveDeprecatedCliAuthProfiles(cfg,prompter){let store=await ensureAuthProfileStore(void 0,{allowKeychainPrompt:!1}),deprecated=new Set;if((store.profiles[CLAUDE_CLI_PROFILE_ID]||cfg.auth?.profiles?.[CLAUDE_CLI_PROFILE_ID])&&deprecated.add(CLAUDE_CLI_PROFILE_ID),(store.profiles[CODEX_CLI_PROFILE_ID]||cfg.auth?.profiles?.[CODEX_CLI_PROFILE_ID])&&deprecated.add(CODEX_CLI_PROFILE_ID),deprecated.size===0)return cfg;let lines=[`Deprecated external CLI auth profiles detected (no longer supported):`];if(deprecated.has(CLAUDE_CLI_PROFILE_ID)&&lines.push(`- ${CLAUDE_CLI_PROFILE_ID} (Anthropic): use setup-token → ${formatCliCommand(`builderforce models auth setup-token`)}`),deprecated.has(CODEX_CLI_PROFILE_ID)&&lines.push(`- ${CODEX_CLI_PROFILE_ID} (OpenAI Codex): use OAuth → ${formatCliCommand(`builderforce models auth login --provider openai-codex`)}`),note$1(lines.join(`
|
|
3
3
|
`),`Auth profiles`),!await prompter.confirmRepair({message:`Remove deprecated CLI auth profiles now?`,initialValue:!0}))return cfg;await updateAuthProfileStoreWithLock({updater:nextStore=>{let mutated=!1;for(let id of deprecated)nextStore.profiles[id]&&(delete nextStore.profiles[id],mutated=!0),nextStore.usageStats?.[id]&&(delete nextStore.usageStats[id],mutated=!0);if(nextStore.order)for(let[provider,list]of Object.entries(nextStore.order)){let filtered=list.filter(id=>!deprecated.has(id));filtered.length!==list.length&&(mutated=!0,filtered.length>0?nextStore.order[provider]=filtered:delete nextStore.order[provider])}if(nextStore.lastGood)for(let[provider,profileId]of Object.entries(nextStore.lastGood))deprecated.has(profileId)&&(delete nextStore.lastGood[provider],mutated=!0);return mutated}});let pruned=pruneAuthProfiles(cfg,deprecated);return pruned.changed&¬e$1(Array.from(deprecated.values()).map(id=>`- removed ${id} from config`).join(`
|
|
4
4
|
`),`Doctor changes`),pruned.next}function formatAuthIssueHint(issue){return issue.provider===`anthropic`&&issue.profileId===CLAUDE_CLI_PROFILE_ID?`Deprecated profile. Use ${formatCliCommand(`builderforce models auth setup-token`)} or ${formatCliCommand(`builderforce configure`)}.`:issue.provider===`openai-codex`&&issue.profileId===CODEX_CLI_PROFILE_ID?`Deprecated profile. Use ${formatCliCommand(`builderforce models auth login --provider openai-codex`)} or ${formatCliCommand(`builderforce configure`)}.`:`Re-auth via \`${formatCliCommand(`builderforce configure`)}\` or \`${formatCliCommand(`builderforce onboard`)}\`.`}function formatAuthIssueLine(issue){let remaining=issue.remainingMs===void 0?``:` (${formatRemainingShort(issue.remainingMs)})`,hint=formatAuthIssueHint(issue);return`- ${issue.profileId}: ${issue.status}${remaining}${hint?` — ${hint}`:``}`}async function noteAuthProfileHealth(params){let store=await ensureAuthProfileStore(void 0,{allowKeychainPrompt:params.allowKeychainPrompt}),unusable=(()=>{let now=Date.now(),out=[];for(let profileId of Object.keys(store.usageStats??{})){let until=resolveProfileUnusableUntilForDisplay(store,profileId);if(!until||now>=until)continue;let stats=store.usageStats?.[profileId],remaining=formatRemainingShort(until-now),kind=typeof stats?.disabledUntil==`number`&&now<stats.disabledUntil?`disabled${stats.disabledReason?`:${stats.disabledReason}`:``}`:`cooldown`,hint=kind.startsWith(`disabled:billing`)?`Top up credits (provider billing) or switch provider.`:`Wait for cooldown or switch provider.`;out.push(`- ${profileId}: ${kind} (${remaining})${hint?` — ${hint}`:``}`)}return out})();unusable.length>0&¬e$1(unusable.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as resolveIsNixMode,f as resolveLegacyStateDirs,g as resolveStateDir,m as resolveOAuthDir,p as resolveNewStateDir,t as CONFIG_PATH,u as resolveGatewayPort,y as resolveRequiredHomeDir}from"./paths-5FcIFMsj.js";import{C as shortenHomePath,G as getResolvedLoggerSettings,b as resolveUserPath,f as isRecord,v as resolveHomeDir$1,w as sleep}from"./utils-DbaBVFaK.js";import{Mt as loadBuilderForceAgentsPlugins,ai as DEFAULT_OAUTH_WARN_MS,oi as buildAuthHealthSummary,si as formatRemainingShort}from"./reply-
|
|
1
|
+
import{d as resolveIsNixMode,f as resolveLegacyStateDirs,g as resolveStateDir,m as resolveOAuthDir,p as resolveNewStateDir,t as CONFIG_PATH,u as resolveGatewayPort,y as resolveRequiredHomeDir}from"./paths-5FcIFMsj.js";import{C as shortenHomePath,G as getResolvedLoggerSettings,b as resolveUserPath,f as isRecord,v as resolveHomeDir$1,w as sleep}from"./utils-DbaBVFaK.js";import{Mt as loadBuilderForceAgentsPlugins,ai as DEFAULT_OAUTH_WARN_MS,oi as buildAuthHealthSummary,si as formatRemainingShort}from"./reply-BeKidf2F.js";import{a as buildAgentMainSessionKey,d as normalizeAgentId,i as DEFAULT_MAIN_KEY,n as DEFAULT_ACCOUNT_ID}from"./session-key-EoB0qaG9.js";import{t as resolveBuilderForceAgentsPackageRoot}from"./builderforce-root-D64_sXEi.js";import{i as defaultRuntime}from"./subsystem-B3TqcCrZ.js";import{n as runExec,t as runCommandWithTimeout}from"./exec-DdcIjeyn.js";import{A as resolveWorkspaceFilePath,c as resolveAgentWorkspaceDir,i as resolveAgentDir,l as resolveDefaultAgentId,p as DEFAULT_AGENTS_FILENAME}from"./agent-scope-DPtjOxzp.js";import{Bt as repairOAuthProfileIdMismatch,Nt as resolveProfileUnusableUntilForDisplay,Pt as resolveApiKeyForProfile,Yt as updateAuthProfileStoreWithLock,a as getModelRefStatus,an as CLAUDE_CLI_PROFILE_ID,cn as DEFAULT_MODEL,ct as resolveApiKeyForProvider,g as resolveHooksGmailModel,ln as DEFAULT_PROVIDER,m as resolveConfiguredModelRef,on as CODEX_CLI_PROFILE_ID,qt as ensureAuthProfileStore}from"./model-selection-DlYajIzF.js";import{t as formatCliCommand}from"./command-format-Dd7BgZsg.js";import{t as isTruthyEnvValue}from"./env-BHP32i7Q.js";import{a as readConfigFileSnapshot,c as writeConfigFile,p as BuilderForceAgentsSchema}from"./io-DhUMGsxN.js";import{t as migrateLegacyConfig}from"./config-lGOyM6Kq.js";import{r as loadModelCatalog}from"./model-catalog-BQUEoIev.js";import{D as DEFAULT_SANDBOX_IMAGE,E as DEFAULT_SANDBOX_COMMON_IMAGE,T as DEFAULT_SANDBOX_BROWSER_IMAGE,f as resolveSandboxScope}from"./sandbox-Cq6rH4hg.js";import{i as resolveGatewayAuth}from"./auth-C4PxZEj8.js";import{r as isLoopbackHost,u as resolveGatewayBindHost}from"./ws-s_ZQMnLb.js";import{a as inspectPortUsage,c as formatPortDiagnostics}from"./ports-B-SXoPqJ.js";import{B as resolveMainSessionKey,L as canonicalizeMainSessionAlias,a as loadSessionStore,c as saveSessionStore,rt as cleanStaleLockFiles}from"./sessions-Dv212g1O.js";import{c as listTelegramAccountIds,l as resolveTelegramAccount,n as listChannelPlugins}from"./plugins-C0lu7LGS.js";import{c as resolveStorePath,n as resolveSessionFilePath,s as resolveSessionTranscriptsDirForAgent}from"./paths-DCzWXtSj.js";import{c as getDefaultMemoryDirs,l as getDefaultMemoryFilePaths}from"./sqlite-BxinAVYp.js";import{c as resolveGatewayLaunchAgentLabel,d as resolveGatewaySystemdServiceName,f as resolveGatewayWindowsTaskName,m as resolveNodeLaunchAgentLabel}from"./constants-BUyfn6Rk.js";import{r as resolveMemorySearchConfig}from"./manager-pjodgk3H.js";import{n as callGateway,t as buildGatewayConnectionDetails}from"./call-DLeUWFtQ.js";import{t as formatDurationCompact}from"./format-duration-BwzoPIex.js";import{f as printWizardHeader,m as randomToken,n as applyWizardMetadata,s as guardCancel}from"./onboard-helpers-DHGeaHZA.js";import{n as isWSLEnv,t as isWSL}from"./wsl-CQrB96ai.js";import{n as stylePromptMessage,r as stylePromptTitle,t as stylePromptHint}from"./prompt-style-BwwmGo3-.js";import{t as buildWorkspaceSkillStatus}from"./skills-status-U_k3Ca5B.js";import{t as note$1}from"./note-CvzMolLy.js";import{t as resolveChannelDefaultAccountId}from"./helpers-_XD3UAOf.js";import{t as applyPluginAutoEnable}from"./plugin-auto-enable-CWK7KiRF.js";import{t as isWithinDir}from"./path-safety-Wg3iYXlh.js";import{t as collectChannelStatusIssues}from"./channels-status-issues-B-9_0W90.js";import{a as gatewayInstallErrorHint,f as renderSystemNodeWarning,i as buildGatewayInstallPlan,m as resolveSystemNodeInfo,n as GATEWAY_DAEMON_RUNTIME_OPTIONS,t as DEFAULT_GATEWAY_DAEMON_RUNTIME}from"./daemon-runtime-CWFj-hSG.js";import{r as isSystemdUserServiceAvailable}from"./systemd-CTHIdkg9.js";import{a as launchAgentPlistExists,i as isLaunchAgentLoaded,o as repairLaunchAgentBootstrap,r as isLaunchAgentListed,s as resolveGatewayLogPaths,t as resolveGatewayService}from"./service-BXrSjb3e.js";import{a as isSystemdUnavailableDetail,c as auditGatewayServiceConfig,l as needsNodeRuntimeMigration,o as renderSystemdUnavailableHints,s as SERVICE_AUDIT_CODES,y as formatRuntimeStatus}from"./lifecycle-core-BUp08YyP.js";import{t as readLastGatewayErrorLine}from"./diagnostics-Bsqm-Flj.js";import{a as renderGatewayServiceCleanupHints,i as findExtraGatewayServices}from"./daemon-cli-CjCweBX-.js";import{r as healthCommand}from"./health-CoTbsx1p.js";import{n as resolveControlUiDistIndexHealth,r as resolveControlUiDistIndexPathForRoot}from"./control-ui-assets-CAmSpVpE.js";import{n as isNumericTelegramUserId,r as normalizeTelegramAllowFromEntry,t as resolveDmAllowState}from"./dm-policy-shared-B5SWfgvG.js";import{n as runGatewayUpdate,t as resolveAgentSessionDirs}from"./session-dirs-DgwMogyJ.js";import{n as logConfigUpdated}from"./logging-9jbJihk2.js";import{t as ensureSystemdUserLingerInteractive}from"./systemd-linger-RhNkOjuf.js";import{t as formatHealthCheckFailure}from"./health-format-COHxl9I_.js";import{n as doctorShellCompletion}from"./doctor-completion-BEVC1EV7.js";import fs from"node:fs";import os from"node:os";import path from"node:path";import JSON5 from"json5";import fs$1 from"node:fs/promises";import{execFile}from"node:child_process";import{promisify}from"node:util";import{confirm,intro,outro,select}from"@clack/prompts";async function maybeRepairAnthropicOAuthProfileId(cfg,prompter){let repair=repairOAuthProfileIdMismatch({cfg,store:await ensureAuthProfileStore(),provider:`anthropic`,legacyProfileId:`anthropic:default`});return!repair.migrated||repair.changes.length===0||(note$1(repair.changes.map(c=>`- ${c}`).join(`
|
|
2
2
|
`),`Auth profiles`),!await prompter.confirm({message:`Update Anthropic OAuth profile id in config now?`,initialValue:!0}))?cfg:repair.config}function pruneAuthOrder(order,profileIds){if(!order)return{next:order,changed:!1};let changed=!1,next={};for(let[provider,list]of Object.entries(order)){let filtered=list.filter(id=>!profileIds.has(id));filtered.length!==list.length&&(changed=!0),filtered.length>0&&(next[provider]=filtered)}return{next:Object.keys(next).length>0?next:void 0,changed}}function pruneAuthProfiles(cfg,profileIds){let profiles=cfg.auth?.profiles,order=cfg.auth?.order,nextProfiles=profiles?{...profiles}:void 0,changed=!1;if(nextProfiles)for(let id of profileIds)id in nextProfiles&&(delete nextProfiles[id],changed=!0);let prunedOrder=pruneAuthOrder(order,profileIds);if(prunedOrder.changed&&(changed=!0),!changed)return{next:cfg,changed:!1};let nextAuth=nextProfiles||prunedOrder.next?{...cfg.auth,profiles:nextProfiles&&Object.keys(nextProfiles).length>0?nextProfiles:void 0,order:prunedOrder.next}:void 0;return{next:{...cfg,auth:nextAuth},changed:!0}}async function maybeRemoveDeprecatedCliAuthProfiles(cfg,prompter){let store=await ensureAuthProfileStore(void 0,{allowKeychainPrompt:!1}),deprecated=new Set;if((store.profiles[CLAUDE_CLI_PROFILE_ID]||cfg.auth?.profiles?.[CLAUDE_CLI_PROFILE_ID])&&deprecated.add(CLAUDE_CLI_PROFILE_ID),(store.profiles[CODEX_CLI_PROFILE_ID]||cfg.auth?.profiles?.[CODEX_CLI_PROFILE_ID])&&deprecated.add(CODEX_CLI_PROFILE_ID),deprecated.size===0)return cfg;let lines=[`Deprecated external CLI auth profiles detected (no longer supported):`];if(deprecated.has(CLAUDE_CLI_PROFILE_ID)&&lines.push(`- ${CLAUDE_CLI_PROFILE_ID} (Anthropic): use setup-token → ${formatCliCommand(`builderforce models auth setup-token`)}`),deprecated.has(CODEX_CLI_PROFILE_ID)&&lines.push(`- ${CODEX_CLI_PROFILE_ID} (OpenAI Codex): use OAuth → ${formatCliCommand(`builderforce models auth login --provider openai-codex`)}`),note$1(lines.join(`
|
|
3
3
|
`),`Auth profiles`),!await prompter.confirmRepair({message:`Remove deprecated CLI auth profiles now?`,initialValue:!0}))return cfg;await updateAuthProfileStoreWithLock({updater:nextStore=>{let mutated=!1;for(let id of deprecated)nextStore.profiles[id]&&(delete nextStore.profiles[id],mutated=!0),nextStore.usageStats?.[id]&&(delete nextStore.usageStats[id],mutated=!0);if(nextStore.order)for(let[provider,list]of Object.entries(nextStore.order)){let filtered=list.filter(id=>!deprecated.has(id));filtered.length!==list.length&&(mutated=!0,filtered.length>0?nextStore.order[provider]=filtered:delete nextStore.order[provider])}if(nextStore.lastGood)for(let[provider,profileId]of Object.entries(nextStore.lastGood))deprecated.has(profileId)&&(delete nextStore.lastGood[provider],mutated=!0);return mutated}});let pruned=pruneAuthProfiles(cfg,deprecated);return pruned.changed&¬e$1(Array.from(deprecated.values()).map(id=>`- removed ${id} from config`).join(`
|
|
4
4
|
`),`Doctor changes`),pruned.next}function formatAuthIssueHint(issue){return issue.provider===`anthropic`&&issue.profileId===CLAUDE_CLI_PROFILE_ID?`Deprecated profile. Use ${formatCliCommand(`builderforce models auth setup-token`)} or ${formatCliCommand(`builderforce configure`)}.`:issue.provider===`openai-codex`&&issue.profileId===CODEX_CLI_PROFILE_ID?`Deprecated profile. Use ${formatCliCommand(`builderforce models auth login --provider openai-codex`)} or ${formatCliCommand(`builderforce configure`)}.`:`Re-auth via \`${formatCliCommand(`builderforce configure`)}\` or \`${formatCliCommand(`builderforce onboard`)}\`.`}function formatAuthIssueLine(issue){let remaining=issue.remainingMs===void 0?``:` (${formatRemainingShort(issue.remainingMs)})`,hint=formatAuthIssueHint(issue);return`- ${issue.profileId}: ${issue.status}${remaining}${hint?` — ${hint}`:``}`}async function noteAuthProfileHealth(params){let store=await ensureAuthProfileStore(void 0,{allowKeychainPrompt:params.allowKeychainPrompt}),unusable=(()=>{let now=Date.now(),out=[];for(let profileId of Object.keys(store.usageStats??{})){let until=resolveProfileUnusableUntilForDisplay(store,profileId);if(!until||now>=until)continue;let stats=store.usageStats?.[profileId],remaining=formatRemainingShort(until-now),kind=typeof stats?.disabledUntil==`number`&&now<stats.disabledUntil?`disabled${stats.disabledReason?`:${stats.disabledReason}`:``}`:`cooldown`,hint=kind.startsWith(`disabled:billing`)?`Top up credits (provider billing) or switch provider.`:`Wait for cooldown or switch provider.`;out.push(`- ${profileId}: ${kind} (${remaining})${hint?` — ${hint}`:``}`)}return out})();unusable.length>0&¬e$1(unusable.join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Mt as loadBuilderForceAgentsPlugins,jt as createPluginLoaderLogger}from"./reply-
|
|
1
|
+
import{Mt as loadBuilderForceAgentsPlugins,jt as createPluginLoaderLogger}from"./reply-BeKidf2F.js";import{t as createSubsystemLogger}from"./subsystem-B3TqcCrZ.js";import{Gt as upsertAuthProfile,qt as ensureAuthProfileStore,u as normalizeProviderId}from"./model-selection-DlYajIzF.js";import{n as isWSLEnv}from"./wsl-CQrB96ai.js";import{r as stylePromptTitle}from"./prompt-style-BwwmGo3-.js";import{f as updateConfig}from"./shared-BMSboHpU.js";import{d as applyAuthProfileConfig}from"./auth-token-CeCyq7Zg.js";import{n as logConfigUpdated}from"./logging-9jbJihk2.js";import{intro,note,outro,spinner}from"@clack/prompts";const CLIENT_ID=`Iv1.b507a08c87ecfe98`;function parseJsonResponse(value){if(!value||typeof value!=`object`)throw Error(`Unexpected response from GitHub`);return value}async function requestDeviceCode(params){let body=new URLSearchParams({client_id:CLIENT_ID,scope:params.scope}),res=await fetch(`https://github.com/login/device/code`,{method:`POST`,headers:{Accept:`application/json`,"Content-Type":`application/x-www-form-urlencoded`},body});if(!res.ok)throw Error(`GitHub device code failed: HTTP ${res.status}`);let json=parseJsonResponse(await res.json());if(!json.device_code||!json.user_code||!json.verification_uri)throw Error(`GitHub device code response missing fields`);return json}async function pollForAccessToken(params){let bodyBase=new URLSearchParams({client_id:CLIENT_ID,device_code:params.deviceCode,grant_type:`urn:ietf:params:oauth:grant-type:device_code`});for(;Date.now()<params.expiresAt;){let res=await fetch(`https://github.com/login/oauth/access_token`,{method:`POST`,headers:{Accept:`application/json`,"Content-Type":`application/x-www-form-urlencoded`},body:bodyBase});if(!res.ok)throw Error(`GitHub device token failed: HTTP ${res.status}`);let json=parseJsonResponse(await res.json());if(`access_token`in json&&typeof json.access_token==`string`)return json.access_token;let err=`error`in json?json.error:`unknown`;if(err===`authorization_pending`){await new Promise(r=>setTimeout(r,params.intervalMs));continue}if(err===`slow_down`){await new Promise(r=>setTimeout(r,params.intervalMs+2e3));continue}throw err===`expired_token`?Error(`GitHub device code expired; run login again`):err===`access_denied`?Error(`GitHub login cancelled`):Error(`GitHub device flow error: ${err}`)}throw Error(`GitHub device code expired; run login again`)}async function githubCopilotLoginCommand(opts,runtime){if(!process.stdin.isTTY)throw Error(`github-copilot login requires an interactive TTY.`);intro(stylePromptTitle(`GitHub Copilot login`));let profileId=opts.profileId?.trim()||`github-copilot:github`;(await ensureAuthProfileStore(void 0,{allowKeychainPrompt:!1})).profiles[profileId]&&!opts.yes&¬e(`Auth profile already exists: ${profileId}\nRe-running will overwrite it.`,stylePromptTitle(`Existing credentials`));let spin=spinner();spin.start(`Requesting device code from GitHub...`);let device=await requestDeviceCode({scope:`read:user`});spin.stop(`Device code ready`),note([`Visit: ${device.verification_uri}`,`Code: ${device.user_code}`].join(`
|
|
2
2
|
`),stylePromptTitle(`Authorize`));let expiresAt=Date.now()+device.expires_in*1e3,intervalMs=Math.max(1e3,device.interval*1e3),polling=spinner();polling.start(`Waiting for GitHub authorization...`);let accessToken=await pollForAccessToken({deviceCode:device.device_code,intervalMs,expiresAt});polling.stop(`GitHub access token acquired`),await upsertAuthProfile({profileId,credential:{type:`token`,provider:`github-copilot`,token:accessToken}}),await updateConfig(cfg=>applyAuthProfileConfig(cfg,{provider:`github-copilot`,profileId,mode:`token`})),logConfigUpdated(runtime),runtime.log(`Auth profile: ${profileId} (github-copilot/token)`),outro(`Done`)}const log=createSubsystemLogger(`plugins`);function resolvePluginProviders(params){return loadBuilderForceAgentsPlugins({config:params.config,workspaceDir:params.workspaceDir,logger:createPluginLoaderLogger(log)}).providers.map(entry=>entry.provider)}function isRemoteEnvironment(){return!!(process.env.SSH_CLIENT||process.env.SSH_TTY||process.env.SSH_CONNECTION||process.env.REMOTE_CONTAINERS||process.env.CODESPACES||process.platform===`linux`&&!process.env.DISPLAY&&!process.env.WAYLAND_DISPLAY&&!isWSLEnv())}const validateRequiredInput=value=>value.trim().length>0?void 0:`Required`;function createVpsAwareOAuthHandlers(params){let manualPromptMessage=params.manualPromptMessage??`Paste the redirect URL`,manualCodePromise;return{onAuth:async({url})=>{if(params.isRemote){params.spin.stop(`OAuth URL ready`),params.runtime.log(`\nOpen this URL in your LOCAL browser:\n\n${url}\n`),manualCodePromise=params.prompter.text({message:manualPromptMessage,validate:validateRequiredInput}).then(value=>String(value));return}params.spin.update(params.localBrowserMessage),await params.openUrl(url),params.runtime.log(`Open: ${url}`)},onPrompt:async prompt=>{if(manualCodePromise)return manualCodePromise;let code=await params.prompter.text({message:prompt.message,placeholder:prompt.placeholder,validate:validateRequiredInput});return String(code)}}}function resolveProviderMatch(providers,rawProvider){let raw=rawProvider?.trim();if(!raw)return null;let normalized=normalizeProviderId(raw);return providers.find(provider=>normalizeProviderId(provider.id)===normalized)??providers.find(provider=>provider.aliases?.some(alias=>normalizeProviderId(alias)===normalized)??!1)??null}function pickAuthMethod(provider,rawMethod){let raw=rawMethod?.trim();if(!raw)return null;let normalized=raw.toLowerCase();return provider.auth.find(method=>method.id.toLowerCase()===normalized)??provider.auth.find(method=>method.label.toLowerCase()===normalized)??null}function isPlainRecord(value){return!!(value&&typeof value==`object`&&!Array.isArray(value))}function mergeConfigPatch(base,patch){if(!isPlainRecord(base)||!isPlainRecord(patch))return patch;let next={...base};for(let[key,value]of Object.entries(patch)){let existing=next[key];isPlainRecord(existing)&&isPlainRecord(value)?next[key]=mergeConfigPatch(existing,value):next[key]=value}return next}function applyDefaultModel(cfg,model){let models={...cfg.agents?.defaults?.models};models[model]=models[model]??{};let existingModel=cfg.agents?.defaults?.model;return{...cfg,agents:{...cfg.agents,defaults:{...cfg.agents?.defaults,models,model:{...existingModel&&typeof existingModel==`object`&&`fallbacks`in existingModel?{fallbacks:existingModel.fallbacks}:void 0,primary:model}}}}}export{createVpsAwareOAuthHandlers as a,githubCopilotLoginCommand as c,resolveProviderMatch as i,mergeConfigPatch as n,isRemoteEnvironment as o,pickAuthMethod as r,resolvePluginProviders as s,applyDefaultModel as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as createSubsystemLogger}from"./subsystem-C4b1Von0.js";import{R as normalizeProviderId,b as ensureAuthProfileStore,v as upsertAuthProfile}from"./auth-profiles-BcStSGQ1.js";import{C as createPluginLoaderLogger,w as loadBuilderForceAgentsPlugins}from"./subagent-registry-
|
|
1
|
+
import{t as createSubsystemLogger}from"./subsystem-C4b1Von0.js";import{R as normalizeProviderId,b as ensureAuthProfileStore,v as upsertAuthProfile}from"./auth-profiles-BcStSGQ1.js";import{C as createPluginLoaderLogger,w as loadBuilderForceAgentsPlugins}from"./subagent-registry-98yia-RN.js";import{n as isWSLEnv}from"./wsl-BrsNH7_s.js";import{r as stylePromptTitle}from"./prompt-style-CZOeG0sw.js";import{f as updateConfig}from"./shared-WIJmFKqL.js";import{d as applyAuthProfileConfig}from"./auth-token-DGYih1b5.js";import{n as logConfigUpdated}from"./logging-CRzk-5ye.js";import{intro,note,outro,spinner}from"@clack/prompts";const CLIENT_ID=`Iv1.b507a08c87ecfe98`;function parseJsonResponse(value){if(!value||typeof value!=`object`)throw Error(`Unexpected response from GitHub`);return value}async function requestDeviceCode(params){let body=new URLSearchParams({client_id:CLIENT_ID,scope:params.scope}),res=await fetch(`https://github.com/login/device/code`,{method:`POST`,headers:{Accept:`application/json`,"Content-Type":`application/x-www-form-urlencoded`},body});if(!res.ok)throw Error(`GitHub device code failed: HTTP ${res.status}`);let json=parseJsonResponse(await res.json());if(!json.device_code||!json.user_code||!json.verification_uri)throw Error(`GitHub device code response missing fields`);return json}async function pollForAccessToken(params){let bodyBase=new URLSearchParams({client_id:CLIENT_ID,device_code:params.deviceCode,grant_type:`urn:ietf:params:oauth:grant-type:device_code`});for(;Date.now()<params.expiresAt;){let res=await fetch(`https://github.com/login/oauth/access_token`,{method:`POST`,headers:{Accept:`application/json`,"Content-Type":`application/x-www-form-urlencoded`},body:bodyBase});if(!res.ok)throw Error(`GitHub device token failed: HTTP ${res.status}`);let json=parseJsonResponse(await res.json());if(`access_token`in json&&typeof json.access_token==`string`)return json.access_token;let err=`error`in json?json.error:`unknown`;if(err===`authorization_pending`){await new Promise(r=>setTimeout(r,params.intervalMs));continue}if(err===`slow_down`){await new Promise(r=>setTimeout(r,params.intervalMs+2e3));continue}throw err===`expired_token`?Error(`GitHub device code expired; run login again`):err===`access_denied`?Error(`GitHub login cancelled`):Error(`GitHub device flow error: ${err}`)}throw Error(`GitHub device code expired; run login again`)}async function githubCopilotLoginCommand(opts,runtime){if(!process.stdin.isTTY)throw Error(`github-copilot login requires an interactive TTY.`);intro(stylePromptTitle(`GitHub Copilot login`));let profileId=opts.profileId?.trim()||`github-copilot:github`;(await ensureAuthProfileStore(void 0,{allowKeychainPrompt:!1})).profiles[profileId]&&!opts.yes&¬e(`Auth profile already exists: ${profileId}\nRe-running will overwrite it.`,stylePromptTitle(`Existing credentials`));let spin=spinner();spin.start(`Requesting device code from GitHub...`);let device=await requestDeviceCode({scope:`read:user`});spin.stop(`Device code ready`),note([`Visit: ${device.verification_uri}`,`Code: ${device.user_code}`].join(`
|
|
2
2
|
`),stylePromptTitle(`Authorize`));let expiresAt=Date.now()+device.expires_in*1e3,intervalMs=Math.max(1e3,device.interval*1e3),polling=spinner();polling.start(`Waiting for GitHub authorization...`);let accessToken=await pollForAccessToken({deviceCode:device.device_code,intervalMs,expiresAt});polling.stop(`GitHub access token acquired`),await upsertAuthProfile({profileId,credential:{type:`token`,provider:`github-copilot`,token:accessToken}}),await updateConfig(cfg=>applyAuthProfileConfig(cfg,{provider:`github-copilot`,profileId,mode:`token`})),logConfigUpdated(runtime),runtime.log(`Auth profile: ${profileId} (github-copilot/token)`),outro(`Done`)}const log=createSubsystemLogger(`plugins`);function resolvePluginProviders(params){return loadBuilderForceAgentsPlugins({config:params.config,workspaceDir:params.workspaceDir,logger:createPluginLoaderLogger(log)}).providers.map(entry=>entry.provider)}function isRemoteEnvironment(){return!!(process.env.SSH_CLIENT||process.env.SSH_TTY||process.env.SSH_CONNECTION||process.env.REMOTE_CONTAINERS||process.env.CODESPACES||process.platform===`linux`&&!process.env.DISPLAY&&!process.env.WAYLAND_DISPLAY&&!isWSLEnv())}const validateRequiredInput=value=>value.trim().length>0?void 0:`Required`;function createVpsAwareOAuthHandlers(params){let manualPromptMessage=params.manualPromptMessage??`Paste the redirect URL`,manualCodePromise;return{onAuth:async({url})=>{if(params.isRemote){params.spin.stop(`OAuth URL ready`),params.runtime.log(`\nOpen this URL in your LOCAL browser:\n\n${url}\n`),manualCodePromise=params.prompter.text({message:manualPromptMessage,validate:validateRequiredInput}).then(value=>String(value));return}params.spin.update(params.localBrowserMessage),await params.openUrl(url),params.runtime.log(`Open: ${url}`)},onPrompt:async prompt=>{if(manualCodePromise)return manualCodePromise;let code=await params.prompter.text({message:prompt.message,placeholder:prompt.placeholder,validate:validateRequiredInput});return String(code)}}}function resolveProviderMatch(providers,rawProvider){let raw=rawProvider?.trim();if(!raw)return null;let normalized=normalizeProviderId(raw);return providers.find(provider=>normalizeProviderId(provider.id)===normalized)??providers.find(provider=>provider.aliases?.some(alias=>normalizeProviderId(alias)===normalized)??!1)??null}function pickAuthMethod(provider,rawMethod){let raw=rawMethod?.trim();if(!raw)return null;let normalized=raw.toLowerCase();return provider.auth.find(method=>method.id.toLowerCase()===normalized)??provider.auth.find(method=>method.label.toLowerCase()===normalized)??null}function isPlainRecord(value){return!!(value&&typeof value==`object`&&!Array.isArray(value))}function mergeConfigPatch(base,patch){if(!isPlainRecord(base)||!isPlainRecord(patch))return patch;let next={...base};for(let[key,value]of Object.entries(patch)){let existing=next[key];isPlainRecord(existing)&&isPlainRecord(value)?next[key]=mergeConfigPatch(existing,value):next[key]=value}return next}function applyDefaultModel(cfg,model){let models={...cfg.agents?.defaults?.models};models[model]=models[model]??{};let existingModel=cfg.agents?.defaults?.model;return{...cfg,agents:{...cfg.agents,defaults:{...cfg.agents?.defaults,models,model:{...existingModel&&typeof existingModel==`object`&&`fallbacks`in existingModel?{fallbacks:existingModel.fallbacks}:void 0,primary:model}}}}}export{createVpsAwareOAuthHandlers as a,githubCopilotLoginCommand as c,resolveProviderMatch as i,mergeConfigPatch as n,isRemoteEnvironment as o,pickAuthMethod as r,resolvePluginProviders as s,applyDefaultModel as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./paths-BHg-VHB4.js";import"./registry-Cv7CoWAs.js";import"./utils-BP60e80M.js";import"./subsystem-C4b1Von0.js";import"./boolean-ssGoaBPk.js";import"./env-BoE8QSib.js";import"./warning-filter-nSTjpMIH.js";import"./auth-profiles-BcStSGQ1.js";import"./logger-AbH8mdkv.js";import"./session-key-D--2AEus.js";import"./builderforce-root-D3-p8W2n.js";import"./exec-CGuYALEs.js";import"./agent-scope-BcoQBOwz.js";import"./env-file-BIKVpYUN.js";import"./src-DMo2gLcR.js";import"./io-wLHeSE2L.js";import"./manifest-registry-DZdPjBqs.js";import"./config-DBrFbWRm.js";import"./model-discovery-CfknTieh.js";import"./model-catalog-CVRB77_N.js";import"./frontmatter-CoaI_oW6.js";import"./skills-CC5ozaMz.js";import"./plugin-skills-DUy_aY2T.js";import"./refresh-B38IMhwx.js";import"./client-BlsvYCEu.js";import"./call-Gj5Bi_oV.js";import"./message-channel-BjZV4RTT.js";import{L as dispatchReplyWithBufferedBlockDispatcher,R as dispatchReplyWithDispatcher}from"./subagent-registry-
|
|
1
|
+
import"./paths-BHg-VHB4.js";import"./registry-Cv7CoWAs.js";import"./utils-BP60e80M.js";import"./subsystem-C4b1Von0.js";import"./boolean-ssGoaBPk.js";import"./env-BoE8QSib.js";import"./warning-filter-nSTjpMIH.js";import"./auth-profiles-BcStSGQ1.js";import"./logger-AbH8mdkv.js";import"./session-key-D--2AEus.js";import"./builderforce-root-D3-p8W2n.js";import"./exec-CGuYALEs.js";import"./agent-scope-BcoQBOwz.js";import"./env-file-BIKVpYUN.js";import"./src-DMo2gLcR.js";import"./io-wLHeSE2L.js";import"./manifest-registry-DZdPjBqs.js";import"./config-DBrFbWRm.js";import"./model-discovery-CfknTieh.js";import"./model-catalog-CVRB77_N.js";import"./frontmatter-CoaI_oW6.js";import"./skills-CC5ozaMz.js";import"./plugin-skills-DUy_aY2T.js";import"./refresh-B38IMhwx.js";import"./client-BlsvYCEu.js";import"./call-Gj5Bi_oV.js";import"./message-channel-BjZV4RTT.js";import{L as dispatchReplyWithBufferedBlockDispatcher,R as dispatchReplyWithDispatcher}from"./subagent-registry-98yia-RN.js";import"./sessions-C5jAGWOS.js";import"./project-context-store-BFOv5caq.js";import"./tokens-BNwTTeJb.js";import"./plugins-DJGW_fnS.js";import"./accounts-Z5bJpNrG.js";import"./bindings-D0uket3l.js";import"./send-CgMJqDBP.js";import"./send-DfpZ9T_M.js";import"./with-timeout-ftXvzlo8.js";import"./deliver-DDFTiLT4.js";import"./accounts-DoJYLMfS.js";import"./send-5Vokn3Uv.js";import"./image-ops-Bg9yFwjX.js";import"./redact-bWj_-q3j.js";import"./errors-t5wHPcwh.js";import"./embedded-helpers-CsRjxr3I.js";import"./sandbox-bEma8jFA.js";import"./chrome-Kt4wxGF2.js";import"./tailscale-CgCG7AVQ.js";import"./auth-BNeS9xde.js";import"./server-context-0vSm_r2R.js";import"./routes-BLhXC8oU.js";import"./paths-GamzES41.js";import"./ssrf-BiSQzdcA.js";import"./store-C5LmVaEC.js";import"./ports-LqFTyTSK.js";import"./trash-zs6gNxed.js";import"./accounts-BT-NzzBc.js";import"./paths-BQ9W7Bs0.js";import"./tool-images-DV2HMmx4.js";import"./workspace-BnrYivUM.js";import"./reply-prefix-9hmbzubX.js";import"./sqlite-BEgCClMz.js";import"./memory-cli-BBsTN63-.js";import"./manager-BXMwSRz1.js";import"./gemini-auth-qrDeJkh5.js";import"./retry-Cc6xusE8.js";import"./common-BRdxH-uH.js";import"./runner-qhKGerma.js";import"./tool-display-BIswnHaq.js";import"./chunk-hYck1V5_.js";import"./markdown-tables-CpqWBduK.js";import"./fetch-guard-CoGEds8D.js";import"./fetch-CUsKv8oj.js";import"./ir-CTE1iR41.js";import"./render-1ABBE2Y6.js";import"./builderforcellm-syscheck-BTolQUtx.js";import"./session-utils-DDDkCdFF.js";import"./coding-tools.policy-CtBT-KXm.js";import"./pairing-store-sCqmKjk2.js";import"./fetch-CrbOFvsL.js";import"./exec-approvals-Cn0K-HtJ.js";import"./nodes-screen-OI7tHqlU.js";import"./session-cost-usage-BgZfN_WR.js";import"./provider-usage-nRVDmUHj.js";import"./send-COUZMiIL.js";import"./outbound-attachment-Bed_0M10.js";import"./delivery-queue-DQXq7KUU.js";import"./project-context-De5-TWPH.js";import"./control-service-DYVIKl0J.js";import"./stagger-CUH5rlmS.js";import"./channel-selection-CLFizn8u.js";import"./send-CWzV8Zdx.js";import"./resolve-route-D3X-bXU-.js";import"./channel-activity-By7lsk7N.js";import"./tables-XzBUkZcJ.js";import"./links-B6LU5cXN.js";import"./cli-utils-ByV85M53.js";import"./help-format-DIDk_7gh.js";import"./progress-BQMO_-7I.js";import"./replies-CiPwT32C.js";import"./onboard-helpers-Xl1gvLzt.js";import"./prompt-style-CZOeG0sw.js";import"./pairing-labels-DVbgCApx.js";import"./active-listener-BC31MA4v.js";import"./mamba-state-engine-CViPpwyy.js";import"./transformers-stream-nSL4Xu31.js";export{dispatchReplyWithBufferedBlockDispatcher,dispatchReplyWithDispatcher};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./paths-5FcIFMsj.js";import"./utils-DbaBVFaK.js";import"./embedded-helpers-DHfhLu2W.js";import{bn as dispatchReplyWithDispatcher,yn as dispatchReplyWithBufferedBlockDispatcher}from"./reply-
|
|
1
|
+
import"./paths-5FcIFMsj.js";import"./utils-DbaBVFaK.js";import"./embedded-helpers-DHfhLu2W.js";import{bn as dispatchReplyWithDispatcher,yn as dispatchReplyWithBufferedBlockDispatcher}from"./reply-BeKidf2F.js";import"./session-key-EoB0qaG9.js";import"./builderforce-root-D64_sXEi.js";import"./subsystem-B3TqcCrZ.js";import"./registry-TdK-aV05.js";import"./logger-Bch0bx9c.js";import"./exec-DdcIjeyn.js";import"./agent-scope-DPtjOxzp.js";import"./model-selection-DlYajIzF.js";import"./env-file-BI2jpOmF.js";import"./boolean-Cn4K2fc9.js";import"./env-BHP32i7Q.js";import"./src-CQLQD-1r.js";import"./io-DhUMGsxN.js";import"./manifest-registry-CBVaj2md.js";import"./config-lGOyM6Kq.js";import"./runner-CDpBWK3-.js";import"./model-catalog-BQUEoIev.js";import"./sandbox-Cq6rH4hg.js";import"./chrome-BW8dGyxs.js";import"./tailscale-0ey4P_at.js";import"./auth-C4PxZEj8.js";import"./server-context-1YSNvKDs.js";import"./frontmatter-DpzOtLJz.js";import"./skills-vjE49XV9.js";import"./plugin-skills-RFjYtysK.js";import"./routes-DsdK6VOy.js";import"./redact-BT5hARuQ.js";import"./errors-BK3rMW8O.js";import"./paths-CejDLFxE.js";import"./ssrf-DHJTyOuH.js";import"./image-ops-D7Ex-H05.js";import"./store-Nf9BxXC7.js";import"./ports-B-SXoPqJ.js";import"./trash-DlNzpifq.js";import"./sessions-Dv212g1O.js";import"./message-channel-BW_q2nVi.js";import"./plugins-C0lu7LGS.js";import"./accounts-2InvZDx2.js";import"./accounts-CrKsbGuP.js";import"./accounts-BnsrG5TA.js";import"./bindings-qYFdqpJ3.js";import"./send-DSwQqUiD.js";import"./send-BGZYkspG.js";import"./paths-DCzWXtSj.js";import"./tool-images-CR9Y0R5I.js";import"./tool-display-Dx-rz3CF.js";import"./fetch-guard-DxN_CtRp.js";import"./api-key-rotation-BbNoamfM.js";import"./fetch-CMEvVIy8.js";import"./sqlite-BxinAVYp.js";import"./tokens-Ct4DyfhX.js";import"./project-context-store-BPhHGfFl.js";import"./with-timeout-DTcvZn3s.js";import"./deliver-CrB451sO.js";import"./send-ZCmcplsV.js";import"./workspace-eFrsAV2Q.js";import"./reply-prefix-BwtP84WV.js";import"./memory-cli-Dgqoendm.js";import"./manager-pjodgk3H.js";import"./retry-Jis-ZZfm.js";import"./client-BxPDO8Ed.js";import"./call-DLeUWFtQ.js";import"./common-W8GhA4hE.js";import"./chunk-B9aj7NGY.js";import"./markdown-tables-iDNbGky8.js";import"./ir-EgWVNCXR.js";import"./render-CSLaFZoy.js";import"./builderforcellm-syscheck-BpNlQ4Rx.js";import"./send-iQicMwPr.js";import"./outbound-attachment-BR2FQu7J.js";import"./fetch-B6_hd7w9.js";import"./delivery-queue-BZWZDdpJ.js";import"./channel-activity-GeHNfvd4.js";import"./tables-D5WcKZWq.js";import"./pairing-store-PKyjZas4.js";import"./links-CYRGsVCu.js";import"./cli-utils-BLNnV_WG.js";import"./help-format-NhTn4dWd.js";import"./progress-OKwbfa23.js";import"./resolve-route-EE2-ObOq.js";import"./replies-BhjI7rPj.js";import"./refresh-Cyy0oi_E.js";import"./coding-tools.policy-DQxeoYmD.js";import"./send-C9xXqEqr.js";import"./onboard-helpers-DHGeaHZA.js";import"./prompt-style-BwwmGo3-.js";import"./pairing-labels-BpeDWVFP.js";import"./session-cost-usage-BDkGtjt9.js";import"./provider-usage-BqXFLAwn.js";import"./active-listener-DBdxNyOd.js";import"./exec-approvals-kmxxyvIe.js";import"./nodes-screen-BWDONgPE.js";import"./project-context-Dp8w9r_P.js";import"./control-service-Bkbx5ybP.js";import"./stagger-NaB6u1z1.js";import"./channel-selection-BjcuqdFb.js";import"./mamba-state-engine-DPAATSLG.js";import"./transformers-stream-QS2dnQob.js";export{dispatchReplyWithBufferedBlockDispatcher,dispatchReplyWithDispatcher};
|