@symerian/symi 2.6.28 → 2.6.30
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-CfHHV2SU.js → active-listener-DFUTUjxt.js} +1 -1
- package/dist/{agent-scope-CpEJ0B88.js → agent-scope-D68_xfTL.js} +3 -3
- package/dist/{agents-ST-RelE_.js → agents-F62kqpkn.js} +4 -4
- package/dist/{agents.config-BJqym5bg.js → agents.config-Bra6UznM.js} +1 -1
- package/dist/{agents.config-Dz-OLfrK.js → agents.config-CQ90zDyI.js} +1 -1
- package/dist/{audio-preflight-BVaaZWkg.js → audio-preflight-Bdbm4htn.js} +29 -29
- package/dist/{audio-preflight-C40mKAp7.js → audio-preflight-CPBOQV4I.js} +4 -4
- package/dist/{auth-choice-r5NHQXLW.js → auth-choice-D1uIw27C.js} +1 -1
- package/dist/{auth-choice-D8h_fABj.js → auth-choice-X1P4E-3Z.js} +1 -1
- package/dist/{auth-profiles-DdK1Hxaa.js → auth-profiles-Bl9aU7fc.js} +17 -17
- package/dist/{banner-Bn_I7g2w.js → banner-BabW0wLs.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 +53 -53
- 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 +53 -53
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-B6G1jnQT.js → channel-activity-DK0AV-r9.js} +1 -1
- package/dist/{channel-options-I_uoOZoj.js → channel-options-C64unDdQ.js} +1 -1
- package/dist/{channel-options-DwvK56mc.js → channel-options-CX-LE2dk.js} +1 -1
- package/dist/{channel-web-b0CCqrmj.js → channel-web-GzdyP40j.js} +1 -1
- package/dist/{channels-cli-BuYlQcEc.js → channels-cli-CQrhnixR.js} +4 -4
- package/dist/{channels-cli-TWQv4Aur.js → channels-cli-OymBYTkK.js} +4 -4
- package/dist/{chrome-DkaXoP36.js → chrome-BdQhP7bg.js} +21 -21
- package/dist/{chrome-CDJYxX5a.js → chrome-D2SKJnR7.js} +7 -7
- package/dist/{chunk-09egQapi.js → chunk-DR8ukp6r.js} +1 -1
- package/dist/{cli-CVwt1Fg7.js → cli-C1RjRVMT.js} +1 -1
- package/dist/{cli-Dul8S9oW.js → cli-zchCoTxI.js} +1 -1
- package/dist/{command-registry--BVAkymo.js → command-registry-D9xmmn9v.js} +9 -9
- package/dist/{commands-registry-Bfc7Uz0o.js → commands-registry-DIakZUZb.js} +4 -4
- package/dist/{completion-cli-CMPF-UWB.js → completion-cli-CdMbiAwX.js} +2 -2
- package/dist/{completion-cli-LSZGfNYt.js → completion-cli-CfhJhArh.js} +1 -1
- package/dist/{config-5SdHIcHU.js → config-CvmE3Yx1.js} +12 -12
- package/dist/{config-cli-CGl36qcO.js → config-cli-BWhToRSW.js} +1 -1
- package/dist/{config-cli-Ba5_OYLK.js → config-cli-De0w9QFu.js} +1 -1
- package/dist/{configure-BkxvX0D4.js → configure-DBPxwVXT.js} +3 -3
- package/dist/{configure-52avjwpv.js → configure-iCtE2gdv.js} +3 -3
- package/dist/control-ui/js/symipulse.js +4 -0
- package/dist/{deliver-C46-vyqg.js → deliver-BD6kFk6p.js} +20 -20
- package/dist/{deliver-BH0l3UKW.js → deliver-C-37cZUe.js} +1 -1
- package/dist/{diagnostic-rPhsBoZz.js → diagnostic-spWOtH_g.js} +1 -1
- package/dist/{doctor-completion-3JibMuKJ.js → doctor-completion-Cuy1NwzL.js} +1 -1
- package/dist/{doctor-completion-C8TRMeH9.js → doctor-completion-htc4kMhg.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{env-BDXYbTKj.js → env-xmBFQPBP.js} +1 -1
- package/dist/extensionAPI.js +6 -6
- package/dist/{frontmatter-CTR5f_Ez.js → frontmatter-CV0YkjoY.js} +2 -2
- package/dist/{gateway-cli-CcBKPe7-.js → gateway-cli-DxSUgxx3.js} +9 -9
- package/dist/{gateway-cli-CRAuYms0.js → gateway-cli-pIBNUJhN.js} +9 -9
- package/dist/{gemini-auth-Dy12ZAH3.js → gemini-auth-C6Z-2T42.js} +1 -1
- package/dist/{github-copilot-token-cCYzSU9h.js → github-copilot-token-B8B2pmph.js} +7 -7
- package/dist/{glass-ui-ws-B2LHyjWF.js → glass-ui-ws-B5Iw-tYt.js} +7 -7
- package/dist/{glass-ui-ws-odUDh4Ax.js → glass-ui-ws-BVcaUJ4x.js} +7 -7
- package/dist/{health-cAOv8KHf.js → health-DK1EhshZ.js} +1 -1
- package/dist/{health-DU1f-Ruq.js → health-qWkLoxz7.js} +1 -1
- package/dist/{hooks-cli-BRlCeWiG.js → hooks-cli-Bt_pfMq8.js} +2 -2
- package/dist/{hooks-cli-Dtyjf26K.js → hooks-cli-QmJBRt0j.js} +2 -2
- package/dist/{image-CuzFLQWC.js → image-CE0mENPo.js} +4 -4
- package/dist/{image-CHzdaNJ4.js → image-DcpMiprB.js} +1 -1
- package/dist/{image-ops-C7CauEK8.js → image-ops-M5agStZn.js} +16 -16
- package/dist/index.js +6 -6
- package/dist/{ir-CTiz95Vb.js → ir-B-XXcYFe.js} +4 -4
- package/dist/llm-slug-generator.js +53 -53
- package/dist/{local-roots-DhZz0Ybs.js → local-roots-CdXg5-Cx.js} +5 -5
- package/dist/{login-ul8zaw_S.js → login-BHUrERYo.js} +7 -7
- package/dist/{login-qr-AP9agO-i.js → login-qr-BKIOHn1V.js} +12 -12
- package/dist/{manager-PprhCvO_.js → manager-DW3JqFpY.js} +22 -22
- package/dist/{manifest-registry-yb7sAlu4.js → manifest-registry-0J48biqr.js} +19 -19
- package/dist/{markdown-tables-C-BmIap8.js → markdown-tables-tW9bGjLM.js} +1 -1
- package/dist/{plugin-sdk/message-channel-BdI5Ra9S.js → message-channel-DwDSKGn4.js} +1 -1
- package/dist/{models-BQL1Rx8A.js → models-CBAKijCe.js} +2 -2
- package/dist/{models-cli-iXoriT4a.js → models-cli-CtWHHvR0.js} +3 -3
- package/dist/{models-cli-BWNnBUiT.js → models-cli-DkNjxGZ8.js} +2 -2
- package/dist/{onboard-dIjmiymZ.js → onboard-BmK2-tfb.js} +2 -2
- package/dist/{onboard-channels-99ZIc6U9.js → onboard-channels-CcoMVcOs.js} +1 -1
- package/dist/{onboard-channels-C87IzN9d.js → onboard-channels-CnNA3U8_.js} +1 -1
- package/dist/{onboard-D8IHkR2A.js → onboard-wJCi24zf.js} +2 -2
- package/dist/{onboarding-DCPTymIi.js → onboarding-Cs7XncoX.js} +3 -3
- package/dist/{onboarding-B-J8KGlq.js → onboarding-GGE9UgcE.js} +3 -3
- package/dist/{onboarding.finalize-DYrKwuL6.js → onboarding.finalize-BEMefoBu.js} +6 -6
- package/dist/{onboarding.finalize-CqnM29uP.js → onboarding.finalize-CawqY9YT.js} +5 -5
- package/dist/{outbound-CtMCmwxR.js → outbound-CIVsLpJK.js} +7 -7
- package/dist/{outbound-attachment-DJldbweZ.js → outbound-attachment-CHcmlip8.js} +2 -2
- package/dist/paths-CYmyCDsE.js +212 -0
- package/dist/{paths-CbQV9WEg.js → paths-DEuVuViW.js} +1 -1
- package/dist/{pi-auth-json-Bk8ERadJ.js → pi-auth-json-BYuCWAs0.js} +8 -8
- package/dist/{pi-embedded-BpqY8Naf.js → pi-embedded-eCY-k0yS.js} +20 -18
- package/dist/{pi-embedded-helpers-lgx_U5KS.js → pi-embedded-helpers-B8kqLWns.js} +4 -4
- package/dist/{pi-embedded-helpers-CfqDGQ9J.js → pi-embedded-helpers-Pnxzi8V5.js} +73 -73
- package/dist/{plugin-registry-Cp2i5y4t.js → plugin-registry-BqSezGzv.js} +1 -1
- package/dist/{plugin-registry-D54PM8pM.js → plugin-registry-C-RHl6z7.js} +1 -1
- package/dist/plugin-sdk/{accounts-BToL3HlP.js → accounts-BtaOa4z_.js} +1 -1
- package/dist/plugin-sdk/{accounts-D9zGZU5t.js → accounts-Ddm33hQm.js} +3 -3
- package/dist/plugin-sdk/{accounts-Dtszw3Zn.js → accounts-s-AdhXVR.js} +1 -1
- package/dist/plugin-sdk/{active-listener-bEk__wbB.js → active-listener-BXYeALs0.js} +1 -1
- package/dist/plugin-sdk/{agent-scope-C3gMMKCU.js → agent-scope-CYYpcO9W.js} +2 -2
- package/dist/plugin-sdk/{api-key-rotation-CVBMpnPc.js → api-key-rotation-D_sMvI5W.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-DoQQKlxa.js → audio-preflight-VpItkiy3.js} +24 -24
- package/dist/plugin-sdk/{bindings-BbwoUGPx.js → bindings-C7hRtgYW.js} +2 -2
- package/dist/plugin-sdk/{channel-activity-Ji7f0gqq.js → channel-activity-DoC1xtDu.js} +1 -1
- package/dist/plugin-sdk/{channel-web-DSd2f31z.js → channel-web-BOFr3AaP.js} +22 -22
- package/dist/plugin-sdk/{chrome-C7c_0I5M.js → chrome-B7RdxmJ0.js} +3 -3
- package/dist/plugin-sdk/{chunk-jvk9axTQ.js → chunk-Dw2XBYXv.js} +1 -1
- package/dist/plugin-sdk/{command-format-DSdvQ_M5.js → command-format-GKSevep4.js} +1 -1
- package/dist/plugin-sdk/{commands-registry-CQFbmUMs.js → commands-registry-COIaslGl.js} +4 -4
- package/dist/plugin-sdk/{config-DDkdiUOR.js → config-KlTNfkFF.js} +9 -9
- package/dist/plugin-sdk/{deliver-BZ6iNLl7.js → deliver-BZ99UKQq.js} +10 -10
- package/dist/plugin-sdk/{diagnostic-mFf4i4G9.js → diagnostic-05pm5Rxi.js} +1 -1
- package/dist/plugin-sdk/{image-BOYy0Ump.js → image-CLOPx7yW.js} +4 -4
- package/dist/plugin-sdk/{image-ops-Bnp6LXEx.js → image-ops-BlQR__MN.js} +1 -1
- package/dist/plugin-sdk/index.js +53 -53
- package/dist/plugin-sdk/{ir-Fb3qpcis.js → ir-BJ6BHE5b.js} +4 -4
- package/dist/plugin-sdk/{local-roots-Ckk1QfzI.js → local-roots-BHLNSI8U.js} +3 -3
- package/dist/plugin-sdk/{login-Bh3DZPam.js → login-DQMXuxOk.js} +7 -7
- package/dist/plugin-sdk/{login-qr-DbR7odSr.js → login-qr-BjVZSoCi.js} +9 -9
- package/dist/plugin-sdk/{manager-DckktAQ3.js → manager-CBSBFuFz.js} +8 -8
- package/dist/plugin-sdk/{manifest-registry-B3ugY9-f.js → manifest-registry-CPnHl_K3.js} +1 -1
- package/dist/plugin-sdk/{markdown-tables-Dfaqilz6.js → markdown-tables-BoYFajMu.js} +1 -1
- package/dist/{message-channel-OlFBYAw8.js → plugin-sdk/message-channel-COTAJzHd.js} +1 -1
- package/dist/plugin-sdk/{model-selection-OpU8HN50.js → model-selection-CsbEfrS0.js} +4 -4
- package/dist/plugin-sdk/{outbound-rF6G8Xpr.js → outbound-B0e8KdaR.js} +7 -7
- package/dist/plugin-sdk/{outbound-attachment-DnVQfTG2.js → outbound-attachment-CnslKL38.js} +2 -2
- package/dist/plugin-sdk/{pi-auth-json-CJk8t14T.js → pi-auth-json-qWi7ZIYV.js} +5 -5
- package/dist/plugin-sdk/{pi-embedded-helpers-BveUP4hk.js → pi-embedded-helpers-CW630epe.js} +17 -17
- package/dist/plugin-sdk/{plugins-BbAvhC25.js → plugins-BNByVCIH.js} +4 -4
- package/dist/plugin-sdk/{pw-ai-DjGUsee-.js → pw-ai-CnbPIPY9.js} +8 -8
- package/dist/plugin-sdk/{qmd-manager-mjKcdwVr.js → qmd-manager-CH0XbIHf.js} +4 -4
- package/dist/plugin-sdk/{registry--_pGht6S.js → registry-D0xTnUWt.js} +2 -2
- package/dist/plugin-sdk/{replies-fI39rPGa.js → replies-LLcQL3w6.js} +3 -3
- package/dist/plugin-sdk/{reply-XQCt49hi.js → reply-B7rSYofo.js} +82 -80
- package/dist/plugin-sdk/{reply-prefix-BHuV5t70.js → reply-prefix-uxfMZW4p.js} +1 -1
- package/dist/plugin-sdk/{resolve-outbound-target-BkCUbYGV.js → resolve-outbound-target-BiyAyTWz.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-D3JH_D2N.js → resolve-route-B3CCBumQ.js} +3 -3
- package/dist/plugin-sdk/{retry-ilSJqnz9.js → retry-CwQ_iIj8.js} +1 -1
- package/dist/plugin-sdk/{runner-BVqnEfNe.js → runner-CGBT7tgF.js} +9 -9
- package/dist/plugin-sdk/{send-BtANzsAo.js → send-B2CEnVLL.js} +6 -6
- package/dist/plugin-sdk/{send-BHbXh8Ly.js → send-C5h_YxNb.js} +7 -7
- package/dist/plugin-sdk/{send-D6LMZJ_h.js → send-CRsR8-vO.js} +10 -10
- package/dist/plugin-sdk/{send-Bxdu6ZZy.js → send-CjOBB3Vo.js} +10 -10
- package/dist/plugin-sdk/{send-BMfJIhCk.js → send-pYqe432l.js} +6 -6
- package/dist/plugin-sdk/{session-kI0tzViQ.js → session-BsOrxiMj.js} +4 -4
- package/dist/plugin-sdk/{skill-commands-DCNXVERE.js → skill-commands-ff_01_r3.js} +5 -5
- package/dist/plugin-sdk/{skills-B1GeRYlu.js → skills-_yTP47Cd.js} +7 -7
- package/dist/plugin-sdk/{sqlite-Cq_7Cg4E.js → sqlite-CxAR5ttJ.js} +1 -1
- package/dist/plugin-sdk/{store-Do3t33-c.js → store-BdrNabcU.js} +2 -2
- package/dist/plugin-sdk/{subsystem-Coz2AgU8.js → subsystem-B2uDN3TV.js} +1 -1
- package/dist/plugin-sdk/{tables-DR0NmBeH.js → tables-DNwXwNFa.js} +1 -1
- package/dist/plugin-sdk/{target-errors-B7YyMnIi.js → target-errors-Paro1BjP.js} +2 -2
- package/dist/plugin-sdk/{thinking-DCNUIAHY.js → thinking-CXqf7WTe.js} +5 -5
- package/dist/{tokens-Bux9Y_xD.js → plugin-sdk/tokens-bC3UVmVH.js} +1 -1
- package/dist/{tool-images-SqqWIT22.js → plugin-sdk/tool-images-HJ2sfZDV.js} +2 -2
- package/dist/plugin-sdk/{tool-loop-detection-DU5sTIKg.js → tool-loop-detection-at_K42K7.js} +2 -2
- package/dist/plugin-sdk/web-iaHlqNQD.js +65 -0
- package/dist/plugin-sdk/{whatsapp-actions-CcBzDuL-.js → whatsapp-actions-DfseosPO.js} +21 -21
- package/dist/{plugins-BzmbgY7s.js → plugins-Bkr5ZdYs.js} +9 -9
- package/dist/{plugins-cli-BK2oAIgt.js → plugins-cli-D5l8DCUo.js} +2 -2
- package/dist/{plugins-cli-DPVj7Ll8.js → plugins-cli-DIKVN1j-.js} +2 -2
- package/dist/{program-Cs6SC0Y3.js → program-DKp_gWvH.js} +7 -7
- package/dist/{program-context-9l2VE3gk.js → program-context-CJO5zWl7.js} +17 -17
- package/dist/{prompt-select-styled-BEblj71P.js → prompt-select-styled-CuDVrio_.js} +4 -4
- package/dist/{prompt-select-styled-0rN-Bjc0.js → prompt-select-styled-Drbf4MLf.js} +4 -4
- package/dist/{provider-auth-helpers-BMmt5mEA.js → provider-auth-helpers-D0JrH_QE.js} +1 -1
- package/dist/{provider-auth-helpers-K5FZKmUs.js → provider-auth-helpers-ku70HLId.js} +1 -1
- package/dist/{push-apns-DkYs830G.js → push-apns-DWLiMsGQ.js} +1 -1
- package/dist/{push-apns-c1qXclcv.js → push-apns-DZvXSHuB.js} +1 -1
- package/dist/{pw-ai-De-KR9_s.js → pw-ai-1htA-NnS.js} +1 -1
- package/dist/{pw-ai-m0mj2KWK.js → pw-ai-BA-fJnJc.js} +11 -11
- package/dist/{qmd-manager-iDLSiI4Z.js → qmd-manager-BKu9rOuB.js} +7 -7
- package/dist/{register.agent-CMteZ9CA.js → register.agent-CW-Jt26a.js} +5 -5
- package/dist/{register.agent-B39c6eVV.js → register.agent-Dr-AvNVj.js} +6 -6
- package/dist/{register.configure-DNdw3aHr.js → register.configure-CPykN4LB.js} +6 -6
- package/dist/{register.configure-BPxWBOcN.js → register.configure-D3_5DZTq.js} +6 -6
- package/dist/{register.maintenance-BpLQ73q6.js → register.maintenance-BOxfAudK.js} +7 -7
- package/dist/{register.maintenance-DnLb4_pC.js → register.maintenance-BValTiSe.js} +8 -8
- package/dist/{register.message-CeZGfAG1.js → register.message-BzVaP85q.js} +2 -2
- package/dist/{register.message-DFEhBqvI.js → register.message-lbfcALgz.js} +2 -2
- package/dist/{register.onboard-Bbu2o5v-.js → register.onboard-B_CORRMq.js} +4 -4
- package/dist/{register.onboard-XELS-V90.js → register.onboard-CxhJjGFr.js} +4 -4
- package/dist/{register.setup-BbBvDDru.js → register.setup-CYeKu0ru.js} +4 -4
- package/dist/{register.setup-CLE7PdHv.js → register.setup-DeT-WyJj.js} +4 -4
- package/dist/{register.status-health-sessions-7zhAiHx0.js → register.status-health-sessions-BrNEfd3r.js} +3 -3
- package/dist/{register.status-health-sessions-D4qCiL0J.js → register.status-health-sessions-CYwrV6QO.js} +3 -3
- package/dist/{register.subclis-DovpQkAb.js → register.subclis-BCcY1GJC.js} +9 -9
- package/dist/{registry-DYq1AYOv.js → registry-UkL38jvt.js} +17 -17
- package/dist/{replies-LSmuwOhA.js → replies-mfnbLu2p.js} +3 -3
- package/dist/{reply-TUgh96BH.js → reply-BNLTgD0A.js} +6 -4
- package/dist/{reply-prefix-DpqZu44Z.js → reply-prefix-DkGsdyBm.js} +1 -1
- package/dist/{resolve-route-C4_I4GFI.js → resolve-route-q8AFnU5c.js} +4 -4
- package/dist/{retry-BBVXkKBV.js → retry-CqMeDhyp.js} +1 -1
- package/dist/{run-main-BPf5aLAC.js → run-main-BVSVpxZ3.js} +14 -14
- package/dist/{runner-DUBExAb5.js → runner-BcQ0sF9T.js} +1 -1
- package/dist/{runner-CU9l0uJh.js → runner-BnAUcMiq.js} +22 -22
- package/dist/{send-DYj_o4_F.js → send-B7z8CDbr.js} +18 -18
- package/dist/{send-CQAKg_12.js → send-Cd81AY_Z.js} +7 -7
- package/dist/{send-CvhXrdgS.js → send-D3zDmQim.js} +10 -10
- package/dist/{send-DAN9hA5h.js → send-XRUYukww.js} +6 -6
- package/dist/{send-CVMyYPQw.js → send-qItpAHcI.js} +6 -6
- package/dist/{server-methods-DAkx0Jqj.js → server-methods-BYcfPp30.js} +7 -7
- package/dist/{server-methods-DFuRwfyn.js → server-methods-BhRjuKEM.js} +7 -7
- package/dist/{server-node-events-CwxdrTiK.js → server-node-events-BEzZn2VI.js} +2 -2
- package/dist/{server-node-events-BiFHrjUb.js → server-node-events-BsPi-QDx.js} +2 -2
- package/dist/{session-DSU1vxxi.js → session-Dh2wWQkD.js} +8 -8
- package/dist/{skill-commands-DcVwOafC.js → skill-commands-B_f8uGi7.js} +16 -16
- package/dist/{skills-Bs0AW1g3.js → skills-CGHRETGF.js} +24 -24
- package/dist/{sqlite-D_mz1_-y.js → sqlite-Bv87EXeg.js} +16 -16
- package/dist/{status-QRydo-7w.js → status-BB7l5YGy.js} +2 -2
- package/dist/{status-C42zRdTE.js → status-BZgA_AUW.js} +1 -1
- package/dist/{status-DLT_0K6s.js → status-C7VswIJF.js} +1 -1
- package/dist/{status-v1fz4XO0.js → status-D9MVzUtM.js} +2 -2
- package/dist/{store-01F_JM7O.js → store-Ea3zM6xK.js} +6 -6
- package/dist/{subagent-registry-btvK-uGU.js → subagent-registry-CT87UyVy.js} +6 -4
- package/dist/{subsystem-BjyjJF-d.js → subsystem-DN75fnEF.js} +1 -1
- package/dist/{tables-qMwbq29u.js → tables-BX7_aBvN.js} +1 -1
- package/dist/{target-errors-Bbr9rlzN.js → target-errors-7KhTCTdS.js} +2 -2
- package/dist/{thinking-BprCy23Z.js → thinking-C9-JAUzD.js} +5 -5
- package/dist/{plugin-sdk/tokens-CWMflosr.js → tokens-BZGy4v--.js} +1 -1
- package/dist/{plugin-sdk/tool-images-D7Lno-TE.js → tool-images-B1qVCntj.js} +2 -2
- package/dist/{tool-loop-detection-DR_rrIA1.js → tool-loop-detection-C8FBZVVx.js} +3 -3
- package/dist/{unified-runner-BzcXoZmB.js → unified-runner-LSPKHmvx.js} +228 -226
- package/dist/{update-cli-CCo0jjlD.js → update-cli-DEbsukOW.js} +8 -8
- package/dist/{update-cli-JXIAh9-v.js → update-cli-Dyg_WetV.js} +7 -7
- package/dist/{update-runner-CNBdOfqY.js → update-runner-3-pTGczW.js} +1 -1
- package/dist/{update-runner-Dy2tM0ZX.js → update-runner-DYuIPErv.js} +1 -1
- package/dist/{web-PvQddZps.js → web-Bu_faeV-.js} +6 -6
- package/dist/{web-Bn27WNAv.js → web-CB7FYstW.js} +1 -1
- package/dist/{web-Bhv2j2Bf.js → web-DyvSF1Pu.js} +57 -57
- package/dist/{web-BB6PGgjn.js → web-Q47zU0qb.js} +2 -2
- package/dist/{whatsapp-actions-BIeSWsCF.js → whatsapp-actions-SXenaJIn.js} +23 -23
- package/dist/{workspace-DscDraUb.js → workspace-DqJ5h-ZB.js} +27 -27
- package/extensions/bluebubbles/node_modules/.bin/symi +0 -0
- package/extensions/copilot-proxy/node_modules/.bin/symi +0 -0
- package/extensions/diagnostics-otel/node_modules/.bin/acorn +0 -0
- package/extensions/diagnostics-otel/node_modules/.bin/symi +0 -0
- package/extensions/discord/node_modules/.bin/symi +0 -0
- package/extensions/feishu/node_modules/.bin/symi +0 -0
- package/extensions/google-antigravity-auth/node_modules/.bin/symi +0 -0
- package/extensions/google-gemini-cli-auth/node_modules/.bin/symi +0 -0
- package/extensions/googlechat/node_modules/.bin/symi +0 -0
- package/extensions/imessage/node_modules/.bin/symi +0 -0
- package/extensions/irc/node_modules/.bin/symi +0 -0
- package/extensions/learning-loop/node_modules/.bin/symi +0 -0
- package/extensions/line/node_modules/.bin/symi +0 -0
- package/extensions/matrix/node_modules/.bin/markdown-it +0 -0
- package/extensions/matrix/node_modules/.bin/symi +0 -0
- package/extensions/mattermost/node_modules/.bin/symi +0 -0
- package/extensions/memory-core/node_modules/.bin/symi +0 -0
- package/extensions/memory-lancedb/node_modules/.bin/arrow2csv +0 -0
- package/extensions/memory-lancedb/node_modules/.bin/openai +0 -0
- package/extensions/memory-lancedb/node_modules/.bin/symi +0 -0
- package/extensions/minimax-portal-auth/node_modules/.bin/symi +0 -0
- package/extensions/msteams/node_modules/.bin/symi +0 -0
- package/extensions/nextcloud-talk/node_modules/.bin/symi +0 -0
- package/extensions/nostr/node_modules/.bin/symi +0 -0
- package/extensions/nostr/node_modules/.bin/tsc +0 -0
- package/extensions/nostr/node_modules/.bin/tsserver +0 -0
- package/extensions/signal/node_modules/.bin/symi +0 -0
- package/extensions/slack/node_modules/.bin/symi +0 -0
- package/extensions/telegram/node_modules/.bin/symi +0 -0
- package/extensions/tlon/node_modules/.bin/symi +0 -0
- package/extensions/twitch/node_modules/.bin/symi +0 -0
- package/extensions/voice-call/node_modules/.bin/symi +0 -0
- package/extensions/whatsapp/node_modules/.bin/symi +0 -0
- package/extensions/zalo/node_modules/.bin/symi +0 -0
- package/extensions/zalouser/node_modules/.bin/symi +0 -0
- package/package.json +113 -83
- package/skills/nano-banana-pro/scripts/generate_image.py +0 -0
- package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +0 -0
- package/skills/tmux/scripts/find-sessions.sh +0 -0
- package/skills/tmux/scripts/wait-for-text.sh +0 -0
- package/dist/plugin-sdk/web--1cVrQ1K.js +0 -65
|
@@ -1,76 +1,76 @@
|
|
|
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 resolveSymiAgentDir, B as resolveApiKeyForProvider, C as normalizeProviderId, D as resolveModelRefFromString, E as resolveDefaultModelForAgent, F as OLLAMA_NATIVE_BASE_URL, H as resolveModelAuthMode, I as createOllamaStreamFn, K as resolveShellEnvFallbackTimeoutMs, L as getApiKeyForModel, O as resolveSubagentSpawnModelSelection, Q as resolveAuthProfileDisplayLabel, R as getCustomProviderApiKey, S as normalizeModelRef$2, T as resolveConfiguredModelRef, U as normalizeSecretInput, V as resolveEnvApiKey, W as getShellPathFromLoginShell, X as DEFAULT_MODEL, Y as DEFAULT_CONTEXT_TOKENS, Z as DEFAULT_PROVIDER, _ as buildConfiguredAllowlistKeys, a as markAuthProfileFailure, b as isCliProvider, c as dedupeProfileIds, d as ensureAuthProfileStore, f as resolveAuthStorePathForDisplay, g as buildAllowedModelSet, i as isProfileInCooldown, k as resolveThinkingDefault, l as listProfilesForProvider, n as resolveAuthProfileOrder, o as markAuthProfileUsed, p as withFileLock, 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 resolveSymiAgentDir, B as resolveApiKeyForProvider, C as normalizeProviderId, D as resolveModelRefFromString, E as resolveDefaultModelForAgent, F as OLLAMA_NATIVE_BASE_URL, H as resolveModelAuthMode, I as createOllamaStreamFn, K as resolveShellEnvFallbackTimeoutMs, L as getApiKeyForModel, O as resolveSubagentSpawnModelSelection, Q as resolveAuthProfileDisplayLabel, R as getCustomProviderApiKey, S as normalizeModelRef$2, T as resolveConfiguredModelRef, U as normalizeSecretInput, V as resolveEnvApiKey, W as getShellPathFromLoginShell, X as DEFAULT_MODEL, Y as DEFAULT_CONTEXT_TOKENS, Z as DEFAULT_PROVIDER, _ as buildConfiguredAllowlistKeys, a as markAuthProfileFailure, b as isCliProvider, c as dedupeProfileIds, d as ensureAuthProfileStore, f as resolveAuthStorePathForDisplay, g as buildAllowedModelSet, i as isProfileInCooldown, k as resolveThinkingDefault, l as listProfilesForProvider, n as resolveAuthProfileOrder, o as markAuthProfileUsed, p as withFileLock, r as getSoonestCooldownExpiry, s as resolveApiKeyForProfile, u as markAuthProfileGood, v as buildModelAliasIndex, x as modelKey, y as findNormalizedProviderValue, z as requireApiKey } from "./auth-profiles-Bl9aU7fc.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-Pnxzi8V5.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-CvmE3Yx1.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-0J48biqr.js";
|
|
16
|
+
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-BdQhP7bg.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-CGHRETGF.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-qItpAHcI.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-D3zDmQim.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-BD6kFk6p.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-spWOtH_g.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 { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-
|
|
39
|
-
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-CE0mENPo.js";
|
|
38
|
+
import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-BZGy4v--.js";
|
|
39
|
+
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-B7z8CDbr.js";
|
|
40
40
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-Bv5YDJc8.js";
|
|
41
|
-
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
42
|
-
import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-
|
|
43
|
-
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-
|
|
44
|
-
import { n as retryAsync } from "./retry-
|
|
45
|
-
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-
|
|
46
|
-
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-
|
|
47
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
41
|
+
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-DkGsdyBm.js";
|
|
42
|
+
import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-DW3JqFpY.js";
|
|
43
|
+
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-Bv87EXeg.js";
|
|
44
|
+
import { n as retryAsync } from "./retry-CqMeDhyp.js";
|
|
45
|
+
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-7KhTCTdS.js";
|
|
46
|
+
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-DR8ukp6r.js";
|
|
47
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-tW9bGjLM.js";
|
|
48
48
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-DL3f_O53.js";
|
|
49
|
-
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-
|
|
50
|
-
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-
|
|
51
|
-
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-
|
|
52
|
-
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-
|
|
53
|
-
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-
|
|
49
|
+
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-CdXg5-Cx.js";
|
|
50
|
+
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-B-XXcYFe.js";
|
|
51
|
+
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-DIakZUZb.js";
|
|
52
|
+
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-BnAUcMiq.js";
|
|
53
|
+
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-B_f8uGi7.js";
|
|
54
54
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-DSDTl6Kj.js";
|
|
55
55
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-Bso4i15F.js";
|
|
56
56
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-Bup9wS1y.js";
|
|
57
|
-
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-
|
|
57
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-DK0AV-r9.js";
|
|
58
58
|
import { n as normalizePollInput } from "./polls-CCuCaqgv.js";
|
|
59
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
60
|
-
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-
|
|
61
|
-
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-
|
|
62
|
-
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-
|
|
59
|
+
import { t as convertMarkdownTables } from "./tables-BX7_aBvN.js";
|
|
60
|
+
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-XRUYukww.js";
|
|
61
|
+
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-Cd81AY_Z.js";
|
|
62
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-q8AFnU5c.js";
|
|
63
63
|
import { t as makeProxyFetch } from "./proxy-CBJ1upuz.js";
|
|
64
|
-
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
65
|
-
import { t as getActiveWebListener } from "./active-listener-
|
|
64
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-mfnbLu2p.js";
|
|
65
|
+
import { t as getActiveWebListener } from "./active-listener-DFUTUjxt.js";
|
|
66
66
|
import { createRequire } from "node:module";
|
|
67
67
|
import * as path$1 from "node:path";
|
|
68
68
|
import path from "node:path";
|
|
69
|
-
import
|
|
69
|
+
import fsSync, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
70
70
|
import os, { homedir } from "node:os";
|
|
71
71
|
import JSON5 from "json5";
|
|
72
|
-
import * as fs$
|
|
73
|
-
import fs
|
|
72
|
+
import * as fs$1 from "node:fs/promises";
|
|
73
|
+
import fs from "node:fs/promises";
|
|
74
74
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
75
75
|
import { inspect, promisify } from "node:util";
|
|
76
76
|
import { fileURLToPath } from "node:url";
|
|
@@ -80,7 +80,7 @@ import AjvPkg from "ajv";
|
|
|
80
80
|
import { CURRENT_SESSION_VERSION, DefaultResourceLoader, SessionManager, SettingsManager, codingTools, createAgentSession, createEditTool, createReadTool, createWriteTool, estimateTokens, generateSummary, readTool } from "@mariozechner/pi-coding-agent";
|
|
81
81
|
import { createServer } from "node:http";
|
|
82
82
|
import { ProxyAgent, fetch as fetch$1 } from "undici";
|
|
83
|
-
import WebSocket
|
|
83
|
+
import WebSocket, { WebSocket as WebSocket$1 } from "ws";
|
|
84
84
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
85
85
|
import { EdgeTTS } from "node-edge-tts";
|
|
86
86
|
import { createJiti } from "jiti";
|
|
@@ -3921,7 +3921,7 @@ async function resolveSymiDocsPath(params) {
|
|
|
3921
3921
|
const workspaceDir = params.workspaceDir?.trim();
|
|
3922
3922
|
if (workspaceDir) {
|
|
3923
3923
|
const workspaceDocs = path.join(workspaceDir, "docs");
|
|
3924
|
-
if (
|
|
3924
|
+
if (fsSync.existsSync(workspaceDocs)) return workspaceDocs;
|
|
3925
3925
|
}
|
|
3926
3926
|
const packageRoot = await resolveSymiPackageRoot({
|
|
3927
3927
|
cwd: params.cwd,
|
|
@@ -3930,7 +3930,7 @@ async function resolveSymiDocsPath(params) {
|
|
|
3930
3930
|
});
|
|
3931
3931
|
if (!packageRoot) return null;
|
|
3932
3932
|
const packageDocs = path.join(packageRoot, "docs");
|
|
3933
|
-
return
|
|
3933
|
+
return fsSync.existsSync(packageDocs) ? packageDocs : null;
|
|
3934
3934
|
}
|
|
3935
3935
|
|
|
3936
3936
|
//#endregion
|
|
@@ -4239,7 +4239,7 @@ async function getMemorySearchManager(params) {
|
|
|
4239
4239
|
if (cached) return { manager: cached };
|
|
4240
4240
|
}
|
|
4241
4241
|
try {
|
|
4242
|
-
const { QmdMemoryManager } = await import("./qmd-manager-
|
|
4242
|
+
const { QmdMemoryManager } = await import("./qmd-manager-BKu9rOuB.js");
|
|
4243
4243
|
const primary = await QmdMemoryManager.create({
|
|
4244
4244
|
cfg: params.cfg,
|
|
4245
4245
|
agentId: params.agentId,
|
|
@@ -4251,7 +4251,7 @@ async function getMemorySearchManager(params) {
|
|
|
4251
4251
|
const wrapper = new FallbackMemoryManager({
|
|
4252
4252
|
primary,
|
|
4253
4253
|
fallbackFactory: async () => {
|
|
4254
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
4254
|
+
const { MemoryIndexManager } = await import("./manager-DW3JqFpY.js").then((n) => n.t);
|
|
4255
4255
|
return await MemoryIndexManager.get(params);
|
|
4256
4256
|
}
|
|
4257
4257
|
}, () => QMD_MANAGER_CACHE.delete(cacheKey));
|
|
@@ -4264,7 +4264,7 @@ async function getMemorySearchManager(params) {
|
|
|
4264
4264
|
}
|
|
4265
4265
|
}
|
|
4266
4266
|
try {
|
|
4267
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
4267
|
+
const { MemoryIndexManager } = await import("./manager-DW3JqFpY.js").then((n) => n.t);
|
|
4268
4268
|
return { manager: await MemoryIndexManager.get(params) };
|
|
4269
4269
|
} catch (err) {
|
|
4270
4270
|
return {
|
|
@@ -6812,7 +6812,7 @@ async function recordLoopOutcome(args) {
|
|
|
6812
6812
|
if (!args.ctx?.sessionKey) return;
|
|
6813
6813
|
try {
|
|
6814
6814
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
|
|
6815
|
-
const { recordToolCallOutcome } = await import("./tool-loop-detection-
|
|
6815
|
+
const { recordToolCallOutcome } = await import("./tool-loop-detection-C8FBZVVx.js");
|
|
6816
6816
|
recordToolCallOutcome(getDiagnosticSessionState({
|
|
6817
6817
|
sessionKey: args.ctx.sessionKey,
|
|
6818
6818
|
sessionId: args.ctx?.agentId
|
|
@@ -6833,8 +6833,8 @@ async function runBeforeToolCallHook(args) {
|
|
|
6833
6833
|
const params = args.params;
|
|
6834
6834
|
if (args.ctx?.sessionKey) {
|
|
6835
6835
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
|
|
6836
|
-
const { logToolLoopAction } = await import("./diagnostic-
|
|
6837
|
-
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-
|
|
6836
|
+
const { logToolLoopAction } = await import("./diagnostic-spWOtH_g.js").then((n) => n.n);
|
|
6837
|
+
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-C8FBZVVx.js");
|
|
6838
6838
|
const sessionState = getDiagnosticSessionState({
|
|
6839
6839
|
sessionKey: args.ctx.sessionKey,
|
|
6840
6840
|
sessionId: args.ctx?.agentId
|
|
@@ -7121,7 +7121,7 @@ function resolveDefaultIdentityPath() {
|
|
|
7121
7121
|
return path.join(resolveStateDir(), "identity", "device.json");
|
|
7122
7122
|
}
|
|
7123
7123
|
function ensureDir$2(filePath) {
|
|
7124
|
-
|
|
7124
|
+
fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
7125
7125
|
}
|
|
7126
7126
|
const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
|
|
7127
7127
|
function base64UrlEncode(buf) {
|
|
@@ -7157,8 +7157,8 @@ function generateIdentity() {
|
|
|
7157
7157
|
}
|
|
7158
7158
|
function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
7159
7159
|
try {
|
|
7160
|
-
if (
|
|
7161
|
-
const raw =
|
|
7160
|
+
if (fsSync.existsSync(filePath)) {
|
|
7161
|
+
const raw = fsSync.readFileSync(filePath, "utf8");
|
|
7162
7162
|
const parsed = JSON.parse(raw);
|
|
7163
7163
|
if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
|
|
7164
7164
|
const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
|
|
@@ -7167,9 +7167,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
7167
7167
|
...parsed,
|
|
7168
7168
|
deviceId: derivedId
|
|
7169
7169
|
};
|
|
7170
|
-
|
|
7170
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
|
|
7171
7171
|
try {
|
|
7172
|
-
|
|
7172
|
+
fsSync.chmodSync(filePath, 384);
|
|
7173
7173
|
} catch {}
|
|
7174
7174
|
return {
|
|
7175
7175
|
deviceId: derivedId,
|
|
@@ -7194,9 +7194,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
7194
7194
|
privateKeyPem: identity.privateKeyPem,
|
|
7195
7195
|
createdAtMs: Date.now()
|
|
7196
7196
|
};
|
|
7197
|
-
|
|
7197
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
|
|
7198
7198
|
try {
|
|
7199
|
-
|
|
7199
|
+
fsSync.chmodSync(filePath, 384);
|
|
7200
7200
|
} catch {}
|
|
7201
7201
|
return identity;
|
|
7202
7202
|
}
|
|
@@ -7219,7 +7219,7 @@ function normalizeFingerprint(input) {
|
|
|
7219
7219
|
const execFileAsync = promisify(execFile);
|
|
7220
7220
|
async function fileExists(filePath) {
|
|
7221
7221
|
try {
|
|
7222
|
-
await fs
|
|
7222
|
+
await fs.access(filePath);
|
|
7223
7223
|
return true;
|
|
7224
7224
|
} catch {
|
|
7225
7225
|
return false;
|
|
@@ -7246,8 +7246,8 @@ async function generateSelfSignedCert(params) {
|
|
|
7246
7246
|
"-subj",
|
|
7247
7247
|
"/CN=symi-gateway"
|
|
7248
7248
|
]);
|
|
7249
|
-
await fs
|
|
7250
|
-
await fs
|
|
7249
|
+
await fs.chmod(params.keyPath, 384).catch(() => {});
|
|
7250
|
+
await fs.chmod(params.certPath, 384).catch(() => {});
|
|
7251
7251
|
params.log?.info?.(`gateway tls: generated self-signed cert at ${shortenHomeInString(params.certPath)}`);
|
|
7252
7252
|
}
|
|
7253
7253
|
async function loadGatewayTlsRuntime(cfg, log) {
|
|
@@ -7285,9 +7285,9 @@ async function loadGatewayTlsRuntime(cfg, log) {
|
|
|
7285
7285
|
error: "gateway tls: cert/key missing"
|
|
7286
7286
|
};
|
|
7287
7287
|
try {
|
|
7288
|
-
const cert = await fs
|
|
7289
|
-
const key = await fs
|
|
7290
|
-
const ca = caPath ? await fs
|
|
7288
|
+
const cert = await fs.readFile(certPath, "utf8");
|
|
7289
|
+
const key = await fs.readFile(keyPath, "utf8");
|
|
7290
|
+
const ca = caPath ? await fs.readFile(caPath, "utf8") : void 0;
|
|
7291
7291
|
const fingerprintSha256 = normalizeFingerprint(new X509Certificate(cert).fingerprint256 ?? "");
|
|
7292
7292
|
if (!fingerprintSha256) return {
|
|
7293
7293
|
enabled: false,
|
|
@@ -7346,8 +7346,8 @@ function resolveDeviceAuthPath(env = process.env) {
|
|
|
7346
7346
|
}
|
|
7347
7347
|
function readStore(filePath) {
|
|
7348
7348
|
try {
|
|
7349
|
-
if (!
|
|
7350
|
-
const raw =
|
|
7349
|
+
if (!fsSync.existsSync(filePath)) return null;
|
|
7350
|
+
const raw = fsSync.readFileSync(filePath, "utf8");
|
|
7351
7351
|
const parsed = JSON.parse(raw);
|
|
7352
7352
|
if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
|
|
7353
7353
|
if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
|
|
@@ -7357,10 +7357,10 @@ function readStore(filePath) {
|
|
|
7357
7357
|
}
|
|
7358
7358
|
}
|
|
7359
7359
|
function writeStore(filePath, store) {
|
|
7360
|
-
|
|
7361
|
-
|
|
7360
|
+
fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
7361
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
|
|
7362
7362
|
try {
|
|
7363
|
-
|
|
7363
|
+
fsSync.chmodSync(filePath, 384);
|
|
7364
7364
|
} catch {}
|
|
7365
7365
|
}
|
|
7366
7366
|
function loadDeviceAuthToken(params) {
|
|
@@ -8662,7 +8662,7 @@ var GatewayClient = class {
|
|
|
8662
8662
|
if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
|
|
8663
8663
|
});
|
|
8664
8664
|
}
|
|
8665
|
-
this.ws = new WebSocket(url, wsOptions);
|
|
8665
|
+
this.ws = new WebSocket$1(url, wsOptions);
|
|
8666
8666
|
this.ws.on("open", () => {
|
|
8667
8667
|
if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
|
|
8668
8668
|
const tlsError = this.validateTlsFingerprint();
|
|
@@ -8881,7 +8881,7 @@ var GatewayClient = class {
|
|
|
8881
8881
|
return null;
|
|
8882
8882
|
}
|
|
8883
8883
|
async request(method, params, opts) {
|
|
8884
|
-
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
|
|
8884
|
+
if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
|
|
8885
8885
|
const id = randomUUID();
|
|
8886
8886
|
const frame = {
|
|
8887
8887
|
type: "req",
|
|
@@ -10147,7 +10147,7 @@ async function routeReply(params) {
|
|
|
10147
10147
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
10148
10148
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
10149
10149
|
try {
|
|
10150
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
10150
|
+
const { deliverOutboundPayloads } = await import("./deliver-BD6kFk6p.js").then((n) => n.n);
|
|
10151
10151
|
return {
|
|
10152
10152
|
ok: true,
|
|
10153
10153
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -10543,7 +10543,7 @@ function normalizeSessionKey(value) {
|
|
|
10543
10543
|
}
|
|
10544
10544
|
function readSessionStore(storePath) {
|
|
10545
10545
|
try {
|
|
10546
|
-
const raw =
|
|
10546
|
+
const raw = fsSync.readFileSync(storePath, "utf-8");
|
|
10547
10547
|
const parsed = JSON5.parse(raw);
|
|
10548
10548
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
|
|
10549
10549
|
} catch {}
|
|
@@ -15602,7 +15602,7 @@ async function createModelSelectionState(params) {
|
|
|
15602
15602
|
}
|
|
15603
15603
|
}
|
|
15604
15604
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
15605
|
-
const { ensureAuthProfileStore } = await import("./auth-profiles-
|
|
15605
|
+
const { ensureAuthProfileStore } = await import("./auth-profiles-Bl9aU7fc.js").then((n) => n.t);
|
|
15606
15606
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
15607
15607
|
const providerKey = normalizeProviderId(provider);
|
|
15608
15608
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -17975,8 +17975,8 @@ const DEFAULT_SAFE_BINS = [
|
|
|
17975
17975
|
];
|
|
17976
17976
|
function isExecutableFile(filePath) {
|
|
17977
17977
|
try {
|
|
17978
|
-
if (!
|
|
17979
|
-
if (process.platform !== "win32")
|
|
17978
|
+
if (!fsSync.statSync(filePath).isFile()) return false;
|
|
17979
|
+
if (process.platform !== "win32") fsSync.accessSync(filePath, fsSync.constants.X_OK);
|
|
17980
17980
|
return true;
|
|
17981
17981
|
} catch {
|
|
17982
17982
|
return false;
|
|
@@ -18014,7 +18014,7 @@ function normalizeMatchTarget(value) {
|
|
|
18014
18014
|
}
|
|
18015
18015
|
function tryRealpath(value) {
|
|
18016
18016
|
try {
|
|
18017
|
-
return
|
|
18017
|
+
return fsSync.realpathSync(value);
|
|
18018
18018
|
} catch {
|
|
18019
18019
|
return null;
|
|
18020
18020
|
}
|
|
@@ -19246,7 +19246,7 @@ function mergeLegacyAgent(current, legacy) {
|
|
|
19246
19246
|
}
|
|
19247
19247
|
function ensureDir$1(filePath) {
|
|
19248
19248
|
const dir = path.dirname(filePath);
|
|
19249
|
-
|
|
19249
|
+
fsSync.mkdirSync(dir, { recursive: true });
|
|
19250
19250
|
}
|
|
19251
19251
|
function coerceAllowlistEntries(allowlist) {
|
|
19252
19252
|
if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
|
|
@@ -19316,11 +19316,11 @@ function generateToken() {
|
|
|
19316
19316
|
function loadExecApprovals() {
|
|
19317
19317
|
const filePath = resolveExecApprovalsPath();
|
|
19318
19318
|
try {
|
|
19319
|
-
if (!
|
|
19319
|
+
if (!fsSync.existsSync(filePath)) return normalizeExecApprovals({
|
|
19320
19320
|
version: 1,
|
|
19321
19321
|
agents: {}
|
|
19322
19322
|
});
|
|
19323
|
-
const raw =
|
|
19323
|
+
const raw = fsSync.readFileSync(filePath, "utf8");
|
|
19324
19324
|
const parsed = JSON.parse(raw);
|
|
19325
19325
|
if (parsed?.version !== 1) return normalizeExecApprovals({
|
|
19326
19326
|
version: 1,
|
|
@@ -19337,9 +19337,9 @@ function loadExecApprovals() {
|
|
|
19337
19337
|
function saveExecApprovals(file) {
|
|
19338
19338
|
const filePath = resolveExecApprovalsPath();
|
|
19339
19339
|
ensureDir$1(filePath);
|
|
19340
|
-
|
|
19340
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
|
|
19341
19341
|
try {
|
|
19342
|
-
|
|
19342
|
+
fsSync.chmodSync(filePath, 384);
|
|
19343
19343
|
} catch {}
|
|
19344
19344
|
}
|
|
19345
19345
|
function ensureExecApprovals() {
|
|
@@ -19660,7 +19660,7 @@ function resolvePowerShellPath() {
|
|
|
19660
19660
|
const systemRoot = process.env.SystemRoot || process.env.WINDIR;
|
|
19661
19661
|
if (systemRoot) {
|
|
19662
19662
|
const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
|
|
19663
|
-
if (
|
|
19663
|
+
if (fsSync.existsSync(candidate)) return candidate;
|
|
19664
19664
|
}
|
|
19665
19665
|
return "powershell.exe";
|
|
19666
19666
|
}
|
|
@@ -19698,7 +19698,7 @@ function resolveShellFromPath(name) {
|
|
|
19698
19698
|
for (const entry of entries) {
|
|
19699
19699
|
const candidate = path.join(entry, name);
|
|
19700
19700
|
try {
|
|
19701
|
-
|
|
19701
|
+
fsSync.accessSync(candidate, fsSync.constants.X_OK);
|
|
19702
19702
|
return candidate;
|
|
19703
19703
|
} catch {}
|
|
19704
19704
|
}
|
|
@@ -20446,7 +20446,7 @@ async function resolveSandboxWorkdir(params) {
|
|
|
20446
20446
|
cwd: process.cwd(),
|
|
20447
20447
|
root: params.sandbox.workspaceDir
|
|
20448
20448
|
});
|
|
20449
|
-
if (!(await fs
|
|
20449
|
+
if (!(await fs.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
20450
20450
|
const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
|
|
20451
20451
|
const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
|
|
20452
20452
|
return {
|
|
@@ -21497,13 +21497,13 @@ async function validateScriptFileForShellBleed(params) {
|
|
|
21497
21497
|
cwd: params.workdir,
|
|
21498
21498
|
root: params.workdir
|
|
21499
21499
|
});
|
|
21500
|
-
stat = await fs
|
|
21500
|
+
stat = await fs.stat(absPath);
|
|
21501
21501
|
} catch {
|
|
21502
21502
|
return;
|
|
21503
21503
|
}
|
|
21504
21504
|
if (!stat.isFile()) return;
|
|
21505
21505
|
if (stat.size > 512 * 1024) return;
|
|
21506
|
-
const content = await fs
|
|
21506
|
+
const content = await fs.readFile(absPath, "utf-8");
|
|
21507
21507
|
const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
|
|
21508
21508
|
if (first) {
|
|
21509
21509
|
const idx = first.index;
|
|
@@ -22754,7 +22754,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
|
|
|
22754
22754
|
function hasGitMarker(repoRoot) {
|
|
22755
22755
|
const gitPath = path.join(repoRoot, ".git");
|
|
22756
22756
|
try {
|
|
22757
|
-
const stat =
|
|
22757
|
+
const stat = fsSync.statSync(gitPath);
|
|
22758
22758
|
return stat.isDirectory() || stat.isFile();
|
|
22759
22759
|
} catch {
|
|
22760
22760
|
return false;
|
|
@@ -22766,10 +22766,10 @@ function findGitRoot(startDir, opts = {}) {
|
|
|
22766
22766
|
function resolveGitDirFromMarker(repoRoot) {
|
|
22767
22767
|
const gitPath = path.join(repoRoot, ".git");
|
|
22768
22768
|
try {
|
|
22769
|
-
const stat =
|
|
22769
|
+
const stat = fsSync.statSync(gitPath);
|
|
22770
22770
|
if (stat.isDirectory()) return gitPath;
|
|
22771
22771
|
if (!stat.isFile()) return null;
|
|
22772
|
-
const match =
|
|
22772
|
+
const match = fsSync.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
|
|
22773
22773
|
if (!match?.[1]) return null;
|
|
22774
22774
|
return path.resolve(repoRoot, match[1].trim());
|
|
22775
22775
|
} catch {
|
|
@@ -22836,7 +22836,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
22836
22836
|
cachedCommit = null;
|
|
22837
22837
|
return cachedCommit;
|
|
22838
22838
|
}
|
|
22839
|
-
const head =
|
|
22839
|
+
const head = fsSync.readFileSync(headPath, "utf-8").trim();
|
|
22840
22840
|
if (!head) {
|
|
22841
22841
|
cachedCommit = null;
|
|
22842
22842
|
return cachedCommit;
|
|
@@ -22844,7 +22844,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
22844
22844
|
if (head.startsWith("ref:")) {
|
|
22845
22845
|
const ref = head.replace(/^ref:\s*/i, "").trim();
|
|
22846
22846
|
const refPath = path.resolve(path.dirname(headPath), ref);
|
|
22847
|
-
cachedCommit = formatCommit(
|
|
22847
|
+
cachedCommit = formatCommit(fsSync.readFileSync(refPath, "utf-8").trim());
|
|
22848
22848
|
return cachedCommit;
|
|
22849
22849
|
}
|
|
22850
22850
|
cachedCommit = formatCommit(head);
|
|
@@ -23048,9 +23048,9 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
|
|
|
23048
23048
|
} catch {
|
|
23049
23049
|
return;
|
|
23050
23050
|
}
|
|
23051
|
-
if (!
|
|
23051
|
+
if (!fsSync.existsSync(logPath)) return;
|
|
23052
23052
|
try {
|
|
23053
|
-
const lines =
|
|
23053
|
+
const lines = fsSync.readFileSync(logPath, "utf-8").split(/\n+/);
|
|
23054
23054
|
let input = 0;
|
|
23055
23055
|
let output = 0;
|
|
23056
23056
|
let promptTokens = 0;
|
|
@@ -24290,7 +24290,7 @@ function resolveRepoRoot(params) {
|
|
|
24290
24290
|
const configured = params.config?.agents?.defaults?.repoRoot?.trim();
|
|
24291
24291
|
if (configured) try {
|
|
24292
24292
|
const resolved = path.resolve(configured);
|
|
24293
|
-
if (
|
|
24293
|
+
if (fsSync.statSync(resolved).isDirectory()) return resolved;
|
|
24294
24294
|
} catch {}
|
|
24295
24295
|
const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
|
|
24296
24296
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -24609,7 +24609,7 @@ async function buildContextReply(params) {
|
|
|
24609
24609
|
//#region src/auto-reply/reply/commands-export-session.ts
|
|
24610
24610
|
const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
|
|
24611
24611
|
function loadTemplate(fileName) {
|
|
24612
|
-
return
|
|
24612
|
+
return fsSync.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
|
|
24613
24613
|
}
|
|
24614
24614
|
function generateHtml(sessionData) {
|
|
24615
24615
|
const template = loadTemplate("template.html");
|
|
@@ -24683,7 +24683,7 @@ async function buildExportSessionReply(params) {
|
|
|
24683
24683
|
} catch (err) {
|
|
24684
24684
|
return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
|
|
24685
24685
|
}
|
|
24686
|
-
if (!
|
|
24686
|
+
if (!fsSync.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
|
|
24687
24687
|
const sessionManager = SessionManager.open(sessionFile);
|
|
24688
24688
|
const entries = sessionManager.getEntries();
|
|
24689
24689
|
const header = sessionManager.getHeader();
|
|
@@ -24704,8 +24704,8 @@ async function buildExportSessionReply(params) {
|
|
|
24704
24704
|
const defaultFileName = `symi-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
|
|
24705
24705
|
const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
|
|
24706
24706
|
const outputDir = path.dirname(outputPath);
|
|
24707
|
-
if (!
|
|
24708
|
-
|
|
24707
|
+
if (!fsSync.existsSync(outputDir)) fsSync.mkdirSync(outputDir, { recursive: true });
|
|
24708
|
+
fsSync.writeFileSync(outputPath, html, "utf-8");
|
|
24709
24709
|
const relativePath = path.relative(params.workspaceDir, outputPath);
|
|
24710
24710
|
return { text: [
|
|
24711
24711
|
"✅ Session exported!",
|
|
@@ -24819,8 +24819,8 @@ function resolveZaiApiKey() {
|
|
|
24819
24819
|
}
|
|
24820
24820
|
try {
|
|
24821
24821
|
const authPath = path.join(os.homedir(), ".pi", "agent", "auth.json");
|
|
24822
|
-
if (!
|
|
24823
|
-
const data = JSON.parse(
|
|
24822
|
+
if (!fsSync.existsSync(authPath)) return;
|
|
24823
|
+
const data = JSON.parse(fsSync.readFileSync(authPath, "utf-8"));
|
|
24824
24824
|
return data["z-ai"]?.access || data.zai?.access;
|
|
24825
24825
|
} catch {
|
|
24826
24826
|
return;
|
|
@@ -26385,7 +26385,7 @@ function shouldPersistAnyBindingState() {
|
|
|
26385
26385
|
}
|
|
26386
26386
|
function shouldPersistBindingMutations() {
|
|
26387
26387
|
if (shouldPersistAnyBindingState()) return true;
|
|
26388
|
-
return
|
|
26388
|
+
return fsSync.existsSync(resolveThreadBindingsPath());
|
|
26389
26389
|
}
|
|
26390
26390
|
function saveBindingsToDisk(params = {}) {
|
|
26391
26391
|
if (!params.force && !shouldPersistAnyBindingState()) return;
|
|
@@ -27373,7 +27373,7 @@ const applyCostTotal = (totals, costTotal) => {
|
|
|
27373
27373
|
totals.totalCost += costTotal;
|
|
27374
27374
|
};
|
|
27375
27375
|
async function* readJsonlRecords(filePath) {
|
|
27376
|
-
const fileStream =
|
|
27376
|
+
const fileStream = fsSync.createReadStream(filePath, { encoding: "utf-8" });
|
|
27377
27377
|
const rl = readline.createInterface({
|
|
27378
27378
|
input: fileStream,
|
|
27379
27379
|
crlfDelay: Infinity
|
|
@@ -27445,10 +27445,10 @@ async function loadCostUsageSummary(params) {
|
|
|
27445
27445
|
const dailyMap = /* @__PURE__ */ new Map();
|
|
27446
27446
|
const totals = emptyTotals();
|
|
27447
27447
|
const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
|
|
27448
|
-
const entries = await
|
|
27448
|
+
const entries = await fsSync.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
27449
27449
|
const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
|
|
27450
27450
|
const filePath = path.join(sessionsDir, entry.name);
|
|
27451
|
-
const stats = await
|
|
27451
|
+
const stats = await fsSync.promises.stat(filePath).catch(() => null);
|
|
27452
27452
|
if (!stats) return null;
|
|
27453
27453
|
if (stats.mtimeMs < sinceTime) return null;
|
|
27454
27454
|
return filePath;
|
|
@@ -27481,7 +27481,7 @@ async function loadCostUsageSummary(params) {
|
|
|
27481
27481
|
}
|
|
27482
27482
|
async function loadSessionCostSummary(params) {
|
|
27483
27483
|
const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
|
|
27484
|
-
if (!sessionFile || !
|
|
27484
|
+
if (!sessionFile || !fsSync.existsSync(sessionFile)) return null;
|
|
27485
27485
|
const totals = emptyTotals();
|
|
27486
27486
|
let firstActivity;
|
|
27487
27487
|
let lastActivity;
|
|
@@ -29353,7 +29353,7 @@ async function handleCommands(params) {
|
|
|
29353
29353
|
try {
|
|
29354
29354
|
const messages = [];
|
|
29355
29355
|
if (sessionFile) {
|
|
29356
|
-
const content = await fs
|
|
29356
|
+
const content = await fs.readFile(sessionFile, "utf-8");
|
|
29357
29357
|
for (const line of content.split("\n")) {
|
|
29358
29358
|
if (!line.trim()) continue;
|
|
29359
29359
|
try {
|
|
@@ -31687,7 +31687,7 @@ function asBoolean(value) {
|
|
|
31687
31687
|
}
|
|
31688
31688
|
function resolveTempPathParts(opts) {
|
|
31689
31689
|
const tmpDir = opts.tmpDir ?? resolvePreferredSymiTmpDir();
|
|
31690
|
-
if (!opts.tmpDir)
|
|
31690
|
+
if (!opts.tmpDir) fsSync.mkdirSync(tmpDir, {
|
|
31691
31691
|
recursive: true,
|
|
31692
31692
|
mode: 448
|
|
31693
31693
|
});
|
|
@@ -31753,7 +31753,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
31753
31753
|
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}`);
|
|
31754
31754
|
const body = res.body;
|
|
31755
31755
|
if (!body) throw new Error(`failed to download ${url}: empty response body`);
|
|
31756
|
-
const fileHandle = await fs$
|
|
31756
|
+
const fileHandle = await fs$1.open(filePath, "w");
|
|
31757
31757
|
let bytes = 0;
|
|
31758
31758
|
let thrown;
|
|
31759
31759
|
try {
|
|
@@ -31772,7 +31772,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
31772
31772
|
await fileHandle.close();
|
|
31773
31773
|
}
|
|
31774
31774
|
if (thrown) {
|
|
31775
|
-
await fs$
|
|
31775
|
+
await fs$1.unlink(filePath).catch(() => {});
|
|
31776
31776
|
throw thrown;
|
|
31777
31777
|
}
|
|
31778
31778
|
return {
|
|
@@ -31782,7 +31782,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
31782
31782
|
}
|
|
31783
31783
|
async function writeBase64ToFile(filePath, base64) {
|
|
31784
31784
|
const buf = Buffer.from(base64, "base64");
|
|
31785
|
-
await fs$
|
|
31785
|
+
await fs$1.writeFile(filePath, buf);
|
|
31786
31786
|
return {
|
|
31787
31787
|
path: filePath,
|
|
31788
31788
|
bytes: buf.length
|
|
@@ -31848,7 +31848,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
31848
31848
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
|
|
31849
31849
|
throw new Error("jsonlPath outside allowed roots");
|
|
31850
31850
|
}
|
|
31851
|
-
const canonical = await fs
|
|
31851
|
+
const canonical = await fs.realpath(resolved).catch(() => resolved);
|
|
31852
31852
|
if (!isInboundPathAllowed({
|
|
31853
31853
|
filePath: canonical,
|
|
31854
31854
|
roots
|
|
@@ -31856,7 +31856,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
31856
31856
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
|
|
31857
31857
|
throw new Error("jsonlPath outside allowed roots");
|
|
31858
31858
|
}
|
|
31859
|
-
return await fs
|
|
31859
|
+
return await fs.readFile(canonical, "utf8");
|
|
31860
31860
|
}
|
|
31861
31861
|
const CanvasToolSchema = Type.Object({
|
|
31862
31862
|
action: stringEnum(CANVAS_ACTIONS),
|
|
@@ -32660,12 +32660,12 @@ function resolveRestartSentinelPath(env = process.env) {
|
|
|
32660
32660
|
}
|
|
32661
32661
|
async function writeRestartSentinel(payload, env = process.env) {
|
|
32662
32662
|
const filePath = resolveRestartSentinelPath(env);
|
|
32663
|
-
await fs
|
|
32663
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
32664
32664
|
const data = {
|
|
32665
32665
|
version: 1,
|
|
32666
32666
|
payload
|
|
32667
32667
|
};
|
|
32668
|
-
await fs
|
|
32668
|
+
await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
|
|
32669
32669
|
return filePath;
|
|
32670
32670
|
}
|
|
32671
32671
|
|
|
@@ -33480,7 +33480,7 @@ async function hydrateAttachmentPayload(params) {
|
|
|
33480
33480
|
accountId: params.accountId
|
|
33481
33481
|
}),
|
|
33482
33482
|
sandboxValidated: true,
|
|
33483
|
-
readFile: (filePath) => fs
|
|
33483
|
+
readFile: (filePath) => fs.readFile(filePath)
|
|
33484
33484
|
});
|
|
33485
33485
|
params.args.buffer = media.buffer.toString("base64");
|
|
33486
33486
|
if (!contentTypeParam && media.contentType) params.args.contentType = media.contentType;
|
|
@@ -36765,7 +36765,7 @@ function listExistingAgentIdsFromDisk() {
|
|
|
36765
36765
|
const root = resolveStateDir();
|
|
36766
36766
|
const agentsDir = path.join(root, "agents");
|
|
36767
36767
|
try {
|
|
36768
|
-
return
|
|
36768
|
+
return fsSync.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
|
|
36769
36769
|
} catch {
|
|
36770
36770
|
return [];
|
|
36771
36771
|
}
|
|
@@ -40633,18 +40633,18 @@ function appendImagePathsToPrompt(prompt, paths) {
|
|
|
40633
40633
|
return `${trimmed}${trimmed ? "\n\n" : ""}${paths.join("\n")}`;
|
|
40634
40634
|
}
|
|
40635
40635
|
async function writeCliImages(images) {
|
|
40636
|
-
const tempDir = await fs
|
|
40636
|
+
const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "symi-cli-images-"));
|
|
40637
40637
|
const paths = [];
|
|
40638
40638
|
for (let i = 0; i < images.length; i += 1) {
|
|
40639
40639
|
const image = images[i];
|
|
40640
40640
|
const ext = resolveImageExtension(image.mimeType);
|
|
40641
40641
|
const filePath = path.join(tempDir, `image-${i + 1}.${ext}`);
|
|
40642
40642
|
const buffer = Buffer.from(image.data, "base64");
|
|
40643
|
-
await fs
|
|
40643
|
+
await fs.writeFile(filePath, buffer, { mode: 384 });
|
|
40644
40644
|
paths.push(filePath);
|
|
40645
40645
|
}
|
|
40646
40646
|
const cleanup = async () => {
|
|
40647
|
-
await fs
|
|
40647
|
+
await fs.rm(tempDir, {
|
|
40648
40648
|
recursive: true,
|
|
40649
40649
|
force: true
|
|
40650
40650
|
});
|
|
@@ -41718,7 +41718,7 @@ async function runAgentTurnWithFallback(params) {
|
|
|
41718
41718
|
if (corruptedSessionId) {
|
|
41719
41719
|
const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
|
|
41720
41720
|
try {
|
|
41721
|
-
|
|
41721
|
+
fsSync.unlinkSync(transcriptPath);
|
|
41722
41722
|
} catch {}
|
|
41723
41723
|
}
|
|
41724
41724
|
delete params.activeSessionStore[sessionKey];
|
|
@@ -41911,7 +41911,8 @@ async function runMemoryFlushIfNeeded(params) {
|
|
|
41911
41911
|
const flushRunId = crypto.randomUUID();
|
|
41912
41912
|
if (params.sessionKey) registerAgentRunContext(flushRunId, {
|
|
41913
41913
|
sessionKey: params.sessionKey,
|
|
41914
|
-
verboseLevel: params.resolvedVerboseLevel
|
|
41914
|
+
verboseLevel: params.resolvedVerboseLevel,
|
|
41915
|
+
isHeartbeat: params.isHeartbeat
|
|
41915
41916
|
});
|
|
41916
41917
|
let memoryCompactionCompleted = false;
|
|
41917
41918
|
const flushSystemPrompt = [params.followupRun.run.extraSystemPrompt, memoryFlushSettings.systemPrompt].filter(Boolean).join("\n\n");
|
|
@@ -42279,7 +42280,8 @@ function createFollowupRunner(params) {
|
|
|
42279
42280
|
const runId = crypto.randomUUID();
|
|
42280
42281
|
if (queued.run.sessionKey) registerAgentRunContext(runId, {
|
|
42281
42282
|
sessionKey: queued.run.sessionKey,
|
|
42282
|
-
verboseLevel: queued.run.verboseLevel
|
|
42283
|
+
verboseLevel: queued.run.verboseLevel,
|
|
42284
|
+
isHeartbeat: opts?.isHeartbeat === true
|
|
42283
42285
|
});
|
|
42284
42286
|
let autoCompactionCompleted = false;
|
|
42285
42287
|
let runResult;
|
|
@@ -42432,9 +42434,9 @@ function auditPostCompactionReads(readFilePaths, workspaceDir, requiredReads = D
|
|
|
42432
42434
|
* Returns messages from the last N lines (default 100).
|
|
42433
42435
|
*/
|
|
42434
42436
|
function readSessionMessages(sessionFile, maxLines = 100) {
|
|
42435
|
-
if (!
|
|
42437
|
+
if (!fsSync.existsSync(sessionFile)) return [];
|
|
42436
42438
|
try {
|
|
42437
|
-
const recentLines =
|
|
42439
|
+
const recentLines = fsSync.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
|
|
42438
42440
|
const messages = [];
|
|
42439
42441
|
for (const line of recentLines) try {
|
|
42440
42442
|
const entry = JSON.parse(line);
|
|
@@ -42475,8 +42477,8 @@ const MAX_CONTEXT_CHARS = 3e3;
|
|
|
42475
42477
|
async function readPostCompactionContext(workspaceDir) {
|
|
42476
42478
|
const agentsPath = path.join(workspaceDir, "AGENTS.md");
|
|
42477
42479
|
try {
|
|
42478
|
-
if (!
|
|
42479
|
-
const sections = extractSections(await
|
|
42480
|
+
if (!fsSync.existsSync(agentsPath)) return null;
|
|
42481
|
+
const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
|
|
42480
42482
|
if (sections.length === 0) return null;
|
|
42481
42483
|
const combined = sections.join("\n\n");
|
|
42482
42484
|
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);
|
|
@@ -42680,7 +42682,7 @@ async function runReplyAgent(params) {
|
|
|
42680
42682
|
if (resolved) transcriptCandidates.add(resolved);
|
|
42681
42683
|
transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
|
|
42682
42684
|
for (const candidate of transcriptCandidates) try {
|
|
42683
|
-
|
|
42685
|
+
fsSync.unlinkSync(candidate);
|
|
42684
42686
|
} catch {}
|
|
42685
42687
|
}
|
|
42686
42688
|
return true;
|
|
@@ -43586,7 +43588,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
43586
43588
|
return;
|
|
43587
43589
|
}
|
|
43588
43590
|
try {
|
|
43589
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
43591
|
+
const { deliverOutboundPayloads } = await import("./deliver-BD6kFk6p.js").then((n) => n.n);
|
|
43590
43592
|
await deliverOutboundPayloads({
|
|
43591
43593
|
cfg: params.cfg,
|
|
43592
43594
|
channel,
|
|
@@ -43612,7 +43614,7 @@ function forkSessionFromParent(params) {
|
|
|
43612
43614
|
agentId: params.agentId,
|
|
43613
43615
|
sessionsDir: params.sessionsDir
|
|
43614
43616
|
});
|
|
43615
|
-
if (!parentSessionFile || !
|
|
43617
|
+
if (!parentSessionFile || !fsSync.existsSync(parentSessionFile)) return null;
|
|
43616
43618
|
try {
|
|
43617
43619
|
const manager = SessionManager.open(parentSessionFile);
|
|
43618
43620
|
const leafId = manager.getLeafId();
|
|
@@ -43636,7 +43638,7 @@ function forkSessionFromParent(params) {
|
|
|
43636
43638
|
cwd: manager.getCwd(),
|
|
43637
43639
|
parentSession: parentSessionFile
|
|
43638
43640
|
};
|
|
43639
|
-
|
|
43641
|
+
fsSync.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
|
|
43640
43642
|
return {
|
|
43641
43643
|
sessionId,
|
|
43642
43644
|
sessionFile
|
|
@@ -43961,7 +43963,7 @@ async function stageSandboxMedia(params) {
|
|
|
43961
43963
|
};
|
|
43962
43964
|
try {
|
|
43963
43965
|
const destDir = sandbox ? path.join(effectiveWorkspaceDir, "media", "inbound") : effectiveWorkspaceDir;
|
|
43964
|
-
await fs
|
|
43966
|
+
await fs.mkdir(destDir, { recursive: true });
|
|
43965
43967
|
const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
|
|
43966
43968
|
cfg,
|
|
43967
43969
|
accountId: ctx.AccountId
|
|
@@ -44011,7 +44013,7 @@ async function stageSandboxMedia(params) {
|
|
|
44011
44013
|
usedNames.add(fileName);
|
|
44012
44014
|
const dest = path.join(destDir, fileName);
|
|
44013
44015
|
if (ctx.MediaRemoteHost) await scpFile(ctx.MediaRemoteHost, source, dest);
|
|
44014
|
-
else await fs
|
|
44016
|
+
else await fs.copyFile(source, dest);
|
|
44015
44017
|
const stagedPath = sandbox ? path.posix.join("media", "inbound", fileName) : dest;
|
|
44016
44018
|
staged.set(source, stagedPath);
|
|
44017
44019
|
}
|
|
@@ -47031,8 +47033,8 @@ async function describeStickerImage(params) {
|
|
|
47031
47033
|
const { provider, model } = resolved;
|
|
47032
47034
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
47033
47035
|
try {
|
|
47034
|
-
const buffer = await fs
|
|
47035
|
-
const { describeImageWithModel } = await import("./image-
|
|
47036
|
+
const buffer = await fs.readFile(imagePath);
|
|
47037
|
+
const { describeImageWithModel } = await import("./image-CE0mENPo.js").then((n) => n.n);
|
|
47036
47038
|
return (await describeImageWithModel({
|
|
47037
47039
|
buffer,
|
|
47038
47040
|
fileName: "sticker.webp",
|
|
@@ -47455,7 +47457,7 @@ function createWhatsAppLoginTool() {
|
|
|
47455
47457
|
force: Type.Optional(Type.Boolean())
|
|
47456
47458
|
}),
|
|
47457
47459
|
execute: async (_toolCallId, args) => {
|
|
47458
|
-
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-
|
|
47460
|
+
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-BKIOHn1V.js");
|
|
47459
47461
|
if ((args?.action ?? "start") === "wait") {
|
|
47460
47462
|
const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
|
|
47461
47463
|
return {
|
|
@@ -47737,7 +47739,7 @@ async function withMemoryManagerForAgent(params) {
|
|
|
47737
47739
|
}
|
|
47738
47740
|
async function checkReadableFile(pathname) {
|
|
47739
47741
|
try {
|
|
47740
|
-
await fs
|
|
47742
|
+
await fs.access(pathname, fsSync.constants.R_OK);
|
|
47741
47743
|
return { exists: true };
|
|
47742
47744
|
} catch (err) {
|
|
47743
47745
|
const code = err.code;
|
|
@@ -47754,7 +47756,7 @@ async function scanSessionFiles(agentId) {
|
|
|
47754
47756
|
try {
|
|
47755
47757
|
return {
|
|
47756
47758
|
source: "sessions",
|
|
47757
|
-
totalFiles: (await fs
|
|
47759
|
+
totalFiles: (await fs.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
|
|
47758
47760
|
issues
|
|
47759
47761
|
};
|
|
47760
47762
|
} catch (err) {
|
|
@@ -47786,7 +47788,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
47786
47788
|
if (alt.issue) issues.push(alt.issue);
|
|
47787
47789
|
const resolvedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
|
|
47788
47790
|
for (const extraPath of resolvedExtraPaths) try {
|
|
47789
|
-
if ((await fs
|
|
47791
|
+
if ((await fs.lstat(extraPath)).isSymbolicLink()) continue;
|
|
47790
47792
|
const extraCheck = await checkReadableFile(extraPath);
|
|
47791
47793
|
if (extraCheck.issue) issues.push(extraCheck.issue);
|
|
47792
47794
|
} catch (err) {
|
|
@@ -47796,7 +47798,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
47796
47798
|
}
|
|
47797
47799
|
let dirReadable = null;
|
|
47798
47800
|
try {
|
|
47799
|
-
await fs
|
|
47801
|
+
await fs.access(memoryDir, fsSync.constants.R_OK);
|
|
47800
47802
|
dirReadable = true;
|
|
47801
47803
|
} catch (err) {
|
|
47802
47804
|
const code = err.code;
|
|
@@ -47844,7 +47846,7 @@ async function summarizeQmdIndexArtifact(manager) {
|
|
|
47844
47846
|
if (!dbPath) return null;
|
|
47845
47847
|
let stat;
|
|
47846
47848
|
try {
|
|
47847
|
-
stat = await fs
|
|
47849
|
+
stat = await fs.stat(dbPath);
|
|
47848
47850
|
} catch (err) {
|
|
47849
47851
|
const code = err.code;
|
|
47850
47852
|
if (code === "ENOENT") throw new Error(`QMD index file not found: ${shortenHomePath(dbPath)}`, { cause: err });
|
|
@@ -49694,7 +49696,7 @@ async function preflightDiscordMessage(params) {
|
|
|
49694
49696
|
let preflightTranscript;
|
|
49695
49697
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
49696
49698
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
49697
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
49699
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-Bdbm4htn.js");
|
|
49698
49700
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
49699
49701
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
49700
49702
|
ctx: {
|
|
@@ -50657,7 +50659,7 @@ function identityHasValues(identity) {
|
|
|
50657
50659
|
}
|
|
50658
50660
|
function loadIdentityFromFile(identityPath) {
|
|
50659
50661
|
try {
|
|
50660
|
-
const parsed = parseIdentityMarkdown(
|
|
50662
|
+
const parsed = parseIdentityMarkdown(fsSync.readFileSync(identityPath, "utf-8"));
|
|
50661
50663
|
if (!identityHasValues(parsed)) return null;
|
|
50662
50664
|
return parsed;
|
|
50663
50665
|
} catch {
|
|
@@ -50696,7 +50698,7 @@ function isDataAvatar(value) {
|
|
|
50696
50698
|
}
|
|
50697
50699
|
function resolveExistingPath(value) {
|
|
50698
50700
|
try {
|
|
50699
|
-
return
|
|
50701
|
+
return fsSync.realpathSync(value);
|
|
50700
50702
|
} catch {
|
|
50701
50703
|
return path.resolve(value);
|
|
50702
50704
|
}
|
|
@@ -50720,7 +50722,7 @@ function resolveLocalAvatarPath(params) {
|
|
|
50720
50722
|
reason: "unsupported_extension"
|
|
50721
50723
|
};
|
|
50722
50724
|
try {
|
|
50723
|
-
if (!
|
|
50725
|
+
if (!fsSync.statSync(realPath).isFile()) return {
|
|
50724
50726
|
ok: false,
|
|
50725
50727
|
reason: "missing"
|
|
50726
50728
|
};
|
|
@@ -51583,7 +51585,7 @@ function sanitizeRecentModels(models, limit) {
|
|
|
51583
51585
|
}
|
|
51584
51586
|
async function readJsonFileWithFallback(filePath, fallback) {
|
|
51585
51587
|
try {
|
|
51586
|
-
const raw = await
|
|
51588
|
+
const raw = await fsSync.promises.readFile(filePath, "utf-8");
|
|
51587
51589
|
return {
|
|
51588
51590
|
value: JSON.parse(raw),
|
|
51589
51591
|
exists: true
|
|
@@ -51601,14 +51603,14 @@ async function readJsonFileWithFallback(filePath, fallback) {
|
|
|
51601
51603
|
}
|
|
51602
51604
|
async function writeJsonFileAtomically(filePath, value) {
|
|
51603
51605
|
const dir = path.dirname(filePath);
|
|
51604
|
-
await
|
|
51606
|
+
await fsSync.promises.mkdir(dir, {
|
|
51605
51607
|
recursive: true,
|
|
51606
51608
|
mode: 448
|
|
51607
51609
|
});
|
|
51608
51610
|
const tmp = path.join(dir, `${path.basename(filePath)}.${crypto.randomUUID()}.tmp`);
|
|
51609
|
-
await
|
|
51610
|
-
await
|
|
51611
|
-
await
|
|
51611
|
+
await fsSync.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
|
|
51612
|
+
await fsSync.promises.chmod(tmp, 384);
|
|
51613
|
+
await fsSync.promises.rename(tmp, filePath);
|
|
51612
51614
|
}
|
|
51613
51615
|
async function readPreferencesStore(filePath) {
|
|
51614
51616
|
const { value } = await readJsonFileWithFallback(filePath, {
|
|
@@ -53700,27 +53702,27 @@ function isVoiceChannelType(type) {
|
|
|
53700
53702
|
function createDefaultDeps() {
|
|
53701
53703
|
return {
|
|
53702
53704
|
sendMessageWhatsApp: async (...args) => {
|
|
53703
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
53705
|
+
const { sendMessageWhatsApp } = await import("./web-DyvSF1Pu.js");
|
|
53704
53706
|
return await sendMessageWhatsApp(...args);
|
|
53705
53707
|
},
|
|
53706
53708
|
sendMessageTelegram: async (...args) => {
|
|
53707
|
-
const { sendMessageTelegram } = await import("./send-
|
|
53709
|
+
const { sendMessageTelegram } = await import("./send-B7z8CDbr.js").then((n) => n.l);
|
|
53708
53710
|
return await sendMessageTelegram(...args);
|
|
53709
53711
|
},
|
|
53710
53712
|
sendMessageDiscord: async (...args) => {
|
|
53711
|
-
const { sendMessageDiscord } = await import("./send-
|
|
53713
|
+
const { sendMessageDiscord } = await import("./send-D3zDmQim.js").then((n) => n.t);
|
|
53712
53714
|
return await sendMessageDiscord(...args);
|
|
53713
53715
|
},
|
|
53714
53716
|
sendMessageSlack: async (...args) => {
|
|
53715
|
-
const { sendMessageSlack } = await import("./send-
|
|
53717
|
+
const { sendMessageSlack } = await import("./send-qItpAHcI.js").then((n) => n.n);
|
|
53716
53718
|
return await sendMessageSlack(...args);
|
|
53717
53719
|
},
|
|
53718
53720
|
sendMessageSignal: async (...args) => {
|
|
53719
|
-
const { sendMessageSignal } = await import("./send-
|
|
53721
|
+
const { sendMessageSignal } = await import("./send-XRUYukww.js").then((n) => n.i);
|
|
53720
53722
|
return await sendMessageSignal(...args);
|
|
53721
53723
|
},
|
|
53722
53724
|
sendMessageIMessage: async (...args) => {
|
|
53723
|
-
const { sendMessageIMessage } = await import("./send-
|
|
53725
|
+
const { sendMessageIMessage } = await import("./send-Cd81AY_Z.js").then((n) => n.n);
|
|
53724
53726
|
return await sendMessageIMessage(...args);
|
|
53725
53727
|
}
|
|
53726
53728
|
};
|
|
@@ -54629,10 +54631,10 @@ function estimateDurationSeconds(pcm) {
|
|
|
54629
54631
|
return pcm.length / (bytesPerSample * SAMPLE_RATE);
|
|
54630
54632
|
}
|
|
54631
54633
|
async function writeWavFile(pcm) {
|
|
54632
|
-
const tempDir = await fs
|
|
54634
|
+
const tempDir = await fs.mkdtemp(path.join(resolvePreferredSymiTmpDir(), "discord-voice-"));
|
|
54633
54635
|
const filePath = path.join(tempDir, `segment-${randomUUID()}.wav`);
|
|
54634
54636
|
const wav = buildWavBuffer(pcm);
|
|
54635
|
-
await fs
|
|
54637
|
+
await fs.writeFile(filePath, wav);
|
|
54636
54638
|
scheduleTempCleanup(tempDir);
|
|
54637
54639
|
return {
|
|
54638
54640
|
path: filePath,
|
|
@@ -54641,7 +54643,7 @@ async function writeWavFile(pcm) {
|
|
|
54641
54643
|
}
|
|
54642
54644
|
function scheduleTempCleanup(tempDir, delayMs = 1800 * 1e3) {
|
|
54643
54645
|
setTimeout(() => {
|
|
54644
|
-
fs
|
|
54646
|
+
fs.rm(tempDir, {
|
|
54645
54647
|
recursive: true,
|
|
54646
54648
|
force: true
|
|
54647
54649
|
}).catch((err) => {
|
|
@@ -56605,7 +56607,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
56605
56607
|
super(options);
|
|
56606
56608
|
}
|
|
56607
56609
|
createWebSocket(url) {
|
|
56608
|
-
return new WebSocket
|
|
56610
|
+
return new WebSocket(url, { agent });
|
|
56609
56611
|
}
|
|
56610
56612
|
}
|
|
56611
56613
|
return new ProxyGatewayPlugin();
|
|
@@ -57705,7 +57707,7 @@ async function detectBinary(name) {
|
|
|
57705
57707
|
if (!isSafeExecutableValue(name)) return false;
|
|
57706
57708
|
const resolved = name.startsWith("~") ? resolveUserPath(name) : name;
|
|
57707
57709
|
if (path.isAbsolute(resolved) || resolved.startsWith(".") || resolved.includes("/") || resolved.includes("\\")) try {
|
|
57708
|
-
await fs
|
|
57710
|
+
await fs.access(resolved);
|
|
57709
57711
|
return true;
|
|
57710
57712
|
} catch {
|
|
57711
57713
|
return false;
|
|
@@ -58255,7 +58257,7 @@ function normalizeAllowList$1(list) {
|
|
|
58255
58257
|
async function detectRemoteHostFromCliPath(cliPath) {
|
|
58256
58258
|
try {
|
|
58257
58259
|
const expanded = cliPath.startsWith("~") ? cliPath.replace(/^~/, process.env.HOME ?? "") : cliPath;
|
|
58258
|
-
const content = await fs
|
|
58260
|
+
const content = await fs.readFile(expanded, "utf8");
|
|
58259
58261
|
const userHostMatch = content.match(/\bssh\b[^\n]*?\s+([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/);
|
|
58260
58262
|
if (userHostMatch) return userHostMatch[1];
|
|
58261
58263
|
return content.match(/\bssh\b[^\n]*?\s+([a-zA-Z][a-zA-Z0-9._-]*)\s+\S*\bimsg\b/)?.[1];
|
|
@@ -58599,7 +58601,7 @@ async function monitorIMessageProvider(opts = {}) {
|
|
|
58599
58601
|
function readFileIfExists(filePath) {
|
|
58600
58602
|
if (!filePath) return;
|
|
58601
58603
|
try {
|
|
58602
|
-
return
|
|
58604
|
+
return fsSync.readFileSync(filePath, "utf-8").trim();
|
|
58603
58605
|
} catch {
|
|
58604
58606
|
return;
|
|
58605
58607
|
}
|
|
@@ -59160,7 +59162,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
|
|
|
59160
59162
|
prefix: "line-media",
|
|
59161
59163
|
extension: getExtensionForContentType(contentType)
|
|
59162
59164
|
});
|
|
59163
|
-
await
|
|
59165
|
+
await fsSync.promises.writeFile(filePath, buffer);
|
|
59164
59166
|
logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
|
|
59165
59167
|
return {
|
|
59166
59168
|
path: filePath,
|
|
@@ -64147,7 +64149,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
64147
64149
|
}
|
|
64148
64150
|
let commandsRegistry;
|
|
64149
64151
|
async function getCommandsRegistry() {
|
|
64150
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
64152
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-DIakZUZb.js").then((n) => n.n);
|
|
64151
64153
|
return commandsRegistry;
|
|
64152
64154
|
}
|
|
64153
64155
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -64489,11 +64491,11 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
64489
64491
|
const channelName = channelInfo?.name;
|
|
64490
64492
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
64491
64493
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
64492
|
-
import("./resolve-route-
|
|
64494
|
+
import("./resolve-route-q8AFnU5c.js").then((n) => n.r),
|
|
64493
64495
|
import("./inbound-context-DSDTl6Kj.js").then((n) => n.n),
|
|
64494
64496
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
64495
64497
|
]);
|
|
64496
|
-
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-
|
|
64498
|
+
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-DkGsdyBm.js").then((n) => n.n)]);
|
|
64497
64499
|
const route = resolveAgentRoute({
|
|
64498
64500
|
cfg,
|
|
64499
64501
|
channel: "slack",
|
|
@@ -64550,9 +64552,9 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
64550
64552
|
});
|
|
64551
64553
|
const deliverSlashPayloads = async (replies) => {
|
|
64552
64554
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
64553
|
-
import("./replies-
|
|
64554
|
-
import("./chunk-
|
|
64555
|
-
import("./markdown-tables-
|
|
64555
|
+
import("./replies-mfnbLu2p.js").then((n) => n.r),
|
|
64556
|
+
import("./chunk-DR8ukp6r.js").then((n) => n.s),
|
|
64557
|
+
import("./markdown-tables-tW9bGjLM.js").then((n) => n.t)
|
|
64556
64558
|
]);
|
|
64557
64559
|
await deliverSlackSlashReplies({
|
|
64558
64560
|
replies,
|
|
@@ -64605,7 +64607,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
64605
64607
|
let nativeCommands = [];
|
|
64606
64608
|
if (nativeEnabled) {
|
|
64607
64609
|
reg = await getCommandsRegistry();
|
|
64608
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
64610
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-B_f8uGi7.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
64609
64611
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
64610
64612
|
skillCommands,
|
|
64611
64613
|
provider: "slack"
|
|
@@ -66823,7 +66825,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
66823
66825
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
66824
66826
|
let preflightTranscript;
|
|
66825
66827
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
66826
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
66828
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-Bdbm4htn.js");
|
|
66827
66829
|
preflightTranscript = await transcribeFirstAudio({
|
|
66828
66830
|
ctx: {
|
|
66829
66831
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -68591,7 +68593,7 @@ function safeParseState(raw) {
|
|
|
68591
68593
|
async function readTelegramUpdateOffset(params) {
|
|
68592
68594
|
const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
|
|
68593
68595
|
try {
|
|
68594
|
-
return safeParseState(await fs
|
|
68596
|
+
return safeParseState(await fs.readFile(filePath, "utf-8"))?.lastUpdateId ?? null;
|
|
68595
68597
|
} catch (err) {
|
|
68596
68598
|
if (err.code === "ENOENT") return null;
|
|
68597
68599
|
return null;
|
|
@@ -68600,7 +68602,7 @@ async function readTelegramUpdateOffset(params) {
|
|
|
68600
68602
|
async function writeTelegramUpdateOffset(params) {
|
|
68601
68603
|
const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
|
|
68602
68604
|
const dir = path.dirname(filePath);
|
|
68603
|
-
await fs
|
|
68605
|
+
await fs.mkdir(dir, {
|
|
68604
68606
|
recursive: true,
|
|
68605
68607
|
mode: 448
|
|
68606
68608
|
});
|
|
@@ -68609,9 +68611,9 @@ async function writeTelegramUpdateOffset(params) {
|
|
|
68609
68611
|
version: STORE_VERSION,
|
|
68610
68612
|
lastUpdateId: params.updateId
|
|
68611
68613
|
};
|
|
68612
|
-
await fs
|
|
68613
|
-
await fs
|
|
68614
|
-
await fs
|
|
68614
|
+
await fs.writeFile(tmp, `${JSON.stringify(payload, null, 2)}\n`, { encoding: "utf-8" });
|
|
68615
|
+
await fs.chmod(tmp, 384);
|
|
68616
|
+
await fs.rename(tmp, filePath);
|
|
68615
68617
|
}
|
|
68616
68618
|
|
|
68617
68619
|
//#endregion
|
|
@@ -68968,23 +68970,23 @@ let webLoginQrPromise = null;
|
|
|
68968
68970
|
let webChannelPromise = null;
|
|
68969
68971
|
let whatsappActionsPromise = null;
|
|
68970
68972
|
function loadWebOutbound() {
|
|
68971
|
-
webOutboundPromise ??= import("./outbound-
|
|
68973
|
+
webOutboundPromise ??= import("./outbound-CIVsLpJK.js").then((n) => n.t);
|
|
68972
68974
|
return webOutboundPromise;
|
|
68973
68975
|
}
|
|
68974
68976
|
function loadWebLogin() {
|
|
68975
|
-
webLoginPromise ??= import("./login-
|
|
68977
|
+
webLoginPromise ??= import("./login-BHUrERYo.js").then((n) => n.n);
|
|
68976
68978
|
return webLoginPromise;
|
|
68977
68979
|
}
|
|
68978
68980
|
function loadWebLoginQr() {
|
|
68979
|
-
webLoginQrPromise ??= import("./login-qr-
|
|
68981
|
+
webLoginQrPromise ??= import("./login-qr-BKIOHn1V.js");
|
|
68980
68982
|
return webLoginQrPromise;
|
|
68981
68983
|
}
|
|
68982
68984
|
function loadWebChannel() {
|
|
68983
|
-
webChannelPromise ??= import("./web-
|
|
68985
|
+
webChannelPromise ??= import("./web-DyvSF1Pu.js");
|
|
68984
68986
|
return webChannelPromise;
|
|
68985
68987
|
}
|
|
68986
68988
|
function loadWhatsAppActions() {
|
|
68987
|
-
whatsappActionsPromise ??= import("./whatsapp-actions-
|
|
68989
|
+
whatsappActionsPromise ??= import("./whatsapp-actions-SXenaJIn.js");
|
|
68988
68990
|
return whatsappActionsPromise;
|
|
68989
68991
|
}
|
|
68990
68992
|
function createPluginRuntime() {
|
|
@@ -69205,7 +69207,7 @@ const resolvePluginSdkAliasFile = (params) => {
|
|
|
69205
69207
|
const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
|
|
69206
69208
|
const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
|
|
69207
69209
|
const orderedCandidates = isTest ? [distCandidate, srcCandidate] : [distCandidate];
|
|
69208
|
-
for (const candidate of orderedCandidates) if (
|
|
69210
|
+
for (const candidate of orderedCandidates) if (fsSync.existsSync(candidate)) return candidate;
|
|
69209
69211
|
const parent = path.dirname(cursor);
|
|
69210
69212
|
if (parent === cursor) break;
|
|
69211
69213
|
cursor = parent;
|
|
@@ -69751,7 +69753,7 @@ function resolvePluginTools(params) {
|
|
|
69751
69753
|
//#endregion
|
|
69752
69754
|
//#region src/agents/apply-patch-update.ts
|
|
69753
69755
|
async function defaultReadFile(filePath) {
|
|
69754
|
-
return fs
|
|
69756
|
+
return fs.readFile(filePath, "utf8");
|
|
69755
69757
|
}
|
|
69756
69758
|
async function applyUpdateHunk(filePath, chunks, options) {
|
|
69757
69759
|
const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
|
|
@@ -69995,10 +69997,10 @@ function resolvePatchFileOps(options) {
|
|
|
69995
69997
|
};
|
|
69996
69998
|
}
|
|
69997
69999
|
return {
|
|
69998
|
-
readFile: (filePath) => fs
|
|
69999
|
-
writeFile: (filePath, content) => fs
|
|
70000
|
-
remove: (filePath) => fs
|
|
70001
|
-
mkdirp: (dir) => fs
|
|
70000
|
+
readFile: (filePath) => fs.readFile(filePath, "utf8"),
|
|
70001
|
+
writeFile: (filePath, content) => fs.writeFile(filePath, content, "utf8"),
|
|
70002
|
+
remove: (filePath) => fs.rm(filePath),
|
|
70003
|
+
mkdirp: (dir) => fs.mkdir(dir, { recursive: true }).then(() => {})
|
|
70002
70004
|
};
|
|
70003
70005
|
}
|
|
70004
70006
|
async function ensureDir(filePath, ops) {
|
|
@@ -71243,7 +71245,7 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
71243
71245
|
};
|
|
71244
71246
|
let content;
|
|
71245
71247
|
try {
|
|
71246
|
-
content = await fs
|
|
71248
|
+
content = await fs.readFile(sessionFile, "utf-8");
|
|
71247
71249
|
} catch (err) {
|
|
71248
71250
|
if (err?.code === "ENOENT") return {
|
|
71249
71251
|
repaired: false,
|
|
@@ -71291,15 +71293,15 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
71291
71293
|
const backupPath = `${sessionFile}.bak-${process.pid}-${Date.now()}`;
|
|
71292
71294
|
const tmpPath = `${sessionFile}.repair-${process.pid}-${Date.now()}.tmp`;
|
|
71293
71295
|
try {
|
|
71294
|
-
const stat = await fs
|
|
71295
|
-
await fs
|
|
71296
|
-
if (stat) await fs
|
|
71297
|
-
await fs
|
|
71298
|
-
if (stat) await fs
|
|
71299
|
-
await fs
|
|
71296
|
+
const stat = await fs.stat(sessionFile).catch(() => null);
|
|
71297
|
+
await fs.writeFile(backupPath, content, "utf-8");
|
|
71298
|
+
if (stat) await fs.chmod(backupPath, stat.mode);
|
|
71299
|
+
await fs.writeFile(tmpPath, cleaned, "utf-8");
|
|
71300
|
+
if (stat) await fs.chmod(tmpPath, stat.mode);
|
|
71301
|
+
await fs.rename(tmpPath, sessionFile);
|
|
71300
71302
|
} catch (err) {
|
|
71301
71303
|
try {
|
|
71302
|
-
await fs
|
|
71304
|
+
await fs.unlink(tmpPath);
|
|
71303
71305
|
} catch (cleanupErr) {
|
|
71304
71306
|
params.warn?.(`session file repair cleanup failed: ${cleanupErr instanceof Error ? cleanupErr.message : "unknown error"} (${path.basename(tmpPath)})`);
|
|
71305
71307
|
}
|
|
@@ -71983,8 +71985,8 @@ async function readWorkspaceContextForSummary() {
|
|
|
71983
71985
|
const workspaceDir = process.cwd();
|
|
71984
71986
|
const agentsPath = path.join(workspaceDir, "AGENTS.md");
|
|
71985
71987
|
try {
|
|
71986
|
-
if (!
|
|
71987
|
-
const sections = extractSections(await
|
|
71988
|
+
if (!fsSync.existsSync(agentsPath)) return "";
|
|
71989
|
+
const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
|
|
71988
71990
|
if (sections.length === 0) return "";
|
|
71989
71991
|
const combined = sections.join("\n\n");
|
|
71990
71992
|
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>`;
|
|
@@ -72540,7 +72542,7 @@ async function prewarmSessionFile(sessionFile) {
|
|
|
72540
72542
|
if (!isSessionManagerCacheEnabled()) return;
|
|
72541
72543
|
if (isSessionManagerCached(sessionFile)) return;
|
|
72542
72544
|
try {
|
|
72543
|
-
const handle = await fs
|
|
72545
|
+
const handle = await fs.open(sessionFile, "r");
|
|
72544
72546
|
try {
|
|
72545
72547
|
const buffer = Buffer$1.alloc(4096);
|
|
72546
72548
|
await handle.read(buffer, 0, buffer.length, 0);
|
|
@@ -72673,14 +72675,14 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
72673
72675
|
if (!apiKeyInfo.apiKey) {
|
|
72674
72676
|
if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
72675
72677
|
} else if (model.provider === "github-copilot") {
|
|
72676
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
72678
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-B8B2pmph.js").then((n) => n.n);
|
|
72677
72679
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
72678
72680
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
72679
72681
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
72680
72682
|
} catch (err) {
|
|
72681
72683
|
return fail(describeUnknownError(err));
|
|
72682
72684
|
}
|
|
72683
|
-
await fs
|
|
72685
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
72684
72686
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
72685
72687
|
const sandbox = await resolveSandboxContext({
|
|
72686
72688
|
config: params.config,
|
|
@@ -72688,7 +72690,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
72688
72690
|
workspaceDir: resolvedWorkspace
|
|
72689
72691
|
});
|
|
72690
72692
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
72691
|
-
await fs
|
|
72693
|
+
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
72692
72694
|
await ensureSessionHeader({
|
|
72693
72695
|
sessionFile: params.sessionFile,
|
|
72694
72696
|
sessionId: params.sessionId,
|
|
@@ -73042,12 +73044,12 @@ function getQueuedFileWriter(writers, filePath) {
|
|
|
73042
73044
|
const existing = writers.get(filePath);
|
|
73043
73045
|
if (existing) return existing;
|
|
73044
73046
|
const dir = path.dirname(filePath);
|
|
73045
|
-
const ready = fs
|
|
73047
|
+
const ready = fs.mkdir(dir, { recursive: true }).catch(() => void 0);
|
|
73046
73048
|
let queue = Promise.resolve();
|
|
73047
73049
|
const writer = {
|
|
73048
73050
|
filePath,
|
|
73049
73051
|
write: (line) => {
|
|
73050
|
-
queue = queue.then(() => ready).then(() => fs
|
|
73052
|
+
queue = queue.then(() => ready).then(() => fs.appendFile(filePath, line, "utf8")).catch(() => void 0);
|
|
73051
73053
|
}
|
|
73052
73054
|
};
|
|
73053
73055
|
writers.set(filePath, writer);
|
|
@@ -74072,11 +74074,11 @@ function appendRawStream(payload) {
|
|
|
74072
74074
|
if (!rawStreamReady) {
|
|
74073
74075
|
rawStreamReady = true;
|
|
74074
74076
|
try {
|
|
74075
|
-
|
|
74077
|
+
fsSync.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
|
|
74076
74078
|
} catch {}
|
|
74077
74079
|
}
|
|
74078
74080
|
try {
|
|
74079
|
-
|
|
74081
|
+
fsSync.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
|
|
74080
74082
|
} catch {}
|
|
74081
74083
|
}
|
|
74082
74084
|
|
|
@@ -75906,7 +75908,7 @@ function isInPoisonRange(version) {
|
|
|
75906
75908
|
*/
|
|
75907
75909
|
async function checkSessionPoison(sessionFile) {
|
|
75908
75910
|
try {
|
|
75909
|
-
const firstLine = (await fs
|
|
75911
|
+
const firstLine = (await fs.readFile(sessionFile, "utf-8")).split("\n")[0];
|
|
75910
75912
|
if (!firstLine) return null;
|
|
75911
75913
|
const header = JSON.parse(firstLine);
|
|
75912
75914
|
if (header.type !== "session") return null;
|
|
@@ -75924,7 +75926,7 @@ async function checkSessionPoison(sessionFile) {
|
|
|
75924
75926
|
*/
|
|
75925
75927
|
async function archivePoisonedSession(sessionFile) {
|
|
75926
75928
|
const archiveName = `${sessionFile}.archived-poison.${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
|
|
75927
|
-
await fs
|
|
75929
|
+
await fs.rename(sessionFile, archiveName);
|
|
75928
75930
|
return archiveName;
|
|
75929
75931
|
}
|
|
75930
75932
|
/**
|
|
@@ -75933,14 +75935,14 @@ async function archivePoisonedSession(sessionFile) {
|
|
|
75933
75935
|
*/
|
|
75934
75936
|
async function stampSessionVersion(sessionFile) {
|
|
75935
75937
|
try {
|
|
75936
|
-
const lines = (await fs
|
|
75938
|
+
const lines = (await fs.readFile(sessionFile, "utf-8")).split("\n");
|
|
75937
75939
|
if (lines.length === 0) return;
|
|
75938
75940
|
const header = JSON.parse(lines[0]);
|
|
75939
75941
|
if (header.type !== "session") return;
|
|
75940
75942
|
if (header.symiVersion === VERSION) return;
|
|
75941
75943
|
header.symiVersion = VERSION;
|
|
75942
75944
|
lines[0] = JSON.stringify(header);
|
|
75943
|
-
await fs
|
|
75945
|
+
await fs.writeFile(sessionFile, lines.join("\n"), "utf-8");
|
|
75944
75946
|
} catch {}
|
|
75945
75947
|
}
|
|
75946
75948
|
/**
|
|
@@ -76103,7 +76105,7 @@ async function prepareSessionManagerForRun(params) {
|
|
|
76103
76105
|
return;
|
|
76104
76106
|
}
|
|
76105
76107
|
if (params.hadSessionFile && header && !hasAssistant) {
|
|
76106
|
-
await fs
|
|
76108
|
+
await fs.writeFile(params.sessionFile, "", "utf-8");
|
|
76107
76109
|
sm.fileEntries = [header];
|
|
76108
76110
|
sm.byId?.clear?.();
|
|
76109
76111
|
sm.labelsById?.clear?.();
|
|
@@ -76661,7 +76663,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
76661
76663
|
const prevCwd = process.cwd();
|
|
76662
76664
|
const runAbortController = new AbortController();
|
|
76663
76665
|
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"}`);
|
|
76664
|
-
await fs
|
|
76666
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
76665
76667
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
76666
76668
|
const sandbox = await resolveSandboxContext({
|
|
76667
76669
|
config: params.config,
|
|
@@ -76669,7 +76671,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
76669
76671
|
workspaceDir: resolvedWorkspace
|
|
76670
76672
|
});
|
|
76671
76673
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
76672
|
-
await fs
|
|
76674
|
+
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
76673
76675
|
let restoreSkillEnv;
|
|
76674
76676
|
process.chdir(effectiveWorkspace);
|
|
76675
76677
|
try {
|
|
@@ -76899,7 +76901,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
76899
76901
|
sessionFile: params.sessionFile,
|
|
76900
76902
|
warn: (message) => log$9.warn(message)
|
|
76901
76903
|
});
|
|
76902
|
-
const hadSessionFile = await fs
|
|
76904
|
+
const hadSessionFile = await fs.stat(params.sessionFile).then(() => true).catch(() => false);
|
|
76903
76905
|
const transcriptPolicy = resolveTranscriptPolicy({
|
|
76904
76906
|
modelApi: params.model?.api,
|
|
76905
76907
|
provider: params.provider,
|
|
@@ -77883,7 +77885,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
77883
77885
|
return;
|
|
77884
77886
|
}
|
|
77885
77887
|
if (model.provider === "github-copilot") {
|
|
77886
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
77888
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-B8B2pmph.js").then((n) => n.n);
|
|
77887
77889
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
77888
77890
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
77889
77891
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
@@ -77968,7 +77970,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
77968
77970
|
}
|
|
77969
77971
|
runLoopIterations += 1;
|
|
77970
77972
|
attemptedThinking.add(thinkLevel);
|
|
77971
|
-
await fs
|
|
77973
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
77972
77974
|
const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
|
|
77973
77975
|
const attempt = await runEmbeddedAttempt({
|
|
77974
77976
|
sessionId: params.sessionId,
|