@symerian/symi 2.6.37 → 2.6.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{accounts-BRw8yhIW.js → accounts-D1r2dq1t.js} +21 -21
- package/dist/{accounts-3dCrO3oZ.js → accounts-dRUMQQrB.js} +1 -1
- package/dist/{accounts-BuZxOb3B.js → accounts-wSphH5gv.js} +1 -1
- package/dist/{acp-cli-gr5XIPZf.js → acp-cli-ByYHYK_E.js} +4 -4
- package/dist/{active-listener-CfHHV2SU.js → active-listener-C3pfJhdC.js} +1 -1
- package/dist/{agent-scope-CpEJ0B88.js → agent-scope-D68_xfTL.js} +3 -3
- package/dist/{agents-BDKvA-fr.js → agents-BaNrmXzu.js} +4 -4
- package/dist/{agents.config-SvdnvFsa.js → agents.config-BOxmN33d.js} +1 -1
- package/dist/{agents.config-DP7J1Yxi.js → agents.config-C78DHdxT.js} +1 -1
- package/dist/{audio-preflight-xSDULLAj.js → audio-preflight-BuT_gIRW.js} +2 -2
- package/dist/{audio-preflight-COe9clRU.js → audio-preflight-CzQUZSUK.js} +7 -7
- package/dist/{audio-preflight-C40mKAp7.js → audio-preflight-DZ_2w4B5.js} +7 -7
- package/dist/{audio-preflight-BVaaZWkg.js → audio-preflight-UXg8r6a7.js} +30 -30
- package/dist/{audit-DCDNPsGr.js → audit-BxqTVyZo.js} +9 -9
- package/dist/{auth-choice-CinzPjY5.js → auth-choice-BnJzLsv5.js} +7 -7
- package/dist/{auth-choice-DeTIgQiQ.js → auth-choice-CnpKK0cS.js} +3 -3
- package/dist/{auth-choice-options-DOqFUoBo.js → auth-choice-options-DmQgUlhC.js} +1 -1
- package/dist/{auth-choice-prompt-BLzEBA1v.js → auth-choice-prompt-Cn6U3t8O.js} +1 -1
- package/dist/{auth-profiles-DdK1Hxaa.js → auth-profiles-CZZjOpX8.js} +18 -18
- package/dist/{banner-DlzlZSHv.js → banner-DdpNhjX6.js} +1 -1
- package/dist/{bindings-BsHoBLIE.js → bindings-Bat2RnAR.js} +2 -2
- package/dist/{bonjour-discovery-BHTF5p0X.js → bonjour-discovery-DUQ6tE92.js} +1 -1
- package/dist/{browser-cli-FNGt_E96.js → browser-cli-BrzYV9w9.js} +3 -3
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +58 -57
- package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
- package/dist/bundled/command-logger/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +59 -58
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-B6G1jnQT.js → channel-activity-Cm1OJRbv.js} +1 -1
- package/dist/{channel-options-38j3QjH3.js → channel-options-47wHx-rM.js} +2 -2
- package/dist/{channel-options-D7Lp2WmW.js → channel-options-CJE7N_QV.js} +1 -1
- package/dist/{channel-web-DoJWvCSG.js → channel-web-CVf8YV4M.js} +5 -5
- package/dist/{channels-cli-CMMBVrwz.js → channels-cli-CMLy_xVT.js} +7 -6
- package/dist/{channels-cli-DmvAljR1.js → channels-cli-Iya7tcnY.js} +44 -43
- package/dist/{chrome-CDJYxX5a.js → chrome-CXbfCc20.js} +1 -1
- package/dist/{chrome-DkaXoP36.js → chrome-D0sqCqXY.js} +21 -21
- package/dist/{chunk-09egQapi.js → chunk-B9x_1qSr.js} +1 -1
- package/dist/{clack-prompter-B7pN13HV.js → clack-prompter-DMuVyYP2.js} +3 -3
- package/dist/{cli-D9LYX6lB.js → cli-DmGUr8aj.js} +4 -3
- package/dist/{cli-Cd4B5FyU.js → cli-dC-CEeDc.js} +27 -26
- package/dist/{command-registry-CARx8WBf.js → command-registry-DSV-4T7A.js} +9 -9
- package/dist/{commands-registry-Bfc7Uz0o.js → commands-registry-DPf4J7nj.js} +4 -4
- package/dist/{commands-registry-C_aYUwpl.js → commands-registry-DYoNKo_h.js} +1 -1
- package/dist/{completion-cli-DCO3bMjl.js → completion-cli-DjQVuJdD.js} +2 -2
- package/dist/{completion-cli-LYcBopv1.js → completion-cli-dlL2VvFw.js} +1 -1
- package/dist/{config-BmV60pPT.js → config-DBqxAhpU.js} +1 -1
- package/dist/{config-cli-BCiQhEoA.js → config-cli-Cm4KwczC.js} +1 -1
- package/dist/{config-cli-9rTAv29s.js → config-cli-DLFKoU1U.js} +1 -1
- package/dist/{config-5SdHIcHU.js → config-giEDOxub.js} +12 -12
- package/dist/{config-guard-BflmO0t7.js → config-guard--WfHrCVe.js} +6 -6
- package/dist/{configure-BeKcXpvL.js → configure-BbFd3c68.js} +5 -5
- package/dist/{configure-RmJWWP1i.js → configure-DNRNOqKI.js} +20 -20
- package/dist/{control-service-Bz7rxLWq.js → control-service-Dtn-qw2s.js} +2 -2
- package/dist/control-ui/js/app.js +16 -5
- package/dist/control-ui/js/render.js +24 -35
- package/dist/{cron-cli-KYTOQ6d9.js → cron-cli-Bml4UNHa.js} +3 -3
- package/dist/{daemon-cli-CJJ8Vueq.js → daemon-cli-BPHe9wOW.js} +11 -11
- package/dist/{daemon-runtime-2mwX-jqj.js → daemon-runtime-COZ4usfy.js} +2 -2
- package/dist/{deliver-C46-vyqg.js → deliver-BY58QnO8.js} +20 -20
- package/dist/{deliver-BH0l3UKW.js → deliver-DepjYu87.js} +2 -2
- package/dist/{deliver-CWR_98sK.js → deliver-DrFtaFZt.js} +3 -3
- package/dist/{devices-cli-j0f38zcG.js → devices-cli-texa_iUV.js} +1 -1
- package/dist/{diagnostic-DjBRPfu9.js → diagnostic-CH0skkp6.js} +1 -1
- package/dist/{diagnostic-rPhsBoZz.js → diagnostic-DIKKFHpP.js} +2 -2
- package/dist/{diagnostics-BAMlsVVX.js → diagnostics-BRwihzJG.js} +1 -1
- package/dist/{directory-cli-CpUByQew.js → directory-cli-BRMi7Alb.js} +3 -3
- package/dist/{dns-cli-Beyzdh3S.js → dns-cli-BsRMpavf.js} +2 -2
- package/dist/{doctor-completion-CfPhNCUx.js → doctor-completion-Cm7WG43a.js} +2 -2
- package/dist/{doctor-completion-BlysSk9e.js → doctor-completion-Z_RXu40-.js} +1 -1
- package/dist/{doctor-config-flow-QnaBd8kL.js → doctor-config-flow-BTQvpBys.js} +4 -4
- package/dist/{enable-HSYin9n7.js → enable-vgRSCfxI.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{env-BDXYbTKj.js → env-xmBFQPBP.js} +1 -1
- package/dist/{exec-approvals-cli-2BfYmO4M.js → exec-approvals-cli-DxKAWA8Y.js} +7 -7
- package/dist/extensionAPI.js +20 -19
- package/dist/{fetch-Bso4i15F.js → fetch-Dnti0cFs.js} +1 -1
- package/dist/{frontmatter-CTR5f_Ez.js → frontmatter-CV0YkjoY.js} +2 -2
- package/dist/{gateway-cli-D2MuH-Vj.js → gateway-cli-DliBYmLu.js} +12 -11
- package/dist/{gateway-cli-B1AI4M7v.js → gateway-cli-Fnxgv97F.js} +74 -73
- package/dist/{gemini-auth-Dy12ZAH3.js → gemini-auth-C39f2zRe.js} +1 -1
- package/dist/{gemini-auth-CSlZZ1Pw.js → gemini-auth-ClVyOv9p.js} +1 -1
- package/dist/{github-copilot-token-cCYzSU9h.js → github-copilot-token-B8B2pmph.js} +7 -7
- package/dist/{glass-ui-ws-cB1R6KOh.js → glass-ui-ws-B0sH6QQi.js} +68 -51
- package/dist/{glass-ui-ws-xbRlW2Pz.js → glass-ui-ws-CfNTIb_g.js} +27 -10
- package/dist/{health-DjUN4OFC.js → health-9z0Hpkuc.js} +4 -4
- package/dist/{health-By4_Yu9p.js → health-NTpZ8ssG.js} +1 -1
- package/dist/{hooks-cli-BENuuN6Y.js → hooks-cli-C86OGnVu.js} +33 -32
- package/dist/{hooks-cli-CGrOzATb.js → hooks-cli-wq_uFJly.js} +5 -4
- package/dist/{hooks-status-BqLZtMLa.js → hooks-status-oUebZVnL.js} +2 -2
- package/dist/{image-D9uvDTrc.js → image-BwXkayiM.js} +1 -1
- package/dist/{image-CuzFLQWC.js → image-CKMw_vhe.js} +5 -5
- package/dist/{image-CHzdaNJ4.js → image-CjuJpc3E.js} +3 -3
- package/dist/{plugin-sdk/image-ops-BlQR__MN.js → image-ops-M5agStZn.js} +17 -17
- package/dist/index.js +42 -41
- package/dist/{inspect-CllGjsWo.js → inspect-CvbbCuoa.js} +2 -2
- package/dist/{install-safe-path-tCLiMpmO.js → install-safe-path-D3Uz77u7.js} +1 -1
- package/dist/{installs-C1Cebk97.js → installs-DQcRVF1U.js} +3 -3
- package/dist/{ir-CTiz95Vb.js → ir-Z9axTYHx.js} +4 -4
- package/dist/{lifecycle-core-D6LYXpFj.js → lifecycle-core-D0n_6gjJ.js} +6 -6
- package/dist/llm-slug-generator.js +58 -57
- package/dist/{local-roots-DhZz0Ybs.js → local-roots-Bh5xx9IO.js} +6 -6
- package/dist/{login-ul8zaw_S.js → login-2w0Q7Btb.js} +7 -7
- package/dist/{login-XprgoYoQ.js → login-CeXFO0OG.js} +2 -2
- package/dist/{login-qr-AP9agO-i.js → login-qr-BJMvic1s.js} +12 -12
- package/dist/{login-qr-CUErSLXH.js → login-qr-BMIn_eOf.js} +3 -3
- package/dist/{login-qr-pbXdFORv.js → login-qr-CC0TE3ax.js} +1 -1
- package/dist/{login-dIlDkG4X.js → login-y9uojrfG.js} +1 -1
- package/dist/{logs-cli-C0FZokFv.js → logs-cli-Dld6m2xN.js} +2 -2
- package/dist/{manager-PprhCvO_.js → manager-BoLUtbg2.js} +22 -22
- package/dist/{manager-jpn5vRTY.js → manager-CgLdpXXM.js} +2 -2
- package/dist/{manifest-registry-yb7sAlu4.js → manifest-registry-0J48biqr.js} +19 -19
- package/dist/{markdown-tables-C-BmIap8.js → markdown-tables-DuRhvVpP.js} +1 -1
- package/dist/{memory-cli-Ca5r9AUb.js → memory-cli-CPONmMrJ.js} +1 -1
- package/dist/{message-channel-OlFBYAw8.js → message-channel-DwDSKGn4.js} +1 -1
- package/dist/{model-catalog-CqCsARJX.js → model-catalog-Bn0ffe1O.js} +3 -2
- package/dist/{model-catalog-DsFLN-ua.js → model-catalog-r6v4orfa.js} +3 -2
- package/dist/{model-picker-D5nCutGW.js → model-picker-D1J9kB3d.js} +1 -1
- package/dist/{model-picker-BzIRY_aM.js → model-picker-TnkH7DsN.js} +2 -2
- package/dist/{model-selection-BQCG9ah0.js → model-selection-B8QKPmTL.js} +1 -1
- package/dist/{models-D1mOj_fd.js → models-DfuMRKvu.js} +5 -5
- package/dist/{models-cli-DhanAXLt.js → models-cli-BJv-aMkH.js} +37 -37
- package/dist/{models-cli-Blg1YDNe.js → models-cli-FnD3ZD7s.js} +6 -6
- package/dist/{node-cli-DUi87xSB.js → node-cli-C8xs7jkn.js} +16 -16
- package/dist/{node-service-Cxz4e-Qd.js → node-service-CD47Qpf1.js} +2 -2
- package/dist/{nodes-cli-wgJi8nLG.js → nodes-cli-_wKGGKvG.js} +6 -6
- package/dist/{note-DeHoW7xO.js → note-DQ9BvHF2.js} +1 -1
- package/dist/{npm-registry-spec-C2JDdSZS.js → npm-registry-spec-C0CPT3vr.js} +1 -1
- package/dist/{onboard-BKl9tvd9.js → onboard-A5dfwOyL.js} +17 -17
- package/dist/{onboard-DIjwRWbY.js → onboard-BSlbkbv-.js} +4 -4
- package/dist/{onboard-channels-wd_fR_EA.js → onboard-channels-CEZpwlsw.js} +6 -6
- package/dist/{onboard-channels-CW1DBHfJ.js → onboard-channels-DjqHX51z.js} +1 -1
- package/dist/{onboard-custom-BPvHqbtj.js → onboard-custom-BNyCb71p.js} +2 -2
- package/dist/{onboard-custom-DdWPfzJO.js → onboard-custom-yNOjvlgR.js} +1 -1
- package/dist/{onboard-helpers-Ci50bfCW.js → onboard-helpers-CAjcAisT.js} +2 -2
- package/dist/{onboard-hooks-BAA8CoVv.js → onboard-hooks-C3ok8kqB.js} +2 -2
- package/dist/{onboard-remote-I9QVs0MQ.js → onboard-remote-D-8pd-tx.js} +3 -3
- package/dist/{onboard-skills-DX7L1thH.js → onboard-skills-c4Rw-CGf.js} +3 -3
- package/dist/{onboarding-Ban5B7QD.js → onboarding-BTNiewJj.js} +15 -15
- package/dist/{onboarding-DnhVdzx6.js → onboarding-COqa6a28.js} +5 -5
- package/dist/{onboarding.finalize-QCZDp4AW.js → onboarding.finalize-CAax5IdL.js} +9 -8
- package/dist/{onboarding.finalize-YbnkoDuN.js → onboarding.finalize-CDsTN9zD.js} +40 -39
- package/dist/{onboarding.gateway-config-CJU7Hzrn.js → onboarding.gateway-config-DOna9Sr4.js} +3 -3
- package/dist/{openai-model-default-DMjQRsb1.js → openai-model-default-WqcGxyFM.js} +1 -1
- package/dist/{outbound-CtMCmwxR.js → outbound-B_wliV26.js} +8 -8
- package/dist/{outbound-3MZ12YrQ.js → outbound-BihTVvMr.js} +2 -2
- package/dist/{outbound-DB5Zus0-.js → outbound-DyBiNY4z.js} +1 -1
- package/dist/{outbound-attachment-DJldbweZ.js → outbound-attachment-BOy-OY4-.js} +2 -2
- package/dist/{pairing-cli-CBLfGvqW.js → pairing-cli-CpKm3M-X.js} +2 -2
- package/dist/{path-env-MnzRq6nD.js → path-env-BaQ2E7uD.js} +1 -1
- package/dist/paths-CYmyCDsE.js +212 -0
- package/dist/{paths-CbQV9WEg.js → paths-DEuVuViW.js} +1 -1
- package/dist/{pi-auth-json-CaX_1WHk.js → pi-auth-json-BQcKJvH0.js} +21 -2
- package/dist/{pi-auth-json-D6YbgrAe.js → pi-auth-json-BloyLEwh.js} +24 -9
- package/dist/{pi-auth-json-Bk8ERadJ.js → pi-auth-json-LXkL5WS_.js} +24 -11
- package/dist/pi-auth-json-zHckislA.js +133 -0
- package/dist/{pi-embedded-DG6dQt8v.js → pi-embedded-R_JHJFwq.js} +47 -45
- package/dist/{pi-embedded-helpers-lgx_U5KS.js → pi-embedded-helpers-BJrRH97f.js} +6 -6
- package/dist/{pi-embedded-helpers-CNPyv_ax.js → pi-embedded-helpers-BuVSLhG_.js} +1 -1
- package/dist/{pi-embedded-helpers-CfqDGQ9J.js → pi-embedded-helpers-Cr1X3W9i.js} +73 -73
- package/dist/{pi-tools.policy-CIDBbw6x.js → pi-tools.policy-C6MWZ59E.js} +1 -1
- package/dist/{plugin-auto-enable-BzX1uAKy.js → plugin-auto-enable-CP0nONRL.js} +2 -2
- package/dist/{plugin-registry-BdvMB68i.js → plugin-registry-DMUt9X9t.js} +1 -1
- package/dist/{plugin-registry-DfODDpUe.js → plugin-registry-DeT0nOee.js} +1 -1
- package/dist/plugin-sdk/{accounts-BtaOa4z_.js → accounts-BToL3HlP.js} +1 -1
- package/dist/plugin-sdk/{accounts-Ddm33hQm.js → accounts-D9zGZU5t.js} +3 -3
- package/dist/plugin-sdk/{accounts-s-AdhXVR.js → accounts-Dtszw3Zn.js} +1 -1
- package/dist/plugin-sdk/{active-listener-BXYeALs0.js → active-listener-BRYwA2Ic.js} +1 -1
- package/dist/plugin-sdk/{agent-scope-CYYpcO9W.js → agent-scope-C3gMMKCU.js} +2 -2
- package/dist/plugin-sdk/agents/pi-auth-json.d.ts +12 -1
- package/dist/plugin-sdk/{api-key-rotation-D_sMvI5W.js → api-key-rotation-LTEeykrm.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-VpItkiy3.js → audio-preflight-JLsqSVmS.js} +24 -24
- package/dist/plugin-sdk/{bindings-C7hRtgYW.js → bindings-BbwoUGPx.js} +2 -2
- package/dist/plugin-sdk/{channel-activity-DoC1xtDu.js → channel-activity-Ji7f0gqq.js} +1 -1
- package/dist/plugin-sdk/{channel-web-DHcmAnVa.js → channel-web-BtuQPMkd.js} +22 -22
- package/dist/plugin-sdk/{chrome-B7RdxmJ0.js → chrome-cPabhZZ4.js} +3 -3
- package/dist/plugin-sdk/{chunk-Dw2XBYXv.js → chunk-jvk9axTQ.js} +1 -1
- package/dist/plugin-sdk/{command-format-GKSevep4.js → command-format-DSdvQ_M5.js} +1 -1
- package/dist/plugin-sdk/{commands-registry-COIaslGl.js → commands-registry-C9W8UWBh.js} +4 -4
- package/dist/plugin-sdk/{config-KlTNfkFF.js → config-XjK1L039.js} +9 -9
- package/dist/plugin-sdk/{deliver-BZ99UKQq.js → deliver-Clj5uUID.js} +10 -10
- package/dist/plugin-sdk/{diagnostic-05pm5Rxi.js → diagnostic-EyuCSUXO.js} +2 -2
- package/dist/plugin-sdk/{image-CLOPx7yW.js → image-CAA-0T17.js} +4 -4
- package/dist/{image-ops-C7CauEK8.js → plugin-sdk/image-ops-Bnp6LXEx.js} +2 -2
- package/dist/plugin-sdk/index.js +54 -53
- package/dist/plugin-sdk/{ir-BJ6BHE5b.js → ir-Fb3qpcis.js} +4 -4
- package/dist/plugin-sdk/{local-roots-BHLNSI8U.js → local-roots-Ckk1QfzI.js} +3 -3
- package/dist/plugin-sdk/{login-DQMXuxOk.js → login-Btqnuww9.js} +7 -7
- package/dist/plugin-sdk/{login-qr-BjVZSoCi.js → login-qr-Bxhch9R1.js} +9 -9
- package/dist/plugin-sdk/{manager-CBSBFuFz.js → manager-CJXUXj6F.js} +8 -8
- package/dist/plugin-sdk/{manifest-registry-CPnHl_K3.js → manifest-registry-B3ugY9-f.js} +1 -1
- package/dist/plugin-sdk/{markdown-tables-BoYFajMu.js → markdown-tables-Dfaqilz6.js} +1 -1
- package/dist/plugin-sdk/{message-channel-COTAJzHd.js → message-channel-BdI5Ra9S.js} +1 -1
- package/dist/plugin-sdk/{model-selection-CsbEfrS0.js → model-selection-DduIg_Yt.js} +5 -5
- package/dist/plugin-sdk/{outbound-B0e8KdaR.js → outbound-D_7ktHfW.js} +7 -7
- package/dist/plugin-sdk/{outbound-attachment-CnslKL38.js → outbound-attachment-DJ3CI92h.js} +2 -2
- package/dist/plugin-sdk/{pi-auth-json-qWi7ZIYV.js → pi-auth-json-CcR0OJ6f.js} +24 -9
- package/dist/plugin-sdk/{pi-embedded-helpers-CW630epe.js → pi-embedded-helpers-CDrcAlGW.js} +17 -17
- package/dist/plugin-sdk/{plugins-BNByVCIH.js → plugins-BbAvhC25.js} +4 -4
- package/dist/plugin-sdk/{pw-ai-CnbPIPY9.js → pw-ai-CJjlxWj7.js} +8 -8
- package/dist/plugin-sdk/{qmd-manager-CH0XbIHf.js → qmd-manager-C6GM0Qik.js} +4 -4
- package/dist/plugin-sdk/{registry-D0xTnUWt.js → registry--_pGht6S.js} +2 -2
- package/dist/{replies-LSmuwOhA.js → plugin-sdk/replies-DC9NI2KS.js} +3 -3
- package/dist/plugin-sdk/{reply-CeoL_D-u.js → reply-CnTdwks6.js} +81 -79
- package/dist/plugin-sdk/{reply-prefix-uxfMZW4p.js → reply-prefix-BHuV5t70.js} +1 -1
- package/dist/plugin-sdk/{resolve-outbound-target-BiyAyTWz.js → resolve-outbound-target-BkCUbYGV.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-B3CCBumQ.js → resolve-route-D3JH_D2N.js} +3 -3
- package/dist/plugin-sdk/{retry-CwQ_iIj8.js → retry-ilSJqnz9.js} +1 -1
- package/dist/plugin-sdk/{runner-CGBT7tgF.js → runner-CBq0_f-j.js} +11 -10
- package/dist/plugin-sdk/{send-pYqe432l.js → send-BditKDxK.js} +6 -6
- package/dist/plugin-sdk/{send-C5h_YxNb.js → send-BeO7M3pz.js} +7 -7
- package/dist/plugin-sdk/{send-CjOBB3Vo.js → send-CdJoYllr.js} +10 -10
- package/dist/plugin-sdk/{send-CRsR8-vO.js → send-u7SJPkmf.js} +10 -10
- package/dist/plugin-sdk/{send-B2CEnVLL.js → send-vTA7ntTD.js} +6 -6
- package/dist/plugin-sdk/{session-BsOrxiMj.js → session-t6hhaLPe.js} +4 -4
- package/dist/plugin-sdk/{skill-commands-ff_01_r3.js → skill-commands-D-rpF3bM.js} +5 -5
- package/dist/plugin-sdk/{skills-_yTP47Cd.js → skills-B1GeRYlu.js} +7 -7
- package/dist/plugin-sdk/{sqlite-CxAR5ttJ.js → sqlite-Cq_7Cg4E.js} +1 -1
- package/dist/plugin-sdk/{store-BdrNabcU.js → store-Do3t33-c.js} +2 -2
- package/dist/plugin-sdk/{subsystem-B2uDN3TV.js → subsystem-Coz2AgU8.js} +1 -1
- package/dist/plugin-sdk/{tables-DNwXwNFa.js → tables-DR0NmBeH.js} +1 -1
- package/dist/plugin-sdk/{target-errors-Paro1BjP.js → target-errors-B7YyMnIi.js} +2 -2
- package/dist/plugin-sdk/{thinking-CXqf7WTe.js → thinking-DCNUIAHY.js} +5 -5
- package/dist/plugin-sdk/{tokens-bC3UVmVH.js → tokens-CWMflosr.js} +1 -1
- package/dist/{tool-images-SqqWIT22.js → plugin-sdk/tool-images-D7Lno-TE.js} +2 -2
- package/dist/plugin-sdk/{tool-loop-detection-at_K42K7.js → tool-loop-detection-BAUvBvAO.js} +2 -2
- package/dist/plugin-sdk/web-BkK8fGjJ.js +66 -0
- package/dist/plugin-sdk/{whatsapp-actions-DfseosPO.js → whatsapp-actions-DifisvHY.js} +21 -21
- package/dist/{plugins-BzmbgY7s.js → plugins-Bkr5ZdYs.js} +9 -9
- package/dist/{plugins-cli-DMxHIMNz.js → plugins-cli-BCYM8B89.js} +5 -4
- package/dist/{plugins-cli-Dcd56Auo.js → plugins-cli-D85G3qZp.js} +34 -33
- package/dist/{program-CK6pb4lq.js → program-C4k7oBuC.js} +10 -9
- package/dist/{program-context-0dr-H7wo.js → program-context-CiGMAzyC.js} +40 -40
- package/dist/{prompt-select-styled-Bi9q87ml.js → prompt-select-styled-CYiMonwj.js} +28 -28
- package/dist/{prompt-select-styled-uYsTGG3x.js → prompt-select-styled-CoWkFI4l.js} +5 -5
- package/dist/{provider-auth-helpers-BC24Uzzu.js → provider-auth-helpers-B8RGFZit.js} +1 -1
- package/dist/{provider-auth-helpers-BUorkQUD.js → provider-auth-helpers-CfkQBpo7.js} +6 -6
- package/dist/{push-apns-BwHZ2F7j.js → push-apns-DM6nj062.js} +1 -1
- package/dist/{push-apns-BQckoz9S.js → push-apns-DmpUv3y4.js} +1 -1
- package/dist/{pw-ai-De-KR9_s.js → pw-ai-CS2tDZd2.js} +3 -3
- package/dist/{pw-ai-m0mj2KWK.js → pw-ai-Ch_WUbQZ.js} +11 -11
- package/dist/{qmd-manager-iDLSiI4Z.js → qmd-manager-8-Z3Cdpt.js} +7 -7
- package/dist/{register.agent-wv_0IcpN.js → register.agent-DX-OyYzL.js} +10 -9
- package/dist/{register.agent-Ffw952Cm.js → register.agent-DcvwdQXs.js} +50 -49
- package/dist/{register.configure-BMkj8T9e.js → register.configure-Bldjj3LP.js} +59 -58
- package/dist/{register.configure-BTKXkVgp.js → register.configure-DBaELzEM.js} +11 -10
- package/dist/{register.maintenance-CRu_hm_x.js → register.maintenance-DAwf6cHN.js} +11 -10
- package/dist/{register.maintenance-D1xEYvHY.js → register.maintenance-DVv8ljal.js} +52 -51
- package/dist/{register.message-f-91gZI8.js → register.message-ClKGIfK4.js} +30 -29
- package/dist/{register.message-DD5LEq6t.js → register.message-DUeR-Dz2.js} +5 -4
- package/dist/{register.onboard-BetMbk4D.js → register.onboard-DJEZcUm5.js} +9 -8
- package/dist/{register.onboard-BRTil6DH.js → register.onboard-DWrxbBr5.js} +44 -43
- package/dist/{register.setup-DX01Qmwr.js → register.setup-Ah9E7LHA.js} +9 -8
- package/dist/{register.setup-C0XLhwPd.js → register.setup-BDqhSgCz.js} +44 -43
- package/dist/{register.status-health-sessions-CMF93G-p.js → register.status-health-sessions-BJYemCHi.js} +6 -5
- package/dist/{register.status-health-sessions-Dqh15XbO.js → register.status-health-sessions-CMQS8zwA.js} +44 -43
- package/dist/{register.subclis-D_HoHaB7.js → register.subclis-Bb0yWevQ.js} +9 -9
- package/dist/{registry-DYq1AYOv.js → registry-UkL38jvt.js} +17 -17
- package/dist/{replies-ZYtI9jr0.js → replies-CM5QgPHM.js} +1 -1
- package/dist/{plugin-sdk/replies-LLcQL3w6.js → replies-CbeMv5WZ.js} +3 -3
- package/dist/{reply-CMb-m0ZJ.js → reply-YphHjxHp.js} +46 -44
- package/dist/{reply-prefix-DpqZu44Z.js → reply-prefix-ZnX2V-k9.js} +1 -1
- package/dist/{resolve-route-C4_I4GFI.js → resolve-route-gl0ZOOKR.js} +4 -4
- package/dist/{retry-BBVXkKBV.js → retry-D25Z8MVS.js} +1 -1
- package/dist/{routes-Ba9CUQ8M.js → routes-B1-BfEDm.js} +1 -1
- package/dist/{rpc-_E0CZJKf.js → rpc-gJOYujMj.js} +1 -1
- package/dist/{run-main-e6LI0zRf.js → run-main-CZI2Ne08.js} +17 -16
- package/dist/{runner-CU9l0uJh.js → runner-B2Y_5crX.js} +26 -25
- package/dist/{runner-BORIO-D3.js → runner-CW9KEL7W.js} +1 -1
- package/dist/{runner-DUBExAb5.js → runner-DKkSu9cc.js} +7 -6
- package/dist/{runner-BSzJIT-z.js → runner-DmM2HhB-.js} +2 -2
- package/dist/{sandbox-C-T6hOMv.js → sandbox-DAOxwUQm.js} +2 -2
- package/dist/{sandbox-cli-BllVdQzR.js → sandbox-cli-BV6FS0bK.js} +3 -3
- package/dist/{security-cli-BSZ1_9R3.js → security-cli-BA4AGkeh.js} +8 -8
- package/dist/{send-C1IYd3g7.js → send-BJTX03Bn.js} +1 -1
- package/dist/{send-DXW6mdgR.js → send-CB3dCCmE.js} +1 -1
- package/dist/{send-CvhXrdgS.js → send-CCNIWI2Z.js} +12 -12
- package/dist/{send-D-hWrHoH.js → send-CFzf_ab4.js} +1 -1
- package/dist/{send-DAN9hA5h.js → send-CPSKimCF.js} +8 -8
- package/dist/{send-DkfYiRx5.js → send-Cgcbuw8U.js} +1 -1
- package/dist/{send-C4Ucr8ep.js → send-DHWMRnPk.js} +3 -3
- package/dist/{send-CVMyYPQw.js → send-Dy8tsHUE.js} +7 -7
- package/dist/{send-DWYkPSUs.js → send-ZI2bG_Jc.js} +1 -1
- package/dist/{send-CQAKg_12.js → send-iUSZIdml.js} +7 -7
- package/dist/{send-BArQpbtx.js → send-iVPD3yf2.js} +1 -1
- package/dist/{send-DYj_o4_F.js → send-sgxdFZNy.js} +22 -22
- package/dist/{server-context-CEpFjqSk.js → server-context-CHYWo_TC.js} +3 -3
- package/dist/{server-methods-CZJHMB_M.js → server-methods-C3xXynlm.js} +7 -7
- package/dist/{server-methods-D5X0JrXg.js → server-methods-DJ3Bi-Xg.js} +25 -25
- package/dist/{server-node-events-BpNyybGF.js → server-node-events-Cgdwex4k.js} +5 -4
- package/dist/{server-node-events-Cu_8g2ws.js → server-node-events-DS50d7AK.js} +28 -27
- package/dist/{service-Cl74hx8J.js → service-osK70kTZ.js} +2 -2
- package/dist/{session-DtMfLMdP.js → session-BF9s_N2s.js} +1 -1
- package/dist/{session-DSU1vxxi.js → session-BTpKgzso.js} +8 -8
- package/dist/{session-cost-usage-UxUgrslM.js → session-cost-usage-BXAI7CNH.js} +1 -1
- package/dist/session-dirs-Dgz7kkUM.js +18 -0
- package/dist/{shared-BJvwnR5z.js → shared-DnmJ0ABB.js} +2 -2
- package/dist/{skill-commands-DklY7Cj7.js → skill-commands-D8RiKDh0.js} +1 -1
- package/dist/{skill-commands-DcVwOafC.js → skill-commands-HBkNllDU.js} +16 -16
- package/dist/{skills-Bs0AW1g3.js → skills-CGHRETGF.js} +24 -24
- package/dist/{skills-cli-BZTBLQTt.js → skills-cli-C-URp1av.js} +5 -5
- package/dist/{skills-install-D67isO1L.js → skills-install-CWVdJkLn.js} +4 -4
- package/dist/{skills-status-CURJKnyY.js → skills-status-C3ptXwnh.js} +1 -1
- package/dist/{sqlite-D_mz1_-y.js → sqlite-JHY-uOmS.js} +16 -16
- package/dist/{status-CXib3MSE.js → status-0aNBSe72.js} +16 -16
- package/dist/{status-iJUy8byq.js → status-2KD2q2sn.js} +1 -1
- package/dist/{status-C2iQbl7T.js → status-BBnhTX-n.js} +1 -1
- package/dist/{status-CL1xQrpW.js → status-D9uWA9pU.js} +2 -2
- package/dist/{status.update-DtwCUTf-.js → status.update-DP0OFqyb.js} +1 -1
- package/dist/{store-01F_JM7O.js → store-Ea3zM6xK.js} +6 -6
- package/dist/{subagent-registry-Cdiios3w.js → subagent-registry-aZczbtLM.js} +8 -6
- package/dist/{subsystem-BjyjJF-d.js → subsystem-DN75fnEF.js} +1 -1
- package/dist/{system-cli-C4A3Udil.js → system-cli-BXewgTZR.js} +3 -112
- package/dist/system-run-command-B_qw8CXP.js +93 -0
- package/dist/{systemd-riq8uNJQ.js → systemd-DT6SbCim.js} +1 -1
- package/dist/{systemd-hints-BR6gChwm.js → systemd-hints-DZH9qY5W.js} +4 -4
- package/dist/{systemd-linger-aQ75ZlXY.js → systemd-linger-DCskIKcx.js} +2 -2
- package/dist/{tables-qMwbq29u.js → tables-Dkg9O8rv.js} +2 -2
- package/dist/{target-errors-Bbr9rlzN.js → target-errors-Pr77jao5.js} +2 -2
- package/dist/{thinking-BprCy23Z.js → thinking-C9-JAUzD.js} +5 -5
- package/dist/{tokens-Bux9Y_xD.js → tokens-CCZl4YHT.js} +1 -1
- package/dist/{plugin-sdk/tool-images-HJ2sfZDV.js → tool-images-B1qVCntj.js} +2 -2
- package/dist/{tool-loop-detection-DR_rrIA1.js → tool-loop-detection-C33wf43N.js} +3 -3
- package/dist/{tui-D14a9N3F.js → tui-DLaU7tTx.js} +2 -2
- package/dist/{tui-cli-Bg4YuRSd.js → tui-cli-D-PVUsS5.js} +6 -6
- package/dist/{unified-runner-dSVvVx1y.js → unified-runner-hulABWDL.js} +237 -235
- package/dist/{update-rw7wJwHd.js → update-Ya0e-JnM.js} +1 -1
- package/dist/{update-check-CtckACbb.js → update-check-7EzEjSzb.js} +1 -1
- package/dist/{update-cli-CSWxJ-hA.js → update-cli-CnN_k3P1.js} +62 -61
- package/dist/{update-cli-B5q0ErXF.js → update-cli-DwGmFbPH.js} +11 -10
- package/dist/{update-runner-jvpPI7iP.js → update-runner-BkdQhkKR.js} +1 -1
- package/dist/{update-runner-BB5A0jnW.js → update-runner-dT5l0kuK.js} +3 -3
- package/dist/{web-BuHFfZp7.js → web-C0ZdaR6w.js} +24 -23
- package/dist/{web-DsdmLxAP.js → web-CJSRBiDm.js} +31 -30
- package/dist/{web-BsEbA9Ur.js → web-DPki9fDa.js} +4 -3
- package/dist/{web-DDmkA8-N.js → web-DpQ5RaFz.js} +63 -62
- package/dist/{webhooks-cli-cD58DWAE.js → webhooks-cli-iOLEyFdx.js} +1 -1
- package/dist/{whatsapp-actions-DvhI5-DC.js → whatsapp-actions-BW8P8Izy.js} +3 -3
- package/dist/{whatsapp-actions-DbcsdOH3.js → whatsapp-actions-BmcMtU_J.js} +1 -1
- package/dist/{whatsapp-actions-BIeSWsCF.js → whatsapp-actions-D_w4AfW9.js} +24 -24
- package/dist/{with-timeout-gmK6RciS.js → with-timeout-D2z7OkiK.js} +1 -1
- package/dist/{workspace-DscDraUb.js → workspace-DqJ5h-ZB.js} +27 -27
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/google-antigravity-auth/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/learning-loop/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +12 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +12 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +12 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/outlook/package.json +1 -1
- package/extensions/pipeline/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +12 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +12 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +12 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +12 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/dist/pi-auth-json-DhTX6MBO.js +0 -13
- package/dist/plugin-sdk/web-qmzvsQZn.js +0 -65
- /package/dist/{active-listener-1krIj9TM.js → active-listener-Dx_Y1ouV.js} +0 -0
- /package/dist/{active-listener-kvXhlgwu.js → active-listener-SKkHHqlN.js} +0 -0
- /package/dist/{allow-from-BZCKLkjL.js → allow-from-BIJVrwCW.js} +0 -0
- /package/dist/{argv-C6ovOie2.js → argv-B20UI_hB.js} +0 -0
- /package/dist/{auth-choice-legacy-Ch38-Kbr.js → auth-choice-legacy-aJ8D6F_s.js} +0 -0
- /package/dist/{auth-token-BnOynwk4.js → auth-token-Cay2jwzn.js} +0 -0
- /package/dist/{brew-DjNEjKAo.js → brew-DZPKCJr0.js} +0 -0
- /package/dist/{catalog-RiADx7MA.js → catalog-NQ4pj9RI.js} +0 -0
- /package/dist/{channel-selection-DuWs0Aak.js → channel-selection-V2xDgw16.js} +0 -0
- /package/dist/{channels-status-issues-B_kBkl_u.js → channels-status-issues-CJ0Vb_9z.js} +0 -0
- /package/dist/{clipboard-Cg3cin13.js → clipboard-BIyDbnnI.js} +0 -0
- /package/dist/{command-options-BtDai3oC.js → command-options-BkTXKWlb.js} +0 -0
- /package/dist/{command-poll-backoff-BiwOFDEK.js → command-poll-backoff-BGS2SHjF.js} +0 -0
- /package/dist/{command-poll-backoff-Bup9wS1y.js → command-poll-backoff-CaTOIqVn.js} +0 -0
- /package/dist/{config-ClSsetRi.js → config-DmMe1tf9.js} +0 -0
- /package/dist/{config-validation-CmimHAES.js → config-validation-BckiR0w9.js} +0 -0
- /package/dist/{constants-C8_BLnaW.js → constants-CafH8-8D.js} +0 -0
- /package/dist/{control-ui-assets-Z947tKLt.js → control-ui-assets-B7moDVHX.js} +0 -0
- /package/dist/{dangerous-tools-BL-M3lPt.js → dangerous-tools-BvU3-DRl.js} +0 -0
- /package/dist/{delivery-queue-CxuV9EeG.js → delivery-queue-CAxX6nGq.js} +0 -0
- /package/dist/{dm-policy-shared-Bh3TbexU.js → dm-policy-shared-DlDAGtZL.js} +0 -0
- /package/dist/{docs-cli-BpnEOtJi.js → docs-cli-qE-blOLC.js} +0 -0
- /package/dist/{entry-status-CAs6m3_l.js → entry-status-BOOmFr_b.js} +0 -0
- /package/dist/{exec-approvals-Kn31mBcW.js → exec-approvals-DXM2pQYL.js} +0 -0
- /package/dist/{fetch-timeout-DL3f_O53.js → fetch-timeout-Cj6kcyGt.js} +0 -0
- /package/dist/{format-yQZNwAF2.js → format-B0yJsjEo.js} +0 -0
- /package/dist/{gateway-rpc-5aGm8LwU.js → gateway-rpc-DiTk_nOl.js} +0 -0
- /package/dist/{gmail-setup-utils-Bv0M7ka7.js → gmail-setup-utils-Dq6vwkWW.js} +0 -0
- /package/dist/{health-format-DSwnXZPU.js → health-format-DRCaak6L.js} +0 -0
- /package/dist/{heartbeat-visibility-U4BL57eQ.js → heartbeat-visibility-ChEo5Zvk.js} +0 -0
- /package/dist/{helpers-By2rxBQ5.js → helpers-BtH6pa6c.js} +0 -0
- /package/dist/{helpers-BcGbMZD1.js → helpers-DnjQ73f_.js} +0 -0
- /package/dist/{inbound-context-DSDTl6Kj.js → inbound-context-Dvqh1Tgb.js} +0 -0
- /package/dist/{ipv4-CxY-xbsH.js → ipv4-CjlyK5jc.js} +0 -0
- /package/dist/{is-main-DrpmTCqv.js → is-main-CmNWsNFB.js} +0 -0
- /package/dist/{logging-BzzwiKjv.js → logging-KpicI3yD.js} +0 -0
- /package/dist/{model-param-b-BCRDjJEJ.js → model-param-b-Cp9d4e-0.js} +0 -0
- /package/dist/{node-match-CN8o4Vi3.js → node-match-CdUiymRU.js} +0 -0
- /package/dist/{nodes-screen-VBGXKdLk.js → nodes-screen-8Bq7DiSa.js} +0 -0
- /package/dist/{onboard-config-DPPsiC8t.js → onboard-config-B9jTl83d.js} +0 -0
- /package/dist/{outbound-attachment-mQQiYZ3C.js → outbound-attachment-Bw-c5Cdp.js} +0 -0
- /package/dist/{pairing-labels-2S6x2UoV.js → pairing-labels-DyXoD1DS.js} +0 -0
- /package/dist/{parse-log-line-BHCUQaF3.js → parse-log-line-DvYyTYq4.js} +0 -0
- /package/dist/{parse-port-Vm8F7Kus.js → parse-port-DnJYkByg.js} +0 -0
- /package/dist/{parse-timeout-C385GCpE.js → parse-timeout-2S5vp0-9.js} +0 -0
- /package/dist/{path-safety-BqPJ8DDQ.js → path-safety-D55Cxg8r.js} +0 -0
- /package/dist/{pi-model-discovery-Bv5YDJc8.js → pi-model-discovery-CuZX_Q4t.js} +0 -0
- /package/dist/plugin-sdk/{command-poll-backoff-CBq0jVRw.js → command-poll-backoff-Bug27PHS.js} +0 -0
- /package/dist/{plugins-allowlist-sArtGE-d.js → plugins-allowlist-BjKJrQ0e.js} +0 -0
- /package/dist/{polls-CCuCaqgv.js → polls-BKbIUHj7.js} +0 -0
- /package/dist/{ports-BX0kKI0g.js → ports-DtW62rqS.js} +0 -0
- /package/dist/{prompt-style-8JqOYj0q.js → prompt-style-CnkMpSXt.js} +0 -0
- /package/dist/{prompts-Xu2Sveka.js → prompts-CfOu9uZi.js} +0 -0
- /package/dist/{proxy-BaSHbVlA.js → proxy-CLEew2L6.js} +0 -0
- /package/dist/{proxy-CBJ1upuz.js → proxy-DVy9foH0.js} +0 -0
- /package/dist/{pw-ai-DqL87js3.js → pw-ai-C_1hRlOM.js} +0 -0
- /package/dist/{qmd-manager-D85GJrir.js → qmd-manager-CCUK1xoc.js} +0 -0
- /package/dist/{qmd-manager-Bx06p6nk.js → qmd-manager-qpFs_a6u.js} +0 -0
- /package/dist/{qr-cli-jd9LdZpq.js → qr-cli-9L-HExyH.js} +0 -0
- /package/dist/{render-CDCvpfhh.js → render-DwEu-aCr.js} +0 -0
- /package/dist/{runtime-guard-B37eizu-.js → runtime-guard-Dik20CVM.js} +0 -0
- /package/dist/{runtime-status-CR9445g5.js → runtime-status-D6c3G7my.js} +0 -0
- /package/dist/{session-DIBTkyvE.js → session-CINKYYDi.js} +0 -0
- /package/dist/{shared-Knv1hy6h.js → shared-CvNixzwn.js} +0 -0
- /package/dist/{skill-scanner-CLs8u6vQ.js → skill-scanner-hMtQbWPV.js} +0 -0
- /package/dist/{stagger-BUClb97_.js → stagger-CvFURHzt.js} +0 -0
- /package/dist/{status-BrV-afZE.js → status-klsFDD3M.js} +0 -0
- /package/dist/{table-BTgkRafz.js → table-BKlH0YlA.js} +0 -0
- /package/dist/{tool-loop-detection-DPVtQOfM.js → tool-loop-detection-DZQMPDma.js} +0 -0
- /package/dist/{tool-loop-detection-C7TCF2V2.js → tool-loop-detection-Dd4SFWb1.js} +0 -0
- /package/dist/{usage-format-BzKEDn0q.js → usage-format-BgUx3Bm4.js} +0 -0
- /package/dist/{widearea-dns-DzLerlJb.js → widearea-dns-CyVOLgNE.js} +0 -0
- /package/dist/{workspace-CYxdoAlY.js → workspace-B4H-2N8y.js} +0 -0
- /package/dist/{wsl-C4424szg.js → wsl-q8spwrME.js} +0 -0
|
@@ -1,76 +1,77 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-
|
|
2
|
+
import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-CYmyCDsE.js";
|
|
3
3
|
import { _ as isCronSessionKey, b as resolveThreadParentSessionKey, c as normalizeMainKey, d as sanitizeAgentId, f as DEFAULT_ACCOUNT_ID, g as isAcpSessionKey, h as getSubagentDepth, l as resolveAgentIdFromSessionKey, o as classifySessionKeyShape, p as normalizeAccountId$2, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID, u as resolveThreadSessionKeys, v as isSubagentSessionKey, y as parseAgentSessionKey } from "./session-key-BCzIW1Y2.js";
|
|
4
|
-
import { $ as warn, B as sleep$1, D as escapeRegExp, E as ensureDir$3, G as danger, I as resolveUserPath, J as logVerbose, M as normalizeE164, O as formatTerminalLink, R as shortenHomeInString, S as CONFIG_DIR, U as truncateUtf16Safe, V as sliceUtf16Safe, W as isPlainObject, X as setVerbose, Z as shouldLogVerbose, _ as matchPluginCommand, a as normalizeAnyChannelId, d as createPluginRegistry, dt as resolvePreferredSymiTmpDir, et as colorize, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, k as isRecord$1, l as requireActivePluginRegistry, lt as normalizeLogLevel, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, nt as theme, o as normalizeChannelId, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, rt as getChildLogger, tt as isRich, u as setActivePluginRegistry, v as createInternalHookEvent, w as clampInt, x as triggerInternalHook, z as shortenHomePath } from "./registry-
|
|
5
|
-
import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, d as resolveSessionAgentIds, i as resolveAgentModelFallbacksOverride, l as resolveEffectiveModelFallbacks, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId } from "./agent-scope-
|
|
6
|
-
import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-
|
|
7
|
-
import { S as logWarn, _ as runExec, b as logError, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, m as resolveSymiPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug } from "./workspace-
|
|
8
|
-
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-
|
|
9
|
-
import { $ as
|
|
10
|
-
import { n as formatCliCommand, r as resolveCliName, t as isTruthyEnvValue } from "./env-
|
|
11
|
-
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-
|
|
4
|
+
import { $ as warn, B as sleep$1, D as escapeRegExp, E as ensureDir$3, G as danger, I as resolveUserPath, J as logVerbose, M as normalizeE164, O as formatTerminalLink, R as shortenHomeInString, S as CONFIG_DIR, U as truncateUtf16Safe, V as sliceUtf16Safe, W as isPlainObject, X as setVerbose, Z as shouldLogVerbose, _ as matchPluginCommand, a as normalizeAnyChannelId, d as createPluginRegistry, dt as resolvePreferredSymiTmpDir, et as colorize, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, k as isRecord$1, l as requireActivePluginRegistry, lt as normalizeLogLevel, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, nt as theme, o as normalizeChannelId, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, rt as getChildLogger, tt as isRich, u as setActivePluginRegistry, v as createInternalHookEvent, w as clampInt, x as triggerInternalHook, z as shortenHomePath } from "./registry-UkL38jvt.js";
|
|
5
|
+
import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, d as resolveSessionAgentIds, i as resolveAgentModelFallbacksOverride, l as resolveEffectiveModelFallbacks, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId } from "./agent-scope-D68_xfTL.js";
|
|
6
|
+
import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-DN75fnEF.js";
|
|
7
|
+
import { S as logWarn, _ as runExec, b as logError, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, m as resolveSymiPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug } from "./workspace-DqJ5h-ZB.js";
|
|
8
|
+
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-DEuVuViW.js";
|
|
9
|
+
import { $ as resolveAuthProfileDisplayLabel, B as resolveApiKeyForProvider, C as normalizeProviderId, D as resolveModelRefFromString, E as resolveDefaultModelForAgent, F as OLLAMA_NATIVE_BASE_URL, G as getShellPathFromLoginShell, H as resolveModelAuthMode, I as createOllamaStreamFn, L as getApiKeyForModel, O as resolveSubagentSpawnModelSelection, Q as DEFAULT_PROVIDER, R as getCustomProviderApiKey, S as normalizeModelRef$2, T as resolveConfiguredModelRef, V as resolveEnvApiKey, W as normalizeSecretInput, X as DEFAULT_CONTEXT_TOKENS, Z as DEFAULT_MODEL, _ as buildConfiguredAllowlistKeys, a as markAuthProfileFailure, b as isCliProvider, c as dedupeProfileIds, d as ensureAuthProfileStore, et as resolveSymiAgentDir, f as resolveAuthStorePathForDisplay, g as buildAllowedModelSet, i as isProfileInCooldown, k as resolveThinkingDefault, l as listProfilesForProvider, n as resolveAuthProfileOrder, o as markAuthProfileUsed, p as withFileLock, q as resolveShellEnvFallbackTimeoutMs, r as getSoonestCooldownExpiry, s as resolveApiKeyForProfile, u as markAuthProfileGood, v as buildModelAliasIndex, x as modelKey, y as findNormalizedProviderValue, z as requireApiKey } from "./auth-profiles-CZZjOpX8.js";
|
|
10
|
+
import { n as formatCliCommand, r as resolveCliName, t as isTruthyEnvValue } from "./env-xmBFQPBP.js";
|
|
11
|
+
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-B8B2pmph.js";
|
|
12
12
|
import { t as parseBooleanValue$1 } from "./boolean-CE7i9tBR.js";
|
|
13
|
-
import { $ as normalizeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, G as updateLastRoute, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as isCacheEnabled, Jt as ensureSessionHeader, K as updateSessionStore, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as mergeDeliveryContext, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as deliveryContextFromSession, Xt as resolveBootstrapTotalMaxChars, Y as resolveCacheTtlMs$1, Yt as resolveBootstrapMaxChars, Z as deliveryContextKey, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as resolveFreshSessionTotalTokens, a as isMessagingToolDuplicateNormalized, at as extractToolCallNames, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as hasInterSessionUserProvenance, d as isAntigravityClaude, dt as evaluateSessionFreshness, et as normalizeSessionDeliveryFields, f as isGoogleModelApi, ft as resolveChannelResetConfig, g as formatBillingErrorMessage, gt as DEFAULT_RESET_TRIGGERS, h as formatAssistantErrorText, ht as resolveThreadFlag, it as countToolResults, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as normalizeInputProvenance, m as classifyFailoverReason, mt as resolveSessionResetType, n as validateGeminiTurns, nt as archiveSessionTranscripts, o as normalizeTextForComparison, ot as INPUT_PROVENANCE_KIND_VALUES, p as BILLING_ERROR_USER_MESSAGE, pt as resolveSessionResetPolicy, q as updateSessionStoreEntry, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as capArrayByJsonBytes, s as sanitizeSessionMessagesImages, st as applyInputProvenanceToUserMessage, t as validateAnthropicTurns, tt as normalizeAccountId$3, u as downgradeOpenAIReasoningBlocks, ut as resolveSessionKey, v as getApiErrorPayloadFingerprint, vt as canonicalizeMainSessionAlias, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-
|
|
14
|
-
import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-
|
|
15
|
-
import { a as applyTestPluginDefaults, c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, i as safeStatSync, n as discoverSymiPlugins, o as normalizePluginsConfig, r as isPathInside, s as resolveEnableState, t as loadPluginManifestRegistry, u as isPathInsideWithRealpath } from "./manifest-registry-
|
|
16
|
-
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
17
|
-
import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-
|
|
13
|
+
import { $ as normalizeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, G as updateLastRoute, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as isCacheEnabled, Jt as ensureSessionHeader, K as updateSessionStore, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as mergeDeliveryContext, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as deliveryContextFromSession, Xt as resolveBootstrapTotalMaxChars, Y as resolveCacheTtlMs$1, Yt as resolveBootstrapMaxChars, Z as deliveryContextKey, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as resolveFreshSessionTotalTokens, a as isMessagingToolDuplicateNormalized, at as extractToolCallNames, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as hasInterSessionUserProvenance, d as isAntigravityClaude, dt as evaluateSessionFreshness, et as normalizeSessionDeliveryFields, f as isGoogleModelApi, ft as resolveChannelResetConfig, g as formatBillingErrorMessage, gt as DEFAULT_RESET_TRIGGERS, h as formatAssistantErrorText, ht as resolveThreadFlag, it as countToolResults, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as normalizeInputProvenance, m as classifyFailoverReason, mt as resolveSessionResetType, n as validateGeminiTurns, nt as archiveSessionTranscripts, o as normalizeTextForComparison, ot as INPUT_PROVENANCE_KIND_VALUES, p as BILLING_ERROR_USER_MESSAGE, pt as resolveSessionResetPolicy, q as updateSessionStoreEntry, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as capArrayByJsonBytes, s as sanitizeSessionMessagesImages, st as applyInputProvenanceToUserMessage, t as validateAnthropicTurns, tt as normalizeAccountId$3, u as downgradeOpenAIReasoningBlocks, ut as resolveSessionKey, v as getApiErrorPayloadFingerprint, vt as canonicalizeMainSessionAlias, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-Cr1X3W9i.js";
|
|
14
|
+
import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-giEDOxub.js";
|
|
15
|
+
import { a as applyTestPluginDefaults, c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, i as safeStatSync, n as discoverSymiPlugins, o as normalizePluginsConfig, r as isPathInside, s as resolveEnableState, t as loadPluginManifestRegistry, u as isPathInsideWithRealpath } from "./manifest-registry-0J48biqr.js";
|
|
16
|
+
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-D0sqCqXY.js";
|
|
17
|
+
import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-CGHRETGF.js";
|
|
18
18
|
import { n as formatErrorMessage, r as formatUncaughtError } from "./errors-XIsvXeC-.js";
|
|
19
|
-
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-
|
|
19
|
+
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-M5agStZn.js";
|
|
20
20
|
import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-DpUUUgkK.js";
|
|
21
|
-
import { n as getMediaDir, r as saveMediaBuffer } from "./store-
|
|
22
|
-
import { _ as normalizeAtHashSlug, a as normalizeReasoningLevel, b as normalizeStringEntriesLower, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, g as resolveChannelGroupToolsPolicy, h as resolveChannelGroupRequireMention, i as normalizeElevatedLevel, l as resolveResponseUsageMode, m as resolveChannelGroupPolicy, n as formatXHighModelHint, o as normalizeThinkLevel, p as normalizeSignalMessagingTarget, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking, v as normalizeHyphenSlug, y as normalizeStringEntries } from "./thinking-
|
|
23
|
-
import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-
|
|
21
|
+
import { n as getMediaDir, r as saveMediaBuffer } from "./store-Ea3zM6xK.js";
|
|
22
|
+
import { _ as normalizeAtHashSlug, a as normalizeReasoningLevel, b as normalizeStringEntriesLower, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, g as resolveChannelGroupToolsPolicy, h as resolveChannelGroupRequireMention, i as normalizeElevatedLevel, l as resolveResponseUsageMode, m as resolveChannelGroupPolicy, n as formatXHighModelHint, o as normalizeThinkLevel, p as normalizeSignalMessagingTarget, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking, v as normalizeHyphenSlug, y as normalizeStringEntries } from "./thinking-C9-JAUzD.js";
|
|
23
|
+
import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-DwDSKGn4.js";
|
|
24
24
|
import { t as normalizeChatType } from "./chat-type-3FRbbjbq.js";
|
|
25
25
|
import { n as resolveConversationLabel } from "./conversation-label-Onz2hiJh.js";
|
|
26
|
-
import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, g as listEnabledDiscordAccounts, h as createDiscordActionGate, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackBotToken, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAppToken, r as normalizeChannelId$1, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-
|
|
27
|
-
import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-
|
|
28
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
29
|
-
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-
|
|
30
|
-
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-
|
|
31
|
-
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-
|
|
26
|
+
import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, g as listEnabledDiscordAccounts, h as createDiscordActionGate, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackBotToken, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAppToken, r as normalizeChannelId$1, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-Bkr5ZdYs.js";
|
|
27
|
+
import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-D1r2dq1t.js";
|
|
28
|
+
import { t as resolveIMessageAccount } from "./accounts-dRUMQQrB.js";
|
|
29
|
+
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-wSphH5gv.js";
|
|
30
|
+
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-Dy8tsHUE.js";
|
|
31
|
+
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-CCNIWI2Z.js";
|
|
32
32
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-BBh3Gsrx.js";
|
|
33
|
-
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-
|
|
34
|
-
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-
|
|
35
|
-
import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-
|
|
33
|
+
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-B1qVCntj.js";
|
|
34
|
+
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-BY58QnO8.js";
|
|
35
|
+
import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-DIKKFHpP.js";
|
|
36
36
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-Zw87xFym.js";
|
|
37
|
-
import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import { n as
|
|
41
|
-
import {
|
|
42
|
-
import { i as
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import { a as
|
|
47
|
-
import {
|
|
48
|
-
import { n as
|
|
49
|
-
import {
|
|
50
|
-
import { a as
|
|
51
|
-
import {
|
|
52
|
-
import { _ as
|
|
53
|
-
import { c as
|
|
54
|
-
import { r as
|
|
55
|
-
import {
|
|
56
|
-
import { n as
|
|
57
|
-
import { n as
|
|
58
|
-
import { n as
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import { a as
|
|
62
|
-
import {
|
|
63
|
-
import { t as
|
|
64
|
-
import {
|
|
65
|
-
import { t as
|
|
37
|
+
import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-CKMw_vhe.js";
|
|
38
|
+
import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-BQcKJvH0.js";
|
|
39
|
+
import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-CCZl4YHT.js";
|
|
40
|
+
import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normalizeAllowFromWithStore$1, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as formatLocationText, H as firstDefined$1, I as resolveTelegramReplyId, J as readChannelAllowFromStore, K as toLocationContext, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as listPairingChannels, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as isSenderIdAllowed, V as resolveSenderAllowMatch, W as mergeAllowFromSources, X as upsertChannelPairingRequest, Y as removeChannelAllowFromStoreEntry, Z as getPairingAdapter, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildGroupLabel, c as sendStickerTelegram, d as wasSentByBot, et as parseTelegramTarget, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as addChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as resolveTelegramTargetChatType, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-sgxdFZNy.js";
|
|
41
|
+
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-CuZX_Q4t.js";
|
|
42
|
+
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-ZnX2V-k9.js";
|
|
43
|
+
import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-BoLUtbg2.js";
|
|
44
|
+
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-JHY-uOmS.js";
|
|
45
|
+
import { n as retryAsync } from "./retry-D25Z8MVS.js";
|
|
46
|
+
import { a as createActionGate, c as jsonResult, d as readReactionParams, f as readStringArrayParam, l as parseAvailableTags, m as readStringParam, n as missingTargetError, o as imageResult, p as readStringOrNumberParam, r as unknownTargetError, s as imageResultFromFile, t as ambiguousTargetError, u as readNumberParam } from "./target-errors-Pr77jao5.js";
|
|
47
|
+
import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-B9x_1qSr.js";
|
|
48
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-DuRhvVpP.js";
|
|
49
|
+
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-Cj6kcyGt.js";
|
|
50
|
+
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-Bh5xx9IO.js";
|
|
51
|
+
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-Z9axTYHx.js";
|
|
52
|
+
import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-DPf4J7nj.js";
|
|
53
|
+
import { _ as CLI_OUTPUT_MAX_BUFFER, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as resolveMediaUnderstandingScope, h as normalizeMediaUnderstandingChatType, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveTimeoutMs$1, n as createMediaAttachmentCache, o as runCapability, p as resolveConcurrency, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as applyTemplate, y as registerUnhandledRejectionHandler } from "./runner-B2Y_5crX.js";
|
|
54
|
+
import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-HBkNllDU.js";
|
|
55
|
+
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-Dvqh1Tgb.js";
|
|
56
|
+
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-Dnti0cFs.js";
|
|
57
|
+
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-BGS2SHjF.js";
|
|
58
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-Cm1OJRbv.js";
|
|
59
|
+
import { n as normalizePollInput } from "./polls-BKbIUHj7.js";
|
|
60
|
+
import { t as convertMarkdownTables } from "./tables-Dkg9O8rv.js";
|
|
61
|
+
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-CPSKimCF.js";
|
|
62
|
+
import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-iUSZIdml.js";
|
|
63
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-gl0ZOOKR.js";
|
|
64
|
+
import { t as makeProxyFetch } from "./proxy-DVy9foH0.js";
|
|
65
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-CbeMv5WZ.js";
|
|
66
|
+
import { t as getActiveWebListener } from "./active-listener-C3pfJhdC.js";
|
|
66
67
|
import { createRequire } from "node:module";
|
|
67
68
|
import * as path$1 from "node:path";
|
|
68
69
|
import path from "node:path";
|
|
69
|
-
import
|
|
70
|
+
import fsSync, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
70
71
|
import os, { homedir } from "node:os";
|
|
71
72
|
import JSON5 from "json5";
|
|
72
|
-
import * as fs$
|
|
73
|
-
import fs
|
|
73
|
+
import * as fs$1 from "node:fs/promises";
|
|
74
|
+
import fs from "node:fs/promises";
|
|
74
75
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
75
76
|
import { inspect, promisify } from "node:util";
|
|
76
77
|
import { fileURLToPath } from "node:url";
|
|
@@ -80,7 +81,7 @@ import AjvPkg from "ajv";
|
|
|
80
81
|
import { CURRENT_SESSION_VERSION, DefaultResourceLoader, SessionManager, SettingsManager, codingTools, createAgentSession, createEditTool, createReadTool, createWriteTool, estimateTokens, generateSummary, readTool } from "@mariozechner/pi-coding-agent";
|
|
81
82
|
import { createServer } from "node:http";
|
|
82
83
|
import { ProxyAgent, fetch as fetch$1 } from "undici";
|
|
83
|
-
import WebSocket
|
|
84
|
+
import WebSocket, { WebSocket as WebSocket$1 } from "ws";
|
|
84
85
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
85
86
|
import { EdgeTTS } from "node-edge-tts";
|
|
86
87
|
import { createJiti } from "jiti";
|
|
@@ -3921,7 +3922,7 @@ async function resolveSymiDocsPath(params) {
|
|
|
3921
3922
|
const workspaceDir = params.workspaceDir?.trim();
|
|
3922
3923
|
if (workspaceDir) {
|
|
3923
3924
|
const workspaceDocs = path.join(workspaceDir, "docs");
|
|
3924
|
-
if (
|
|
3925
|
+
if (fsSync.existsSync(workspaceDocs)) return workspaceDocs;
|
|
3925
3926
|
}
|
|
3926
3927
|
const packageRoot = await resolveSymiPackageRoot({
|
|
3927
3928
|
cwd: params.cwd,
|
|
@@ -3930,7 +3931,7 @@ async function resolveSymiDocsPath(params) {
|
|
|
3930
3931
|
});
|
|
3931
3932
|
if (!packageRoot) return null;
|
|
3932
3933
|
const packageDocs = path.join(packageRoot, "docs");
|
|
3933
|
-
return
|
|
3934
|
+
return fsSync.existsSync(packageDocs) ? packageDocs : null;
|
|
3934
3935
|
}
|
|
3935
3936
|
|
|
3936
3937
|
//#endregion
|
|
@@ -4239,7 +4240,7 @@ async function getMemorySearchManager(params) {
|
|
|
4239
4240
|
if (cached) return { manager: cached };
|
|
4240
4241
|
}
|
|
4241
4242
|
try {
|
|
4242
|
-
const { QmdMemoryManager } = await import("./qmd-manager-
|
|
4243
|
+
const { QmdMemoryManager } = await import("./qmd-manager-8-Z3Cdpt.js");
|
|
4243
4244
|
const primary = await QmdMemoryManager.create({
|
|
4244
4245
|
cfg: params.cfg,
|
|
4245
4246
|
agentId: params.agentId,
|
|
@@ -4251,7 +4252,7 @@ async function getMemorySearchManager(params) {
|
|
|
4251
4252
|
const wrapper = new FallbackMemoryManager({
|
|
4252
4253
|
primary,
|
|
4253
4254
|
fallbackFactory: async () => {
|
|
4254
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
4255
|
+
const { MemoryIndexManager } = await import("./manager-BoLUtbg2.js").then((n) => n.t);
|
|
4255
4256
|
return await MemoryIndexManager.get(params);
|
|
4256
4257
|
}
|
|
4257
4258
|
}, () => QMD_MANAGER_CACHE.delete(cacheKey));
|
|
@@ -4264,7 +4265,7 @@ async function getMemorySearchManager(params) {
|
|
|
4264
4265
|
}
|
|
4265
4266
|
}
|
|
4266
4267
|
try {
|
|
4267
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
4268
|
+
const { MemoryIndexManager } = await import("./manager-BoLUtbg2.js").then((n) => n.t);
|
|
4268
4269
|
return { manager: await MemoryIndexManager.get(params) };
|
|
4269
4270
|
} catch (err) {
|
|
4270
4271
|
return {
|
|
@@ -6812,7 +6813,7 @@ async function recordLoopOutcome(args) {
|
|
|
6812
6813
|
if (!args.ctx?.sessionKey) return;
|
|
6813
6814
|
try {
|
|
6814
6815
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
|
|
6815
|
-
const { recordToolCallOutcome } = await import("./tool-loop-detection-
|
|
6816
|
+
const { recordToolCallOutcome } = await import("./tool-loop-detection-C33wf43N.js");
|
|
6816
6817
|
recordToolCallOutcome(getDiagnosticSessionState({
|
|
6817
6818
|
sessionKey: args.ctx.sessionKey,
|
|
6818
6819
|
sessionId: args.ctx?.agentId
|
|
@@ -6833,8 +6834,8 @@ async function runBeforeToolCallHook(args) {
|
|
|
6833
6834
|
const params = args.params;
|
|
6834
6835
|
if (args.ctx?.sessionKey) {
|
|
6835
6836
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
|
|
6836
|
-
const { logToolLoopAction } = await import("./diagnostic-
|
|
6837
|
-
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-
|
|
6837
|
+
const { logToolLoopAction } = await import("./diagnostic-DIKKFHpP.js").then((n) => n.n);
|
|
6838
|
+
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-C33wf43N.js");
|
|
6838
6839
|
const sessionState = getDiagnosticSessionState({
|
|
6839
6840
|
sessionKey: args.ctx.sessionKey,
|
|
6840
6841
|
sessionId: args.ctx?.agentId
|
|
@@ -7121,7 +7122,7 @@ function resolveDefaultIdentityPath() {
|
|
|
7121
7122
|
return path.join(resolveStateDir(), "identity", "device.json");
|
|
7122
7123
|
}
|
|
7123
7124
|
function ensureDir$2(filePath) {
|
|
7124
|
-
|
|
7125
|
+
fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
7125
7126
|
}
|
|
7126
7127
|
const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
|
|
7127
7128
|
function base64UrlEncode(buf) {
|
|
@@ -7157,8 +7158,8 @@ function generateIdentity() {
|
|
|
7157
7158
|
}
|
|
7158
7159
|
function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
7159
7160
|
try {
|
|
7160
|
-
if (
|
|
7161
|
-
const raw =
|
|
7161
|
+
if (fsSync.existsSync(filePath)) {
|
|
7162
|
+
const raw = fsSync.readFileSync(filePath, "utf8");
|
|
7162
7163
|
const parsed = JSON.parse(raw);
|
|
7163
7164
|
if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
|
|
7164
7165
|
const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
|
|
@@ -7167,9 +7168,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
7167
7168
|
...parsed,
|
|
7168
7169
|
deviceId: derivedId
|
|
7169
7170
|
};
|
|
7170
|
-
|
|
7171
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
|
|
7171
7172
|
try {
|
|
7172
|
-
|
|
7173
|
+
fsSync.chmodSync(filePath, 384);
|
|
7173
7174
|
} catch {}
|
|
7174
7175
|
return {
|
|
7175
7176
|
deviceId: derivedId,
|
|
@@ -7194,9 +7195,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
7194
7195
|
privateKeyPem: identity.privateKeyPem,
|
|
7195
7196
|
createdAtMs: Date.now()
|
|
7196
7197
|
};
|
|
7197
|
-
|
|
7198
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
|
|
7198
7199
|
try {
|
|
7199
|
-
|
|
7200
|
+
fsSync.chmodSync(filePath, 384);
|
|
7200
7201
|
} catch {}
|
|
7201
7202
|
return identity;
|
|
7202
7203
|
}
|
|
@@ -7219,7 +7220,7 @@ function normalizeFingerprint(input) {
|
|
|
7219
7220
|
const execFileAsync = promisify(execFile);
|
|
7220
7221
|
async function fileExists(filePath) {
|
|
7221
7222
|
try {
|
|
7222
|
-
await fs
|
|
7223
|
+
await fs.access(filePath);
|
|
7223
7224
|
return true;
|
|
7224
7225
|
} catch {
|
|
7225
7226
|
return false;
|
|
@@ -7246,8 +7247,8 @@ async function generateSelfSignedCert(params) {
|
|
|
7246
7247
|
"-subj",
|
|
7247
7248
|
"/CN=symi-gateway"
|
|
7248
7249
|
]);
|
|
7249
|
-
await fs
|
|
7250
|
-
await fs
|
|
7250
|
+
await fs.chmod(params.keyPath, 384).catch(() => {});
|
|
7251
|
+
await fs.chmod(params.certPath, 384).catch(() => {});
|
|
7251
7252
|
params.log?.info?.(`gateway tls: generated self-signed cert at ${shortenHomeInString(params.certPath)}`);
|
|
7252
7253
|
}
|
|
7253
7254
|
async function loadGatewayTlsRuntime(cfg, log) {
|
|
@@ -7285,9 +7286,9 @@ async function loadGatewayTlsRuntime(cfg, log) {
|
|
|
7285
7286
|
error: "gateway tls: cert/key missing"
|
|
7286
7287
|
};
|
|
7287
7288
|
try {
|
|
7288
|
-
const cert = await fs
|
|
7289
|
-
const key = await fs
|
|
7290
|
-
const ca = caPath ? await fs
|
|
7289
|
+
const cert = await fs.readFile(certPath, "utf8");
|
|
7290
|
+
const key = await fs.readFile(keyPath, "utf8");
|
|
7291
|
+
const ca = caPath ? await fs.readFile(caPath, "utf8") : void 0;
|
|
7291
7292
|
const fingerprintSha256 = normalizeFingerprint(new X509Certificate(cert).fingerprint256 ?? "");
|
|
7292
7293
|
if (!fingerprintSha256) return {
|
|
7293
7294
|
enabled: false,
|
|
@@ -7346,8 +7347,8 @@ function resolveDeviceAuthPath(env = process.env) {
|
|
|
7346
7347
|
}
|
|
7347
7348
|
function readStore(filePath) {
|
|
7348
7349
|
try {
|
|
7349
|
-
if (!
|
|
7350
|
-
const raw =
|
|
7350
|
+
if (!fsSync.existsSync(filePath)) return null;
|
|
7351
|
+
const raw = fsSync.readFileSync(filePath, "utf8");
|
|
7351
7352
|
const parsed = JSON.parse(raw);
|
|
7352
7353
|
if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
|
|
7353
7354
|
if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
|
|
@@ -7357,10 +7358,10 @@ function readStore(filePath) {
|
|
|
7357
7358
|
}
|
|
7358
7359
|
}
|
|
7359
7360
|
function writeStore(filePath, store) {
|
|
7360
|
-
|
|
7361
|
-
|
|
7361
|
+
fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
7362
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
|
|
7362
7363
|
try {
|
|
7363
|
-
|
|
7364
|
+
fsSync.chmodSync(filePath, 384);
|
|
7364
7365
|
} catch {}
|
|
7365
7366
|
}
|
|
7366
7367
|
function loadDeviceAuthToken(params) {
|
|
@@ -8667,7 +8668,7 @@ var GatewayClient = class {
|
|
|
8667
8668
|
if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
|
|
8668
8669
|
});
|
|
8669
8670
|
}
|
|
8670
|
-
this.ws = new WebSocket(url, wsOptions);
|
|
8671
|
+
this.ws = new WebSocket$1(url, wsOptions);
|
|
8671
8672
|
this.ws.on("open", () => {
|
|
8672
8673
|
if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
|
|
8673
8674
|
const tlsError = this.validateTlsFingerprint();
|
|
@@ -8886,7 +8887,7 @@ var GatewayClient = class {
|
|
|
8886
8887
|
return null;
|
|
8887
8888
|
}
|
|
8888
8889
|
async request(method, params, opts) {
|
|
8889
|
-
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
|
|
8890
|
+
if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
|
|
8890
8891
|
const id = randomUUID();
|
|
8891
8892
|
const frame = {
|
|
8892
8893
|
type: "req",
|
|
@@ -10152,7 +10153,7 @@ async function routeReply(params) {
|
|
|
10152
10153
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
10153
10154
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
10154
10155
|
try {
|
|
10155
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
10156
|
+
const { deliverOutboundPayloads } = await import("./deliver-BY58QnO8.js").then((n) => n.n);
|
|
10156
10157
|
return {
|
|
10157
10158
|
ok: true,
|
|
10158
10159
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -10548,7 +10549,7 @@ function normalizeSessionKey(value) {
|
|
|
10548
10549
|
}
|
|
10549
10550
|
function readSessionStore(storePath) {
|
|
10550
10551
|
try {
|
|
10551
|
-
const raw =
|
|
10552
|
+
const raw = fsSync.readFileSync(storePath, "utf-8");
|
|
10552
10553
|
const parsed = JSON5.parse(raw);
|
|
10553
10554
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
|
|
10554
10555
|
} catch {}
|
|
@@ -15389,7 +15390,7 @@ const MODEL_CACHE = /* @__PURE__ */ new Map();
|
|
|
15389
15390
|
await ensureSymiModelsJson(cfg);
|
|
15390
15391
|
} catch {}
|
|
15391
15392
|
try {
|
|
15392
|
-
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-
|
|
15393
|
+
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-CuZX_Q4t.js").then((n) => n.r);
|
|
15393
15394
|
const agentDir = resolveSymiAgentDir();
|
|
15394
15395
|
const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
|
|
15395
15396
|
applyDiscoveredContextWindows({
|
|
@@ -15607,7 +15608,7 @@ async function createModelSelectionState(params) {
|
|
|
15607
15608
|
}
|
|
15608
15609
|
}
|
|
15609
15610
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
15610
|
-
const { ensureAuthProfileStore } = await import("./auth-profiles-
|
|
15611
|
+
const { ensureAuthProfileStore } = await import("./auth-profiles-CZZjOpX8.js").then((n) => n.t);
|
|
15611
15612
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
15612
15613
|
const providerKey = normalizeProviderId(provider);
|
|
15613
15614
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -17980,8 +17981,8 @@ const DEFAULT_SAFE_BINS = [
|
|
|
17980
17981
|
];
|
|
17981
17982
|
function isExecutableFile(filePath) {
|
|
17982
17983
|
try {
|
|
17983
|
-
if (!
|
|
17984
|
-
if (process.platform !== "win32")
|
|
17984
|
+
if (!fsSync.statSync(filePath).isFile()) return false;
|
|
17985
|
+
if (process.platform !== "win32") fsSync.accessSync(filePath, fsSync.constants.X_OK);
|
|
17985
17986
|
return true;
|
|
17986
17987
|
} catch {
|
|
17987
17988
|
return false;
|
|
@@ -18019,7 +18020,7 @@ function normalizeMatchTarget(value) {
|
|
|
18019
18020
|
}
|
|
18020
18021
|
function tryRealpath(value) {
|
|
18021
18022
|
try {
|
|
18022
|
-
return
|
|
18023
|
+
return fsSync.realpathSync(value);
|
|
18023
18024
|
} catch {
|
|
18024
18025
|
return null;
|
|
18025
18026
|
}
|
|
@@ -19251,7 +19252,7 @@ function mergeLegacyAgent(current, legacy) {
|
|
|
19251
19252
|
}
|
|
19252
19253
|
function ensureDir$1(filePath) {
|
|
19253
19254
|
const dir = path.dirname(filePath);
|
|
19254
|
-
|
|
19255
|
+
fsSync.mkdirSync(dir, { recursive: true });
|
|
19255
19256
|
}
|
|
19256
19257
|
function coerceAllowlistEntries(allowlist) {
|
|
19257
19258
|
if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
|
|
@@ -19321,11 +19322,11 @@ function generateToken() {
|
|
|
19321
19322
|
function loadExecApprovals() {
|
|
19322
19323
|
const filePath = resolveExecApprovalsPath();
|
|
19323
19324
|
try {
|
|
19324
|
-
if (!
|
|
19325
|
+
if (!fsSync.existsSync(filePath)) return normalizeExecApprovals({
|
|
19325
19326
|
version: 1,
|
|
19326
19327
|
agents: {}
|
|
19327
19328
|
});
|
|
19328
|
-
const raw =
|
|
19329
|
+
const raw = fsSync.readFileSync(filePath, "utf8");
|
|
19329
19330
|
const parsed = JSON.parse(raw);
|
|
19330
19331
|
if (parsed?.version !== 1) return normalizeExecApprovals({
|
|
19331
19332
|
version: 1,
|
|
@@ -19342,9 +19343,9 @@ function loadExecApprovals() {
|
|
|
19342
19343
|
function saveExecApprovals(file) {
|
|
19343
19344
|
const filePath = resolveExecApprovalsPath();
|
|
19344
19345
|
ensureDir$1(filePath);
|
|
19345
|
-
|
|
19346
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
|
|
19346
19347
|
try {
|
|
19347
|
-
|
|
19348
|
+
fsSync.chmodSync(filePath, 384);
|
|
19348
19349
|
} catch {}
|
|
19349
19350
|
}
|
|
19350
19351
|
function ensureExecApprovals() {
|
|
@@ -19665,7 +19666,7 @@ function resolvePowerShellPath() {
|
|
|
19665
19666
|
const systemRoot = process.env.SystemRoot || process.env.WINDIR;
|
|
19666
19667
|
if (systemRoot) {
|
|
19667
19668
|
const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
|
|
19668
|
-
if (
|
|
19669
|
+
if (fsSync.existsSync(candidate)) return candidate;
|
|
19669
19670
|
}
|
|
19670
19671
|
return "powershell.exe";
|
|
19671
19672
|
}
|
|
@@ -19703,7 +19704,7 @@ function resolveShellFromPath(name) {
|
|
|
19703
19704
|
for (const entry of entries) {
|
|
19704
19705
|
const candidate = path.join(entry, name);
|
|
19705
19706
|
try {
|
|
19706
|
-
|
|
19707
|
+
fsSync.accessSync(candidate, fsSync.constants.X_OK);
|
|
19707
19708
|
return candidate;
|
|
19708
19709
|
} catch {}
|
|
19709
19710
|
}
|
|
@@ -20451,7 +20452,7 @@ async function resolveSandboxWorkdir(params) {
|
|
|
20451
20452
|
cwd: process.cwd(),
|
|
20452
20453
|
root: params.sandbox.workspaceDir
|
|
20453
20454
|
});
|
|
20454
|
-
if (!(await fs
|
|
20455
|
+
if (!(await fs.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
20455
20456
|
const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
|
|
20456
20457
|
const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
|
|
20457
20458
|
return {
|
|
@@ -21502,13 +21503,13 @@ async function validateScriptFileForShellBleed(params) {
|
|
|
21502
21503
|
cwd: params.workdir,
|
|
21503
21504
|
root: params.workdir
|
|
21504
21505
|
});
|
|
21505
|
-
stat = await fs
|
|
21506
|
+
stat = await fs.stat(absPath);
|
|
21506
21507
|
} catch {
|
|
21507
21508
|
return;
|
|
21508
21509
|
}
|
|
21509
21510
|
if (!stat.isFile()) return;
|
|
21510
21511
|
if (stat.size > 512 * 1024) return;
|
|
21511
|
-
const content = await fs
|
|
21512
|
+
const content = await fs.readFile(absPath, "utf-8");
|
|
21512
21513
|
const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
|
|
21513
21514
|
if (first) {
|
|
21514
21515
|
const idx = first.index;
|
|
@@ -22759,7 +22760,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
|
|
|
22759
22760
|
function hasGitMarker(repoRoot) {
|
|
22760
22761
|
const gitPath = path.join(repoRoot, ".git");
|
|
22761
22762
|
try {
|
|
22762
|
-
const stat =
|
|
22763
|
+
const stat = fsSync.statSync(gitPath);
|
|
22763
22764
|
return stat.isDirectory() || stat.isFile();
|
|
22764
22765
|
} catch {
|
|
22765
22766
|
return false;
|
|
@@ -22771,10 +22772,10 @@ function findGitRoot(startDir, opts = {}) {
|
|
|
22771
22772
|
function resolveGitDirFromMarker(repoRoot) {
|
|
22772
22773
|
const gitPath = path.join(repoRoot, ".git");
|
|
22773
22774
|
try {
|
|
22774
|
-
const stat =
|
|
22775
|
+
const stat = fsSync.statSync(gitPath);
|
|
22775
22776
|
if (stat.isDirectory()) return gitPath;
|
|
22776
22777
|
if (!stat.isFile()) return null;
|
|
22777
|
-
const match =
|
|
22778
|
+
const match = fsSync.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
|
|
22778
22779
|
if (!match?.[1]) return null;
|
|
22779
22780
|
return path.resolve(repoRoot, match[1].trim());
|
|
22780
22781
|
} catch {
|
|
@@ -22841,7 +22842,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
22841
22842
|
cachedCommit = null;
|
|
22842
22843
|
return cachedCommit;
|
|
22843
22844
|
}
|
|
22844
|
-
const head =
|
|
22845
|
+
const head = fsSync.readFileSync(headPath, "utf-8").trim();
|
|
22845
22846
|
if (!head) {
|
|
22846
22847
|
cachedCommit = null;
|
|
22847
22848
|
return cachedCommit;
|
|
@@ -22849,7 +22850,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
22849
22850
|
if (head.startsWith("ref:")) {
|
|
22850
22851
|
const ref = head.replace(/^ref:\s*/i, "").trim();
|
|
22851
22852
|
const refPath = path.resolve(path.dirname(headPath), ref);
|
|
22852
|
-
cachedCommit = formatCommit(
|
|
22853
|
+
cachedCommit = formatCommit(fsSync.readFileSync(refPath, "utf-8").trim());
|
|
22853
22854
|
return cachedCommit;
|
|
22854
22855
|
}
|
|
22855
22856
|
cachedCommit = formatCommit(head);
|
|
@@ -23053,9 +23054,9 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
|
|
|
23053
23054
|
} catch {
|
|
23054
23055
|
return;
|
|
23055
23056
|
}
|
|
23056
|
-
if (!
|
|
23057
|
+
if (!fsSync.existsSync(logPath)) return;
|
|
23057
23058
|
try {
|
|
23058
|
-
const lines =
|
|
23059
|
+
const lines = fsSync.readFileSync(logPath, "utf-8").split(/\n+/);
|
|
23059
23060
|
let input = 0;
|
|
23060
23061
|
let output = 0;
|
|
23061
23062
|
let promptTokens = 0;
|
|
@@ -24295,7 +24296,7 @@ function resolveRepoRoot(params) {
|
|
|
24295
24296
|
const configured = params.config?.agents?.defaults?.repoRoot?.trim();
|
|
24296
24297
|
if (configured) try {
|
|
24297
24298
|
const resolved = path.resolve(configured);
|
|
24298
|
-
if (
|
|
24299
|
+
if (fsSync.statSync(resolved).isDirectory()) return resolved;
|
|
24299
24300
|
} catch {}
|
|
24300
24301
|
const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
|
|
24301
24302
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -24614,7 +24615,7 @@ async function buildContextReply(params) {
|
|
|
24614
24615
|
//#region src/auto-reply/reply/commands-export-session.ts
|
|
24615
24616
|
const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
|
|
24616
24617
|
function loadTemplate(fileName) {
|
|
24617
|
-
return
|
|
24618
|
+
return fsSync.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
|
|
24618
24619
|
}
|
|
24619
24620
|
function generateHtml(sessionData) {
|
|
24620
24621
|
const template = loadTemplate("template.html");
|
|
@@ -24688,7 +24689,7 @@ async function buildExportSessionReply(params) {
|
|
|
24688
24689
|
} catch (err) {
|
|
24689
24690
|
return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
|
|
24690
24691
|
}
|
|
24691
|
-
if (!
|
|
24692
|
+
if (!fsSync.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
|
|
24692
24693
|
const sessionManager = SessionManager.open(sessionFile);
|
|
24693
24694
|
const entries = sessionManager.getEntries();
|
|
24694
24695
|
const header = sessionManager.getHeader();
|
|
@@ -24709,8 +24710,8 @@ async function buildExportSessionReply(params) {
|
|
|
24709
24710
|
const defaultFileName = `symi-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
|
|
24710
24711
|
const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
|
|
24711
24712
|
const outputDir = path.dirname(outputPath);
|
|
24712
|
-
if (!
|
|
24713
|
-
|
|
24713
|
+
if (!fsSync.existsSync(outputDir)) fsSync.mkdirSync(outputDir, { recursive: true });
|
|
24714
|
+
fsSync.writeFileSync(outputPath, html, "utf-8");
|
|
24714
24715
|
const relativePath = path.relative(params.workspaceDir, outputPath);
|
|
24715
24716
|
return { text: [
|
|
24716
24717
|
"✅ Session exported!",
|
|
@@ -24824,8 +24825,8 @@ function resolveZaiApiKey() {
|
|
|
24824
24825
|
}
|
|
24825
24826
|
try {
|
|
24826
24827
|
const authPath = path.join(os.homedir(), ".pi", "agent", "auth.json");
|
|
24827
|
-
if (!
|
|
24828
|
-
const data = JSON.parse(
|
|
24828
|
+
if (!fsSync.existsSync(authPath)) return;
|
|
24829
|
+
const data = JSON.parse(fsSync.readFileSync(authPath, "utf-8"));
|
|
24829
24830
|
return data["z-ai"]?.access || data.zai?.access;
|
|
24830
24831
|
} catch {
|
|
24831
24832
|
return;
|
|
@@ -26390,7 +26391,7 @@ function shouldPersistAnyBindingState() {
|
|
|
26390
26391
|
}
|
|
26391
26392
|
function shouldPersistBindingMutations() {
|
|
26392
26393
|
if (shouldPersistAnyBindingState()) return true;
|
|
26393
|
-
return
|
|
26394
|
+
return fsSync.existsSync(resolveThreadBindingsPath());
|
|
26394
26395
|
}
|
|
26395
26396
|
function saveBindingsToDisk(params = {}) {
|
|
26396
26397
|
if (!params.force && !shouldPersistAnyBindingState()) return;
|
|
@@ -27378,7 +27379,7 @@ const applyCostTotal = (totals, costTotal) => {
|
|
|
27378
27379
|
totals.totalCost += costTotal;
|
|
27379
27380
|
};
|
|
27380
27381
|
async function* readJsonlRecords(filePath) {
|
|
27381
|
-
const fileStream =
|
|
27382
|
+
const fileStream = fsSync.createReadStream(filePath, { encoding: "utf-8" });
|
|
27382
27383
|
const rl = readline.createInterface({
|
|
27383
27384
|
input: fileStream,
|
|
27384
27385
|
crlfDelay: Infinity
|
|
@@ -27450,10 +27451,10 @@ async function loadCostUsageSummary(params) {
|
|
|
27450
27451
|
const dailyMap = /* @__PURE__ */ new Map();
|
|
27451
27452
|
const totals = emptyTotals();
|
|
27452
27453
|
const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
|
|
27453
|
-
const entries = await
|
|
27454
|
+
const entries = await fsSync.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
27454
27455
|
const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
|
|
27455
27456
|
const filePath = path.join(sessionsDir, entry.name);
|
|
27456
|
-
const stats = await
|
|
27457
|
+
const stats = await fsSync.promises.stat(filePath).catch(() => null);
|
|
27457
27458
|
if (!stats) return null;
|
|
27458
27459
|
if (stats.mtimeMs < sinceTime) return null;
|
|
27459
27460
|
return filePath;
|
|
@@ -27486,7 +27487,7 @@ async function loadCostUsageSummary(params) {
|
|
|
27486
27487
|
}
|
|
27487
27488
|
async function loadSessionCostSummary(params) {
|
|
27488
27489
|
const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
|
|
27489
|
-
if (!sessionFile || !
|
|
27490
|
+
if (!sessionFile || !fsSync.existsSync(sessionFile)) return null;
|
|
27490
27491
|
const totals = emptyTotals();
|
|
27491
27492
|
let firstActivity;
|
|
27492
27493
|
let lastActivity;
|
|
@@ -29358,7 +29359,7 @@ async function handleCommands(params) {
|
|
|
29358
29359
|
try {
|
|
29359
29360
|
const messages = [];
|
|
29360
29361
|
if (sessionFile) {
|
|
29361
|
-
const content = await fs
|
|
29362
|
+
const content = await fs.readFile(sessionFile, "utf-8");
|
|
29362
29363
|
for (const line of content.split("\n")) {
|
|
29363
29364
|
if (!line.trim()) continue;
|
|
29364
29365
|
try {
|
|
@@ -31692,7 +31693,7 @@ function asBoolean(value) {
|
|
|
31692
31693
|
}
|
|
31693
31694
|
function resolveTempPathParts(opts) {
|
|
31694
31695
|
const tmpDir = opts.tmpDir ?? resolvePreferredSymiTmpDir();
|
|
31695
|
-
if (!opts.tmpDir)
|
|
31696
|
+
if (!opts.tmpDir) fsSync.mkdirSync(tmpDir, {
|
|
31696
31697
|
recursive: true,
|
|
31697
31698
|
mode: 448
|
|
31698
31699
|
});
|
|
@@ -31758,7 +31759,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
31758
31759
|
if (typeof contentLength === "number" && Number.isFinite(contentLength) && contentLength > MAX_CAMERA_URL_DOWNLOAD_BYTES) throw new Error(`writeUrlToFile: content-length ${contentLength} exceeds max ${MAX_CAMERA_URL_DOWNLOAD_BYTES}`);
|
|
31759
31760
|
const body = res.body;
|
|
31760
31761
|
if (!body) throw new Error(`failed to download ${url}: empty response body`);
|
|
31761
|
-
const fileHandle = await fs$
|
|
31762
|
+
const fileHandle = await fs$1.open(filePath, "w");
|
|
31762
31763
|
let bytes = 0;
|
|
31763
31764
|
let thrown;
|
|
31764
31765
|
try {
|
|
@@ -31777,7 +31778,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
31777
31778
|
await fileHandle.close();
|
|
31778
31779
|
}
|
|
31779
31780
|
if (thrown) {
|
|
31780
|
-
await fs$
|
|
31781
|
+
await fs$1.unlink(filePath).catch(() => {});
|
|
31781
31782
|
throw thrown;
|
|
31782
31783
|
}
|
|
31783
31784
|
return {
|
|
@@ -31787,7 +31788,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
31787
31788
|
}
|
|
31788
31789
|
async function writeBase64ToFile(filePath, base64) {
|
|
31789
31790
|
const buf = Buffer.from(base64, "base64");
|
|
31790
|
-
await fs$
|
|
31791
|
+
await fs$1.writeFile(filePath, buf);
|
|
31791
31792
|
return {
|
|
31792
31793
|
path: filePath,
|
|
31793
31794
|
bytes: buf.length
|
|
@@ -31853,7 +31854,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
31853
31854
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
|
|
31854
31855
|
throw new Error("jsonlPath outside allowed roots");
|
|
31855
31856
|
}
|
|
31856
|
-
const canonical = await fs
|
|
31857
|
+
const canonical = await fs.realpath(resolved).catch(() => resolved);
|
|
31857
31858
|
if (!isInboundPathAllowed({
|
|
31858
31859
|
filePath: canonical,
|
|
31859
31860
|
roots
|
|
@@ -31861,7 +31862,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
31861
31862
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
|
|
31862
31863
|
throw new Error("jsonlPath outside allowed roots");
|
|
31863
31864
|
}
|
|
31864
|
-
return await fs
|
|
31865
|
+
return await fs.readFile(canonical, "utf8");
|
|
31865
31866
|
}
|
|
31866
31867
|
const CanvasToolSchema = Type.Object({
|
|
31867
31868
|
action: stringEnum(CANVAS_ACTIONS),
|
|
@@ -32665,12 +32666,12 @@ function resolveRestartSentinelPath(env = process.env) {
|
|
|
32665
32666
|
}
|
|
32666
32667
|
async function writeRestartSentinel(payload, env = process.env) {
|
|
32667
32668
|
const filePath = resolveRestartSentinelPath(env);
|
|
32668
|
-
await fs
|
|
32669
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
32669
32670
|
const data = {
|
|
32670
32671
|
version: 1,
|
|
32671
32672
|
payload
|
|
32672
32673
|
};
|
|
32673
|
-
await fs
|
|
32674
|
+
await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
|
|
32674
32675
|
return filePath;
|
|
32675
32676
|
}
|
|
32676
32677
|
|
|
@@ -33485,7 +33486,7 @@ async function hydrateAttachmentPayload(params) {
|
|
|
33485
33486
|
accountId: params.accountId
|
|
33486
33487
|
}),
|
|
33487
33488
|
sandboxValidated: true,
|
|
33488
|
-
readFile: (filePath) => fs
|
|
33489
|
+
readFile: (filePath) => fs.readFile(filePath)
|
|
33489
33490
|
});
|
|
33490
33491
|
params.args.buffer = media.buffer.toString("base64");
|
|
33491
33492
|
if (!contentTypeParam && media.contentType) params.args.contentType = media.contentType;
|
|
@@ -36770,7 +36771,7 @@ function listExistingAgentIdsFromDisk() {
|
|
|
36770
36771
|
const root = resolveStateDir();
|
|
36771
36772
|
const agentsDir = path.join(root, "agents");
|
|
36772
36773
|
try {
|
|
36773
|
-
return
|
|
36774
|
+
return fsSync.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
|
|
36774
36775
|
} catch {
|
|
36775
36776
|
return [];
|
|
36776
36777
|
}
|
|
@@ -40638,18 +40639,18 @@ function appendImagePathsToPrompt(prompt, paths) {
|
|
|
40638
40639
|
return `${trimmed}${trimmed ? "\n\n" : ""}${paths.join("\n")}`;
|
|
40639
40640
|
}
|
|
40640
40641
|
async function writeCliImages(images) {
|
|
40641
|
-
const tempDir = await fs
|
|
40642
|
+
const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "symi-cli-images-"));
|
|
40642
40643
|
const paths = [];
|
|
40643
40644
|
for (let i = 0; i < images.length; i += 1) {
|
|
40644
40645
|
const image = images[i];
|
|
40645
40646
|
const ext = resolveImageExtension(image.mimeType);
|
|
40646
40647
|
const filePath = path.join(tempDir, `image-${i + 1}.${ext}`);
|
|
40647
40648
|
const buffer = Buffer.from(image.data, "base64");
|
|
40648
|
-
await fs
|
|
40649
|
+
await fs.writeFile(filePath, buffer, { mode: 384 });
|
|
40649
40650
|
paths.push(filePath);
|
|
40650
40651
|
}
|
|
40651
40652
|
const cleanup = async () => {
|
|
40652
|
-
await fs
|
|
40653
|
+
await fs.rm(tempDir, {
|
|
40653
40654
|
recursive: true,
|
|
40654
40655
|
force: true
|
|
40655
40656
|
});
|
|
@@ -41723,7 +41724,7 @@ async function runAgentTurnWithFallback(params) {
|
|
|
41723
41724
|
if (corruptedSessionId) {
|
|
41724
41725
|
const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
|
|
41725
41726
|
try {
|
|
41726
|
-
|
|
41727
|
+
fsSync.unlinkSync(transcriptPath);
|
|
41727
41728
|
} catch {}
|
|
41728
41729
|
}
|
|
41729
41730
|
delete params.activeSessionStore[sessionKey];
|
|
@@ -42439,9 +42440,9 @@ function auditPostCompactionReads(readFilePaths, workspaceDir, requiredReads = D
|
|
|
42439
42440
|
* Returns messages from the last N lines (default 100).
|
|
42440
42441
|
*/
|
|
42441
42442
|
function readSessionMessages(sessionFile, maxLines = 100) {
|
|
42442
|
-
if (!
|
|
42443
|
+
if (!fsSync.existsSync(sessionFile)) return [];
|
|
42443
42444
|
try {
|
|
42444
|
-
const recentLines =
|
|
42445
|
+
const recentLines = fsSync.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
|
|
42445
42446
|
const messages = [];
|
|
42446
42447
|
for (const line of recentLines) try {
|
|
42447
42448
|
const entry = JSON.parse(line);
|
|
@@ -42482,8 +42483,8 @@ const MAX_CONTEXT_CHARS = 3e3;
|
|
|
42482
42483
|
async function readPostCompactionContext(workspaceDir) {
|
|
42483
42484
|
const agentsPath = path.join(workspaceDir, "AGENTS.md");
|
|
42484
42485
|
try {
|
|
42485
|
-
if (!
|
|
42486
|
-
const sections = extractSections(await
|
|
42486
|
+
if (!fsSync.existsSync(agentsPath)) return null;
|
|
42487
|
+
const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
|
|
42487
42488
|
if (sections.length === 0) return null;
|
|
42488
42489
|
const combined = sections.join("\n\n");
|
|
42489
42490
|
return "[Post-compaction context refresh]\n\nSession was just compacted. The conversation summary above is a hint, NOT a substitute for your startup sequence. Execute your Session Startup sequence now — read the required files before responding to the user.\n\nCritical rules from AGENTS.md:\n\n" + (combined.length > MAX_CONTEXT_CHARS ? combined.slice(0, MAX_CONTEXT_CHARS) + "\n...[truncated]..." : combined);
|
|
@@ -42687,7 +42688,7 @@ async function runReplyAgent(params) {
|
|
|
42687
42688
|
if (resolved) transcriptCandidates.add(resolved);
|
|
42688
42689
|
transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
|
|
42689
42690
|
for (const candidate of transcriptCandidates) try {
|
|
42690
|
-
|
|
42691
|
+
fsSync.unlinkSync(candidate);
|
|
42691
42692
|
} catch {}
|
|
42692
42693
|
}
|
|
42693
42694
|
return true;
|
|
@@ -43593,7 +43594,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
43593
43594
|
return;
|
|
43594
43595
|
}
|
|
43595
43596
|
try {
|
|
43596
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
43597
|
+
const { deliverOutboundPayloads } = await import("./deliver-BY58QnO8.js").then((n) => n.n);
|
|
43597
43598
|
await deliverOutboundPayloads({
|
|
43598
43599
|
cfg: params.cfg,
|
|
43599
43600
|
channel,
|
|
@@ -43619,7 +43620,7 @@ function forkSessionFromParent(params) {
|
|
|
43619
43620
|
agentId: params.agentId,
|
|
43620
43621
|
sessionsDir: params.sessionsDir
|
|
43621
43622
|
});
|
|
43622
|
-
if (!parentSessionFile || !
|
|
43623
|
+
if (!parentSessionFile || !fsSync.existsSync(parentSessionFile)) return null;
|
|
43623
43624
|
try {
|
|
43624
43625
|
const manager = SessionManager.open(parentSessionFile);
|
|
43625
43626
|
const leafId = manager.getLeafId();
|
|
@@ -43643,7 +43644,7 @@ function forkSessionFromParent(params) {
|
|
|
43643
43644
|
cwd: manager.getCwd(),
|
|
43644
43645
|
parentSession: parentSessionFile
|
|
43645
43646
|
};
|
|
43646
|
-
|
|
43647
|
+
fsSync.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
|
|
43647
43648
|
return {
|
|
43648
43649
|
sessionId,
|
|
43649
43650
|
sessionFile
|
|
@@ -43968,7 +43969,7 @@ async function stageSandboxMedia(params) {
|
|
|
43968
43969
|
};
|
|
43969
43970
|
try {
|
|
43970
43971
|
const destDir = sandbox ? path.join(effectiveWorkspaceDir, "media", "inbound") : effectiveWorkspaceDir;
|
|
43971
|
-
await fs
|
|
43972
|
+
await fs.mkdir(destDir, { recursive: true });
|
|
43972
43973
|
const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
|
|
43973
43974
|
cfg,
|
|
43974
43975
|
accountId: ctx.AccountId
|
|
@@ -44018,7 +44019,7 @@ async function stageSandboxMedia(params) {
|
|
|
44018
44019
|
usedNames.add(fileName);
|
|
44019
44020
|
const dest = path.join(destDir, fileName);
|
|
44020
44021
|
if (ctx.MediaRemoteHost) await scpFile(ctx.MediaRemoteHost, source, dest);
|
|
44021
|
-
else await fs
|
|
44022
|
+
else await fs.copyFile(source, dest);
|
|
44022
44023
|
const stagedPath = sandbox ? path.posix.join("media", "inbound", fileName) : dest;
|
|
44023
44024
|
staged.set(source, stagedPath);
|
|
44024
44025
|
}
|
|
@@ -47038,8 +47039,8 @@ async function describeStickerImage(params) {
|
|
|
47038
47039
|
const { provider, model } = resolved;
|
|
47039
47040
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
47040
47041
|
try {
|
|
47041
|
-
const buffer = await fs
|
|
47042
|
-
const { describeImageWithModel } = await import("./image-
|
|
47042
|
+
const buffer = await fs.readFile(imagePath);
|
|
47043
|
+
const { describeImageWithModel } = await import("./image-CKMw_vhe.js").then((n) => n.n);
|
|
47043
47044
|
return (await describeImageWithModel({
|
|
47044
47045
|
buffer,
|
|
47045
47046
|
fileName: "sticker.webp",
|
|
@@ -47462,7 +47463,7 @@ function createWhatsAppLoginTool() {
|
|
|
47462
47463
|
force: Type.Optional(Type.Boolean())
|
|
47463
47464
|
}),
|
|
47464
47465
|
execute: async (_toolCallId, args) => {
|
|
47465
|
-
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-
|
|
47466
|
+
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-BJMvic1s.js");
|
|
47466
47467
|
if ((args?.action ?? "start") === "wait") {
|
|
47467
47468
|
const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
|
|
47468
47469
|
return {
|
|
@@ -47744,7 +47745,7 @@ async function withMemoryManagerForAgent(params) {
|
|
|
47744
47745
|
}
|
|
47745
47746
|
async function checkReadableFile(pathname) {
|
|
47746
47747
|
try {
|
|
47747
|
-
await fs
|
|
47748
|
+
await fs.access(pathname, fsSync.constants.R_OK);
|
|
47748
47749
|
return { exists: true };
|
|
47749
47750
|
} catch (err) {
|
|
47750
47751
|
const code = err.code;
|
|
@@ -47761,7 +47762,7 @@ async function scanSessionFiles(agentId) {
|
|
|
47761
47762
|
try {
|
|
47762
47763
|
return {
|
|
47763
47764
|
source: "sessions",
|
|
47764
|
-
totalFiles: (await fs
|
|
47765
|
+
totalFiles: (await fs.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
|
|
47765
47766
|
issues
|
|
47766
47767
|
};
|
|
47767
47768
|
} catch (err) {
|
|
@@ -47793,7 +47794,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
47793
47794
|
if (alt.issue) issues.push(alt.issue);
|
|
47794
47795
|
const resolvedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
|
|
47795
47796
|
for (const extraPath of resolvedExtraPaths) try {
|
|
47796
|
-
if ((await fs
|
|
47797
|
+
if ((await fs.lstat(extraPath)).isSymbolicLink()) continue;
|
|
47797
47798
|
const extraCheck = await checkReadableFile(extraPath);
|
|
47798
47799
|
if (extraCheck.issue) issues.push(extraCheck.issue);
|
|
47799
47800
|
} catch (err) {
|
|
@@ -47803,7 +47804,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
47803
47804
|
}
|
|
47804
47805
|
let dirReadable = null;
|
|
47805
47806
|
try {
|
|
47806
|
-
await fs
|
|
47807
|
+
await fs.access(memoryDir, fsSync.constants.R_OK);
|
|
47807
47808
|
dirReadable = true;
|
|
47808
47809
|
} catch (err) {
|
|
47809
47810
|
const code = err.code;
|
|
@@ -47851,7 +47852,7 @@ async function summarizeQmdIndexArtifact(manager) {
|
|
|
47851
47852
|
if (!dbPath) return null;
|
|
47852
47853
|
let stat;
|
|
47853
47854
|
try {
|
|
47854
|
-
stat = await fs
|
|
47855
|
+
stat = await fs.stat(dbPath);
|
|
47855
47856
|
} catch (err) {
|
|
47856
47857
|
const code = err.code;
|
|
47857
47858
|
if (code === "ENOENT") throw new Error(`QMD index file not found: ${shortenHomePath(dbPath)}`, { cause: err });
|
|
@@ -49701,7 +49702,7 @@ async function preflightDiscordMessage(params) {
|
|
|
49701
49702
|
let preflightTranscript;
|
|
49702
49703
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
49703
49704
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
49704
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
49705
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-UXg8r6a7.js");
|
|
49705
49706
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
49706
49707
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
49707
49708
|
ctx: {
|
|
@@ -50664,7 +50665,7 @@ function identityHasValues(identity) {
|
|
|
50664
50665
|
}
|
|
50665
50666
|
function loadIdentityFromFile(identityPath) {
|
|
50666
50667
|
try {
|
|
50667
|
-
const parsed = parseIdentityMarkdown(
|
|
50668
|
+
const parsed = parseIdentityMarkdown(fsSync.readFileSync(identityPath, "utf-8"));
|
|
50668
50669
|
if (!identityHasValues(parsed)) return null;
|
|
50669
50670
|
return parsed;
|
|
50670
50671
|
} catch {
|
|
@@ -50703,7 +50704,7 @@ function isDataAvatar(value) {
|
|
|
50703
50704
|
}
|
|
50704
50705
|
function resolveExistingPath(value) {
|
|
50705
50706
|
try {
|
|
50706
|
-
return
|
|
50707
|
+
return fsSync.realpathSync(value);
|
|
50707
50708
|
} catch {
|
|
50708
50709
|
return path.resolve(value);
|
|
50709
50710
|
}
|
|
@@ -50727,7 +50728,7 @@ function resolveLocalAvatarPath(params) {
|
|
|
50727
50728
|
reason: "unsupported_extension"
|
|
50728
50729
|
};
|
|
50729
50730
|
try {
|
|
50730
|
-
if (!
|
|
50731
|
+
if (!fsSync.statSync(realPath).isFile()) return {
|
|
50731
50732
|
ok: false,
|
|
50732
50733
|
reason: "missing"
|
|
50733
50734
|
};
|
|
@@ -51590,7 +51591,7 @@ function sanitizeRecentModels(models, limit) {
|
|
|
51590
51591
|
}
|
|
51591
51592
|
async function readJsonFileWithFallback(filePath, fallback) {
|
|
51592
51593
|
try {
|
|
51593
|
-
const raw = await
|
|
51594
|
+
const raw = await fsSync.promises.readFile(filePath, "utf-8");
|
|
51594
51595
|
return {
|
|
51595
51596
|
value: JSON.parse(raw),
|
|
51596
51597
|
exists: true
|
|
@@ -51608,14 +51609,14 @@ async function readJsonFileWithFallback(filePath, fallback) {
|
|
|
51608
51609
|
}
|
|
51609
51610
|
async function writeJsonFileAtomically(filePath, value) {
|
|
51610
51611
|
const dir = path.dirname(filePath);
|
|
51611
|
-
await
|
|
51612
|
+
await fsSync.promises.mkdir(dir, {
|
|
51612
51613
|
recursive: true,
|
|
51613
51614
|
mode: 448
|
|
51614
51615
|
});
|
|
51615
51616
|
const tmp = path.join(dir, `${path.basename(filePath)}.${crypto.randomUUID()}.tmp`);
|
|
51616
|
-
await
|
|
51617
|
-
await
|
|
51618
|
-
await
|
|
51617
|
+
await fsSync.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
|
|
51618
|
+
await fsSync.promises.chmod(tmp, 384);
|
|
51619
|
+
await fsSync.promises.rename(tmp, filePath);
|
|
51619
51620
|
}
|
|
51620
51621
|
async function readPreferencesStore(filePath) {
|
|
51621
51622
|
const { value } = await readJsonFileWithFallback(filePath, {
|
|
@@ -53707,27 +53708,27 @@ function isVoiceChannelType(type) {
|
|
|
53707
53708
|
function createDefaultDeps() {
|
|
53708
53709
|
return {
|
|
53709
53710
|
sendMessageWhatsApp: async (...args) => {
|
|
53710
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
53711
|
+
const { sendMessageWhatsApp } = await import("./web-DpQ5RaFz.js");
|
|
53711
53712
|
return await sendMessageWhatsApp(...args);
|
|
53712
53713
|
},
|
|
53713
53714
|
sendMessageTelegram: async (...args) => {
|
|
53714
|
-
const { sendMessageTelegram } = await import("./send-
|
|
53715
|
+
const { sendMessageTelegram } = await import("./send-sgxdFZNy.js").then((n) => n.l);
|
|
53715
53716
|
return await sendMessageTelegram(...args);
|
|
53716
53717
|
},
|
|
53717
53718
|
sendMessageDiscord: async (...args) => {
|
|
53718
|
-
const { sendMessageDiscord } = await import("./send-
|
|
53719
|
+
const { sendMessageDiscord } = await import("./send-CCNIWI2Z.js").then((n) => n.t);
|
|
53719
53720
|
return await sendMessageDiscord(...args);
|
|
53720
53721
|
},
|
|
53721
53722
|
sendMessageSlack: async (...args) => {
|
|
53722
|
-
const { sendMessageSlack } = await import("./send-
|
|
53723
|
+
const { sendMessageSlack } = await import("./send-Dy8tsHUE.js").then((n) => n.n);
|
|
53723
53724
|
return await sendMessageSlack(...args);
|
|
53724
53725
|
},
|
|
53725
53726
|
sendMessageSignal: async (...args) => {
|
|
53726
|
-
const { sendMessageSignal } = await import("./send-
|
|
53727
|
+
const { sendMessageSignal } = await import("./send-CPSKimCF.js").then((n) => n.i);
|
|
53727
53728
|
return await sendMessageSignal(...args);
|
|
53728
53729
|
},
|
|
53729
53730
|
sendMessageIMessage: async (...args) => {
|
|
53730
|
-
const { sendMessageIMessage } = await import("./send-
|
|
53731
|
+
const { sendMessageIMessage } = await import("./send-iUSZIdml.js").then((n) => n.n);
|
|
53731
53732
|
return await sendMessageIMessage(...args);
|
|
53732
53733
|
}
|
|
53733
53734
|
};
|
|
@@ -54636,10 +54637,10 @@ function estimateDurationSeconds(pcm) {
|
|
|
54636
54637
|
return pcm.length / (bytesPerSample * SAMPLE_RATE);
|
|
54637
54638
|
}
|
|
54638
54639
|
async function writeWavFile(pcm) {
|
|
54639
|
-
const tempDir = await fs
|
|
54640
|
+
const tempDir = await fs.mkdtemp(path.join(resolvePreferredSymiTmpDir(), "discord-voice-"));
|
|
54640
54641
|
const filePath = path.join(tempDir, `segment-${randomUUID()}.wav`);
|
|
54641
54642
|
const wav = buildWavBuffer(pcm);
|
|
54642
|
-
await fs
|
|
54643
|
+
await fs.writeFile(filePath, wav);
|
|
54643
54644
|
scheduleTempCleanup(tempDir);
|
|
54644
54645
|
return {
|
|
54645
54646
|
path: filePath,
|
|
@@ -54648,7 +54649,7 @@ async function writeWavFile(pcm) {
|
|
|
54648
54649
|
}
|
|
54649
54650
|
function scheduleTempCleanup(tempDir, delayMs = 1800 * 1e3) {
|
|
54650
54651
|
setTimeout(() => {
|
|
54651
|
-
fs
|
|
54652
|
+
fs.rm(tempDir, {
|
|
54652
54653
|
recursive: true,
|
|
54653
54654
|
force: true
|
|
54654
54655
|
}).catch((err) => {
|
|
@@ -56612,7 +56613,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
56612
56613
|
super(options);
|
|
56613
56614
|
}
|
|
56614
56615
|
createWebSocket(url) {
|
|
56615
|
-
return new WebSocket
|
|
56616
|
+
return new WebSocket(url, { agent });
|
|
56616
56617
|
}
|
|
56617
56618
|
}
|
|
56618
56619
|
return new ProxyGatewayPlugin();
|
|
@@ -57712,7 +57713,7 @@ async function detectBinary(name) {
|
|
|
57712
57713
|
if (!isSafeExecutableValue(name)) return false;
|
|
57713
57714
|
const resolved = name.startsWith("~") ? resolveUserPath(name) : name;
|
|
57714
57715
|
if (path.isAbsolute(resolved) || resolved.startsWith(".") || resolved.includes("/") || resolved.includes("\\")) try {
|
|
57715
|
-
await fs
|
|
57716
|
+
await fs.access(resolved);
|
|
57716
57717
|
return true;
|
|
57717
57718
|
} catch {
|
|
57718
57719
|
return false;
|
|
@@ -58262,7 +58263,7 @@ function normalizeAllowList$1(list) {
|
|
|
58262
58263
|
async function detectRemoteHostFromCliPath(cliPath) {
|
|
58263
58264
|
try {
|
|
58264
58265
|
const expanded = cliPath.startsWith("~") ? cliPath.replace(/^~/, process.env.HOME ?? "") : cliPath;
|
|
58265
|
-
const content = await fs
|
|
58266
|
+
const content = await fs.readFile(expanded, "utf8");
|
|
58266
58267
|
const userHostMatch = content.match(/\bssh\b[^\n]*?\s+([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/);
|
|
58267
58268
|
if (userHostMatch) return userHostMatch[1];
|
|
58268
58269
|
return content.match(/\bssh\b[^\n]*?\s+([a-zA-Z][a-zA-Z0-9._-]*)\s+\S*\bimsg\b/)?.[1];
|
|
@@ -58606,7 +58607,7 @@ async function monitorIMessageProvider(opts = {}) {
|
|
|
58606
58607
|
function readFileIfExists(filePath) {
|
|
58607
58608
|
if (!filePath) return;
|
|
58608
58609
|
try {
|
|
58609
|
-
return
|
|
58610
|
+
return fsSync.readFileSync(filePath, "utf-8").trim();
|
|
58610
58611
|
} catch {
|
|
58611
58612
|
return;
|
|
58612
58613
|
}
|
|
@@ -59167,7 +59168,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
|
|
|
59167
59168
|
prefix: "line-media",
|
|
59168
59169
|
extension: getExtensionForContentType(contentType)
|
|
59169
59170
|
});
|
|
59170
|
-
await
|
|
59171
|
+
await fsSync.promises.writeFile(filePath, buffer);
|
|
59171
59172
|
logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
|
|
59172
59173
|
return {
|
|
59173
59174
|
path: filePath,
|
|
@@ -64154,7 +64155,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
64154
64155
|
}
|
|
64155
64156
|
let commandsRegistry;
|
|
64156
64157
|
async function getCommandsRegistry() {
|
|
64157
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
64158
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-DPf4J7nj.js").then((n) => n.n);
|
|
64158
64159
|
return commandsRegistry;
|
|
64159
64160
|
}
|
|
64160
64161
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -64496,11 +64497,11 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
64496
64497
|
const channelName = channelInfo?.name;
|
|
64497
64498
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
64498
64499
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
64499
|
-
import("./resolve-route-
|
|
64500
|
-
import("./inbound-context-
|
|
64500
|
+
import("./resolve-route-gl0ZOOKR.js").then((n) => n.r),
|
|
64501
|
+
import("./inbound-context-Dvqh1Tgb.js").then((n) => n.n),
|
|
64501
64502
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
64502
64503
|
]);
|
|
64503
|
-
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-
|
|
64504
|
+
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-ZnX2V-k9.js").then((n) => n.n)]);
|
|
64504
64505
|
const route = resolveAgentRoute({
|
|
64505
64506
|
cfg,
|
|
64506
64507
|
channel: "slack",
|
|
@@ -64557,9 +64558,9 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
64557
64558
|
});
|
|
64558
64559
|
const deliverSlashPayloads = async (replies) => {
|
|
64559
64560
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
64560
|
-
import("./replies-
|
|
64561
|
-
import("./chunk-
|
|
64562
|
-
import("./markdown-tables-
|
|
64561
|
+
import("./replies-CbeMv5WZ.js").then((n) => n.r),
|
|
64562
|
+
import("./chunk-B9x_1qSr.js").then((n) => n.s),
|
|
64563
|
+
import("./markdown-tables-DuRhvVpP.js").then((n) => n.t)
|
|
64563
64564
|
]);
|
|
64564
64565
|
await deliverSlackSlashReplies({
|
|
64565
64566
|
replies,
|
|
@@ -64612,7 +64613,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
64612
64613
|
let nativeCommands = [];
|
|
64613
64614
|
if (nativeEnabled) {
|
|
64614
64615
|
reg = await getCommandsRegistry();
|
|
64615
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
64616
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-HBkNllDU.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
64616
64617
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
64617
64618
|
skillCommands,
|
|
64618
64619
|
provider: "slack"
|
|
@@ -65046,8 +65047,8 @@ async function auditTelegramGroupMembership(params) {
|
|
|
65046
65047
|
groups: [],
|
|
65047
65048
|
elapsedMs: Date.now() - started
|
|
65048
65049
|
};
|
|
65049
|
-
const fetcher = params.proxyUrl ? (await import("./proxy-
|
|
65050
|
-
const { fetchWithTimeout } = await import("./fetch-timeout-
|
|
65050
|
+
const fetcher = params.proxyUrl ? (await import("./proxy-DVy9foH0.js").then((n) => n.n)).makeProxyFetch(params.proxyUrl) : fetch;
|
|
65051
|
+
const { fetchWithTimeout } = await import("./fetch-timeout-Cj6kcyGt.js").then((n) => n.r);
|
|
65051
65052
|
const base = `${TELEGRAM_API_BASE$1}/bot${token}`;
|
|
65052
65053
|
const groups = [];
|
|
65053
65054
|
for (const chatId of params.groupIds) try {
|
|
@@ -66830,7 +66831,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
66830
66831
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
66831
66832
|
let preflightTranscript;
|
|
66832
66833
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
66833
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
66834
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-UXg8r6a7.js");
|
|
66834
66835
|
preflightTranscript = await transcribeFirstAudio({
|
|
66835
66836
|
ctx: {
|
|
66836
66837
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -68598,7 +68599,7 @@ function safeParseState(raw) {
|
|
|
68598
68599
|
async function readTelegramUpdateOffset(params) {
|
|
68599
68600
|
const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
|
|
68600
68601
|
try {
|
|
68601
|
-
return safeParseState(await fs
|
|
68602
|
+
return safeParseState(await fs.readFile(filePath, "utf-8"))?.lastUpdateId ?? null;
|
|
68602
68603
|
} catch (err) {
|
|
68603
68604
|
if (err.code === "ENOENT") return null;
|
|
68604
68605
|
return null;
|
|
@@ -68607,7 +68608,7 @@ async function readTelegramUpdateOffset(params) {
|
|
|
68607
68608
|
async function writeTelegramUpdateOffset(params) {
|
|
68608
68609
|
const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
|
|
68609
68610
|
const dir = path.dirname(filePath);
|
|
68610
|
-
await fs
|
|
68611
|
+
await fs.mkdir(dir, {
|
|
68611
68612
|
recursive: true,
|
|
68612
68613
|
mode: 448
|
|
68613
68614
|
});
|
|
@@ -68616,9 +68617,9 @@ async function writeTelegramUpdateOffset(params) {
|
|
|
68616
68617
|
version: STORE_VERSION,
|
|
68617
68618
|
lastUpdateId: params.updateId
|
|
68618
68619
|
};
|
|
68619
|
-
await fs
|
|
68620
|
-
await fs
|
|
68621
|
-
await fs
|
|
68620
|
+
await fs.writeFile(tmp, `${JSON.stringify(payload, null, 2)}\n`, { encoding: "utf-8" });
|
|
68621
|
+
await fs.chmod(tmp, 384);
|
|
68622
|
+
await fs.rename(tmp, filePath);
|
|
68622
68623
|
}
|
|
68623
68624
|
|
|
68624
68625
|
//#endregion
|
|
@@ -68975,23 +68976,23 @@ let webLoginQrPromise = null;
|
|
|
68975
68976
|
let webChannelPromise = null;
|
|
68976
68977
|
let whatsappActionsPromise = null;
|
|
68977
68978
|
function loadWebOutbound() {
|
|
68978
|
-
webOutboundPromise ??= import("./outbound-
|
|
68979
|
+
webOutboundPromise ??= import("./outbound-B_wliV26.js").then((n) => n.t);
|
|
68979
68980
|
return webOutboundPromise;
|
|
68980
68981
|
}
|
|
68981
68982
|
function loadWebLogin() {
|
|
68982
|
-
webLoginPromise ??= import("./login-
|
|
68983
|
+
webLoginPromise ??= import("./login-2w0Q7Btb.js").then((n) => n.n);
|
|
68983
68984
|
return webLoginPromise;
|
|
68984
68985
|
}
|
|
68985
68986
|
function loadWebLoginQr() {
|
|
68986
|
-
webLoginQrPromise ??= import("./login-qr-
|
|
68987
|
+
webLoginQrPromise ??= import("./login-qr-BJMvic1s.js");
|
|
68987
68988
|
return webLoginQrPromise;
|
|
68988
68989
|
}
|
|
68989
68990
|
function loadWebChannel() {
|
|
68990
|
-
webChannelPromise ??= import("./web-
|
|
68991
|
+
webChannelPromise ??= import("./web-DpQ5RaFz.js");
|
|
68991
68992
|
return webChannelPromise;
|
|
68992
68993
|
}
|
|
68993
68994
|
function loadWhatsAppActions() {
|
|
68994
|
-
whatsappActionsPromise ??= import("./whatsapp-actions-
|
|
68995
|
+
whatsappActionsPromise ??= import("./whatsapp-actions-D_w4AfW9.js");
|
|
68995
68996
|
return whatsappActionsPromise;
|
|
68996
68997
|
}
|
|
68997
68998
|
function createPluginRuntime() {
|
|
@@ -69212,7 +69213,7 @@ const resolvePluginSdkAliasFile = (params) => {
|
|
|
69212
69213
|
const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
|
|
69213
69214
|
const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
|
|
69214
69215
|
const orderedCandidates = isTest ? [distCandidate, srcCandidate] : [distCandidate];
|
|
69215
|
-
for (const candidate of orderedCandidates) if (
|
|
69216
|
+
for (const candidate of orderedCandidates) if (fsSync.existsSync(candidate)) return candidate;
|
|
69216
69217
|
const parent = path.dirname(cursor);
|
|
69217
69218
|
if (parent === cursor) break;
|
|
69218
69219
|
cursor = parent;
|
|
@@ -69758,7 +69759,7 @@ function resolvePluginTools(params) {
|
|
|
69758
69759
|
//#endregion
|
|
69759
69760
|
//#region src/agents/apply-patch-update.ts
|
|
69760
69761
|
async function defaultReadFile(filePath) {
|
|
69761
|
-
return fs
|
|
69762
|
+
return fs.readFile(filePath, "utf8");
|
|
69762
69763
|
}
|
|
69763
69764
|
async function applyUpdateHunk(filePath, chunks, options) {
|
|
69764
69765
|
const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
|
|
@@ -70002,10 +70003,10 @@ function resolvePatchFileOps(options) {
|
|
|
70002
70003
|
};
|
|
70003
70004
|
}
|
|
70004
70005
|
return {
|
|
70005
|
-
readFile: (filePath) => fs
|
|
70006
|
-
writeFile: (filePath, content) => fs
|
|
70007
|
-
remove: (filePath) => fs
|
|
70008
|
-
mkdirp: (dir) => fs
|
|
70006
|
+
readFile: (filePath) => fs.readFile(filePath, "utf8"),
|
|
70007
|
+
writeFile: (filePath, content) => fs.writeFile(filePath, content, "utf8"),
|
|
70008
|
+
remove: (filePath) => fs.rm(filePath),
|
|
70009
|
+
mkdirp: (dir) => fs.mkdir(dir, { recursive: true }).then(() => {})
|
|
70009
70010
|
};
|
|
70010
70011
|
}
|
|
70011
70012
|
async function ensureDir(filePath, ops) {
|
|
@@ -71250,7 +71251,7 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
71250
71251
|
};
|
|
71251
71252
|
let content;
|
|
71252
71253
|
try {
|
|
71253
|
-
content = await fs
|
|
71254
|
+
content = await fs.readFile(sessionFile, "utf-8");
|
|
71254
71255
|
} catch (err) {
|
|
71255
71256
|
if (err?.code === "ENOENT") return {
|
|
71256
71257
|
repaired: false,
|
|
@@ -71298,15 +71299,15 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
71298
71299
|
const backupPath = `${sessionFile}.bak-${process.pid}-${Date.now()}`;
|
|
71299
71300
|
const tmpPath = `${sessionFile}.repair-${process.pid}-${Date.now()}.tmp`;
|
|
71300
71301
|
try {
|
|
71301
|
-
const stat = await fs
|
|
71302
|
-
await fs
|
|
71303
|
-
if (stat) await fs
|
|
71304
|
-
await fs
|
|
71305
|
-
if (stat) await fs
|
|
71306
|
-
await fs
|
|
71302
|
+
const stat = await fs.stat(sessionFile).catch(() => null);
|
|
71303
|
+
await fs.writeFile(backupPath, content, "utf-8");
|
|
71304
|
+
if (stat) await fs.chmod(backupPath, stat.mode);
|
|
71305
|
+
await fs.writeFile(tmpPath, cleaned, "utf-8");
|
|
71306
|
+
if (stat) await fs.chmod(tmpPath, stat.mode);
|
|
71307
|
+
await fs.rename(tmpPath, sessionFile);
|
|
71307
71308
|
} catch (err) {
|
|
71308
71309
|
try {
|
|
71309
|
-
await fs
|
|
71310
|
+
await fs.unlink(tmpPath);
|
|
71310
71311
|
} catch (cleanupErr) {
|
|
71311
71312
|
params.warn?.(`session file repair cleanup failed: ${cleanupErr instanceof Error ? cleanupErr.message : "unknown error"} (${path.basename(tmpPath)})`);
|
|
71312
71313
|
}
|
|
@@ -71990,8 +71991,8 @@ async function readWorkspaceContextForSummary() {
|
|
|
71990
71991
|
const workspaceDir = process.cwd();
|
|
71991
71992
|
const agentsPath = path.join(workspaceDir, "AGENTS.md");
|
|
71992
71993
|
try {
|
|
71993
|
-
if (!
|
|
71994
|
-
const sections = extractSections(await
|
|
71994
|
+
if (!fsSync.existsSync(agentsPath)) return "";
|
|
71995
|
+
const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
|
|
71995
71996
|
if (sections.length === 0) return "";
|
|
71996
71997
|
const combined = sections.join("\n\n");
|
|
71997
71998
|
return `\n\n<workspace-critical-rules>\n${combined.length > MAX_SUMMARY_CONTEXT_CHARS ? combined.slice(0, MAX_SUMMARY_CONTEXT_CHARS) + "\n...[truncated]..." : combined}\n</workspace-critical-rules>`;
|
|
@@ -72547,7 +72548,7 @@ async function prewarmSessionFile(sessionFile) {
|
|
|
72547
72548
|
if (!isSessionManagerCacheEnabled()) return;
|
|
72548
72549
|
if (isSessionManagerCached(sessionFile)) return;
|
|
72549
72550
|
try {
|
|
72550
|
-
const handle = await fs
|
|
72551
|
+
const handle = await fs.open(sessionFile, "r");
|
|
72551
72552
|
try {
|
|
72552
72553
|
const buffer = Buffer$1.alloc(4096);
|
|
72553
72554
|
await handle.read(buffer, 0, buffer.length, 0);
|
|
@@ -72680,14 +72681,14 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
72680
72681
|
if (!apiKeyInfo.apiKey) {
|
|
72681
72682
|
if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
72682
72683
|
} else if (model.provider === "github-copilot") {
|
|
72683
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
72684
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-B8B2pmph.js").then((n) => n.n);
|
|
72684
72685
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
72685
72686
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
72686
72687
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
72687
72688
|
} catch (err) {
|
|
72688
72689
|
return fail(describeUnknownError(err));
|
|
72689
72690
|
}
|
|
72690
|
-
await fs
|
|
72691
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
72691
72692
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
72692
72693
|
const sandbox = await resolveSandboxContext({
|
|
72693
72694
|
config: params.config,
|
|
@@ -72695,7 +72696,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
72695
72696
|
workspaceDir: resolvedWorkspace
|
|
72696
72697
|
});
|
|
72697
72698
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
72698
|
-
await fs
|
|
72699
|
+
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
72699
72700
|
await ensureSessionHeader({
|
|
72700
72701
|
sessionFile: params.sessionFile,
|
|
72701
72702
|
sessionId: params.sessionId,
|
|
@@ -73049,12 +73050,12 @@ function getQueuedFileWriter(writers, filePath) {
|
|
|
73049
73050
|
const existing = writers.get(filePath);
|
|
73050
73051
|
if (existing) return existing;
|
|
73051
73052
|
const dir = path.dirname(filePath);
|
|
73052
|
-
const ready = fs
|
|
73053
|
+
const ready = fs.mkdir(dir, { recursive: true }).catch(() => void 0);
|
|
73053
73054
|
let queue = Promise.resolve();
|
|
73054
73055
|
const writer = {
|
|
73055
73056
|
filePath,
|
|
73056
73057
|
write: (line) => {
|
|
73057
|
-
queue = queue.then(() => ready).then(() => fs
|
|
73058
|
+
queue = queue.then(() => ready).then(() => fs.appendFile(filePath, line, "utf8")).catch(() => void 0);
|
|
73058
73059
|
}
|
|
73059
73060
|
};
|
|
73060
73061
|
writers.set(filePath, writer);
|
|
@@ -74079,11 +74080,11 @@ function appendRawStream(payload) {
|
|
|
74079
74080
|
if (!rawStreamReady) {
|
|
74080
74081
|
rawStreamReady = true;
|
|
74081
74082
|
try {
|
|
74082
|
-
|
|
74083
|
+
fsSync.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
|
|
74083
74084
|
} catch {}
|
|
74084
74085
|
}
|
|
74085
74086
|
try {
|
|
74086
|
-
|
|
74087
|
+
fsSync.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
|
|
74087
74088
|
} catch {}
|
|
74088
74089
|
}
|
|
74089
74090
|
|
|
@@ -75913,7 +75914,7 @@ function isInPoisonRange(version) {
|
|
|
75913
75914
|
*/
|
|
75914
75915
|
async function checkSessionPoison(sessionFile) {
|
|
75915
75916
|
try {
|
|
75916
|
-
const firstLine = (await fs
|
|
75917
|
+
const firstLine = (await fs.readFile(sessionFile, "utf-8")).split("\n")[0];
|
|
75917
75918
|
if (!firstLine) return null;
|
|
75918
75919
|
const header = JSON.parse(firstLine);
|
|
75919
75920
|
if (header.type !== "session") return null;
|
|
@@ -75931,7 +75932,7 @@ async function checkSessionPoison(sessionFile) {
|
|
|
75931
75932
|
*/
|
|
75932
75933
|
async function archivePoisonedSession(sessionFile) {
|
|
75933
75934
|
const archiveName = `${sessionFile}.archived-poison.${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
|
|
75934
|
-
await fs
|
|
75935
|
+
await fs.rename(sessionFile, archiveName);
|
|
75935
75936
|
return archiveName;
|
|
75936
75937
|
}
|
|
75937
75938
|
/**
|
|
@@ -75940,14 +75941,14 @@ async function archivePoisonedSession(sessionFile) {
|
|
|
75940
75941
|
*/
|
|
75941
75942
|
async function stampSessionVersion(sessionFile) {
|
|
75942
75943
|
try {
|
|
75943
|
-
const lines = (await fs
|
|
75944
|
+
const lines = (await fs.readFile(sessionFile, "utf-8")).split("\n");
|
|
75944
75945
|
if (lines.length === 0) return;
|
|
75945
75946
|
const header = JSON.parse(lines[0]);
|
|
75946
75947
|
if (header.type !== "session") return;
|
|
75947
75948
|
if (header.symiVersion === VERSION) return;
|
|
75948
75949
|
header.symiVersion = VERSION;
|
|
75949
75950
|
lines[0] = JSON.stringify(header);
|
|
75950
|
-
await fs
|
|
75951
|
+
await fs.writeFile(sessionFile, lines.join("\n"), "utf-8");
|
|
75951
75952
|
} catch {}
|
|
75952
75953
|
}
|
|
75953
75954
|
/**
|
|
@@ -76110,7 +76111,7 @@ async function prepareSessionManagerForRun(params) {
|
|
|
76110
76111
|
return;
|
|
76111
76112
|
}
|
|
76112
76113
|
if (params.hadSessionFile && header && !hasAssistant) {
|
|
76113
|
-
await fs
|
|
76114
|
+
await fs.writeFile(params.sessionFile, "", "utf-8");
|
|
76114
76115
|
sm.fileEntries = [header];
|
|
76115
76116
|
sm.byId?.clear?.();
|
|
76116
76117
|
sm.labelsById?.clear?.();
|
|
@@ -76668,7 +76669,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
76668
76669
|
const prevCwd = process.cwd();
|
|
76669
76670
|
const runAbortController = new AbortController();
|
|
76670
76671
|
log$9.debug(`embedded run start: runId=${params.runId} sessionId=${params.sessionId} provider=${params.provider} model=${params.modelId} thinking=${params.thinkLevel} messageChannel=${params.messageChannel ?? params.messageProvider ?? "unknown"}`);
|
|
76671
|
-
await fs
|
|
76672
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
76672
76673
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
76673
76674
|
const sandbox = await resolveSandboxContext({
|
|
76674
76675
|
config: params.config,
|
|
@@ -76676,7 +76677,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
76676
76677
|
workspaceDir: resolvedWorkspace
|
|
76677
76678
|
});
|
|
76678
76679
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
76679
|
-
await fs
|
|
76680
|
+
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
76680
76681
|
let restoreSkillEnv;
|
|
76681
76682
|
process.chdir(effectiveWorkspace);
|
|
76682
76683
|
try {
|
|
@@ -76906,7 +76907,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
76906
76907
|
sessionFile: params.sessionFile,
|
|
76907
76908
|
warn: (message) => log$9.warn(message)
|
|
76908
76909
|
});
|
|
76909
|
-
const hadSessionFile = await fs
|
|
76910
|
+
const hadSessionFile = await fs.stat(params.sessionFile).then(() => true).catch(() => false);
|
|
76910
76911
|
const transcriptPolicy = resolveTranscriptPolicy({
|
|
76911
76912
|
modelApi: params.model?.api,
|
|
76912
76913
|
provider: params.provider,
|
|
@@ -77772,6 +77773,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
77772
77773
|
const agentDir = params.agentDir ?? resolveSymiAgentDir();
|
|
77773
77774
|
const fallbackConfigured = (params.config?.agents?.defaults?.model?.fallbacks?.length ?? 0) > 0;
|
|
77774
77775
|
await ensureSymiModelsJson(params.config, agentDir);
|
|
77776
|
+
await ensurePiAuthJsonFromAuthProfiles(agentDir, { config: params.config });
|
|
77775
77777
|
let modelResolveOverride;
|
|
77776
77778
|
const hookRunner = getGlobalHookRunner();
|
|
77777
77779
|
const hookCtx = {
|
|
@@ -77890,7 +77892,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
77890
77892
|
return;
|
|
77891
77893
|
}
|
|
77892
77894
|
if (model.provider === "github-copilot") {
|
|
77893
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
77895
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-B8B2pmph.js").then((n) => n.n);
|
|
77894
77896
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
77895
77897
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
77896
77898
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
@@ -77975,7 +77977,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
77975
77977
|
}
|
|
77976
77978
|
runLoopIterations += 1;
|
|
77977
77979
|
attemptedThinking.add(thinkLevel);
|
|
77978
|
-
await fs
|
|
77980
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
77979
77981
|
const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
|
|
77980
77982
|
const attempt = await runEmbeddedAttempt({
|
|
77981
77983
|
sessionId: params.sessionId,
|