@symerian/symi 2.8.5 → 2.8.7
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-BRw8yhIW.js → accounts-D1r2dq1t.js} +21 -21
- package/dist/{accounts-3dCrO3oZ.js → accounts-dRUMQQrB.js} +1 -1
- package/dist/{accounts-BuZxOb3B.js → accounts-wSphH5gv.js} +1 -1
- package/dist/{active-listener-Br2FcRv7.js → active-listener-C3pfJhdC.js} +1 -1
- package/dist/{agent-scope-CpEJ0B88.js → agent-scope-D68_xfTL.js} +3 -3
- package/dist/{agents-DWuqUDaG.js → agents-CKqrLbBd.js} +4 -4
- package/dist/{agents.config-DWsjuONZ.js → agents.config-D17kikNs.js} +1 -1
- package/dist/{agents.config-B8euVOOW.js → agents.config-DnEa79_a.js} +1 -1
- package/dist/{audio-preflight-DIXDvyz5.js → audio-preflight-DFLcuVNn.js} +29 -29
- package/dist/{audio-preflight-CKbpf-IL.js → audio-preflight-DJXj9QP9.js} +5 -5
- package/dist/{audio-preflight-BQaUmV6k.js → audio-preflight-DfALITTK.js} +5 -5
- package/dist/{audit-DCOp_J5K.js → audit-DVUHZrf4.js} +2 -2
- package/dist/{audit-BIeVybsA.js → audit-DgAM_dWL.js} +2 -2
- package/dist/{auth-choice-kpk3L0TR.js → auth-choice-KEir_3i_.js} +1 -1
- package/dist/{auth-choice-hKVjPWaU.js → auth-choice-obR6mZqe.js} +1 -1
- package/dist/{auth-profiles-C2vj6htZ.js → auth-profiles-aJfgABnE.js} +17 -17
- package/dist/{banner-C1RFNTRm.js → banner-BEYICVDD.js} +1 -1
- package/dist/{bindings-BsHoBLIE.js → bindings-Bat2RnAR.js} +2 -2
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +54 -54
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +54 -54
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-D-kw83R0.js → channel-activity-Cm1OJRbv.js} +1 -1
- package/dist/{channel-options-Vjegw-bn.js → channel-options-D9g8Ji5_.js} +1 -1
- package/dist/{channel-options-Pit7RtN-.js → channel-options-H9pR0AWZ.js} +1 -1
- package/dist/{channel-web-BVm_UWyj.js → channel-web-B9-EHnds.js} +3 -3
- package/dist/{channels-cli-Bh07AMec.js → channels-cli-C_YU5GaO.js} +11 -11
- package/dist/{channels-cli-CXws5tG8.js → channels-cli-mCf_KwBC.js} +12 -12
- package/dist/{chrome-ROtrXlNs.js → chrome-B0yKTuIS.js} +14 -14
- package/dist/{chunk-BHW8Yu5A.js → chunk-B9x_1qSr.js} +1 -1
- package/dist/{cli-D5qinxg-.js → cli-D8xchhQH.js} +8 -8
- package/dist/{cli-TABOKnEJ.js → cli-WAg9Zydm.js} +9 -9
- package/dist/{command-registry-DEe4juCf.js → command-registry-nSYGDoue.js} +9 -9
- package/dist/{commands-registry-CfoYlMQB.js → commands-registry-CeBC8Vy2.js} +4 -4
- package/dist/{completion-cli-W3fyiL94.js → completion-cli-BzV4_BVf.js} +1 -1
- package/dist/{completion-cli-D0j-46vF.js → completion-cli-CR5v_bKh.js} +2 -2
- package/dist/{config-BkZ9HOKT.js → config-Dp67YMkg.js} +12 -12
- package/dist/{config-cli-DLBtnr_W.js → config-cli-DFXYnUAB.js} +1 -1
- package/dist/{config-cli-CajteLy8.js → config-cli-wcQ2PQ2b.js} +1 -1
- package/dist/{config-guard-DjlYIjka.js → config-guard-CJ4iAPK5.js} +1 -1
- package/dist/{config-guard-BJE6xSY9.js → config-guard-DsOhmFl6.js} +2 -2
- package/dist/{configure-B79KjBCS.js → configure-CCux4ZEl.js} +3 -3
- package/dist/{configure-2PdZnKO6.js → configure-DSXgdzrp.js} +3 -3
- package/dist/control-ui/js/app.js +6 -33
- package/dist/control-ui/js/render.js +4 -14
- package/dist/{deliver-CiL9mQXH.js → deliver-BLt_liXS.js} +2 -2
- package/dist/{deliver-BC3liFsT.js → deliver-DPWY9adX.js} +20 -20
- package/dist/{deliver-CXpvGXqJ.js → deliver-lG9ITE8w.js} +2 -2
- package/dist/{diagnostic-CQiU0O8b.js → diagnostic-DIKKFHpP.js} +1 -1
- package/dist/{doctor-completion-DOnUbTdS.js → doctor-completion-D-deyczv.js} +1 -1
- package/dist/{doctor-completion-mlj3aq0W.js → doctor-completion-jev9bFib.js} +1 -1
- package/dist/{doctor-config-flow-DFk-NaP5.js → doctor-config-flow-C81j0-sE.js} +1 -1
- package/dist/{doctor-config-flow-BRB_O0jG.js → doctor-config-flow-CN8seKLA.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{env-BDXYbTKj.js → env-xmBFQPBP.js} +1 -1
- package/dist/extensionAPI.js +1 -1
- package/dist/{frontmatter-CTR5f_Ez.js → frontmatter-CV0YkjoY.js} +2 -2
- package/dist/{gateway-cli-D7jQypRh.js → gateway-cli-BJvattWu.js} +19 -19
- package/dist/{gateway-cli-nHVe7vxD.js → gateway-cli-_BIiMqiD.js} +18 -18
- package/dist/{gemini-auth-BefM10YB.js → gemini-auth-JP7SzVpY.js} +1 -1
- package/dist/{github-copilot-token-cCYzSU9h.js → github-copilot-token-B8B2pmph.js} +7 -7
- package/dist/{glass-ui-ws-BgVPCNjg.js → glass-ui-ws-BHVpfzRg.js} +16 -16
- package/dist/{glass-ui-ws-CMMnvVpl.js → glass-ui-ws-DRWpg6Qb.js} +15 -15
- package/dist/{health-DvkoG4Dw.js → health-7ZvWXkvm.js} +3 -3
- package/dist/{health-DKxSHkOQ.js → health-D1L94KKE.js} +3 -3
- package/dist/{hooks-cli-DV1GeJpO.js → hooks-cli-B-JbgOoq.js} +9 -9
- package/dist/{hooks-cli-DsWn_3um.js → hooks-cli-BjYy0UUP.js} +10 -10
- package/dist/{image-C6v6m8Id.js → image-DCB54N2j.js} +4 -4
- package/dist/{image-CJ_QZqzR.js → image-DXco5IYt.js} +1 -1
- package/dist/{image-C2IvljWU.js → image-D_qN_IxA.js} +1 -1
- package/dist/{image-ops-C7CauEK8.js → image-ops-M5agStZn.js} +16 -16
- package/dist/index.js +14 -14
- package/dist/{ir-JAy_3A3B.js → ir-Z9axTYHx.js} +4 -4
- package/dist/llm-slug-generator.js +54 -54
- package/dist/{local-roots-Se92wAN5.js → local-roots-Bh5xx9IO.js} +5 -5
- package/dist/{login-CksRbu5D.js → login-Z-O7e3RD.js} +7 -7
- package/dist/{login-qr-COIr6FGZ.js → login-qr-Cqe-9-jf.js} +12 -12
- package/dist/{manager-DXyJKTj7.js → manager-ayAJucg2.js} +22 -22
- package/dist/{manifest-registry-CBCGTsIb.js → manifest-registry-QT5_77XA.js} +19 -19
- package/dist/{markdown-tables-Dnj2LQUc.js → markdown-tables-DuRhvVpP.js} +1 -1
- package/dist/{message-channel-OlFBYAw8.js → message-channel-DwDSKGn4.js} +1 -1
- package/dist/{models-BohMMqeG.js → models-PeKQE2ct.js} +2 -2
- package/dist/{models-cli-DabormMV.js → models-cli-ChoXOtnk.js} +9 -9
- package/dist/{models-cli-CJywE4w7.js → models-cli-lSGGkLeL.js} +11 -11
- package/dist/{onboard-ygIcreY9.js → onboard-9PT0Wv1A.js} +2 -2
- package/dist/{onboard-CyuUucGA.js → onboard-B8q4Vpz1.js} +2 -2
- package/dist/{onboard-channels-DU6do-N5.js → onboard-channels-CN0qvsHO.js} +1 -1
- package/dist/{onboard-channels-DaY1NwXd.js → onboard-channels-Cg4bD8ps.js} +1 -1
- package/dist/{onboarding-Bqz1NgoR.js → onboarding-BAn2oNRB.js} +4 -4
- package/dist/{onboarding-BfeyfvK_.js → onboarding-hJaI3u5t.js} +4 -4
- package/dist/{onboarding.finalize-CG0xwhEw.js → onboarding.finalize-BPZZr8Cm.js} +13 -13
- package/dist/{onboarding.finalize-DzTo4LEo.js → onboarding.finalize-BTrhVcW5.js} +15 -15
- package/dist/{onboarding.gateway-config-7LGxdDrq.js → onboarding.gateway-config-TM8ERKyn.js} +1 -1
- package/dist/{onboarding.gateway-config-DJJRuyZ_.js → onboarding.gateway-config-vGTQDqA6.js} +1 -1
- package/dist/{outbound-attachment-BzwVH4Pn.js → outbound-attachment-BOy-OY4-.js} +2 -2
- package/dist/{outbound-CX-uuDet.js → outbound-xWV2AYDD.js} +7 -7
- package/dist/paths-CYmyCDsE.js +212 -0
- package/dist/{paths-CbQV9WEg.js → paths-DEuVuViW.js} +1 -1
- package/dist/{pi-auth-json-RXOlh8ar.js → pi-auth-json-Q3FwtPeJ.js} +1 -1
- package/dist/{pi-embedded-BIATvD3R.js → pi-embedded-F3kbSP7M.js} +6 -2
- package/dist/{pi-embedded-helpers-BUNbSNWw.js → pi-embedded-helpers-CFTCaByg.js} +73 -73
- package/dist/{pi-embedded-helpers-jo_kKs-Z.js → pi-embedded-helpers-DSscUmkR.js} +1 -1
- package/dist/{pi-embedded-helpers-DiXXYmgo.js → pi-embedded-helpers-DpOccVre.js} +1 -1
- package/dist/{pi-tools.policy-p7LLu64F.js → pi-tools.policy-BpN-v9bT.js} +1 -1
- package/dist/{pi-tools.policy-CGVKAOoE.js → pi-tools.policy-DOVQ8dDx.js} +1 -1
- package/dist/{plugin-registry-DG2IOSY3.js → plugin-registry-BVoIgv-5.js} +1 -1
- package/dist/{plugin-registry-DTm-oyEP.js → plugin-registry-DFPTE_HO.js} +1 -1
- package/dist/plugin-sdk/{channel-web-D-ct3FR3.js → channel-web-BNGOwMat.js} +1 -1
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/{reply-Gpdxnjey.js → reply-DcNZU8lj.js} +6 -2
- package/dist/plugin-sdk/{web-BFa_GJSK.js → web-CeR-wf-N.js} +2 -2
- package/dist/{plugins-BzmbgY7s.js → plugins-Bkr5ZdYs.js} +9 -9
- package/dist/{plugins-cli-BrHhfpbX.js → plugins-cli-BwM4f91E.js} +10 -10
- package/dist/{plugins-cli-BJpemLCS.js → plugins-cli-uoGDkhOc.js} +9 -9
- package/dist/{program-CYzFuO3w.js → program-DhBZLOgJ.js} +16 -16
- package/dist/{program-context-G2iHoB5D.js → program-context-BJEZcvA2.js} +20 -20
- package/dist/{prompt-select-styled-lVyrkSPI.js → prompt-select-styled-CJjLDUCj.js} +7 -7
- package/dist/{prompt-select-styled-P0KS75Rt.js → prompt-select-styled-CMBgFELR.js} +7 -7
- package/dist/{provider-auth-helpers-CoYjxsb2.js → provider-auth-helpers-DeWQHkRc.js} +1 -1
- package/dist/{provider-auth-helpers-Cygsm5_L.js → provider-auth-helpers-S2j3hcBK.js} +1 -1
- package/dist/{push-apns-CHM_4e6x.js → push-apns-CJ2CpgRB.js} +1 -1
- package/dist/{push-apns-BMfcGm-A.js → push-apns-YD8SuIy0.js} +1 -1
- package/dist/{pw-ai-BLrC_W1X.js → pw-ai-DHoYzirP.js} +11 -11
- package/dist/{qmd-manager-lBS9mT9w.js → qmd-manager-8-Z3Cdpt.js} +7 -7
- package/dist/{register.agent-BTmY2MoW.js → register.agent-B2u3ouKf.js} +14 -14
- package/dist/{register.agent-efba5ajU.js → register.agent-gMPMyFRj.js} +12 -12
- package/dist/{register.configure-DHSfWAqs.js → register.configure-C6mVcNay.js} +14 -14
- package/dist/{register.configure-EQOE0vHS.js → register.configure-DncWEkhU.js} +13 -13
- package/dist/{register.maintenance-CzcgKkH3.js → register.maintenance-Cz1IOILv.js} +15 -15
- package/dist/{register.maintenance-CsczzIEq.js → register.maintenance-D5oV0fjR.js} +17 -17
- package/dist/{register.message-Bc3A_dfj.js → register.message-B6hxm3rn.js} +9 -9
- package/dist/{register.message-u6gwfQPX.js → register.message-QejTHJGQ.js} +10 -10
- package/dist/{register.onboard-CtKNq5I_.js → register.onboard-CA06T3Jp.js} +12 -12
- package/dist/{register.onboard-yDsskHey.js → register.onboard-kJuHrfio.js} +11 -11
- package/dist/{register.setup-BPeB8JTw.js → register.setup-BD8QKVsT.js} +11 -11
- package/dist/{register.setup-BJqk3N2q.js → register.setup-C11edfdp.js} +12 -12
- package/dist/{register.status-health-sessions-CU6Uv3iO.js → register.status-health-sessions-257I77oA.js} +13 -13
- package/dist/{register.status-health-sessions-KzzMJ0H1.js → register.status-health-sessions-CrTiF0_d.js} +11 -11
- package/dist/{register.subclis-C_464foT.js → register.subclis-CnOalkYH.js} +12 -12
- package/dist/{registry-DYq1AYOv.js → registry-UkL38jvt.js} +17 -17
- package/dist/{replies-BWgZR_w5.js → replies-CWH084Xr.js} +3 -3
- package/dist/{reply-kWKTXRkY.js → reply-o0IEwJ_P.js} +18 -14
- package/dist/{reply-prefix-CvEIl6_d.js → reply-prefix-ZnX2V-k9.js} +1 -1
- package/dist/{resolve-route-DX7xcMsD.js → resolve-route-gl0ZOOKR.js} +4 -4
- package/dist/{retry-B-y5suGA.js → retry-D25Z8MVS.js} +1 -1
- package/dist/{run-main-I-kj1_yf.js → run-main-BuVFHsuQ.js} +25 -25
- package/dist/{runner-QX0Z6K1w.js → runner-C-ygJOAu.js} +22 -22
- package/dist/{runner-BopCEjwB.js → runner-CSdQSvE8.js} +1 -1
- package/dist/{runner-eBF6SlQ6.js → runner-C_BlQ2fG.js} +1 -1
- package/dist/{sandbox-ooxzsj2D.js → sandbox-BOVopTqv.js} +1 -1
- package/dist/{sandbox-Cl2r-bXv.js → sandbox-CDxHBl3I.js} +1 -1
- package/dist/{sandbox-cli-CZSrSTkk.js → sandbox-cli-0eu7BCa8.js} +2 -2
- package/dist/{sandbox-cli-BH45SMwC.js → sandbox-cli-BpfYaZBG.js} +2 -2
- package/dist/{security-cli-CEI0zQJs.js → security-cli-B5s73Le2.js} +4 -4
- package/dist/{security-cli-Bz-Sv5-H.js → security-cli-CzWHkrqD.js} +4 -4
- package/dist/{send-CCmxHtaA.js → send-BJhQtCyM.js} +6 -6
- package/dist/{send-xTfsDEE2.js → send-CF_nzDHe.js} +18 -18
- package/dist/{send-vqwluhp3.js → send-Cf47Nas6.js} +7 -7
- package/dist/{send-B7aHpAco.js → send-DERqzyba.js} +6 -6
- package/dist/{send-Yzy50T1h.js → send-DQoKXmre.js} +10 -10
- package/dist/{server-methods-DuXvSLX-.js → server-methods-D0laPfTZ.js} +10 -10
- package/dist/{server-methods-DQHU-PVR.js → server-methods-D1eF0-Yu.js} +11 -11
- package/dist/{server-node-events-CwAM91fd.js → server-node-events-D3iV_wDf.js} +9 -9
- package/dist/{server-node-events-ecaGjg5E.js → server-node-events-b7X9bVIS.js} +10 -10
- package/dist/{session-BTLA3Rm7.js → session-C1eFu8k4.js} +8 -8
- package/dist/{session-utils-Dwt6eGX6.js → session-utils-BPXkhuNM.js} +1 -1
- package/dist/{sessions-Do060W3W.js → sessions-BPD85pWA.js} +2 -3
- package/dist/{sessions-vYQs1OzE.js → sessions-BeYHj0gr.js} +2 -3
- package/dist/{sessions-DQxygr94.js → sessions-NTd36-CO.js} +2 -2
- package/dist/{skill-commands-D1hG6Ikz.js → skill-commands-CKXkvl80.js} +16 -16
- package/dist/{skills-CXxrn_e2.js → skills-DxmX9HVT.js} +24 -24
- package/dist/{sqlite-BHWvOATS.js → sqlite-JHY-uOmS.js} +16 -16
- package/dist/{status-v8DOdpX6.js → status-Cv3PcsRo.js} +4 -4
- package/dist/{status-DNVKHGLC.js → status-CwrFTb4t.js} +1 -1
- package/dist/{status-CW9LMA2M.js → status-K22ODH_m.js} +1 -1
- package/dist/{status-DsFAg-bK.js → status-eVKjxfUO.js} +5 -5
- package/dist/{store-01F_JM7O.js → store-Ea3zM6xK.js} +6 -6
- package/dist/{subagent-registry-C8UsZ8F0.js → subagent-registry-4XZvxwX0.js} +19 -15
- package/dist/{subsystem-BjyjJF-d.js → subsystem-DN75fnEF.js} +1 -1
- package/dist/{tables-BuM4FKR3.js → tables-Dkg9O8rv.js} +1 -1
- package/dist/{target-errors-BEugWC4F.js → target-errors-Pr77jao5.js} +2 -2
- package/dist/{thinking-BprCy23Z.js → thinking-C9-JAUzD.js} +5 -5
- package/dist/{tokens-W0JzCJJM.js → tokens-CCZl4YHT.js} +1 -1
- package/dist/{tool-images-SqqWIT22.js → tool-images-B1qVCntj.js} +2 -2
- package/dist/{tool-loop-detection-D5mBY7AC.js → tool-loop-detection-C33wf43N.js} +3 -3
- package/dist/{tui-B61kHmM2.js → tui-DfPeXwah.js} +2 -2
- package/dist/{tui-CiGfEtDa.js → tui-LZPdrFmK.js} +2 -2
- package/dist/{tui-cli-CwNXfDnk.js → tui-cli-Bm3TJgXf.js} +4 -4
- package/dist/{tui-cli-DHKMCeGp.js → tui-cli-DFXZ7r1F.js} +4 -4
- package/dist/{unified-runner-CUXcv08a.js → unified-runner-BL7URnpP.js} +231 -227
- package/dist/{update-cli-BwX8SW9m.js → update-cli-Bf-HR0_b.js} +17 -17
- package/dist/{update-cli-DQOw6sqy.js → update-cli-CjtzOlMZ.js} +15 -15
- package/dist/{update-runner-BhXkq5Gw.js → update-runner-CxuU59aU.js} +1 -1
- package/dist/{update-runner-C56OyqSE.js → update-runner-i95oVXRi.js} +1 -1
- package/dist/{web-DgoKLcMP.js → web-B3QBvAid.js} +58 -58
- package/dist/{web-CGicnDRL.js → web-CTog1mw0.js} +9 -9
- package/dist/{web-Ifwqx6Dt.js → web-D6aUh_IC.js} +1 -1
- package/dist/{web-NSGlkQEO.js → web-D_WLAogr.js} +9 -9
- package/dist/{whatsapp-actions-CiXMwRR8.js → whatsapp-actions-pddprZ8J.js} +23 -23
- package/dist/{workspace-DscDraUb.js → workspace-DqJ5h-ZB.js} +27 -27
- 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/feishu/package.json +1 -1
- package/extensions/google-antigravity-auth/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/learning-loop/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/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/outlook/index.ts +1 -1
- package/extensions/outlook/package.json +1 -1
- package/extensions/pipeline/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/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
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import fsSync from "node:fs";
|
|
3
|
+
import os from "node:os";
|
|
4
|
+
|
|
5
|
+
//#region src/infra/home-dir.ts
|
|
6
|
+
function normalize(value) {
|
|
7
|
+
const trimmed = value?.trim();
|
|
8
|
+
return trimmed ? trimmed : void 0;
|
|
9
|
+
}
|
|
10
|
+
function resolveEffectiveHomeDir(env = process.env, homedir = os.homedir) {
|
|
11
|
+
const raw = resolveRawHomeDir(env, homedir);
|
|
12
|
+
return raw ? path.resolve(raw) : void 0;
|
|
13
|
+
}
|
|
14
|
+
function resolveRawHomeDir(env, homedir) {
|
|
15
|
+
const explicitHome = normalize(env.SYMI_HOME);
|
|
16
|
+
if (explicitHome) {
|
|
17
|
+
if (explicitHome === "~" || explicitHome.startsWith("~/") || explicitHome.startsWith("~\\")) {
|
|
18
|
+
const fallbackHome = normalize(env.HOME) ?? normalize(env.USERPROFILE) ?? normalizeSafe(homedir);
|
|
19
|
+
if (fallbackHome) return explicitHome.replace(/^~(?=$|[\\/])/, fallbackHome);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
return explicitHome;
|
|
23
|
+
}
|
|
24
|
+
const envHome = normalize(env.HOME);
|
|
25
|
+
if (envHome) return envHome;
|
|
26
|
+
const userProfile = normalize(env.USERPROFILE);
|
|
27
|
+
if (userProfile) return userProfile;
|
|
28
|
+
return normalizeSafe(homedir);
|
|
29
|
+
}
|
|
30
|
+
function normalizeSafe(homedir) {
|
|
31
|
+
try {
|
|
32
|
+
return normalize(homedir());
|
|
33
|
+
} catch {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function resolveRequiredHomeDir(env = process.env, homedir = os.homedir) {
|
|
38
|
+
return resolveEffectiveHomeDir(env, homedir) ?? path.resolve(process.cwd());
|
|
39
|
+
}
|
|
40
|
+
function expandHomePrefix(input, opts) {
|
|
41
|
+
if (!input.startsWith("~")) return input;
|
|
42
|
+
const home = normalize(opts?.home) ?? resolveEffectiveHomeDir(opts?.env ?? process.env, opts?.homedir ?? os.homedir);
|
|
43
|
+
if (!home) return input;
|
|
44
|
+
return input.replace(/^~(?=$|[\\/])/, home);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/config/paths.ts
|
|
49
|
+
/**
|
|
50
|
+
* Nix mode detection: When SYMI_NIX_MODE=1, the gateway is running under Nix.
|
|
51
|
+
* In this mode:
|
|
52
|
+
* - No auto-install flows should be attempted
|
|
53
|
+
* - Missing dependencies should produce actionable Nix-specific error messages
|
|
54
|
+
* - Config is managed externally (read-only from Nix perspective)
|
|
55
|
+
*/
|
|
56
|
+
function resolveIsNixMode(env = process.env) {
|
|
57
|
+
return env.SYMI_NIX_MODE === "1";
|
|
58
|
+
}
|
|
59
|
+
const isNixMode = resolveIsNixMode();
|
|
60
|
+
const LEGACY_STATE_DIRNAMES = [];
|
|
61
|
+
const NEW_STATE_DIRNAME = ".symi";
|
|
62
|
+
const CONFIG_FILENAME = "symi.json";
|
|
63
|
+
const LEGACY_CONFIG_FILENAMES = [];
|
|
64
|
+
function resolveDefaultHomeDir() {
|
|
65
|
+
return resolveRequiredHomeDir(process.env, os.homedir);
|
|
66
|
+
}
|
|
67
|
+
/** Build a homedir thunk that respects SYMI_HOME for the given env. */
|
|
68
|
+
function envHomedir(env) {
|
|
69
|
+
return () => resolveRequiredHomeDir(env, os.homedir);
|
|
70
|
+
}
|
|
71
|
+
function legacyStateDirs(homedir = resolveDefaultHomeDir) {
|
|
72
|
+
return LEGACY_STATE_DIRNAMES.map((dir) => path.join(homedir(), dir));
|
|
73
|
+
}
|
|
74
|
+
function newStateDir(homedir = resolveDefaultHomeDir) {
|
|
75
|
+
return path.join(homedir(), NEW_STATE_DIRNAME);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* State directory for mutable data (sessions, logs, caches).
|
|
79
|
+
* Can be overridden via SYMI_STATE_DIR.
|
|
80
|
+
* Default: ~/.symi
|
|
81
|
+
*/
|
|
82
|
+
function resolveStateDir(env = process.env, homedir = envHomedir(env)) {
|
|
83
|
+
const effectiveHomedir = () => resolveRequiredHomeDir(env, homedir);
|
|
84
|
+
const override = env.SYMI_STATE_DIR?.trim();
|
|
85
|
+
if (override) return resolveUserPath(override, env, effectiveHomedir);
|
|
86
|
+
const newDir = newStateDir(effectiveHomedir);
|
|
87
|
+
const legacyDirs = legacyStateDirs(effectiveHomedir);
|
|
88
|
+
if (fsSync.existsSync(newDir)) return newDir;
|
|
89
|
+
const existingLegacy = legacyDirs.find((dir) => {
|
|
90
|
+
try {
|
|
91
|
+
return fsSync.existsSync(dir);
|
|
92
|
+
} catch {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
if (existingLegacy) return existingLegacy;
|
|
97
|
+
return newDir;
|
|
98
|
+
}
|
|
99
|
+
function resolveUserPath(input, env = process.env, homedir = envHomedir(env)) {
|
|
100
|
+
const trimmed = input.trim();
|
|
101
|
+
if (!trimmed) return trimmed;
|
|
102
|
+
if (trimmed.startsWith("~")) {
|
|
103
|
+
const expanded = expandHomePrefix(trimmed, {
|
|
104
|
+
home: resolveRequiredHomeDir(env, homedir),
|
|
105
|
+
env,
|
|
106
|
+
homedir
|
|
107
|
+
});
|
|
108
|
+
return path.resolve(expanded);
|
|
109
|
+
}
|
|
110
|
+
return path.resolve(trimmed);
|
|
111
|
+
}
|
|
112
|
+
const STATE_DIR = resolveStateDir();
|
|
113
|
+
/**
|
|
114
|
+
* Config file path (JSON5).
|
|
115
|
+
* Can be overridden via SYMI_CONFIG_PATH.
|
|
116
|
+
* Default: ~/.symi/symi.json (or $SYMI_STATE_DIR/symi.json)
|
|
117
|
+
*/
|
|
118
|
+
function resolveCanonicalConfigPath(env = process.env, stateDir = resolveStateDir(env, envHomedir(env))) {
|
|
119
|
+
const override = env.SYMI_CONFIG_PATH?.trim();
|
|
120
|
+
if (override) return resolveUserPath(override, env, envHomedir(env));
|
|
121
|
+
return path.join(stateDir, CONFIG_FILENAME);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Resolve the active config path by preferring existing config candidates
|
|
125
|
+
* before falling back to the canonical path.
|
|
126
|
+
*/
|
|
127
|
+
function resolveConfigPathCandidate(env = process.env, homedir = envHomedir(env)) {
|
|
128
|
+
const existing = resolveDefaultConfigCandidates(env, homedir).find((candidate) => {
|
|
129
|
+
try {
|
|
130
|
+
return fsSync.existsSync(candidate);
|
|
131
|
+
} catch {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
if (existing) return existing;
|
|
136
|
+
return resolveCanonicalConfigPath(env, resolveStateDir(env, homedir));
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Active config path (prefers existing config files).
|
|
140
|
+
*/
|
|
141
|
+
function resolveConfigPath(env = process.env, stateDir = resolveStateDir(env, envHomedir(env)), homedir = envHomedir(env)) {
|
|
142
|
+
const override = env.SYMI_CONFIG_PATH?.trim();
|
|
143
|
+
if (override) return resolveUserPath(override, env, homedir);
|
|
144
|
+
const stateOverride = env.SYMI_STATE_DIR?.trim();
|
|
145
|
+
const existing = [path.join(stateDir, CONFIG_FILENAME), ...LEGACY_CONFIG_FILENAMES.map((name) => path.join(stateDir, name))].find((candidate) => {
|
|
146
|
+
try {
|
|
147
|
+
return fsSync.existsSync(candidate);
|
|
148
|
+
} catch {
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
if (existing) return existing;
|
|
153
|
+
if (stateOverride) return path.join(stateDir, CONFIG_FILENAME);
|
|
154
|
+
const defaultStateDir = resolveStateDir(env, homedir);
|
|
155
|
+
if (path.resolve(stateDir) === path.resolve(defaultStateDir)) return resolveConfigPathCandidate(env, homedir);
|
|
156
|
+
return path.join(stateDir, CONFIG_FILENAME);
|
|
157
|
+
}
|
|
158
|
+
const CONFIG_PATH = resolveConfigPathCandidate();
|
|
159
|
+
/**
|
|
160
|
+
* Resolve default config path candidates across default locations.
|
|
161
|
+
* Order: explicit config path → state-dir-derived paths → new default.
|
|
162
|
+
*/
|
|
163
|
+
function resolveDefaultConfigCandidates(env = process.env, homedir = envHomedir(env)) {
|
|
164
|
+
const effectiveHomedir = () => resolveRequiredHomeDir(env, homedir);
|
|
165
|
+
const explicit = env.SYMI_CONFIG_PATH?.trim();
|
|
166
|
+
if (explicit) return [resolveUserPath(explicit, env, effectiveHomedir)];
|
|
167
|
+
const candidates = [];
|
|
168
|
+
const symiStateDir = env.SYMI_STATE_DIR?.trim();
|
|
169
|
+
if (symiStateDir) {
|
|
170
|
+
const resolved = resolveUserPath(symiStateDir, env, effectiveHomedir);
|
|
171
|
+
candidates.push(path.join(resolved, CONFIG_FILENAME));
|
|
172
|
+
candidates.push(...LEGACY_CONFIG_FILENAMES.map((name) => path.join(resolved, name)));
|
|
173
|
+
}
|
|
174
|
+
const defaultDirs = [newStateDir(effectiveHomedir), ...legacyStateDirs(effectiveHomedir)];
|
|
175
|
+
for (const dir of defaultDirs) {
|
|
176
|
+
candidates.push(path.join(dir, CONFIG_FILENAME));
|
|
177
|
+
candidates.push(...LEGACY_CONFIG_FILENAMES.map((name) => path.join(dir, name)));
|
|
178
|
+
}
|
|
179
|
+
return candidates;
|
|
180
|
+
}
|
|
181
|
+
const DEFAULT_GATEWAY_PORT = 18789;
|
|
182
|
+
const OAUTH_FILENAME = "oauth.json";
|
|
183
|
+
/**
|
|
184
|
+
* OAuth credentials storage directory.
|
|
185
|
+
*
|
|
186
|
+
* Precedence:
|
|
187
|
+
* - `SYMI_OAUTH_DIR` (explicit override)
|
|
188
|
+
* - `$*_STATE_DIR/credentials` (canonical server/default)
|
|
189
|
+
*/
|
|
190
|
+
function resolveOAuthDir(env = process.env, stateDir = resolveStateDir(env, envHomedir(env))) {
|
|
191
|
+
const override = env.SYMI_OAUTH_DIR?.trim();
|
|
192
|
+
if (override) return resolveUserPath(override, env, envHomedir(env));
|
|
193
|
+
return path.join(stateDir, "credentials");
|
|
194
|
+
}
|
|
195
|
+
function resolveOAuthPath(env = process.env, stateDir = resolveStateDir(env, envHomedir(env))) {
|
|
196
|
+
return path.join(resolveOAuthDir(env, stateDir), OAUTH_FILENAME);
|
|
197
|
+
}
|
|
198
|
+
function resolveGatewayPort(cfg, env = process.env) {
|
|
199
|
+
const envRaw = env.SYMI_GATEWAY_PORT?.trim();
|
|
200
|
+
if (envRaw) {
|
|
201
|
+
const parsed = Number.parseInt(envRaw, 10);
|
|
202
|
+
if (Number.isFinite(parsed) && parsed > 0) return parsed;
|
|
203
|
+
}
|
|
204
|
+
const configPort = cfg?.gateway?.port;
|
|
205
|
+
if (typeof configPort === "number" && Number.isFinite(configPort)) {
|
|
206
|
+
if (configPort > 0) return configPort;
|
|
207
|
+
}
|
|
208
|
+
return DEFAULT_GATEWAY_PORT;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
//#endregion
|
|
212
|
+
export { resolveOAuthDir as a, expandHomePrefix as c, resolveGatewayPort as i, resolveEffectiveHomeDir as l, resolveConfigPath as n, resolveOAuthPath as o, resolveDefaultConfigCandidates as r, resolveStateDir as s, STATE_DIR as t, resolveRequiredHomeDir as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as expandHomePrefix, s as resolveStateDir, u as resolveRequiredHomeDir } from "./paths-
|
|
1
|
+
import { c as expandHomePrefix, s as resolveStateDir, u as resolveRequiredHomeDir } from "./paths-CYmyCDsE.js";
|
|
2
2
|
import { s as normalizeAgentId, t as DEFAULT_AGENT_ID } from "./session-key-BCzIW1Y2.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import os from "node:os";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { C as normalizeProviderId, U as normalizeOptionalSecretInput, d as ensureAuthProfileStore } from "./auth-profiles-
|
|
2
|
+
import { C as normalizeProviderId, U as normalizeOptionalSecretInput, d as ensureAuthProfileStore } from "./auth-profiles-aJfgABnE.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
5
5
|
|
|
@@ -47160,6 +47160,10 @@ async function runEmbeddedAttempt(params) {
|
|
|
47160
47160
|
effectivePrompt = `${hookResult.prependContext}\n\n${params.prompt}`;
|
|
47161
47161
|
log$5.debug(`hooks: prepended context to prompt (${hookResult.prependContext.length} chars)`);
|
|
47162
47162
|
}
|
|
47163
|
+
if (hookResult?.systemPrompt) {
|
|
47164
|
+
applySystemPromptOverrideToSession(activeSession, `${systemPromptText}\n\n${hookResult.systemPrompt}`);
|
|
47165
|
+
log$5.debug(`hooks: appended systemPrompt from plugin hook (${hookResult.systemPrompt.length} chars)`);
|
|
47166
|
+
}
|
|
47163
47167
|
{
|
|
47164
47168
|
const autoRecallAgentId = normalizeAgentId(params.sessionKey);
|
|
47165
47169
|
if ((params.config ? resolveMemorySearchConfig(params.config, autoRecallAgentId) : null) && params.config) try {
|
|
@@ -61028,7 +61032,7 @@ function isVoiceChannelType(type) {
|
|
|
61028
61032
|
function createDefaultDeps() {
|
|
61029
61033
|
return {
|
|
61030
61034
|
sendMessageWhatsApp: async (...args) => {
|
|
61031
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
61035
|
+
const { sendMessageWhatsApp } = await import("./web-D6aUh_IC.js");
|
|
61032
61036
|
return await sendMessageWhatsApp(...args);
|
|
61033
61037
|
},
|
|
61034
61038
|
sendMessageTelegram: async (...args) => {
|
|
@@ -76308,7 +76312,7 @@ function loadWebLoginQr() {
|
|
|
76308
76312
|
return webLoginQrPromise;
|
|
76309
76313
|
}
|
|
76310
76314
|
function loadWebChannel() {
|
|
76311
|
-
webChannelPromise ??= import("./web-
|
|
76315
|
+
webChannelPromise ??= import("./web-D6aUh_IC.js");
|
|
76312
76316
|
return webChannelPromise;
|
|
76313
76317
|
}
|
|
76314
76318
|
function loadWhatsAppActions() {
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { i as resolveGatewayPort, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-
|
|
1
|
+
import { i as resolveGatewayPort, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-CYmyCDsE.js";
|
|
2
2
|
import { c as normalizeMainKey, l as resolveAgentIdFromSessionKey, m as normalizeOptionalAccountId, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID } from "./session-key-BCzIW1Y2.js";
|
|
3
|
-
import { I as resolveUserPath, M as normalizeE164, U as truncateUtf16Safe, dt as resolvePreferredSymiTmpDir, t as CHANNEL_IDS } from "./registry-
|
|
4
|
-
import { n as resolveAgentConfig, u as resolveSessionAgentId } from "./agent-scope-
|
|
5
|
-
import { r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-
|
|
6
|
-
import { _ as runExec, a as DEFAULT_SYMICORE_FILENAME, c as DEFAULT_USER_FILENAME, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SYMIPULSE_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME } from "./workspace-
|
|
7
|
-
import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-
|
|
8
|
-
import { h as isPidAlive, m as resolveProcessScopedMap } from "./auth-profiles-
|
|
9
|
-
import { n as formatCliCommand } from "./env-
|
|
3
|
+
import { I as resolveUserPath, M as normalizeE164, U as truncateUtf16Safe, dt as resolvePreferredSymiTmpDir, t as CHANNEL_IDS } from "./registry-UkL38jvt.js";
|
|
4
|
+
import { n as resolveAgentConfig, u as resolveSessionAgentId } from "./agent-scope-D68_xfTL.js";
|
|
5
|
+
import { r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-DN75fnEF.js";
|
|
6
|
+
import { _ as runExec, a as DEFAULT_SYMICORE_FILENAME, c as DEFAULT_USER_FILENAME, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SYMIPULSE_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME } from "./workspace-DqJ5h-ZB.js";
|
|
7
|
+
import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-DEuVuViW.js";
|
|
8
|
+
import { h as isPidAlive, m as resolveProcessScopedMap } from "./auth-profiles-aJfgABnE.js";
|
|
9
|
+
import { n as formatCliCommand } from "./env-xmBFQPBP.js";
|
|
10
10
|
import { t as parseBooleanValue } from "./boolean-CE7i9tBR.js";
|
|
11
|
-
import { _ as parseDurationMs, a as writeConfigFile, n as loadConfig, s as parseByteSize, t as createConfigIO } from "./config-
|
|
12
|
-
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, D as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, E as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, M as DEFAULT_SYMI_BROWSER_ENABLED, N as DEFAULT_SYMI_BROWSER_PROFILE_NAME, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as stopChromeExtensionRelayServer, _ as fetchJson, a as resolveSymiUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, g as appendCdpPath, h as withBrowserNavigationPolicy, i as launchSymiChrome, j as DEFAULT_SYMI_BROWSER_COLOR, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, m as assertBrowserNavigationAllowed, n as isChromeCdpReady, o as stopSymiChrome, p as InvalidBrowserNavigationUrlError, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as fetchOk, w as isLoopbackHost, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
13
|
-
import { a as syncSkillsToWorkspace, l as resolveSandboxInputPath, m as sanitizeEnvVars, u as resolveSandboxPath } from "./skills-
|
|
11
|
+
import { _ as parseDurationMs, a as writeConfigFile, n as loadConfig, s as parseByteSize, t as createConfigIO } from "./config-Dp67YMkg.js";
|
|
12
|
+
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, D as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, E as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, M as DEFAULT_SYMI_BROWSER_ENABLED, N as DEFAULT_SYMI_BROWSER_PROFILE_NAME, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as stopChromeExtensionRelayServer, _ as fetchJson, a as resolveSymiUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, g as appendCdpPath, h as withBrowserNavigationPolicy, i as launchSymiChrome, j as DEFAULT_SYMI_BROWSER_COLOR, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, m as assertBrowserNavigationAllowed, n as isChromeCdpReady, o as stopSymiChrome, p as InvalidBrowserNavigationUrlError, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as fetchOk, w as isLoopbackHost, x as ensureChromeExtensionRelayServer } from "./chrome-B0yKTuIS.js";
|
|
13
|
+
import { a as syncSkillsToWorkspace, l as resolveSandboxInputPath, m as sanitizeEnvVars, u as resolveSandboxPath } from "./skills-DxmX9HVT.js";
|
|
14
14
|
import { n as formatErrorMessage, t as extractErrorCode } from "./errors-XIsvXeC-.js";
|
|
15
|
-
import { b as openFileWithinRoot, i as getImageMetadata, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS, y as SafeOpenError } from "./image-ops-
|
|
15
|
+
import { b as openFileWithinRoot, i as getImageMetadata, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS, y as SafeOpenError } from "./image-ops-M5agStZn.js";
|
|
16
16
|
import { t as SsrFBlockedError } from "./ssrf-DpUUUgkK.js";
|
|
17
|
-
import { r as saveMediaBuffer, t as ensureMediaDir } from "./store-
|
|
18
|
-
import { d as getChannelDock, o as normalizeThinkLevel, v as normalizeHyphenSlug } from "./thinking-
|
|
19
|
-
import { o as listDeliverableMessageChannels, s as normalizeMessageChannel } from "./message-channel-
|
|
17
|
+
import { r as saveMediaBuffer, t as ensureMediaDir } from "./store-Ea3zM6xK.js";
|
|
18
|
+
import { d as getChannelDock, o as normalizeThinkLevel, v as normalizeHyphenSlug } from "./thinking-C9-JAUzD.js";
|
|
19
|
+
import { o as listDeliverableMessageChannels, s as normalizeMessageChannel } from "./message-channel-DwDSKGn4.js";
|
|
20
20
|
import { t as normalizeChatType } from "./chat-type-3FRbbjbq.js";
|
|
21
21
|
import { n as resolveConversationLabel } from "./conversation-label-Onz2hiJh.js";
|
|
22
|
-
import { r as normalizeChannelId } from "./plugins-
|
|
22
|
+
import { r as normalizeChannelId } from "./plugins-Bkr5ZdYs.js";
|
|
23
23
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-BBh3Gsrx.js";
|
|
24
|
-
import { t as sanitizeContentBlocksImages } from "./tool-images-
|
|
24
|
+
import { t as sanitizeContentBlocksImages } from "./tool-images-B1qVCntj.js";
|
|
25
25
|
import path, { posix } from "node:path";
|
|
26
|
-
import
|
|
26
|
+
import fsSync, { existsSync, realpathSync } from "node:fs";
|
|
27
27
|
import os from "node:os";
|
|
28
|
-
import fs
|
|
28
|
+
import fs from "node:fs/promises";
|
|
29
29
|
import { spawn } from "node:child_process";
|
|
30
30
|
import crypto, { createHash, timingSafeEqual } from "node:crypto";
|
|
31
31
|
import { CURRENT_SESSION_VERSION, SessionManager } from "@mariozechner/pi-coding-agent";
|
|
@@ -126,10 +126,10 @@ function clampToBudget(content, budget) {
|
|
|
126
126
|
async function ensureSessionHeader$1(params) {
|
|
127
127
|
const file = params.sessionFile;
|
|
128
128
|
try {
|
|
129
|
-
await fs
|
|
129
|
+
await fs.stat(file);
|
|
130
130
|
return;
|
|
131
131
|
} catch {}
|
|
132
|
-
await fs
|
|
132
|
+
await fs.mkdir(path.dirname(file), { recursive: true });
|
|
133
133
|
const entry = {
|
|
134
134
|
type: "session",
|
|
135
135
|
version: 2,
|
|
@@ -137,7 +137,7 @@ async function ensureSessionHeader$1(params) {
|
|
|
137
137
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
138
138
|
cwd: params.cwd
|
|
139
139
|
};
|
|
140
|
-
await fs
|
|
140
|
+
await fs.writeFile(file, `${JSON.stringify(entry)}\n`, "utf-8");
|
|
141
141
|
}
|
|
142
142
|
function buildBootstrapContextFiles(files, opts) {
|
|
143
143
|
const maxChars = opts?.maxChars ?? DEFAULT_BOOTSTRAP_MAX_CHARS;
|
|
@@ -933,7 +933,7 @@ function isModuleNotFoundError(err) {
|
|
|
933
933
|
}
|
|
934
934
|
async function loadPwAiModule(mode) {
|
|
935
935
|
try {
|
|
936
|
-
return await import("./pw-ai-
|
|
936
|
+
return await import("./pw-ai-DHoYzirP.js");
|
|
937
937
|
} catch (err) {
|
|
938
938
|
if (mode === "soft") return null;
|
|
939
939
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -1744,7 +1744,7 @@ function registerBrowserAgentDebugRoutes(app, ctx) {
|
|
|
1744
1744
|
run: async ({ cdpUrl, tab, pw }) => {
|
|
1745
1745
|
const id = crypto.randomUUID();
|
|
1746
1746
|
const dir = DEFAULT_TRACE_DIR;
|
|
1747
|
-
await fs
|
|
1747
|
+
await fs.mkdir(dir, { recursive: true });
|
|
1748
1748
|
const tracePathResult = resolvePathWithinRoot({
|
|
1749
1749
|
rootDir: dir,
|
|
1750
1750
|
requestedPath: out,
|
|
@@ -2689,11 +2689,11 @@ async function movePathToTrash(targetPath) {
|
|
|
2689
2689
|
return targetPath;
|
|
2690
2690
|
} catch {
|
|
2691
2691
|
const trashDir = path.join(os.homedir(), ".Trash");
|
|
2692
|
-
|
|
2692
|
+
fsSync.mkdirSync(trashDir, { recursive: true });
|
|
2693
2693
|
const base = path.basename(targetPath);
|
|
2694
2694
|
let dest = path.join(trashDir, `${base}-${Date.now()}`);
|
|
2695
|
-
if (
|
|
2696
|
-
|
|
2695
|
+
if (fsSync.existsSync(dest)) dest = path.join(trashDir, `${base}-${Date.now()}-${Math.random()}`);
|
|
2696
|
+
fsSync.renameSync(targetPath, dest);
|
|
2697
2697
|
return dest;
|
|
2698
2698
|
}
|
|
2699
2699
|
}
|
|
@@ -2771,7 +2771,7 @@ function createBrowserProfilesService(ctx) {
|
|
|
2771
2771
|
} catch {}
|
|
2772
2772
|
const userDataDir = resolveSymiUserDataDir(name);
|
|
2773
2773
|
const profileDir = path.dirname(userDataDir);
|
|
2774
|
-
if (
|
|
2774
|
+
if (fsSync.existsSync(profileDir)) {
|
|
2775
2775
|
await movePathToTrash(profileDir);
|
|
2776
2776
|
deleted = true;
|
|
2777
2777
|
}
|
|
@@ -3473,13 +3473,13 @@ function createProfileContext(opts, profile) {
|
|
|
3473
3473
|
const userDataDir = resolveSymiUserDataDir(profile.name);
|
|
3474
3474
|
const profileState = getProfileState();
|
|
3475
3475
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
3476
|
-
await (await import("./pw-ai-
|
|
3476
|
+
await (await import("./pw-ai-DHoYzirP.js")).closePlaywrightBrowserConnection();
|
|
3477
3477
|
} catch {}
|
|
3478
3478
|
if (profileState.running) await stopRunningBrowser();
|
|
3479
3479
|
try {
|
|
3480
|
-
await (await import("./pw-ai-
|
|
3480
|
+
await (await import("./pw-ai-DHoYzirP.js")).closePlaywrightBrowserConnection();
|
|
3481
3481
|
} catch {}
|
|
3482
|
-
if (!
|
|
3482
|
+
if (!fsSync.existsSync(userDataDir)) return {
|
|
3483
3483
|
moved: false,
|
|
3484
3484
|
from: userDataDir
|
|
3485
3485
|
};
|
|
@@ -3878,7 +3878,7 @@ async function releaseHeldLock(normalizedSessionFile, held, opts = {}) {
|
|
|
3878
3878
|
await held.handle.close();
|
|
3879
3879
|
} catch {}
|
|
3880
3880
|
try {
|
|
3881
|
-
await fs
|
|
3881
|
+
await fs.rm(held.lockPath, { force: true });
|
|
3882
3882
|
} catch {}
|
|
3883
3883
|
})();
|
|
3884
3884
|
try {
|
|
@@ -3898,7 +3898,7 @@ function releaseAllLocksSync() {
|
|
|
3898
3898
|
if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
|
|
3899
3899
|
} catch {}
|
|
3900
3900
|
try {
|
|
3901
|
-
|
|
3901
|
+
fsSync.rmSync(held.lockPath, { force: true });
|
|
3902
3902
|
} catch {}
|
|
3903
3903
|
HELD_LOCKS.delete(sessionFile);
|
|
3904
3904
|
}
|
|
@@ -3957,7 +3957,7 @@ function registerCleanupHandlers() {
|
|
|
3957
3957
|
}
|
|
3958
3958
|
async function readLockPayload(lockPath) {
|
|
3959
3959
|
try {
|
|
3960
|
-
const raw = await fs
|
|
3960
|
+
const raw = await fs.readFile(lockPath, "utf8");
|
|
3961
3961
|
const parsed = JSON.parse(raw);
|
|
3962
3962
|
const payload = {};
|
|
3963
3963
|
if (typeof parsed.pid === "number") payload.pid = parsed.pid;
|
|
@@ -3994,10 +3994,10 @@ async function acquireSessionWriteLock(params) {
|
|
|
3994
3994
|
const maxHoldMs = resolvePositiveMs(params.maxHoldMs, DEFAULT_MAX_HOLD_MS);
|
|
3995
3995
|
const sessionFile = path.resolve(params.sessionFile);
|
|
3996
3996
|
const sessionDir = path.dirname(sessionFile);
|
|
3997
|
-
await fs
|
|
3997
|
+
await fs.mkdir(sessionDir, { recursive: true });
|
|
3998
3998
|
let normalizedDir = sessionDir;
|
|
3999
3999
|
try {
|
|
4000
|
-
normalizedDir = await fs
|
|
4000
|
+
normalizedDir = await fs.realpath(sessionDir);
|
|
4001
4001
|
} catch {}
|
|
4002
4002
|
const normalizedSessionFile = path.join(normalizedDir, path.basename(sessionFile));
|
|
4003
4003
|
const lockPath = `${normalizedSessionFile}.lock`;
|
|
@@ -4014,7 +4014,7 @@ async function acquireSessionWriteLock(params) {
|
|
|
4014
4014
|
while (Date.now() - startedAt < timeoutMs) {
|
|
4015
4015
|
attempt += 1;
|
|
4016
4016
|
try {
|
|
4017
|
-
const handle = await fs
|
|
4017
|
+
const handle = await fs.open(lockPath, "wx");
|
|
4018
4018
|
const createdAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
4019
4019
|
await handle.writeFile(JSON.stringify({
|
|
4020
4020
|
pid: process.pid,
|
|
@@ -4034,7 +4034,7 @@ async function acquireSessionWriteLock(params) {
|
|
|
4034
4034
|
} catch (err) {
|
|
4035
4035
|
if (err.code !== "EEXIST") throw err;
|
|
4036
4036
|
if (inspectLockPayload(await readLockPayload(lockPath), staleMs, Date.now()).stale) {
|
|
4037
|
-
await fs
|
|
4037
|
+
await fs.rm(lockPath, { force: true });
|
|
4038
4038
|
continue;
|
|
4039
4039
|
}
|
|
4040
4040
|
const delay = Math.min(1e3, 50 * attempt);
|
|
@@ -4078,7 +4078,7 @@ async function withRegistryLock(registryPath, fn) {
|
|
|
4078
4078
|
}
|
|
4079
4079
|
async function readRegistryFromFile(registryPath, mode) {
|
|
4080
4080
|
try {
|
|
4081
|
-
const raw = await fs
|
|
4081
|
+
const raw = await fs.readFile(registryPath, "utf-8");
|
|
4082
4082
|
const parsed = JSON.parse(raw);
|
|
4083
4083
|
if (isRegistryFile(parsed)) return parsed;
|
|
4084
4084
|
if (mode === "fallback") return { entries: [] };
|
|
@@ -4091,15 +4091,15 @@ async function readRegistryFromFile(registryPath, mode) {
|
|
|
4091
4091
|
}
|
|
4092
4092
|
}
|
|
4093
4093
|
async function writeRegistryFile(registryPath, registry) {
|
|
4094
|
-
await fs
|
|
4094
|
+
await fs.mkdir(SANDBOX_STATE_DIR, { recursive: true });
|
|
4095
4095
|
const payload = `${JSON.stringify(registry, null, 2)}\n`;
|
|
4096
4096
|
const registryDir = path.dirname(registryPath);
|
|
4097
4097
|
const tempPath = path.join(registryDir, `${path.basename(registryPath)}.${crypto.randomUUID()}.tmp`);
|
|
4098
|
-
await fs
|
|
4098
|
+
await fs.writeFile(tempPath, payload, "utf-8");
|
|
4099
4099
|
try {
|
|
4100
|
-
await fs
|
|
4100
|
+
await fs.rename(tempPath, registryPath);
|
|
4101
4101
|
} catch (error) {
|
|
4102
|
-
await fs
|
|
4102
|
+
await fs.rm(tempPath, { force: true });
|
|
4103
4103
|
throw error;
|
|
4104
4104
|
}
|
|
4105
4105
|
}
|
|
@@ -5699,7 +5699,7 @@ function resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, a
|
|
|
5699
5699
|
}
|
|
5700
5700
|
function archiveFileOnDisk(filePath, reason) {
|
|
5701
5701
|
const archived = `${filePath}.${reason}.${(/* @__PURE__ */ new Date()).toISOString().replaceAll(":", "-")}`;
|
|
5702
|
-
|
|
5702
|
+
fsSync.renameSync(filePath, archived);
|
|
5703
5703
|
return archived;
|
|
5704
5704
|
}
|
|
5705
5705
|
/**
|
|
@@ -5709,7 +5709,7 @@ function archiveFileOnDisk(filePath, reason) {
|
|
|
5709
5709
|
function archiveSessionTranscripts(opts) {
|
|
5710
5710
|
const archived = [];
|
|
5711
5711
|
for (const candidate of resolveSessionTranscriptCandidates(opts.sessionId, opts.storePath, opts.sessionFile, opts.agentId)) {
|
|
5712
|
-
if (!
|
|
5712
|
+
if (!fsSync.existsSync(candidate)) continue;
|
|
5713
5713
|
try {
|
|
5714
5714
|
archived.push(archiveFileOnDisk(candidate, opts.reason));
|
|
5715
5715
|
} catch {}
|
|
@@ -5741,15 +5741,15 @@ async function cleanupArchivedSessionTranscripts(opts) {
|
|
|
5741
5741
|
let removed = 0;
|
|
5742
5742
|
let scanned = 0;
|
|
5743
5743
|
for (const dir of directories) {
|
|
5744
|
-
const entries = await
|
|
5744
|
+
const entries = await fsSync.promises.readdir(dir).catch(() => []);
|
|
5745
5745
|
for (const entry of entries) {
|
|
5746
5746
|
const timestamp = parseArchivedTimestamp(entry, reason);
|
|
5747
5747
|
if (timestamp == null) continue;
|
|
5748
5748
|
scanned += 1;
|
|
5749
5749
|
if (now - timestamp <= opts.olderThanMs) continue;
|
|
5750
5750
|
const fullPath = path.join(dir, entry);
|
|
5751
|
-
if (!(await
|
|
5752
|
-
await
|
|
5751
|
+
if (!(await fsSync.promises.stat(fullPath).catch(() => null))?.isFile()) continue;
|
|
5752
|
+
await fsSync.promises.rm(fullPath).catch(() => void 0);
|
|
5753
5753
|
removed += 1;
|
|
5754
5754
|
}
|
|
5755
5755
|
}
|
|
@@ -5885,7 +5885,7 @@ function isCacheEnabled(ttlMs) {
|
|
|
5885
5885
|
}
|
|
5886
5886
|
function getFileMtimeMs(filePath) {
|
|
5887
5887
|
try {
|
|
5888
|
-
return
|
|
5888
|
+
return fsSync.statSync(filePath).mtimeMs;
|
|
5889
5889
|
} catch {
|
|
5890
5890
|
return;
|
|
5891
5891
|
}
|
|
@@ -5964,7 +5964,7 @@ function loadSessionStore(storePath, opts = {}) {
|
|
|
5964
5964
|
const maxReadAttempts = process.platform === "win32" ? 3 : 1;
|
|
5965
5965
|
const retryBuf = maxReadAttempts > 1 ? new Int32Array(new SharedArrayBuffer(4)) : void 0;
|
|
5966
5966
|
for (let attempt = 0; attempt < maxReadAttempts; attempt++) try {
|
|
5967
|
-
const raw =
|
|
5967
|
+
const raw = fsSync.readFileSync(storePath, "utf-8");
|
|
5968
5968
|
if (raw.length === 0 && attempt < maxReadAttempts - 1) {
|
|
5969
5969
|
Atomics.wait(retryBuf, 0, 0, 50);
|
|
5970
5970
|
continue;
|
|
@@ -6116,7 +6116,7 @@ function capEntryCount(store, overrideMax, opts = {}) {
|
|
|
6116
6116
|
}
|
|
6117
6117
|
async function getSessionFileSize(storePath) {
|
|
6118
6118
|
try {
|
|
6119
|
-
return (await
|
|
6119
|
+
return (await fsSync.promises.stat(storePath)).size;
|
|
6120
6120
|
} catch {
|
|
6121
6121
|
return null;
|
|
6122
6122
|
}
|
|
@@ -6133,7 +6133,7 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
6133
6133
|
if (fileSize <= maxBytes) return false;
|
|
6134
6134
|
const backupPath = `${storePath}.bak.${Date.now()}`;
|
|
6135
6135
|
try {
|
|
6136
|
-
await
|
|
6136
|
+
await fsSync.promises.rename(storePath, backupPath);
|
|
6137
6137
|
log.info("rotated session store file", {
|
|
6138
6138
|
backupPath: path.basename(backupPath),
|
|
6139
6139
|
sizeBytes: fileSize
|
|
@@ -6144,11 +6144,11 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
6144
6144
|
try {
|
|
6145
6145
|
const dir = path.dirname(storePath);
|
|
6146
6146
|
const baseName = path.basename(storePath);
|
|
6147
|
-
const backups = (await
|
|
6147
|
+
const backups = (await fsSync.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
|
|
6148
6148
|
const maxBackups = 3;
|
|
6149
6149
|
if (backups.length > maxBackups) {
|
|
6150
6150
|
const toDelete = backups.slice(maxBackups);
|
|
6151
|
-
for (const old of toDelete) await
|
|
6151
|
+
for (const old of toDelete) await fsSync.promises.unlink(path.join(dir, old)).catch(() => void 0);
|
|
6152
6152
|
log.info("cleaned up old session store backups", { deleted: toDelete.length });
|
|
6153
6153
|
}
|
|
6154
6154
|
} catch {}
|
|
@@ -6203,14 +6203,14 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
6203
6203
|
await rotateSessionFile(storePath, maintenance.rotateBytes);
|
|
6204
6204
|
}
|
|
6205
6205
|
}
|
|
6206
|
-
await
|
|
6206
|
+
await fsSync.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
6207
6207
|
const json = JSON.stringify(store, null, 2);
|
|
6208
6208
|
if (process.platform === "win32") {
|
|
6209
6209
|
const tmp = `${storePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
6210
6210
|
try {
|
|
6211
|
-
await
|
|
6211
|
+
await fsSync.promises.writeFile(tmp, json, "utf-8");
|
|
6212
6212
|
for (let i = 0; i < 5; i++) try {
|
|
6213
|
-
await
|
|
6213
|
+
await fsSync.promises.rename(tmp, storePath);
|
|
6214
6214
|
break;
|
|
6215
6215
|
} catch {
|
|
6216
6216
|
if (i < 4) await new Promise((r) => setTimeout(r, 50 * (i + 1)));
|
|
@@ -6220,27 +6220,27 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
6220
6220
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") return;
|
|
6221
6221
|
throw err;
|
|
6222
6222
|
} finally {
|
|
6223
|
-
await
|
|
6223
|
+
await fsSync.promises.rm(tmp, { force: true }).catch(() => void 0);
|
|
6224
6224
|
}
|
|
6225
6225
|
return;
|
|
6226
6226
|
}
|
|
6227
6227
|
const tmp = `${storePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
6228
6228
|
try {
|
|
6229
|
-
await
|
|
6229
|
+
await fsSync.promises.writeFile(tmp, json, {
|
|
6230
6230
|
mode: 384,
|
|
6231
6231
|
encoding: "utf-8"
|
|
6232
6232
|
});
|
|
6233
|
-
await
|
|
6234
|
-
await
|
|
6233
|
+
await fsSync.promises.rename(tmp, storePath);
|
|
6234
|
+
await fsSync.promises.chmod(storePath, 384);
|
|
6235
6235
|
} catch (err) {
|
|
6236
6236
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") {
|
|
6237
6237
|
try {
|
|
6238
|
-
await
|
|
6239
|
-
await
|
|
6238
|
+
await fsSync.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
6239
|
+
await fsSync.promises.writeFile(storePath, json, {
|
|
6240
6240
|
mode: 384,
|
|
6241
6241
|
encoding: "utf-8"
|
|
6242
6242
|
});
|
|
6243
|
-
await
|
|
6243
|
+
await fsSync.promises.chmod(storePath, 384);
|
|
6244
6244
|
} catch (err2) {
|
|
6245
6245
|
if ((err2 && typeof err2 === "object" && "code" in err2 ? String(err2.code) : null) === "ENOENT") return;
|
|
6246
6246
|
throw err2;
|
|
@@ -6249,7 +6249,7 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
6249
6249
|
}
|
|
6250
6250
|
throw err;
|
|
6251
6251
|
} finally {
|
|
6252
|
-
await
|
|
6252
|
+
await fsSync.promises.rm(tmp, { force: true });
|
|
6253
6253
|
}
|
|
6254
6254
|
}
|
|
6255
6255
|
async function updateSessionStore(storePath, mutator, opts) {
|
|
@@ -6494,8 +6494,8 @@ function resolveMirroredTranscriptText(params) {
|
|
|
6494
6494
|
return trimmed ? trimmed : null;
|
|
6495
6495
|
}
|
|
6496
6496
|
async function ensureSessionHeader(params) {
|
|
6497
|
-
if (
|
|
6498
|
-
await
|
|
6497
|
+
if (fsSync.existsSync(params.sessionFile)) return;
|
|
6498
|
+
await fsSync.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
|
|
6499
6499
|
const header = {
|
|
6500
6500
|
type: "session",
|
|
6501
6501
|
version: CURRENT_SESSION_VERSION,
|
|
@@ -6503,7 +6503,7 @@ async function ensureSessionHeader(params) {
|
|
|
6503
6503
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6504
6504
|
cwd: process.cwd()
|
|
6505
6505
|
};
|
|
6506
|
-
await
|
|
6506
|
+
await fsSync.promises.writeFile(params.sessionFile, `${JSON.stringify(header)}\n`, {
|
|
6507
6507
|
encoding: "utf-8",
|
|
6508
6508
|
mode: 384
|
|
6509
6509
|
});
|
|
@@ -6712,7 +6712,7 @@ function formatSandboxToolPolicyBlockedMessage(params) {
|
|
|
6712
6712
|
//#endregion
|
|
6713
6713
|
//#region src/agents/sandbox/workspace.ts
|
|
6714
6714
|
async function ensureSandboxWorkspace(workspaceDir, seedFrom, skipBootstrap) {
|
|
6715
|
-
await fs
|
|
6715
|
+
await fs.mkdir(workspaceDir, { recursive: true });
|
|
6716
6716
|
if (seedFrom) {
|
|
6717
6717
|
const seed = resolveUserPath(seedFrom);
|
|
6718
6718
|
const files = [
|
|
@@ -6728,11 +6728,11 @@ async function ensureSandboxWorkspace(workspaceDir, seedFrom, skipBootstrap) {
|
|
|
6728
6728
|
const src = path.join(seed, name);
|
|
6729
6729
|
const dest = path.join(workspaceDir, name);
|
|
6730
6730
|
try {
|
|
6731
|
-
await fs
|
|
6731
|
+
await fs.access(dest);
|
|
6732
6732
|
} catch {
|
|
6733
6733
|
try {
|
|
6734
|
-
const content = await fs
|
|
6735
|
-
await fs
|
|
6734
|
+
const content = await fs.readFile(src, "utf-8");
|
|
6735
|
+
await fs.writeFile(dest, content, {
|
|
6736
6736
|
encoding: "utf-8",
|
|
6737
6737
|
flag: "wx"
|
|
6738
6738
|
});
|
|
@@ -6767,7 +6767,7 @@ async function ensureSandboxWorkspaceLayout(params) {
|
|
|
6767
6767
|
const message = error instanceof Error ? error.message : JSON.stringify(error);
|
|
6768
6768
|
defaultRuntime.error?.(`Sandbox skill sync failed: ${message}`);
|
|
6769
6769
|
}
|
|
6770
|
-
} else await fs
|
|
6770
|
+
} else await fs.mkdir(workspaceDir, { recursive: true });
|
|
6771
6771
|
return {
|
|
6772
6772
|
agentWorkspaceDir,
|
|
6773
6773
|
scopeKey,
|