@fased/fased 0.1.18 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agents-B6Phr7_f.js → agents-ChQhgSlb.js} +11 -11
- package/dist/{attachment-normalize-CzEnjLNz.js → attachment-normalize-Cr8RzfVf.js} +1 -1
- package/dist/{attachment-normalize-Cw5usv34.js → attachment-normalize-DB19KLbl.js} +1 -1
- package/dist/{audio-preflight-Bb2vNNbg.js → audio-preflight-BLGP3XdB.js} +1 -1
- package/dist/{audio-preflight-CE7uXO4r.js → audio-preflight-BmW52Ycp.js} +1 -1
- package/dist/{audio-preflight-DdTXlJCN.js → audio-preflight-CHhcmiXJ.js} +3 -3
- package/dist/{audio-preflight-BneukbKN.js → audio-preflight-DAevycUR.js} +2 -2
- package/dist/{audio-preflight-DLDBtl4e.js → audio-preflight-DVwcDm03.js} +3 -3
- package/dist/{audit-xX6RNayR.js → audit-C5YXYuIL.js} +1 -1
- package/dist/{audit-B2R6WwpA.js → audit-DPnCY1UL.js} +1 -1
- package/dist/{auth-DtTjcdsn.js → auth-BbQxXxtt.js} +5 -5
- package/dist/{auth-choice-DEux81xn.js → auth-choice-D8Q1fQwa.js} +2 -2
- package/dist/{auth-choice-DSs5l1Mv.js → auth-choice-DRyuJ7OL.js} +2 -2
- package/dist/{auth-choice-prompt-D8d4kRYT.js → auth-choice-prompt-Bs_OE3ai.js} +1 -1
- package/dist/{auth-choice-prompt-Dhl403zz.js → auth-choice-prompt-EOHB6Adp.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-web-DRJ_lg4d.js → channel-web-BYwefJub.js} +1 -1
- package/dist/{channel-web-B_R-iuZ6.js → channel-web-Do7PfpgZ.js} +1 -1
- package/dist/{channels-D9lINC_R.js → channels-Ca02RvCt.js} +9 -9
- package/dist/{channels-B-7M3uYr.js → channels-DrEj3b4G.js} +9 -9
- package/dist/{channels-cli-BNR8Ueih.js → channels-cli-CCa-scQg.js} +6 -6
- package/dist/{channels-cli-CZZGaHdW.js → channels-cli-b6IPejdy.js} +6 -6
- package/dist/{clack-prompter-D2fuSvy3.js → clack-prompter-DhFjwbXA.js} +110 -40
- package/dist/{clack-prompter-DsooqWFU.js → clack-prompter-Q_PN4iLX.js} +110 -40
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-DDzZu95y.js → cli-DXIWIIJj.js} +3 -3
- package/dist/{cli-PJTbyT76.js → cli-eje5udQT.js} +3 -3
- package/dist/{command-registry-DH2g-1VS.js → command-registry-Bs12xiCA.js} +9 -9
- package/dist/{completion-cli-cirX46xi.js → completion-cli-Btcmy2ZS.js} +2 -2
- package/dist/{completion-cli-Cszwcu14.js → completion-cli-RlpZaXwm.js} +1 -1
- package/dist/{config-cli-wGaTNazO.js → config-cli-CTo8yFw1.js} +1 -1
- package/dist/{config-cli-D-JctiSJ.js → config-cli-D-FqgnuJ.js} +1 -1
- package/dist/{config-guard-C74yuV1t.js → config-guard-D6r7usdP.js} +2 -2
- package/dist/{config-guard-ComvK070.js → config-guard-DnCSSIeP.js} +1 -1
- package/dist/{configure-BZPWTrYa.js → configure-CLTc56jo.js} +16 -16
- package/dist/{configure-B3qdEOin.js → configure-D0-Sq2kW.js} +16 -16
- package/dist/control-ui/assets/app-DXYMrRJ9.js.map +1 -1
- package/dist/{cron-cli-B_Y1xWzG.js → cron-cli-BstCBSyn.js} +2 -2
- package/dist/{cron-cli-DV_fO2Av.js → cron-cli-pA06wiEq.js} +2 -2
- package/dist/{daemon-cli-DwEfnmS3.js → daemon-cli-DiuXEPjO.js} +1 -1
- package/dist/{daemon-cli-D99T8qck.js → daemon-cli-cyqRsnTF.js} +1 -1
- package/dist/daemon-cli.js +1 -1
- package/dist/{deps-DXHMO1Yj.js → deps-BKAIBkcE.js} +1 -1
- package/dist/{deps-5vuaH16V.js → deps-BWo3ls9h.js} +1 -1
- package/dist/{doctor-config-flow-4WutpMTV.js → doctor-config-flow-B-I0osH5.js} +1 -1
- package/dist/{doctor-config-flow-Cd9O0xNE.js → doctor-config-flow-Ceaz-Gkk.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +2 -2
- package/dist/{gateway-cli-DxttS--5.js → gateway-cli-BbSS1Nxd.js} +28 -28
- package/dist/{gateway-cli-DnTW-Vqh.js → gateway-cli-izDCXWNN.js} +28 -28
- package/dist/{health-CK5_7SB-.js → health-DW5NMpNI.js} +2 -2
- package/dist/{health-DkKBhl0x.js → health-kF4U3o3b.js} +2 -2
- package/dist/{heartbeat-runner-C_SzC_tK.js → heartbeat-runner-BnDruNG2.js} +1 -1
- package/dist/{heartbeat-runner-B9_owa4e.js → heartbeat-runner-CJP5uO8S.js} +1 -1
- package/dist/{hooks-cli-CF1H42-g.js → hooks-cli-CSFuSiA5.js} +4 -4
- package/dist/{hooks-cli-DsUN2nCy.js → hooks-cli-U5qCBqJm.js} +4 -4
- package/dist/index.js +9 -9
- package/dist/{ipv4-oR6PCFkE.js → ipv4-B42xQEbV.js} +2 -2
- package/dist/{ipv4-hmcj6CY1.js → ipv4-DSDJ9Fn2.js} +2 -2
- package/dist/{lifecycle-DkQi8XHs.js → lifecycle-Bbry4K-O.js} +1 -1
- package/dist/{lifecycle-BtrqlzIp.js → lifecycle-BiNcSCVf.js} +1 -1
- package/dist/{list.auth-overview-DqpchDrO.js → list.auth-overview-ByYcn7Ct.js} +1 -1
- package/dist/{list.auth-overview-DtfRUx-B.js → list.auth-overview-Di-jSuQF.js} +1 -1
- package/dist/llm-slug-generator.js +1 -1
- package/dist/{model-catalog--SvucuO6.js → model-catalog-ex4Cpln_.js} +12 -8
- package/dist/{models-zXXNWbCe.js → models-BonzQ9Rv.js} +7 -7
- package/dist/{models-cli-8b2o7ZBO.js → models-cli-Cc0fVKLR.js} +7 -7
- package/dist/{models-cli-DwXIxRSn.js → models-cli-DZ05AYqI.js} +8 -8
- package/dist/{node-cli-D55JvlGv.js → node-cli-CKXvITsL.js} +3 -3
- package/dist/{node-cli-Dmiet_CN.js → node-cli-Dfl7X414.js} +3 -3
- package/dist/{note-DrwZGnSu.js → note-DwkETqd-.js} +2 -0
- package/dist/{note-CLUeye9D.js → note-rV2vspIo.js} +2 -0
- package/dist/{onboard-CqUH0CNb.js → onboard-BDK2o_5B.js} +8 -8
- package/dist/{onboard-BMckmyvg.js → onboard-CpJeEn67.js} +8 -8
- package/dist/{onboard-channels-CWZUEiko.js → onboard-channels-CDXretWe.js} +2 -2
- package/dist/{onboard-channels-Di1MifgF.js → onboard-channels-ZnUGKi2j.js} +2 -2
- package/dist/{onboard-search-CLhDai7x.js → onboard-search-BIltnW27.js} +6 -6
- package/dist/{onboard-search-WWi4blgc.js → onboard-search-HgNX3hct.js} +6 -6
- package/dist/{onboarding-DsCvgeVW.js → onboarding-Bgx1tJnU.js} +128 -65
- package/dist/{onboarding-D4OTdWQp.js → onboarding-CBlXOasA.js} +128 -65
- package/dist/{openresponses-http-CFQL8cSe.js → openresponses-http-5S3xc2MZ.js} +1 -1
- package/dist/{openresponses-http-qcMe4CnQ.js → openresponses-http-BBNbIRzc.js} +2 -2
- package/dist/{openresponses-http-DVyWivMq.js → openresponses-http-BTpFUwym.js} +1 -1
- package/dist/{openresponses-http-D6Ttjnvd.js → openresponses-http-COAxhJal.js} +3 -3
- package/dist/{openresponses-http-BdrytBTu.js → openresponses-http-o273A5SH.js} +3 -3
- package/dist/{parent-default-help-ClCr80XR.js → parent-default-help-BwE33-U1.js} +1 -1
- package/dist/{parent-default-help-D_UWzDsy.js → parent-default-help-DzWAx_GB.js} +1 -1
- package/dist/{paths-DuymR5Rg.js → paths-Bzz-O3FX.js} +9 -9
- package/dist/{pi-embedded-IQzv6URS.js → pi-embedded-Bnuo5tPq.js} +5 -5
- package/dist/{pi-embedded-BS0sTNPV.js → pi-embedded-CeuBUTjd.js} +14 -14
- package/dist/{plugin-registry-DfiokqgQ.js → plugin-registry-D2IeEq2N.js} +1 -1
- package/dist/{plugin-registry-C6ytAnfA.js → plugin-registry-DjTXh-9g.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-Cyb1e94b.js → audio-preflight-CVWduuEO.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-CWTDcoUz.js → audio-preflight-CdPkTmJX.js} +1 -1
- package/dist/plugin-sdk/channel-plugin-common.js +1 -1
- package/dist/plugin-sdk/{channel-web-CcGhVHhJ.js → channel-web-oM8gCehY.js} +1 -1
- package/dist/plugin-sdk/command-status.js +1 -1
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/{openresponses-http-BsP7r5IA.js → openresponses-http-C_9IfZXZ.js} +1 -1
- package/dist/plugin-sdk/{openresponses-http-C7iy26fS.js → openresponses-http-_SiZJaK2.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-FgSYY3zE.js → pi-model-discovery-runtime-BWcaNxzp.js} +1 -1
- package/dist/plugin-sdk/{registry-DyRgZdL8.js → registry-DXXOSq_V.js} +8 -8
- package/dist/plugin-sdk/{reply-K26zHCJ7.js → reply-e-9_IdAa.js} +5 -5
- package/dist/plugin-sdk/src/brand.d.ts +2 -2
- package/dist/plugin-sdk/{status-DUXaf75C.js → status-D_fsW8e3.js} +5 -5
- package/dist/plugin-sdk/{web-BnHwbjCb.js → web-BL2TuPTi.js} +1 -1
- package/dist/plugin-sdk/{web-BZ-KI_i-.js → web-CaVSiRWI.js} +2 -2
- package/dist/{plugins-cli-1wRgk_1k.js → plugins-cli-BMV70lmj.js} +6 -6
- package/dist/{plugins-cli-CHCNHfO2.js → plugins-cli-Bf0I1xYR.js} +6 -6
- package/dist/{program-BmRPzUoU.js → program-CZzXG3p4.js} +9 -9
- package/dist/{program-context-CRYL81pY.js → program-context-CaLlkx1k.js} +25 -25
- package/dist/{prompt-select-styled-BzqepcY0.js → prompt-select-styled-Cj_SHqRt.js} +8 -8
- package/dist/{prompt-select-styled-Ixt2Vxqr.js → prompt-select-styled-DVwrrZSb.js} +8 -8
- package/dist/{prompt-style-Wxki8rmI.js → prompt-style-CWAacuMq.js} +1 -2
- package/dist/{prompt-style-DxKPs6E0.js → prompt-style-Rmj3c-Ir.js} +1 -2
- package/dist/{providers-cli-DBG7T-38.js → providers-cli-BWZUM8kN.js} +3 -3
- package/dist/{providers-cli-DsUpaNkE.js → providers-cli-Dwb_MRo-.js} +3 -3
- package/dist/{pw-ai-BWWVm40d.js → pw-ai-D6eWnTeA.js} +1 -1
- package/dist/{register.agent-pKJfY4ij.js → register.agent-C-bHdMXU.js} +12 -12
- package/dist/{register.agent-D5MjI275.js → register.agent-D0ZpgSNd.js} +11 -11
- package/dist/{register.configure-DUqD_hkp.js → register.configure-B0PTAyow.js} +16 -16
- package/dist/{register.configure-BtdBEnbT.js → register.configure-B51e7-qt.js} +16 -16
- package/dist/{register.maintenance-Bu9WP0d1.js → register.maintenance-B3cXfhM1.js} +12 -12
- package/dist/{register.maintenance-CN_vDSkN.js → register.maintenance-BrmIl5VW.js} +13 -13
- package/dist/{register.message-Jpj57foO.js → register.message-Dzs1vNKG.js} +4 -4
- package/dist/{register.message-Bmx5XWhU.js → register.message-EKaGgJ9I.js} +4 -4
- package/dist/{register.onboard-BBdUy5X-.js → register.onboard-BFPT0Hh1.js} +18 -18
- package/dist/{register.onboard-BaIUg7j4.js → register.onboard-DmFrOBs4.js} +18 -18
- package/dist/{register.setup-CGKrDEMc.js → register.setup-5M8f6DaB.js} +18 -18
- package/dist/{register.setup-CxPYg9dc.js → register.setup-B0beU4w3.js} +18 -18
- package/dist/{register.status-health-sessions-Dyyxnfsc.js → register.status-health-sessions-9GJwT82K.js} +7 -7
- package/dist/{register.status-health-sessions-C0Tc0YCk.js → register.status-health-sessions-CEIpWahs.js} +7 -7
- package/dist/{register.subclis-D76pTHAo.js → register.subclis-C3yGp0vO.js} +17 -17
- package/dist/{reply-C-KlztgC.js → reply-B034LmuD.js} +12 -8
- package/dist/{run-main-REepjMTK.js → run-main-DYdI5qyZ.js} +18 -18
- package/dist/{runtime-helper-grants-vtmIYIZm.js → runtime-helper-grants-9-0EfflU.js} +1 -1
- package/dist/{runtime-helper-grants-BQPMglLl.js → runtime-helper-grants-BB9I81Ny.js} +1 -1
- package/dist/{sandbox-cli-Cj9M5dH_.js → sandbox-cli-Bl9Lyv-l.js} +3 -3
- package/dist/{sandbox-cli-DNh-ozSE.js → sandbox-cli-CAh9nzL6.js} +3 -3
- package/dist/{security-cli-B74QtPBv.js → security-cli-Bt7g6fbK.js} +4 -4
- package/dist/{security-cli--nwf-QKL.js → security-cli-lQy0YwCb.js} +4 -4
- package/dist/{server-CPLhmiQ1.js → server-BKrGeOGh.js} +3 -3
- package/dist/{server-CdnHL3HN.js → server-CES-5PaV.js} +3 -3
- package/dist/{server-cron-Bga__DzU.js → server-cron-D3WgivDk.js} +2 -2
- package/dist/{server-cron-9rZPNOCw.js → server-cron-q6O09WWT.js} +2 -2
- package/dist/{server-node-events-NE3EvW3K.js → server-node-events-DE5oWSSB.js} +4 -4
- package/dist/{server-node-events-CYM7X9Ka.js → server-node-events-Df_2uVcT.js} +4 -4
- package/dist/{status-DNSq7M4m.js → status-CdI_oSZ4.js} +1 -1
- package/dist/{status-Cbvyhx9d.js → status-CqIzNbBd.js} +1 -1
- package/dist/{status-DX0Q8QQg.js → status-DrXKyHMz.js} +4 -4
- package/dist/{status-DfxoXWmn.js → status-ne0p_x1W.js} +4 -4
- package/dist/{systemd-linger-9E60sw1j.js → systemd-linger-BTw_D-6k.js} +1 -1
- package/dist/{systemd-linger-BYFLOJbt.js → systemd-linger-BlmGMvvA.js} +1 -1
- package/dist/{tui-BTgZ8oh1.js → tui-CF9NTWgo.js} +1 -1
- package/dist/{tui-DCimzH-j.js → tui-CLXEsHbW.js} +1 -1
- package/dist/{tui-cli-DJ8WiWCz.js → tui-cli-Bo8T0iEO.js} +4 -4
- package/dist/{tui-cli-BzoEecpB.js → tui-cli-DIHJPDjw.js} +4 -4
- package/dist/{update-cli-vLZ2i1bC.js → update-cli-RA5GdCSl.js} +13 -13
- package/dist/{update-cli-DLE13jlu.js → update-cli-pAvK-b3V.js} +14 -14
- package/dist/{update-runner-DA8lIKi7.js → update-runner-CUbpiOBD.js} +1 -1
- package/dist/{update-runner-YRzVDxMy.js → update-runner-kVl9uX8I.js} +1 -1
- package/dist/{web-CdUefYwV.js → web-BSGV69pb.js} +4 -4
- package/dist/{web-D7U7yJI6.js → web-CFtLg8L6.js} +2 -2
- package/dist/{web-BqBwrpRI.js → web-CRHqblTb.js} +4 -4
- package/dist/{web-gqp_WLnj.js → web-D7NnzaWN.js} +1 -1
- package/dist/{web-DgtV30_7.js → web-R6Wrr8ru.js} +1 -1
- package/dist/{web-search-providers.runtime-Dr2M7_ZH.js → web-search-providers.runtime-BQw2Sxko.js} +1 -1
- package/dist/{web-search-providers.runtime-JauoxBKh.js → web-search-providers.runtime-E9CDTKMh.js} +1 -1
- package/docs/gateway/tailscale.md +44 -0
- package/docs/images/screenshots/local/chat-ui-1.png +0 -0
- package/docs/images/screenshots/local/final-ui-1.png +0 -0
- package/docs/images/screenshots/local/local-ui-1.png +0 -0
- package/docs/images/screenshots/local/local-ui-2.png +0 -0
- package/docs/images/screenshots/local/model-ui-1.png +0 -0
- package/docs/images/screenshots/local/wallet-ui-2.png +0 -0
- package/docs/install/index.md +26 -5
- package/docs/install/installer.md +11 -11
- package/docs/install/node.md +9 -0
- package/docs/install/vps.md +27 -7
- package/docs/security/baseline-checklist.md +7 -2
- package/docs/start/agent-wallet-mining-walkthrough.md +17 -1
- package/extensions/acpx/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/fased-federation/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +12 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +12 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +12 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/sat-mining/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +12 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +12 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +12 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +12 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/scripts/start-managed.sh +2 -2
- package/docs/images/screenshots/local/wallet-ui-1.png +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as resolveStateDir, u as resolveGatewayPort } from "./paths-C9FmTW1x.js";
|
|
2
2
|
import { S as resolveUserPath, U as theme } from "./agent-paths-DmOVZE7g.js";
|
|
3
3
|
import { Ga as ensureAuthProfileStore, Mn as writeConfigFile, Zr as collectConfigServiceEnvVars, d as resolveDefaultAgentId, dd as formatCliCommand, fr as ensureActiveMemoryPluginAllowlisted, kn as readConfigFileSnapshot, u as resolveAgentWorkspaceDir } from "./agent-scope-DHrLr5OF.js";
|
|
4
|
-
import { Bt as detectBrowserOpenSupport, Ht as formatControlUiSshHint, Jt as openUrl, Lt as DEFAULT_WORKSPACE, Mo as runFederationAutoConnectOnce, Qo as findTailscaleBinary, Qt as resolveControlUiLinks, Rt as applyWizardMetadata, Vt as ensureWorkspaceAndSessions, Wt as handleOnboardingRepair, Xo as enableTailscaleFunnel, Xt as probeGatewayReachable, Yt as printWizardHeader, Zo as enableTailscaleServe, Zt as randomToken, en as summarizeExistingConfig, nn as waitForGatewayReachable, qt as normalizeGatewayTokenInput, tn as validateGatewayPasswordInput, xo as normalizeControlUiBasePath, yo as CONTROL_UI_BOOT_CHECK_PATH } from "./reply-
|
|
4
|
+
import { Bt as detectBrowserOpenSupport, Ht as formatControlUiSshHint, Jt as openUrl, Lt as DEFAULT_WORKSPACE, Mo as runFederationAutoConnectOnce, Qo as findTailscaleBinary, Qt as resolveControlUiLinks, Rt as applyWizardMetadata, Vt as ensureWorkspaceAndSessions, Wt as handleOnboardingRepair, Xo as enableTailscaleFunnel, Xt as probeGatewayReachable, Yt as printWizardHeader, Zo as enableTailscaleServe, Zt as randomToken, en as summarizeExistingConfig, nn as waitForGatewayReachable, qt as normalizeGatewayTokenInput, tn as validateGatewayPasswordInput, xo as normalizeControlUiBasePath, yo as CONTROL_UI_BOOT_CHECK_PATH } from "./reply-B034LmuD.js";
|
|
5
5
|
import { d as defaultRuntime, f as restoreTerminalState, s as redactSensitiveText } from "./errors-Dx3S3Nrp.js";
|
|
6
6
|
import { a as resolveSignerdBinaryPath, n as installSignerdBinary, o as restartLocalSocketSigner, r as migrateLocalSignerKeystoreToMaterialDir, t as configureWalletForOnboarding } from "./onboarding.wallet-CQG8MiG_.js";
|
|
7
7
|
import { i as resolveLocalSignerRunAsUser, n as resolveLocalSignerBackendSocketPath, o as resolveLocalSignerSocketPath, r as resolveLocalSignerMaterialRootDir, t as ensureWalletStateDir } from "./wallet-runtime-config-BlRWvEER.js";
|
|
@@ -17,14 +17,14 @@ import { a as resolveHostedOnboardingGatewayStartupMode, i as resolveGatewayStar
|
|
|
17
17
|
import { d as buildSystemdUnit, r as isSystemdUserServiceAvailable } from "./systemd-CmxDYXvt.js";
|
|
18
18
|
import { t as resolveGatewayService } from "./service-Bsg622jp.js";
|
|
19
19
|
import { n as auditGatewayServiceConfig, t as SERVICE_AUDIT_CODES } from "./service-audit-BRLbvcxT.js";
|
|
20
|
-
import { a as promptRemoteGatewayConfig, n as getTailscaleMissingBinNoteLines, r as setupSkills, t as validateIPv4AddressInput, u as promptCustomApiConfig } from "./ipv4-
|
|
21
|
-
import { o as waitForHostedDashboardBrowserPath } from "./health-
|
|
22
|
-
import { n as warnIfModelConfigLooksOff, r as applyAuthChoice } from "./auth-choice-
|
|
23
|
-
import { t as promptAuthChoiceGrouped } from "./auth-choice-prompt-
|
|
20
|
+
import { a as promptRemoteGatewayConfig, n as getTailscaleMissingBinNoteLines, r as setupSkills, t as validateIPv4AddressInput, u as promptCustomApiConfig } from "./ipv4-B42xQEbV.js";
|
|
21
|
+
import { o as waitForHostedDashboardBrowserPath } from "./health-kF4U3o3b.js";
|
|
22
|
+
import { n as warnIfModelConfigLooksOff, r as applyAuthChoice } from "./auth-choice-DRyuJ7OL.js";
|
|
23
|
+
import { t as promptAuthChoiceGrouped } from "./auth-choice-prompt-EOHB6Adp.js";
|
|
24
24
|
import { n as logConfigUpdated } from "./logging-Dv2wthF_.js";
|
|
25
|
-
import { n as setupChannels } from "./onboard-channels-
|
|
25
|
+
import { n as setupChannels } from "./onboard-channels-ZnUGKi2j.js";
|
|
26
26
|
import { t as buildWorkspaceHookStatus } from "./hooks-status-BielXMUB.js";
|
|
27
|
-
import { t as runTui } from "./tui-
|
|
27
|
+
import { t as runTui } from "./tui-CF9NTWgo.js";
|
|
28
28
|
import fs from "node:fs";
|
|
29
29
|
import os from "node:os";
|
|
30
30
|
import path from "node:path";
|
|
@@ -169,7 +169,7 @@ function isHostedSecurityCapableSession(explicitFlag = false) {
|
|
|
169
169
|
const sudoersPath = path.join("/etc/sudoers.d", `fased-host-maintenance-${currentUser}`);
|
|
170
170
|
if (fs.existsSync(sudoersPath)) return true;
|
|
171
171
|
}
|
|
172
|
-
return canRunHostedMaintenanceCommand("sudo -n tailscale
|
|
172
|
+
return canRunHostedMaintenanceCommand("sudo -n /usr/local/sbin/fased-host-maintenance tailscale-status >/dev/null 2>&1") || canRunHostedMaintenanceCommand("sudo -n /usr/local/sbin/fased-host-maintenance tailnet-ssh-ingress >/dev/null 2>&1") || canRunHostedMaintenanceCommand("sudo -n /usr/local/sbin/fased-host-maintenance firewall-baseline >/dev/null 2>&1") || canRunHostedMaintenanceCommand("sudo -n systemctl status fased-gateway.service >/dev/null 2>&1");
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
//#endregion
|
|
@@ -547,16 +547,18 @@ async function installRootServiceMaintenanceAccess(params) {
|
|
|
547
547
|
const sudoers = [
|
|
548
548
|
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl restart ${safeServiceName}.service`,
|
|
549
549
|
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl restart --no-block ${safeServiceName}.service`,
|
|
550
|
+
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl start --no-block ${safeServiceName}.service`,
|
|
551
|
+
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl enable --now ${safeServiceName}.service`,
|
|
550
552
|
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl status ${safeServiceName}.service`,
|
|
551
|
-
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl status ${safeServiceName}.service
|
|
552
|
-
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl status ${safeServiceName} *`,
|
|
553
|
+
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl status ${safeServiceName}.service --no-pager`,
|
|
553
554
|
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl is-active ${safeServiceName}.service`,
|
|
554
|
-
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl is-active ${safeServiceName}
|
|
555
|
-
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl
|
|
556
|
-
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl
|
|
557
|
-
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/
|
|
558
|
-
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/journalctl -u ${safeServiceName}.service
|
|
559
|
-
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/journalctl -u ${safeServiceName}
|
|
555
|
+
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl is-active ${safeServiceName}`,
|
|
556
|
+
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl show ${safeServiceName}.service -p ActiveState --value`,
|
|
557
|
+
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/systemctl cat ${safeServiceName}.service`,
|
|
558
|
+
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/journalctl -u ${safeServiceName}.service -n 50 --no-pager`,
|
|
559
|
+
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/journalctl -u ${safeServiceName}.service -n 120 --no-pager`,
|
|
560
|
+
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/journalctl -u ${safeServiceName} -n 50 --no-pager`,
|
|
561
|
+
`${safeUser} ALL=(root) NOPASSWD: /usr/bin/journalctl -u ${safeServiceName} -n 120 --no-pager`
|
|
560
562
|
].join("\n");
|
|
561
563
|
return await runShell([
|
|
562
564
|
`echo '${Buffer.from(`${sudoers}\n`, "utf8").toString("base64")}' | base64 -d | sudo -n tee '${sudoersPath}' >/dev/null`,
|
|
@@ -1358,7 +1360,7 @@ async function finalizeOnboardingWizard(options) {
|
|
|
1358
1360
|
const systemdAvailable = process.platform === "linux" ? await isSystemdUserServiceAvailable() : true;
|
|
1359
1361
|
if (process.platform === "linux" && !systemdAvailable && !strictVps && flow !== "quickstart") await prompter.note("Systemd user services are unavailable. Skipping lingering checks and user-service install.", "Systemd");
|
|
1360
1362
|
if (process.platform === "linux" && systemdAvailable && strictVps) {} else if (process.platform === "linux" && systemdAvailable) {
|
|
1361
|
-
const { ensureSystemdUserLingerInteractive } = await import("./systemd-linger-
|
|
1363
|
+
const { ensureSystemdUserLingerInteractive } = await import("./systemd-linger-BTw_D-6k.js").then((n) => n.r);
|
|
1362
1364
|
await ensureSystemdUserLingerInteractive({
|
|
1363
1365
|
runtime,
|
|
1364
1366
|
prompter: {
|
|
@@ -2463,7 +2465,7 @@ async function finalizeOnboardingWizard(options) {
|
|
|
2463
2465
|
fallbackHint: !strictVps ? controlUiOpenHint : void 0
|
|
2464
2466
|
}), "Dashboard ready");
|
|
2465
2467
|
}
|
|
2466
|
-
await prompter.outro(
|
|
2468
|
+
if (!strictVps) await prompter.outro(controlUiOpened ? "Setup complete. Next: Agent > Models, then Chat." : "Setup complete. Use the dashboard link above, then use Agent > Models and Chat.");
|
|
2467
2469
|
return { launchedTui };
|
|
2468
2470
|
}
|
|
2469
2471
|
|
|
@@ -2747,6 +2749,8 @@ const LOW_MEMORY_SWAP_THRESHOLD_MB = 2304;
|
|
|
2747
2749
|
const LOW_MEMORY_HOSTING_SWAP_GB = 4;
|
|
2748
2750
|
const HOSTING_SWAP_GB = 2;
|
|
2749
2751
|
const TAILSCALE_INTERACTIVE_TIMEOUT_MS = 120 * 1e3;
|
|
2752
|
+
const TAILSCALE_LOGIN_URL_RE = /https:\/\/login\.tailscale\.com\/a\/[A-Za-z0-9_-]+/i;
|
|
2753
|
+
const HOST_MAINTENANCE_HELPER = "/usr/local/sbin/fased-host-maintenance";
|
|
2750
2754
|
function detectTotalMemoryMb() {
|
|
2751
2755
|
if (process.platform === "linux") try {
|
|
2752
2756
|
const match = fs.readFileSync("/proc/meminfo", "utf8").match(/^MemTotal:\s+(\d+)\s+kB/m);
|
|
@@ -2779,29 +2783,67 @@ function run(command, logPath) {
|
|
|
2779
2783
|
detail: detail || `${command} (exit=${proc.status ?? "unknown"})`
|
|
2780
2784
|
};
|
|
2781
2785
|
}
|
|
2782
|
-
function runInteractive(command, logPath, options) {
|
|
2783
|
-
if (logPath) appendHostSecurityLog(logPath, command, "interactive command started; output
|
|
2784
|
-
|
|
2785
|
-
stdio: [
|
|
2786
|
+
async function runInteractive(command, logPath, options) {
|
|
2787
|
+
if (logPath) appendHostSecurityLog(logPath, command, "interactive command started; output captured for framed wizard display");
|
|
2788
|
+
return await new Promise((resolve) => {
|
|
2789
|
+
const proc = spawn("bash", ["-lc", command], { stdio: [
|
|
2786
2790
|
"ignore",
|
|
2787
|
-
"
|
|
2788
|
-
"
|
|
2789
|
-
]
|
|
2790
|
-
|
|
2791
|
-
|
|
2791
|
+
"pipe",
|
|
2792
|
+
"pipe"
|
|
2793
|
+
] });
|
|
2794
|
+
let output = "";
|
|
2795
|
+
let loginUrlShown = false;
|
|
2796
|
+
let timedOut = false;
|
|
2797
|
+
let noteQueue = Promise.resolve();
|
|
2798
|
+
const timer = options?.timeoutMs && options.timeoutMs > 0 ? setTimeout(() => {
|
|
2799
|
+
timedOut = true;
|
|
2800
|
+
proc.kill("SIGINT");
|
|
2801
|
+
}, options.timeoutMs) : null;
|
|
2802
|
+
const maybeShowLoginUrl = (chunk) => {
|
|
2803
|
+
output += chunk;
|
|
2804
|
+
if (loginUrlShown) return;
|
|
2805
|
+
const loginUrl = output.match(TAILSCALE_LOGIN_URL_RE)?.[0];
|
|
2806
|
+
if (!loginUrl) return;
|
|
2807
|
+
loginUrlShown = true;
|
|
2808
|
+
if (options?.prompter) {
|
|
2809
|
+
const message = [
|
|
2810
|
+
noteHeading("Open login URL"),
|
|
2811
|
+
"Open this URL in your local browser:",
|
|
2812
|
+
...noteCommands([loginUrl]),
|
|
2813
|
+
"Return here after approving this VPS."
|
|
2814
|
+
].join("\n");
|
|
2815
|
+
noteQueue = noteQueue.then(() => options.prompter?.note(message, options.noteTitle ?? "Tailscale login URL"));
|
|
2816
|
+
}
|
|
2817
|
+
};
|
|
2818
|
+
proc.stdout?.on("data", (chunk) => {
|
|
2819
|
+
maybeShowLoginUrl(String(chunk));
|
|
2820
|
+
});
|
|
2821
|
+
proc.stderr?.on("data", (chunk) => {
|
|
2822
|
+
maybeShowLoginUrl(String(chunk));
|
|
2823
|
+
});
|
|
2824
|
+
proc.on("error", (error) => {
|
|
2825
|
+
output += `\n${error instanceof Error ? error.message : String(error)}`;
|
|
2826
|
+
});
|
|
2827
|
+
proc.on("close", (code) => {
|
|
2828
|
+
if (timer) clearTimeout(timer);
|
|
2829
|
+
const detail = timedOut ? `${command} timed out after ${Math.round((options?.timeoutMs ?? 0) / 1e3)}s\n${output}`.trim() : `${command} (exit=${code ?? "unknown"})\n${output}`.trim();
|
|
2830
|
+
if (logPath) appendHostSecurityLog(logPath, command, detail);
|
|
2831
|
+
noteQueue.then(() => {
|
|
2832
|
+
if (code === 0) {
|
|
2833
|
+
resolve({
|
|
2834
|
+
ok: true,
|
|
2835
|
+
detail
|
|
2836
|
+
});
|
|
2837
|
+
return;
|
|
2838
|
+
}
|
|
2839
|
+
resolve({
|
|
2840
|
+
ok: false,
|
|
2841
|
+
detail,
|
|
2842
|
+
timedOut
|
|
2843
|
+
});
|
|
2844
|
+
});
|
|
2845
|
+
});
|
|
2792
2846
|
});
|
|
2793
|
-
const timedOut = proc.error?.code === "ETIMEDOUT";
|
|
2794
|
-
const detail = timedOut ? `${command} timed out after ${Math.round((options?.timeoutMs ?? 0) / 1e3)}s` : `${command} (exit=${proc.status ?? "unknown"})`;
|
|
2795
|
-
if (logPath) appendHostSecurityLog(logPath, command, detail);
|
|
2796
|
-
if (proc.status === 0) return {
|
|
2797
|
-
ok: true,
|
|
2798
|
-
detail
|
|
2799
|
-
};
|
|
2800
|
-
return {
|
|
2801
|
-
ok: false,
|
|
2802
|
-
detail,
|
|
2803
|
-
timedOut
|
|
2804
|
-
};
|
|
2805
2847
|
}
|
|
2806
2848
|
function buildTailscaleLoginWaitCommand(command) {
|
|
2807
2849
|
return [
|
|
@@ -2809,7 +2851,7 @@ function buildTailscaleLoginWaitCommand(command) {
|
|
|
2809
2851
|
`bash -lc ${shellQuote(command)} &`,
|
|
2810
2852
|
"ts_pid=$!",
|
|
2811
2853
|
"for _ in $(seq 1 55); do",
|
|
2812
|
-
|
|
2854
|
+
` if tailscale ip -4 >/dev/null 2>&1 || ${hostMaintenanceCommand("tailscale-ip4")} >/dev/null 2>&1 || sudo -n tailscale ip -4 >/dev/null 2>&1; then`,
|
|
2813
2855
|
" kill -INT \"$ts_pid\" >/dev/null 2>&1 || true",
|
|
2814
2856
|
" wait \"$ts_pid\" >/dev/null 2>&1 || true",
|
|
2815
2857
|
" exit 0",
|
|
@@ -2822,15 +2864,19 @@ function buildTailscaleLoginWaitCommand(command) {
|
|
|
2822
2864
|
"done",
|
|
2823
2865
|
"kill -INT \"$ts_pid\" >/dev/null 2>&1 || true",
|
|
2824
2866
|
"wait \"$ts_pid\" >/dev/null 2>&1 || true",
|
|
2825
|
-
|
|
2867
|
+
`if tailscale ip -4 >/dev/null 2>&1 || ${hostMaintenanceCommand("tailscale-ip4")} >/dev/null 2>&1 || sudo -n tailscale ip -4 >/dev/null 2>&1; then`,
|
|
2826
2868
|
" exit 0",
|
|
2827
2869
|
"fi",
|
|
2828
2870
|
"exit 124"
|
|
2829
2871
|
].join("\n");
|
|
2830
2872
|
}
|
|
2831
|
-
function runInteractiveTailscaleLogin(command, logPath) {
|
|
2832
|
-
if (logPath) appendHostSecurityLog(logPath, command, "interactive Tailscale login started;
|
|
2833
|
-
const result = runInteractive(buildTailscaleLoginWaitCommand(command), void 0, {
|
|
2873
|
+
async function runInteractiveTailscaleLogin(command, logPath, prompter) {
|
|
2874
|
+
if (logPath) appendHostSecurityLog(logPath, command, "interactive Tailscale login started; login URL shown in framed wizard note");
|
|
2875
|
+
const result = await runInteractive(buildTailscaleLoginWaitCommand(command), void 0, {
|
|
2876
|
+
timeoutMs: TAILSCALE_INTERACTIVE_TIMEOUT_MS,
|
|
2877
|
+
prompter,
|
|
2878
|
+
noteTitle: "Tailscale login URL"
|
|
2879
|
+
});
|
|
2834
2880
|
if (logPath) appendHostSecurityLog(logPath, "tailscale login result", result.ok ? "tailnet IP appeared or tailscale up completed" : result.detail ?? "tailscale login failed");
|
|
2835
2881
|
if (result.ok) return {
|
|
2836
2882
|
ok: true,
|
|
@@ -2871,21 +2917,29 @@ function tailscaleTimedOutButReady(result, logPath, runner = run) {
|
|
|
2871
2917
|
function shellQuote(value) {
|
|
2872
2918
|
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
2873
2919
|
}
|
|
2920
|
+
function hostMaintenanceCommand(action) {
|
|
2921
|
+
return `sudo -n ${HOST_MAINTENANCE_HELPER} ${action}`;
|
|
2922
|
+
}
|
|
2923
|
+
function hostMaintenanceCommandWithInput(action, input) {
|
|
2924
|
+
return `printf '%s\\n' ${shellQuote(input)} | ${hostMaintenanceCommand(action)}`;
|
|
2925
|
+
}
|
|
2874
2926
|
function isTailscaleLoggedIn(logPath, runner = run) {
|
|
2875
|
-
return runner("tailscale status >/dev/null 2>&1", logPath).ok || runner("sudo -n tailscale status >/dev/null 2>&1", logPath).ok;
|
|
2927
|
+
return runner("tailscale status >/dev/null 2>&1", logPath).ok || runner(`${hostMaintenanceCommand("tailscale-status")} >/dev/null 2>&1`, logPath).ok || runner("sudo -n tailscale status >/dev/null 2>&1", logPath).ok;
|
|
2876
2928
|
}
|
|
2877
2929
|
function hasTailscaleIp(logPath, runner = run) {
|
|
2878
|
-
return runner("tailscale ip -4 >/dev/null 2>&1", logPath).ok || runner("sudo -n tailscale ip -4 >/dev/null 2>&1", logPath).ok;
|
|
2930
|
+
return runner("tailscale ip -4 >/dev/null 2>&1", logPath).ok || runner(`${hostMaintenanceCommand("tailscale-ip4")} >/dev/null 2>&1`, logPath).ok || runner("sudo -n tailscale ip -4 >/dev/null 2>&1", logPath).ok;
|
|
2879
2931
|
}
|
|
2880
2932
|
function readTailscaleIp(logPath, runner = run) {
|
|
2881
2933
|
const probe = runner("tailscale ip -4", logPath);
|
|
2882
|
-
const
|
|
2934
|
+
const helperProbe = probe.ok ? probe : runner(hostMaintenanceCommand("tailscale-ip4"), logPath);
|
|
2935
|
+
const sudoProbe = helperProbe.ok ? helperProbe : runner("sudo -n tailscale ip -4", logPath);
|
|
2883
2936
|
if (!sudoProbe.ok || !sudoProbe.detail) return;
|
|
2884
2937
|
return sudoProbe.detail.match(/\b\d{1,3}(?:\.\d{1,3}){3}\b/)?.[0];
|
|
2885
2938
|
}
|
|
2886
2939
|
function readTailscaleSelf(logPath, runner = run) {
|
|
2887
2940
|
const probe = runner("tailscale status --json", logPath);
|
|
2888
|
-
const
|
|
2941
|
+
const helperProbe = probe.ok ? probe : runner(hostMaintenanceCommand("tailscale-status-json"), logPath);
|
|
2942
|
+
const sudoProbe = helperProbe.ok ? helperProbe : runner("sudo -n tailscale status --json", logPath);
|
|
2889
2943
|
if (!sudoProbe.ok || !sudoProbe.detail) return { ipv4: readTailscaleIp(logPath, runner) };
|
|
2890
2944
|
try {
|
|
2891
2945
|
const parsed = JSON.parse(sudoProbe.detail);
|
|
@@ -2991,7 +3045,8 @@ function verifyTailnetSshServerPrerequisites(params) {
|
|
|
2991
3045
|
};
|
|
2992
3046
|
}
|
|
2993
3047
|
function ensureTailnetSshIngressForVerification(params) {
|
|
2994
|
-
const
|
|
3048
|
+
const runner = params.runner ?? run;
|
|
3049
|
+
const command = [
|
|
2995
3050
|
"if command -v ufw >/dev/null 2>&1; then",
|
|
2996
3051
|
" if sudo -n ufw status | grep -qi '^Status: active'; then",
|
|
2997
3052
|
" sudo -n ufw insert 1 allow in on tailscale0 to any port 22 proto tcp || sudo -n ufw allow in on tailscale0 to any port 22 proto tcp",
|
|
@@ -3002,7 +3057,9 @@ function ensureTailnetSshIngressForVerification(params) {
|
|
|
3002
3057
|
" sudo -n firewall-cmd --permanent --zone=trusted --add-interface=tailscale0 >/dev/null 2>&1 || true",
|
|
3003
3058
|
" sudo -n firewall-cmd --reload >/dev/null 2>&1 || true",
|
|
3004
3059
|
"fi"
|
|
3005
|
-
].join("\n")
|
|
3060
|
+
].join("\n");
|
|
3061
|
+
const helperResult = runner(hostMaintenanceCommand("tailnet-ssh-ingress"), params.logPath);
|
|
3062
|
+
const result = helperResult.ok ? helperResult : runner(command, params.logPath);
|
|
3006
3063
|
if (!result.ok) return {
|
|
3007
3064
|
ok: false,
|
|
3008
3065
|
detail: result.detail ?? "could not prepare tailnet SSH firewall rule before verification"
|
|
@@ -3089,7 +3146,7 @@ async function confirmTailnetSshBeforeLockdown(params) {
|
|
|
3089
3146
|
return false;
|
|
3090
3147
|
}
|
|
3091
3148
|
await prompter.note(formatTailscaleAccountBrowserLoginNote(), "Tailscale login");
|
|
3092
|
-
const tsReset = interactiveRunner("
|
|
3149
|
+
const tsReset = await interactiveRunner(hostMaintenanceCommand("tailscale-up-reset-ssh"), logPath, prompter);
|
|
3093
3150
|
const acceptedTimedOutLogin = tailscaleTimedOutButReady(tsReset, logPath, runner);
|
|
3094
3151
|
if (!tsReset.ok && !acceptedTimedOutLogin || !hasTailscaleIp(logPath, runner)) {
|
|
3095
3152
|
runtime.error("Hosting setup stopped before SSH/firewall lock-down.");
|
|
@@ -3133,9 +3190,9 @@ function ensureTailscaleServe(port, logPath) {
|
|
|
3133
3190
|
ok: true,
|
|
3134
3191
|
detail: `tailscale serve --bg -> 127.0.0.1:${port}`
|
|
3135
3192
|
};
|
|
3136
|
-
if (run(
|
|
3193
|
+
if (run(hostMaintenanceCommandWithInput("tailscale-serve", String(port)), logPath).ok) return {
|
|
3137
3194
|
ok: true,
|
|
3138
|
-
detail: `
|
|
3195
|
+
detail: `host maintenance tailscale serve -> 127.0.0.1:${port}`
|
|
3139
3196
|
};
|
|
3140
3197
|
if (run(`tailscale serve https / http://127.0.0.1:${port}`, logPath).ok) return {
|
|
3141
3198
|
ok: true,
|
|
@@ -3159,7 +3216,7 @@ function isTailscaleServeReady(port) {
|
|
|
3159
3216
|
],
|
|
3160
3217
|
encoding: "utf8"
|
|
3161
3218
|
});
|
|
3162
|
-
if ((probe.status ?? 1) !== 0) probe = spawnSync("bash", ["-lc", "
|
|
3219
|
+
if ((probe.status ?? 1) !== 0) probe = spawnSync("bash", ["-lc", hostMaintenanceCommand("tailscale-serve-status")], {
|
|
3163
3220
|
stdio: [
|
|
3164
3221
|
"ignore",
|
|
3165
3222
|
"pipe",
|
|
@@ -3192,6 +3249,7 @@ function packageInstallCommand(packages) {
|
|
|
3192
3249
|
}
|
|
3193
3250
|
function tailscaleInstallCommand() {
|
|
3194
3251
|
return [
|
|
3252
|
+
`${hostMaintenanceCommand("tailscale-install-start")} && exit 0`,
|
|
3195
3253
|
"if command -v tailscale >/dev/null 2>&1; then",
|
|
3196
3254
|
" :",
|
|
3197
3255
|
"elif command -v apt-get >/dev/null 2>&1; then",
|
|
@@ -3217,6 +3275,7 @@ function tailscaleInstallCommand() {
|
|
|
3217
3275
|
}
|
|
3218
3276
|
function firewallBaselineCommand() {
|
|
3219
3277
|
return [
|
|
3278
|
+
`${hostMaintenanceCommand("firewall-baseline")} && exit 0`,
|
|
3220
3279
|
"if command -v ufw >/dev/null 2>&1 || command -v apt-get >/dev/null 2>&1; then",
|
|
3221
3280
|
" command -v ufw >/dev/null 2>&1 || { " + packageInstallCommand(["ufw"]) + "; }",
|
|
3222
3281
|
" sudo -n ufw default deny incoming",
|
|
@@ -3240,13 +3299,14 @@ function firewallBaselineCommand() {
|
|
|
3240
3299
|
}
|
|
3241
3300
|
function automaticUpdatesCommand() {
|
|
3242
3301
|
return [
|
|
3302
|
+
`${hostMaintenanceCommand("automatic-updates")} && exit 0`,
|
|
3243
3303
|
"if command -v apt-get >/dev/null 2>&1; then",
|
|
3244
3304
|
" " + packageInstallCommand(["unattended-upgrades"]),
|
|
3245
3305
|
" sudo -n systemctl enable --now unattended-upgrades >/dev/null 2>&1 || true",
|
|
3246
3306
|
" sudo -n systemctl enable --now apt-daily.timer apt-daily-upgrade.timer",
|
|
3247
3307
|
"elif command -v dnf >/dev/null 2>&1 || command -v dnf5 >/dev/null 2>&1; then",
|
|
3248
3308
|
" (" + packageInstallCommand(["dnf5-plugin-automatic"]) + ") || (" + packageInstallCommand(["dnf-automatic"]) + ")",
|
|
3249
|
-
" sudo -n sed -i 's/^apply_updates[[:space:]]*=.*/apply_updates = yes/' /etc/dnf/automatic.conf >/dev/null 2>&1 || true",
|
|
3309
|
+
" sudo -n /usr/local/sbin/fased-host-maintenance enable-dnf-automatic >/dev/null 2>&1 || sudo -n sed -i 's/^apply_updates[[:space:]]*=.*/apply_updates = yes/' /etc/dnf/automatic.conf >/dev/null 2>&1 || true",
|
|
3250
3310
|
" sudo -n systemctl enable --now dnf5-automatic.timer >/dev/null 2>&1 || sudo -n systemctl enable --now dnf-automatic.timer",
|
|
3251
3311
|
"elif command -v yum >/dev/null 2>&1; then",
|
|
3252
3312
|
" (" + packageInstallCommand(["dnf-automatic"]) + ") || (" + packageInstallCommand(["yum-cron"]) + ")",
|
|
@@ -3257,6 +3317,9 @@ function automaticUpdatesCommand() {
|
|
|
3257
3317
|
"fi"
|
|
3258
3318
|
].join("\n");
|
|
3259
3319
|
}
|
|
3320
|
+
function sshHardeningCommand() {
|
|
3321
|
+
return hostMaintenanceCommand("harden-ssh");
|
|
3322
|
+
}
|
|
3260
3323
|
function failOrContinue(params) {
|
|
3261
3324
|
const { opts, runtime, step, detail } = params;
|
|
3262
3325
|
const body = detail ? `${step}: ${detail}` : step;
|
|
@@ -3301,8 +3364,8 @@ async function applyHostingSecurity(params) {
|
|
|
3301
3364
|
validate: (value) => value.trim() ? void 0 : "Required"
|
|
3302
3365
|
})).trim();
|
|
3303
3366
|
else await prompter.note(formatTailscaleBrowserLoginNote(), "Tailscale login");
|
|
3304
|
-
const resetCommand = tsAuthkey ?
|
|
3305
|
-
const tsReset = tsAuthkey ? run(resetCommand, logPath) : runInteractiveTailscaleLogin(resetCommand, logPath);
|
|
3367
|
+
const resetCommand = tsAuthkey ? hostMaintenanceCommandWithInput("tailscale-up-reset-authkey-ssh", tsAuthkey) : hostMaintenanceCommand("tailscale-up-reset-ssh");
|
|
3368
|
+
const tsReset = tsAuthkey ? run(resetCommand, logPath) : await runInteractiveTailscaleLogin(resetCommand, logPath, prompter);
|
|
3306
3369
|
if (!tsReset.ok && !tailscaleTimedOutButReady(tsReset, logPath)) return {
|
|
3307
3370
|
ok: false,
|
|
3308
3371
|
detail: tsReset.detail ?? "tailscale account switch failed"
|
|
@@ -3425,7 +3488,7 @@ async function applyHostingSecurity(params) {
|
|
|
3425
3488
|
logPath
|
|
3426
3489
|
};
|
|
3427
3490
|
}
|
|
3428
|
-
} else if (hasCommand("systemctl")) run("sudo -n systemctl enable --now tailscaled >/dev/null 2>&1 || true
|
|
3491
|
+
} else if (hasCommand("systemctl")) run(`${hostMaintenanceCommand("tailscale-install-start")} >/dev/null 2>&1 || sudo -n systemctl enable --now tailscaled >/dev/null 2>&1 || true`, logPath);
|
|
3429
3492
|
if (prompter && opts.nonInteractive !== true) await prompter.note(formatLocalDeviceTailnetRequirementNote(), "Local device requirement");
|
|
3430
3493
|
let tsHealthy = isTailscaleLoggedIn(logPath);
|
|
3431
3494
|
if (tsHealthy && prompter && opts.nonInteractive !== true) {
|
|
@@ -3434,7 +3497,7 @@ async function applyHostingSecurity(params) {
|
|
|
3434
3497
|
initialValue: false
|
|
3435
3498
|
})) {
|
|
3436
3499
|
if (prompter) await prompter.note(formatTailscaleBrowserLoginNote(), "Tailscale login");
|
|
3437
|
-
const tsReset = runInteractiveTailscaleLogin("
|
|
3500
|
+
const tsReset = await runInteractiveTailscaleLogin(hostMaintenanceCommand("tailscale-up-reset-ssh"), logPath, prompter);
|
|
3438
3501
|
if (!tsReset.ok && !tailscaleTimedOutButReady(tsReset, logPath)) {
|
|
3439
3502
|
checks.push({
|
|
3440
3503
|
name: "tailscale",
|
|
@@ -3477,7 +3540,7 @@ async function applyHostingSecurity(params) {
|
|
|
3477
3540
|
})).trim();
|
|
3478
3541
|
}
|
|
3479
3542
|
if (tsAuthkey) {
|
|
3480
|
-
const tsUp = run(
|
|
3543
|
+
const tsUp = run(hostMaintenanceCommandWithInput("tailscale-up-authkey-ssh", tsAuthkey), logPath);
|
|
3481
3544
|
if (!tsUp.ok) {
|
|
3482
3545
|
checks.push({
|
|
3483
3546
|
name: "tailscale",
|
|
@@ -3521,7 +3584,7 @@ async function applyHostingSecurity(params) {
|
|
|
3521
3584
|
};
|
|
3522
3585
|
} else {
|
|
3523
3586
|
if (prompter) await prompter.note(formatTailscaleBrowserLoginNote(), "Tailscale login");
|
|
3524
|
-
const tsUp = runInteractiveTailscaleLogin("
|
|
3587
|
+
const tsUp = await runInteractiveTailscaleLogin(hostMaintenanceCommand("tailscale-up-ssh"), logPath, prompter);
|
|
3525
3588
|
if (!tsUp.ok && !tailscaleTimedOutButReady(tsUp, logPath)) {
|
|
3526
3589
|
checks.push({
|
|
3527
3590
|
name: "tailscale",
|
|
@@ -3576,7 +3639,7 @@ async function applyHostingSecurity(params) {
|
|
|
3576
3639
|
detail: "tailnet IP present; verifying app SSH before lock-down"
|
|
3577
3640
|
});
|
|
3578
3641
|
const operatorUser = run("id -u app >/dev/null 2>&1", logPath).ok ? "app" : process.env.SUDO_USER?.trim() || process.env.USER?.trim() || process.env.LOGNAME?.trim();
|
|
3579
|
-
if (operatorUser) run(
|
|
3642
|
+
if (operatorUser) run(`${hostMaintenanceCommand("tailscale-set-operator-self")} >/dev/null 2>&1 || true`, logPath);
|
|
3580
3643
|
if (!await confirmTailnetSshBeforeLockdown({
|
|
3581
3644
|
opts,
|
|
3582
3645
|
runtime,
|
|
@@ -3648,7 +3711,7 @@ async function applyHostingSecurity(params) {
|
|
|
3648
3711
|
ok: true,
|
|
3649
3712
|
detail: "default-deny public ingress with tailnet SSH/HTTPS access"
|
|
3650
3713
|
});
|
|
3651
|
-
const sshRes = run(
|
|
3714
|
+
const sshRes = run(sshHardeningCommand(), logPath);
|
|
3652
3715
|
if (!sshRes.ok) {
|
|
3653
3716
|
checks.push({
|
|
3654
3717
|
name: "ssh",
|
|
@@ -3673,7 +3736,7 @@ async function applyHostingSecurity(params) {
|
|
|
3673
3736
|
ok: true,
|
|
3674
3737
|
detail: "password auth/root login disabled and ssh restarted"
|
|
3675
3738
|
});
|
|
3676
|
-
const f2bRes = runHostSetupCommand(`${packageInstallCommand(["fail2ban"])}\nsudo -n systemctl enable --now fail2ban`);
|
|
3739
|
+
const f2bRes = runHostSetupCommand(`${hostMaintenanceCommand("fail2ban-enable")} || (${packageInstallCommand(["fail2ban"])}\nsudo -n systemctl enable --now fail2ban)`);
|
|
3677
3740
|
if (!f2bRes.ok) {
|
|
3678
3741
|
checks.push({
|
|
3679
3742
|
name: "fail2ban",
|
|
@@ -3723,7 +3786,7 @@ async function applyHostingSecurity(params) {
|
|
|
3723
3786
|
ok: true,
|
|
3724
3787
|
detail: "automatic security updates enabled"
|
|
3725
3788
|
});
|
|
3726
|
-
|
|
3789
|
+
appendHostSecurityLog(logPath, "hosting host hardening complete", "enforced");
|
|
3727
3790
|
return {
|
|
3728
3791
|
profile,
|
|
3729
3792
|
checks,
|
|
@@ -2,7 +2,7 @@ import { Ui as logWarn, wa as defaultRuntime } from "./agent-scope-Cb1u7HE7.js";
|
|
|
2
2
|
import "./github-copilot-token-DYrFvncE.js";
|
|
3
3
|
import "./send-vR6HwT94.js";
|
|
4
4
|
import "./send-BQMxv218.js";
|
|
5
|
-
import { $ as emitAgentEvent, B as DEFAULT_INPUT_IMAGE_MIMES, G as normalizeMimeList, H as DEFAULT_INPUT_TIMEOUT_MS, K as resolveInputFileLimits, U as extractFileContentFromSource, V as DEFAULT_INPUT_MAX_REDIRECTS, W as extractImageContentFromSource, a as agentCommand, at as setSseHeaders, et as onAgentEvent, i as resolveAssistantStreamDeltaText, it as sendJson, n as handleGatewayPostJsonEndpoint, nt as resolveAgentIdForRequest, ot as writeDone, r as buildAgentMessageFromConversationEntries, rt as resolveSessionKey, tt as createDefaultDeps, z as DEFAULT_INPUT_IMAGE_MAX_BYTES } from "./pi-embedded-
|
|
5
|
+
import { $ as emitAgentEvent, B as DEFAULT_INPUT_IMAGE_MIMES, G as normalizeMimeList, H as DEFAULT_INPUT_TIMEOUT_MS, K as resolveInputFileLimits, U as extractFileContentFromSource, V as DEFAULT_INPUT_MAX_REDIRECTS, W as extractImageContentFromSource, a as agentCommand, at as setSseHeaders, et as onAgentEvent, i as resolveAssistantStreamDeltaText, it as sendJson, n as handleGatewayPostJsonEndpoint, nt as resolveAgentIdForRequest, ot as writeDone, r as buildAgentMessageFromConversationEntries, rt as resolveSessionKey, tt as createDefaultDeps, z as DEFAULT_INPUT_IMAGE_MAX_BYTES } from "./pi-embedded-Bnuo5tPq.js";
|
|
6
6
|
import "./diagnostic-D6XQAXl4.js";
|
|
7
7
|
import "./diagnostic-session-state-CexmAKza.js";
|
|
8
8
|
import "./send-Da1hCe1A.js";
|
|
@@ -2,14 +2,14 @@ import { Sa as defaultRuntime, Vi as logWarn } from "./agent-scope-DUKEZjqM.js";
|
|
|
2
2
|
import "./github-copilot-token-CNsqwfnE.js";
|
|
3
3
|
import "./send-CFSRf7De.js";
|
|
4
4
|
import "./send-gtmn6YeH.js";
|
|
5
|
-
import { B as DEFAULT_INPUT_IMAGE_MIMES, G as normalizeMimeList, H as DEFAULT_INPUT_TIMEOUT_MS, K as resolveInputFileLimits, U as extractFileContentFromSource, V as DEFAULT_INPUT_MAX_REDIRECTS, W as extractImageContentFromSource, a as agentCommand, at as sendJson, et as emitAgentEvent, i as resolveAssistantStreamDeltaText, it as resolveSessionKey, n as handleGatewayPostJsonEndpoint, nt as createDefaultDeps, ot as setSseHeaders, r as buildAgentMessageFromConversationEntries, rt as resolveAgentIdForRequest, st as writeDone, tt as onAgentEvent, z as DEFAULT_INPUT_IMAGE_MAX_BYTES } from "./pi-embedded-
|
|
5
|
+
import { B as DEFAULT_INPUT_IMAGE_MIMES, G as normalizeMimeList, H as DEFAULT_INPUT_TIMEOUT_MS, K as resolveInputFileLimits, U as extractFileContentFromSource, V as DEFAULT_INPUT_MAX_REDIRECTS, W as extractImageContentFromSource, a as agentCommand, at as sendJson, et as emitAgentEvent, i as resolveAssistantStreamDeltaText, it as resolveSessionKey, n as handleGatewayPostJsonEndpoint, nt as createDefaultDeps, ot as setSseHeaders, r as buildAgentMessageFromConversationEntries, rt as resolveAgentIdForRequest, st as writeDone, tt as onAgentEvent, z as DEFAULT_INPUT_IMAGE_MAX_BYTES } from "./pi-embedded-CeuBUTjd.js";
|
|
6
6
|
import "./reply-prefix-Bitnsmpd.js";
|
|
7
7
|
import "./diagnostic-_BiQ6GgD.js";
|
|
8
8
|
import "./diagnostic-session-state-CL_QxyRg.js";
|
|
9
9
|
import "./send-C3B8eaL_.js";
|
|
10
10
|
import "./media-B1OiuFFn.js";
|
|
11
11
|
import "./pi-model-discovery-DsJSYjlQ.js";
|
|
12
|
-
import "./paths-
|
|
12
|
+
import "./paths-Bzz-O3FX.js";
|
|
13
13
|
import "./ssrf-9SwDSKOO.js";
|
|
14
14
|
import "./path-alias-guards-B_y00xGw.js";
|
|
15
15
|
import "./fs-safe-SqvX3xVH.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./github-copilot-token-Dy7Y_jbI.js";
|
|
2
2
|
import { la as logWarn, qo as defaultRuntime } from "./paths-OUJyk-5R.js";
|
|
3
|
-
import { B as extractImageContentFromSource, F as DEFAULT_INPUT_IMAGE_MAX_BYTES, H as resolveInputFileLimits, I as DEFAULT_INPUT_IMAGE_MIMES, L as DEFAULT_INPUT_MAX_REDIRECTS, R as DEFAULT_INPUT_TIMEOUT_MS, V as normalizeMimeList, X as emitAgentEvent, Z as onAgentEvent, a as agentCommand, at as sendJson, i as resolveAssistantStreamDeltaText, it as resolveSessionKey, n as handleGatewayPostJsonEndpoint, nt as createDefaultDeps, ot as setSseHeaders, r as buildAgentMessageFromConversationEntries, rt as resolveAgentIdForRequest, st as writeDone, z as extractFileContentFromSource } from "./auth-
|
|
3
|
+
import { B as extractImageContentFromSource, F as DEFAULT_INPUT_IMAGE_MAX_BYTES, H as resolveInputFileLimits, I as DEFAULT_INPUT_IMAGE_MIMES, L as DEFAULT_INPUT_MAX_REDIRECTS, R as DEFAULT_INPUT_TIMEOUT_MS, V as normalizeMimeList, X as emitAgentEvent, Z as onAgentEvent, a as agentCommand, at as sendJson, i as resolveAssistantStreamDeltaText, it as resolveSessionKey, n as handleGatewayPostJsonEndpoint, nt as createDefaultDeps, ot as setSseHeaders, r as buildAgentMessageFromConversationEntries, rt as resolveAgentIdForRequest, st as writeDone, z as extractFileContentFromSource } from "./auth-BbQxXxtt.js";
|
|
4
4
|
import "./send-D96gGRQz.js";
|
|
5
5
|
import "./send-BFoI9HuU.js";
|
|
6
6
|
import "./skill-commands-DvoCSQnx.js";
|
|
@@ -2,7 +2,7 @@ import { bd as logWarn } from "./env-C77feXxI.js";
|
|
|
2
2
|
import "./agent-paths-BI1hx-tF.js";
|
|
3
3
|
import "./send-D7X0_iFp.js";
|
|
4
4
|
import "./send-BFEd4vCM.js";
|
|
5
|
-
import { Ai as buildAgentMessageFromConversationEntries, Ii as resolveAssistantStreamDeltaText, Li as agentCommand, _a as resolveAgentIdForRequest, an as DEFAULT_INPUT_IMAGE_MAX_BYTES, ba as setSseHeaders, cn as DEFAULT_INPUT_TIMEOUT_MS, dn as normalizeMimeList, fn as resolveInputFileLimits, ia as emitAgentEvent, ki as handleGatewayPostJsonEndpoint, ln as extractFileContentFromSource, oa as onAgentEvent, on as DEFAULT_INPUT_IMAGE_MIMES, sn as DEFAULT_INPUT_MAX_REDIRECTS, un as extractImageContentFromSource, va as resolveSessionKey, xa as writeDone, ya as sendJson } from "./model-catalog
|
|
5
|
+
import { Ai as buildAgentMessageFromConversationEntries, Ii as resolveAssistantStreamDeltaText, Li as agentCommand, _a as resolveAgentIdForRequest, an as DEFAULT_INPUT_IMAGE_MAX_BYTES, ba as setSseHeaders, cn as DEFAULT_INPUT_TIMEOUT_MS, dn as normalizeMimeList, fn as resolveInputFileLimits, ia as emitAgentEvent, ki as handleGatewayPostJsonEndpoint, ln as extractFileContentFromSource, oa as onAgentEvent, on as DEFAULT_INPUT_IMAGE_MIMES, sn as DEFAULT_INPUT_MAX_REDIRECTS, un as extractImageContentFromSource, va as resolveSessionKey, xa as writeDone, ya as sendJson } from "./model-catalog-ex4Cpln_.js";
|
|
6
6
|
import "./github-copilot-token-A9DiaCB0.js";
|
|
7
7
|
import { A as defaultRuntime } from "./entry.js";
|
|
8
8
|
import "./reply-prefix-TUhpEtvr.js";
|
|
@@ -45,7 +45,7 @@ import "./send-C-su1wPZ.js";
|
|
|
45
45
|
import "./outbound-attachment-Bh4FmcYg.js";
|
|
46
46
|
import "./fetch-BVvWzHT_.js";
|
|
47
47
|
import "./delivery-queue-55Cityuq.js";
|
|
48
|
-
import { t as createDefaultDeps } from "./deps-
|
|
48
|
+
import { t as createDefaultDeps } from "./deps-BWo3ls9h.js";
|
|
49
49
|
import "./frontmatter-D2UNJikU.js";
|
|
50
50
|
import "./skills-Dis31awJ.js";
|
|
51
51
|
import "./skills-remote-CIAB0AXm.js";
|
|
@@ -72,7 +72,7 @@ import "./cli-utils-XevKf-tr.js";
|
|
|
72
72
|
import "./help-format-B2DRdx98.js";
|
|
73
73
|
import "./progress-DkVYFLij.js";
|
|
74
74
|
import "./replies-FXlmpJVO.js";
|
|
75
|
-
import "./prompt-style-
|
|
75
|
+
import "./prompt-style-Rmj3c-Ir.js";
|
|
76
76
|
import "./pairing-labels-BCM1S2e_.js";
|
|
77
77
|
import { randomUUID } from "node:crypto";
|
|
78
78
|
import { z } from "zod";
|
|
@@ -2,7 +2,7 @@ import "./paths-C9FmTW1x.js";
|
|
|
2
2
|
import "./agent-paths-DmOVZE7g.js";
|
|
3
3
|
import { au as logWarn } from "./agent-scope-DHrLr5OF.js";
|
|
4
4
|
import "./commands-registry-BRvZQ1jh.js";
|
|
5
|
-
import { Er as onAgentEvent, G as DEFAULT_INPUT_TIMEOUT_MS, H as DEFAULT_INPUT_IMAGE_MAX_BYTES, J as normalizeMimeList, Ja as sendJson, K as extractFileContentFromSource, Ka as resolveAgentIdForRequest, U as DEFAULT_INPUT_IMAGE_MIMES, W as DEFAULT_INPUT_MAX_REDIRECTS, Xa as writeDone, Y as resolveInputFileLimits, Ya as setSseHeaders, ft as handleGatewayPostJsonEndpoint, ht as agentCommand, mt as resolveAssistantStreamDeltaText, pt as buildAgentMessageFromConversationEntries, q as extractImageContentFromSource, qa as resolveSessionKey, wr as emitAgentEvent } from "./reply-
|
|
5
|
+
import { Er as onAgentEvent, G as DEFAULT_INPUT_TIMEOUT_MS, H as DEFAULT_INPUT_IMAGE_MAX_BYTES, J as normalizeMimeList, Ja as sendJson, K as extractFileContentFromSource, Ka as resolveAgentIdForRequest, U as DEFAULT_INPUT_IMAGE_MIMES, W as DEFAULT_INPUT_MAX_REDIRECTS, Xa as writeDone, Y as resolveInputFileLimits, Ya as setSseHeaders, ft as handleGatewayPostJsonEndpoint, ht as agentCommand, mt as resolveAssistantStreamDeltaText, pt as buildAgentMessageFromConversationEntries, q as extractImageContentFromSource, qa as resolveSessionKey, wr as emitAgentEvent } from "./reply-B034LmuD.js";
|
|
6
6
|
import { d as defaultRuntime } from "./errors-Dx3S3Nrp.js";
|
|
7
7
|
import "./send-C5_fB8YQ.js";
|
|
8
8
|
import "./send-jxmRy65D.js";
|
|
@@ -37,7 +37,7 @@ import "./ssrf-Blf4NrHS.js";
|
|
|
37
37
|
import "./outbound-attachment-CsXJwFsg.js";
|
|
38
38
|
import "./fetch-CnCPOuq7.js";
|
|
39
39
|
import "./delivery-queue-DKRjVFlq.js";
|
|
40
|
-
import { t as createDefaultDeps } from "./deps-
|
|
40
|
+
import { t as createDefaultDeps } from "./deps-BKAIBkcE.js";
|
|
41
41
|
import "./memory-DDpj0IVA.js";
|
|
42
42
|
import "./memory-search-BwYkW6_V.js";
|
|
43
43
|
import "./manager-BmONwMiP.js";
|
|
@@ -74,7 +74,7 @@ import "./progress-DZRfIFVb.js";
|
|
|
74
74
|
import "./replies-Do40G8fO.js";
|
|
75
75
|
import "./skills-remote-BghdrdFV.js";
|
|
76
76
|
import "./skill-commands-QW8zKXC_.js";
|
|
77
|
-
import "./prompt-style-
|
|
77
|
+
import "./prompt-style-CWAacuMq.js";
|
|
78
78
|
import "./pairing-labels-D2yOKhoV.js";
|
|
79
79
|
import { randomUUID } from "node:crypto";
|
|
80
80
|
import { z } from "zod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Gl as listChannelPlugins, Vf as CHAT_CHANNEL_ORDER, t as isTruthyEnvValue } from "./env-C77feXxI.js";
|
|
2
2
|
import { d as listChannelPluginCatalogEntries } from "./dangerous-name-matching-CFRKz8Uq.js";
|
|
3
|
-
import { t as ensurePluginRegistryLoaded } from "./plugin-registry-
|
|
3
|
+
import { t as ensurePluginRegistryLoaded } from "./plugin-registry-DjTXh-9g.js";
|
|
4
4
|
|
|
5
5
|
//#region src/cli/channel-options.ts
|
|
6
6
|
function dedupe(values) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Cd as isTruthyEnvValue, Nu as listChannelPlugins, jf as CHAT_CHANNEL_ORDER } from "./agent-scope-DHrLr5OF.js";
|
|
2
2
|
import { c as listChannelPluginCatalogEntries } from "./dangerous-name-matching-CnyEIiOk.js";
|
|
3
|
-
import { t as ensurePluginRegistryLoaded } from "./plugin-registry-
|
|
3
|
+
import { t as ensurePluginRegistryLoaded } from "./plugin-registry-D2IeEq2N.js";
|
|
4
4
|
|
|
5
5
|
//#region src/cli/channel-options.ts
|
|
6
6
|
function dedupe(values) {
|
|
@@ -9,7 +9,7 @@ import { createHmac } from "node:crypto";
|
|
|
9
9
|
import { execFileSync, spawn } from "node:child_process";
|
|
10
10
|
import { createServer } from "node:http";
|
|
11
11
|
import net from "node:net";
|
|
12
|
-
import WebSocket, { WebSocketServer } from "ws";
|
|
12
|
+
import WebSocket$1, { WebSocketServer } from "ws";
|
|
13
13
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
14
14
|
|
|
15
15
|
//#region src/browser/constants.ts
|
|
@@ -270,7 +270,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
270
270
|
let extensionWs = null;
|
|
271
271
|
const cdpClients = /* @__PURE__ */ new Set();
|
|
272
272
|
const connectedTargets = /* @__PURE__ */ new Map();
|
|
273
|
-
const extensionConnected = () => extensionWs?.readyState === WebSocket.OPEN;
|
|
273
|
+
const extensionConnected = () => extensionWs?.readyState === WebSocket$1.OPEN;
|
|
274
274
|
let extensionDisconnectCleanupTimer = null;
|
|
275
275
|
const extensionReconnectWaiters = /* @__PURE__ */ new Set();
|
|
276
276
|
const flushExtensionReconnectWaiters = (connected) => {
|
|
@@ -321,7 +321,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
321
321
|
let nextExtensionId = 1;
|
|
322
322
|
const sendToExtension = async (payload) => {
|
|
323
323
|
const ws = extensionWs;
|
|
324
|
-
if (!ws || ws.readyState !== WebSocket.OPEN) throw new Error("Chrome extension not connected");
|
|
324
|
+
if (!ws || ws.readyState !== WebSocket$1.OPEN) throw new Error("Chrome extension not connected");
|
|
325
325
|
ws.send(JSON.stringify(payload));
|
|
326
326
|
return await new Promise((resolve, reject) => {
|
|
327
327
|
const timer = setTimeout(() => {
|
|
@@ -338,12 +338,12 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
338
338
|
const broadcastToCdpClients = (evt) => {
|
|
339
339
|
const msg = JSON.stringify(evt);
|
|
340
340
|
for (const ws of cdpClients) {
|
|
341
|
-
if (ws.readyState !== WebSocket.OPEN) continue;
|
|
341
|
+
if (ws.readyState !== WebSocket$1.OPEN) continue;
|
|
342
342
|
ws.send(msg);
|
|
343
343
|
}
|
|
344
344
|
};
|
|
345
345
|
const sendResponseToCdp = (ws, res) => {
|
|
346
|
-
if (ws.readyState !== WebSocket.OPEN) return;
|
|
346
|
+
if (ws.readyState !== WebSocket$1.OPEN) return;
|
|
347
347
|
ws.send(JSON.stringify(res));
|
|
348
348
|
};
|
|
349
349
|
const ensureTargetEventsForClient = (ws, mode) => {
|
|
@@ -553,7 +553,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
553
553
|
rejectUpgrade(socket, 401, "Unauthorized");
|
|
554
554
|
return;
|
|
555
555
|
}
|
|
556
|
-
if (extensionWs && extensionWs.readyState !== WebSocket.OPEN) {
|
|
556
|
+
if (extensionWs && extensionWs.readyState !== WebSocket$1.OPEN) {
|
|
557
557
|
try {
|
|
558
558
|
extensionWs.terminate();
|
|
559
559
|
} catch {}
|
|
@@ -590,7 +590,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
590
590
|
clearExtensionDisconnectCleanupTimer();
|
|
591
591
|
flushExtensionReconnectWaiters(true);
|
|
592
592
|
const ping = setInterval(() => {
|
|
593
|
-
if (ws.readyState !== WebSocket.OPEN) return;
|
|
593
|
+
if (ws.readyState !== WebSocket$1.OPEN) return;
|
|
594
594
|
ws.send(JSON.stringify({ method: "ping" }));
|
|
595
595
|
}, 5e3);
|
|
596
596
|
ws.on("message", (data) => {
|
|
@@ -932,7 +932,7 @@ async function fetchOk(url, timeoutMs = 1500, init) {
|
|
|
932
932
|
}
|
|
933
933
|
async function withCdpSocket(wsUrl, fn, opts) {
|
|
934
934
|
const headers = getHeadersWithAuth(wsUrl, opts?.headers ?? {});
|
|
935
|
-
const ws = new WebSocket(wsUrl, {
|
|
935
|
+
const ws = new WebSocket$1(wsUrl, {
|
|
936
936
|
handshakeTimeout: typeof opts?.handshakeTimeoutMs === "number" && Number.isFinite(opts.handshakeTimeoutMs) ? Math.max(1, Math.floor(opts.handshakeTimeoutMs)) : 5e3,
|
|
937
937
|
...Object.keys(headers).length ? { headers } : {}
|
|
938
938
|
});
|
|
@@ -1858,7 +1858,7 @@ async function getChromeWebSocketUrl(cdpUrl, timeoutMs = 500) {
|
|
|
1858
1858
|
async function canOpenWebSocket(wsUrl, timeoutMs = 800) {
|
|
1859
1859
|
return await new Promise((resolve) => {
|
|
1860
1860
|
const headers = getHeadersWithAuth(wsUrl);
|
|
1861
|
-
const ws = new WebSocket(wsUrl, {
|
|
1861
|
+
const ws = new WebSocket$1(wsUrl, {
|
|
1862
1862
|
handshakeTimeout: timeoutMs,
|
|
1863
1863
|
...Object.keys(headers).length ? { headers } : {}
|
|
1864
1864
|
});
|