@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
|
@@ -1,77 +1,77 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-
|
|
2
|
+
import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-CYmyCDsE.js";
|
|
3
3
|
import { _ as isCronSessionKey, b as resolveThreadParentSessionKey, c as normalizeMainKey, d as sanitizeAgentId, f as DEFAULT_ACCOUNT_ID, g as isAcpSessionKey, h as getSubagentDepth, l as resolveAgentIdFromSessionKey, o as classifySessionKeyShape, p as normalizeAccountId$2, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID, u as resolveThreadSessionKeys, v as isSubagentSessionKey, y as parseAgentSessionKey } from "./session-key-BCzIW1Y2.js";
|
|
4
|
-
import { $ as warn, B as sleep$1, D as escapeRegExp, E as ensureDir$3, G as danger, I as resolveUserPath, J as logVerbose, M as normalizeE164, O as formatTerminalLink, R as shortenHomeInString, S as CONFIG_DIR, U as truncateUtf16Safe, V as sliceUtf16Safe, W as isPlainObject, X as setVerbose, Z as shouldLogVerbose, _ as matchPluginCommand, a as normalizeAnyChannelId, d as createPluginRegistry, dt as resolvePreferredSymiTmpDir, et as colorize, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, k as isRecord$1, l as requireActivePluginRegistry, lt as normalizeLogLevel, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, nt as theme, o as normalizeChannelId, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, rt as getChildLogger, tt as isRich, u as setActivePluginRegistry, v as createInternalHookEvent, w as clampInt, x as triggerInternalHook, z as shortenHomePath } from "./registry-
|
|
5
|
-
import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, d as resolveSessionAgentIds, i as resolveAgentModelFallbacksOverride, l as resolveEffectiveModelFallbacks, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId } from "./agent-scope-
|
|
6
|
-
import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-
|
|
7
|
-
import { S as logWarn, _ as runExec, b as logError, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, m as resolveSymiPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug } from "./workspace-
|
|
8
|
-
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-
|
|
9
|
-
import { $ as resolveAuthProfileDisplayLabel, B as resolveApiKeyForProvider, C as normalizeProviderId, D as resolveModelRefFromString, E as resolveDefaultModelForAgent, F as OLLAMA_NATIVE_BASE_URL, G as getShellPathFromLoginShell, H as resolveModelAuthMode, I as createOllamaStreamFn, L as getApiKeyForModel, O as resolveSubagentSpawnModelSelection, Q as DEFAULT_PROVIDER, R as getCustomProviderApiKey, S as normalizeModelRef$2, T as resolveConfiguredModelRef, V as resolveEnvApiKey, W as normalizeSecretInput, X as DEFAULT_CONTEXT_TOKENS, Z as DEFAULT_MODEL, _ as buildConfiguredAllowlistKeys, a as markAuthProfileFailure, b as isCliProvider, c as dedupeProfileIds, d as ensureAuthProfileStore, et as resolveSymiAgentDir, f as resolveAuthStorePathForDisplay, g as buildAllowedModelSet, i as isProfileInCooldown, k as resolveThinkingDefault, l as listProfilesForProvider, n as resolveAuthProfileOrder, o as markAuthProfileUsed, p as withFileLock, q as resolveShellEnvFallbackTimeoutMs, r as getSoonestCooldownExpiry, s as resolveApiKeyForProfile, u as markAuthProfileGood, v as buildModelAliasIndex, x as modelKey, y as findNormalizedProviderValue, z as requireApiKey } from "./auth-profiles-
|
|
10
|
-
import { n as formatCliCommand, r as resolveCliName, t as isTruthyEnvValue } from "./env-
|
|
11
|
-
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-
|
|
4
|
+
import { $ as warn, B as sleep$1, D as escapeRegExp, E as ensureDir$3, G as danger, I as resolveUserPath, J as logVerbose, M as normalizeE164, O as formatTerminalLink, R as shortenHomeInString, S as CONFIG_DIR, U as truncateUtf16Safe, V as sliceUtf16Safe, W as isPlainObject, X as setVerbose, Z as shouldLogVerbose, _ as matchPluginCommand, a as normalizeAnyChannelId, d as createPluginRegistry, dt as resolvePreferredSymiTmpDir, et as colorize, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, k as isRecord$1, l as requireActivePluginRegistry, lt as normalizeLogLevel, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, nt as theme, o as normalizeChannelId, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, rt as getChildLogger, tt as isRich, u as setActivePluginRegistry, v as createInternalHookEvent, w as clampInt, x as triggerInternalHook, z as shortenHomePath } from "./registry-UkL38jvt.js";
|
|
5
|
+
import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, d as resolveSessionAgentIds, i as resolveAgentModelFallbacksOverride, l as resolveEffectiveModelFallbacks, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId } from "./agent-scope-D68_xfTL.js";
|
|
6
|
+
import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-DN75fnEF.js";
|
|
7
|
+
import { S as logWarn, _ as runExec, b as logError, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, m as resolveSymiPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug } from "./workspace-DqJ5h-ZB.js";
|
|
8
|
+
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-DEuVuViW.js";
|
|
9
|
+
import { $ as resolveAuthProfileDisplayLabel, B as resolveApiKeyForProvider, C as normalizeProviderId, D as resolveModelRefFromString, E as resolveDefaultModelForAgent, F as OLLAMA_NATIVE_BASE_URL, G as getShellPathFromLoginShell, H as resolveModelAuthMode, I as createOllamaStreamFn, L as getApiKeyForModel, O as resolveSubagentSpawnModelSelection, Q as DEFAULT_PROVIDER, R as getCustomProviderApiKey, S as normalizeModelRef$2, T as resolveConfiguredModelRef, V as resolveEnvApiKey, W as normalizeSecretInput, X as DEFAULT_CONTEXT_TOKENS, Z as DEFAULT_MODEL, _ as buildConfiguredAllowlistKeys, a as markAuthProfileFailure, b as isCliProvider, c as dedupeProfileIds, d as ensureAuthProfileStore, et as resolveSymiAgentDir, f as resolveAuthStorePathForDisplay, g as buildAllowedModelSet, i as isProfileInCooldown, k as resolveThinkingDefault, l as listProfilesForProvider, n as resolveAuthProfileOrder, o as markAuthProfileUsed, p as withFileLock, q as resolveShellEnvFallbackTimeoutMs, r as getSoonestCooldownExpiry, s as resolveApiKeyForProfile, u as markAuthProfileGood, v as buildModelAliasIndex, x as modelKey, y as findNormalizedProviderValue, z as requireApiKey } from "./auth-profiles-aJfgABnE.js";
|
|
10
|
+
import { n as formatCliCommand, r as resolveCliName, t as isTruthyEnvValue } from "./env-xmBFQPBP.js";
|
|
11
|
+
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-B8B2pmph.js";
|
|
12
12
|
import { t as parseBooleanValue$1 } from "./boolean-CE7i9tBR.js";
|
|
13
|
-
import { $ as normalizeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, G as updateLastRoute, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as isCacheEnabled, Jt as ensureSessionHeader, K as updateSessionStore, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as mergeDeliveryContext, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as deliveryContextFromSession, Xt as resolveBootstrapTotalMaxChars, Y as resolveCacheTtlMs$1, Yt as resolveBootstrapMaxChars, Z as deliveryContextKey, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as resolveFreshSessionTotalTokens, a as isMessagingToolDuplicateNormalized, at as extractToolCallNames, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as hasInterSessionUserProvenance, d as isAntigravityClaude, dt as evaluateSessionFreshness, et as normalizeSessionDeliveryFields, f as isGoogleModelApi, ft as resolveChannelResetConfig, g as formatBillingErrorMessage, gt as DEFAULT_RESET_TRIGGERS, h as formatAssistantErrorText, ht as resolveThreadFlag, it as countToolResults, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as normalizeInputProvenance, m as classifyFailoverReason, mt as resolveSessionResetType, n as validateGeminiTurns, nt as archiveSessionTranscripts, o as normalizeTextForComparison, ot as INPUT_PROVENANCE_KIND_VALUES, p as BILLING_ERROR_USER_MESSAGE, pt as resolveSessionResetPolicy, q as updateSessionStoreEntry, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as capArrayByJsonBytes, s as sanitizeSessionMessagesImages, st as applyInputProvenanceToUserMessage, t as validateAnthropicTurns, tt as normalizeAccountId$3, u as downgradeOpenAIReasoningBlocks, ut as resolveSessionKey, v as getApiErrorPayloadFingerprint, vt as canonicalizeMainSessionAlias, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-
|
|
14
|
-
import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-
|
|
15
|
-
import { a as applyTestPluginDefaults, c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, i as safeStatSync, n as discoverSymiPlugins, o as normalizePluginsConfig, r as isPathInside, s as resolveEnableState, t as loadPluginManifestRegistry, u as isPathInsideWithRealpath } from "./manifest-registry-
|
|
16
|
-
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
17
|
-
import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-
|
|
13
|
+
import { $ as normalizeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, G as updateLastRoute, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as isCacheEnabled, Jt as ensureSessionHeader, K as updateSessionStore, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as mergeDeliveryContext, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as deliveryContextFromSession, Xt as resolveBootstrapTotalMaxChars, Y as resolveCacheTtlMs$1, Yt as resolveBootstrapMaxChars, Z as deliveryContextKey, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as resolveFreshSessionTotalTokens, a as isMessagingToolDuplicateNormalized, at as extractToolCallNames, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as hasInterSessionUserProvenance, d as isAntigravityClaude, dt as evaluateSessionFreshness, et as normalizeSessionDeliveryFields, f as isGoogleModelApi, ft as resolveChannelResetConfig, g as formatBillingErrorMessage, gt as DEFAULT_RESET_TRIGGERS, h as formatAssistantErrorText, ht as resolveThreadFlag, it as countToolResults, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as normalizeInputProvenance, m as classifyFailoverReason, mt as resolveSessionResetType, n as validateGeminiTurns, nt as archiveSessionTranscripts, o as normalizeTextForComparison, ot as INPUT_PROVENANCE_KIND_VALUES, p as BILLING_ERROR_USER_MESSAGE, pt as resolveSessionResetPolicy, q as updateSessionStoreEntry, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as capArrayByJsonBytes, s as sanitizeSessionMessagesImages, st as applyInputProvenanceToUserMessage, t as validateAnthropicTurns, tt as normalizeAccountId$3, u as downgradeOpenAIReasoningBlocks, ut as resolveSessionKey, v as getApiErrorPayloadFingerprint, vt as canonicalizeMainSessionAlias, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-CFTCaByg.js";
|
|
14
|
+
import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-Dp67YMkg.js";
|
|
15
|
+
import { a as applyTestPluginDefaults, c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, i as safeStatSync, n as discoverSymiPlugins, o as normalizePluginsConfig, r as isPathInside, s as resolveEnableState, t as loadPluginManifestRegistry, u as isPathInsideWithRealpath } from "./manifest-registry-QT5_77XA.js";
|
|
16
|
+
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-B0yKTuIS.js";
|
|
17
|
+
import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-DxmX9HVT.js";
|
|
18
18
|
import { n as formatErrorMessage, r as formatUncaughtError } from "./errors-XIsvXeC-.js";
|
|
19
|
-
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-
|
|
19
|
+
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-M5agStZn.js";
|
|
20
20
|
import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-DpUUUgkK.js";
|
|
21
|
-
import { n as getMediaDir, r as saveMediaBuffer } from "./store-
|
|
22
|
-
import { _ as normalizeAtHashSlug, a as normalizeReasoningLevel, b as normalizeStringEntriesLower, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, g as resolveChannelGroupToolsPolicy, h as resolveChannelGroupRequireMention, i as normalizeElevatedLevel, l as resolveResponseUsageMode, m as resolveChannelGroupPolicy, n as formatXHighModelHint, o as normalizeThinkLevel, p as normalizeSignalMessagingTarget, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking, v as normalizeHyphenSlug, y as normalizeStringEntries } from "./thinking-
|
|
23
|
-
import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-
|
|
21
|
+
import { n as getMediaDir, r as saveMediaBuffer } from "./store-Ea3zM6xK.js";
|
|
22
|
+
import { _ as normalizeAtHashSlug, a as normalizeReasoningLevel, b as normalizeStringEntriesLower, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, g as resolveChannelGroupToolsPolicy, h as resolveChannelGroupRequireMention, i as normalizeElevatedLevel, l as resolveResponseUsageMode, m as resolveChannelGroupPolicy, n as formatXHighModelHint, o as normalizeThinkLevel, p as normalizeSignalMessagingTarget, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking, v as normalizeHyphenSlug, y as normalizeStringEntries } from "./thinking-C9-JAUzD.js";
|
|
23
|
+
import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-DwDSKGn4.js";
|
|
24
24
|
import { t as normalizeChatType } from "./chat-type-3FRbbjbq.js";
|
|
25
25
|
import { n as resolveConversationLabel } from "./conversation-label-Onz2hiJh.js";
|
|
26
|
-
import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, g as listEnabledDiscordAccounts, h as createDiscordActionGate, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackBotToken, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAppToken, r as normalizeChannelId$1, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-
|
|
27
|
-
import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-
|
|
28
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
29
|
-
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-
|
|
30
|
-
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-
|
|
31
|
-
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-
|
|
26
|
+
import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, g as listEnabledDiscordAccounts, h as createDiscordActionGate, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackBotToken, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAppToken, r as normalizeChannelId$1, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-Bkr5ZdYs.js";
|
|
27
|
+
import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-D1r2dq1t.js";
|
|
28
|
+
import { t as resolveIMessageAccount } from "./accounts-dRUMQQrB.js";
|
|
29
|
+
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-wSphH5gv.js";
|
|
30
|
+
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-DERqzyba.js";
|
|
31
|
+
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-DQoKXmre.js";
|
|
32
32
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-BBh3Gsrx.js";
|
|
33
|
-
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-
|
|
34
|
-
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-
|
|
35
|
-
import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-
|
|
33
|
+
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-B1qVCntj.js";
|
|
34
|
+
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-DPWY9adX.js";
|
|
35
|
+
import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-DIKKFHpP.js";
|
|
36
36
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-Zw87xFym.js";
|
|
37
|
-
import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-
|
|
38
|
-
import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-
|
|
39
|
-
import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-
|
|
40
|
-
import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normalizeAllowFromWithStore$1, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as formatLocationText, H as firstDefined$1, I as resolveTelegramReplyId, J as readChannelAllowFromStore, K as toLocationContext, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as listPairingChannels, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as isSenderIdAllowed, V as resolveSenderAllowMatch, W as mergeAllowFromSources, X as upsertChannelPairingRequest, Y as removeChannelAllowFromStoreEntry, Z as getPairingAdapter, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildGroupLabel, c as sendStickerTelegram, d as wasSentByBot, et as parseTelegramTarget, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as addChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as resolveTelegramTargetChatType, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-
|
|
37
|
+
import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-DCB54N2j.js";
|
|
38
|
+
import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-Q3FwtPeJ.js";
|
|
39
|
+
import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-CCZl4YHT.js";
|
|
40
|
+
import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normalizeAllowFromWithStore$1, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as formatLocationText, H as firstDefined$1, I as resolveTelegramReplyId, J as readChannelAllowFromStore, K as toLocationContext, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as listPairingChannels, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as isSenderIdAllowed, V as resolveSenderAllowMatch, W as mergeAllowFromSources, X as upsertChannelPairingRequest, Y as removeChannelAllowFromStoreEntry, Z as getPairingAdapter, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildGroupLabel, c as sendStickerTelegram, d as wasSentByBot, et as parseTelegramTarget, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as addChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as resolveTelegramTargetChatType, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-CF_nzDHe.js";
|
|
41
41
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-CuZX_Q4t.js";
|
|
42
|
-
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
43
|
-
import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-
|
|
44
|
-
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-
|
|
45
|
-
import { n as retryAsync } from "./retry-
|
|
46
|
-
import { a as createActionGate, c as jsonResult, d as readReactionParams, f as readStringArrayParam, l as parseAvailableTags, m as readStringParam, n as missingTargetError, o as imageResult, p as readStringOrNumberParam, r as unknownTargetError, s as imageResultFromFile, t as ambiguousTargetError, u as readNumberParam } from "./target-errors-
|
|
47
|
-
import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-
|
|
48
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
42
|
+
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-ZnX2V-k9.js";
|
|
43
|
+
import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-ayAJucg2.js";
|
|
44
|
+
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-JHY-uOmS.js";
|
|
45
|
+
import { n as retryAsync } from "./retry-D25Z8MVS.js";
|
|
46
|
+
import { a as createActionGate, c as jsonResult, d as readReactionParams, f as readStringArrayParam, l as parseAvailableTags, m as readStringParam, n as missingTargetError, o as imageResult, p as readStringOrNumberParam, r as unknownTargetError, s as imageResultFromFile, t as ambiguousTargetError, u as readNumberParam } from "./target-errors-Pr77jao5.js";
|
|
47
|
+
import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-B9x_1qSr.js";
|
|
48
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-DuRhvVpP.js";
|
|
49
49
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-Cj6kcyGt.js";
|
|
50
|
-
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-
|
|
51
|
-
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-
|
|
52
|
-
import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-
|
|
53
|
-
import { _ as CLI_OUTPUT_MAX_BUFFER, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as resolveMediaUnderstandingScope, h as normalizeMediaUnderstandingChatType, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveTimeoutMs$1, n as createMediaAttachmentCache, o as runCapability, p as resolveConcurrency, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as applyTemplate, y as registerUnhandledRejectionHandler } from "./runner-
|
|
54
|
-
import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-
|
|
50
|
+
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-Bh5xx9IO.js";
|
|
51
|
+
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-Z9axTYHx.js";
|
|
52
|
+
import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-CeBC8Vy2.js";
|
|
53
|
+
import { _ as CLI_OUTPUT_MAX_BUFFER, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as resolveMediaUnderstandingScope, h as normalizeMediaUnderstandingChatType, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveTimeoutMs$1, n as createMediaAttachmentCache, o as runCapability, p as resolveConcurrency, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as applyTemplate, y as registerUnhandledRejectionHandler } from "./runner-C-ygJOAu.js";
|
|
54
|
+
import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-CKXkvl80.js";
|
|
55
55
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-Dvqh1Tgb.js";
|
|
56
56
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-Dnti0cFs.js";
|
|
57
57
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-BGS2SHjF.js";
|
|
58
|
-
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-
|
|
58
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-Cm1OJRbv.js";
|
|
59
59
|
import { n as normalizePollInput } from "./polls-BKbIUHj7.js";
|
|
60
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
61
|
-
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-
|
|
62
|
-
import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-
|
|
63
|
-
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-
|
|
60
|
+
import { t as convertMarkdownTables } from "./tables-Dkg9O8rv.js";
|
|
61
|
+
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-BJhQtCyM.js";
|
|
62
|
+
import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-Cf47Nas6.js";
|
|
63
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-gl0ZOOKR.js";
|
|
64
64
|
import { t as makeProxyFetch } from "./proxy-DVy9foH0.js";
|
|
65
|
-
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
66
|
-
import { t as getActiveWebListener } from "./active-listener-
|
|
65
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-CWH084Xr.js";
|
|
66
|
+
import { t as getActiveWebListener } from "./active-listener-C3pfJhdC.js";
|
|
67
67
|
import { createRequire } from "node:module";
|
|
68
68
|
import * as path$1 from "node:path";
|
|
69
69
|
import path from "node:path";
|
|
70
|
-
import
|
|
70
|
+
import fsSync, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
71
71
|
import os, { homedir } from "node:os";
|
|
72
72
|
import JSON5 from "json5";
|
|
73
|
-
import * as fs$
|
|
74
|
-
import fs
|
|
73
|
+
import * as fs$1 from "node:fs/promises";
|
|
74
|
+
import fs from "node:fs/promises";
|
|
75
75
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
76
76
|
import { inspect, promisify } from "node:util";
|
|
77
77
|
import { fileURLToPath } from "node:url";
|
|
@@ -4010,7 +4010,7 @@ async function resolveSymiDocsPath(params) {
|
|
|
4010
4010
|
const workspaceDir = params.workspaceDir?.trim();
|
|
4011
4011
|
if (workspaceDir) {
|
|
4012
4012
|
const workspaceDocs = path.join(workspaceDir, "docs");
|
|
4013
|
-
if (
|
|
4013
|
+
if (fsSync.existsSync(workspaceDocs)) return workspaceDocs;
|
|
4014
4014
|
}
|
|
4015
4015
|
const packageRoot = await resolveSymiPackageRoot({
|
|
4016
4016
|
cwd: params.cwd,
|
|
@@ -4019,7 +4019,7 @@ async function resolveSymiDocsPath(params) {
|
|
|
4019
4019
|
});
|
|
4020
4020
|
if (!packageRoot) return null;
|
|
4021
4021
|
const packageDocs = path.join(packageRoot, "docs");
|
|
4022
|
-
return
|
|
4022
|
+
return fsSync.existsSync(packageDocs) ? packageDocs : null;
|
|
4023
4023
|
}
|
|
4024
4024
|
|
|
4025
4025
|
//#endregion
|
|
@@ -4328,7 +4328,7 @@ async function getMemorySearchManager(params) {
|
|
|
4328
4328
|
if (cached) return { manager: cached };
|
|
4329
4329
|
}
|
|
4330
4330
|
try {
|
|
4331
|
-
const { QmdMemoryManager } = await import("./qmd-manager-
|
|
4331
|
+
const { QmdMemoryManager } = await import("./qmd-manager-8-Z3Cdpt.js");
|
|
4332
4332
|
const primary = await QmdMemoryManager.create({
|
|
4333
4333
|
cfg: params.cfg,
|
|
4334
4334
|
agentId: params.agentId,
|
|
@@ -4340,7 +4340,7 @@ async function getMemorySearchManager(params) {
|
|
|
4340
4340
|
const wrapper = new FallbackMemoryManager({
|
|
4341
4341
|
primary,
|
|
4342
4342
|
fallbackFactory: async () => {
|
|
4343
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
4343
|
+
const { MemoryIndexManager } = await import("./manager-ayAJucg2.js").then((n) => n.t);
|
|
4344
4344
|
return await MemoryIndexManager.get(params);
|
|
4345
4345
|
}
|
|
4346
4346
|
}, () => QMD_MANAGER_CACHE.delete(cacheKey));
|
|
@@ -4353,7 +4353,7 @@ async function getMemorySearchManager(params) {
|
|
|
4353
4353
|
}
|
|
4354
4354
|
}
|
|
4355
4355
|
try {
|
|
4356
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
4356
|
+
const { MemoryIndexManager } = await import("./manager-ayAJucg2.js").then((n) => n.t);
|
|
4357
4357
|
return { manager: await MemoryIndexManager.get(params) };
|
|
4358
4358
|
} catch (err) {
|
|
4359
4359
|
return {
|
|
@@ -6931,7 +6931,7 @@ async function recordLoopOutcome(args) {
|
|
|
6931
6931
|
if (!args.ctx?.sessionKey) return;
|
|
6932
6932
|
try {
|
|
6933
6933
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
|
|
6934
|
-
const { recordToolCallOutcome } = await import("./tool-loop-detection-
|
|
6934
|
+
const { recordToolCallOutcome } = await import("./tool-loop-detection-C33wf43N.js");
|
|
6935
6935
|
recordToolCallOutcome(getDiagnosticSessionState({
|
|
6936
6936
|
sessionKey: args.ctx.sessionKey,
|
|
6937
6937
|
sessionId: args.ctx?.agentId
|
|
@@ -6952,8 +6952,8 @@ async function runBeforeToolCallHook(args) {
|
|
|
6952
6952
|
const params = args.params;
|
|
6953
6953
|
if (args.ctx?.sessionKey) {
|
|
6954
6954
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
|
|
6955
|
-
const { logToolLoopAction } = await import("./diagnostic-
|
|
6956
|
-
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-
|
|
6955
|
+
const { logToolLoopAction } = await import("./diagnostic-DIKKFHpP.js").then((n) => n.n);
|
|
6956
|
+
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-C33wf43N.js");
|
|
6957
6957
|
const sessionState = getDiagnosticSessionState({
|
|
6958
6958
|
sessionKey: args.ctx.sessionKey,
|
|
6959
6959
|
sessionId: args.ctx?.agentId
|
|
@@ -7240,7 +7240,7 @@ function resolveDefaultIdentityPath() {
|
|
|
7240
7240
|
return path.join(resolveStateDir(), "identity", "device.json");
|
|
7241
7241
|
}
|
|
7242
7242
|
function ensureDir$2(filePath) {
|
|
7243
|
-
|
|
7243
|
+
fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
7244
7244
|
}
|
|
7245
7245
|
const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
|
|
7246
7246
|
function base64UrlEncode(buf) {
|
|
@@ -7276,8 +7276,8 @@ function generateIdentity() {
|
|
|
7276
7276
|
}
|
|
7277
7277
|
function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
7278
7278
|
try {
|
|
7279
|
-
if (
|
|
7280
|
-
const raw =
|
|
7279
|
+
if (fsSync.existsSync(filePath)) {
|
|
7280
|
+
const raw = fsSync.readFileSync(filePath, "utf8");
|
|
7281
7281
|
const parsed = JSON.parse(raw);
|
|
7282
7282
|
if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
|
|
7283
7283
|
const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
|
|
@@ -7286,9 +7286,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
7286
7286
|
...parsed,
|
|
7287
7287
|
deviceId: derivedId
|
|
7288
7288
|
};
|
|
7289
|
-
|
|
7289
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
|
|
7290
7290
|
try {
|
|
7291
|
-
|
|
7291
|
+
fsSync.chmodSync(filePath, 384);
|
|
7292
7292
|
} catch {}
|
|
7293
7293
|
return {
|
|
7294
7294
|
deviceId: derivedId,
|
|
@@ -7313,9 +7313,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
7313
7313
|
privateKeyPem: identity.privateKeyPem,
|
|
7314
7314
|
createdAtMs: Date.now()
|
|
7315
7315
|
};
|
|
7316
|
-
|
|
7316
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
|
|
7317
7317
|
try {
|
|
7318
|
-
|
|
7318
|
+
fsSync.chmodSync(filePath, 384);
|
|
7319
7319
|
} catch {}
|
|
7320
7320
|
return identity;
|
|
7321
7321
|
}
|
|
@@ -7338,7 +7338,7 @@ function normalizeFingerprint(input) {
|
|
|
7338
7338
|
const execFileAsync = promisify(execFile);
|
|
7339
7339
|
async function fileExists(filePath) {
|
|
7340
7340
|
try {
|
|
7341
|
-
await fs
|
|
7341
|
+
await fs.access(filePath);
|
|
7342
7342
|
return true;
|
|
7343
7343
|
} catch {
|
|
7344
7344
|
return false;
|
|
@@ -7365,8 +7365,8 @@ async function generateSelfSignedCert(params) {
|
|
|
7365
7365
|
"-subj",
|
|
7366
7366
|
"/CN=symi-gateway"
|
|
7367
7367
|
]);
|
|
7368
|
-
await fs
|
|
7369
|
-
await fs
|
|
7368
|
+
await fs.chmod(params.keyPath, 384).catch(() => {});
|
|
7369
|
+
await fs.chmod(params.certPath, 384).catch(() => {});
|
|
7370
7370
|
params.log?.info?.(`gateway tls: generated self-signed cert at ${shortenHomeInString(params.certPath)}`);
|
|
7371
7371
|
}
|
|
7372
7372
|
async function loadGatewayTlsRuntime(cfg, log) {
|
|
@@ -7404,9 +7404,9 @@ async function loadGatewayTlsRuntime(cfg, log) {
|
|
|
7404
7404
|
error: "gateway tls: cert/key missing"
|
|
7405
7405
|
};
|
|
7406
7406
|
try {
|
|
7407
|
-
const cert = await fs
|
|
7408
|
-
const key = await fs
|
|
7409
|
-
const ca = caPath ? await fs
|
|
7407
|
+
const cert = await fs.readFile(certPath, "utf8");
|
|
7408
|
+
const key = await fs.readFile(keyPath, "utf8");
|
|
7409
|
+
const ca = caPath ? await fs.readFile(caPath, "utf8") : void 0;
|
|
7410
7410
|
const fingerprintSha256 = normalizeFingerprint(new X509Certificate(cert).fingerprint256 ?? "");
|
|
7411
7411
|
if (!fingerprintSha256) return {
|
|
7412
7412
|
enabled: false,
|
|
@@ -7465,8 +7465,8 @@ function resolveDeviceAuthPath(env = process.env) {
|
|
|
7465
7465
|
}
|
|
7466
7466
|
function readStore(filePath) {
|
|
7467
7467
|
try {
|
|
7468
|
-
if (!
|
|
7469
|
-
const raw =
|
|
7468
|
+
if (!fsSync.existsSync(filePath)) return null;
|
|
7469
|
+
const raw = fsSync.readFileSync(filePath, "utf8");
|
|
7470
7470
|
const parsed = JSON.parse(raw);
|
|
7471
7471
|
if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
|
|
7472
7472
|
if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
|
|
@@ -7476,10 +7476,10 @@ function readStore(filePath) {
|
|
|
7476
7476
|
}
|
|
7477
7477
|
}
|
|
7478
7478
|
function writeStore(filePath, store) {
|
|
7479
|
-
|
|
7480
|
-
|
|
7479
|
+
fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
7480
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
|
|
7481
7481
|
try {
|
|
7482
|
-
|
|
7482
|
+
fsSync.chmodSync(filePath, 384);
|
|
7483
7483
|
} catch {}
|
|
7484
7484
|
}
|
|
7485
7485
|
function loadDeviceAuthToken(params) {
|
|
@@ -10284,7 +10284,7 @@ async function routeReply(params) {
|
|
|
10284
10284
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
10285
10285
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
10286
10286
|
try {
|
|
10287
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
10287
|
+
const { deliverOutboundPayloads } = await import("./deliver-DPWY9adX.js").then((n) => n.n);
|
|
10288
10288
|
return {
|
|
10289
10289
|
ok: true,
|
|
10290
10290
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -10680,7 +10680,7 @@ function normalizeSessionKey(value) {
|
|
|
10680
10680
|
}
|
|
10681
10681
|
function readSessionStore(storePath) {
|
|
10682
10682
|
try {
|
|
10683
|
-
const raw =
|
|
10683
|
+
const raw = fsSync.readFileSync(storePath, "utf-8");
|
|
10684
10684
|
const parsed = JSON5.parse(raw);
|
|
10685
10685
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
|
|
10686
10686
|
} catch {}
|
|
@@ -15739,7 +15739,7 @@ async function createModelSelectionState(params) {
|
|
|
15739
15739
|
}
|
|
15740
15740
|
}
|
|
15741
15741
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
15742
|
-
const { ensureAuthProfileStore } = await import("./auth-profiles-
|
|
15742
|
+
const { ensureAuthProfileStore } = await import("./auth-profiles-aJfgABnE.js").then((n) => n.t);
|
|
15743
15743
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
15744
15744
|
const providerKey = normalizeProviderId(provider);
|
|
15745
15745
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -18112,8 +18112,8 @@ const DEFAULT_SAFE_BINS = [
|
|
|
18112
18112
|
];
|
|
18113
18113
|
function isExecutableFile(filePath) {
|
|
18114
18114
|
try {
|
|
18115
|
-
if (!
|
|
18116
|
-
if (process.platform !== "win32")
|
|
18115
|
+
if (!fsSync.statSync(filePath).isFile()) return false;
|
|
18116
|
+
if (process.platform !== "win32") fsSync.accessSync(filePath, fsSync.constants.X_OK);
|
|
18117
18117
|
return true;
|
|
18118
18118
|
} catch {
|
|
18119
18119
|
return false;
|
|
@@ -18151,7 +18151,7 @@ function normalizeMatchTarget(value) {
|
|
|
18151
18151
|
}
|
|
18152
18152
|
function tryRealpath(value) {
|
|
18153
18153
|
try {
|
|
18154
|
-
return
|
|
18154
|
+
return fsSync.realpathSync(value);
|
|
18155
18155
|
} catch {
|
|
18156
18156
|
return null;
|
|
18157
18157
|
}
|
|
@@ -19383,7 +19383,7 @@ function mergeLegacyAgent(current, legacy) {
|
|
|
19383
19383
|
}
|
|
19384
19384
|
function ensureDir$1(filePath) {
|
|
19385
19385
|
const dir = path.dirname(filePath);
|
|
19386
|
-
|
|
19386
|
+
fsSync.mkdirSync(dir, { recursive: true });
|
|
19387
19387
|
}
|
|
19388
19388
|
function coerceAllowlistEntries(allowlist) {
|
|
19389
19389
|
if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
|
|
@@ -19453,11 +19453,11 @@ function generateToken() {
|
|
|
19453
19453
|
function loadExecApprovals() {
|
|
19454
19454
|
const filePath = resolveExecApprovalsPath();
|
|
19455
19455
|
try {
|
|
19456
|
-
if (!
|
|
19456
|
+
if (!fsSync.existsSync(filePath)) return normalizeExecApprovals({
|
|
19457
19457
|
version: 1,
|
|
19458
19458
|
agents: {}
|
|
19459
19459
|
});
|
|
19460
|
-
const raw =
|
|
19460
|
+
const raw = fsSync.readFileSync(filePath, "utf8");
|
|
19461
19461
|
const parsed = JSON.parse(raw);
|
|
19462
19462
|
if (parsed?.version !== 1) return normalizeExecApprovals({
|
|
19463
19463
|
version: 1,
|
|
@@ -19474,9 +19474,9 @@ function loadExecApprovals() {
|
|
|
19474
19474
|
function saveExecApprovals(file) {
|
|
19475
19475
|
const filePath = resolveExecApprovalsPath();
|
|
19476
19476
|
ensureDir$1(filePath);
|
|
19477
|
-
|
|
19477
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
|
|
19478
19478
|
try {
|
|
19479
|
-
|
|
19479
|
+
fsSync.chmodSync(filePath, 384);
|
|
19480
19480
|
} catch {}
|
|
19481
19481
|
}
|
|
19482
19482
|
function ensureExecApprovals() {
|
|
@@ -19797,7 +19797,7 @@ function resolvePowerShellPath() {
|
|
|
19797
19797
|
const systemRoot = process.env.SystemRoot || process.env.WINDIR;
|
|
19798
19798
|
if (systemRoot) {
|
|
19799
19799
|
const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
|
|
19800
|
-
if (
|
|
19800
|
+
if (fsSync.existsSync(candidate)) return candidate;
|
|
19801
19801
|
}
|
|
19802
19802
|
return "powershell.exe";
|
|
19803
19803
|
}
|
|
@@ -19835,7 +19835,7 @@ function resolveShellFromPath(name) {
|
|
|
19835
19835
|
for (const entry of entries) {
|
|
19836
19836
|
const candidate = path.join(entry, name);
|
|
19837
19837
|
try {
|
|
19838
|
-
|
|
19838
|
+
fsSync.accessSync(candidate, fsSync.constants.X_OK);
|
|
19839
19839
|
return candidate;
|
|
19840
19840
|
} catch {}
|
|
19841
19841
|
}
|
|
@@ -20583,7 +20583,7 @@ async function resolveSandboxWorkdir(params) {
|
|
|
20583
20583
|
cwd: process.cwd(),
|
|
20584
20584
|
root: params.sandbox.workspaceDir
|
|
20585
20585
|
});
|
|
20586
|
-
if (!(await fs
|
|
20586
|
+
if (!(await fs.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
20587
20587
|
const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
|
|
20588
20588
|
const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
|
|
20589
20589
|
return {
|
|
@@ -21634,13 +21634,13 @@ async function validateScriptFileForShellBleed(params) {
|
|
|
21634
21634
|
cwd: params.workdir,
|
|
21635
21635
|
root: params.workdir
|
|
21636
21636
|
});
|
|
21637
|
-
stat = await fs
|
|
21637
|
+
stat = await fs.stat(absPath);
|
|
21638
21638
|
} catch {
|
|
21639
21639
|
return;
|
|
21640
21640
|
}
|
|
21641
21641
|
if (!stat.isFile()) return;
|
|
21642
21642
|
if (stat.size > 512 * 1024) return;
|
|
21643
|
-
const content = await fs
|
|
21643
|
+
const content = await fs.readFile(absPath, "utf-8");
|
|
21644
21644
|
const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
|
|
21645
21645
|
if (first) {
|
|
21646
21646
|
const idx = first.index;
|
|
@@ -22891,7 +22891,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
|
|
|
22891
22891
|
function hasGitMarker(repoRoot) {
|
|
22892
22892
|
const gitPath = path.join(repoRoot, ".git");
|
|
22893
22893
|
try {
|
|
22894
|
-
const stat =
|
|
22894
|
+
const stat = fsSync.statSync(gitPath);
|
|
22895
22895
|
return stat.isDirectory() || stat.isFile();
|
|
22896
22896
|
} catch {
|
|
22897
22897
|
return false;
|
|
@@ -22903,10 +22903,10 @@ function findGitRoot(startDir, opts = {}) {
|
|
|
22903
22903
|
function resolveGitDirFromMarker(repoRoot) {
|
|
22904
22904
|
const gitPath = path.join(repoRoot, ".git");
|
|
22905
22905
|
try {
|
|
22906
|
-
const stat =
|
|
22906
|
+
const stat = fsSync.statSync(gitPath);
|
|
22907
22907
|
if (stat.isDirectory()) return gitPath;
|
|
22908
22908
|
if (!stat.isFile()) return null;
|
|
22909
|
-
const match =
|
|
22909
|
+
const match = fsSync.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
|
|
22910
22910
|
if (!match?.[1]) return null;
|
|
22911
22911
|
return path.resolve(repoRoot, match[1].trim());
|
|
22912
22912
|
} catch {
|
|
@@ -22973,7 +22973,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
22973
22973
|
cachedCommit = null;
|
|
22974
22974
|
return cachedCommit;
|
|
22975
22975
|
}
|
|
22976
|
-
const head =
|
|
22976
|
+
const head = fsSync.readFileSync(headPath, "utf-8").trim();
|
|
22977
22977
|
if (!head) {
|
|
22978
22978
|
cachedCommit = null;
|
|
22979
22979
|
return cachedCommit;
|
|
@@ -22981,7 +22981,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
22981
22981
|
if (head.startsWith("ref:")) {
|
|
22982
22982
|
const ref = head.replace(/^ref:\s*/i, "").trim();
|
|
22983
22983
|
const refPath = path.resolve(path.dirname(headPath), ref);
|
|
22984
|
-
cachedCommit = formatCommit(
|
|
22984
|
+
cachedCommit = formatCommit(fsSync.readFileSync(refPath, "utf-8").trim());
|
|
22985
22985
|
return cachedCommit;
|
|
22986
22986
|
}
|
|
22987
22987
|
cachedCommit = formatCommit(head);
|
|
@@ -23185,9 +23185,9 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
|
|
|
23185
23185
|
} catch {
|
|
23186
23186
|
return;
|
|
23187
23187
|
}
|
|
23188
|
-
if (!
|
|
23188
|
+
if (!fsSync.existsSync(logPath)) return;
|
|
23189
23189
|
try {
|
|
23190
|
-
const lines =
|
|
23190
|
+
const lines = fsSync.readFileSync(logPath, "utf-8").split(/\n+/);
|
|
23191
23191
|
let input = 0;
|
|
23192
23192
|
let output = 0;
|
|
23193
23193
|
let promptTokens = 0;
|
|
@@ -24427,7 +24427,7 @@ function resolveRepoRoot(params) {
|
|
|
24427
24427
|
const configured = params.config?.agents?.defaults?.repoRoot?.trim();
|
|
24428
24428
|
if (configured) try {
|
|
24429
24429
|
const resolved = path.resolve(configured);
|
|
24430
|
-
if (
|
|
24430
|
+
if (fsSync.statSync(resolved).isDirectory()) return resolved;
|
|
24431
24431
|
} catch {}
|
|
24432
24432
|
const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
|
|
24433
24433
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -24746,7 +24746,7 @@ async function buildContextReply(params) {
|
|
|
24746
24746
|
//#region src/auto-reply/reply/commands-export-session.ts
|
|
24747
24747
|
const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
|
|
24748
24748
|
function loadTemplate(fileName) {
|
|
24749
|
-
return
|
|
24749
|
+
return fsSync.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
|
|
24750
24750
|
}
|
|
24751
24751
|
function generateHtml(sessionData) {
|
|
24752
24752
|
const template = loadTemplate("template.html");
|
|
@@ -24820,7 +24820,7 @@ async function buildExportSessionReply(params) {
|
|
|
24820
24820
|
} catch (err) {
|
|
24821
24821
|
return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
|
|
24822
24822
|
}
|
|
24823
|
-
if (!
|
|
24823
|
+
if (!fsSync.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
|
|
24824
24824
|
const sessionManager = SessionManager.open(sessionFile);
|
|
24825
24825
|
const entries = sessionManager.getEntries();
|
|
24826
24826
|
const header = sessionManager.getHeader();
|
|
@@ -24841,8 +24841,8 @@ async function buildExportSessionReply(params) {
|
|
|
24841
24841
|
const defaultFileName = `symi-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
|
|
24842
24842
|
const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
|
|
24843
24843
|
const outputDir = path.dirname(outputPath);
|
|
24844
|
-
if (!
|
|
24845
|
-
|
|
24844
|
+
if (!fsSync.existsSync(outputDir)) fsSync.mkdirSync(outputDir, { recursive: true });
|
|
24845
|
+
fsSync.writeFileSync(outputPath, html, "utf-8");
|
|
24846
24846
|
const relativePath = path.relative(params.workspaceDir, outputPath);
|
|
24847
24847
|
return { text: [
|
|
24848
24848
|
"✅ Session exported!",
|
|
@@ -24956,8 +24956,8 @@ function resolveZaiApiKey() {
|
|
|
24956
24956
|
}
|
|
24957
24957
|
try {
|
|
24958
24958
|
const authPath = path.join(os.homedir(), ".pi", "agent", "auth.json");
|
|
24959
|
-
if (!
|
|
24960
|
-
const data = JSON.parse(
|
|
24959
|
+
if (!fsSync.existsSync(authPath)) return;
|
|
24960
|
+
const data = JSON.parse(fsSync.readFileSync(authPath, "utf-8"));
|
|
24961
24961
|
return data["z-ai"]?.access || data.zai?.access;
|
|
24962
24962
|
} catch {
|
|
24963
24963
|
return;
|
|
@@ -26522,7 +26522,7 @@ function shouldPersistAnyBindingState() {
|
|
|
26522
26522
|
}
|
|
26523
26523
|
function shouldPersistBindingMutations() {
|
|
26524
26524
|
if (shouldPersistAnyBindingState()) return true;
|
|
26525
|
-
return
|
|
26525
|
+
return fsSync.existsSync(resolveThreadBindingsPath());
|
|
26526
26526
|
}
|
|
26527
26527
|
function saveBindingsToDisk(params = {}) {
|
|
26528
26528
|
if (!params.force && !shouldPersistAnyBindingState()) return;
|
|
@@ -27510,7 +27510,7 @@ const applyCostTotal = (totals, costTotal) => {
|
|
|
27510
27510
|
totals.totalCost += costTotal;
|
|
27511
27511
|
};
|
|
27512
27512
|
async function* readJsonlRecords(filePath) {
|
|
27513
|
-
const fileStream =
|
|
27513
|
+
const fileStream = fsSync.createReadStream(filePath, { encoding: "utf-8" });
|
|
27514
27514
|
const rl = readline.createInterface({
|
|
27515
27515
|
input: fileStream,
|
|
27516
27516
|
crlfDelay: Infinity
|
|
@@ -27582,10 +27582,10 @@ async function loadCostUsageSummary(params) {
|
|
|
27582
27582
|
const dailyMap = /* @__PURE__ */ new Map();
|
|
27583
27583
|
const totals = emptyTotals();
|
|
27584
27584
|
const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
|
|
27585
|
-
const entries = await
|
|
27585
|
+
const entries = await fsSync.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
27586
27586
|
const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
|
|
27587
27587
|
const filePath = path.join(sessionsDir, entry.name);
|
|
27588
|
-
const stats = await
|
|
27588
|
+
const stats = await fsSync.promises.stat(filePath).catch(() => null);
|
|
27589
27589
|
if (!stats) return null;
|
|
27590
27590
|
if (stats.mtimeMs < sinceTime) return null;
|
|
27591
27591
|
return filePath;
|
|
@@ -27618,7 +27618,7 @@ async function loadCostUsageSummary(params) {
|
|
|
27618
27618
|
}
|
|
27619
27619
|
async function loadSessionCostSummary(params) {
|
|
27620
27620
|
const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
|
|
27621
|
-
if (!sessionFile || !
|
|
27621
|
+
if (!sessionFile || !fsSync.existsSync(sessionFile)) return null;
|
|
27622
27622
|
const totals = emptyTotals();
|
|
27623
27623
|
let firstActivity;
|
|
27624
27624
|
let lastActivity;
|
|
@@ -29490,7 +29490,7 @@ async function handleCommands(params) {
|
|
|
29490
29490
|
try {
|
|
29491
29491
|
const messages = [];
|
|
29492
29492
|
if (sessionFile) {
|
|
29493
|
-
const content = await fs
|
|
29493
|
+
const content = await fs.readFile(sessionFile, "utf-8");
|
|
29494
29494
|
for (const line of content.split("\n")) {
|
|
29495
29495
|
if (!line.trim()) continue;
|
|
29496
29496
|
try {
|
|
@@ -31824,7 +31824,7 @@ function asBoolean(value) {
|
|
|
31824
31824
|
}
|
|
31825
31825
|
function resolveTempPathParts(opts) {
|
|
31826
31826
|
const tmpDir = opts.tmpDir ?? resolvePreferredSymiTmpDir();
|
|
31827
|
-
if (!opts.tmpDir)
|
|
31827
|
+
if (!opts.tmpDir) fsSync.mkdirSync(tmpDir, {
|
|
31828
31828
|
recursive: true,
|
|
31829
31829
|
mode: 448
|
|
31830
31830
|
});
|
|
@@ -31890,7 +31890,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
31890
31890
|
if (typeof contentLength === "number" && Number.isFinite(contentLength) && contentLength > MAX_CAMERA_URL_DOWNLOAD_BYTES) throw new Error(`writeUrlToFile: content-length ${contentLength} exceeds max ${MAX_CAMERA_URL_DOWNLOAD_BYTES}`);
|
|
31891
31891
|
const body = res.body;
|
|
31892
31892
|
if (!body) throw new Error(`failed to download ${url}: empty response body`);
|
|
31893
|
-
const fileHandle = await fs$
|
|
31893
|
+
const fileHandle = await fs$1.open(filePath, "w");
|
|
31894
31894
|
let bytes = 0;
|
|
31895
31895
|
let thrown;
|
|
31896
31896
|
try {
|
|
@@ -31909,7 +31909,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
31909
31909
|
await fileHandle.close();
|
|
31910
31910
|
}
|
|
31911
31911
|
if (thrown) {
|
|
31912
|
-
await fs$
|
|
31912
|
+
await fs$1.unlink(filePath).catch(() => {});
|
|
31913
31913
|
throw thrown;
|
|
31914
31914
|
}
|
|
31915
31915
|
return {
|
|
@@ -31919,7 +31919,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
31919
31919
|
}
|
|
31920
31920
|
async function writeBase64ToFile(filePath, base64) {
|
|
31921
31921
|
const buf = Buffer.from(base64, "base64");
|
|
31922
|
-
await fs$
|
|
31922
|
+
await fs$1.writeFile(filePath, buf);
|
|
31923
31923
|
return {
|
|
31924
31924
|
path: filePath,
|
|
31925
31925
|
bytes: buf.length
|
|
@@ -31985,7 +31985,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
31985
31985
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
|
|
31986
31986
|
throw new Error("jsonlPath outside allowed roots");
|
|
31987
31987
|
}
|
|
31988
|
-
const canonical = await fs
|
|
31988
|
+
const canonical = await fs.realpath(resolved).catch(() => resolved);
|
|
31989
31989
|
if (!isInboundPathAllowed({
|
|
31990
31990
|
filePath: canonical,
|
|
31991
31991
|
roots
|
|
@@ -31993,7 +31993,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
31993
31993
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
|
|
31994
31994
|
throw new Error("jsonlPath outside allowed roots");
|
|
31995
31995
|
}
|
|
31996
|
-
return await fs
|
|
31996
|
+
return await fs.readFile(canonical, "utf8");
|
|
31997
31997
|
}
|
|
31998
31998
|
const CanvasToolSchema = Type.Object({
|
|
31999
31999
|
action: stringEnum(CANVAS_ACTIONS),
|
|
@@ -32797,12 +32797,12 @@ function resolveRestartSentinelPath(env = process.env) {
|
|
|
32797
32797
|
}
|
|
32798
32798
|
async function writeRestartSentinel(payload, env = process.env) {
|
|
32799
32799
|
const filePath = resolveRestartSentinelPath(env);
|
|
32800
|
-
await fs
|
|
32800
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
32801
32801
|
const data = {
|
|
32802
32802
|
version: 1,
|
|
32803
32803
|
payload
|
|
32804
32804
|
};
|
|
32805
|
-
await fs
|
|
32805
|
+
await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
|
|
32806
32806
|
return filePath;
|
|
32807
32807
|
}
|
|
32808
32808
|
|
|
@@ -33617,7 +33617,7 @@ async function hydrateAttachmentPayload(params) {
|
|
|
33617
33617
|
accountId: params.accountId
|
|
33618
33618
|
}),
|
|
33619
33619
|
sandboxValidated: true,
|
|
33620
|
-
readFile: (filePath) => fs
|
|
33620
|
+
readFile: (filePath) => fs.readFile(filePath)
|
|
33621
33621
|
});
|
|
33622
33622
|
params.args.buffer = media.buffer.toString("base64");
|
|
33623
33623
|
if (!contentTypeParam && media.contentType) params.args.contentType = media.contentType;
|
|
@@ -36902,7 +36902,7 @@ function listExistingAgentIdsFromDisk() {
|
|
|
36902
36902
|
const root = resolveStateDir();
|
|
36903
36903
|
const agentsDir = path.join(root, "agents");
|
|
36904
36904
|
try {
|
|
36905
|
-
return
|
|
36905
|
+
return fsSync.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
|
|
36906
36906
|
} catch {
|
|
36907
36907
|
return [];
|
|
36908
36908
|
}
|
|
@@ -40770,18 +40770,18 @@ function appendImagePathsToPrompt(prompt, paths) {
|
|
|
40770
40770
|
return `${trimmed}${trimmed ? "\n\n" : ""}${paths.join("\n")}`;
|
|
40771
40771
|
}
|
|
40772
40772
|
async function writeCliImages(images) {
|
|
40773
|
-
const tempDir = await fs
|
|
40773
|
+
const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "symi-cli-images-"));
|
|
40774
40774
|
const paths = [];
|
|
40775
40775
|
for (let i = 0; i < images.length; i += 1) {
|
|
40776
40776
|
const image = images[i];
|
|
40777
40777
|
const ext = resolveImageExtension(image.mimeType);
|
|
40778
40778
|
const filePath = path.join(tempDir, `image-${i + 1}.${ext}`);
|
|
40779
40779
|
const buffer = Buffer.from(image.data, "base64");
|
|
40780
|
-
await fs
|
|
40780
|
+
await fs.writeFile(filePath, buffer, { mode: 384 });
|
|
40781
40781
|
paths.push(filePath);
|
|
40782
40782
|
}
|
|
40783
40783
|
const cleanup = async () => {
|
|
40784
|
-
await fs
|
|
40784
|
+
await fs.rm(tempDir, {
|
|
40785
40785
|
recursive: true,
|
|
40786
40786
|
force: true
|
|
40787
40787
|
});
|
|
@@ -41855,7 +41855,7 @@ async function runAgentTurnWithFallback(params) {
|
|
|
41855
41855
|
if (corruptedSessionId) {
|
|
41856
41856
|
const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
|
|
41857
41857
|
try {
|
|
41858
|
-
|
|
41858
|
+
fsSync.unlinkSync(transcriptPath);
|
|
41859
41859
|
} catch {}
|
|
41860
41860
|
}
|
|
41861
41861
|
delete params.activeSessionStore[sessionKey];
|
|
@@ -42571,9 +42571,9 @@ function auditPostCompactionReads(readFilePaths, workspaceDir, requiredReads = D
|
|
|
42571
42571
|
* Returns messages from the last N lines (default 100).
|
|
42572
42572
|
*/
|
|
42573
42573
|
function readSessionMessages(sessionFile, maxLines = 100) {
|
|
42574
|
-
if (!
|
|
42574
|
+
if (!fsSync.existsSync(sessionFile)) return [];
|
|
42575
42575
|
try {
|
|
42576
|
-
const recentLines =
|
|
42576
|
+
const recentLines = fsSync.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
|
|
42577
42577
|
const messages = [];
|
|
42578
42578
|
for (const line of recentLines) try {
|
|
42579
42579
|
const entry = JSON.parse(line);
|
|
@@ -42614,8 +42614,8 @@ const MAX_CONTEXT_CHARS = 3e3;
|
|
|
42614
42614
|
async function readPostCompactionContext(workspaceDir) {
|
|
42615
42615
|
const agentsPath = path.join(workspaceDir, "AGENTS.md");
|
|
42616
42616
|
try {
|
|
42617
|
-
if (!
|
|
42618
|
-
const sections = extractSections(await
|
|
42617
|
+
if (!fsSync.existsSync(agentsPath)) return null;
|
|
42618
|
+
const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
|
|
42619
42619
|
if (sections.length === 0) return null;
|
|
42620
42620
|
const combined = sections.join("\n\n");
|
|
42621
42621
|
return "[Post-compaction context refresh]\n\nSession was just compacted. The conversation summary above is a hint, NOT a substitute for your startup sequence. Execute your Session Startup sequence now — read the required files before responding to the user.\n\nCritical rules from AGENTS.md:\n\n" + (combined.length > MAX_CONTEXT_CHARS ? combined.slice(0, MAX_CONTEXT_CHARS) + "\n...[truncated]..." : combined);
|
|
@@ -42819,7 +42819,7 @@ async function runReplyAgent(params) {
|
|
|
42819
42819
|
if (resolved) transcriptCandidates.add(resolved);
|
|
42820
42820
|
transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
|
|
42821
42821
|
for (const candidate of transcriptCandidates) try {
|
|
42822
|
-
|
|
42822
|
+
fsSync.unlinkSync(candidate);
|
|
42823
42823
|
} catch {}
|
|
42824
42824
|
}
|
|
42825
42825
|
return true;
|
|
@@ -43725,7 +43725,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
43725
43725
|
return;
|
|
43726
43726
|
}
|
|
43727
43727
|
try {
|
|
43728
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
43728
|
+
const { deliverOutboundPayloads } = await import("./deliver-DPWY9adX.js").then((n) => n.n);
|
|
43729
43729
|
await deliverOutboundPayloads({
|
|
43730
43730
|
cfg: params.cfg,
|
|
43731
43731
|
channel,
|
|
@@ -43751,7 +43751,7 @@ function forkSessionFromParent(params) {
|
|
|
43751
43751
|
agentId: params.agentId,
|
|
43752
43752
|
sessionsDir: params.sessionsDir
|
|
43753
43753
|
});
|
|
43754
|
-
if (!parentSessionFile || !
|
|
43754
|
+
if (!parentSessionFile || !fsSync.existsSync(parentSessionFile)) return null;
|
|
43755
43755
|
try {
|
|
43756
43756
|
const manager = SessionManager.open(parentSessionFile);
|
|
43757
43757
|
const leafId = manager.getLeafId();
|
|
@@ -43775,7 +43775,7 @@ function forkSessionFromParent(params) {
|
|
|
43775
43775
|
cwd: manager.getCwd(),
|
|
43776
43776
|
parentSession: parentSessionFile
|
|
43777
43777
|
};
|
|
43778
|
-
|
|
43778
|
+
fsSync.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
|
|
43779
43779
|
return {
|
|
43780
43780
|
sessionId,
|
|
43781
43781
|
sessionFile
|
|
@@ -44100,7 +44100,7 @@ async function stageSandboxMedia(params) {
|
|
|
44100
44100
|
};
|
|
44101
44101
|
try {
|
|
44102
44102
|
const destDir = sandbox ? path.join(effectiveWorkspaceDir, "media", "inbound") : effectiveWorkspaceDir;
|
|
44103
|
-
await fs
|
|
44103
|
+
await fs.mkdir(destDir, { recursive: true });
|
|
44104
44104
|
const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
|
|
44105
44105
|
cfg,
|
|
44106
44106
|
accountId: ctx.AccountId
|
|
@@ -44150,7 +44150,7 @@ async function stageSandboxMedia(params) {
|
|
|
44150
44150
|
usedNames.add(fileName);
|
|
44151
44151
|
const dest = path.join(destDir, fileName);
|
|
44152
44152
|
if (ctx.MediaRemoteHost) await scpFile(ctx.MediaRemoteHost, source, dest);
|
|
44153
|
-
else await fs
|
|
44153
|
+
else await fs.copyFile(source, dest);
|
|
44154
44154
|
const stagedPath = sandbox ? path.posix.join("media", "inbound", fileName) : dest;
|
|
44155
44155
|
staged.set(source, stagedPath);
|
|
44156
44156
|
}
|
|
@@ -47170,8 +47170,8 @@ async function describeStickerImage(params) {
|
|
|
47170
47170
|
const { provider, model } = resolved;
|
|
47171
47171
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
47172
47172
|
try {
|
|
47173
|
-
const buffer = await fs
|
|
47174
|
-
const { describeImageWithModel } = await import("./image-
|
|
47173
|
+
const buffer = await fs.readFile(imagePath);
|
|
47174
|
+
const { describeImageWithModel } = await import("./image-DCB54N2j.js").then((n) => n.n);
|
|
47175
47175
|
return (await describeImageWithModel({
|
|
47176
47176
|
buffer,
|
|
47177
47177
|
fileName: "sticker.webp",
|
|
@@ -47594,7 +47594,7 @@ function createWhatsAppLoginTool() {
|
|
|
47594
47594
|
force: Type.Optional(Type.Boolean())
|
|
47595
47595
|
}),
|
|
47596
47596
|
execute: async (_toolCallId, args) => {
|
|
47597
|
-
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-
|
|
47597
|
+
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-Cqe-9-jf.js");
|
|
47598
47598
|
if ((args?.action ?? "start") === "wait") {
|
|
47599
47599
|
const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
|
|
47600
47600
|
return {
|
|
@@ -47876,7 +47876,7 @@ async function withMemoryManagerForAgent(params) {
|
|
|
47876
47876
|
}
|
|
47877
47877
|
async function checkReadableFile(pathname) {
|
|
47878
47878
|
try {
|
|
47879
|
-
await fs
|
|
47879
|
+
await fs.access(pathname, fsSync.constants.R_OK);
|
|
47880
47880
|
return { exists: true };
|
|
47881
47881
|
} catch (err) {
|
|
47882
47882
|
const code = err.code;
|
|
@@ -47893,7 +47893,7 @@ async function scanSessionFiles(agentId) {
|
|
|
47893
47893
|
try {
|
|
47894
47894
|
return {
|
|
47895
47895
|
source: "sessions",
|
|
47896
|
-
totalFiles: (await fs
|
|
47896
|
+
totalFiles: (await fs.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
|
|
47897
47897
|
issues
|
|
47898
47898
|
};
|
|
47899
47899
|
} catch (err) {
|
|
@@ -47925,7 +47925,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
47925
47925
|
if (alt.issue) issues.push(alt.issue);
|
|
47926
47926
|
const resolvedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
|
|
47927
47927
|
for (const extraPath of resolvedExtraPaths) try {
|
|
47928
|
-
if ((await fs
|
|
47928
|
+
if ((await fs.lstat(extraPath)).isSymbolicLink()) continue;
|
|
47929
47929
|
const extraCheck = await checkReadableFile(extraPath);
|
|
47930
47930
|
if (extraCheck.issue) issues.push(extraCheck.issue);
|
|
47931
47931
|
} catch (err) {
|
|
@@ -47935,7 +47935,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
47935
47935
|
}
|
|
47936
47936
|
let dirReadable = null;
|
|
47937
47937
|
try {
|
|
47938
|
-
await fs
|
|
47938
|
+
await fs.access(memoryDir, fsSync.constants.R_OK);
|
|
47939
47939
|
dirReadable = true;
|
|
47940
47940
|
} catch (err) {
|
|
47941
47941
|
const code = err.code;
|
|
@@ -47983,7 +47983,7 @@ async function summarizeQmdIndexArtifact(manager) {
|
|
|
47983
47983
|
if (!dbPath) return null;
|
|
47984
47984
|
let stat;
|
|
47985
47985
|
try {
|
|
47986
|
-
stat = await fs
|
|
47986
|
+
stat = await fs.stat(dbPath);
|
|
47987
47987
|
} catch (err) {
|
|
47988
47988
|
const code = err.code;
|
|
47989
47989
|
if (code === "ENOENT") throw new Error(`QMD index file not found: ${shortenHomePath(dbPath)}`, { cause: err });
|
|
@@ -49833,7 +49833,7 @@ async function preflightDiscordMessage(params) {
|
|
|
49833
49833
|
let preflightTranscript;
|
|
49834
49834
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
49835
49835
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
49836
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
49836
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-DFLcuVNn.js");
|
|
49837
49837
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
49838
49838
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
49839
49839
|
ctx: {
|
|
@@ -50796,7 +50796,7 @@ function identityHasValues(identity) {
|
|
|
50796
50796
|
}
|
|
50797
50797
|
function loadIdentityFromFile(identityPath) {
|
|
50798
50798
|
try {
|
|
50799
|
-
const parsed = parseIdentityMarkdown(
|
|
50799
|
+
const parsed = parseIdentityMarkdown(fsSync.readFileSync(identityPath, "utf-8"));
|
|
50800
50800
|
if (!identityHasValues(parsed)) return null;
|
|
50801
50801
|
return parsed;
|
|
50802
50802
|
} catch {
|
|
@@ -50835,7 +50835,7 @@ function isDataAvatar(value) {
|
|
|
50835
50835
|
}
|
|
50836
50836
|
function resolveExistingPath(value) {
|
|
50837
50837
|
try {
|
|
50838
|
-
return
|
|
50838
|
+
return fsSync.realpathSync(value);
|
|
50839
50839
|
} catch {
|
|
50840
50840
|
return path.resolve(value);
|
|
50841
50841
|
}
|
|
@@ -50859,7 +50859,7 @@ function resolveLocalAvatarPath(params) {
|
|
|
50859
50859
|
reason: "unsupported_extension"
|
|
50860
50860
|
};
|
|
50861
50861
|
try {
|
|
50862
|
-
if (!
|
|
50862
|
+
if (!fsSync.statSync(realPath).isFile()) return {
|
|
50863
50863
|
ok: false,
|
|
50864
50864
|
reason: "missing"
|
|
50865
50865
|
};
|
|
@@ -51722,7 +51722,7 @@ function sanitizeRecentModels(models, limit) {
|
|
|
51722
51722
|
}
|
|
51723
51723
|
async function readJsonFileWithFallback(filePath, fallback) {
|
|
51724
51724
|
try {
|
|
51725
|
-
const raw = await
|
|
51725
|
+
const raw = await fsSync.promises.readFile(filePath, "utf-8");
|
|
51726
51726
|
return {
|
|
51727
51727
|
value: JSON.parse(raw),
|
|
51728
51728
|
exists: true
|
|
@@ -51740,14 +51740,14 @@ async function readJsonFileWithFallback(filePath, fallback) {
|
|
|
51740
51740
|
}
|
|
51741
51741
|
async function writeJsonFileAtomically(filePath, value) {
|
|
51742
51742
|
const dir = path.dirname(filePath);
|
|
51743
|
-
await
|
|
51743
|
+
await fsSync.promises.mkdir(dir, {
|
|
51744
51744
|
recursive: true,
|
|
51745
51745
|
mode: 448
|
|
51746
51746
|
});
|
|
51747
51747
|
const tmp = path.join(dir, `${path.basename(filePath)}.${crypto.randomUUID()}.tmp`);
|
|
51748
|
-
await
|
|
51749
|
-
await
|
|
51750
|
-
await
|
|
51748
|
+
await fsSync.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
|
|
51749
|
+
await fsSync.promises.chmod(tmp, 384);
|
|
51750
|
+
await fsSync.promises.rename(tmp, filePath);
|
|
51751
51751
|
}
|
|
51752
51752
|
async function readPreferencesStore(filePath) {
|
|
51753
51753
|
const { value } = await readJsonFileWithFallback(filePath, {
|
|
@@ -53839,27 +53839,27 @@ function isVoiceChannelType(type) {
|
|
|
53839
53839
|
function createDefaultDeps() {
|
|
53840
53840
|
return {
|
|
53841
53841
|
sendMessageWhatsApp: async (...args) => {
|
|
53842
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
53842
|
+
const { sendMessageWhatsApp } = await import("./web-B3QBvAid.js");
|
|
53843
53843
|
return await sendMessageWhatsApp(...args);
|
|
53844
53844
|
},
|
|
53845
53845
|
sendMessageTelegram: async (...args) => {
|
|
53846
|
-
const { sendMessageTelegram } = await import("./send-
|
|
53846
|
+
const { sendMessageTelegram } = await import("./send-CF_nzDHe.js").then((n) => n.l);
|
|
53847
53847
|
return await sendMessageTelegram(...args);
|
|
53848
53848
|
},
|
|
53849
53849
|
sendMessageDiscord: async (...args) => {
|
|
53850
|
-
const { sendMessageDiscord } = await import("./send-
|
|
53850
|
+
const { sendMessageDiscord } = await import("./send-DQoKXmre.js").then((n) => n.t);
|
|
53851
53851
|
return await sendMessageDiscord(...args);
|
|
53852
53852
|
},
|
|
53853
53853
|
sendMessageSlack: async (...args) => {
|
|
53854
|
-
const { sendMessageSlack } = await import("./send-
|
|
53854
|
+
const { sendMessageSlack } = await import("./send-DERqzyba.js").then((n) => n.n);
|
|
53855
53855
|
return await sendMessageSlack(...args);
|
|
53856
53856
|
},
|
|
53857
53857
|
sendMessageSignal: async (...args) => {
|
|
53858
|
-
const { sendMessageSignal } = await import("./send-
|
|
53858
|
+
const { sendMessageSignal } = await import("./send-BJhQtCyM.js").then((n) => n.i);
|
|
53859
53859
|
return await sendMessageSignal(...args);
|
|
53860
53860
|
},
|
|
53861
53861
|
sendMessageIMessage: async (...args) => {
|
|
53862
|
-
const { sendMessageIMessage } = await import("./send-
|
|
53862
|
+
const { sendMessageIMessage } = await import("./send-Cf47Nas6.js").then((n) => n.n);
|
|
53863
53863
|
return await sendMessageIMessage(...args);
|
|
53864
53864
|
}
|
|
53865
53865
|
};
|
|
@@ -54768,10 +54768,10 @@ function estimateDurationSeconds(pcm) {
|
|
|
54768
54768
|
return pcm.length / (bytesPerSample * SAMPLE_RATE);
|
|
54769
54769
|
}
|
|
54770
54770
|
async function writeWavFile(pcm) {
|
|
54771
|
-
const tempDir = await fs
|
|
54771
|
+
const tempDir = await fs.mkdtemp(path.join(resolvePreferredSymiTmpDir(), "discord-voice-"));
|
|
54772
54772
|
const filePath = path.join(tempDir, `segment-${randomUUID()}.wav`);
|
|
54773
54773
|
const wav = buildWavBuffer(pcm);
|
|
54774
|
-
await fs
|
|
54774
|
+
await fs.writeFile(filePath, wav);
|
|
54775
54775
|
scheduleTempCleanup(tempDir);
|
|
54776
54776
|
return {
|
|
54777
54777
|
path: filePath,
|
|
@@ -54780,7 +54780,7 @@ async function writeWavFile(pcm) {
|
|
|
54780
54780
|
}
|
|
54781
54781
|
function scheduleTempCleanup(tempDir, delayMs = 1800 * 1e3) {
|
|
54782
54782
|
setTimeout(() => {
|
|
54783
|
-
fs
|
|
54783
|
+
fs.rm(tempDir, {
|
|
54784
54784
|
recursive: true,
|
|
54785
54785
|
force: true
|
|
54786
54786
|
}).catch((err) => {
|
|
@@ -57844,7 +57844,7 @@ async function detectBinary(name) {
|
|
|
57844
57844
|
if (!isSafeExecutableValue(name)) return false;
|
|
57845
57845
|
const resolved = name.startsWith("~") ? resolveUserPath(name) : name;
|
|
57846
57846
|
if (path.isAbsolute(resolved) || resolved.startsWith(".") || resolved.includes("/") || resolved.includes("\\")) try {
|
|
57847
|
-
await fs
|
|
57847
|
+
await fs.access(resolved);
|
|
57848
57848
|
return true;
|
|
57849
57849
|
} catch {
|
|
57850
57850
|
return false;
|
|
@@ -58394,7 +58394,7 @@ function normalizeAllowList$1(list) {
|
|
|
58394
58394
|
async function detectRemoteHostFromCliPath(cliPath) {
|
|
58395
58395
|
try {
|
|
58396
58396
|
const expanded = cliPath.startsWith("~") ? cliPath.replace(/^~/, process.env.HOME ?? "") : cliPath;
|
|
58397
|
-
const content = await fs
|
|
58397
|
+
const content = await fs.readFile(expanded, "utf8");
|
|
58398
58398
|
const userHostMatch = content.match(/\bssh\b[^\n]*?\s+([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/);
|
|
58399
58399
|
if (userHostMatch) return userHostMatch[1];
|
|
58400
58400
|
return content.match(/\bssh\b[^\n]*?\s+([a-zA-Z][a-zA-Z0-9._-]*)\s+\S*\bimsg\b/)?.[1];
|
|
@@ -58738,7 +58738,7 @@ async function monitorIMessageProvider(opts = {}) {
|
|
|
58738
58738
|
function readFileIfExists(filePath) {
|
|
58739
58739
|
if (!filePath) return;
|
|
58740
58740
|
try {
|
|
58741
|
-
return
|
|
58741
|
+
return fsSync.readFileSync(filePath, "utf-8").trim();
|
|
58742
58742
|
} catch {
|
|
58743
58743
|
return;
|
|
58744
58744
|
}
|
|
@@ -59299,7 +59299,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
|
|
|
59299
59299
|
prefix: "line-media",
|
|
59300
59300
|
extension: getExtensionForContentType(contentType)
|
|
59301
59301
|
});
|
|
59302
|
-
await
|
|
59302
|
+
await fsSync.promises.writeFile(filePath, buffer);
|
|
59303
59303
|
logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
|
|
59304
59304
|
return {
|
|
59305
59305
|
path: filePath,
|
|
@@ -64286,7 +64286,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
64286
64286
|
}
|
|
64287
64287
|
let commandsRegistry;
|
|
64288
64288
|
async function getCommandsRegistry() {
|
|
64289
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
64289
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-CeBC8Vy2.js").then((n) => n.n);
|
|
64290
64290
|
return commandsRegistry;
|
|
64291
64291
|
}
|
|
64292
64292
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -64628,11 +64628,11 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
64628
64628
|
const channelName = channelInfo?.name;
|
|
64629
64629
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
64630
64630
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
64631
|
-
import("./resolve-route-
|
|
64631
|
+
import("./resolve-route-gl0ZOOKR.js").then((n) => n.r),
|
|
64632
64632
|
import("./inbound-context-Dvqh1Tgb.js").then((n) => n.n),
|
|
64633
64633
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
64634
64634
|
]);
|
|
64635
|
-
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-
|
|
64635
|
+
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-ZnX2V-k9.js").then((n) => n.n)]);
|
|
64636
64636
|
const route = resolveAgentRoute({
|
|
64637
64637
|
cfg,
|
|
64638
64638
|
channel: "slack",
|
|
@@ -64689,9 +64689,9 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
64689
64689
|
});
|
|
64690
64690
|
const deliverSlashPayloads = async (replies) => {
|
|
64691
64691
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
64692
|
-
import("./replies-
|
|
64693
|
-
import("./chunk-
|
|
64694
|
-
import("./markdown-tables-
|
|
64692
|
+
import("./replies-CWH084Xr.js").then((n) => n.r),
|
|
64693
|
+
import("./chunk-B9x_1qSr.js").then((n) => n.s),
|
|
64694
|
+
import("./markdown-tables-DuRhvVpP.js").then((n) => n.t)
|
|
64695
64695
|
]);
|
|
64696
64696
|
await deliverSlackSlashReplies({
|
|
64697
64697
|
replies,
|
|
@@ -64744,7 +64744,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
64744
64744
|
let nativeCommands = [];
|
|
64745
64745
|
if (nativeEnabled) {
|
|
64746
64746
|
reg = await getCommandsRegistry();
|
|
64747
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
64747
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-CKXkvl80.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
64748
64748
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
64749
64749
|
skillCommands,
|
|
64750
64750
|
provider: "slack"
|
|
@@ -66962,7 +66962,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
66962
66962
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
66963
66963
|
let preflightTranscript;
|
|
66964
66964
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
66965
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
66965
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-DFLcuVNn.js");
|
|
66966
66966
|
preflightTranscript = await transcribeFirstAudio({
|
|
66967
66967
|
ctx: {
|
|
66968
66968
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -68730,7 +68730,7 @@ function safeParseState(raw) {
|
|
|
68730
68730
|
async function readTelegramUpdateOffset(params) {
|
|
68731
68731
|
const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
|
|
68732
68732
|
try {
|
|
68733
|
-
return safeParseState(await fs
|
|
68733
|
+
return safeParseState(await fs.readFile(filePath, "utf-8"))?.lastUpdateId ?? null;
|
|
68734
68734
|
} catch (err) {
|
|
68735
68735
|
if (err.code === "ENOENT") return null;
|
|
68736
68736
|
return null;
|
|
@@ -68739,7 +68739,7 @@ async function readTelegramUpdateOffset(params) {
|
|
|
68739
68739
|
async function writeTelegramUpdateOffset(params) {
|
|
68740
68740
|
const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
|
|
68741
68741
|
const dir = path.dirname(filePath);
|
|
68742
|
-
await fs
|
|
68742
|
+
await fs.mkdir(dir, {
|
|
68743
68743
|
recursive: true,
|
|
68744
68744
|
mode: 448
|
|
68745
68745
|
});
|
|
@@ -68748,9 +68748,9 @@ async function writeTelegramUpdateOffset(params) {
|
|
|
68748
68748
|
version: STORE_VERSION,
|
|
68749
68749
|
lastUpdateId: params.updateId
|
|
68750
68750
|
};
|
|
68751
|
-
await fs
|
|
68752
|
-
await fs
|
|
68753
|
-
await fs
|
|
68751
|
+
await fs.writeFile(tmp, `${JSON.stringify(payload, null, 2)}\n`, { encoding: "utf-8" });
|
|
68752
|
+
await fs.chmod(tmp, 384);
|
|
68753
|
+
await fs.rename(tmp, filePath);
|
|
68754
68754
|
}
|
|
68755
68755
|
|
|
68756
68756
|
//#endregion
|
|
@@ -69107,23 +69107,23 @@ let webLoginQrPromise = null;
|
|
|
69107
69107
|
let webChannelPromise = null;
|
|
69108
69108
|
let whatsappActionsPromise = null;
|
|
69109
69109
|
function loadWebOutbound() {
|
|
69110
|
-
webOutboundPromise ??= import("./outbound-
|
|
69110
|
+
webOutboundPromise ??= import("./outbound-xWV2AYDD.js").then((n) => n.t);
|
|
69111
69111
|
return webOutboundPromise;
|
|
69112
69112
|
}
|
|
69113
69113
|
function loadWebLogin() {
|
|
69114
|
-
webLoginPromise ??= import("./login-
|
|
69114
|
+
webLoginPromise ??= import("./login-Z-O7e3RD.js").then((n) => n.n);
|
|
69115
69115
|
return webLoginPromise;
|
|
69116
69116
|
}
|
|
69117
69117
|
function loadWebLoginQr() {
|
|
69118
|
-
webLoginQrPromise ??= import("./login-qr-
|
|
69118
|
+
webLoginQrPromise ??= import("./login-qr-Cqe-9-jf.js");
|
|
69119
69119
|
return webLoginQrPromise;
|
|
69120
69120
|
}
|
|
69121
69121
|
function loadWebChannel() {
|
|
69122
|
-
webChannelPromise ??= import("./web-
|
|
69122
|
+
webChannelPromise ??= import("./web-B3QBvAid.js");
|
|
69123
69123
|
return webChannelPromise;
|
|
69124
69124
|
}
|
|
69125
69125
|
function loadWhatsAppActions() {
|
|
69126
|
-
whatsappActionsPromise ??= import("./whatsapp-actions-
|
|
69126
|
+
whatsappActionsPromise ??= import("./whatsapp-actions-pddprZ8J.js");
|
|
69127
69127
|
return whatsappActionsPromise;
|
|
69128
69128
|
}
|
|
69129
69129
|
function createPluginRuntime() {
|
|
@@ -69344,7 +69344,7 @@ const resolvePluginSdkAliasFile = (params) => {
|
|
|
69344
69344
|
const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
|
|
69345
69345
|
const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
|
|
69346
69346
|
const orderedCandidates = isTest ? [distCandidate, srcCandidate] : [distCandidate];
|
|
69347
|
-
for (const candidate of orderedCandidates) if (
|
|
69347
|
+
for (const candidate of orderedCandidates) if (fsSync.existsSync(candidate)) return candidate;
|
|
69348
69348
|
const parent = path.dirname(cursor);
|
|
69349
69349
|
if (parent === cursor) break;
|
|
69350
69350
|
cursor = parent;
|
|
@@ -69890,7 +69890,7 @@ function resolvePluginTools(params) {
|
|
|
69890
69890
|
//#endregion
|
|
69891
69891
|
//#region src/agents/apply-patch-update.ts
|
|
69892
69892
|
async function defaultReadFile(filePath) {
|
|
69893
|
-
return fs
|
|
69893
|
+
return fs.readFile(filePath, "utf8");
|
|
69894
69894
|
}
|
|
69895
69895
|
async function applyUpdateHunk(filePath, chunks, options) {
|
|
69896
69896
|
const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
|
|
@@ -70134,10 +70134,10 @@ function resolvePatchFileOps(options) {
|
|
|
70134
70134
|
};
|
|
70135
70135
|
}
|
|
70136
70136
|
return {
|
|
70137
|
-
readFile: (filePath) => fs
|
|
70138
|
-
writeFile: (filePath, content) => fs
|
|
70139
|
-
remove: (filePath) => fs
|
|
70140
|
-
mkdirp: (dir) => fs
|
|
70137
|
+
readFile: (filePath) => fs.readFile(filePath, "utf8"),
|
|
70138
|
+
writeFile: (filePath, content) => fs.writeFile(filePath, content, "utf8"),
|
|
70139
|
+
remove: (filePath) => fs.rm(filePath),
|
|
70140
|
+
mkdirp: (dir) => fs.mkdir(dir, { recursive: true }).then(() => {})
|
|
70141
70141
|
};
|
|
70142
70142
|
}
|
|
70143
70143
|
async function ensureDir(filePath, ops) {
|
|
@@ -71382,7 +71382,7 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
71382
71382
|
};
|
|
71383
71383
|
let content;
|
|
71384
71384
|
try {
|
|
71385
|
-
content = await fs
|
|
71385
|
+
content = await fs.readFile(sessionFile, "utf-8");
|
|
71386
71386
|
} catch (err) {
|
|
71387
71387
|
if (err?.code === "ENOENT") return {
|
|
71388
71388
|
repaired: false,
|
|
@@ -71430,15 +71430,15 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
71430
71430
|
const backupPath = `${sessionFile}.bak-${process.pid}-${Date.now()}`;
|
|
71431
71431
|
const tmpPath = `${sessionFile}.repair-${process.pid}-${Date.now()}.tmp`;
|
|
71432
71432
|
try {
|
|
71433
|
-
const stat = await fs
|
|
71434
|
-
await fs
|
|
71435
|
-
if (stat) await fs
|
|
71436
|
-
await fs
|
|
71437
|
-
if (stat) await fs
|
|
71438
|
-
await fs
|
|
71433
|
+
const stat = await fs.stat(sessionFile).catch(() => null);
|
|
71434
|
+
await fs.writeFile(backupPath, content, "utf-8");
|
|
71435
|
+
if (stat) await fs.chmod(backupPath, stat.mode);
|
|
71436
|
+
await fs.writeFile(tmpPath, cleaned, "utf-8");
|
|
71437
|
+
if (stat) await fs.chmod(tmpPath, stat.mode);
|
|
71438
|
+
await fs.rename(tmpPath, sessionFile);
|
|
71439
71439
|
} catch (err) {
|
|
71440
71440
|
try {
|
|
71441
|
-
await fs
|
|
71441
|
+
await fs.unlink(tmpPath);
|
|
71442
71442
|
} catch (cleanupErr) {
|
|
71443
71443
|
params.warn?.(`session file repair cleanup failed: ${cleanupErr instanceof Error ? cleanupErr.message : "unknown error"} (${path.basename(tmpPath)})`);
|
|
71444
71444
|
}
|
|
@@ -72126,8 +72126,8 @@ async function readWorkspaceContextForSummary() {
|
|
|
72126
72126
|
const workspaceDir = process.cwd();
|
|
72127
72127
|
const agentsPath = path.join(workspaceDir, "AGENTS.md");
|
|
72128
72128
|
try {
|
|
72129
|
-
if (!
|
|
72130
|
-
const sections = extractSections(await
|
|
72129
|
+
if (!fsSync.existsSync(agentsPath)) return "";
|
|
72130
|
+
const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
|
|
72131
72131
|
if (sections.length === 0) return "";
|
|
72132
72132
|
const combined = sections.join("\n\n");
|
|
72133
72133
|
return `\n\n<workspace-critical-rules>\n${combined.length > MAX_SUMMARY_CONTEXT_CHARS ? combined.slice(0, MAX_SUMMARY_CONTEXT_CHARS) + "\n...[truncated]..." : combined}\n</workspace-critical-rules>`;
|
|
@@ -72683,7 +72683,7 @@ async function prewarmSessionFile(sessionFile) {
|
|
|
72683
72683
|
if (!isSessionManagerCacheEnabled()) return;
|
|
72684
72684
|
if (isSessionManagerCached(sessionFile)) return;
|
|
72685
72685
|
try {
|
|
72686
|
-
const handle = await fs
|
|
72686
|
+
const handle = await fs.open(sessionFile, "r");
|
|
72687
72687
|
try {
|
|
72688
72688
|
const buffer = Buffer$1.alloc(4096);
|
|
72689
72689
|
await handle.read(buffer, 0, buffer.length, 0);
|
|
@@ -72816,14 +72816,14 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
72816
72816
|
if (!apiKeyInfo.apiKey) {
|
|
72817
72817
|
if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
72818
72818
|
} else if (model.provider === "github-copilot") {
|
|
72819
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
72819
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-B8B2pmph.js").then((n) => n.n);
|
|
72820
72820
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
72821
72821
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
72822
72822
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
72823
72823
|
} catch (err) {
|
|
72824
72824
|
return fail(describeUnknownError(err));
|
|
72825
72825
|
}
|
|
72826
|
-
await fs
|
|
72826
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
72827
72827
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
72828
72828
|
const sandbox = await resolveSandboxContext({
|
|
72829
72829
|
config: params.config,
|
|
@@ -72831,7 +72831,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
72831
72831
|
workspaceDir: resolvedWorkspace
|
|
72832
72832
|
});
|
|
72833
72833
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
72834
|
-
await fs
|
|
72834
|
+
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
72835
72835
|
await ensureSessionHeader({
|
|
72836
72836
|
sessionFile: params.sessionFile,
|
|
72837
72837
|
sessionId: params.sessionId,
|
|
@@ -73185,12 +73185,12 @@ function getQueuedFileWriter(writers, filePath) {
|
|
|
73185
73185
|
const existing = writers.get(filePath);
|
|
73186
73186
|
if (existing) return existing;
|
|
73187
73187
|
const dir = path.dirname(filePath);
|
|
73188
|
-
const ready = fs
|
|
73188
|
+
const ready = fs.mkdir(dir, { recursive: true }).catch(() => void 0);
|
|
73189
73189
|
let queue = Promise.resolve();
|
|
73190
73190
|
const writer = {
|
|
73191
73191
|
filePath,
|
|
73192
73192
|
write: (line) => {
|
|
73193
|
-
queue = queue.then(() => ready).then(() => fs
|
|
73193
|
+
queue = queue.then(() => ready).then(() => fs.appendFile(filePath, line, "utf8")).catch(() => void 0);
|
|
73194
73194
|
}
|
|
73195
73195
|
};
|
|
73196
73196
|
writers.set(filePath, writer);
|
|
@@ -74219,11 +74219,11 @@ function appendRawStream(payload) {
|
|
|
74219
74219
|
if (!rawStreamReady) {
|
|
74220
74220
|
rawStreamReady = true;
|
|
74221
74221
|
try {
|
|
74222
|
-
|
|
74222
|
+
fsSync.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
|
|
74223
74223
|
} catch {}
|
|
74224
74224
|
}
|
|
74225
74225
|
try {
|
|
74226
|
-
|
|
74226
|
+
fsSync.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
|
|
74227
74227
|
} catch {}
|
|
74228
74228
|
}
|
|
74229
74229
|
|
|
@@ -76032,7 +76032,7 @@ Use the message tool with buttons:
|
|
|
76032
76032
|
*/
|
|
76033
76033
|
async function readSessionFile(sessionFile) {
|
|
76034
76034
|
try {
|
|
76035
|
-
return await fs
|
|
76035
|
+
return await fs.readFile(sessionFile, "utf-8");
|
|
76036
76036
|
} catch {
|
|
76037
76037
|
return null;
|
|
76038
76038
|
}
|
|
@@ -76041,8 +76041,8 @@ async function writeAtomically(sessionFile, text) {
|
|
|
76041
76041
|
const dir = path.dirname(sessionFile);
|
|
76042
76042
|
const base = path.basename(sessionFile);
|
|
76043
76043
|
const tmp = path.join(dir, `.${base}.prune-${process.pid}-${Date.now()}.tmp`);
|
|
76044
|
-
await fs
|
|
76045
|
-
await fs
|
|
76044
|
+
await fs.writeFile(tmp, text, "utf-8");
|
|
76045
|
+
await fs.rename(tmp, sessionFile);
|
|
76046
76046
|
}
|
|
76047
76047
|
/**
|
|
76048
76048
|
* Remove empty assistant JSONL entries from the session file.
|
|
@@ -76144,7 +76144,7 @@ function isInPoisonRange(version) {
|
|
|
76144
76144
|
*/
|
|
76145
76145
|
async function checkSessionPoison(sessionFile) {
|
|
76146
76146
|
try {
|
|
76147
|
-
const firstLine = (await fs
|
|
76147
|
+
const firstLine = (await fs.readFile(sessionFile, "utf-8")).split("\n")[0];
|
|
76148
76148
|
if (!firstLine) return null;
|
|
76149
76149
|
const header = JSON.parse(firstLine);
|
|
76150
76150
|
if (header.type !== "session") return null;
|
|
@@ -76162,7 +76162,7 @@ async function checkSessionPoison(sessionFile) {
|
|
|
76162
76162
|
*/
|
|
76163
76163
|
async function archivePoisonedSession(sessionFile) {
|
|
76164
76164
|
const archiveName = `${sessionFile}.archived-poison.${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
|
|
76165
|
-
await fs
|
|
76165
|
+
await fs.rename(sessionFile, archiveName);
|
|
76166
76166
|
return archiveName;
|
|
76167
76167
|
}
|
|
76168
76168
|
/**
|
|
@@ -76171,14 +76171,14 @@ async function archivePoisonedSession(sessionFile) {
|
|
|
76171
76171
|
*/
|
|
76172
76172
|
async function stampSessionVersion(sessionFile) {
|
|
76173
76173
|
try {
|
|
76174
|
-
const lines = (await fs
|
|
76174
|
+
const lines = (await fs.readFile(sessionFile, "utf-8")).split("\n");
|
|
76175
76175
|
if (lines.length === 0) return;
|
|
76176
76176
|
const header = JSON.parse(lines[0]);
|
|
76177
76177
|
if (header.type !== "session") return;
|
|
76178
76178
|
if (header.symiVersion === VERSION) return;
|
|
76179
76179
|
header.symiVersion = VERSION;
|
|
76180
76180
|
lines[0] = JSON.stringify(header);
|
|
76181
|
-
await fs
|
|
76181
|
+
await fs.writeFile(sessionFile, lines.join("\n"), "utf-8");
|
|
76182
76182
|
} catch {}
|
|
76183
76183
|
}
|
|
76184
76184
|
/**
|
|
@@ -76345,7 +76345,7 @@ const SCRIPT_REL_PATH = "skills/long-task/scripts/detach-task.sh";
|
|
|
76345
76345
|
let cachedScriptPath;
|
|
76346
76346
|
function isExecutable(candidatePath) {
|
|
76347
76347
|
try {
|
|
76348
|
-
|
|
76348
|
+
fsSync.accessSync(candidatePath, fsSync.constants.X_OK);
|
|
76349
76349
|
return true;
|
|
76350
76350
|
} catch {
|
|
76351
76351
|
return false;
|
|
@@ -76370,12 +76370,12 @@ async function resolveDetachScriptPath(params) {
|
|
|
76370
76370
|
return null;
|
|
76371
76371
|
}
|
|
76372
76372
|
const candidate = path.join(packageRoot, SCRIPT_REL_PATH);
|
|
76373
|
-
if (!
|
|
76373
|
+
if (!fsSync.existsSync(candidate)) {
|
|
76374
76374
|
cachedScriptPath = null;
|
|
76375
76375
|
return null;
|
|
76376
76376
|
}
|
|
76377
76377
|
if (!isExecutable(candidate)) try {
|
|
76378
|
-
|
|
76378
|
+
fsSync.chmodSync(candidate, 493);
|
|
76379
76379
|
} catch {
|
|
76380
76380
|
cachedScriptPath = null;
|
|
76381
76381
|
return null;
|
|
@@ -76433,7 +76433,7 @@ async function prepareSessionManagerForRun(params) {
|
|
|
76433
76433
|
return;
|
|
76434
76434
|
}
|
|
76435
76435
|
if (params.hadSessionFile && header && !hasAssistant) {
|
|
76436
|
-
await fs
|
|
76436
|
+
await fs.writeFile(params.sessionFile, "", "utf-8");
|
|
76437
76437
|
sm.fileEntries = [header];
|
|
76438
76438
|
sm.byId?.clear?.();
|
|
76439
76439
|
sm.labelsById?.clear?.();
|
|
@@ -76991,7 +76991,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
76991
76991
|
const prevCwd = process.cwd();
|
|
76992
76992
|
const runAbortController = new AbortController();
|
|
76993
76993
|
log$9.debug(`embedded run start: runId=${params.runId} sessionId=${params.sessionId} provider=${params.provider} model=${params.modelId} thinking=${params.thinkLevel} messageChannel=${params.messageChannel ?? params.messageProvider ?? "unknown"}`);
|
|
76994
|
-
await fs
|
|
76994
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
76995
76995
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
76996
76996
|
const sandbox = await resolveSandboxContext({
|
|
76997
76997
|
config: params.config,
|
|
@@ -76999,7 +76999,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
76999
76999
|
workspaceDir: resolvedWorkspace
|
|
77000
77000
|
});
|
|
77001
77001
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
77002
|
-
await fs
|
|
77002
|
+
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
77003
77003
|
let restoreSkillEnv;
|
|
77004
77004
|
process.chdir(effectiveWorkspace);
|
|
77005
77005
|
try {
|
|
@@ -77236,7 +77236,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
77236
77236
|
sessionFile: params.sessionFile,
|
|
77237
77237
|
warn: (message) => log$9.warn(message)
|
|
77238
77238
|
});
|
|
77239
|
-
const hadSessionFile = await fs
|
|
77239
|
+
const hadSessionFile = await fs.stat(params.sessionFile).then(() => true).catch(() => false);
|
|
77240
77240
|
const transcriptPolicy = resolveTranscriptPolicy({
|
|
77241
77241
|
modelApi: params.model?.api,
|
|
77242
77242
|
provider: params.provider,
|
|
@@ -77635,6 +77635,10 @@ async function runEmbeddedAttempt(params) {
|
|
|
77635
77635
|
effectivePrompt = `${hookResult.prependContext}\n\n${params.prompt}`;
|
|
77636
77636
|
log$9.debug(`hooks: prepended context to prompt (${hookResult.prependContext.length} chars)`);
|
|
77637
77637
|
}
|
|
77638
|
+
if (hookResult?.systemPrompt) {
|
|
77639
|
+
applySystemPromptOverrideToSession(activeSession, `${systemPromptText}\n\n${hookResult.systemPrompt}`);
|
|
77640
|
+
log$9.debug(`hooks: appended systemPrompt from plugin hook (${hookResult.systemPrompt.length} chars)`);
|
|
77641
|
+
}
|
|
77638
77642
|
{
|
|
77639
77643
|
const autoRecallAgentId = normalizeAgentId(params.sessionKey);
|
|
77640
77644
|
if ((params.config ? resolveMemorySearchConfig(params.config, autoRecallAgentId) : null) && params.config) try {
|
|
@@ -78223,7 +78227,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
78223
78227
|
return;
|
|
78224
78228
|
}
|
|
78225
78229
|
if (model.provider === "github-copilot") {
|
|
78226
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
78230
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-B8B2pmph.js").then((n) => n.n);
|
|
78227
78231
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
78228
78232
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
78229
78233
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
@@ -78308,7 +78312,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
78308
78312
|
}
|
|
78309
78313
|
runLoopIterations += 1;
|
|
78310
78314
|
attemptedThinking.add(thinkLevel);
|
|
78311
|
-
await fs
|
|
78315
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
78312
78316
|
const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
|
|
78313
78317
|
const attempt = await runEmbeddedAttempt({
|
|
78314
78318
|
sessionId: params.sessionId,
|