@symerian/symi 2.5.8 → 2.6.0
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-qtxJ-6em.js → accounts-3dCrO3oZ.js} +1 -1
- package/dist/{accounts-tNElYrCH.js → accounts-BRw8yhIW.js} +21 -21
- package/dist/{accounts-CWktKM8a.js → accounts-BuZxOb3B.js} +1 -1
- package/dist/{active-listener-C9r8ZB9m.js → active-listener-CfHHV2SU.js} +1 -1
- package/dist/{agent-scope-BxoUQqgM.js → agent-scope-CpEJ0B88.js} +3 -3
- package/dist/{agents-CXloh6n_.js → agents-Bi50kp6u.js} +4 -4
- package/dist/{agents.config-BhAJXAtA.js → agents.config-BcTeP94V.js} +1 -1
- package/dist/{agents.config-BuTzBaXf.js → agents.config-Duce7lam.js} +1 -1
- package/dist/{audio-preflight-O3ASWbaG.js → audio-preflight-DHTaS5U1.js} +34 -34
- package/dist/{auth-choice-DvaVrSwn.js → auth-choice-BFIBR4l9.js} +1 -1
- package/dist/{auth-choice-Br6zT8iS.js → auth-choice-Dyq-0MNq.js} +1 -1
- package/dist/{model-auth-DK43VicI.js → auth-profiles-DdK1Hxaa.js} +412 -412
- package/dist/{banner-BtqKaQZr.js → banner-D50f_0qf.js} +1 -1
- package/dist/{bindings-B7Ke6LJi.js → bindings-BsHoBLIE.js} +2 -2
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +60 -60
- package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
- package/dist/bundled/command-logger/handler.js +3 -3
- package/dist/bundled/session-memory/handler.js +61 -61
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-CsM_hJ_s.js → channel-activity-B6G1jnQT.js} +2 -2
- package/dist/{channel-options-DFHEgad5.js → channel-options-BFqaanEt.js} +1 -1
- package/dist/{channel-options-CfLxsV76.js → channel-options-BvBcjqyk.js} +1 -1
- package/dist/{channel-web-D-jDDmWN.js → channel-web-BQtFg4IP.js} +1 -1
- package/dist/{channels-cli-BEZORT4N.js → channels-cli-BYFQdWnL.js} +4 -4
- package/dist/{channels-cli-CT6wdGT8.js → channels-cli-BuTH-iVi.js} +4 -4
- package/dist/{chrome-BFekevcE.js → chrome-DYZwl5Gv.js} +24 -24
- package/dist/{chunk-BW5f05BR.js → chunk-09egQapi.js} +1 -1
- package/dist/{cli-CkxvN9Cb.js → cli-eOBlVLcC.js} +1 -1
- package/dist/{cli-kxxM9xT0.js → cli-r2L-UK6y.js} +1 -1
- package/dist/{command-registry-DsqA8NDd.js → command-registry-D-pwcAIW.js} +9 -9
- package/dist/{commands-registry-D7CTCQPm.js → commands-registry-Bfc7Uz0o.js} +4 -4
- package/dist/{completion-cli-QCrjurdu.js → completion-cli-DIx7KyOG.js} +2 -2
- package/dist/{completion-cli-mZMiIG7C.js → completion-cli-DMO2OGTm.js} +1 -1
- package/dist/{config-DRbjHIwD.js → config-5SdHIcHU.js} +6 -6
- package/dist/{config-cli-CS_0o9LY.js → config-cli-BsDxqYDU.js} +1 -1
- package/dist/{config-cli-DLsLPE4o.js → config-cli-seaVWVru.js} +1 -1
- package/dist/{configure-T9J4bw0H.js → configure-BmPwuHXL.js} +3 -3
- package/dist/{configure-BX4aNf3w.js → configure-CqbKA0_V.js} +3 -3
- package/dist/{conversation-label-DXUkoKcB.js → conversation-label-Onz2hiJh.js} +1 -1
- package/dist/{deliver-CvCK5Mm9.js → deliver-dODxSv3b.js} +11 -11
- package/dist/{diagnostic-CI0kRQkt.js → diagnostic-rPhsBoZz.js} +2 -2
- package/dist/{doctor-completion-CTodkFg2.js → doctor-completion-C2IV3lKi.js} +1 -1
- package/dist/{doctor-completion-BKydQfCM.js → doctor-completion-DMjs7-Qa.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{command-format-BaxDnULz.js → env-BDXYbTKj.js} +10 -10
- package/dist/{errors-BoQgnc8X.js → errors-XIsvXeC-.js} +1 -1
- package/dist/extensionAPI.js +1 -1
- package/dist/{frontmatter-C_bv_0P8.js → frontmatter-CTR5f_Ez.js} +2 -2
- package/dist/{gateway-cli-DEpU3Bg3.js → gateway-cli-BanaeKQ_.js} +20 -18
- package/dist/{gateway-cli-CZnyhTAu.js → gateway-cli-C-J_s559.js} +20 -18
- package/dist/{gemini-auth-CdSPHuLl.js → gemini-auth-Dy12ZAH3.js} +2 -2
- package/dist/{github-copilot-token-C_qUP7p5.js → github-copilot-token-cCYzSU9h.js} +1 -1
- package/dist/{glass-ui-ws-KbKXJGb5.js → glass-ui-ws-DK7x3Tz7.js} +7 -7
- package/dist/{glass-ui-ws-BdBSYcsf.js → glass-ui-ws-DUzp9m0D.js} +7 -7
- package/dist/{health-z-YCZRhf.js → health-BpHgCv-u.js} +1 -1
- package/dist/{health-DQmyj-7z.js → health-DK6rAOhC.js} +1 -1
- package/dist/{hooks-cli-4d-QhgRs.js → hooks-cli-Cin_3tFg.js} +2 -2
- package/dist/{hooks-cli-BRehYEXJ.js → hooks-cli-D-75G_66.js} +2 -2
- package/dist/{image-B0wGflxA.js → image-CXu8W39c.js} +7 -7
- package/dist/{plugin-sdk/image-ops-Bnp6LXEx.js → image-ops-C7CauEK8.js} +2 -2
- package/dist/{inbound-context-BlHX0H3E.js → inbound-context-DSDTl6Kj.js} +2 -2
- package/dist/index.js +6 -6
- package/dist/{ir-DccrnjsE.js → ir-CTiz95Vb.js} +5 -5
- package/dist/llm-slug-generator.js +64 -84
- package/dist/{local-roots-DMwIh5cS.js → local-roots-DhZz0Ybs.js} +6 -6
- package/dist/{login-qr-Batf3PT5.js → login-qr-AP9agO-i.js} +13 -13
- package/dist/{login-CwCoxapk.js → login-ul8zaw_S.js} +7 -7
- package/dist/{manager-D_LwXbc6.js → manager-PprhCvO_.js} +25 -25
- package/dist/{manifest-registry-D0IQ3WuX.js → manifest-registry-yb7sAlu4.js} +2 -2
- package/dist/{markdown-tables-iMQQZu4Q.js → markdown-tables-C-BmIap8.js} +1 -1
- package/dist/{plugin-sdk/message-channel-BdI5Ra9S.js → message-channel-OlFBYAw8.js} +1 -1
- package/dist/{models-CPlSSoV0.js → models-CeKIXf5B.js} +7 -8
- package/dist/{models-cli-BM2RWTmM.js → models-cli-2NcPKR9A.js} +7 -8
- package/dist/{models-cli-DDhpJuX3.js → models-cli-DN4AVlpI.js} +3 -3
- package/dist/{onboard-DpB21qno.js → onboard-BcxDiUl_.js} +2 -2
- package/dist/{onboard-BczLOUCW.js → onboard-BukRqcRH.js} +2 -2
- package/dist/{onboard-channels-S0FbC25u.js → onboard-channels-DS6s341R.js} +1 -1
- package/dist/{onboard-channels-DjfS9mS6.js → onboard-channels-HPxu77wp.js} +1 -1
- package/dist/{onboarding-CyPkawbg.js → onboarding-B8uz24jt.js} +3 -3
- package/dist/{onboarding--mrKZtpR.js → onboarding-DI-o_sax.js} +3 -3
- package/dist/{onboarding.finalize-C0ijhYbg.js → onboarding.finalize-Bn2e61yb.js} +5 -5
- package/dist/{onboarding.finalize-0XoI3wLH.js → onboarding.finalize-CfE_AEto.js} +6 -6
- package/dist/{outbound-D4fN_ZlE.js → outbound-CtMCmwxR.js} +7 -7
- package/dist/{outbound-attachment-DjNDa3zn.js → outbound-attachment-DJldbweZ.js} +2 -2
- package/dist/{paths-DLyHUt31.js → paths-CbQV9WEg.js} +2 -2
- package/dist/{pi-auth-json-0SYBFZTt.js → pi-auth-json-Bk8ERadJ.js} +10 -10
- package/dist/{pi-embedded-Cg70pjmm.js → pi-embedded-B5qBa69e.js} +20111 -20012
- package/dist/{pi-embedded-helpers-DLFjnVBb.js → pi-embedded-helpers-pubKo8HQ.js} +81 -81
- package/dist/{plugin-registry-VhRGXCLQ.js → plugin-registry-NIUxULTk.js} +1 -1
- package/dist/{plugin-registry-Dxo1iUfJ.js → plugin-registry-cj99EI0k.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/agents/pi-embedded-runner.d.ts +1 -1
- package/dist/plugin-sdk/agents/unified-runner.d.ts +69 -1
- 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/auto-reply/reply/agent-runner-execution.d.ts +2 -2
- 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-DKo2tOO-.js → channel-web-CSd16cDi.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/{image-ops-CvJzsyvE.js → plugin-sdk/image-ops-BlQR__MN.js} +100 -100
- 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-Dz5lr5b0.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/{replies-BIX_isV7.js → plugin-sdk/replies-LLcQL3w6.js} +3 -3
- package/dist/plugin-sdk/{reply-Ch4_18FZ.js → reply-CkqSfQZN.js} +495 -396
- 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/{target-errors-Be1SwYlW.js → plugin-sdk/target-errors-Paro1BjP.js} +2 -2
- package/dist/plugin-sdk/{thinking-DCNUIAHY.js → thinking-CXqf7WTe.js} +5 -5
- package/dist/plugin-sdk/{tokens-CWMflosr.js → tokens-bC3UVmVH.js} +1 -1
- package/dist/plugin-sdk/{tool-images-D7Lno-TE.js → tool-images-HJ2sfZDV.js} +2 -2
- package/dist/plugin-sdk/{tool-loop-detection-edmW8ZiF.js → tool-loop-detection-BVA6fax-.js} +2 -2
- package/dist/plugin-sdk/web-DdTTil50.js +65 -0
- package/dist/plugin-sdk/{whatsapp-actions-CcBzDuL-.js → whatsapp-actions-DfseosPO.js} +21 -21
- package/dist/{plugins-DQYI3Fr-.js → plugins-BzmbgY7s.js} +5 -5
- package/dist/{plugins-cli-zNr1ThAO.js → plugins-cli-CcjxxESJ.js} +2 -2
- package/dist/{plugins-cli-DeDSnKlr.js → plugins-cli-D8hhTHZD.js} +2 -2
- package/dist/{program-COEKTv5u.js → program-D09h71pS.js} +7 -7
- package/dist/{program-context-CbM3x8lT.js → program-context-CLJSWBZr.js} +17 -17
- package/dist/{prompt-select-styled-C6JLWNMU.js → prompt-select-styled-DQqZEGoo.js} +4 -4
- package/dist/{prompt-select-styled-d18_XWTb.js → prompt-select-styled-zRUqu0c8.js} +4 -4
- package/dist/{provider-auth-helpers-BmH4oHwJ.js → provider-auth-helpers-16r2WHNe.js} +1 -1
- package/dist/{provider-auth-helpers-C8cO9DLi.js → provider-auth-helpers-LzJ2WQIc.js} +1 -1
- package/dist/{push-apns-CoqskfCc.js → push-apns-B5xZKIxK.js} +1 -1
- package/dist/{push-apns-CJtWrkQV.js → push-apns-DJddAK3u.js} +1 -1
- package/dist/{pw-ai-BnAKvSuw.js → pw-ai-B5asscAD.js} +16 -16
- package/dist/{qmd-manager-QHUP-_em.js → qmd-manager-iDLSiI4Z.js} +10 -10
- package/dist/{register.agent-fK3vOCU5.js → register.agent-CP_sigRh.js} +6 -6
- package/dist/{register.agent-C1Is84Q1.js → register.agent-D7NKuUkY.js} +5 -5
- package/dist/{register.configure-CIwwqqt9.js → register.configure-BEsGd0PR.js} +6 -6
- package/dist/{register.configure-DFJeKFFK.js → register.configure-BjRLNatb.js} +6 -6
- package/dist/{register.maintenance-DKDqruW6.js → register.maintenance-CN6KUuX7.js} +7 -7
- package/dist/{register.maintenance-BwTFd3Ax.js → register.maintenance-DD6TNFtV.js} +8 -8
- package/dist/{register.message-DYnXMP4c.js → register.message-DEUcNly1.js} +2 -2
- package/dist/{register.message-Ce57RPK8.js → register.message-DMVC_Sqm.js} +2 -2
- package/dist/{register.onboard-9glf-j43.js → register.onboard-CP6RP90V.js} +4 -4
- package/dist/{register.onboard-Dj-_AJQr.js → register.onboard-J1pgV7lz.js} +4 -4
- package/dist/{register.setup-Cp3DBI6D.js → register.setup-BeHpW3xI.js} +4 -4
- package/dist/{register.setup-C0CXUMFE.js → register.setup-Dhc3jKpK.js} +4 -4
- package/dist/{register.status-health-sessions-BncpB9Vw.js → register.status-health-sessions-DDkC0aoW.js} +3 -3
- package/dist/{register.status-health-sessions-DBXMyrNP.js → register.status-health-sessions-b-lWNsTM.js} +3 -3
- package/dist/{register.subclis-D6PmKJll.js → register.subclis-BJqiT8Q2.js} +9 -9
- package/dist/{registry-CK4e9hn8.js → registry-DYq1AYOv.js} +2 -2
- package/dist/{plugin-sdk/replies-fI39rPGa.js → replies-LSmuwOhA.js} +3 -3
- package/dist/{reply-BfZzgC9H.js → reply-D40cmAci.js} +420 -321
- package/dist/{reply-prefix-XlyuyChD.js → reply-prefix-DpqZu44Z.js} +1 -1
- package/dist/{resolve-route-CZ-1eqw0.js → resolve-route-C4_I4GFI.js} +5 -5
- package/dist/{retry-Cly39XZB.js → retry-BBVXkKBV.js} +1 -1
- package/dist/{run-main-wm3s04Xh.js → run-main-BruREeZ6.js} +14 -14
- package/dist/{runner-odEv83vv.js → runner-WAG0M5s9.js} +46 -46
- package/dist/{send-WyRqb4WD.js → send-CQAKg_12.js} +7 -7
- package/dist/{send-DeFniOjh.js → send-CVMyYPQw.js} +7 -7
- package/dist/{send-CiTGOvEc.js → send-CvhXrdgS.js} +12 -12
- package/dist/{send-DW96zgDL.js → send-DAN9hA5h.js} +6 -6
- package/dist/{send-B1u-LrcS.js → send-DYj_o4_F.js} +14 -14
- package/dist/{server-methods-xXv4ObXK.js → server-methods-Cyw_WS3A.js} +7 -7
- package/dist/{server-methods-D5zcFhng.js → server-methods-K-0MHs8x.js} +7 -7
- package/dist/{server-node-events-BN7H6wBM.js → server-node-events-89R9Ryky.js} +2 -2
- package/dist/{server-node-events-D4At7-pe.js → server-node-events-RA8RurtC.js} +2 -2
- package/dist/{session-SM36BTsl.js → session-DSU1vxxi.js} +4 -4
- package/dist/{skill-commands-BJMb_psG.js → skill-commands-DcVwOafC.js} +17 -17
- package/dist/{skills-BFekKL7i.js → skills-Bs0AW1g3.js} +25 -25
- package/dist/{sqlite-DRbx2dhW.js → sqlite-D_mz1_-y.js} +17 -17
- package/dist/{status-Nhvf_TEN.js → status-BSMEjz4q.js} +1 -1
- package/dist/{status-PbQwO8SV.js → status-CtNKWuzg.js} +2 -2
- package/dist/{status-XJTqV-CC.js → status-DHJLMwQN.js} +2 -2
- package/dist/{status-C5rGEkur.js → status-Kv_hsY8N.js} +1 -1
- package/dist/{store-C0wvOkae.js → store-01F_JM7O.js} +6 -6
- package/dist/{subagent-registry-DvCrN2PQ.js → subagent-registry-Cb5e_x99.js} +19342 -19243
- package/dist/{subsystem-Bs9YvKLa.js → subsystem-BjyjJF-d.js} +1 -1
- package/dist/{tables-DuZspiBu.js → tables-qMwbq29u.js} +1 -1
- package/dist/{plugin-sdk/target-errors-B7YyMnIi.js → target-errors-Bbr9rlzN.js} +2 -2
- package/dist/{thinking-CdlENGRW.js → thinking-BprCy23Z.js} +5 -5
- package/dist/{tokens-H1H1LiSQ.js → tokens-Bux9Y_xD.js} +1 -1
- package/dist/{tool-images-DXB7tqWi.js → tool-images-SqqWIT22.js} +2 -2
- package/dist/{tool-loop-detection-Cs8_HCsx.js → tool-loop-detection-D0kUzUGu.js} +3 -3
- package/dist/{pi-embedded-CTBkDXkV.js → unified-runner-CkJLTsTK.js} +69858 -69759
- package/dist/{update-cli-BHxqriaA.js → update-cli-Bl66LJZ4.js} +7 -7
- package/dist/{update-cli-IqwjBYS0.js → update-cli-CrRBoiVU.js} +8 -8
- package/dist/{update-runner-BuoOzUcX.js → update-runner-DxpSPK-f.js} +1 -1
- package/dist/{update-runner-BFwirE1P.js → update-runner-FgrqoxvV.js} +1 -1
- package/dist/{web-Cr6E8Ych.js → web-BYRKX5Ln.js} +2 -2
- package/dist/{web-C4CDNJmR.js → web-Czp0JS6-.js} +1 -1
- package/dist/{web-OSVyyJa9.js → web-D99WHLTL.js} +1 -1
- package/dist/{web-Dti17mxB.js → web-RePh7lRy.js} +64 -64
- package/dist/{whatsapp-actions-D1RsnX7P.js → whatsapp-actions-BIeSWsCF.js} +25 -25
- package/dist/{workspace-wAaHI8-5.js → workspace-DscDraUb.js} +28 -28
- 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 +83 -113
- 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/paths-Cce4PUkG.js +0 -212
- package/dist/plugin-sdk/web-Dz2oyzw_.js +0 -65
- /package/dist/{boolean-B8-BqKGQ.js → boolean-CE7i9tBR.js} +0 -0
- /package/dist/{chat-type-C_KiWNAH.js → chat-type-3FRbbjbq.js} +0 -0
- /package/dist/{diagnostic-session-state-Bxo4UHOL.js → diagnostic-session-state-Zw87xFym.js} +0 -0
- /package/dist/{legacy-names-BHV4AoFT.js → legacy-names-CePMUvus.js} +0 -0
- /package/dist/{pi-model-discovery-DaNAekda.js → pi-model-discovery-Bv5YDJc8.js} +0 -0
- /package/dist/{redact-jSxx6Ep2.js → redact-BDMXB06K.js} +0 -0
- /package/dist/{ssrf-BTMDZjHT.js → ssrf-DpUUUgkK.js} +0 -0
- /package/dist/{targets-CFovdgJI.js → targets-DGkXkFPj.js} +0 -0
- /package/dist/{transcript-events-DDYvbmRV.js → transcript-events-BBh3Gsrx.js} +0 -0
|
@@ -1,72 +1,72 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
2
|
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-C_0eELjb.js";
|
|
3
|
-
import { c as logoutWeb, f as readWebSelfId, g as webAuthExists, o as getWebAuthAgeMs, r as resolveWhatsAppAccount, s as logWebSelfId } from "./accounts-
|
|
3
|
+
import { c as logoutWeb, f as readWebSelfId, g as webAuthExists, o as getWebAuthAgeMs, r as resolveWhatsAppAccount, s as logWebSelfId } from "./accounts-Ddm33hQm.js";
|
|
4
4
|
import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-DR2yt_mP.js";
|
|
5
5
|
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-D9X2phUj.js";
|
|
6
|
-
import { A as resolveSlackBotToken, C as resolveTelegramToken, D as resolveSlackAccount, F as resolveDiscordAccount, I as normalizeDiscordToken, N as listEnabledDiscordAccounts, S as resolveTelegramAccount, _ as normalizeWhatsAppTarget, b as listTelegramAccountIds, g as isWhatsAppGroupJid, h as resolveSlackChannelId, j as createDiscordActionGate, k as resolveSlackAppToken, m as parseSlackTarget, n as listChannelPlugins, r as normalizeChannelId, t as getChannelPlugin, v as createTelegramActionGate, y as listEnabledTelegramAccounts } from "./plugins-
|
|
6
|
+
import { A as resolveSlackBotToken, C as resolveTelegramToken, D as resolveSlackAccount, F as resolveDiscordAccount, I as normalizeDiscordToken, N as listEnabledDiscordAccounts, S as resolveTelegramAccount, _ as normalizeWhatsAppTarget, b as listTelegramAccountIds, g as isWhatsAppGroupJid, h as resolveSlackChannelId, j as createDiscordActionGate, k as resolveSlackAppToken, m as parseSlackTarget, n as listChannelPlugins, r as normalizeChannelId, t as getChannelPlugin, v as createTelegramActionGate, y as listEnabledTelegramAccounts } from "./plugins-BNByVCIH.js";
|
|
7
7
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-ChYuW7LE.js";
|
|
8
8
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-CUNoPTKm.js";
|
|
9
|
-
import { $ as isRich, A as normalizeE164, D as isRecord$1, E as formatTerminalLink, H as isPlainObject, I as shortenHomeInString, J as setVerbose, K as logVerbose, L as shortenHomePath, P as resolveUserPath, Q as colorize, R as sleep$1, S as clampInt, T as escapeRegExp, U as danger, V as truncateUtf16Safe, Y as shouldLogVerbose, Z as warn, _ as matchPluginCommand, a as normalizeAnyChannelId, b as CONFIG_DIR, ct as normalizeLogLevel, d as createPluginRegistry, et as theme, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, l as requireActivePluginRegistry, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, o as normalizeChannelId$1, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, tt as getChildLogger, u as setActivePluginRegistry, ut as resolvePreferredSymiTmpDir, v as createInternalHookEvent, w as ensureDir$3, y as triggerInternalHook, z as sliceUtf16Safe } from "./registry
|
|
10
|
-
import { n as retryAsync } from "./retry-
|
|
11
|
-
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, At as fetchDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, E as listThreadsDiscord, Et as normalizeChannelSlug, 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 buildChannelKeyCandidates, 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 applyChannelMatchMeta, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-
|
|
12
|
-
import { B as getConfigOverrides, C as resolveIMessageRemoteAttachmentRoots, G as parseConfigPath, H as setConfigOverride, J as isSafeExecutableValue, K as setConfigValueAtPath, R as parseDurationMs, S as resolveIMessageAttachmentRoots, U as unsetConfigOverride, V as resetConfigOverrides, W as getConfigValueAtPath, X as resolveAgentMaxConcurrent, Y as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, Z as VERSION, _ as normalizeTelegramCommandName, a as writeConfigFile, b as isInboundPathAllowed, g as TELEGRAM_COMMAND_NAME_PATTERN, i as resolveConfigSnapshotHash, n as loadConfig, o as validateConfigObjectWithPlugins, q as unsetConfigValueAtPath, r as readConfigFileSnapshot, v as resolveTelegramCustomCommands, w as normalizeScpRemoteHost, z as validateJsonSchemaValue } from "./config-
|
|
13
|
-
import { a as clearActiveProgressLine, i as defaultRuntime, o as registerActiveProgressLine, r as createNonExitingRuntime, s as unregisterActiveProgressLine, t as createSubsystemLogger } from "./subsystem-
|
|
14
|
-
import { i as parseBooleanValue$1, n as resolveCliName, r as isTruthyEnvValue, t as formatCliCommand } from "./command-format-
|
|
15
|
-
import { A as getSoonestCooldownExpiry, B as resolveSymiAgentDir, C as getCustomProviderApiKey, D as resolveModelAuthMode, E as resolveEnvApiKey, F as dedupeProfileIds, G as normalizeSecretInput, H as withFileLock, I as listProfilesForProvider, J as DEFAULT_MODEL, K as resolveAuthProfileDisplayLabel, L as markAuthProfileGood, M as markAuthProfileFailure, N as markAuthProfileUsed, P as resolveApiKeyForProfile, Q as resolveShellEnvFallbackTimeoutMs, R as ensureAuthProfileStore, S as getApiKeyForModel, T as resolveApiKeyForProvider, X as getShellPathFromLoginShell, Y as DEFAULT_PROVIDER, a as isCliProvider, b as OLLAMA_NATIVE_BASE_URL, c as normalizeProviderId, d as resolveDefaultModelForAgent, f as resolveModelRefFromString, i as findNormalizedProviderValue, j as isProfileInCooldown, k as resolveAuthProfileOrder, m as resolveThinkingDefault, n as buildConfiguredAllowlistKeys, o as modelKey, p as resolveSubagentSpawnModelSelection, q as DEFAULT_CONTEXT_TOKENS, r as buildModelAliasIndex, s as normalizeModelRef$2, t as buildAllowedModelSet, u as resolveConfiguredModelRef, w as requireApiKey, x as createOllamaStreamFn, z as resolveAuthStorePathForDisplay } from "./model-selection-
|
|
16
|
-
import { A as logInfo, C as resolveSymiPackageRoot, D as spawnWithFallback, E as runExec, O as logDebug, S as loadWorkspaceBootstrapFiles, T as runCommandWithTimeout, a as resolveAgentModelPrimary, b as ensureAgentWorkspace, c as resolveDefaultAgentId, d as resolveSessionAgentIds, h as DEFAULT_IDENTITY_FILENAME, i as resolveAgentModelFallbacksOverride, j as logWarn, k as logError, l as resolveEffectiveModelFallbacks, m as DEFAULT_BOOTSTRAP_FILENAME, n as resolveAgentConfig, o as resolveAgentSkillsFilter, p as DEFAULT_AGENT_WORKSPACE_DIR, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId, x as filterBootstrapFilesForSession } from "./agent-scope-
|
|
17
|
-
import { c as normalizePluginsConfig, f as isPathInsideWithRealpath, i as safeStatSync, l as resolveEnableState, n as discoverSymiPlugins, p as isDangerousHostEnvVarName, r as isPathInside, s as applyTestPluginDefaults, t as loadPluginManifestRegistry, u as resolveMemorySlotDecision } from "./manifest-registry-
|
|
9
|
+
import { $ as isRich, A as normalizeE164, D as isRecord$1, E as formatTerminalLink, H as isPlainObject, I as shortenHomeInString, J as setVerbose, K as logVerbose, L as shortenHomePath, P as resolveUserPath, Q as colorize, R as sleep$1, S as clampInt, T as escapeRegExp, U as danger, V as truncateUtf16Safe, Y as shouldLogVerbose, Z as warn, _ as matchPluginCommand, a as normalizeAnyChannelId, b as CONFIG_DIR, ct as normalizeLogLevel, d as createPluginRegistry, et as theme, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, l as requireActivePluginRegistry, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, o as normalizeChannelId$1, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, tt as getChildLogger, u as setActivePluginRegistry, ut as resolvePreferredSymiTmpDir, v as createInternalHookEvent, w as ensureDir$3, y as triggerInternalHook, z as sliceUtf16Safe } from "./registry-D0xTnUWt.js";
|
|
10
|
+
import { n as retryAsync } from "./retry-CwQ_iIj8.js";
|
|
11
|
+
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, At as fetchDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, E as listThreadsDiscord, Et as normalizeChannelSlug, 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 buildChannelKeyCandidates, 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 applyChannelMatchMeta, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-CjOBB3Vo.js";
|
|
12
|
+
import { B as getConfigOverrides, C as resolveIMessageRemoteAttachmentRoots, G as parseConfigPath, H as setConfigOverride, J as isSafeExecutableValue, K as setConfigValueAtPath, R as parseDurationMs, S as resolveIMessageAttachmentRoots, U as unsetConfigOverride, V as resetConfigOverrides, W as getConfigValueAtPath, X as resolveAgentMaxConcurrent, Y as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, Z as VERSION, _ as normalizeTelegramCommandName, a as writeConfigFile, b as isInboundPathAllowed, g as TELEGRAM_COMMAND_NAME_PATTERN, i as resolveConfigSnapshotHash, n as loadConfig, o as validateConfigObjectWithPlugins, q as unsetConfigValueAtPath, r as readConfigFileSnapshot, v as resolveTelegramCustomCommands, w as normalizeScpRemoteHost, z as validateJsonSchemaValue } from "./config-KlTNfkFF.js";
|
|
13
|
+
import { a as clearActiveProgressLine, i as defaultRuntime, o as registerActiveProgressLine, r as createNonExitingRuntime, s as unregisterActiveProgressLine, t as createSubsystemLogger } from "./subsystem-B2uDN3TV.js";
|
|
14
|
+
import { i as parseBooleanValue$1, n as resolveCliName, r as isTruthyEnvValue, t as formatCliCommand } from "./command-format-GKSevep4.js";
|
|
15
|
+
import { A as getSoonestCooldownExpiry, B as resolveSymiAgentDir, C as getCustomProviderApiKey, D as resolveModelAuthMode, E as resolveEnvApiKey, F as dedupeProfileIds, G as normalizeSecretInput, H as withFileLock, I as listProfilesForProvider, J as DEFAULT_MODEL, K as resolveAuthProfileDisplayLabel, L as markAuthProfileGood, M as markAuthProfileFailure, N as markAuthProfileUsed, P as resolveApiKeyForProfile, Q as resolveShellEnvFallbackTimeoutMs, R as ensureAuthProfileStore, S as getApiKeyForModel, T as resolveApiKeyForProvider, X as getShellPathFromLoginShell, Y as DEFAULT_PROVIDER, a as isCliProvider, b as OLLAMA_NATIVE_BASE_URL, c as normalizeProviderId, d as resolveDefaultModelForAgent, f as resolveModelRefFromString, i as findNormalizedProviderValue, j as isProfileInCooldown, k as resolveAuthProfileOrder, m as resolveThinkingDefault, n as buildConfiguredAllowlistKeys, o as modelKey, p as resolveSubagentSpawnModelSelection, q as DEFAULT_CONTEXT_TOKENS, r as buildModelAliasIndex, s as normalizeModelRef$2, t as buildAllowedModelSet, u as resolveConfiguredModelRef, w as requireApiKey, x as createOllamaStreamFn, z as resolveAuthStorePathForDisplay } from "./model-selection-CsbEfrS0.js";
|
|
16
|
+
import { A as logInfo, C as resolveSymiPackageRoot, D as spawnWithFallback, E as runExec, O as logDebug, S as loadWorkspaceBootstrapFiles, T as runCommandWithTimeout, a as resolveAgentModelPrimary, b as ensureAgentWorkspace, c as resolveDefaultAgentId, d as resolveSessionAgentIds, h as DEFAULT_IDENTITY_FILENAME, i as resolveAgentModelFallbacksOverride, j as logWarn, k as logError, l as resolveEffectiveModelFallbacks, m as DEFAULT_BOOTSTRAP_FILENAME, n as resolveAgentConfig, o as resolveAgentSkillsFilter, p as DEFAULT_AGENT_WORKSPACE_DIR, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId, x as filterBootstrapFilesForSession } from "./agent-scope-CYYpcO9W.js";
|
|
17
|
+
import { c as normalizePluginsConfig, f as isPathInsideWithRealpath, i as safeStatSync, l as resolveEnableState, n as discoverSymiPlugins, p as isDangerousHostEnvVarName, r as isPathInside, s as applyTestPluginDefaults, t as loadPluginManifestRegistry, u as resolveMemorySlotDecision } from "./manifest-registry-CPnHl_K3.js";
|
|
18
18
|
import { n as formatErrorMessage, r as formatUncaughtError } from "./errors-Bv8oZiTO.js";
|
|
19
|
-
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-
|
|
19
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-DoC1xtDu.js";
|
|
20
20
|
import { n as normalizePollInput } from "./polls-3WJMd-G-.js";
|
|
21
|
-
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-
|
|
21
|
+
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-BlQR__MN.js";
|
|
22
22
|
import { a as isBlockedHostnameOrIp, c as normalizeHostname, t as SsrFBlockedError } from "./ssrf-DKZ8eBrk.js";
|
|
23
|
-
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-
|
|
24
|
-
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-
|
|
25
|
-
import { a as chunkText, c as resolveChunkMode, d as findFenceSpanAt, f as isSafeFenceBreak, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, p as parseFenceSpans, r as chunkMarkdownText, t as chunkByNewline } from "./chunk-
|
|
26
|
-
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-
|
|
23
|
+
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-BHLNSI8U.js";
|
|
24
|
+
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-BJ6BHE5b.js";
|
|
25
|
+
import { a as chunkText, c as resolveChunkMode, d as findFenceSpanAt, f as isSafeFenceBreak, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, p as parseFenceSpans, r as chunkMarkdownText, t as chunkByNewline } from "./chunk-Dw2XBYXv.js";
|
|
26
|
+
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-COTAJzHd.js";
|
|
27
27
|
import { t as normalizeChatType } from "./chat-type-CEMQNtWX.js";
|
|
28
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
29
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
30
|
-
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-
|
|
31
|
-
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-
|
|
32
|
-
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-
|
|
33
|
-
import { a as createSlackWebClient, c as validateSlackBlocksArray, i as buildSlackBlocksFallbackText, o as resolveSlackWebClientOptions, s as parseSlackBlocksInput, t as sendMessageSlack } from "./send-
|
|
34
|
-
import { $ as parseTelegramTarget, A as hasBotMention, B as resolveSenderAllowMatch, C as buildTelegramGroupPeerId, D as describeReplyTarget, E as buildTypingThreadParams, F as resolveTelegramReplyId, G as readChannelAllowFromStore, H as isSenderIdAllowed, I as resolveTelegramStreamMode, J as upsertChannelPairingRequest, L as resolveTelegramThreadSpec, M as resolveTelegramForumThreadId, N as resolveTelegramGroupAllowFromContext, O as expandTextLinks, P as resolveTelegramMediaPlaceholder, Q as isVoiceCompatibleAudio, R as isSenderAllowed$1, S as buildTelegramGroupFrom, T as buildTelegramThreadParams, U as mergeAllowFromSources, V as firstDefined$1, W as addChannelAllowFromStoreEntry, X as listPairingChannels, Y as getPairingAdapter, Z as withTelegramApiErrorLogging, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildSenderLabel, c as sendStickerTelegram, d as wasSentByBot, et as resolveTelegramTargetChatType, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as normalizeForwardedContext, k as extractTelegramLocation, m as markdownToTelegramHtml, n as createForumTopicTelegram, nt as toLocationContext, o as sendMessageTelegram, p as markdownToTelegramChunks, q as removeChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as formatLocationText, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramParentPeer, x as buildSenderName, y as buildGroupLabel, z as normalizeAllowFromWithStore$1 } from "./send-
|
|
35
|
-
import { _ as CLI_OUTPUT_MAX_BUFFER, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as registerUnhandledRejectionHandler, 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 buildRandomTempFilePath } from "./runner-
|
|
36
|
-
import { a as resolveAckReaction, c as resolveHumanDelayConfig, i as resolveResponsePrefixTemplate, n as createReplyPrefixOptions, o as resolveAgentIdentity, s as resolveEffectiveMessagesConfig } from "./reply-prefix-
|
|
37
|
-
import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-
|
|
38
|
-
import { c as getSkillsSnapshotVersion, d as resolvePairingPaths, f as createAsyncLock, i as resolveSkillCommandInvocation, l as generatePairingToken, m as writeJsonAtomic, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as readJsonFile, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as pruneExpiredPending } from "./skill-commands-
|
|
39
|
-
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-
|
|
40
|
-
import { M as isSecureWebSocketUrl, N as rawDataToString, T as DEFAULT_AI_SNAPSHOT_MAX_CHARS, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
41
|
-
import { A as normalizeHyphenSlug, F as resolveChannelGroupRequireMention, I as resolveChannelGroupToolsPolicy, M as normalizeStringEntriesLower, P as resolveChannelGroupPolicy, a as normalizeReasoningLevel, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, i as normalizeElevatedLevel, j as normalizeStringEntries, k as normalizeAtHashSlug, l as resolveResponseUsageMode, m as normalizeSignalMessagingTarget, n as formatXHighModelHint, o as normalizeThinkLevel, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking } from "./thinking-
|
|
42
|
-
import { r as resolveIMessageAccount } from "./accounts-
|
|
43
|
-
import { i as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-
|
|
44
|
-
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeChannelTargetInput, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as buildTargetResolverSignature, h as throwIfAborted, 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 normalizeTargetForProvider, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-
|
|
45
|
-
import { $ as normalizeToolName, A as isTransientHttpError, At as countToolResults, B as resolveProfile, Bt as resolveChannelResetConfig, C as isContextOverflowError, Ct as deliveryContextKey, D as isRateLimitAssistantError, Dt as normalizeAccountId$3, E as isLikelyContextOverflowError, Et as normalizeSessionDeliveryFields, F as resolveSandboxContext, Ft as normalizeInputProvenance, G as resolveBrowserControlAuth, Gt as resolveFreshSessionTotalTokens, H as resolveExistingPathsWithinRoot, Ht as resolveSessionResetType, I as resolveSandboxRuntimeStatus, It as acquireSessionWriteLock, J as buildPluginToolGroups, Jt as resolveMainSessionKey, K as resolveSandboxConfigForAgent, Kt as canonicalizeMainSessionAlias, L as createBrowserRouteContext, Lt as resolveSessionLockMaxHoldFromTimeout, M as parseImageSizeError, Mt as INPUT_PROVENANCE_KIND_VALUES, N as sanitizeUserFacingText, Nt as applyInputProvenanceToUserMessage, O as isRawApiErrorPayload, Ot as archiveSessionTranscripts, P as ensureSandboxWorkspaceForSession, Pt as hasInterSessionUserProvenance, Q as mergeAlsoAllowPolicy, R as registerBrowserRoutes, Rt as resolveSessionKey, S as isCompactionFailureError, St as deliveryContextFromSession, T as isFailoverErrorMessage, Tt as normalizeDeliveryContext, U as getBridgeAuthForPort, Ut as resolveThreadFlag, V as DEFAULT_UPLOAD_DIR, Vt as resolveSessionResetPolicy, W as ensureBrowserControlAuth, Wt as DEFAULT_RESET_TRIGGERS, X as expandPolicyWithPluginGroups, Xt as resolveGroupSessionKey, Y as collectExplicitAllowlist, Yt as deriveSessionMetaPatch, Z as expandToolGroups, _ as formatRawAssistantErrorForUi, _t as updateLastRoute, a as isMessagingToolDuplicateNormalized, at as ensureSessionHeader, b as isBillingAssistantError, bt as isCacheEnabled, c as extractToolCallsFromAssistant, ct as sanitizeGoogleTurnOrdering, d as isAntigravityClaude, dt as appendAssistantMessageToSessionTranscript, et as resolveToolProfilePolicy, f as isGoogleModelApi, g as formatBillingErrorMessage, gt as recordSessionMetaFromInbound, h as formatAssistantErrorText, ht as readSessionUpdatedAt, it as buildBootstrapContextFiles, j as parseImageDimensionError, jt as extractToolCallNames, k as isTimeoutErrorMessage, kt as capArrayByJsonBytes, l as extractToolResultId, lt as extractDeliveryInfo, m as classifyFailoverReason, mt as loadSessionStore, n as validateGeminiTurns, nt as compileGlobPatterns, o as normalizeTextForComparison, ot as resolveBootstrapMaxChars, p as BILLING_ERROR_USER_MESSAGE, pt as resolveAndPersistSessionFile, q as applyOwnerOnlyToolPolicy, qt as resolveExplicitAgentSessionKey, r as pickFallbackThinkingLevel, rt as matchesAnyGlobPattern, s as sanitizeSessionMessagesImages, st as resolveBootstrapTotalMaxChars, t as validateAnthropicTurns, tt as stripPluginOnlyAllowlist, u as downgradeOpenAIReasoningBlocks, ut as parseSessionThreadInfo, v as getApiErrorPayloadFingerprint, vt as updateSessionStore, w as isFailoverAssistantError, wt as mergeDeliveryContext, x as isCloudCodeAssistFormatError, xt as resolveCacheTtlMs$1, y as isAuthAssistantError, yt as updateSessionStoreEntry, z as resolveBrowserConfig, zt as evaluateSessionFreshness } from "./pi-embedded-helpers-
|
|
28
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-BoYFajMu.js";
|
|
29
|
+
import { t as convertMarkdownTables } from "./tables-DNwXwNFa.js";
|
|
30
|
+
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-C5h_YxNb.js";
|
|
31
|
+
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-HJ2sfZDV.js";
|
|
32
|
+
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-Paro1BjP.js";
|
|
33
|
+
import { a as createSlackWebClient, c as validateSlackBlocksArray, i as buildSlackBlocksFallbackText, o as resolveSlackWebClientOptions, s as parseSlackBlocksInput, t as sendMessageSlack } from "./send-B2CEnVLL.js";
|
|
34
|
+
import { $ as parseTelegramTarget, A as hasBotMention, B as resolveSenderAllowMatch, C as buildTelegramGroupPeerId, D as describeReplyTarget, E as buildTypingThreadParams, F as resolveTelegramReplyId, G as readChannelAllowFromStore, H as isSenderIdAllowed, I as resolveTelegramStreamMode, J as upsertChannelPairingRequest, L as resolveTelegramThreadSpec, M as resolveTelegramForumThreadId, N as resolveTelegramGroupAllowFromContext, O as expandTextLinks, P as resolveTelegramMediaPlaceholder, Q as isVoiceCompatibleAudio, R as isSenderAllowed$1, S as buildTelegramGroupFrom, T as buildTelegramThreadParams, U as mergeAllowFromSources, V as firstDefined$1, W as addChannelAllowFromStoreEntry, X as listPairingChannels, Y as getPairingAdapter, Z as withTelegramApiErrorLogging, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildSenderLabel, c as sendStickerTelegram, d as wasSentByBot, et as resolveTelegramTargetChatType, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as normalizeForwardedContext, k as extractTelegramLocation, m as markdownToTelegramHtml, n as createForumTopicTelegram, nt as toLocationContext, o as sendMessageTelegram, p as markdownToTelegramChunks, q as removeChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as formatLocationText, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramParentPeer, x as buildSenderName, y as buildGroupLabel, z as normalizeAllowFromWithStore$1 } from "./send-CRsR8-vO.js";
|
|
35
|
+
import { _ as CLI_OUTPUT_MAX_BUFFER, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as registerUnhandledRejectionHandler, 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 buildRandomTempFilePath } from "./runner-CGBT7tgF.js";
|
|
36
|
+
import { a as resolveAckReaction, c as resolveHumanDelayConfig, i as resolveResponsePrefixTemplate, n as createReplyPrefixOptions, o as resolveAgentIdentity, s as resolveEffectiveMessagesConfig } from "./reply-prefix-uxfMZW4p.js";
|
|
37
|
+
import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-bC3UVmVH.js";
|
|
38
|
+
import { c as getSkillsSnapshotVersion, d as resolvePairingPaths, f as createAsyncLock, i as resolveSkillCommandInvocation, l as generatePairingToken, m as writeJsonAtomic, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as readJsonFile, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as pruneExpiredPending } from "./skill-commands-ff_01_r3.js";
|
|
39
|
+
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-_yTP47Cd.js";
|
|
40
|
+
import { M as isSecureWebSocketUrl, N as rawDataToString, T as DEFAULT_AI_SNAPSHOT_MAX_CHARS, x as ensureChromeExtensionRelayServer } from "./chrome-B7RdxmJ0.js";
|
|
41
|
+
import { A as normalizeHyphenSlug, F as resolveChannelGroupRequireMention, I as resolveChannelGroupToolsPolicy, M as normalizeStringEntriesLower, P as resolveChannelGroupPolicy, a as normalizeReasoningLevel, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, i as normalizeElevatedLevel, j as normalizeStringEntries, k as normalizeAtHashSlug, l as resolveResponseUsageMode, m as normalizeSignalMessagingTarget, n as formatXHighModelHint, o as normalizeThinkLevel, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking } from "./thinking-CXqf7WTe.js";
|
|
42
|
+
import { r as resolveIMessageAccount } from "./accounts-s-AdhXVR.js";
|
|
43
|
+
import { i as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-BtaOa4z_.js";
|
|
44
|
+
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeChannelTargetInput, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as buildTargetResolverSignature, h as throwIfAborted, 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 normalizeTargetForProvider, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-BZ99UKQq.js";
|
|
45
|
+
import { $ as normalizeToolName, A as isTransientHttpError, At as countToolResults, B as resolveProfile, Bt as resolveChannelResetConfig, C as isContextOverflowError, Ct as deliveryContextKey, D as isRateLimitAssistantError, Dt as normalizeAccountId$3, E as isLikelyContextOverflowError, Et as normalizeSessionDeliveryFields, F as resolveSandboxContext, Ft as normalizeInputProvenance, G as resolveBrowserControlAuth, Gt as resolveFreshSessionTotalTokens, H as resolveExistingPathsWithinRoot, Ht as resolveSessionResetType, I as resolveSandboxRuntimeStatus, It as acquireSessionWriteLock, J as buildPluginToolGroups, Jt as resolveMainSessionKey, K as resolveSandboxConfigForAgent, Kt as canonicalizeMainSessionAlias, L as createBrowserRouteContext, Lt as resolveSessionLockMaxHoldFromTimeout, M as parseImageSizeError, Mt as INPUT_PROVENANCE_KIND_VALUES, N as sanitizeUserFacingText, Nt as applyInputProvenanceToUserMessage, O as isRawApiErrorPayload, Ot as archiveSessionTranscripts, P as ensureSandboxWorkspaceForSession, Pt as hasInterSessionUserProvenance, Q as mergeAlsoAllowPolicy, R as registerBrowserRoutes, Rt as resolveSessionKey, S as isCompactionFailureError, St as deliveryContextFromSession, T as isFailoverErrorMessage, Tt as normalizeDeliveryContext, U as getBridgeAuthForPort, Ut as resolveThreadFlag, V as DEFAULT_UPLOAD_DIR, Vt as resolveSessionResetPolicy, W as ensureBrowserControlAuth, Wt as DEFAULT_RESET_TRIGGERS, X as expandPolicyWithPluginGroups, Xt as resolveGroupSessionKey, Y as collectExplicitAllowlist, Yt as deriveSessionMetaPatch, Z as expandToolGroups, _ as formatRawAssistantErrorForUi, _t as updateLastRoute, a as isMessagingToolDuplicateNormalized, at as ensureSessionHeader, b as isBillingAssistantError, bt as isCacheEnabled, c as extractToolCallsFromAssistant, ct as sanitizeGoogleTurnOrdering, d as isAntigravityClaude, dt as appendAssistantMessageToSessionTranscript, et as resolveToolProfilePolicy, f as isGoogleModelApi, g as formatBillingErrorMessage, gt as recordSessionMetaFromInbound, h as formatAssistantErrorText, ht as readSessionUpdatedAt, it as buildBootstrapContextFiles, j as parseImageDimensionError, jt as extractToolCallNames, k as isTimeoutErrorMessage, kt as capArrayByJsonBytes, l as extractToolResultId, lt as extractDeliveryInfo, m as classifyFailoverReason, mt as loadSessionStore, n as validateGeminiTurns, nt as compileGlobPatterns, o as normalizeTextForComparison, ot as resolveBootstrapMaxChars, p as BILLING_ERROR_USER_MESSAGE, pt as resolveAndPersistSessionFile, q as applyOwnerOnlyToolPolicy, qt as resolveExplicitAgentSessionKey, r as pickFallbackThinkingLevel, rt as matchesAnyGlobPattern, s as sanitizeSessionMessagesImages, st as resolveBootstrapTotalMaxChars, t as validateAnthropicTurns, tt as stripPluginOnlyAllowlist, u as downgradeOpenAIReasoningBlocks, ut as parseSessionThreadInfo, v as getApiErrorPayloadFingerprint, vt as updateSessionStore, w as isFailoverAssistantError, wt as mergeDeliveryContext, x as isCloudCodeAssistFormatError, xt as resolveCacheTtlMs$1, y as isAuthAssistantError, yt as updateSessionStoreEntry, z as resolveBrowserConfig, zt as evaluateSessionFreshness } from "./pi-embedded-helpers-CW630epe.js";
|
|
46
46
|
import { n as resolveConversationLabel } from "./conversation-label-yNSj43Jt.js";
|
|
47
47
|
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-A0xdf3yk.js";
|
|
48
48
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-x1D4Vniz.js";
|
|
49
|
-
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-
|
|
50
|
-
import { i as saveMediaBuffer, r as getMediaDir } from "./store-
|
|
49
|
+
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-05pm5Rxi.js";
|
|
50
|
+
import { i as saveMediaBuffer, r as getMediaDir } from "./store-BdrNabcU.js";
|
|
51
51
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-D5EzMeL_.js";
|
|
52
|
-
import { S as minimaxUnderstandImage, _ as stripThinkingTagsFromText, a as decodeDataUrl, b as extractTextFromChatContent, c as extractAssistantThinking, d as formatReasoningMessage, f as inferToolMetaFromArgs, g as stripMinimaxToolCallXml, h as stripDowngradedToolCallText, i as coerceImageModelConfig, l as extractThinkingFromTaggedStream, m as promoteThinkingTagsToBlocks, o as resolveProviderVisionModelFromConfig, p as isAssistantMessage, r as coerceImageAssistantText, s as extractAssistantText$1, u as extractThinkingFromTaggedText, v as resolveToolDisplay, x as ensureSymiModelsJson, y as stripReasoningTagsFromText } from "./image-
|
|
52
|
+
import { S as minimaxUnderstandImage, _ as stripThinkingTagsFromText, a as decodeDataUrl, b as extractTextFromChatContent, c as extractAssistantThinking, d as formatReasoningMessage, f as inferToolMetaFromArgs, g as stripMinimaxToolCallXml, h as stripDowngradedToolCallText, i as coerceImageModelConfig, l as extractThinkingFromTaggedStream, m as promoteThinkingTagsToBlocks, o as resolveProviderVisionModelFromConfig, p as isAssistantMessage, r as coerceImageAssistantText, s as extractAssistantText$1, u as extractThinkingFromTaggedText, v as resolveToolDisplay, x as ensureSymiModelsJson, y as stripReasoningTagsFromText } from "./image-CLOPx7yW.js";
|
|
53
53
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-LbcEa65a.js";
|
|
54
|
-
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, v as runTasksWithConcurrency } from "./sqlite-
|
|
54
|
+
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, v as runTasksWithConcurrency } from "./sqlite-CxAR5ttJ.js";
|
|
55
55
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-Wd5tNeQG.js";
|
|
56
|
-
import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-
|
|
57
|
-
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-
|
|
58
|
-
import { c as signalRpcRequest, l as streamSignalEvents, n as sendReadReceiptSignal, o as resolveSignalRpcContext, r as sendTypingSignal, s as signalCheck, t as sendMessageSignal } from "./send-
|
|
56
|
+
import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-CBSBFuFz.js";
|
|
57
|
+
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-COIaslGl.js";
|
|
58
|
+
import { c as signalRpcRequest, l as streamSignalEvents, n as sendReadReceiptSignal, o as resolveSignalRpcContext, r as sendTypingSignal, s as signalCheck, t as sendMessageSignal } from "./send-pYqe432l.js";
|
|
59
59
|
import { t as makeProxyFetch } from "./proxy-MquBDehr.js";
|
|
60
|
-
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-
|
|
61
|
-
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
62
|
-
import { t as getActiveWebListener } from "./active-listener-
|
|
60
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-B3CCBumQ.js";
|
|
61
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-LLcQL3w6.js";
|
|
62
|
+
import { t as getActiveWebListener } from "./active-listener-BXYeALs0.js";
|
|
63
63
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-CBq0jVRw.js";
|
|
64
64
|
import { createRequire } from "node:module";
|
|
65
65
|
import fs, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
66
66
|
import * as path$1 from "node:path";
|
|
67
67
|
import path from "node:path";
|
|
68
68
|
import os, { homedir } from "node:os";
|
|
69
|
-
import
|
|
69
|
+
import JSON5 from "json5";
|
|
70
70
|
import { ApplicationCommandOptionType, ButtonStyle, ChannelType, PermissionFlagsBits, Routes, StickerFormatType } from "discord-api-types/v10";
|
|
71
71
|
import { Button, ChannelSelectMenu, ChannelType as ChannelType$1, Client, Command, CommandWithSubcommands, Container, MentionableSelectMenu, MessageCreateListener, MessageReactionAddListener, MessageReactionRemoveListener, MessageType, Modal, PresenceUpdateListener, ReadyListener, RoleSelectMenu, Row, Separator, StringSelectMenu, TextDisplay, UserSelectMenu, serializePayload } from "@buape/carbon";
|
|
72
72
|
import crypto, { X509Certificate, createHash, createHmac, randomBytes, randomUUID } from "node:crypto";
|
|
@@ -7792,7 +7792,7 @@ async function createModelSelectionState(params) {
|
|
|
7792
7792
|
}
|
|
7793
7793
|
}
|
|
7794
7794
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
7795
|
-
const { ensureAuthProfileStore } = await import("./model-selection-
|
|
7795
|
+
const { ensureAuthProfileStore } = await import("./model-selection-CsbEfrS0.js").then((n) => n.O);
|
|
7796
7796
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
7797
7797
|
const providerKey = normalizeProviderId(provider);
|
|
7798
7798
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -11544,7 +11544,7 @@ async function getMemorySearchManager(params) {
|
|
|
11544
11544
|
if (cached) return { manager: cached };
|
|
11545
11545
|
}
|
|
11546
11546
|
try {
|
|
11547
|
-
const { QmdMemoryManager } = await import("./qmd-manager-
|
|
11547
|
+
const { QmdMemoryManager } = await import("./qmd-manager-CH0XbIHf.js");
|
|
11548
11548
|
const primary = await QmdMemoryManager.create({
|
|
11549
11549
|
cfg: params.cfg,
|
|
11550
11550
|
agentId: params.agentId,
|
|
@@ -11556,7 +11556,7 @@ async function getMemorySearchManager(params) {
|
|
|
11556
11556
|
const wrapper = new FallbackMemoryManager({
|
|
11557
11557
|
primary,
|
|
11558
11558
|
fallbackFactory: async () => {
|
|
11559
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
11559
|
+
const { MemoryIndexManager } = await import("./manager-CBSBFuFz.js").then((n) => n.t);
|
|
11560
11560
|
return await MemoryIndexManager.get(params);
|
|
11561
11561
|
}
|
|
11562
11562
|
}, () => QMD_MANAGER_CACHE.delete(cacheKey));
|
|
@@ -11569,7 +11569,7 @@ async function getMemorySearchManager(params) {
|
|
|
11569
11569
|
}
|
|
11570
11570
|
}
|
|
11571
11571
|
try {
|
|
11572
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
11572
|
+
const { MemoryIndexManager } = await import("./manager-CBSBFuFz.js").then((n) => n.t);
|
|
11573
11573
|
return { manager: await MemoryIndexManager.get(params) };
|
|
11574
11574
|
} catch (err) {
|
|
11575
11575
|
return {
|
|
@@ -12628,7 +12628,7 @@ function normalizeSessionKey(value) {
|
|
|
12628
12628
|
function readSessionStore(storePath) {
|
|
12629
12629
|
try {
|
|
12630
12630
|
const raw = fs.readFileSync(storePath, "utf-8");
|
|
12631
|
-
const parsed =
|
|
12631
|
+
const parsed = JSON5.parse(raw);
|
|
12632
12632
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
|
|
12633
12633
|
} catch {}
|
|
12634
12634
|
return {};
|
|
@@ -15485,7 +15485,7 @@ async function routeReply(params) {
|
|
|
15485
15485
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
15486
15486
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
15487
15487
|
try {
|
|
15488
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
15488
|
+
const { deliverOutboundPayloads } = await import("./deliver-BZ99UKQq.js").then((n) => n.n);
|
|
15489
15489
|
return {
|
|
15490
15490
|
ok: true,
|
|
15491
15491
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -17959,7 +17959,7 @@ async function describeStickerImage(params) {
|
|
|
17959
17959
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
17960
17960
|
try {
|
|
17961
17961
|
const buffer = await fs$1.readFile(imagePath);
|
|
17962
|
-
const { describeImageWithModel } = await import("./image-
|
|
17962
|
+
const { describeImageWithModel } = await import("./image-CLOPx7yW.js").then((n) => n.n);
|
|
17963
17963
|
return (await describeImageWithModel({
|
|
17964
17964
|
buffer,
|
|
17965
17965
|
fileName: "sticker.webp",
|
|
@@ -18370,7 +18370,7 @@ function createWhatsAppLoginTool() {
|
|
|
18370
18370
|
force: Type.Optional(Type.Boolean())
|
|
18371
18371
|
}),
|
|
18372
18372
|
execute: async (_toolCallId, args) => {
|
|
18373
|
-
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-
|
|
18373
|
+
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-BjVZSoCi.js");
|
|
18374
18374
|
if ((args?.action ?? "start") === "wait") {
|
|
18375
18375
|
const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
|
|
18376
18376
|
return {
|
|
@@ -20438,7 +20438,7 @@ async function preflightDiscordMessage(params) {
|
|
|
20438
20438
|
let preflightTranscript;
|
|
20439
20439
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
20440
20440
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
20441
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
20441
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-VpItkiy3.js");
|
|
20442
20442
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
20443
20443
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
20444
20444
|
ctx: {
|
|
@@ -29909,7 +29909,7 @@ async function recordLoopOutcome(args) {
|
|
|
29909
29909
|
if (!args.ctx?.sessionKey) return;
|
|
29910
29910
|
try {
|
|
29911
29911
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Wd5tNeQG.js").then((n) => n.n);
|
|
29912
|
-
const { recordToolCallOutcome } = await import("./tool-loop-detection-
|
|
29912
|
+
const { recordToolCallOutcome } = await import("./tool-loop-detection-BVA6fax-.js");
|
|
29913
29913
|
recordToolCallOutcome(getDiagnosticSessionState({
|
|
29914
29914
|
sessionKey: args.ctx.sessionKey,
|
|
29915
29915
|
sessionId: args.ctx?.agentId
|
|
@@ -29930,8 +29930,8 @@ async function runBeforeToolCallHook(args) {
|
|
|
29930
29930
|
const params = args.params;
|
|
29931
29931
|
if (args.ctx?.sessionKey) {
|
|
29932
29932
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Wd5tNeQG.js").then((n) => n.n);
|
|
29933
|
-
const { logToolLoopAction } = await import("./diagnostic-
|
|
29934
|
-
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-
|
|
29933
|
+
const { logToolLoopAction } = await import("./diagnostic-05pm5Rxi.js").then((n) => n.n);
|
|
29934
|
+
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-BVA6fax-.js");
|
|
29935
29935
|
const sessionState = getDiagnosticSessionState({
|
|
29936
29936
|
sessionKey: args.ctx.sessionKey,
|
|
29937
29937
|
sessionId: args.ctx?.agentId
|
|
@@ -35832,7 +35832,8 @@ async function runAgentTurn(params) {
|
|
|
35832
35832
|
const cb = params.callbacks;
|
|
35833
35833
|
const sessionFile = resolveSessionFilePath(params.sessionId, void 0, { agentId });
|
|
35834
35834
|
const profile = resolveModelProfile(params.provider && params.modelId ? `${params.provider}/${params.modelId}` : params.config.agents?.defaults?.model?.primary ?? "", params.config.models?.profiles);
|
|
35835
|
-
const
|
|
35835
|
+
const toolsUsed = [];
|
|
35836
|
+
const buildInternalParams = (providerOverride, modelOverride) => ({
|
|
35836
35837
|
sessionId: params.sessionId,
|
|
35837
35838
|
sessionKey: params.sessionKey,
|
|
35838
35839
|
agentId,
|
|
@@ -35847,14 +35848,28 @@ async function runAgentTurn(params) {
|
|
|
35847
35848
|
extraSystemPrompt: params.extraSystemPrompt,
|
|
35848
35849
|
clientTools: params.clientTools,
|
|
35849
35850
|
disableTools: params.disableTools,
|
|
35850
|
-
provider: params.provider,
|
|
35851
|
-
model: params.modelId,
|
|
35851
|
+
provider: providerOverride ?? params.provider,
|
|
35852
|
+
model: modelOverride ?? params.modelId,
|
|
35852
35853
|
authProfileId: params.authProfileId,
|
|
35853
35854
|
authProfileIdSource: params.authProfileIdSource,
|
|
35854
35855
|
thinkLevel: params.thinkLevel,
|
|
35855
35856
|
reasoningLevel: params.reasoningLevel,
|
|
35856
35857
|
timeoutMs: params.timeoutMs,
|
|
35857
35858
|
abortSignal: params.abortSignal,
|
|
35859
|
+
lane: params.lane,
|
|
35860
|
+
toolResultFormat: params.toolResultFormat,
|
|
35861
|
+
verboseLevel: params.verboseLevel,
|
|
35862
|
+
ownerNumbers: params.ownerNumbers,
|
|
35863
|
+
enforceFinalTag: params.enforceFinalTag,
|
|
35864
|
+
execOverrides: params.execOverrides,
|
|
35865
|
+
bashElevated: params.bashElevated,
|
|
35866
|
+
suppressToolErrorWarnings: params.suppressToolErrorWarnings,
|
|
35867
|
+
streamParams: params.streamParams,
|
|
35868
|
+
blockReplyBreak: params.blockReplyBreak,
|
|
35869
|
+
blockReplyChunking: params.blockReplyChunking,
|
|
35870
|
+
requireExplicitMessageTarget: params.requireExplicitMessageTarget,
|
|
35871
|
+
disableMessageTool: params.disableMessageTool,
|
|
35872
|
+
symipulseMs: params.symipulseMs,
|
|
35858
35873
|
messageChannel: ch?.messageChannel,
|
|
35859
35874
|
messageProvider: ch?.messageProvider,
|
|
35860
35875
|
agentAccountId: ch?.agentAccountId,
|
|
@@ -35876,26 +35891,92 @@ async function runAgentTurn(params) {
|
|
|
35876
35891
|
onPartialReply: cb?.onDelta ? (payload) => {
|
|
35877
35892
|
if (payload.text) cb.onDelta(payload.text);
|
|
35878
35893
|
} : void 0,
|
|
35894
|
+
onAssistantMessageStart: cb?.onTypingStart ? () => {
|
|
35895
|
+
cb.onTypingStart();
|
|
35896
|
+
cb?.onLifecycle?.("streaming");
|
|
35897
|
+
} : cb?.onLifecycle ? () => {
|
|
35898
|
+
cb.onLifecycle("streaming");
|
|
35899
|
+
} : void 0,
|
|
35879
35900
|
onToolResult: cb?.onToolResult ? (payload) => {
|
|
35880
35901
|
if (payload.text) cb.onToolResult("tool", payload.text);
|
|
35881
35902
|
} : void 0,
|
|
35882
35903
|
onReasoningStream: cb?.onThinking ? (payload) => {
|
|
35883
35904
|
if (payload.text) cb.onThinking(payload.text);
|
|
35884
35905
|
} : void 0,
|
|
35885
|
-
|
|
35906
|
+
onBlockReply: cb?.onBlockReply ? (payload) => {
|
|
35907
|
+
cb.onBlockReply({
|
|
35908
|
+
...payload,
|
|
35909
|
+
isFinal: false
|
|
35910
|
+
});
|
|
35911
|
+
} : void 0,
|
|
35912
|
+
onBlockReplyFlush: cb?.onBlockReplyFlush,
|
|
35913
|
+
onAgentEvent: (evt) => {
|
|
35914
|
+
cb?.onAgentEvent?.(evt);
|
|
35915
|
+
const stream = evt.stream;
|
|
35916
|
+
const data = evt.data;
|
|
35917
|
+
const phase = typeof data?.phase === "string" ? data.phase : "";
|
|
35918
|
+
if (stream === "lifecycle") {
|
|
35919
|
+
if (phase === "start") {
|
|
35920
|
+
cb?.onLifecycle?.("start");
|
|
35921
|
+
cb?.onTypingStart?.();
|
|
35922
|
+
} else if (phase === "end") cb?.onTypingStop?.();
|
|
35923
|
+
else if (phase === "error") {
|
|
35924
|
+
cb?.onLifecycle?.("error");
|
|
35925
|
+
cb?.onTypingStop?.();
|
|
35926
|
+
if (cb?.onError && typeof data?.error === "string") cb.onError(new Error(data.error));
|
|
35927
|
+
}
|
|
35928
|
+
}
|
|
35929
|
+
if (stream === "tool") {
|
|
35930
|
+
const toolName = typeof data?.name === "string" ? data.name : "";
|
|
35931
|
+
if (phase === "start" && toolName) {
|
|
35932
|
+
toolsUsed.push(toolName);
|
|
35933
|
+
cb?.onToolStart?.(toolName, data?.args ?? {});
|
|
35934
|
+
cb?.onTypingStart?.();
|
|
35935
|
+
}
|
|
35936
|
+
}
|
|
35937
|
+
if (stream === "compaction" && phase === "end") cb?.onCompaction?.({
|
|
35938
|
+
tokensBefore: typeof data?.tokensBefore === "number" ? data.tokensBefore : 0,
|
|
35939
|
+
tokensAfter: typeof data?.tokensAfter === "number" ? data.tokensAfter : 0
|
|
35940
|
+
});
|
|
35941
|
+
}
|
|
35886
35942
|
});
|
|
35943
|
+
let result;
|
|
35944
|
+
let fallbackProvider;
|
|
35945
|
+
let fallbackModel;
|
|
35946
|
+
const TRANSIENT_RETRY_DELAY_MS = 2500;
|
|
35947
|
+
const maxAttempts = params.retryOnTransientError ? 2 : 1;
|
|
35948
|
+
for (let attempt = 0; attempt < maxAttempts; attempt++) try {
|
|
35949
|
+
if (params.fallbackModels?.length) {
|
|
35950
|
+
const fallbackResult = await runWithModelFallback({
|
|
35951
|
+
cfg: params.config,
|
|
35952
|
+
provider: params.provider ?? "",
|
|
35953
|
+
model: params.modelId ?? "",
|
|
35954
|
+
agentDir,
|
|
35955
|
+
fallbacksOverride: params.fallbackModels,
|
|
35956
|
+
run: (provider, model) => runEmbeddedPiAgent(buildInternalParams(provider, model)),
|
|
35957
|
+
onError: async (fallbackAttempt) => {
|
|
35958
|
+
const fromModel = `${fallbackAttempt.provider}/${fallbackAttempt.model}`;
|
|
35959
|
+
cb?.onFallback?.(fromModel, "(next)", String(fallbackAttempt.error));
|
|
35960
|
+
}
|
|
35961
|
+
});
|
|
35962
|
+
result = fallbackResult.result;
|
|
35963
|
+
fallbackProvider = fallbackResult.provider;
|
|
35964
|
+
fallbackModel = fallbackResult.model;
|
|
35965
|
+
} else result = await runEmbeddedPiAgent(buildInternalParams());
|
|
35966
|
+
break;
|
|
35967
|
+
} catch (err) {
|
|
35968
|
+
const errMsg = err instanceof Error ? err.message : String(err);
|
|
35969
|
+
if (params.retryOnTransientError && attempt < maxAttempts - 1 && isTransientHttpError(errMsg)) {
|
|
35970
|
+
await new Promise((resolve) => setTimeout(resolve, TRANSIENT_RETRY_DELAY_MS));
|
|
35971
|
+
continue;
|
|
35972
|
+
}
|
|
35973
|
+
throw err;
|
|
35974
|
+
}
|
|
35975
|
+
result = result;
|
|
35887
35976
|
const responseText = (result.payloads ?? []).filter((p) => p.text && !p.isError).map((p) => p.text).join("\n").trim();
|
|
35888
|
-
const resolvedProvider = result.meta.agentMeta?.provider ?? params.provider ?? "";
|
|
35889
|
-
const resolvedModel = result.meta.agentMeta?.model ?? params.modelId ?? "";
|
|
35890
|
-
|
|
35891
|
-
provider: resolvedProvider,
|
|
35892
|
-
modelId: resolvedModel,
|
|
35893
|
-
tokenCount: result.meta.agentMeta?.usage?.total ?? 0,
|
|
35894
|
-
durationMs: Date.now() - startTime,
|
|
35895
|
-
toolsUsed: []
|
|
35896
|
-
});
|
|
35897
|
-
if (cb?.onLifecycle) await cb.onLifecycle(result.meta.error ? "error" : "end");
|
|
35898
|
-
return {
|
|
35977
|
+
const resolvedProvider = fallbackProvider ?? result.meta.agentMeta?.provider ?? params.provider ?? "";
|
|
35978
|
+
const resolvedModel = fallbackModel ?? result.meta.agentMeta?.model ?? params.modelId ?? "";
|
|
35979
|
+
const turnResult = {
|
|
35899
35980
|
text: responseText,
|
|
35900
35981
|
durationMs: Date.now() - startTime,
|
|
35901
35982
|
provider: resolvedProvider,
|
|
@@ -35904,6 +35985,23 @@ async function runAgentTurn(params) {
|
|
|
35904
35985
|
didSendViaMessagingTool: result.didSendViaMessagingTool ?? false,
|
|
35905
35986
|
rawResult: result
|
|
35906
35987
|
};
|
|
35988
|
+
if (params.postRunHooks?.length) {
|
|
35989
|
+
for (const hook of params.postRunHooks) if (hook.shouldRun(turnResult)) try {
|
|
35990
|
+
await hook.execute(turnResult, params);
|
|
35991
|
+
} catch (hookErr) {
|
|
35992
|
+
if (cb?.onError && hookErr instanceof Error) cb.onError(hookErr);
|
|
35993
|
+
}
|
|
35994
|
+
turnResult.durationMs = Date.now() - startTime;
|
|
35995
|
+
}
|
|
35996
|
+
if (cb?.onFinal) await cb.onFinal(responseText, {
|
|
35997
|
+
provider: resolvedProvider,
|
|
35998
|
+
modelId: resolvedModel,
|
|
35999
|
+
tokenCount: result.meta.agentMeta?.usage?.total ?? 0,
|
|
36000
|
+
durationMs: turnResult.durationMs,
|
|
36001
|
+
toolsUsed
|
|
36002
|
+
});
|
|
36003
|
+
if (cb?.onLifecycle) await cb.onLifecycle(result.meta.error ? "error" : "end");
|
|
36004
|
+
return turnResult;
|
|
35907
36005
|
}
|
|
35908
36006
|
|
|
35909
36007
|
//#endregion
|
|
@@ -35911,27 +36009,27 @@ async function runAgentTurn(params) {
|
|
|
35911
36009
|
function createDefaultDeps() {
|
|
35912
36010
|
return {
|
|
35913
36011
|
sendMessageWhatsApp: async (...args) => {
|
|
35914
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
36012
|
+
const { sendMessageWhatsApp } = await import("./web-DdTTil50.js");
|
|
35915
36013
|
return await sendMessageWhatsApp(...args);
|
|
35916
36014
|
},
|
|
35917
36015
|
sendMessageTelegram: async (...args) => {
|
|
35918
|
-
const { sendMessageTelegram } = await import("./send-
|
|
36016
|
+
const { sendMessageTelegram } = await import("./send-CRsR8-vO.js").then((n) => n.l);
|
|
35919
36017
|
return await sendMessageTelegram(...args);
|
|
35920
36018
|
},
|
|
35921
36019
|
sendMessageDiscord: async (...args) => {
|
|
35922
|
-
const { sendMessageDiscord } = await import("./send-
|
|
36020
|
+
const { sendMessageDiscord } = await import("./send-CjOBB3Vo.js").then((n) => n.t);
|
|
35923
36021
|
return await sendMessageDiscord(...args);
|
|
35924
36022
|
},
|
|
35925
36023
|
sendMessageSlack: async (...args) => {
|
|
35926
|
-
const { sendMessageSlack } = await import("./send-
|
|
36024
|
+
const { sendMessageSlack } = await import("./send-B2CEnVLL.js").then((n) => n.n);
|
|
35927
36025
|
return await sendMessageSlack(...args);
|
|
35928
36026
|
},
|
|
35929
36027
|
sendMessageSignal: async (...args) => {
|
|
35930
|
-
const { sendMessageSignal } = await import("./send-
|
|
36028
|
+
const { sendMessageSignal } = await import("./send-pYqe432l.js").then((n) => n.i);
|
|
35931
36029
|
return await sendMessageSignal(...args);
|
|
35932
36030
|
},
|
|
35933
36031
|
sendMessageIMessage: async (...args) => {
|
|
35934
|
-
const { sendMessageIMessage } = await import("./send-
|
|
36032
|
+
const { sendMessageIMessage } = await import("./send-C5h_YxNb.js").then((n) => n.n);
|
|
35935
36033
|
return await sendMessageIMessage(...args);
|
|
35936
36034
|
}
|
|
35937
36035
|
};
|
|
@@ -46083,7 +46181,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
46083
46181
|
}
|
|
46084
46182
|
let commandsRegistry;
|
|
46085
46183
|
async function getCommandsRegistry() {
|
|
46086
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
46184
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-COIaslGl.js").then((n) => n.n);
|
|
46087
46185
|
return commandsRegistry;
|
|
46088
46186
|
}
|
|
46089
46187
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -46425,11 +46523,11 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
46425
46523
|
const channelName = channelInfo?.name;
|
|
46426
46524
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
46427
46525
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
46428
|
-
import("./resolve-route-
|
|
46526
|
+
import("./resolve-route-B3CCBumQ.js").then((n) => n.r),
|
|
46429
46527
|
import("./inbound-context-D5EzMeL_.js").then((n) => n.n),
|
|
46430
46528
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
46431
46529
|
]);
|
|
46432
|
-
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-yNSj43Jt.js").then((n) => n.t), import("./reply-prefix-
|
|
46530
|
+
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-yNSj43Jt.js").then((n) => n.t), import("./reply-prefix-uxfMZW4p.js").then((n) => n.r)]);
|
|
46433
46531
|
const route = resolveAgentRoute({
|
|
46434
46532
|
cfg,
|
|
46435
46533
|
channel: "slack",
|
|
@@ -46486,9 +46584,9 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
46486
46584
|
});
|
|
46487
46585
|
const deliverSlashPayloads = async (replies) => {
|
|
46488
46586
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
46489
|
-
import("./replies-
|
|
46490
|
-
import("./chunk-
|
|
46491
|
-
import("./markdown-tables-
|
|
46587
|
+
import("./replies-LLcQL3w6.js").then((n) => n.r),
|
|
46588
|
+
import("./chunk-Dw2XBYXv.js").then((n) => n.s),
|
|
46589
|
+
import("./markdown-tables-BoYFajMu.js").then((n) => n.t)
|
|
46492
46590
|
]);
|
|
46493
46591
|
await deliverSlackSlashReplies({
|
|
46494
46592
|
replies,
|
|
@@ -46541,7 +46639,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
46541
46639
|
let nativeCommands = [];
|
|
46542
46640
|
if (nativeEnabled) {
|
|
46543
46641
|
reg = await getCommandsRegistry();
|
|
46544
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
46642
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-ff_01_r3.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
46545
46643
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
46546
46644
|
skillCommands,
|
|
46547
46645
|
provider: "slack"
|
|
@@ -51192,7 +51290,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
51192
51290
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
51193
51291
|
let preflightTranscript;
|
|
51194
51292
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
51195
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
51293
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-VpItkiy3.js");
|
|
51196
51294
|
preflightTranscript = await transcribeFirstAudio({
|
|
51197
51295
|
ctx: {
|
|
51198
51296
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -53337,23 +53435,23 @@ let webLoginQrPromise = null;
|
|
|
53337
53435
|
let webChannelPromise = null;
|
|
53338
53436
|
let whatsappActionsPromise = null;
|
|
53339
53437
|
function loadWebOutbound() {
|
|
53340
|
-
webOutboundPromise ??= import("./outbound-
|
|
53438
|
+
webOutboundPromise ??= import("./outbound-B0e8KdaR.js").then((n) => n.t);
|
|
53341
53439
|
return webOutboundPromise;
|
|
53342
53440
|
}
|
|
53343
53441
|
function loadWebLogin() {
|
|
53344
|
-
webLoginPromise ??= import("./login-
|
|
53442
|
+
webLoginPromise ??= import("./login-DQMXuxOk.js").then((n) => n.n);
|
|
53345
53443
|
return webLoginPromise;
|
|
53346
53444
|
}
|
|
53347
53445
|
function loadWebLoginQr() {
|
|
53348
|
-
webLoginQrPromise ??= import("./login-qr-
|
|
53446
|
+
webLoginQrPromise ??= import("./login-qr-BjVZSoCi.js");
|
|
53349
53447
|
return webLoginQrPromise;
|
|
53350
53448
|
}
|
|
53351
53449
|
function loadWebChannel() {
|
|
53352
|
-
webChannelPromise ??= import("./web-
|
|
53450
|
+
webChannelPromise ??= import("./web-DdTTil50.js");
|
|
53353
53451
|
return webChannelPromise;
|
|
53354
53452
|
}
|
|
53355
53453
|
function loadWhatsAppActions() {
|
|
53356
|
-
whatsappActionsPromise ??= import("./whatsapp-actions-
|
|
53454
|
+
whatsappActionsPromise ??= import("./whatsapp-actions-DfseosPO.js");
|
|
53357
53455
|
return whatsappActionsPromise;
|
|
53358
53456
|
}
|
|
53359
53457
|
function createPluginRuntime() {
|
|
@@ -75711,7 +75809,6 @@ function createBlockReplyDeliveryHandler(params) {
|
|
|
75711
75809
|
//#endregion
|
|
75712
75810
|
//#region src/auto-reply/reply/agent-runner-execution.ts
|
|
75713
75811
|
async function runAgentTurnWithFallback(params) {
|
|
75714
|
-
const TRANSIENT_HTTP_RETRY_DELAY_MS = 2500;
|
|
75715
75812
|
let didLogHeartbeatStrip = false;
|
|
75716
75813
|
let autoCompactionCompleted = false;
|
|
75717
75814
|
const directlySentBlockKeys = /* @__PURE__ */ new Set();
|
|
@@ -75732,199 +75829,216 @@ async function runAgentTurnWithFallback(params) {
|
|
|
75732
75829
|
let fallbackModel = params.followupRun.run.model;
|
|
75733
75830
|
let fallbackAttempts = [];
|
|
75734
75831
|
let didResetAfterCompactionFailure = false;
|
|
75735
|
-
|
|
75736
|
-
|
|
75737
|
-
|
|
75738
|
-
|
|
75739
|
-
if (
|
|
75740
|
-
|
|
75741
|
-
|
|
75742
|
-
didLogHeartbeatStrip = true;
|
|
75743
|
-
logVerbose("Stripped stray SYMIPULSE_OK token from reply");
|
|
75744
|
-
}
|
|
75745
|
-
if (stripped.shouldSkip && (payload.mediaUrls?.length ?? 0) === 0) return { skip: true };
|
|
75746
|
-
text = stripped.text;
|
|
75747
|
-
}
|
|
75748
|
-
if (isSilentReplyText(text, SILENT_REPLY_TOKEN)) return { skip: true };
|
|
75749
|
-
if (!text) {
|
|
75750
|
-
if ((payload.mediaUrls?.length ?? 0) > 0) return {
|
|
75751
|
-
text: void 0,
|
|
75752
|
-
skip: false
|
|
75753
|
-
};
|
|
75754
|
-
return { skip: true };
|
|
75832
|
+
const normalizeStreamingText = (payload) => {
|
|
75833
|
+
let text = payload.text;
|
|
75834
|
+
if (!params.isHeartbeat && text?.includes("SYMIPULSE_OK")) {
|
|
75835
|
+
const stripped = stripHeartbeatToken(text, { mode: "message" });
|
|
75836
|
+
if (stripped.didStrip && !didLogHeartbeatStrip) {
|
|
75837
|
+
didLogHeartbeatStrip = true;
|
|
75838
|
+
logVerbose("Stripped stray SYMIPULSE_OK token from reply");
|
|
75755
75839
|
}
|
|
75756
|
-
|
|
75757
|
-
|
|
75758
|
-
|
|
75759
|
-
|
|
75840
|
+
if (stripped.shouldSkip && (payload.mediaUrls?.length ?? 0) === 0) return { skip: true };
|
|
75841
|
+
text = stripped.text;
|
|
75842
|
+
}
|
|
75843
|
+
if (isSilentReplyText(text, SILENT_REPLY_TOKEN)) return { skip: true };
|
|
75844
|
+
if (!text) {
|
|
75845
|
+
if ((payload.mediaUrls?.length ?? 0) > 0) return {
|
|
75846
|
+
text: void 0,
|
|
75760
75847
|
skip: false
|
|
75761
75848
|
};
|
|
75849
|
+
return { skip: true };
|
|
75850
|
+
}
|
|
75851
|
+
const sanitized = sanitizeUserFacingText(text, { errorContext: Boolean(payload.isError) });
|
|
75852
|
+
if (!sanitized.trim()) return { skip: true };
|
|
75853
|
+
return {
|
|
75854
|
+
text: sanitized,
|
|
75855
|
+
skip: false
|
|
75762
75856
|
};
|
|
75763
|
-
|
|
75764
|
-
|
|
75765
|
-
|
|
75766
|
-
|
|
75857
|
+
};
|
|
75858
|
+
const blockReplyPipeline = params.blockReplyPipeline;
|
|
75859
|
+
const onToolResult = params.opts?.onToolResult;
|
|
75860
|
+
let toolResultChain = Promise.resolve();
|
|
75861
|
+
const serializedOnToolResult = onToolResult ? (name, resultText) => {
|
|
75862
|
+
toolResultChain = toolResultChain.then(async () => {
|
|
75863
|
+
const { text, skip } = normalizeStreamingText({ text: resultText });
|
|
75864
|
+
if (skip) return;
|
|
75767
75865
|
await params.typingSignals.signalTextDelta(text);
|
|
75768
|
-
|
|
75769
|
-
|
|
75770
|
-
|
|
75771
|
-
|
|
75772
|
-
|
|
75773
|
-
|
|
75774
|
-
|
|
75775
|
-
|
|
75776
|
-
|
|
75777
|
-
|
|
75778
|
-
|
|
75779
|
-
|
|
75780
|
-
|
|
75781
|
-
|
|
75782
|
-
|
|
75783
|
-
|
|
75784
|
-
|
|
75785
|
-
|
|
75786
|
-
|
|
75787
|
-
|
|
75788
|
-
|
|
75789
|
-
|
|
75790
|
-
|
|
75791
|
-
|
|
75792
|
-
|
|
75793
|
-
let lifecycleTerminalEmitted = false;
|
|
75794
|
-
try {
|
|
75795
|
-
const result = await runCliAgent({
|
|
75796
|
-
sessionId: params.followupRun.run.sessionId,
|
|
75797
|
-
sessionKey: params.sessionKey,
|
|
75798
|
-
agentId: params.followupRun.run.agentId,
|
|
75799
|
-
sessionFile: params.followupRun.run.sessionFile,
|
|
75800
|
-
workspaceDir: params.followupRun.run.workspaceDir,
|
|
75801
|
-
config: params.followupRun.run.config,
|
|
75802
|
-
prompt: params.commandBody,
|
|
75803
|
-
provider,
|
|
75804
|
-
model,
|
|
75805
|
-
thinkLevel: params.followupRun.run.thinkLevel,
|
|
75806
|
-
timeoutMs: params.followupRun.run.timeoutMs,
|
|
75807
|
-
runId,
|
|
75808
|
-
extraSystemPrompt: params.followupRun.run.extraSystemPrompt,
|
|
75809
|
-
ownerNumbers: params.followupRun.run.ownerNumbers,
|
|
75810
|
-
cliSessionId,
|
|
75811
|
-
images: params.opts?.images
|
|
75812
|
-
});
|
|
75813
|
-
const cliText = result.payloads?.[0]?.text?.trim();
|
|
75814
|
-
if (cliText) emitAgentEvent({
|
|
75815
|
-
runId,
|
|
75816
|
-
stream: "assistant",
|
|
75817
|
-
data: { text: cliText }
|
|
75818
|
-
});
|
|
75819
|
-
emitAgentEvent({
|
|
75820
|
-
runId,
|
|
75821
|
-
stream: "lifecycle",
|
|
75822
|
-
data: {
|
|
75823
|
-
phase: "end",
|
|
75824
|
-
startedAt,
|
|
75825
|
-
endedAt: Date.now()
|
|
75826
|
-
}
|
|
75827
|
-
});
|
|
75828
|
-
lifecycleTerminalEmitted = true;
|
|
75829
|
-
return result;
|
|
75830
|
-
} catch (err) {
|
|
75831
|
-
emitAgentEvent({
|
|
75832
|
-
runId,
|
|
75833
|
-
stream: "lifecycle",
|
|
75834
|
-
data: {
|
|
75835
|
-
phase: "error",
|
|
75836
|
-
startedAt,
|
|
75837
|
-
endedAt: Date.now(),
|
|
75838
|
-
error: String(err)
|
|
75839
|
-
}
|
|
75840
|
-
});
|
|
75841
|
-
lifecycleTerminalEmitted = true;
|
|
75842
|
-
throw err;
|
|
75843
|
-
} finally {
|
|
75844
|
-
if (!lifecycleTerminalEmitted) emitAgentEvent({
|
|
75845
|
-
runId,
|
|
75846
|
-
stream: "lifecycle",
|
|
75847
|
-
data: {
|
|
75848
|
-
phase: "error",
|
|
75849
|
-
startedAt,
|
|
75850
|
-
endedAt: Date.now(),
|
|
75851
|
-
error: "CLI run completed without lifecycle terminal event"
|
|
75852
|
-
}
|
|
75853
|
-
});
|
|
75854
|
-
}
|
|
75855
|
-
})();
|
|
75866
|
+
await onToolResult({
|
|
75867
|
+
text,
|
|
75868
|
+
mediaUrls: void 0
|
|
75869
|
+
});
|
|
75870
|
+
}).catch((err) => {
|
|
75871
|
+
logVerbose(`tool result delivery failed: ${String(err)}`);
|
|
75872
|
+
});
|
|
75873
|
+
const task = toolResultChain.finally(() => {
|
|
75874
|
+
params.pendingToolTasks.delete(task);
|
|
75875
|
+
});
|
|
75876
|
+
params.pendingToolTasks.add(task);
|
|
75877
|
+
} : void 0;
|
|
75878
|
+
while (true) try {
|
|
75879
|
+
const run = params.followupRun.run;
|
|
75880
|
+
const resolvedProvider = run.provider;
|
|
75881
|
+
const resolvedModel = run.model;
|
|
75882
|
+
if (isCliProvider(resolvedProvider, run.config)) {
|
|
75883
|
+
const startedAt = Date.now();
|
|
75884
|
+
notifyAgentRunStart();
|
|
75885
|
+
emitAgentEvent({
|
|
75886
|
+
runId,
|
|
75887
|
+
stream: "lifecycle",
|
|
75888
|
+
data: {
|
|
75889
|
+
phase: "start",
|
|
75890
|
+
startedAt
|
|
75856
75891
|
}
|
|
75857
|
-
|
|
75858
|
-
|
|
75859
|
-
|
|
75860
|
-
|
|
75861
|
-
|
|
75892
|
+
});
|
|
75893
|
+
const cliSessionId = getCliSessionId(params.getActiveSessionEntry(), resolvedProvider);
|
|
75894
|
+
let lifecycleTerminalEmitted = false;
|
|
75895
|
+
try {
|
|
75896
|
+
const cliResult = await runCliAgent({
|
|
75897
|
+
sessionId: run.sessionId,
|
|
75898
|
+
sessionKey: params.sessionKey,
|
|
75899
|
+
agentId: run.agentId,
|
|
75900
|
+
sessionFile: run.sessionFile,
|
|
75901
|
+
workspaceDir: run.workspaceDir,
|
|
75902
|
+
config: run.config,
|
|
75903
|
+
prompt: params.commandBody,
|
|
75904
|
+
provider: resolvedProvider,
|
|
75905
|
+
model: resolvedModel,
|
|
75906
|
+
thinkLevel: run.thinkLevel,
|
|
75907
|
+
timeoutMs: run.timeoutMs,
|
|
75908
|
+
runId,
|
|
75909
|
+
extraSystemPrompt: run.extraSystemPrompt,
|
|
75910
|
+
ownerNumbers: run.ownerNumbers,
|
|
75911
|
+
cliSessionId,
|
|
75912
|
+
images: params.opts?.images
|
|
75862
75913
|
});
|
|
75863
|
-
const
|
|
75864
|
-
|
|
75865
|
-
provider,
|
|
75866
|
-
model,
|
|
75914
|
+
const cliText = cliResult.payloads?.[0]?.text?.trim();
|
|
75915
|
+
if (cliText) emitAgentEvent({
|
|
75867
75916
|
runId,
|
|
75868
|
-
|
|
75917
|
+
stream: "assistant",
|
|
75918
|
+
data: { text: cliText }
|
|
75869
75919
|
});
|
|
75870
|
-
|
|
75871
|
-
|
|
75872
|
-
|
|
75873
|
-
|
|
75874
|
-
|
|
75875
|
-
|
|
75876
|
-
|
|
75877
|
-
|
|
75878
|
-
|
|
75879
|
-
|
|
75880
|
-
|
|
75881
|
-
|
|
75882
|
-
|
|
75883
|
-
|
|
75884
|
-
|
|
75885
|
-
|
|
75886
|
-
|
|
75887
|
-
|
|
75888
|
-
|
|
75889
|
-
|
|
75890
|
-
|
|
75891
|
-
|
|
75892
|
-
|
|
75893
|
-
|
|
75894
|
-
|
|
75895
|
-
|
|
75896
|
-
|
|
75897
|
-
|
|
75898
|
-
|
|
75899
|
-
|
|
75900
|
-
|
|
75901
|
-
|
|
75902
|
-
|
|
75903
|
-
|
|
75904
|
-
|
|
75905
|
-
|
|
75906
|
-
|
|
75907
|
-
|
|
75908
|
-
|
|
75909
|
-
|
|
75910
|
-
|
|
75911
|
-
|
|
75912
|
-
|
|
75913
|
-
|
|
75914
|
-
|
|
75915
|
-
|
|
75916
|
-
|
|
75917
|
-
|
|
75918
|
-
|
|
75919
|
-
|
|
75920
|
-
|
|
75921
|
-
|
|
75922
|
-
|
|
75923
|
-
|
|
75924
|
-
|
|
75925
|
-
|
|
75926
|
-
|
|
75927
|
-
|
|
75920
|
+
emitAgentEvent({
|
|
75921
|
+
runId,
|
|
75922
|
+
stream: "lifecycle",
|
|
75923
|
+
data: {
|
|
75924
|
+
phase: "end",
|
|
75925
|
+
startedAt,
|
|
75926
|
+
endedAt: Date.now()
|
|
75927
|
+
}
|
|
75928
|
+
});
|
|
75929
|
+
lifecycleTerminalEmitted = true;
|
|
75930
|
+
runResult = cliResult;
|
|
75931
|
+
break;
|
|
75932
|
+
} catch (err) {
|
|
75933
|
+
emitAgentEvent({
|
|
75934
|
+
runId,
|
|
75935
|
+
stream: "lifecycle",
|
|
75936
|
+
data: {
|
|
75937
|
+
phase: "error",
|
|
75938
|
+
startedAt,
|
|
75939
|
+
endedAt: Date.now(),
|
|
75940
|
+
error: String(err)
|
|
75941
|
+
}
|
|
75942
|
+
});
|
|
75943
|
+
lifecycleTerminalEmitted = true;
|
|
75944
|
+
throw err;
|
|
75945
|
+
} finally {
|
|
75946
|
+
if (!lifecycleTerminalEmitted) emitAgentEvent({
|
|
75947
|
+
runId,
|
|
75948
|
+
stream: "lifecycle",
|
|
75949
|
+
data: {
|
|
75950
|
+
phase: "error",
|
|
75951
|
+
startedAt,
|
|
75952
|
+
endedAt: Date.now(),
|
|
75953
|
+
error: "CLI run completed without lifecycle terminal event"
|
|
75954
|
+
}
|
|
75955
|
+
});
|
|
75956
|
+
}
|
|
75957
|
+
}
|
|
75958
|
+
params.opts?.onModelSelected?.({
|
|
75959
|
+
provider: resolvedProvider,
|
|
75960
|
+
model: resolvedModel,
|
|
75961
|
+
thinkLevel: run.thinkLevel
|
|
75962
|
+
});
|
|
75963
|
+
const toolResultFormat = (() => {
|
|
75964
|
+
const channel = resolveMessageChannel(params.sessionCtx.Surface, params.sessionCtx.Provider);
|
|
75965
|
+
return !channel || isMarkdownCapableMessageChannel(channel) ? "markdown" : "plain";
|
|
75966
|
+
})();
|
|
75967
|
+
const turnResult = await runAgentTurn({
|
|
75968
|
+
sessionId: run.sessionId,
|
|
75969
|
+
sessionKey: params.sessionKey ?? run.sessionKey ?? run.sessionId,
|
|
75970
|
+
agentId: run.agentId,
|
|
75971
|
+
workspaceDir: run.workspaceDir,
|
|
75972
|
+
agentDir: run.agentDir,
|
|
75973
|
+
config: run.config,
|
|
75974
|
+
skillsSnapshot: run.skillsSnapshot,
|
|
75975
|
+
prompt: params.commandBody,
|
|
75976
|
+
extraSystemPrompt: run.extraSystemPrompt,
|
|
75977
|
+
images: params.opts?.images,
|
|
75978
|
+
provider: resolvedProvider,
|
|
75979
|
+
modelId: resolvedModel,
|
|
75980
|
+
authProfileId: run.authProfileId,
|
|
75981
|
+
authProfileIdSource: run.authProfileIdSource,
|
|
75982
|
+
thinkLevel: run.thinkLevel,
|
|
75983
|
+
verboseLevel: run.verboseLevel,
|
|
75984
|
+
reasoningLevel: run.reasoningLevel,
|
|
75985
|
+
timeoutMs: run.timeoutMs,
|
|
75986
|
+
runId,
|
|
75987
|
+
abortSignal: params.opts?.abortSignal,
|
|
75988
|
+
toolResultFormat,
|
|
75989
|
+
ownerNumbers: run.ownerNumbers,
|
|
75990
|
+
enforceFinalTag: run.enforceFinalTag,
|
|
75991
|
+
execOverrides: run.execOverrides,
|
|
75992
|
+
bashElevated: run.bashElevated,
|
|
75993
|
+
suppressToolErrorWarnings: params.opts?.suppressToolErrorWarnings,
|
|
75994
|
+
blockReplyBreak: params.resolvedBlockStreamingBreak,
|
|
75995
|
+
blockReplyChunking: params.blockReplyChunking,
|
|
75996
|
+
retryOnTransientError: true,
|
|
75997
|
+
fallbackModels: resolveModelFallbackOptions(run).fallbacksOverride,
|
|
75998
|
+
channel: {
|
|
75999
|
+
messageChannel: resolveMessageChannel(params.sessionCtx.Surface, params.sessionCtx.Provider) ?? void 0,
|
|
76000
|
+
messageProvider: params.sessionCtx.Provider?.trim().toLowerCase() || void 0,
|
|
76001
|
+
agentAccountId: params.sessionCtx.AccountId,
|
|
76002
|
+
messageTo: params.sessionCtx.OriginatingTo ?? params.sessionCtx.To,
|
|
76003
|
+
messageThreadId: params.sessionCtx.MessageThreadId ?? void 0,
|
|
76004
|
+
groupId: resolveGroupSessionKey(params.sessionCtx)?.id,
|
|
76005
|
+
groupChannel: params.sessionCtx.GroupChannel?.trim() ?? params.sessionCtx.GroupSubject?.trim(),
|
|
76006
|
+
groupSpace: params.sessionCtx.GroupSpace?.trim() ?? void 0,
|
|
76007
|
+
senderId: params.sessionCtx.SenderId?.trim() || void 0,
|
|
76008
|
+
senderName: params.sessionCtx.SenderName?.trim() || void 0,
|
|
76009
|
+
senderUsername: params.sessionCtx.SenderUsername?.trim() || void 0,
|
|
76010
|
+
senderE164: params.sessionCtx.SenderE164?.trim() || void 0,
|
|
76011
|
+
senderIsOwner: run.senderIsOwner,
|
|
76012
|
+
currentChannelId: params.sessionCtx.CurrentChannelId,
|
|
76013
|
+
currentThreadTs: params.sessionCtx.CurrentThreadTs,
|
|
76014
|
+
hasRepliedRef: params.opts?.hasRepliedRef
|
|
76015
|
+
},
|
|
76016
|
+
callbacks: {
|
|
76017
|
+
onDelta: async (text) => {
|
|
76018
|
+
if (isSilentReplyPrefixText(text, SILENT_REPLY_TOKEN)) return;
|
|
76019
|
+
const { text: normalized, skip } = normalizeStreamingText({ text });
|
|
76020
|
+
if (skip || !normalized) return;
|
|
76021
|
+
await params.typingSignals.signalTextDelta(normalized);
|
|
76022
|
+
await params.opts?.onPartialReply?.({ text: normalized });
|
|
76023
|
+
},
|
|
76024
|
+
onToolStart: async (name) => {
|
|
76025
|
+
notifyAgentRunStart();
|
|
76026
|
+
await params.typingSignals.signalToolStart();
|
|
76027
|
+
await params.opts?.onToolStart?.({
|
|
76028
|
+
name,
|
|
76029
|
+
phase: "start"
|
|
76030
|
+
});
|
|
76031
|
+
},
|
|
76032
|
+
onToolResult: serializedOnToolResult,
|
|
76033
|
+
onThinking: params.typingSignals.shouldStartOnReasoning || params.opts?.onReasoningStream ? async (text) => {
|
|
76034
|
+
await params.typingSignals.signalReasoningDelta();
|
|
76035
|
+
await params.opts?.onReasoningStream?.({ text });
|
|
76036
|
+
} : void 0,
|
|
76037
|
+
onLifecycle: async (phase) => {
|
|
76038
|
+
if (phase === "start" || phase === "streaming") notifyAgentRunStart();
|
|
76039
|
+
},
|
|
76040
|
+
onBlockReply: params.opts?.onBlockReply ? async (payload) => {
|
|
76041
|
+
await createBlockReplyDeliveryHandler({
|
|
75928
76042
|
onBlockReply: params.opts.onBlockReply,
|
|
75929
76043
|
currentMessageId: params.sessionCtx.MessageSidFull ?? params.sessionCtx.MessageSid,
|
|
75930
76044
|
normalizeStreamingText,
|
|
@@ -75933,46 +76047,22 @@ async function runAgentTurnWithFallback(params) {
|
|
|
75933
76047
|
blockStreamingEnabled: params.blockStreamingEnabled,
|
|
75934
76048
|
blockReplyPipeline,
|
|
75935
76049
|
directlySentBlockKeys
|
|
75936
|
-
})
|
|
75937
|
-
|
|
75938
|
-
|
|
75939
|
-
|
|
75940
|
-
|
|
75941
|
-
|
|
75942
|
-
|
|
75943
|
-
|
|
75944
|
-
|
|
75945
|
-
|
|
75946
|
-
|
|
75947
|
-
if (skip) return;
|
|
75948
|
-
await params.typingSignals.signalTextDelta(text);
|
|
75949
|
-
await onToolResult({
|
|
75950
|
-
text,
|
|
75951
|
-
mediaUrls: payload.mediaUrls
|
|
75952
|
-
});
|
|
75953
|
-
}).catch((err) => {
|
|
75954
|
-
logVerbose(`tool result delivery failed: ${String(err)}`);
|
|
75955
|
-
});
|
|
75956
|
-
const task = toolResultChain.finally(() => {
|
|
75957
|
-
params.pendingToolTasks.delete(task);
|
|
75958
|
-
});
|
|
75959
|
-
params.pendingToolTasks.add(task);
|
|
75960
|
-
};
|
|
75961
|
-
})() : void 0
|
|
75962
|
-
});
|
|
76050
|
+
})(payload);
|
|
76051
|
+
} : void 0,
|
|
76052
|
+
onBlockReplyFlush: params.blockStreamingEnabled && blockReplyPipeline ? async () => {
|
|
76053
|
+
await blockReplyPipeline.flush({ force: true });
|
|
76054
|
+
} : void 0,
|
|
76055
|
+
onCompaction: () => {
|
|
76056
|
+
autoCompactionCompleted = true;
|
|
76057
|
+
},
|
|
76058
|
+
onAgentEvent: (evt) => {
|
|
76059
|
+
if (evt.stream !== "lifecycle") notifyAgentRunStart();
|
|
76060
|
+
}
|
|
75963
76061
|
}
|
|
75964
76062
|
});
|
|
75965
|
-
runResult =
|
|
75966
|
-
fallbackProvider =
|
|
75967
|
-
fallbackModel =
|
|
75968
|
-
fallbackAttempts = Array.isArray(fallbackResult.attempts) ? fallbackResult.attempts.map((attempt) => ({
|
|
75969
|
-
provider: String(attempt.provider ?? ""),
|
|
75970
|
-
model: String(attempt.model ?? ""),
|
|
75971
|
-
error: String(attempt.error ?? ""),
|
|
75972
|
-
reason: attempt.reason ? String(attempt.reason) : void 0,
|
|
75973
|
-
status: typeof attempt.status === "number" ? attempt.status : void 0,
|
|
75974
|
-
code: attempt.code ? String(attempt.code) : void 0
|
|
75975
|
-
})) : [];
|
|
76063
|
+
runResult = turnResult.rawResult;
|
|
76064
|
+
fallbackProvider = turnResult.provider;
|
|
76065
|
+
fallbackModel = turnResult.modelId;
|
|
75976
76066
|
const embeddedError = runResult.meta?.error;
|
|
75977
76067
|
if (embeddedError && isContextOverflowError(embeddedError.message) && !didResetAfterCompactionFailure && await params.resetSessionAfterCompactionFailure(embeddedError.message)) {
|
|
75978
76068
|
didResetAfterCompactionFailure = true;
|
|
@@ -76031,14 +76121,6 @@ async function runAgentTurnWithFallback(params) {
|
|
|
76031
76121
|
payload: { text: "⚠️ Session history was corrupted. I've reset the conversation - please try again!" }
|
|
76032
76122
|
};
|
|
76033
76123
|
}
|
|
76034
|
-
if (isTransientHttp && !didRetryTransientHttpError) {
|
|
76035
|
-
didRetryTransientHttpError = true;
|
|
76036
|
-
defaultRuntime.error(`Transient HTTP provider error before reply (${message}). Retrying once in ${TRANSIENT_HTTP_RETRY_DELAY_MS}ms.`);
|
|
76037
|
-
await new Promise((resolve) => {
|
|
76038
|
-
setTimeout(resolve, TRANSIENT_HTTP_RETRY_DELAY_MS);
|
|
76039
|
-
});
|
|
76040
|
-
continue;
|
|
76041
|
-
}
|
|
76042
76124
|
defaultRuntime.error(`Embedded agent failed before reply: ${message}`);
|
|
76043
76125
|
const trimmedMessage = (isTransientHttp ? sanitizeUserFacingText(message, { errorContext: true }) : message).replace(/\.\s*$/, "");
|
|
76044
76126
|
return {
|
|
@@ -76211,7 +76293,7 @@ async function runMemoryFlushIfNeeded(params) {
|
|
|
76211
76293
|
try {
|
|
76212
76294
|
await runWithModelFallback({
|
|
76213
76295
|
...resolveModelFallbackOptions(params.followupRun.run),
|
|
76214
|
-
run: (provider, model) => {
|
|
76296
|
+
run: async (provider, model) => {
|
|
76215
76297
|
const { authProfile, embeddedContext, senderContext } = buildEmbeddedRunContexts({
|
|
76216
76298
|
run: params.followupRun.run,
|
|
76217
76299
|
sessionCtx: params.sessionCtx,
|
|
@@ -76225,21 +76307,46 @@ async function runMemoryFlushIfNeeded(params) {
|
|
|
76225
76307
|
runId: flushRunId,
|
|
76226
76308
|
authProfile
|
|
76227
76309
|
});
|
|
76228
|
-
return
|
|
76229
|
-
|
|
76230
|
-
|
|
76231
|
-
|
|
76310
|
+
return (await runAgentTurn({
|
|
76311
|
+
sessionId: embeddedContext.sessionId,
|
|
76312
|
+
sessionKey: embeddedContext.sessionKey ?? embeddedContext.sessionId ?? "",
|
|
76313
|
+
workspaceDir: runBaseParams.workspaceDir,
|
|
76314
|
+
agentDir: runBaseParams.agentDir,
|
|
76315
|
+
config: runBaseParams.config ?? params.cfg,
|
|
76316
|
+
skillsSnapshot: runBaseParams.skillsSnapshot,
|
|
76232
76317
|
prompt: resolveMemoryFlushPromptForRun({
|
|
76233
76318
|
prompt: memoryFlushSettings.prompt,
|
|
76234
76319
|
cfg: params.cfg
|
|
76235
76320
|
}),
|
|
76236
76321
|
extraSystemPrompt: flushSystemPrompt,
|
|
76237
|
-
|
|
76238
|
-
|
|
76239
|
-
|
|
76240
|
-
|
|
76241
|
-
|
|
76242
|
-
|
|
76322
|
+
provider,
|
|
76323
|
+
modelId: model,
|
|
76324
|
+
authProfileId: runBaseParams.authProfileId,
|
|
76325
|
+
authProfileIdSource: runBaseParams.authProfileIdSource,
|
|
76326
|
+
thinkLevel: runBaseParams.thinkLevel,
|
|
76327
|
+
verboseLevel: runBaseParams.verboseLevel,
|
|
76328
|
+
reasoningLevel: runBaseParams.reasoningLevel,
|
|
76329
|
+
timeoutMs: runBaseParams.timeoutMs,
|
|
76330
|
+
runId: runBaseParams.runId,
|
|
76331
|
+
ownerNumbers: runBaseParams.ownerNumbers,
|
|
76332
|
+
enforceFinalTag: runBaseParams.enforceFinalTag,
|
|
76333
|
+
execOverrides: runBaseParams.execOverrides,
|
|
76334
|
+
bashElevated: runBaseParams.bashElevated,
|
|
76335
|
+
channel: {
|
|
76336
|
+
messageProvider: embeddedContext.messageProvider,
|
|
76337
|
+
agentAccountId: embeddedContext.agentAccountId,
|
|
76338
|
+
messageTo: embeddedContext.messageTo,
|
|
76339
|
+
messageThreadId: embeddedContext.messageThreadId,
|
|
76340
|
+
senderId: senderContext.senderId,
|
|
76341
|
+
senderName: senderContext.senderName,
|
|
76342
|
+
senderUsername: senderContext.senderUsername,
|
|
76343
|
+
senderE164: senderContext.senderE164,
|
|
76344
|
+
senderIsOwner: runBaseParams.senderIsOwner
|
|
76345
|
+
},
|
|
76346
|
+
callbacks: { onCompaction: () => {
|
|
76347
|
+
memoryCompactionCompleted = true;
|
|
76348
|
+
} }
|
|
76349
|
+
})).rawResult;
|
|
76243
76350
|
}
|
|
76244
76351
|
});
|
|
76245
76352
|
let memoryFlushCompactionCount = activeSessionEntry?.compactionCount ?? (params.sessionKey ? activeSessionStore?.[params.sessionKey]?.compactionCount : 0) ?? 0;
|
|
@@ -76554,81 +76661,73 @@ function createFollowupRunner(params) {
|
|
|
76554
76661
|
let fallbackProvider = queued.run.provider;
|
|
76555
76662
|
let fallbackModel = queued.run.model;
|
|
76556
76663
|
try {
|
|
76557
|
-
|
|
76558
|
-
|
|
76559
|
-
|
|
76560
|
-
|
|
76664
|
+
runResult = await runAgentTurn({
|
|
76665
|
+
sessionId: queued.run.sessionId,
|
|
76666
|
+
sessionKey: queued.run.sessionKey ?? queued.run.sessionId,
|
|
76667
|
+
workspaceDir: queued.run.workspaceDir,
|
|
76561
76668
|
agentDir: queued.run.agentDir,
|
|
76562
|
-
|
|
76563
|
-
|
|
76564
|
-
|
|
76565
|
-
|
|
76566
|
-
|
|
76567
|
-
|
|
76568
|
-
|
|
76569
|
-
|
|
76570
|
-
|
|
76571
|
-
|
|
76572
|
-
|
|
76573
|
-
|
|
76574
|
-
|
|
76575
|
-
|
|
76576
|
-
|
|
76577
|
-
|
|
76578
|
-
|
|
76579
|
-
|
|
76580
|
-
|
|
76581
|
-
|
|
76582
|
-
|
|
76583
|
-
|
|
76584
|
-
|
|
76585
|
-
|
|
76586
|
-
|
|
76587
|
-
|
|
76588
|
-
|
|
76589
|
-
|
|
76590
|
-
|
|
76591
|
-
|
|
76592
|
-
|
|
76593
|
-
|
|
76594
|
-
|
|
76595
|
-
|
|
76596
|
-
|
|
76597
|
-
|
|
76598
|
-
|
|
76599
|
-
runId,
|
|
76600
|
-
blockReplyBreak: queued.run.blockReplyBreak,
|
|
76601
|
-
onAgentEvent: (evt) => {
|
|
76602
|
-
if (evt.stream !== "compaction") return;
|
|
76603
|
-
if ((typeof evt.data.phase === "string" ? evt.data.phase : "") === "end") autoCompactionCompleted = true;
|
|
76604
|
-
}
|
|
76605
|
-
});
|
|
76606
|
-
}
|
|
76669
|
+
config: queued.run.config,
|
|
76670
|
+
skillsSnapshot: queued.run.skillsSnapshot,
|
|
76671
|
+
prompt: queued.prompt,
|
|
76672
|
+
extraSystemPrompt: queued.run.extraSystemPrompt,
|
|
76673
|
+
provider: queued.run.provider,
|
|
76674
|
+
modelId: queued.run.model,
|
|
76675
|
+
authProfileId: queued.run.authProfileId,
|
|
76676
|
+
authProfileIdSource: queued.run.authProfileIdSource,
|
|
76677
|
+
thinkLevel: queued.run.thinkLevel,
|
|
76678
|
+
verboseLevel: queued.run.verboseLevel,
|
|
76679
|
+
reasoningLevel: queued.run.reasoningLevel,
|
|
76680
|
+
timeoutMs: queued.run.timeoutMs,
|
|
76681
|
+
runId,
|
|
76682
|
+
ownerNumbers: queued.run.ownerNumbers,
|
|
76683
|
+
enforceFinalTag: queued.run.enforceFinalTag,
|
|
76684
|
+
execOverrides: queued.run.execOverrides,
|
|
76685
|
+
bashElevated: queued.run.bashElevated,
|
|
76686
|
+
suppressToolErrorWarnings: opts?.suppressToolErrorWarnings,
|
|
76687
|
+
blockReplyBreak: queued.run.blockReplyBreak,
|
|
76688
|
+
fallbackModels: resolveAgentModelFallbacksOverride(queued.run.config, resolveAgentIdFromSessionKey(queued.run.sessionKey)),
|
|
76689
|
+
channel: {
|
|
76690
|
+
messageProvider: queued.run.messageProvider,
|
|
76691
|
+
agentAccountId: queued.run.agentAccountId,
|
|
76692
|
+
messageTo: queued.originatingTo,
|
|
76693
|
+
messageThreadId: queued.originatingThreadId,
|
|
76694
|
+
groupId: queued.run.groupId,
|
|
76695
|
+
groupChannel: queued.run.groupChannel,
|
|
76696
|
+
groupSpace: queued.run.groupSpace,
|
|
76697
|
+
senderId: queued.run.senderId,
|
|
76698
|
+
senderName: queued.run.senderName,
|
|
76699
|
+
senderUsername: queued.run.senderUsername,
|
|
76700
|
+
senderE164: queued.run.senderE164,
|
|
76701
|
+
senderIsOwner: queued.run.senderIsOwner
|
|
76702
|
+
},
|
|
76703
|
+
callbacks: { onCompaction: () => {
|
|
76704
|
+
autoCompactionCompleted = true;
|
|
76705
|
+
} }
|
|
76607
76706
|
});
|
|
76608
|
-
|
|
76609
|
-
|
|
76610
|
-
fallbackModel = fallbackResult.model;
|
|
76707
|
+
fallbackProvider = runResult.provider;
|
|
76708
|
+
fallbackModel = runResult.modelId;
|
|
76611
76709
|
} catch (err) {
|
|
76612
76710
|
const message = err instanceof Error ? err.message : String(err);
|
|
76613
76711
|
defaultRuntime.error?.(`Followup agent failed before reply: ${message}`);
|
|
76614
76712
|
return;
|
|
76615
76713
|
}
|
|
76616
|
-
const
|
|
76617
|
-
const
|
|
76618
|
-
const
|
|
76714
|
+
const rawResult = runResult.rawResult;
|
|
76715
|
+
const usage = rawResult.meta?.agentMeta?.usage;
|
|
76716
|
+
const promptTokens = rawResult.meta?.agentMeta?.promptTokens;
|
|
76717
|
+
const modelUsed = rawResult.meta?.agentMeta?.model ?? fallbackModel ?? defaultModel;
|
|
76619
76718
|
const contextTokensUsed = agentCfgContextTokens ?? lookupContextTokens(modelUsed) ?? sessionEntry?.contextTokens ?? DEFAULT_CONTEXT_TOKENS;
|
|
76620
76719
|
if (storePath && sessionKey) await persistRunSessionUsage({
|
|
76621
76720
|
storePath,
|
|
76622
76721
|
sessionKey,
|
|
76623
76722
|
usage,
|
|
76624
|
-
lastCallUsage:
|
|
76723
|
+
lastCallUsage: rawResult.meta?.agentMeta?.lastCallUsage,
|
|
76625
76724
|
promptTokens,
|
|
76626
76725
|
modelUsed,
|
|
76627
76726
|
providerUsed: fallbackProvider,
|
|
76628
76727
|
contextTokensUsed,
|
|
76629
76728
|
logLabel: "followup"
|
|
76630
76729
|
});
|
|
76631
|
-
const payloadArray =
|
|
76730
|
+
const payloadArray = rawResult.payloads ?? [];
|
|
76632
76731
|
if (payloadArray.length === 0) return;
|
|
76633
76732
|
const sanitizedPayloads = payloadArray.flatMap((payload) => {
|
|
76634
76733
|
const text = payload.text;
|
|
@@ -76649,13 +76748,13 @@ function createFollowupRunner(params) {
|
|
|
76649
76748
|
replyToMode: resolveReplyToMode(queued.run.config, replyToChannel, queued.originatingAccountId, queued.originatingChatType),
|
|
76650
76749
|
replyToChannel
|
|
76651
76750
|
}),
|
|
76652
|
-
sentTexts:
|
|
76751
|
+
sentTexts: rawResult.messagingToolSentTexts ?? []
|
|
76653
76752
|
}),
|
|
76654
|
-
sentMediaUrls:
|
|
76753
|
+
sentMediaUrls: rawResult.messagingToolSentMediaUrls ?? []
|
|
76655
76754
|
});
|
|
76656
76755
|
const finalPayloads = shouldSuppressMessagingToolReplies({
|
|
76657
76756
|
messageProvider: queued.run.messageProvider,
|
|
76658
|
-
messagingToolSentTargets:
|
|
76757
|
+
messagingToolSentTargets: rawResult.messagingToolSentTargets,
|
|
76659
76758
|
originatingTo: queued.originatingTo,
|
|
76660
76759
|
accountId: queued.run.agentAccountId
|
|
76661
76760
|
}) ? [] : mediaFilteredPayloads;
|
|
@@ -76666,7 +76765,7 @@ function createFollowupRunner(params) {
|
|
|
76666
76765
|
sessionStore,
|
|
76667
76766
|
sessionKey,
|
|
76668
76767
|
storePath,
|
|
76669
|
-
lastCallUsage:
|
|
76768
|
+
lastCallUsage: rawResult.meta?.agentMeta?.lastCallUsage,
|
|
76670
76769
|
contextTokensUsed
|
|
76671
76770
|
});
|
|
76672
76771
|
if (queued.run.verboseLevel && queued.run.verboseLevel !== "off") {
|
|
@@ -77795,7 +77894,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
77795
77894
|
return;
|
|
77796
77895
|
}
|
|
77797
77896
|
try {
|
|
77798
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
77897
|
+
const { deliverOutboundPayloads } = await import("./deliver-BZ99UKQq.js").then((n) => n.n);
|
|
77799
77898
|
await deliverOutboundPayloads({
|
|
77800
77899
|
cfg: params.cfg,
|
|
77801
77900
|
channel,
|