@guadskill/openclaw-proxy 2026.2.9 → 2026.2.10
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/{accounts-x7cMEV1E.js → accounts-Dx4aJi3x.js} +7 -7
- package/dist/{acp-cli-0GGdXLLK.js → acp-cli-B0GEswoT.js} +4 -4
- package/dist/{acp-cli-D1H6dacV.js → acp-cli-OHiTwyKP.js} +4 -4
- package/dist/{agent-2SW8ZCfI.js → agent-CVUy1Thi.js} +10 -10
- package/dist/{agent-DU-T91C5.js → agent-D-ZY5Ay1.js} +10 -10
- package/dist/{agent-scope-DiPc4_Q2.js → agent-scope-Bxl1Ieu_.js} +1 -1
- package/dist/{agent-scope-BUn6DjX7.js → agent-scope-C7vPz4km.js} +1 -1
- package/dist/{agent-scope-CjgJmjE6.js → agent-scope-DUR7NPNo.js} +1 -1
- package/dist/{agent-scope--25ynMc2.js → agent-scope-QnsNO5IK.js} +11 -11
- package/dist/{archive-D0z3LZDK.js → archive-1r-XD_by.js} +9 -9
- package/dist/{audit-CqsOSGgc.js → audit-DJRS7Nza.js} +8 -8
- package/dist/{audit-CLbFGfQc.js → audit-Dnyfbisl.js} +16 -16
- package/dist/{auth-health-6CQOjiY2.js → auth-health-CE7uy9mo.js} +1 -1
- package/dist/{auth-health-BA7lqVxs.js → auth-health-ov3toXHm.js} +1 -1
- package/dist/{auth-profiles-Dg1lg7TZ.js → auth-profiles-kZZY0kCW.js} +1 -1
- package/dist/build-info.json +2 -2
- package/dist/bundled/boot-md/handler.js +9 -9
- package/dist/bundled/session-memory/handler.js +9 -9
- package/dist/{call-DfFtEDcF.js → call-BUcaYa5a.js} +8 -8
- package/dist/{call-BRBaanei.js → call-D_Z9T8iV.js} +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-DxeLpgAW.js → channel-options-P2xeFf1J.js} +5 -5
- package/dist/{channel-options-lyL-8lwT.js → channel-options-oOUobhHQ.js} +3 -3
- package/dist/{channel-selection-KB-Du2K8.js → channel-selection-CmhD8GeJ.js} +1 -1
- package/dist/{channel-selection-Cm-kszg3.js → channel-selection-Dc2O9U87.js} +1 -1
- package/dist/{channels-cli-CwCvT3wp.js → channels-cli-BYZOMEVn.js} +25 -25
- package/dist/{channels-cli-D8NQgCvh.js → channels-cli-C-TQm_--.js} +36 -36
- package/dist/{channels-status-issues-CtDHK5Hb.js → channels-status-issues-CZVE---T.js} +1 -1
- package/dist/{channels-status-issues-D4zjQ5gR.js → channels-status-issues-CftEAWF4.js} +1 -1
- package/dist/{chrome-CBxye_ED.js → chrome-FITXsKSB.js} +7 -7
- package/dist/{chrome-y0SuEptk.js → chrome-No6wyyAY.js} +2 -2
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-BhOaKx0R.js → cli-98b8BoLE.js} +25 -25
- package/dist/{cli-BdLB0dU9.js → cli-9Gs7jI45.js} +21 -21
- package/dist/{command-options-BsaSCNbW.js → command-options-DFbsypaU.js} +3 -3
- package/dist/{commands-D1Vz_pbj.js → commands-DoVIOYAz.js} +3 -3
- package/dist/{completion-cli-B8UeXoAi.js → completion-cli-DBmFb2Zz.js} +27 -27
- package/dist/{completion-cli-DSp3IYfG.js → completion-cli-DrFgqXz-.js} +13 -13
- package/dist/{config-BiUz0L4n.js → config-C_ZMbYir.js} +2 -2
- package/dist/{config-DBR-pg8M.js → config-DFgdMueL.js} +2 -2
- package/dist/{config-Cq5jWpQW.js → config-NtjUezp5.js} +2 -2
- package/dist/{config-guard-BIEzm1Di.js → config-guard-B_Hef8AW.js} +34 -34
- package/dist/{config-JotyqXJB.js → config-yg3MNzIZ.js} +2 -2
- package/dist/{configure-Cec4HsdK.js → configure-BShkc6Iy.js} +8 -8
- package/dist/{configure-CupQ7QSD.js → configure-CnH4eas2.js} +10 -10
- package/dist/{control-service-CH6Bbr0T.js → control-service-CzkpRVn7.js} +4 -4
- package/dist/{control-service-YHi9oKDx.js → control-service-_2M8iCv6.js} +1 -1
- package/dist/{cron-cli-DQ37nGTc.js → cron-cli-Bkwkuduu.js} +7 -7
- package/dist/{cron-cli-BPtSqQjc.js → cron-cli-sBpc08kN.js} +6 -6
- package/dist/{daemon-cli-BwvNtNCH.js → daemon-cli-BQFZUZXG.js} +7 -7
- package/dist/{daemon-cli-ByQDMi6B.js → daemon-cli-D7bFcRv4.js} +11 -11
- package/dist/{daemon-runtime-Dg88Ac7J.js → daemon-runtime-DLtjWz00.js} +10 -10
- package/dist/{daemon-runtime-LePuvITk.js → daemon-runtime-q4XITAGg.js} +1 -1
- package/dist/{deliver-BpcYe8zG.js → deliver-BFZRT50l.js} +7 -7
- package/dist/{deliver-Dpg3LSwN.js → deliver-BRCyIScz.js} +5 -5
- package/dist/{deliver-D4rMk52D.js → deliver-BssKD-vg.js} +3 -3
- package/dist/{deliver-C9Vwdw7k.js → deliver-D_PB5CG5.js} +2 -2
- package/dist/{deps-DWlD7Lyt.js → deps-BBw98Cve.js} +2 -2
- package/dist/{deps-qtgH7RGM.js → deps-Dlhl7sML.js} +2 -2
- package/dist/{devices-cli-CcGB1MVD.js → devices-cli-3aLFbDvW.js} +4 -4
- package/dist/{devices-cli-p9SUggMY.js → devices-cli-Dn5X9lnL.js} +4 -4
- package/dist/{directory-cli-CixpfARf.js → directory-cli-Cc06wNL1.js} +5 -5
- package/dist/{directory-cli-CgKDzRjU.js → directory-cli-Dj48rao9.js} +6 -6
- package/dist/{dispatcher-DsTwmVoy.js → dispatcher-DLLOC08H.js} +1 -1
- package/dist/{dns-cli-y3RAyaeD.js → dns-cli-CugZCOE9.js} +3 -3
- package/dist/{dns-cli--ew6Hcon.js → dns-cli-kXKz4kmo.js} +3 -3
- package/dist/{docs-cli-BPPPY68C.js → docs-cli-BUeU34DD.js} +1 -1
- package/dist/{docs-cli-B8ZWuZdG.js → docs-cli-DPM7sbYQ.js} +1 -1
- package/dist/{doctor-CqYHOc7o.js → doctor-Bb0C7PCD.js} +18 -18
- package/dist/{doctor--sUBhPRM.js → doctor-C5EhTQAn.js} +33 -33
- package/dist/entry.js +1 -1
- package/dist/{exec-approvals-cli-AoKQ4upV.js → exec-approvals-cli-DTdAAPIs.js} +11 -11
- package/dist/{exec-approvals-cli-C2XQFrdV.js → exec-approvals-cli-DyvEEBBB.js} +6 -6
- package/dist/extensionAPI.js +20 -20
- package/dist/{gateway-cli-FFlyXx90.js → gateway-cli-BQvs5yMg.js} +116 -116
- package/dist/{gateway-cli-x9uFfaiq.js → gateway-cli-ClF2zEog.js} +43 -43
- package/dist/{gateway-rpc-CpSS8vbu.js → gateway-rpc-CUNihWum.js} +1 -1
- package/dist/{gateway-rpc-BUee5Dv6.js → gateway-rpc-ftABAYn5.js} +1 -1
- package/dist/{github-copilot-auth-C9U7LmQC.js → github-copilot-auth-DbUZnSyk.js} +5 -5
- package/dist/{github-copilot-auth-DhRqdPvp.js → github-copilot-auth-TxtjXx5m.js} +5 -5
- package/dist/{gmail-setup-utils-DwjED-x8.js → gmail-setup-utils-CBKE602c.js} +1 -1
- package/dist/{gmail-setup-utils-BElJpBPG.js → gmail-setup-utils-DFeZNixL.js} +1 -1
- package/dist/{health-format-BB0NTRxV.js → health-format-BOaLA7v1.js} +10 -10
- package/dist/{health-format-xY8AE8iJ.js → health-format-i1geK3KG.js} +8 -8
- package/dist/{hooks-cli-LD-Df2Bi.js → hooks-cli-BoczEJfK.js} +23 -23
- package/dist/{hooks-cli-D0QnfArE.js → hooks-cli-DoLBB8PN.js} +49 -49
- package/dist/{hooks-status-DzV884al.js → hooks-status-Dbj4IlQS.js} +1 -1
- package/dist/{hooks-status-B-1h3DT9.js → hooks-status-Dr9j7oSo.js} +1 -1
- package/dist/{image-zzNMmsKZ.js → image-CE9CeS1j.js} +3 -3
- package/dist/{image-D1s2KO45.js → image-CY3Qb62D.js} +8 -8
- package/dist/{image-A6XShsr8.js → image-Crv76CGv.js} +3 -3
- package/dist/{image-C19aQZmj.js → image-DaoVwbBU.js} +3 -3
- package/dist/index.js +44 -44
- package/dist/{installs-lwst-G4F.js → installs-CJqCIvn4.js} +18 -18
- package/dist/llm-slug-generator.js +9 -9
- package/dist/{loader-t5G-bNh2.js → loader-BNGc0TMW.js} +115 -115
- package/dist/{login-qr-dW3zLPde.js → login-qr-BJHBXw2B.js} +1 -1
- package/dist/{login-qr-fi3WTytg.js → login-qr-BoEpQD7W.js} +2 -2
- package/dist/{login-qr-zHjaf-a-.js → login-qr-CojPlIrx.js} +1 -1
- package/dist/{login-qr-zBlKORpc.js → login-qr-O0Sg-Lht.js} +1 -1
- package/dist/{logs-cli-CNG1ybOs.js → logs-cli-BkQZaLP1.js} +5 -5
- package/dist/{logs-cli-BrwNjHyP.js → logs-cli-DbqvSWfV.js} +5 -5
- package/dist/{manager-BG8ogneZ.js → manager-BLQprOme.js} +3 -3
- package/dist/{manager-D1OOirj8.js → manager-DBEZGESO.js} +2 -2
- package/dist/{manager-CdFcVnZR.js → manager-DLK8bAAA.js} +15 -15
- package/dist/{manager-Bctrvc9j.js → manager-DQXILjKz.js} +2 -2
- package/dist/{model-auth-DisTMlNO.js → model-auth-B3m7mkvr.js} +1 -1
- package/dist/{model-selection-GZFHUD7x.js → model-selection-9N1nn0U_.js} +1 -1
- package/dist/{model-selection-Dcc6YSVW.js → model-selection-BqJ7D4pt.js} +1 -1
- package/dist/{models-cli-B2zLu81b.js → models-cli-DKJ429Km.js} +23 -23
- package/dist/{models-cli-DAT-ArET.js → models-cli-tBSLfpEB.js} +30 -30
- package/dist/{node-cli-ClBB_NxA.js → node-cli-az-8UhFP.js} +20 -20
- package/dist/{node-cli-etrHRm1x.js → node-cli-xTfEqY2t.js} +7 -7
- package/dist/{node-service-BDoNNRp-.js → node-service-CkPOvRv0.js} +1 -1
- package/dist/{nodes-cli-BaBGaJqV.js → nodes-cli-DfTrE8mE.js} +8 -8
- package/dist/{nodes-cli-CGt1ECiI.js → nodes-cli-U9s_odmo.js} +5 -5
- package/dist/{nodes-screen-DGlNPbk4.js → nodes-screen-DufGlxX3.js} +2 -2
- package/dist/{onboard-channels-CCcLnNq7.js → onboard-channels-B12vl_Fz.js} +5 -5
- package/dist/{onboard-channels-BTsEmF84.js → onboard-channels-Bi5gN7Cg.js} +4 -4
- package/dist/{onboard-skills-DTqkozry.js → onboard-skills-Cli5aapW.js} +9 -9
- package/dist/{onboard-skills-COOhVMtI.js → onboard-skills-bQdrzd5W.js} +8 -8
- package/dist/{onboarding-B_hfq1-Z.js → onboarding-o9D1SpDa.js} +20 -20
- package/dist/{openclaw-root-93W6UrUK.js → openclaw-root-BTW4x2Wd.js} +1 -1
- package/dist/{openclaw-root-9ILYSmJ9.js → openclaw-root-zKi4apQH.js} +3 -3
- package/dist/{pairing-cli-IMM6zTxT.js → pairing-cli-ByfGNmaZ.js} +7 -7
- package/dist/{pairing-cli-A-97MaNg.js → pairing-cli-C_IQMrN0.js} +6 -6
- package/dist/{pairing-labels-Bb4yiJHg.js → pairing-labels-B6MQ_Hha.js} +1 -1
- package/dist/{pairing-labels-DP5H8gf6.js → pairing-labels-B6ViJi8r.js} +1 -1
- package/dist/{pairing-store-DnhpK1SH.js → pairing-store-Cc67v-m7.js} +1 -1
- package/dist/{pairing-store-DiCaUGXP.js → pairing-store-DKhgYwjg.js} +1 -1
- package/dist/{paths-fJtAVDc0.js → paths-BifbScbU.js} +1 -1
- package/dist/{pi-embedded-DQydpubI.js → pi-embedded-DPQwlpO6.js} +15 -15
- package/dist/{pi-embedded-helpers-BJ-cu3iK.js → pi-embedded-helpers-CcE0hKxw.js} +8 -8
- package/dist/{pi-embedded-helpers-4Lpm0TfW.js → pi-embedded-helpers-DwhRDCwp.js} +2 -2
- package/dist/{pi-embedded-helpers-B8LSSkHe.js → pi-embedded-helpers-Z2gqd4I2.js} +3 -3
- package/dist/{pi-embedded-helpers-DadKWPQE.js → pi-embedded-helpers-n7o6YJmY.js} +6 -6
- package/dist/{pi-tools.policy-DLLm-j7M.js → pi-tools.policy-CiKYFXrw.js} +3 -3
- package/dist/{plugin-auto-enable-B78nMu3L.js → plugin-auto-enable-CTA5rOU5.js} +1 -1
- package/dist/{plugin-auto-enable-Arz-7wiT.js → plugin-auto-enable-CrzdP1Nz.js} +2 -2
- package/dist/{plugins-CRUvG4uT.js → plugins-CO1rgH0r.js} +1 -1
- package/dist/{plugins-cli-CjpTlFhI.js → plugins-cli-BKilQedx.js} +22 -22
- package/dist/{plugins-cli-DrQ1Deuw.js → plugins-cli-CkZgCEVA.js} +30 -30
- package/dist/{plugins-U0QQZWlW.js → plugins-ia9SOGpI.js} +1 -1
- package/dist/{ports-BcNVanDX.js → ports-DbnuiZZO.js} +1 -1
- package/dist/{program-CDSRl7eR.js → program-3AvELN6H.js} +58 -58
- package/dist/{pw-ai-Bpd-iaBB.js → pw-ai-BOyUF0Kj.js} +4 -4
- package/dist/{pw-ai-C3QEyFGj.js → pw-ai-kZMIzSdQ.js} +1 -1
- package/dist/{qmd-manager-DZhFcVTt.js → qmd-manager-BM5DP4s8.js} +1 -1
- package/dist/{qmd-manager-CjTG-nW_.js → qmd-manager-BRXyEw0a.js} +19 -19
- package/dist/{qmd-manager-qe1SLQy3.js → qmd-manager-CWFe938c.js} +1 -1
- package/dist/{qmd-manager-D4W1VfWC.js → qmd-manager-h50GTfkl.js} +2 -2
- package/dist/{register.subclis-COUZSGkI.js → register.subclis-gkkP8-Yx.js} +28 -28
- package/dist/{reply-CcYZSt6t.js → reply-CH7VZ1jT.js} +28 -28
- package/dist/{routes-CnhRELg3.js → routes-BUDqG0bE.js} +17 -17
- package/dist/{routes-Sj0W9JUC.js → routes-dtswuSI-.js} +1 -1
- package/dist/{rpc-wf5KzhJ_.js → rpc-BeN1YXM7.js} +1 -1
- package/dist/{rpc-BlzExEft.js → rpc-CUy4VHNF.js} +1 -1
- package/dist/{run-main-CadL0LaU.js → run-main-DM5TUpMe.js} +60 -60
- package/dist/{sandbox-CXXC0AOA.js → sandbox-D889a-F8.js} +21 -21
- package/dist/{sandbox-cli-B-c6pLqW.js → sandbox-cli-BNvoe8W3.js} +10 -10
- package/dist/{sandbox-cli-CEQpi4Wb.js → sandbox-cli-DACJb2g8.js} +7 -7
- package/dist/{sandbox-BR9JVXBT.js → sandbox-nFkFFEb7.js} +5 -5
- package/dist/{security-cli-MV9q0KXT.js → security-cli-DvqT9LWk.js} +11 -11
- package/dist/{security-cli-CxnkY7T2.js → security-cli-m_PAeVLY.js} +21 -21
- package/dist/{server-context-B0LbMz_e.js → server-context-qxpb5Ln6.js} +4 -4
- package/dist/{server-node-events-ClBp_ky8.js → server-node-events-Cb6KgBy9.js} +23 -23
- package/dist/{server-node-events-DZQVhZjc.js → server-node-events-Cz7z8PCq.js} +27 -27
- package/dist/{service-DQwKxszE.js → service-CJ_9zG2c.js} +15 -15
- package/dist/{service-audit-D6Jk8jFU.js → service-audit-CURwIRFh.js} +13 -13
- package/dist/{service-audit-JR0RZ8xC.js → service-audit-DtmRGU4O.js} +1 -1
- package/dist/{shared-C_dY3J1K.js → shared-BFnl2Cjh.js} +1 -1
- package/dist/{shared-DN6M8u_S.js → shared-CXK7Zt_F.js} +1 -1
- package/dist/{skill-scanner-C_fQzVDu.js → skill-scanner-BT7PBklM.js} +5 -5
- package/dist/{skills-C1QRKLvh.js → skills-Cgy3X3tK.js} +1 -1
- package/dist/{skills-cli-DDTkkerI.js → skills-cli-B2zxU_2n.js} +5 -5
- package/dist/{skills-cli-DbqgzF80.js → skills-cli-Bg8bkl9E.js} +5 -5
- package/dist/{skills-status-GulhEBnV.js → skills-status-8m5p33dD.js} +1 -1
- package/dist/{skills-status-C_QDsl6j.js → skills-status-BA2DOmHk.js} +1 -1
- package/dist/{skills-CwXLq-nk.js → skills-w-kwwPb2.js} +1 -1
- package/dist/{sqlite-DODNHWJb.js → sqlite-DmufeXxk.js} +8 -8
- package/dist/{status-Y2KMsWuk.js → status-BX5HXftW.js} +3 -3
- package/dist/{status-CErwIaup.js → status-Bcl2H-Cb.js} +31 -31
- package/dist/{status-CtFS7XRr.js → status-CTMeUEYd.js} +3 -3
- package/dist/{system-cli-C0JWELUD.js → system-cli-BzCBKn-l.js} +5 -5
- package/dist/{system-cli-BVweBOhJ.js → system-cli-C886Ufmu.js} +5 -5
- package/dist/{systemd-aL_mEluy.js → systemd-D8TmVYdf.js} +5 -5
- package/dist/{systemd-linger-CEPF4JN6.js → systemd-linger-C57Dz7hA.js} +1 -1
- package/dist/{tui-B9ggfGhy.js → tui-B8ryM4-q.js} +5 -5
- package/dist/{tui-C_gTxPke.js → tui-DMtfTPeq.js} +5 -5
- package/dist/{tui-cli-Zj_x6Bvj.js → tui-cli-BBTZ6Uea.js} +14 -14
- package/dist/{tui-cli-CYc8ZHxI.js → tui-cli-CainEme8.js} +11 -11
- package/dist/{tui-formatters-C1oQXn1l.js → tui-formatters-6nR_zzUg.js} +3 -3
- package/dist/{tui-formatters-CCOWLfCX.js → tui-formatters-Cmrdmcx8.js} +3 -3
- package/dist/{update-C-9KsS1m.js → update-DkJ6rvG7.js} +3 -3
- package/dist/{update-cli-ClAzvLLE.js → update-cli-B44pCOmM.js} +34 -34
- package/dist/{update-cli-Cyh2BgJf.js → update-cli-CeCOtfHd.js} +53 -53
- package/dist/{update-runner-BT3WGHmf.js → update-runner-BZsT7ZyA.js} +6 -6
- package/dist/{update-runner-Br_pa9Xw.js → update-runner-CkoLrD4r.js} +25 -25
- package/dist/{webhooks-cli-Ch9h1RT2.js → webhooks-cli-BH_Y2RXv.js} +5 -5
- package/dist/{webhooks-cli-DBWL77uP.js → webhooks-cli-DZaS4YoE.js} +5 -5
- package/dist/{wsl-CtSDIi51.js → wsl-C-eVEqs4.js} +3 -3
- package/package.json +1 -1
- package/dist/control-ui/apple-touch-icon.png +0 -0
- package/dist/control-ui/assets/index-BeKTXH1m.js +0 -7601
- package/dist/control-ui/assets/index-BeKTXH1m.js.map +0 -1
- package/dist/control-ui/assets/index-DWhx-9JL.css +0 -1
- package/dist/control-ui/favicon-32.png +0 -0
- package/dist/control-ui/favicon.ico +0 -0
- package/dist/control-ui/favicon.svg +0 -22
- package/dist/control-ui/index.html +0 -17
|
@@ -3,7 +3,7 @@ import { c as normalizeAccountId, t as DEFAULT_ACCOUNT_ID } from "./session-key-
|
|
|
3
3
|
import { p as jidToE164, v as resolveUserPath } from "./utils-Bx1WKTCk.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs";
|
|
6
|
-
import
|
|
6
|
+
import fsPromises from "node:fs/promises";
|
|
7
7
|
|
|
8
8
|
//#region src/web/auth-store.ts
|
|
9
9
|
function resolveDefaultWebAuthDir() {
|
|
@@ -56,14 +56,14 @@ async function webAuthExists(authDir = resolveDefaultWebAuthDir()) {
|
|
|
56
56
|
maybeRestoreCredsFromBackup(resolvedAuthDir);
|
|
57
57
|
const credsPath = resolveWebCredsPath(resolvedAuthDir);
|
|
58
58
|
try {
|
|
59
|
-
await
|
|
59
|
+
await fsPromises.access(resolvedAuthDir);
|
|
60
60
|
} catch {
|
|
61
61
|
return false;
|
|
62
62
|
}
|
|
63
63
|
try {
|
|
64
|
-
const stats = await
|
|
64
|
+
const stats = await fsPromises.stat(credsPath);
|
|
65
65
|
if (!stats.isFile() || stats.size <= 1) return false;
|
|
66
|
-
const raw = await
|
|
66
|
+
const raw = await fsPromises.readFile(credsPath, "utf-8");
|
|
67
67
|
JSON.parse(raw);
|
|
68
68
|
return true;
|
|
69
69
|
} catch {
|
|
@@ -71,7 +71,7 @@ async function webAuthExists(authDir = resolveDefaultWebAuthDir()) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
async function clearLegacyBaileysAuthState(authDir) {
|
|
74
|
-
const entries = await
|
|
74
|
+
const entries = await fsPromises.readdir(authDir, { withFileTypes: true });
|
|
75
75
|
const shouldDelete = (name) => {
|
|
76
76
|
if (name === "oauth.json") return false;
|
|
77
77
|
if (name === "creds.json" || name === "creds.json.bak") return true;
|
|
@@ -81,7 +81,7 @@ async function clearLegacyBaileysAuthState(authDir) {
|
|
|
81
81
|
await Promise.all(entries.map(async (entry) => {
|
|
82
82
|
if (!entry.isFile()) return;
|
|
83
83
|
if (!shouldDelete(entry.name)) return;
|
|
84
|
-
await
|
|
84
|
+
await fsPromises.rm(path.join(authDir, entry.name), { force: true });
|
|
85
85
|
}));
|
|
86
86
|
}
|
|
87
87
|
async function logoutWeb(params) {
|
|
@@ -92,7 +92,7 @@ async function logoutWeb(params) {
|
|
|
92
92
|
return false;
|
|
93
93
|
}
|
|
94
94
|
if (params.isLegacyAuthDir) await clearLegacyBaileysAuthState(resolvedAuthDir);
|
|
95
|
-
else await
|
|
95
|
+
else await fsPromises.rm(resolvedAuthDir, {
|
|
96
96
|
recursive: true,
|
|
97
97
|
force: true
|
|
98
98
|
});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { k as theme, p as defaultRuntime } from "./entry.js";
|
|
2
|
-
import "./auth-profiles-
|
|
2
|
+
import "./auth-profiles-kZZY0kCW.js";
|
|
3
3
|
import "./utils-Bx1WKTCk.js";
|
|
4
4
|
import "./exec-B8JKbXKW.js";
|
|
5
|
-
import "./agent-scope
|
|
5
|
+
import "./agent-scope-QnsNO5IK.js";
|
|
6
6
|
import "./github-copilot-token-SLWintYd.js";
|
|
7
|
-
import { i as loadConfig, j as VERSION } from "./config-
|
|
7
|
+
import { i as loadConfig, j as VERSION } from "./config-DFgdMueL.js";
|
|
8
8
|
import "./manifest-registry-C_FL6H2P.js";
|
|
9
9
|
import { t as ensureOpenClawCliOnPath } from "./path-env-CXWUFfFv.js";
|
|
10
10
|
import "./tailscale-DU6DgqVy.js";
|
|
11
11
|
import { i as resolveGatewayAuth } from "./auth-5C498YKH.js";
|
|
12
12
|
import { t as GatewayClient } from "./client-BCOZgvlo.js";
|
|
13
|
-
import { t as buildGatewayConnectionDetails } from "./call-
|
|
13
|
+
import { t as buildGatewayConnectionDetails } from "./call-BUcaYa5a.js";
|
|
14
14
|
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-BlgPSDAh.js";
|
|
15
15
|
import { t as isMainModule } from "./is-main-qJ675wPV.js";
|
|
16
16
|
import { t as formatDocsLink } from "./links-CSYf2PwL.js";
|
|
@@ -2,16 +2,16 @@ import "./paths-DVBShlw6.js";
|
|
|
2
2
|
import { R as theme, c as defaultRuntime } from "./subsystem-DPnkvS73.js";
|
|
3
3
|
import "./utils-DMuwyz_q.js";
|
|
4
4
|
import "./exec-DFOtZbI0.js";
|
|
5
|
-
import "./agent-scope-
|
|
6
|
-
import "./model-selection-
|
|
5
|
+
import "./agent-scope-C7vPz4km.js";
|
|
6
|
+
import "./model-selection-9N1nn0U_.js";
|
|
7
7
|
import "./github-copilot-token-BW-SEg7E.js";
|
|
8
8
|
import "./boolean-BgXe2hyu.js";
|
|
9
9
|
import "./env-B5YXooWp.js";
|
|
10
|
-
import { i as loadConfig, j as VERSION } from "./config-
|
|
10
|
+
import { i as loadConfig, j as VERSION } from "./config-yg3MNzIZ.js";
|
|
11
11
|
import "./manifest-registry-BMwHTztn.js";
|
|
12
12
|
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-CHRYQtAM.js";
|
|
13
13
|
import { t as GatewayClient } from "./client-56cv8SiG.js";
|
|
14
|
-
import { t as buildGatewayConnectionDetails } from "./call-
|
|
14
|
+
import { t as buildGatewayConnectionDetails } from "./call-D_Z9T8iV.js";
|
|
15
15
|
import { t as formatDocsLink } from "./links-BPnP7NBH.js";
|
|
16
16
|
import "./tailscale-CAxaFrEP.js";
|
|
17
17
|
import { t as isMainModule } from "./is-main-iERzpHyZ.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { c as defaultRuntime, h as DEFAULT_CHAT_CHANNEL } from "./subsystem-DPnkvS73.js";
|
|
2
|
-
import { H as normalizeThinkLevel, I as formatThinkingLevels, K as supportsXHighThinking, L as formatXHighModelHint, W as normalizeVerboseLevel } from "./pi-embedded-helpers-
|
|
3
|
-
import { $t as getSkillsSnapshotVersion, Bt as getRemoteSkillEligibility, Cr as applyModelOverrideToSessionEntry, In as registerAgentRunContext, L as runWithModelFallback, M as resolveOutboundTarget, Mn as clearAgentRunContext, N as resolveSessionDeliveryTarget, Nn as emitAgentEvent, Sr as clearSessionAuthProfileOverride, Wr as resolveAgentTimeoutMs, i as runCliAgent, jn as AGENT_LANE_NESTED, kr as loadModelCatalog, l as runEmbeddedPiAgent, n as getCliSessionId, r as setCliSessionId, s as resolveSendPolicy, wr as applyVerboseOverride, xr as lookupContextTokens } from "./reply-
|
|
2
|
+
import { H as normalizeThinkLevel, I as formatThinkingLevels, K as supportsXHighThinking, L as formatXHighModelHint, W as normalizeVerboseLevel } from "./pi-embedded-helpers-DwhRDCwp.js";
|
|
3
|
+
import { $t as getSkillsSnapshotVersion, Bt as getRemoteSkillEligibility, Cr as applyModelOverrideToSessionEntry, In as registerAgentRunContext, L as runWithModelFallback, M as resolveOutboundTarget, Mn as clearAgentRunContext, N as resolveSessionDeliveryTarget, Nn as emitAgentEvent, Sr as clearSessionAuthProfileOverride, Wr as resolveAgentTimeoutMs, i as runCliAgent, jn as AGENT_LANE_NESTED, kr as loadModelCatalog, l as runEmbeddedPiAgent, n as getCliSessionId, r as setCliSessionId, s as resolveSendPolicy, wr as applyVerboseOverride, xr as lookupContextTokens } from "./reply-CH7VZ1jT.js";
|
|
4
4
|
import { d as resolveAgentIdFromSessionKey, l as normalizeAgentId, u as normalizeMainKey } from "./session-key-CUWZSMYQ.js";
|
|
5
|
-
import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, x as ensureAgentWorkspace } from "./agent-scope-
|
|
6
|
-
import { Dt as DEFAULT_MODEL, Et as DEFAULT_CONTEXT_TOKENS, Ot as DEFAULT_PROVIDER, a as isCliProvider, d as resolveConfiguredModelRef, h as resolveThinkingDefault, ht as ensureAuthProfileStore, o as modelKey, t as buildAllowedModelSet } from "./model-selection-
|
|
5
|
+
import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, x as ensureAgentWorkspace } from "./agent-scope-C7vPz4km.js";
|
|
6
|
+
import { Dt as DEFAULT_MODEL, Et as DEFAULT_CONTEXT_TOKENS, Ot as DEFAULT_PROVIDER, a as isCliProvider, d as resolveConfiguredModelRef, h as resolveThinkingDefault, ht as ensureAuthProfileStore, o as modelKey, t as buildAllowedModelSet } from "./model-selection-9N1nn0U_.js";
|
|
7
7
|
import { t as formatCliCommand } from "./command-format-ChfKqObn.js";
|
|
8
|
-
import { i as loadConfig } from "./config-
|
|
9
|
-
import { r as normalizeChannelId, t as getChannelPlugin } from "./plugins-
|
|
10
|
-
import { A as resolveSessionResetPolicy, D as resolveSessionKey, I as resolveExplicitAgentSessionKey, O as evaluateSessionFreshness, T as normalizeAccountId, d as loadSessionStore, g as updateSessionStore, j as resolveSessionResetType, k as resolveChannelResetConfig } from "./sandbox-
|
|
11
|
-
import { r as buildWorkspaceSkillSnapshot } from "./skills-
|
|
8
|
+
import { i as loadConfig } from "./config-yg3MNzIZ.js";
|
|
9
|
+
import { r as normalizeChannelId, t as getChannelPlugin } from "./plugins-ia9SOGpI.js";
|
|
10
|
+
import { A as resolveSessionResetPolicy, D as resolveSessionKey, I as resolveExplicitAgentSessionKey, O as evaluateSessionFreshness, T as normalizeAccountId, d as loadSessionStore, g as updateSessionStore, j as resolveSessionResetType, k as resolveChannelResetConfig } from "./sandbox-nFkFFEb7.js";
|
|
11
|
+
import { r as buildWorkspaceSkillSnapshot } from "./skills-Cgy3X3tK.js";
|
|
12
12
|
import { a as isInternalMessageChannel, d as resolveMessageChannel, i as isGatewayMessageChannel, l as normalizeMessageChannel, n as isDeliverableMessageChannel, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-CHRYQtAM.js";
|
|
13
13
|
import { n as resolveSessionFilePath, o as resolveStorePath } from "./paths-CLkhFRsq.js";
|
|
14
|
-
import { a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "./deliver-
|
|
14
|
+
import { a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "./deliver-BRCyIScz.js";
|
|
15
15
|
import { l as deriveSessionTotalTokens, u as hasNonzeroUsage } from "./session-cost-usage-j9RNOPvV.js";
|
|
16
|
-
import { t as createDefaultDeps } from "./deps-
|
|
16
|
+
import { t as createDefaultDeps } from "./deps-Dlhl7sML.js";
|
|
17
17
|
import crypto from "node:crypto";
|
|
18
18
|
|
|
19
19
|
//#region src/cli/outbound-send-deps.ts
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { $ as DEFAULT_CHAT_CHANNEL, p as defaultRuntime } from "./entry.js";
|
|
2
|
-
import { C as buildAllowedModelSet, Ct as DEFAULT_CONTEXT_TOKENS, D as isCliProvider, L as resolveThinkingDefault, N as resolveConfiguredModelRef, O as modelKey, Tt as DEFAULT_PROVIDER, _ as ensureAuthProfileStore, wt as DEFAULT_MODEL } from "./auth-profiles-
|
|
2
|
+
import { C as buildAllowedModelSet, Ct as DEFAULT_CONTEXT_TOKENS, D as isCliProvider, L as resolveThinkingDefault, N as resolveConfiguredModelRef, O as modelKey, Tt as DEFAULT_PROVIDER, _ as ensureAuthProfileStore, wt as DEFAULT_MODEL } from "./auth-profiles-kZZY0kCW.js";
|
|
3
3
|
import { t as formatCliCommand } from "./command-format-ayFsmwwz.js";
|
|
4
4
|
import { d as resolveAgentIdFromSessionKey, l as normalizeAgentId, u as normalizeMainKey } from "./session-key-BRdRr5Ah.js";
|
|
5
|
-
import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, x as ensureAgentWorkspace } from "./agent-scope
|
|
6
|
-
import { i as loadConfig } from "./config-
|
|
5
|
+
import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, x as ensureAgentWorkspace } from "./agent-scope-QnsNO5IK.js";
|
|
6
|
+
import { i as loadConfig } from "./config-DFgdMueL.js";
|
|
7
7
|
import { a as isInternalMessageChannel, d as resolveMessageChannel, i as isGatewayMessageChannel, l as normalizeMessageChannel, n as isDeliverableMessageChannel, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-BlgPSDAh.js";
|
|
8
|
-
import { r as normalizeChannelId, t as getChannelPlugin } from "./plugins-
|
|
9
|
-
import { Bt as resolveAgentTimeoutMs, Cn as resolveOutboundTarget, Gt as registerAgentRunContext, H as getCliSessionId, Ht as emitAgentEvent, J as getRemoteSkillEligibility, Jt as AGENT_LANE_NESTED, On as runWithModelFallback, Ot as runEmbeddedPiAgent, U as setCliSessionId, Vt as clearAgentRunContext, W as runCliAgent, Xt as applyModelOverrideToSessionEntry, Yt as loadModelCatalog, lt as clearSessionAuthProfileOverride, mn as lookupContextTokens, q as resolveSendPolicy, st as getSkillsSnapshotVersion, ut as applyVerboseOverride, wn as resolveSessionDeliveryTarget } from "./loader-
|
|
8
|
+
import { r as normalizeChannelId, t as getChannelPlugin } from "./plugins-CO1rgH0r.js";
|
|
9
|
+
import { Bt as resolveAgentTimeoutMs, Cn as resolveOutboundTarget, Gt as registerAgentRunContext, H as getCliSessionId, Ht as emitAgentEvent, J as getRemoteSkillEligibility, Jt as AGENT_LANE_NESTED, On as runWithModelFallback, Ot as runEmbeddedPiAgent, U as setCliSessionId, Vt as clearAgentRunContext, W as runCliAgent, Xt as applyModelOverrideToSessionEntry, Yt as loadModelCatalog, lt as clearSessionAuthProfileOverride, mn as lookupContextTokens, q as resolveSendPolicy, st as getSkillsSnapshotVersion, ut as applyVerboseOverride, wn as resolveSessionDeliveryTarget } from "./loader-BNGc0TMW.js";
|
|
10
10
|
import { n as resolveSessionFilePath, o as resolveStorePath } from "./paths-C27OFaz1.js";
|
|
11
|
-
import { B as normalizeThinkLevel, F as formatXHighModelHint, H as normalizeVerboseLevel, P as formatThinkingLevels, W as supportsXHighThinking } from "./pi-embedded-helpers-
|
|
12
|
-
import { a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "./deliver-
|
|
13
|
-
import { A as resolveSessionResetType, D as evaluateSessionFreshness, E as resolveSessionKey, F as resolveExplicitAgentSessionKey, O as resolveChannelResetConfig, T as normalizeAccountId, d as loadSessionStore, g as updateSessionStore, k as resolveSessionResetPolicy } from "./sandbox-
|
|
14
|
-
import { r as buildWorkspaceSkillSnapshot } from "./skills-
|
|
11
|
+
import { B as normalizeThinkLevel, F as formatXHighModelHint, H as normalizeVerboseLevel, P as formatThinkingLevels, W as supportsXHighThinking } from "./pi-embedded-helpers-n7o6YJmY.js";
|
|
12
|
+
import { a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "./deliver-BFZRT50l.js";
|
|
13
|
+
import { A as resolveSessionResetType, D as evaluateSessionFreshness, E as resolveSessionKey, F as resolveExplicitAgentSessionKey, O as resolveChannelResetConfig, T as normalizeAccountId, d as loadSessionStore, g as updateSessionStore, k as resolveSessionResetPolicy } from "./sandbox-D889a-F8.js";
|
|
14
|
+
import { r as buildWorkspaceSkillSnapshot } from "./skills-w-kwwPb2.js";
|
|
15
15
|
import { l as deriveSessionTotalTokens, u as hasNonzeroUsage } from "./session-cost-usage-LOtSLoh7.js";
|
|
16
|
-
import { t as createDefaultDeps } from "./deps-
|
|
16
|
+
import { t as createDefaultDeps } from "./deps-BBw98Cve.js";
|
|
17
17
|
import crypto from "node:crypto";
|
|
18
18
|
|
|
19
19
|
//#region src/cli/outbound-send-deps.ts
|
|
@@ -173,7 +173,7 @@ function resolveThreadSessionKeys(params) {
|
|
|
173
173
|
|
|
174
174
|
//#endregion
|
|
175
175
|
//#region src/infra/openclaw-root.ts
|
|
176
|
-
const CORE_PACKAGE_NAMES = new Set(["openclaw"]);
|
|
176
|
+
const CORE_PACKAGE_NAMES = new Set(["openclaw", "@guadskill/openclaw-proxy"]);
|
|
177
177
|
async function readPackageName(dir) {
|
|
178
178
|
try {
|
|
179
179
|
const raw = await fs$1.readFile(path.join(dir, "package.json"), "utf-8");
|
|
@@ -2,7 +2,7 @@ import { g as resolveStateDir, y as resolveRequiredHomeDir } from "./paths-DVBSh
|
|
|
2
2
|
import { y as resolveUserPath } from "./utils-DMuwyz_q.js";
|
|
3
3
|
import { _ as isSubagentSessionKey, l as normalizeAgentId, n as DEFAULT_AGENT_ID, v as parseAgentSessionKey } from "./session-key-CUWZSMYQ.js";
|
|
4
4
|
import { t as runCommandWithTimeout } from "./exec-DFOtZbI0.js";
|
|
5
|
-
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-
|
|
5
|
+
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-BTW4x2Wd.js";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import os from "node:os";
|
|
8
8
|
import path from "node:path";
|
|
@@ -9,7 +9,7 @@ import fs$1 from "node:fs";
|
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
10
|
|
|
11
11
|
//#region src/infra/openclaw-root.ts
|
|
12
|
-
const CORE_PACKAGE_NAMES = new Set(["openclaw"]);
|
|
12
|
+
const CORE_PACKAGE_NAMES = new Set(["openclaw", "@guadskill/openclaw-proxy"]);
|
|
13
13
|
async function readPackageName(dir) {
|
|
14
14
|
try {
|
|
15
15
|
const raw = await fs.readFile(path.join(dir, "package.json"), "utf-8");
|
|
@@ -2,10 +2,10 @@ import { X as resolveStateDir, pt as resolveRequiredHomeDir } from "./entry.js";
|
|
|
2
2
|
import { _ as isSubagentSessionKey, l as normalizeAgentId, n as DEFAULT_AGENT_ID, v as parseAgentSessionKey } from "./session-key-BRdRr5Ah.js";
|
|
3
3
|
import { v as resolveUserPath } from "./utils-Bx1WKTCk.js";
|
|
4
4
|
import { t as runCommandWithTimeout } from "./exec-B8JKbXKW.js";
|
|
5
|
-
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-
|
|
5
|
+
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-zKi4apQH.js";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import os from "node:os";
|
|
8
|
-
import
|
|
8
|
+
import fsPromises from "node:fs/promises";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
10
|
|
|
11
11
|
//#region src/agents/workspace-templates.ts
|
|
@@ -14,7 +14,7 @@ let cachedTemplateDir;
|
|
|
14
14
|
let resolvingTemplateDir;
|
|
15
15
|
async function pathExists(candidate) {
|
|
16
16
|
try {
|
|
17
|
-
await
|
|
17
|
+
await fsPromises.access(candidate);
|
|
18
18
|
return true;
|
|
19
19
|
} catch {
|
|
20
20
|
return false;
|
|
@@ -82,14 +82,14 @@ async function loadTemplate(name) {
|
|
|
82
82
|
const templateDir = await resolveWorkspaceTemplateDir();
|
|
83
83
|
const templatePath = path.join(templateDir, name);
|
|
84
84
|
try {
|
|
85
|
-
return stripFrontMatter(await
|
|
85
|
+
return stripFrontMatter(await fsPromises.readFile(templatePath, "utf-8"));
|
|
86
86
|
} catch {
|
|
87
87
|
throw new Error(`Missing workspace template: ${name} (${templatePath}). Ensure docs/reference/templates are packaged.`);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
async function writeFileIfMissing(filePath, content) {
|
|
91
91
|
try {
|
|
92
|
-
await
|
|
92
|
+
await fsPromises.writeFile(filePath, content, {
|
|
93
93
|
encoding: "utf-8",
|
|
94
94
|
flag: "wx"
|
|
95
95
|
});
|
|
@@ -99,7 +99,7 @@ async function writeFileIfMissing(filePath, content) {
|
|
|
99
99
|
}
|
|
100
100
|
async function hasGitRepo(dir) {
|
|
101
101
|
try {
|
|
102
|
-
await
|
|
102
|
+
await fsPromises.stat(path.join(dir, ".git"));
|
|
103
103
|
return true;
|
|
104
104
|
} catch {
|
|
105
105
|
return false;
|
|
@@ -125,7 +125,7 @@ async function ensureGitRepo(dir, isBrandNewWorkspace) {
|
|
|
125
125
|
}
|
|
126
126
|
async function ensureAgentWorkspace(params) {
|
|
127
127
|
const dir = resolveUserPath(params?.dir?.trim() ? params.dir.trim() : DEFAULT_AGENT_WORKSPACE_DIR);
|
|
128
|
-
await
|
|
128
|
+
await fsPromises.mkdir(dir, { recursive: true });
|
|
129
129
|
if (!params?.ensureBootstrapFiles) return { dir };
|
|
130
130
|
const agentsPath = path.join(dir, DEFAULT_AGENTS_FILENAME);
|
|
131
131
|
const soulPath = path.join(dir, DEFAULT_SOUL_FILENAME);
|
|
@@ -145,7 +145,7 @@ async function ensureAgentWorkspace(params) {
|
|
|
145
145
|
];
|
|
146
146
|
return (await Promise.all(paths.map(async (p) => {
|
|
147
147
|
try {
|
|
148
|
-
await
|
|
148
|
+
await fsPromises.access(p);
|
|
149
149
|
return true;
|
|
150
150
|
} catch {
|
|
151
151
|
return false;
|
|
@@ -184,7 +184,7 @@ async function resolveMemoryBootstrapEntries(resolvedDir) {
|
|
|
184
184
|
for (const name of candidates) {
|
|
185
185
|
const filePath = path.join(resolvedDir, name);
|
|
186
186
|
try {
|
|
187
|
-
await
|
|
187
|
+
await fsPromises.access(filePath);
|
|
188
188
|
entries.push({
|
|
189
189
|
name,
|
|
190
190
|
filePath
|
|
@@ -197,7 +197,7 @@ async function resolveMemoryBootstrapEntries(resolvedDir) {
|
|
|
197
197
|
for (const entry of entries) {
|
|
198
198
|
let key = entry.filePath;
|
|
199
199
|
try {
|
|
200
|
-
key = await
|
|
200
|
+
key = await fsPromises.realpath(entry.filePath);
|
|
201
201
|
} catch {}
|
|
202
202
|
if (seen.has(key)) continue;
|
|
203
203
|
seen.add(key);
|
|
@@ -240,7 +240,7 @@ async function loadWorkspaceBootstrapFiles(dir) {
|
|
|
240
240
|
entries.push(...await resolveMemoryBootstrapEntries(resolvedDir));
|
|
241
241
|
const result = [];
|
|
242
242
|
for (const entry of entries) try {
|
|
243
|
-
const content = await
|
|
243
|
+
const content = await fsPromises.readFile(entry.filePath, "utf-8");
|
|
244
244
|
result.push({
|
|
245
245
|
name: entry.name,
|
|
246
246
|
path: entry.filePath,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import
|
|
2
|
+
import fsPromises from "node:fs/promises";
|
|
3
3
|
import JSZip from "jszip";
|
|
4
4
|
import * as tar from "tar";
|
|
5
5
|
|
|
@@ -18,9 +18,9 @@ function resolveArchiveKind(filePath) {
|
|
|
18
18
|
async function resolvePackedRootDir(extractDir) {
|
|
19
19
|
const direct = path.join(extractDir, "package");
|
|
20
20
|
try {
|
|
21
|
-
if ((await
|
|
21
|
+
if ((await fsPromises.stat(direct)).isDirectory()) return direct;
|
|
22
22
|
} catch {}
|
|
23
|
-
const dirs = (await
|
|
23
|
+
const dirs = (await fsPromises.readdir(extractDir, { withFileTypes: true })).filter((entry) => entry.isDirectory()).map((entry) => entry.name);
|
|
24
24
|
if (dirs.length !== 1) throw new Error(`unexpected archive layout (dirs: ${dirs.join(", ")})`);
|
|
25
25
|
const onlyDir = dirs[0];
|
|
26
26
|
if (!onlyDir) throw new Error("unexpected archive layout (no package dir found)");
|
|
@@ -37,7 +37,7 @@ async function withTimeout(promise, timeoutMs, label) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
async function extractZip(params) {
|
|
40
|
-
const buffer = await
|
|
40
|
+
const buffer = await fsPromises.readFile(params.archivePath);
|
|
41
41
|
const zip = await JSZip.loadAsync(buffer);
|
|
42
42
|
const entries = Object.values(zip.files);
|
|
43
43
|
for (const entry of entries) {
|
|
@@ -45,14 +45,14 @@ async function extractZip(params) {
|
|
|
45
45
|
if (!entryPath || entryPath.endsWith("/")) {
|
|
46
46
|
const dirPath = path.resolve(params.destDir, entryPath);
|
|
47
47
|
if (!dirPath.startsWith(params.destDir)) throw new Error(`zip entry escapes destination: ${entry.name}`);
|
|
48
|
-
await
|
|
48
|
+
await fsPromises.mkdir(dirPath, { recursive: true });
|
|
49
49
|
continue;
|
|
50
50
|
}
|
|
51
51
|
const outPath = path.resolve(params.destDir, entryPath);
|
|
52
52
|
if (!outPath.startsWith(params.destDir)) throw new Error(`zip entry escapes destination: ${entry.name}`);
|
|
53
|
-
await
|
|
53
|
+
await fsPromises.mkdir(path.dirname(outPath), { recursive: true });
|
|
54
54
|
const data = await entry.async("nodebuffer");
|
|
55
|
-
await
|
|
55
|
+
await fsPromises.writeFile(outPath, data);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
async function extractArchive(params) {
|
|
@@ -70,14 +70,14 @@ async function extractArchive(params) {
|
|
|
70
70
|
}
|
|
71
71
|
async function fileExists(filePath) {
|
|
72
72
|
try {
|
|
73
|
-
await
|
|
73
|
+
await fsPromises.stat(filePath);
|
|
74
74
|
return true;
|
|
75
75
|
} catch {
|
|
76
76
|
return false;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
async function readJsonFile(filePath) {
|
|
80
|
-
const raw = await
|
|
80
|
+
const raw = await fsPromises.readFile(filePath, "utf-8");
|
|
81
81
|
return JSON.parse(raw);
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { g as resolveStateDir, m as resolveOAuthDir, o as resolveConfigPath } from "./paths-DVBShlw6.js";
|
|
2
2
|
import { l as normalizeAgentId } from "./session-key-CUWZSMYQ.js";
|
|
3
3
|
import { n as runExec } from "./exec-DFOtZbI0.js";
|
|
4
|
-
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-
|
|
4
|
+
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-C7vPz4km.js";
|
|
5
5
|
import { t as formatCliCommand } from "./command-format-ChfKqObn.js";
|
|
6
|
-
import { D as MAX_INCLUDE_DEPTH, E as INCLUDE_KEY, r as createConfigIO } from "./config-
|
|
6
|
+
import { D as MAX_INCLUDE_DEPTH, E as INCLUDE_KEY, r as createConfigIO } from "./config-yg3MNzIZ.js";
|
|
7
7
|
import { a as MANIFEST_KEY } from "./manifest-registry-BMwHTztn.js";
|
|
8
|
-
import { n as listChannelPlugins } from "./plugins-
|
|
9
|
-
import { $ as resolveSandboxToolPolicyForAgent, Z as resolveSandboxConfigForAgent, ot as resolveToolProfilePolicy } from "./sandbox-
|
|
10
|
-
import { i as loadWorkspaceSkillEntries } from "./skills-
|
|
8
|
+
import { n as listChannelPlugins } from "./plugins-ia9SOGpI.js";
|
|
9
|
+
import { $ as resolveSandboxToolPolicyForAgent, Z as resolveSandboxConfigForAgent, ot as resolveToolProfilePolicy } from "./sandbox-nFkFFEb7.js";
|
|
10
|
+
import { i as loadWorkspaceSkillEntries } from "./skills-Cgy3X3tK.js";
|
|
11
11
|
import { n as formatErrorMessage } from "./errors-B0eT3jVv.js";
|
|
12
12
|
import { a as resolveProfile, i as resolveBrowserConfig } from "./server-context-DBGqh1ik.js";
|
|
13
13
|
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-CHRYQtAM.js";
|
|
14
14
|
import { t as GatewayClient } from "./client-56cv8SiG.js";
|
|
15
|
-
import { t as buildGatewayConnectionDetails } from "./call-
|
|
16
|
-
import { i as readChannelAllowFromStore } from "./pairing-store-
|
|
17
|
-
import { c as resolveNativeSkillsEnabled, n as isToolAllowedByPolicies, s as resolveNativeCommandsEnabled } from "./pi-tools.policy-
|
|
15
|
+
import { t as buildGatewayConnectionDetails } from "./call-D_Z9T8iV.js";
|
|
16
|
+
import { i as readChannelAllowFromStore } from "./pairing-store-Cc67v-m7.js";
|
|
17
|
+
import { c as resolveNativeSkillsEnabled, n as isToolAllowedByPolicies, s as resolveNativeCommandsEnabled } from "./pi-tools.policy-CiKYFXrw.js";
|
|
18
18
|
import { t as resolveChannelDefaultAccountId } from "./helpers-BNHVKXjR.js";
|
|
19
19
|
import { t as scanDirectoryWithSummary } from "./skill-scanner-BRoRPexZ.js";
|
|
20
20
|
import { i as resolveGatewayAuth } from "./auth-BpUy1iRX.js";
|
|
@@ -2,26 +2,26 @@ import { B as resolveConfigPath, J as resolveOAuthDir, X as resolveStateDir } fr
|
|
|
2
2
|
import { t as formatCliCommand } from "./command-format-ayFsmwwz.js";
|
|
3
3
|
import { l as normalizeAgentId } from "./session-key-BRdRr5Ah.js";
|
|
4
4
|
import { n as runExec } from "./exec-B8JKbXKW.js";
|
|
5
|
-
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope
|
|
6
|
-
import { D as MAX_INCLUDE_DEPTH, E as INCLUDE_KEY, r as createConfigIO } from "./config-
|
|
5
|
+
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-QnsNO5IK.js";
|
|
6
|
+
import { D as MAX_INCLUDE_DEPTH, E as INCLUDE_KEY, r as createConfigIO } from "./config-DFgdMueL.js";
|
|
7
7
|
import { a as MANIFEST_KEY } from "./manifest-registry-C_FL6H2P.js";
|
|
8
|
-
import { a as resolveBrowserConfig, o as resolveProfile } from "./server-context-
|
|
8
|
+
import { a as resolveBrowserConfig, o as resolveProfile } from "./server-context-qxpb5Ln6.js";
|
|
9
9
|
import { n as formatErrorMessage } from "./errors-x4NYs-1P.js";
|
|
10
10
|
import { i as resolveGatewayAuth } from "./auth-5C498YKH.js";
|
|
11
11
|
import { t as GatewayClient } from "./client-BCOZgvlo.js";
|
|
12
|
-
import { t as buildGatewayConnectionDetails } from "./call-
|
|
12
|
+
import { t as buildGatewayConnectionDetails } from "./call-BUcaYa5a.js";
|
|
13
13
|
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-BlgPSDAh.js";
|
|
14
|
-
import { n as listChannelPlugins } from "./plugins-
|
|
14
|
+
import { n as listChannelPlugins } from "./plugins-CO1rgH0r.js";
|
|
15
15
|
import { t as resolveChannelDefaultAccountId } from "./helpers-D4gM-kkY.js";
|
|
16
|
-
import { t as scanDirectoryWithSummary } from "./skill-scanner-
|
|
17
|
-
import { G as resolveSandboxToolPolicyForAgent, Q as resolveToolProfilePolicy, U as resolveSandboxConfigForAgent } from "./sandbox-
|
|
18
|
-
import { i as loadWorkspaceSkillEntries } from "./skills-
|
|
19
|
-
import { a as isToolAllowedByPolicies, n as resolveNativeCommandsEnabled, r as resolveNativeSkillsEnabled } from "./commands-
|
|
20
|
-
import { i as readChannelAllowFromStore } from "./pairing-store-
|
|
16
|
+
import { t as scanDirectoryWithSummary } from "./skill-scanner-BT7PBklM.js";
|
|
17
|
+
import { G as resolveSandboxToolPolicyForAgent, Q as resolveToolProfilePolicy, U as resolveSandboxConfigForAgent } from "./sandbox-D889a-F8.js";
|
|
18
|
+
import { i as loadWorkspaceSkillEntries } from "./skills-w-kwwPb2.js";
|
|
19
|
+
import { a as isToolAllowedByPolicies, n as resolveNativeCommandsEnabled, r as resolveNativeSkillsEnabled } from "./commands-DoVIOYAz.js";
|
|
20
|
+
import { i as readChannelAllowFromStore } from "./pairing-store-DKhgYwjg.js";
|
|
21
21
|
import path from "node:path";
|
|
22
22
|
import os from "node:os";
|
|
23
23
|
import JSON5 from "json5";
|
|
24
|
-
import
|
|
24
|
+
import fsPromises from "node:fs/promises";
|
|
25
25
|
import { randomUUID } from "node:crypto";
|
|
26
26
|
|
|
27
27
|
//#region src/gateway/probe.ts
|
|
@@ -272,7 +272,7 @@ function createIcaclsResetCommand(targetPath, opts) {
|
|
|
272
272
|
//#region src/security/audit-fs.ts
|
|
273
273
|
async function safeStat(targetPath) {
|
|
274
274
|
try {
|
|
275
|
-
const lst = await
|
|
275
|
+
const lst = await fsPromises.lstat(targetPath);
|
|
276
276
|
return {
|
|
277
277
|
ok: true,
|
|
278
278
|
isSymlink: lst.isSymbolicLink(),
|
|
@@ -747,7 +747,7 @@ async function collectPluginsTrustFindings(params) {
|
|
|
747
747
|
const extensionsDir = path.join(params.stateDir, "extensions");
|
|
748
748
|
const st = await safeStat(extensionsDir);
|
|
749
749
|
if (!st.ok || !st.isDir) return findings;
|
|
750
|
-
const pluginDirs = (await
|
|
750
|
+
const pluginDirs = (await fsPromises.readdir(extensionsDir, { withFileTypes: true }).catch(() => [])).filter((e) => e.isDirectory()).map((e) => e.name).filter(Boolean);
|
|
751
751
|
if (pluginDirs.length === 0) return findings;
|
|
752
752
|
const allow = params.cfg.plugins?.allow;
|
|
753
753
|
if (!(Array.isArray(allow) && allow.length > 0)) {
|
|
@@ -812,7 +812,7 @@ async function collectIncludePathsRecursive(params) {
|
|
|
812
812
|
if (visited.has(resolved)) continue;
|
|
813
813
|
visited.add(resolved);
|
|
814
814
|
result.push(resolved);
|
|
815
|
-
const rawText = await
|
|
815
|
+
const rawText = await fsPromises.readFile(resolved, "utf-8").catch(() => null);
|
|
816
816
|
if (!rawText) continue;
|
|
817
817
|
const nestedParsed = (() => {
|
|
818
818
|
try {
|
|
@@ -1057,7 +1057,7 @@ function extensionUsesSkippedScannerPath(entry) {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
async function readPluginManifestExtensions(pluginPath) {
|
|
1059
1059
|
const manifestPath = path.join(pluginPath, "package.json");
|
|
1060
|
-
const raw = await
|
|
1060
|
+
const raw = await fsPromises.readFile(manifestPath, "utf-8").catch(() => "");
|
|
1061
1061
|
if (!raw.trim()) return [];
|
|
1062
1062
|
const extensions = JSON.parse(raw)?.[MANIFEST_KEY]?.extensions;
|
|
1063
1063
|
if (!Array.isArray(extensions)) return [];
|
|
@@ -1084,7 +1084,7 @@ async function collectPluginsCodeSafetyFindings(params) {
|
|
|
1084
1084
|
const extensionsDir = path.join(params.stateDir, "extensions");
|
|
1085
1085
|
const st = await safeStat(extensionsDir);
|
|
1086
1086
|
if (!st.ok || !st.isDir) return findings;
|
|
1087
|
-
const pluginDirs = (await
|
|
1087
|
+
const pluginDirs = (await fsPromises.readdir(extensionsDir, { withFileTypes: true }).catch((err) => {
|
|
1088
1088
|
findings.push({
|
|
1089
1089
|
checkId: "plugins.code_safety.scan_failed",
|
|
1090
1090
|
severity: "warn",
|
|
@@ -3,7 +3,7 @@ import { X as resolveStateDir, Y as resolveOAuthPath, n as isTruthyEnvValue, o a
|
|
|
3
3
|
import { t as formatCliCommand } from "./command-format-ayFsmwwz.js";
|
|
4
4
|
import { n as DEFAULT_AGENT_ID } from "./session-key-BRdRr5Ah.js";
|
|
5
5
|
import { v as resolveUserPath } from "./utils-Bx1WKTCk.js";
|
|
6
|
-
import { a as resolveAgentModelPrimary } from "./agent-scope
|
|
6
|
+
import { a as resolveAgentModelPrimary } from "./agent-scope-QnsNO5IK.js";
|
|
7
7
|
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken, t as DEFAULT_COPILOT_API_BASE_URL } from "./github-copilot-token-SLWintYd.js";
|
|
8
8
|
import { execFileSync, execSync } from "node:child_process";
|
|
9
9
|
import path from "node:path";
|
package/dist/build-info.json
CHANGED
|
@@ -2,24 +2,24 @@ import "../../paths-BZtyHNCi.js";
|
|
|
2
2
|
import { d as resolveAgentIdFromSessionKey, l as normalizeAgentId, u as normalizeMainKey } from "../../session-key-nXYQSv-a.js";
|
|
3
3
|
import "../../utils-BXXjCjKW.js";
|
|
4
4
|
import { g as DEFAULT_CHAT_CHANNEL, l as createSubsystemLogger, u as defaultRuntime } from "../../exec-WGnq0Jte.js";
|
|
5
|
-
import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, y as ensureAgentWorkspace } from "../../agent-scope-
|
|
6
|
-
import { Y as SILENT_REPLY_TOKEN, a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, m as sendMessageSignal, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "../../deliver-
|
|
7
|
-
import { C as clearAgentRunContext, D as sendMessageSlack, E as sendMessageWhatsApp, S as AGENT_LANE_NESTED, T as registerAgentRunContext, _ as clearSessionAuthProfileOverride, a as getCliSessionId, b as loadModelCatalog, c as resolveOutboundTarget, d as deriveSessionTotalTokens, f as hasNonzeroUsage, g as lookupContextTokens, h as getSkillsSnapshotVersion, i as sendMessageDiscord, l as resolveSessionDeliveryTarget, m as getRemoteSkillEligibility, n as sendMessageIMessage, o as setCliSessionId, p as resolveSendPolicy, r as sendMessageTelegram, s as runCliAgent, t as runEmbeddedPiAgent, u as runWithModelFallback, v as applyModelOverrideToSessionEntry, w as emitAgentEvent, x as resolveAgentTimeoutMs, y as applyVerboseOverride } from "../../pi-embedded-
|
|
8
|
-
import { Ht as buildWorkspaceSkillSnapshot, Nn as normalizeChannelId, Z as updateSessionStore, a as formatXHighModelHint, cn as isDeliverableMessageChannel, ct as evaluateSessionFreshness, d as normalizeVerboseLevel, dt as resolveSessionResetType, hn as resolveMessageChannel, ht as resolveMainSessionKey, i as formatThinkingLevels, jn as getChannelPlugin, l as normalizeThinkLevel, ln as isGatewayMessageChannel, lt as resolveChannelResetConfig, mt as resolveExplicitAgentSessionKey, ot as normalizeAccountId, p as supportsXHighThinking, pn as normalizeMessageChannel, q as loadSessionStore, sn as INTERNAL_MESSAGE_CHANNEL, st as resolveSessionKey, un as isInternalMessageChannel, ut as resolveSessionResetPolicy } from "../../pi-embedded-helpers-
|
|
5
|
+
import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, y as ensureAgentWorkspace } from "../../agent-scope-DUR7NPNo.js";
|
|
6
|
+
import { Y as SILENT_REPLY_TOKEN, a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, m as sendMessageSignal, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "../../deliver-D_PB5CG5.js";
|
|
7
|
+
import { C as clearAgentRunContext, D as sendMessageSlack, E as sendMessageWhatsApp, S as AGENT_LANE_NESTED, T as registerAgentRunContext, _ as clearSessionAuthProfileOverride, a as getCliSessionId, b as loadModelCatalog, c as resolveOutboundTarget, d as deriveSessionTotalTokens, f as hasNonzeroUsage, g as lookupContextTokens, h as getSkillsSnapshotVersion, i as sendMessageDiscord, l as resolveSessionDeliveryTarget, m as getRemoteSkillEligibility, n as sendMessageIMessage, o as setCliSessionId, p as resolveSendPolicy, r as sendMessageTelegram, s as runCliAgent, t as runEmbeddedPiAgent, u as runWithModelFallback, v as applyModelOverrideToSessionEntry, w as emitAgentEvent, x as resolveAgentTimeoutMs, y as applyVerboseOverride } from "../../pi-embedded-DPQwlpO6.js";
|
|
8
|
+
import { Ht as buildWorkspaceSkillSnapshot, Nn as normalizeChannelId, Z as updateSessionStore, a as formatXHighModelHint, cn as isDeliverableMessageChannel, ct as evaluateSessionFreshness, d as normalizeVerboseLevel, dt as resolveSessionResetType, hn as resolveMessageChannel, ht as resolveMainSessionKey, i as formatThinkingLevels, jn as getChannelPlugin, l as normalizeThinkLevel, ln as isGatewayMessageChannel, lt as resolveChannelResetConfig, mt as resolveExplicitAgentSessionKey, ot as normalizeAccountId, p as supportsXHighThinking, pn as normalizeMessageChannel, q as loadSessionStore, sn as INTERNAL_MESSAGE_CHANNEL, st as resolveSessionKey, un as isInternalMessageChannel, ut as resolveSessionResetPolicy } from "../../pi-embedded-helpers-Z2gqd4I2.js";
|
|
9
9
|
import "../../boolean-M-esQJt6.js";
|
|
10
|
-
import { F as DEFAULT_MODEL, I as DEFAULT_PROVIDER, O as resolveThinkingDefault, P as DEFAULT_CONTEXT_TOKENS, S as modelKey, T as resolveConfiguredModelRef, h as ensureAuthProfileStore, v as buildAllowedModelSet, x as isCliProvider } from "../../model-auth-
|
|
10
|
+
import { F as DEFAULT_MODEL, I as DEFAULT_PROVIDER, O as resolveThinkingDefault, P as DEFAULT_CONTEXT_TOKENS, S as modelKey, T as resolveConfiguredModelRef, h as ensureAuthProfileStore, v as buildAllowedModelSet, x as isCliProvider } from "../../model-auth-B3m7mkvr.js";
|
|
11
11
|
import { t as formatCliCommand } from "../../command-format-BUxhT1xL.js";
|
|
12
|
-
import { t as loadConfig } from "../../config-
|
|
12
|
+
import { t as loadConfig } from "../../config-C_ZMbYir.js";
|
|
13
13
|
import "../../github-copilot-token-C9IJh2Pn.js";
|
|
14
14
|
import "../../pi-model-discovery-DzFOAbQt.js";
|
|
15
15
|
import "../../chrome-p7bwXvoG.js";
|
|
16
16
|
import "../../frontmatter-xwTm0734.js";
|
|
17
17
|
import { a as resolveStorePath, n as resolveSessionFilePath } from "../../paths-MnZaxqPw.js";
|
|
18
|
-
import "../../image-
|
|
19
|
-
import "../../manager-
|
|
18
|
+
import "../../image-Crv76CGv.js";
|
|
19
|
+
import "../../manager-DBEZGESO.js";
|
|
20
20
|
import "../../sqlite-Bwo2rASR.js";
|
|
21
21
|
import "../../redact-BRmQPYDR.js";
|
|
22
|
-
import "../../login-qr-
|
|
22
|
+
import "../../login-qr-BJHBXw2B.js";
|
|
23
23
|
import fs from "node:fs/promises";
|
|
24
24
|
import path from "node:path";
|
|
25
25
|
import crypto from "node:crypto";
|
|
@@ -2,23 +2,23 @@ import { s as resolveStateDir } from "../../paths-BZtyHNCi.js";
|
|
|
2
2
|
import { d as resolveAgentIdFromSessionKey } from "../../session-key-nXYQSv-a.js";
|
|
3
3
|
import "../../utils-BXXjCjKW.js";
|
|
4
4
|
import { l as createSubsystemLogger } from "../../exec-WGnq0Jte.js";
|
|
5
|
-
import { s as resolveAgentWorkspaceDir } from "../../agent-scope-
|
|
6
|
-
import "../../deliver-
|
|
7
|
-
import "../../pi-embedded-
|
|
8
|
-
import "../../pi-embedded-helpers-
|
|
5
|
+
import { s as resolveAgentWorkspaceDir } from "../../agent-scope-DUR7NPNo.js";
|
|
6
|
+
import "../../deliver-D_PB5CG5.js";
|
|
7
|
+
import "../../pi-embedded-DPQwlpO6.js";
|
|
8
|
+
import "../../pi-embedded-helpers-Z2gqd4I2.js";
|
|
9
9
|
import "../../boolean-M-esQJt6.js";
|
|
10
|
-
import "../../model-auth-
|
|
11
|
-
import "../../config-
|
|
10
|
+
import "../../model-auth-B3m7mkvr.js";
|
|
11
|
+
import "../../config-C_ZMbYir.js";
|
|
12
12
|
import "../../github-copilot-token-C9IJh2Pn.js";
|
|
13
13
|
import "../../pi-model-discovery-DzFOAbQt.js";
|
|
14
14
|
import "../../chrome-p7bwXvoG.js";
|
|
15
15
|
import "../../frontmatter-xwTm0734.js";
|
|
16
16
|
import "../../paths-MnZaxqPw.js";
|
|
17
|
-
import "../../image-
|
|
18
|
-
import "../../manager-
|
|
17
|
+
import "../../image-Crv76CGv.js";
|
|
18
|
+
import "../../manager-DBEZGESO.js";
|
|
19
19
|
import "../../sqlite-Bwo2rASR.js";
|
|
20
20
|
import "../../redact-BRmQPYDR.js";
|
|
21
|
-
import "../../login-qr-
|
|
21
|
+
import "../../login-qr-BJHBXw2B.js";
|
|
22
22
|
import { generateSlugViaLLM } from "../../llm-slug-generator.js";
|
|
23
23
|
import { t as resolveHookConfig } from "../../config-CI7EpvlP.js";
|
|
24
24
|
import fs from "node:fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { B as resolveConfigPath, W as resolveGatewayPort, X as resolveStateDir } from "./entry.js";
|
|
2
2
|
import { b as shortenHomeInString, s as ensureDir, t as CONFIG_DIR, v as resolveUserPath } from "./utils-Bx1WKTCk.js";
|
|
3
|
-
import { i as loadConfig } from "./config-
|
|
3
|
+
import { i as loadConfig } from "./config-DFgdMueL.js";
|
|
4
4
|
import { t as pickPrimaryTailnetIPv4 } from "./tailnet-CL5GtL7t.js";
|
|
5
5
|
import { o as pickPrimaryLanIPv4 } from "./ws-CtFyzK73.js";
|
|
6
6
|
import { Et as PROTOCOL_VERSION, Mt as normalizeFingerprint, Pt as loadOrCreateDeviceIdentity, t as GatewayClient } from "./client-BCOZgvlo.js";
|
|
@@ -8,14 +8,14 @@ import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-
|
|
|
8
8
|
import { execFile } from "node:child_process";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { promisify } from "node:util";
|
|
11
|
-
import
|
|
11
|
+
import fsPromises from "node:fs/promises";
|
|
12
12
|
import { X509Certificate, randomUUID } from "node:crypto";
|
|
13
13
|
|
|
14
14
|
//#region src/infra/tls/gateway.ts
|
|
15
15
|
const execFileAsync = promisify(execFile);
|
|
16
16
|
async function fileExists(filePath) {
|
|
17
17
|
try {
|
|
18
|
-
await
|
|
18
|
+
await fsPromises.access(filePath);
|
|
19
19
|
return true;
|
|
20
20
|
} catch {
|
|
21
21
|
return false;
|
|
@@ -42,8 +42,8 @@ async function generateSelfSignedCert(params) {
|
|
|
42
42
|
"-subj",
|
|
43
43
|
"/CN=openclaw-gateway"
|
|
44
44
|
]);
|
|
45
|
-
await
|
|
46
|
-
await
|
|
45
|
+
await fsPromises.chmod(params.keyPath, 384).catch(() => {});
|
|
46
|
+
await fsPromises.chmod(params.certPath, 384).catch(() => {});
|
|
47
47
|
params.log?.info?.(`gateway tls: generated self-signed cert at ${shortenHomeInString(params.certPath)}`);
|
|
48
48
|
}
|
|
49
49
|
async function loadGatewayTlsRuntime(cfg, log) {
|
|
@@ -81,9 +81,9 @@ async function loadGatewayTlsRuntime(cfg, log) {
|
|
|
81
81
|
error: "gateway tls: cert/key missing"
|
|
82
82
|
};
|
|
83
83
|
try {
|
|
84
|
-
const cert = await
|
|
85
|
-
const key = await
|
|
86
|
-
const ca = caPath ? await
|
|
84
|
+
const cert = await fsPromises.readFile(certPath, "utf8");
|
|
85
|
+
const key = await fsPromises.readFile(keyPath, "utf8");
|
|
86
|
+
const ca = caPath ? await fsPromises.readFile(caPath, "utf8") : void 0;
|
|
87
87
|
const fingerprintSha256 = normalizeFingerprint(new X509Certificate(cert).fingerprint256 ?? "");
|
|
88
88
|
if (!fingerprintSha256) return {
|
|
89
89
|
enabled: false,
|