@symerian/symi 2.6.39 → 2.6.41
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-dRUMQQrB.js → accounts-3dCrO3oZ.js} +1 -1
- package/dist/{accounts-D1r2dq1t.js → accounts-BRw8yhIW.js} +21 -21
- package/dist/{accounts-wSphH5gv.js → accounts-BuZxOb3B.js} +1 -1
- package/dist/{acp-cli-EqE2uipx.js → acp-cli-BLUeUUA5.js} +2 -2
- package/dist/{acp-cli-ByYHYK_E.js → acp-cli-CrEIx-c7.js} +2 -2
- package/dist/{active-listener-C3pfJhdC.js → active-listener-Br2FcRv7.js} +1 -1
- package/dist/{agent-scope-D68_xfTL.js → agent-scope-CpEJ0B88.js} +3 -3
- package/dist/{agents-BaNrmXzu.js → agents-B4RNdKQ3.js} +7 -7
- package/dist/{agents.config-BOxmN33d.js → agents.config-CA31c0kN.js} +1 -1
- package/dist/{agents.config-C78DHdxT.js → agents.config-CG2klYOg.js} +1 -1
- package/dist/{audio-preflight-CzQUZSUK.js → audio-preflight-CIiS5cfP.js} +11 -11
- package/dist/{audio-preflight-DZ_2w4B5.js → audio-preflight-DD18zIZd.js} +5 -5
- package/dist/{audio-preflight-UXg8r6a7.js → audio-preflight-K-s65jbB.js} +29 -29
- package/dist/{audio-preflight-BuT_gIRW.js → audio-preflight-XrlQA8IZ.js} +11 -11
- package/dist/{audit-Cgd5-Y7W.js → audit-BjI_Yyr5.js} +5 -5
- package/dist/{audit-BxqTVyZo.js → audit-DB9YkTVX.js} +5 -5
- package/dist/{auth-choice-CnpKK0cS.js → auth-choice-CCGIgXvF.js} +4 -4
- package/dist/{auth-choice-BnJzLsv5.js → auth-choice-CiMf3Pjp.js} +4 -4
- package/dist/{auth-profiles-CZZjOpX8.js → auth-profiles-q3HjbboY.js} +17 -17
- package/dist/{banner-DdpNhjX6.js → banner-BNsB_A87.js} +1 -1
- package/dist/{bindings-Bat2RnAR.js → bindings-BsHoBLIE.js} +2 -2
- package/dist/{browser-cli-BrzYV9w9.js → browser-cli-Ctn9do4z.js} +3 -3
- package/dist/{browser-cli-Dun4KSp2.js → browser-cli-kDUw45Y0.js} +3 -3
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +54 -54
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +54 -54
- package/dist/{call-DIDhYlsx.js → call-DKi-hnaF.js} +1 -1
- package/dist/{call-CFhGTNtt.js → call-DwpGquzW.js} +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-Cm1OJRbv.js → channel-activity-D-kw83R0.js} +1 -1
- package/dist/{channel-options-CJE7N_QV.js → channel-options-BMQlkUDX.js} +1 -1
- package/dist/{channel-options-47wHx-rM.js → channel-options-pAH4A-xX.js} +1 -1
- package/dist/{channel-web-CVf8YV4M.js → channel-web-Dwuj48T5.js} +7 -7
- package/dist/{channels-cli-CMLy_xVT.js → channels-cli-CuExxB0U.js} +30 -30
- package/dist/{channels-cli-Iya7tcnY.js → channels-cli-rmDzxb0W.js} +29 -29
- package/dist/{chrome-CXbfCc20.js → chrome-BYOhnxTr.js} +5 -5
- package/dist/{chrome-D0sqCqXY.js → chrome-BxwUEWrH.js} +16 -16
- package/dist/{chrome-Dq0bSDVx.js → chrome-DAw-AWNi.js} +1 -1
- package/dist/{chrome-DtPkPq9T.js → chrome-DU2ZysN3.js} +1 -1
- package/dist/{chunk-B9x_1qSr.js → chunk-BHW8Yu5A.js} +1 -1
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-dC-CEeDc.js → cli-BPGZalMg.js} +25 -25
- package/dist/{cli-DmGUr8aj.js → cli-Mcq2pPI0.js} +26 -26
- package/dist/{command-registry-DSV-4T7A.js → command-registry-BoEw2RzH.js} +11 -11
- package/dist/{commands-registry-DPf4J7nj.js → commands-registry-BSvi46KZ.js} +4 -4
- package/dist/{completion-cli-dlL2VvFw.js → completion-cli-CE9Xqlyx.js} +1 -1
- package/dist/{completion-cli-DjQVuJdD.js → completion-cli-CQVZGJPg.js} +2 -2
- package/dist/{config-giEDOxub.js → config-B6OxYMgn.js} +21 -13
- package/dist/{config-DHBLS1Hl.js → config-BNTB6qj8.js} +9 -1
- package/dist/{config-DBqxAhpU.js → config-BUTI-mUZ.js} +9 -1
- package/dist/{config-CHwyw6l5.js → config-Dz95lSBW.js} +9 -1
- package/dist/{config-cli-Cm4KwczC.js → config-cli-BucNvr-c.js} +2 -2
- package/dist/{config-cli-DLFKoU1U.js → config-cli-mU_ckD4l.js} +2 -2
- package/dist/{config-guard-CPHvOzsC.js → config-guard-B1skCv1C.js} +2 -2
- package/dist/{config-guard--WfHrCVe.js → config-guard-CEkSg4hl.js} +3 -3
- package/dist/{config-validation-BITwrsxY.js → config-validation-Cutpn5eO.js} +1 -1
- package/dist/{config-validation-BckiR0w9.js → config-validation-HDVDlMSV.js} +1 -1
- package/dist/{configure-DNRNOqKI.js → configure-CDOF87Fk.js} +10 -10
- package/dist/{configure-BbFd3c68.js → configure-CxnBcN95.js} +10 -10
- package/dist/{control-service-Dtn-qw2s.js → control-service-BYKXzY4f.js} +4 -4
- package/dist/{control-service-DEVN6FRR.js → control-service-rbSHSlcd.js} +4 -4
- package/dist/control-ui/css/style.css +43 -0
- package/dist/control-ui/index.html +7 -1
- package/dist/control-ui/js/app.js +41 -0
- package/dist/control-ui/js/models.js +56 -16
- package/dist/{cron-cli-Bml4UNHa.js → cron-cli-DCpsXkrw.js} +3 -3
- package/dist/{cron-cli-C-gg6wfO.js → cron-cli-QCTdVZuP.js} +3 -3
- package/dist/{daemon-cli-BPHe9wOW.js → daemon-cli-DSDcmWOi.js} +6 -6
- package/dist/{daemon-cli-0RLS-CwL.js → daemon-cli-DhJYEAoL.js} +6 -6
- package/dist/daemon-cli.js +9 -1
- package/dist/{daemon-runtime-CfRwa6qh.js → daemon-runtime-CVFg-ZmT.js} +1 -1
- package/dist/{daemon-runtime-COZ4usfy.js → daemon-runtime-mE1b-Q48.js} +1 -1
- package/dist/{deliver-DrFtaFZt.js → deliver-B4KZ6-oZ.js} +3 -3
- package/dist/{deliver-CXRSdUr1.js → deliver-Bu0iWeja.js} +3 -3
- package/dist/{deliver-BY58QnO8.js → deliver-C1HRkzPJ.js} +20 -20
- package/dist/{deliver-DepjYu87.js → deliver-DtuY4Wgl.js} +2 -2
- package/dist/{devices-cli-CI2TOoP1.js → devices-cli-BNG-fvdl.js} +2 -2
- package/dist/{devices-cli-texa_iUV.js → devices-cli-x3jIP4Ih.js} +2 -2
- package/dist/{diagnostic-DIKKFHpP.js → diagnostic-CQiU0O8b.js} +1 -1
- package/dist/{directory-cli-D6vlxPje.js → directory-cli-BxnSZZsW.js} +1 -1
- package/dist/{directory-cli-BRMi7Alb.js → directory-cli-KgsAVTA0.js} +1 -1
- package/dist/{dns-cli-BEub5qgQ.js → dns-cli-BuVomfxS.js} +1 -1
- package/dist/{dns-cli-BsRMpavf.js → dns-cli-Cwr92Aiq.js} +1 -1
- package/dist/{doctor-completion-Z_RXu40-.js → doctor-completion-CHF_TwGQ.js} +1 -1
- package/dist/{doctor-completion-Cm7WG43a.js → doctor-completion-CoftKlUX.js} +1 -1
- package/dist/{doctor-config-flow-CA3eiKhd.js → doctor-config-flow-DhAYwhNB.js} +2 -2
- package/dist/{doctor-config-flow-BTQvpBys.js → doctor-config-flow-iIzSEQxb.js} +2 -2
- package/dist/entry.js +1 -1
- package/dist/{env-xmBFQPBP.js → env-BDXYbTKj.js} +1 -1
- package/dist/{exec-approvals-cli-DxKAWA8Y.js → exec-approvals-cli-BSgxsdMt.js} +4 -4
- package/dist/{exec-approvals-cli-wesKZNXl.js → exec-approvals-cli-CmndFjEA.js} +4 -4
- package/dist/extensionAPI.js +13 -13
- package/dist/{frontmatter-CV0YkjoY.js → frontmatter-CTR5f_Ez.js} +2 -2
- package/dist/{gateway-cli-DliBYmLu.js → gateway-cli-G7fiXsQ6.js} +42 -42
- package/dist/{gateway-cli-Fnxgv97F.js → gateway-cli-SNaqDM7f.js} +41 -41
- package/dist/{gateway-rpc-DiTk_nOl.js → gateway-rpc-5fREQe9Q.js} +1 -1
- package/dist/{gateway-rpc-BkB6xEaM.js → gateway-rpc-BMdVa3QV.js} +1 -1
- package/dist/{gemini-auth-C39f2zRe.js → gemini-auth-BkLFtndu.js} +1 -1
- package/dist/{github-copilot-token-B8B2pmph.js → github-copilot-token-cCYzSU9h.js} +7 -7
- package/dist/{glass-ui-ws-CfNTIb_g.js → glass-ui-ws-CF0__vuO.js} +34 -34
- package/dist/{glass-ui-ws-B0sH6QQi.js → glass-ui-ws-he25wGFt.js} +33 -33
- package/dist/{health-9z0Hpkuc.js → health-en2N_Kqc.js} +5 -5
- package/dist/{health-NTpZ8ssG.js → health-q7706M36.js} +5 -5
- package/dist/{hooks-cli-C86OGnVu.js → hooks-cli-C4rVaLzZ.js} +26 -26
- package/dist/{hooks-cli-wq_uFJly.js → hooks-cli-ChQbBpyb.js} +27 -27
- package/dist/{image-BwXkayiM.js → image-BWmcNF8N.js} +2 -2
- package/dist/{image-CO4meYzg.js → image-C3wYkWyK.js} +2 -2
- package/dist/{image-CKMw_vhe.js → image-CbyTdMd5.js} +4 -4
- package/dist/{image-CjuJpc3E.js → image-lp19FlzF.js} +2 -2
- package/dist/{image-ops-M5agStZn.js → image-ops-C7CauEK8.js} +16 -16
- package/dist/index.js +34 -34
- package/dist/{ir-Z9axTYHx.js → ir-JAy_3A3B.js} +4 -4
- package/dist/{lifecycle-core-DIBHfMOL.js → lifecycle-core-BZ5sOcHT.js} +2 -2
- package/dist/{lifecycle-core-D0n_6gjJ.js → lifecycle-core-C4HzGXA1.js} +2 -2
- package/dist/llm-slug-generator.js +54 -54
- package/dist/{local-roots-Bh5xx9IO.js → local-roots-Se92wAN5.js} +5 -5
- package/dist/{login-CeXFO0OG.js → login-BkbDSDPc.js} +2 -2
- package/dist/{login-2w0Q7Btb.js → login-BtBwGFrb.js} +7 -7
- package/dist/{login-tFW8qUTU.js → login-CiVdC-o_.js} +2 -2
- package/dist/{login-y9uojrfG.js → login-DODfJ3Dn.js} +2 -2
- package/dist/{login-qr-CC0TE3ax.js → login-qr-CBRxijIg.js} +2 -2
- package/dist/{login-qr-CqPpNO1y.js → login-qr-DPxuLEvD.js} +2 -2
- package/dist/{login-qr-BMIn_eOf.js → login-qr-Dbw5m381.js} +2 -2
- package/dist/{login-qr-BJMvic1s.js → login-qr-q201Ckfe.js} +12 -12
- package/dist/{logs-cli-Dld6m2xN.js → logs-cli-CfGj-dOg.js} +3 -3
- package/dist/{logs-cli-Dvs8e7u9.js → logs-cli-DtlrLf7u.js} +3 -3
- package/dist/{manager-BoLUtbg2.js → manager-CJ3M1Uxq.js} +22 -22
- package/dist/{manifest-registry-0J48biqr.js → manifest-registry-yb7sAlu4.js} +19 -19
- package/dist/{markdown-tables-DuRhvVpP.js → markdown-tables-Dnj2LQUc.js} +1 -1
- package/dist/{memory-cli-C2SWDd8g.js → memory-cli-Btzr8gfD.js} +1 -1
- package/dist/{memory-cli-CPONmMrJ.js → memory-cli-DDumUksr.js} +1 -1
- package/dist/{message-channel-DwDSKGn4.js → message-channel-OlFBYAw8.js} +1 -1
- package/dist/{model-catalog-r6v4orfa.js → model-catalog-8Son0J4O.js} +2 -2
- package/dist/{model-catalog-Bn0ffe1O.js → model-catalog-DNvgFPZn.js} +2 -2
- package/dist/{model-picker-TnkH7DsN.js → model-picker-CAm2Bftd.js} +2 -2
- package/dist/{model-picker-D1J9kB3d.js → model-picker-Casgrpw3.js} +2 -2
- package/dist/{models-DfuMRKvu.js → models-DOTpfa7b.js} +8 -8
- package/dist/{models-cli-BJv-aMkH.js → models-cli-CBl45f7R.js} +28 -28
- package/dist/{models-cli-FnD3ZD7s.js → models-cli-MJAY_Wg4.js} +29 -29
- package/dist/{models-config-CCMpqFyr.js → models-config-Be8DRFkB.js} +1 -1
- package/dist/{models-config-qyOXrOli.js → models-config-CFFjJPe7.js} +1 -1
- package/dist/{node-cli-C8xs7jkn.js → node-cli-DnfDOh1d.js} +9 -9
- package/dist/{node-cli-C4b1vFcY.js → node-cli-eHn9-YfJ.js} +9 -9
- package/dist/{nodes-cli-_wKGGKvG.js → nodes-cli-Ci3oxw8k.js} +3 -3
- package/dist/{nodes-cli-alQ9Bv_-.js → nodes-cli-Ct4M7JOe.js} +3 -3
- package/dist/{onboard-BSlbkbv-.js → onboard-Bx02XPb1.js} +7 -7
- package/dist/{onboard-A5dfwOyL.js → onboard-DQdGJ1lE.js} +7 -7
- package/dist/{onboard-channels-CEZpwlsw.js → onboard-channels-Bp89ZT6Q.js} +1 -1
- package/dist/{onboard-channels-DjqHX51z.js → onboard-channels-Ct2eNYUC.js} +1 -1
- package/dist/{onboard-custom-yNOjvlgR.js → onboard-custom-CQOMQkfS.js} +2 -2
- package/dist/{onboard-custom-BNyCb71p.js → onboard-custom-XiomtQr7.js} +2 -2
- package/dist/{onboard-helpers-DASpwgat.js → onboard-helpers-BBtPmJEe.js} +2 -2
- package/dist/{onboard-helpers-CAjcAisT.js → onboard-helpers-DFvWPFhU.js} +2 -2
- package/dist/{onboard-remote-D-8pd-tx.js → onboard-remote-BURDxwoE.js} +1 -1
- package/dist/{onboard-remote-xXi061GI.js → onboard-remote-D-B4EiOE.js} +1 -1
- package/dist/{onboard-skills-Bn2T6lze.js → onboard-skills-BDCzVjxb.js} +1 -1
- package/dist/{onboard-skills-c4Rw-CGf.js → onboard-skills-CbzgBT1W.js} +1 -1
- package/dist/{onboarding-COqa6a28.js → onboarding-Dnn_0VTy.js} +10 -10
- package/dist/{onboarding-BTNiewJj.js → onboarding-DxUcsrKV.js} +10 -10
- package/dist/{onboarding.finalize-CAax5IdL.js → onboarding.finalize-1kzzMLFM.js} +33 -33
- package/dist/{onboarding.finalize-CDsTN9zD.js → onboarding.finalize-Dwr-jEtL.js} +31 -31
- package/dist/{onboarding.gateway-config-D6SN3HBb.js → onboarding.gateway-config-B9zGPfCl.js} +4 -4
- package/dist/{onboarding.gateway-config-DOna9Sr4.js → onboarding.gateway-config-DKwJ5bWd.js} +4 -4
- package/dist/{outbound-BihTVvMr.js → outbound-BIOChOHt.js} +1 -1
- package/dist/{outbound-drXCcH8D.js → outbound-Bt8rj9kO.js} +1 -1
- package/dist/{outbound-B_wliV26.js → outbound-DL8bdXlZ.js} +7 -7
- package/dist/{outbound-attachment-BOy-OY4-.js → outbound-attachment-BzwVH4Pn.js} +2 -2
- package/dist/{outbound-DyBiNY4z.js → outbound-wnv03tb3.js} +1 -1
- package/dist/{pairing-cli-CpKm3M-X.js → pairing-cli-DSM82gJG.js} +1 -1
- package/dist/{pairing-cli-CQRAnpvm.js → pairing-cli-HDWwcqjZ.js} +1 -1
- package/dist/{paths-DEuVuViW.js → paths-CbQV9WEg.js} +1 -1
- package/dist/{pi-auth-json-BQcKJvH0.js → pi-auth-json-CCaxCywz.js} +1 -1
- package/dist/{pi-embedded-R_JHJFwq.js → pi-embedded-BfEg6Wwb.js} +468 -253
- package/dist/{pi-embedded-helpers-BuVSLhG_.js → pi-embedded-helpers-BgdB5kvy.js} +1 -1
- package/dist/{pi-embedded-helpers-DE9h5GAu.js → pi-embedded-helpers-DA4liAIZ.js} +1 -1
- package/dist/{pi-embedded-helpers-BJrRH97f.js → pi-embedded-helpers-Dij3O6ox.js} +5 -5
- package/dist/{pi-embedded-helpers-Cr1X3W9i.js → pi-embedded-helpers-GaCyI2oH.js} +73 -73
- package/dist/{pi-tools.policy-C6MWZ59E.js → pi-tools.policy-DRWb_Cax.js} +2 -2
- package/dist/{pi-tools.policy-De00gPXt.js → pi-tools.policy-DxNwL7Dl.js} +2 -2
- package/dist/{plugin-registry-DeT0nOee.js → plugin-registry-BMFEJ4FA.js} +2 -2
- package/dist/{plugin-registry-DMUt9X9t.js → plugin-registry-wAQeBSeD.js} +2 -2
- package/dist/plugin-sdk/agents/session-empty-prune.d.ts +37 -0
- package/dist/plugin-sdk/agents/session-transcript-repair.d.ts +8 -0
- package/dist/plugin-sdk/{audio-preflight-JLsqSVmS.js → audio-preflight-BacDFPyc.js} +5 -5
- package/dist/plugin-sdk/{channel-web-BtuQPMkd.js → channel-web-Ba27v-Om.js} +7 -7
- package/dist/plugin-sdk/{chrome-cPabhZZ4.js → chrome-BMimuhgP.js} +1 -1
- package/dist/plugin-sdk/config/model-profiles.d.ts +10 -0
- package/dist/plugin-sdk/config/zod-schema.core.d.ts +8 -0
- package/dist/plugin-sdk/config/zod-schema.d.ts +4 -0
- package/dist/plugin-sdk/{config-XjK1L039.js → config-DdA6JiyD.js} +9 -1
- package/dist/plugin-sdk/{deliver-Clj5uUID.js → deliver-Bxa1-mj5.js} +2 -2
- package/dist/plugin-sdk/{image-CAA-0T17.js → image-aq-JAobP.js} +2 -2
- package/dist/plugin-sdk/index.js +17 -17
- package/dist/plugin-sdk/{login-Btqnuww9.js → login-CHgiUvI_.js} +2 -2
- package/dist/plugin-sdk/{login-qr-Bxhch9R1.js → login-qr-D5vJo1fy.js} +2 -2
- package/dist/plugin-sdk/{outbound-D_7ktHfW.js → outbound-CD38Hxn9.js} +1 -1
- package/dist/plugin-sdk/{pi-embedded-helpers-CDrcAlGW.js → pi-embedded-helpers-BPvzgLtj.js} +5 -5
- package/dist/plugin-sdk/{pw-ai-CJjlxWj7.js → pw-ai-fdBOQzz5.js} +2 -2
- package/dist/plugin-sdk/{replies-DC9NI2KS.js → replies-CW_-4klO.js} +1 -1
- package/dist/plugin-sdk/{reply-CnTdwks6.js → reply-Bok_WQGW.js} +464 -249
- package/dist/plugin-sdk/{runner-CBq0_f-j.js → runner-BQJ7x06O.js} +2 -2
- package/dist/plugin-sdk/{send-BditKDxK.js → send-C4t6h9-o.js} +1 -1
- package/dist/plugin-sdk/{send-u7SJPkmf.js → send-Cz_FQ8Ao.js} +1 -1
- package/dist/plugin-sdk/{send-vTA7ntTD.js → send-DG6c7BpZ.js} +1 -1
- package/dist/plugin-sdk/{send-CdJoYllr.js → send-HKy51Hz_.js} +1 -1
- package/dist/plugin-sdk/{send-BeO7M3pz.js → send-Xy1L54q4.js} +1 -1
- package/dist/plugin-sdk/{session-t6hhaLPe.js → session-BUzIlHr9.js} +1 -1
- package/dist/plugin-sdk/{web-BkK8fGjJ.js → web-BoOAa0Xn.js} +17 -17
- package/dist/plugin-sdk/{whatsapp-actions-DifisvHY.js → whatsapp-actions-CZLagx0h.js} +2 -2
- package/dist/{plugins-Bkr5ZdYs.js → plugins-BzmbgY7s.js} +9 -9
- package/dist/{plugins-cli-D85G3qZp.js → plugins-cli-B36YKKla.js} +26 -26
- package/dist/{plugins-cli-BCYM8B89.js → plugins-cli-DoJbbST7.js} +27 -27
- package/dist/{program-C4k7oBuC.js → program-4f7W2RMs.js} +33 -33
- package/dist/{program-context-CiGMAzyC.js → program-context-Y4KnAKNT.js} +38 -38
- package/dist/{prompt-select-styled-CYiMonwj.js → prompt-select-styled-D0sLJ4TD.js} +14 -14
- package/dist/{prompt-select-styled-CoWkFI4l.js → prompt-select-styled-Dql_0SI0.js} +14 -14
- package/dist/{provider-auth-helpers-CfkQBpo7.js → provider-auth-helpers-CJbHC_mv.js} +2 -2
- package/dist/{provider-auth-helpers-B8RGFZit.js → provider-auth-helpers-GSv3namf.js} +2 -2
- package/dist/{push-apns-DmpUv3y4.js → push-apns-giplY7u-.js} +1 -1
- package/dist/{push-apns-DM6nj062.js → push-apns-sxB8QxSj.js} +1 -1
- package/dist/{pw-ai-CbyO1fbh.js → pw-ai-BCSFVeD5.js} +2 -2
- package/dist/{pw-ai-CS2tDZd2.js → pw-ai-BO5cSmwD.js} +2 -2
- package/dist/{pw-ai-C_1hRlOM.js → pw-ai-DQohWnzT.js} +2 -2
- package/dist/{pw-ai-Ch_WUbQZ.js → pw-ai-pQoxTh-a.js} +11 -11
- package/dist/{qmd-manager-8-Z3Cdpt.js → qmd-manager-lBS9mT9w.js} +7 -7
- package/dist/{qr-cli-9L-HExyH.js → qr-cli-CejYwqsj.js} +1 -1
- package/dist/{qr-cli-mgnfD5ce.js → qr-cli-XttU2KOR.js} +1 -1
- package/dist/{register.agent-DX-OyYzL.js → register.agent-_2tVQLMK.js} +34 -34
- package/dist/{register.agent-DcvwdQXs.js → register.agent-vd2BSsyE.js} +32 -32
- package/dist/{register.configure-DBaELzEM.js → register.configure-BVKwTrz8.js} +37 -37
- package/dist/{register.configure-Bldjj3LP.js → register.configure-D-XV6_Nb.js} +36 -36
- package/dist/{register.maintenance-DAwf6cHN.js → register.maintenance-BqYR2fop.js} +36 -36
- package/dist/{register.maintenance-DVv8ljal.js → register.maintenance-XySU31jf.js} +34 -34
- package/dist/{register.message-ClKGIfK4.js → register.message-CCfWNWs3.js} +26 -26
- package/dist/{register.message-DUeR-Dz2.js → register.message-DOyREWdG.js} +27 -27
- package/dist/{register.onboard-DJEZcUm5.js → register.onboard-Dy_D_uMj.js} +33 -33
- package/dist/{register.onboard-DWrxbBr5.js → register.onboard-zmF-euog.js} +32 -32
- package/dist/{register.setup-BDqhSgCz.js → register.setup-DiGPa1Fw.js} +32 -32
- package/dist/{register.setup-Ah9E7LHA.js → register.setup-cE7gPp2m.js} +33 -33
- package/dist/{register.status-health-sessions-CMQS8zwA.js → register.status-health-sessions-DWKL1rkz.js} +29 -29
- package/dist/{register.status-health-sessions-BJYemCHi.js → register.status-health-sessions-ksv1WnIs.js} +31 -31
- package/dist/{register.subclis-Bb0yWevQ.js → register.subclis-Crt_IYK0.js} +28 -28
- package/dist/{registry-UkL38jvt.js → registry-DYq1AYOv.js} +17 -17
- package/dist/{replies-vgss3_QA.js → replies-BMqtgBhh.js} +1 -1
- package/dist/{replies-DO80zq73.js → replies-Bo49QlAg.js} +1 -1
- package/dist/{replies-CbeMv5WZ.js → replies-CBS0567j.js} +3 -3
- package/dist/{replies-CM5QgPHM.js → replies-CfyMcfoY.js} +1 -1
- package/dist/{reply-YphHjxHp.js → reply-CjYJHt_H.js} +475 -260
- package/dist/{reply-prefix-ZnX2V-k9.js → reply-prefix-CvEIl6_d.js} +1 -1
- package/dist/{resolve-route-gl0ZOOKR.js → resolve-route-DX7xcMsD.js} +4 -4
- package/dist/{retry-D25Z8MVS.js → retry-B-y5suGA.js} +1 -1
- package/dist/{routes-B1-BfEDm.js → routes-BAZTZNuQ.js} +3 -3
- package/dist/{routes-BFw2-yAN.js → routes-CMvgBDOg.js} +3 -3
- package/dist/{rpc-gJOYujMj.js → rpc-Co5PQ3IJ.js} +1 -1
- package/dist/{rpc--E7i90bk.js → rpc-D0FiEinj.js} +1 -1
- package/dist/{run-main-CZI2Ne08.js → run-main-bOlPbL7t.js} +44 -44
- package/dist/{runner-B2Y_5crX.js → runner-B0AbN8wV.js} +22 -22
- package/dist/{runner-DKkSu9cc.js → runner-Ct0suQrd.js} +2 -2
- package/dist/{runner-DmM2HhB-.js → runner-DRv0uCK_.js} +3 -3
- package/dist/{runner-CW9KEL7W.js → runner-Dd2bbNGV.js} +3 -3
- package/dist/{sandbox-DAOxwUQm.js → sandbox-B6N8cV4d.js} +5 -5
- package/dist/{sandbox-BFzSUT19.js → sandbox-DY75ZyJD.js} +5 -5
- package/dist/{sandbox-cli-Cj5__-gh.js → sandbox-cli-BDM_QM_f.js} +6 -6
- package/dist/{sandbox-cli-BV6FS0bK.js → sandbox-cli-DwzaNjIJ.js} +6 -6
- package/dist/{security-cli-KxA9AZ3q.js → security-cli-CG1uSlRK.js} +9 -9
- package/dist/{security-cli-BA4AGkeh.js → security-cli-D5BWzqEJ.js} +9 -9
- package/dist/{send-ZI2bG_Jc.js → send-9SapUCg7.js} +1 -1
- package/dist/{send-Cutb0ZDY.js → send-B3RdXvjC.js} +1 -1
- package/dist/{send-CukP8Vq4.js → send-B7HhiTdx.js} +1 -1
- package/dist/{send-DHWMRnPk.js → send-B986asZ7.js} +1 -1
- package/dist/{send-iUSZIdml.js → send-B9EinkUl.js} +7 -7
- package/dist/{send-CCNIWI2Z.js → send-BNnv8GtF.js} +10 -10
- package/dist/{send-CY8oqBFg.js → send-BhJZ16uV.js} +1 -1
- package/dist/{send-Cgcbuw8U.js → send-Bm4ULEzh.js} +1 -1
- package/dist/{send-CFzf_ab4.js → send-BzKHnf3b.js} +1 -1
- package/dist/{send-DTTtmhjA.js → send-CC9V8V81.js} +1 -1
- package/dist/{send-CZr1hVHY.js → send-CQVnyJyF.js} +1 -1
- package/dist/{send-CPSKimCF.js → send-CZemAajS.js} +6 -6
- package/dist/{send-Dy8tsHUE.js → send-DI9Vhnmw.js} +6 -6
- package/dist/{send-CB3dCCmE.js → send-DLWaX69q.js} +1 -1
- package/dist/{send-DK_pm_7l.js → send-DSnJ503J.js} +1 -1
- package/dist/{send-CPF8hSFp.js → send-DVm0du0_.js} +1 -1
- package/dist/{send-sgxdFZNy.js → send-DaBsat3L.js} +18 -18
- package/dist/{send-iVPD3yf2.js → send-DdLJtOjk.js} +1 -1
- package/dist/{send-CR5fRDgW.js → send-DlQtxlG_.js} +1 -1
- package/dist/{send-BJTX03Bn.js → send-RfIXG6-I.js} +1 -1
- package/dist/{server-context-CHYWo_TC.js → server-context-CCBZN8a0.js} +5 -5
- package/dist/{server-context-H24IFajW.js → server-context-DK-T2rBR.js} +5 -5
- package/dist/{server-methods-DJ3Bi-Xg.js → server-methods-CiwWwj6K.js} +15 -15
- package/dist/{server-methods-C3xXynlm.js → server-methods-VimYvcpY.js} +16 -16
- package/dist/{server-node-events-Cgdwex4k.js → server-node-events-CHmLiFNV.js} +27 -27
- package/dist/{server-node-events-DS50d7AK.js → server-node-events-DYC45lKC.js} +26 -26
- package/dist/{session-Ckw7cXeP.js → session-C1cn-CxQ.js} +1 -1
- package/dist/{session-BF9s_N2s.js → session-CUeezgP1.js} +1 -1
- package/dist/{session-CINKYYDi.js → session-DsJGtM7g.js} +1 -1
- package/dist/{session-utils-Bka9dR4m.js → session-utils-B8Fif925.js} +3 -3
- package/dist/{session-BTpKgzso.js → session-v_9AVJhH.js} +8 -8
- package/dist/{sessions-CJXnZVjR.js → sessions-Cfa6JEB3.js} +1 -1
- package/dist/{sessions-DgYpBvse.js → sessions-Cpgnq0pA.js} +1 -1
- package/dist/{sessions-WBoXk-Ag.js → sessions-DfbhRBHR.js} +3 -3
- package/dist/{shared-CvNixzwn.js → shared-73T9fyuK.js} +1 -1
- package/dist/{shared-D8K9MkWg.js → shared-DdxPzyOH.js} +1 -1
- package/dist/{skill-commands-HBkNllDU.js → skill-commands-BiPrghRt.js} +16 -16
- package/dist/{skills-CGHRETGF.js → skills-Bs0AW1g3.js} +24 -24
- package/dist/{skills-cli-C-URp1av.js → skills-cli-DXkx4vNV.js} +1 -1
- package/dist/{skills-cli-CkTGL9dR.js → skills-cli-uEA9KXOO.js} +1 -1
- package/dist/{sqlite-JHY-uOmS.js → sqlite-BHWvOATS.js} +16 -16
- package/dist/{status-BBnhTX-n.js → status-CA5wJHMj.js} +2 -2
- package/dist/{status-0aNBSe72.js → status-DEpM69Pd.js} +9 -9
- package/dist/{status-2KD2q2sn.js → status-Dt_MXoNa.js} +2 -2
- package/dist/{status-D9uWA9pU.js → status-DxhtJtzE.js} +10 -10
- package/dist/{status.update-DbmZz0Aq.js → status.update-C2GN8s9C.js} +1 -1
- package/dist/{status.update-DP0OFqyb.js → status.update-CG0ciGaf.js} +1 -1
- package/dist/{store-Ea3zM6xK.js → store-01F_JM7O.js} +6 -6
- package/dist/{subagent-registry-aZczbtLM.js → subagent-registry-BPwn3Qm7.js} +476 -261
- package/dist/{subsystem-DN75fnEF.js → subsystem-BjyjJF-d.js} +1 -1
- package/dist/{system-cli-BXewgTZR.js → system-cli-DFZNGx0i.js} +3 -3
- package/dist/{system-cli-CECNjZdB.js → system-cli-Z7uzO8qd.js} +3 -3
- package/dist/{systemd-hints-sQipWGd1.js → systemd-hints-DT6cDIM2.js} +1 -1
- package/dist/{systemd-hints-DZH9qY5W.js → systemd-hints-xYZbFny_.js} +1 -1
- package/dist/{tables-Dkg9O8rv.js → tables-BuM4FKR3.js} +1 -1
- package/dist/{target-errors-Pr77jao5.js → target-errors-BEugWC4F.js} +2 -2
- package/dist/{thinking-C9-JAUzD.js → thinking-BprCy23Z.js} +5 -5
- package/dist/{tokens-CCZl4YHT.js → tokens-W0JzCJJM.js} +1 -1
- package/dist/{tool-images-B1qVCntj.js → tool-images-SqqWIT22.js} +2 -2
- package/dist/{tool-loop-detection-C33wf43N.js → tool-loop-detection-D5mBY7AC.js} +3 -3
- package/dist/{tui-DLaU7tTx.js → tui-DjPsMdL6.js} +4 -4
- package/dist/{tui-2nWOvxxE.js → tui-DrATGNms.js} +4 -4
- package/dist/{tui-cli-B-Nl_8uj.js → tui-cli-D19-MCXt.js} +9 -9
- package/dist/{tui-cli-D-PVUsS5.js → tui-cli-pWD_NrUR.js} +9 -9
- package/dist/{unified-runner-hulABWDL.js → unified-runner-CVkyzT1I.js} +444 -229
- package/dist/{update-cli-DwGmFbPH.js → update-cli-Dh_dfprI.js} +39 -39
- package/dist/{update-cli-CnN_k3P1.js → update-cli-Dv4c5Gup.js} +37 -37
- package/dist/{update-runner-BkdQhkKR.js → update-runner-CG_kbbGR.js} +1 -1
- package/dist/{update-runner-dT5l0kuK.js → update-runner-MMFI1UZ0.js} +1 -1
- package/dist/{web-DpQ5RaFz.js → web-BUc-ts5b.js} +58 -58
- package/dist/{web-C0ZdaR6w.js → web-CJk-lv93.js} +16 -16
- package/dist/{web-CJSRBiDm.js → web-CfVd3Mhp.js} +29 -29
- package/dist/{web-DPki9fDa.js → web-DCBOD-Vj.js} +29 -29
- package/dist/{webhooks-cli-iOLEyFdx.js → webhooks-cli-BRxe4uCg.js} +1 -1
- package/dist/{webhooks-cli-ChiCyIaD.js → webhooks-cli-CsRZl0_H.js} +1 -1
- package/dist/{whatsapp-actions-C8nNH4ax.js → whatsapp-actions-7YbV2-Fv.js} +2 -2
- package/dist/{whatsapp-actions-BW8P8Izy.js → whatsapp-actions-BylecqEa.js} +2 -2
- package/dist/{whatsapp-actions-BmcMtU_J.js → whatsapp-actions-ChO_shrk.js} +2 -2
- package/dist/{whatsapp-actions-D_w4AfW9.js → whatsapp-actions-mBarFBeS.js} +23 -23
- package/dist/{with-timeout-Di0nddLY.js → with-timeout-Cgi3TwWN.js} +1 -1
- package/dist/{with-timeout-D2z7OkiK.js → with-timeout-CtVdu_1U.js} +1 -1
- package/dist/{workspace-DqJ5h-ZB.js → workspace-DscDraUb.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/paths-CYmyCDsE.js +0 -212
|
@@ -1,77 +1,77 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-
|
|
2
|
+
import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-CE7eVGHg.js";
|
|
3
3
|
import { _ as isCronSessionKey, b as resolveThreadParentSessionKey, c as normalizeMainKey, d as sanitizeAgentId, f as DEFAULT_ACCOUNT_ID, g as isAcpSessionKey, h as getSubagentDepth, l as resolveAgentIdFromSessionKey, o as classifySessionKeyShape, p as normalizeAccountId$2, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID, u as resolveThreadSessionKeys, v as isSubagentSessionKey, y as parseAgentSessionKey } from "./session-key-BCzIW1Y2.js";
|
|
4
|
-
import { $ as warn, B as sleep$1, D as escapeRegExp, E as ensureDir$3, G as danger, I as resolveUserPath, J as logVerbose, M as normalizeE164, O as formatTerminalLink, R as shortenHomeInString, S as CONFIG_DIR, U as truncateUtf16Safe, V as sliceUtf16Safe, W as isPlainObject, X as setVerbose, Z as shouldLogVerbose, _ as matchPluginCommand, a as normalizeAnyChannelId, d as createPluginRegistry, dt as resolvePreferredSymiTmpDir, et as colorize, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, k as isRecord$1, l as requireActivePluginRegistry, lt as normalizeLogLevel, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, nt as theme, o as normalizeChannelId, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, rt as getChildLogger, tt as isRich, u as setActivePluginRegistry, v as createInternalHookEvent, w as clampInt, x as triggerInternalHook, z as shortenHomePath } from "./registry-
|
|
5
|
-
import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, d as resolveSessionAgentIds, i as resolveAgentModelFallbacksOverride, l as resolveEffectiveModelFallbacks, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId } from "./agent-scope-
|
|
6
|
-
import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-
|
|
7
|
-
import { S as logWarn, _ as runExec, b as logError, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, m as resolveSymiPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug } from "./workspace-
|
|
8
|
-
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-
|
|
9
|
-
import { $ as resolveAuthProfileDisplayLabel, B as resolveApiKeyForProvider, C as normalizeProviderId, D as resolveModelRefFromString, E as resolveDefaultModelForAgent, F as OLLAMA_NATIVE_BASE_URL, G as getShellPathFromLoginShell, H as resolveModelAuthMode, I as createOllamaStreamFn, L as getApiKeyForModel, O as resolveSubagentSpawnModelSelection, Q as DEFAULT_PROVIDER, R as getCustomProviderApiKey, S as normalizeModelRef$2, T as resolveConfiguredModelRef, V as resolveEnvApiKey, W as normalizeSecretInput, X as DEFAULT_CONTEXT_TOKENS, Z as DEFAULT_MODEL, _ as buildConfiguredAllowlistKeys, a as markAuthProfileFailure, b as isCliProvider, c as dedupeProfileIds, d as ensureAuthProfileStore, et as resolveSymiAgentDir, f as resolveAuthStorePathForDisplay, g as buildAllowedModelSet, i as isProfileInCooldown, k as resolveThinkingDefault, l as listProfilesForProvider, n as resolveAuthProfileOrder, o as markAuthProfileUsed, p as withFileLock, q as resolveShellEnvFallbackTimeoutMs, r as getSoonestCooldownExpiry, s as resolveApiKeyForProfile, u as markAuthProfileGood, v as buildModelAliasIndex, x as modelKey, y as findNormalizedProviderValue, z as requireApiKey } from "./auth-profiles-
|
|
10
|
-
import { n as formatCliCommand, r as resolveCliName, t as isTruthyEnvValue } from "./env-
|
|
11
|
-
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-
|
|
4
|
+
import { $ as warn, B as sleep$1, D as escapeRegExp, E as ensureDir$3, G as danger, I as resolveUserPath, J as logVerbose, M as normalizeE164, O as formatTerminalLink, R as shortenHomeInString, S as CONFIG_DIR, U as truncateUtf16Safe, V as sliceUtf16Safe, W as isPlainObject, X as setVerbose, Z as shouldLogVerbose, _ as matchPluginCommand, a as normalizeAnyChannelId, d as createPluginRegistry, dt as resolvePreferredSymiTmpDir, et as colorize, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, k as isRecord$1, l as requireActivePluginRegistry, lt as normalizeLogLevel, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, nt as theme, o as normalizeChannelId, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, rt as getChildLogger, tt as isRich, u as setActivePluginRegistry, v as createInternalHookEvent, w as clampInt, x as triggerInternalHook, z as shortenHomePath } from "./registry-DYq1AYOv.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-CpEJ0B88.js";
|
|
6
|
+
import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-BjyjJF-d.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-DscDraUb.js";
|
|
8
|
+
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-CbQV9WEg.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-q3HjbboY.js";
|
|
10
|
+
import { n as formatCliCommand, r as resolveCliName, t as isTruthyEnvValue } from "./env-BDXYbTKj.js";
|
|
11
|
+
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-cCYzSU9h.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-GaCyI2oH.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-B6OxYMgn.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-yb7sAlu4.js";
|
|
16
|
+
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-BYOhnxTr.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-Bs0AW1g3.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-C7CauEK8.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-01F_JM7O.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-BprCy23Z.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-OlFBYAw8.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-BzmbgY7s.js";
|
|
27
|
+
import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-BRw8yhIW.js";
|
|
28
|
+
import { t as resolveIMessageAccount } from "./accounts-3dCrO3oZ.js";
|
|
29
|
+
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-BuZxOb3B.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-DI9Vhnmw.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-BNnv8GtF.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-SqqWIT22.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-C1HRkzPJ.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-CQiU0O8b.js";
|
|
36
36
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-Zw87xFym.js";
|
|
37
|
-
import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-
|
|
38
|
-
import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-
|
|
39
|
-
import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-
|
|
40
|
-
import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normalizeAllowFromWithStore$1, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as formatLocationText, H as firstDefined$1, I as resolveTelegramReplyId, J as readChannelAllowFromStore, K as toLocationContext, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as listPairingChannels, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as isSenderIdAllowed, V as resolveSenderAllowMatch, W as mergeAllowFromSources, X as upsertChannelPairingRequest, Y as removeChannelAllowFromStoreEntry, Z as getPairingAdapter, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildGroupLabel, c as sendStickerTelegram, d as wasSentByBot, et as parseTelegramTarget, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as addChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as resolveTelegramTargetChatType, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-
|
|
37
|
+
import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-CbyTdMd5.js";
|
|
38
|
+
import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-CCaxCywz.js";
|
|
39
|
+
import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-W0JzCJJM.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-DaBsat3L.js";
|
|
41
41
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-CuZX_Q4t.js";
|
|
42
|
-
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
43
|
-
import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-
|
|
44
|
-
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-
|
|
45
|
-
import { n as retryAsync } from "./retry-
|
|
46
|
-
import { a as createActionGate, c as jsonResult, d as readReactionParams, f as readStringArrayParam, l as parseAvailableTags, m as readStringParam, n as missingTargetError, o as imageResult, p as readStringOrNumberParam, r as unknownTargetError, s as imageResultFromFile, t as ambiguousTargetError, u as readNumberParam } from "./target-errors-
|
|
47
|
-
import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-
|
|
48
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
42
|
+
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-CvEIl6_d.js";
|
|
43
|
+
import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-CJ3M1Uxq.js";
|
|
44
|
+
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-BHWvOATS.js";
|
|
45
|
+
import { n as retryAsync } from "./retry-B-y5suGA.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-BEugWC4F.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-BHW8Yu5A.js";
|
|
48
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-Dnj2LQUc.js";
|
|
49
49
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-Cj6kcyGt.js";
|
|
50
|
-
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-
|
|
51
|
-
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-
|
|
52
|
-
import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-
|
|
53
|
-
import { _ as CLI_OUTPUT_MAX_BUFFER, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as resolveMediaUnderstandingScope, h as normalizeMediaUnderstandingChatType, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveTimeoutMs$1, n as createMediaAttachmentCache, o as runCapability, p as resolveConcurrency, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as applyTemplate, y as registerUnhandledRejectionHandler } from "./runner-
|
|
54
|
-
import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-
|
|
50
|
+
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-Se92wAN5.js";
|
|
51
|
+
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-JAy_3A3B.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-BSvi46KZ.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-B0AbN8wV.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-BiPrghRt.js";
|
|
55
55
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-Dvqh1Tgb.js";
|
|
56
56
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-Dnti0cFs.js";
|
|
57
57
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-BGS2SHjF.js";
|
|
58
|
-
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-
|
|
58
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-D-kw83R0.js";
|
|
59
59
|
import { n as normalizePollInput } from "./polls-BKbIUHj7.js";
|
|
60
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
61
|
-
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-
|
|
62
|
-
import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-
|
|
63
|
-
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-
|
|
60
|
+
import { t as convertMarkdownTables } from "./tables-BuM4FKR3.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-CZemAajS.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-B9EinkUl.js";
|
|
63
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-DX7xcMsD.js";
|
|
64
64
|
import { t as makeProxyFetch } from "./proxy-DVy9foH0.js";
|
|
65
|
-
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
66
|
-
import { t as getActiveWebListener } from "./active-listener-
|
|
65
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-CBS0567j.js";
|
|
66
|
+
import { t as getActiveWebListener } from "./active-listener-Br2FcRv7.js";
|
|
67
67
|
import { createRequire } from "node:module";
|
|
68
68
|
import * as path$1 from "node:path";
|
|
69
69
|
import path from "node:path";
|
|
70
|
-
import
|
|
70
|
+
import fs, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
71
71
|
import os, { homedir } from "node:os";
|
|
72
72
|
import JSON5 from "json5";
|
|
73
|
-
import * as fs$
|
|
74
|
-
import fs from "node:fs/promises";
|
|
73
|
+
import * as fs$2 from "node:fs/promises";
|
|
74
|
+
import fs$1 from "node:fs/promises";
|
|
75
75
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
76
76
|
import { inspect, promisify } from "node:util";
|
|
77
77
|
import { fileURLToPath } from "node:url";
|
|
@@ -81,7 +81,7 @@ import AjvPkg from "ajv";
|
|
|
81
81
|
import { CURRENT_SESSION_VERSION, DefaultResourceLoader, SessionManager, SettingsManager, codingTools, createAgentSession, createEditTool, createReadTool, createWriteTool, estimateTokens, generateSummary, readTool } from "@mariozechner/pi-coding-agent";
|
|
82
82
|
import { createServer } from "node:http";
|
|
83
83
|
import { ProxyAgent, fetch as fetch$1 } from "undici";
|
|
84
|
-
import WebSocket, { WebSocket
|
|
84
|
+
import WebSocket$1, { WebSocket } from "ws";
|
|
85
85
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
86
86
|
import { EdgeTTS } from "node-edge-tts";
|
|
87
87
|
import { createJiti } from "jiti";
|
|
@@ -218,13 +218,97 @@ const BUILTIN_PROFILES = [
|
|
|
218
218
|
}
|
|
219
219
|
},
|
|
220
220
|
{
|
|
221
|
-
match: ["
|
|
222
|
-
label: "Qwen 3.
|
|
221
|
+
match: ["qwen3.6", "spider-qwen36"],
|
|
222
|
+
label: "Qwen 3.6",
|
|
223
|
+
params: {
|
|
224
|
+
temperature: 1,
|
|
225
|
+
top_p: .95,
|
|
226
|
+
top_k: 20,
|
|
227
|
+
max_tokens: 16384,
|
|
228
|
+
presence_penalty: 1.5,
|
|
229
|
+
chatTemplateKwargs: { preserve_thinking: true }
|
|
230
|
+
},
|
|
231
|
+
streaming: {
|
|
232
|
+
deltaThrottleMs: 50,
|
|
233
|
+
flushOnFinal: true,
|
|
234
|
+
chunkPattern: "burst"
|
|
235
|
+
},
|
|
236
|
+
filters: {
|
|
237
|
+
stripPatterns: [],
|
|
238
|
+
suppressMonologue: true,
|
|
239
|
+
hasStructuredThinking: true,
|
|
240
|
+
validateToolArgs: false
|
|
241
|
+
},
|
|
242
|
+
promptAdditions: [
|
|
243
|
+
"CRITICAL OUTPUT RULES:",
|
|
244
|
+
"- Your response ends when you have delivered the answer. Do not append anything after.",
|
|
245
|
+
"- Do not begin any sentence with 'I have addressed' or 'I've reviewed'.",
|
|
246
|
+
"- Do not write verification checklists, self-assessments, or numbered assessment lists after your answer.",
|
|
247
|
+
"- Do not write 'Verification:', 'Requirements:', 'Status Check:', or 'Everything is correct'.",
|
|
248
|
+
"- Keep planning and reasoning internal. Only speak when you have a result or need user input.",
|
|
249
|
+
"- When working on multi-step tasks, send a brief one-line status update so the user knows you are active."
|
|
250
|
+
],
|
|
251
|
+
ui: {
|
|
252
|
+
badge: "Spider",
|
|
253
|
+
watchdogMs: 9e5,
|
|
254
|
+
armWatchdogOnSend: true
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
match: ["trevorjs/gemma", "spider-gemma4"],
|
|
259
|
+
label: "Gemma 4 (Spider)",
|
|
223
260
|
params: {
|
|
224
261
|
temperature: 1,
|
|
225
262
|
top_p: .95,
|
|
226
263
|
top_k: 64,
|
|
227
|
-
max_tokens:
|
|
264
|
+
max_tokens: 4096,
|
|
265
|
+
stop: ["<end_of_turn>", "<eos>"]
|
|
266
|
+
},
|
|
267
|
+
streaming: {
|
|
268
|
+
deltaThrottleMs: 50,
|
|
269
|
+
flushOnFinal: true,
|
|
270
|
+
chunkPattern: "burst"
|
|
271
|
+
},
|
|
272
|
+
filters: {
|
|
273
|
+
stripPatterns: [
|
|
274
|
+
"<\\|channel>\\w*",
|
|
275
|
+
"<channel\\|>",
|
|
276
|
+
"<start_of_turn>(?:model|user)?",
|
|
277
|
+
"<end_of_turn>"
|
|
278
|
+
],
|
|
279
|
+
suppressMonologue: true,
|
|
280
|
+
hasStructuredThinking: false,
|
|
281
|
+
validateToolArgs: true
|
|
282
|
+
},
|
|
283
|
+
promptAdditions: [
|
|
284
|
+
"CRITICAL OUTPUT RULES:",
|
|
285
|
+
"- Your response ends when you have delivered the answer. Do not append anything after.",
|
|
286
|
+
"- Do not output raw control tokens, channel tags, or turn markers.",
|
|
287
|
+
"- Do not begin any sentence with 'I have addressed' or 'I've reviewed'.",
|
|
288
|
+
"- Do not write verification checklists, self-assessments, or numbered assessment lists after your answer.",
|
|
289
|
+
"- Do not write 'Verification:', 'Requirements:', 'Status Check:', or 'Everything is correct'.",
|
|
290
|
+
"- Send brief progress updates on long tasks so the user knows you are active.",
|
|
291
|
+
"- When calling tools, provide arguments as clean values only. Never include <|, |>, or XML-like tags in tool argument values. For exec/bash commands, provide only valid shell syntax."
|
|
292
|
+
],
|
|
293
|
+
ui: {
|
|
294
|
+
badge: "Spider",
|
|
295
|
+
watchdogMs: 6e5,
|
|
296
|
+
armWatchdogOnSend: true
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
match: [
|
|
301
|
+
"qwen-cw",
|
|
302
|
+
"spider-qwen35",
|
|
303
|
+
"qwen3"
|
|
304
|
+
],
|
|
305
|
+
label: "Qwen 3.5",
|
|
306
|
+
params: {
|
|
307
|
+
temperature: 1,
|
|
308
|
+
top_p: .95,
|
|
309
|
+
top_k: 20,
|
|
310
|
+
max_tokens: 16384,
|
|
311
|
+
presence_penalty: 1.5
|
|
228
312
|
},
|
|
229
313
|
streaming: {
|
|
230
314
|
deltaThrottleMs: 50,
|
|
@@ -3922,7 +4006,7 @@ async function resolveSymiDocsPath(params) {
|
|
|
3922
4006
|
const workspaceDir = params.workspaceDir?.trim();
|
|
3923
4007
|
if (workspaceDir) {
|
|
3924
4008
|
const workspaceDocs = path.join(workspaceDir, "docs");
|
|
3925
|
-
if (
|
|
4009
|
+
if (fs.existsSync(workspaceDocs)) return workspaceDocs;
|
|
3926
4010
|
}
|
|
3927
4011
|
const packageRoot = await resolveSymiPackageRoot({
|
|
3928
4012
|
cwd: params.cwd,
|
|
@@ -3931,7 +4015,7 @@ async function resolveSymiDocsPath(params) {
|
|
|
3931
4015
|
});
|
|
3932
4016
|
if (!packageRoot) return null;
|
|
3933
4017
|
const packageDocs = path.join(packageRoot, "docs");
|
|
3934
|
-
return
|
|
4018
|
+
return fs.existsSync(packageDocs) ? packageDocs : null;
|
|
3935
4019
|
}
|
|
3936
4020
|
|
|
3937
4021
|
//#endregion
|
|
@@ -4240,7 +4324,7 @@ async function getMemorySearchManager(params) {
|
|
|
4240
4324
|
if (cached) return { manager: cached };
|
|
4241
4325
|
}
|
|
4242
4326
|
try {
|
|
4243
|
-
const { QmdMemoryManager } = await import("./qmd-manager-
|
|
4327
|
+
const { QmdMemoryManager } = await import("./qmd-manager-lBS9mT9w.js");
|
|
4244
4328
|
const primary = await QmdMemoryManager.create({
|
|
4245
4329
|
cfg: params.cfg,
|
|
4246
4330
|
agentId: params.agentId,
|
|
@@ -4252,7 +4336,7 @@ async function getMemorySearchManager(params) {
|
|
|
4252
4336
|
const wrapper = new FallbackMemoryManager({
|
|
4253
4337
|
primary,
|
|
4254
4338
|
fallbackFactory: async () => {
|
|
4255
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
4339
|
+
const { MemoryIndexManager } = await import("./manager-CJ3M1Uxq.js").then((n) => n.t);
|
|
4256
4340
|
return await MemoryIndexManager.get(params);
|
|
4257
4341
|
}
|
|
4258
4342
|
}, () => QMD_MANAGER_CACHE.delete(cacheKey));
|
|
@@ -4265,7 +4349,7 @@ async function getMemorySearchManager(params) {
|
|
|
4265
4349
|
}
|
|
4266
4350
|
}
|
|
4267
4351
|
try {
|
|
4268
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
4352
|
+
const { MemoryIndexManager } = await import("./manager-CJ3M1Uxq.js").then((n) => n.t);
|
|
4269
4353
|
return { manager: await MemoryIndexManager.get(params) };
|
|
4270
4354
|
} catch (err) {
|
|
4271
4355
|
return {
|
|
@@ -5415,6 +5499,36 @@ function makeMissingToolResult(params) {
|
|
|
5415
5499
|
timestamp: Date.now()
|
|
5416
5500
|
};
|
|
5417
5501
|
}
|
|
5502
|
+
/**
|
|
5503
|
+
* True when an assistant message has no tool calls and only empty/whitespace
|
|
5504
|
+
* text or thinking blocks. This happens when a stream fails before any
|
|
5505
|
+
* content arrives — the blank entry is otherwise persisted and produces
|
|
5506
|
+
* consecutive same-role messages, which strict providers (vLLM) reject with
|
|
5507
|
+
* "role must alternate" errors that poison the session for every future turn.
|
|
5508
|
+
*/
|
|
5509
|
+
function isEmptyAssistantMessage(message) {
|
|
5510
|
+
if (!message || typeof message !== "object") return false;
|
|
5511
|
+
const msg = message;
|
|
5512
|
+
if (msg.role !== "assistant") return false;
|
|
5513
|
+
if (!Array.isArray(msg.content) || msg.content.length === 0) return true;
|
|
5514
|
+
for (const block of msg.content) {
|
|
5515
|
+
if (!block || typeof block !== "object") continue;
|
|
5516
|
+
const type = block.type;
|
|
5517
|
+
if (type === "toolCall" || type === "toolUse" || type === "functionCall") return false;
|
|
5518
|
+
if (type === "text") {
|
|
5519
|
+
const text = block.text;
|
|
5520
|
+
if (typeof text === "string" && text.trim().length > 0) return false;
|
|
5521
|
+
continue;
|
|
5522
|
+
}
|
|
5523
|
+
if (type === "thinking") {
|
|
5524
|
+
const thinking = block.thinking;
|
|
5525
|
+
if (typeof thinking === "string" && thinking.trim().length > 0) return false;
|
|
5526
|
+
continue;
|
|
5527
|
+
}
|
|
5528
|
+
return false;
|
|
5529
|
+
}
|
|
5530
|
+
return true;
|
|
5531
|
+
}
|
|
5418
5532
|
function stripToolResultDetails(messages) {
|
|
5419
5533
|
let touched = false;
|
|
5420
5534
|
const out = [];
|
|
@@ -6813,7 +6927,7 @@ async function recordLoopOutcome(args) {
|
|
|
6813
6927
|
if (!args.ctx?.sessionKey) return;
|
|
6814
6928
|
try {
|
|
6815
6929
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
|
|
6816
|
-
const { recordToolCallOutcome } = await import("./tool-loop-detection-
|
|
6930
|
+
const { recordToolCallOutcome } = await import("./tool-loop-detection-D5mBY7AC.js");
|
|
6817
6931
|
recordToolCallOutcome(getDiagnosticSessionState({
|
|
6818
6932
|
sessionKey: args.ctx.sessionKey,
|
|
6819
6933
|
sessionId: args.ctx?.agentId
|
|
@@ -6834,8 +6948,8 @@ async function runBeforeToolCallHook(args) {
|
|
|
6834
6948
|
const params = args.params;
|
|
6835
6949
|
if (args.ctx?.sessionKey) {
|
|
6836
6950
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
|
|
6837
|
-
const { logToolLoopAction } = await import("./diagnostic-
|
|
6838
|
-
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-
|
|
6951
|
+
const { logToolLoopAction } = await import("./diagnostic-CQiU0O8b.js").then((n) => n.n);
|
|
6952
|
+
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-D5mBY7AC.js");
|
|
6839
6953
|
const sessionState = getDiagnosticSessionState({
|
|
6840
6954
|
sessionKey: args.ctx.sessionKey,
|
|
6841
6955
|
sessionId: args.ctx?.agentId
|
|
@@ -7122,7 +7236,7 @@ function resolveDefaultIdentityPath() {
|
|
|
7122
7236
|
return path.join(resolveStateDir(), "identity", "device.json");
|
|
7123
7237
|
}
|
|
7124
7238
|
function ensureDir$2(filePath) {
|
|
7125
|
-
|
|
7239
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
7126
7240
|
}
|
|
7127
7241
|
const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
|
|
7128
7242
|
function base64UrlEncode(buf) {
|
|
@@ -7158,8 +7272,8 @@ function generateIdentity() {
|
|
|
7158
7272
|
}
|
|
7159
7273
|
function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
7160
7274
|
try {
|
|
7161
|
-
if (
|
|
7162
|
-
const raw =
|
|
7275
|
+
if (fs.existsSync(filePath)) {
|
|
7276
|
+
const raw = fs.readFileSync(filePath, "utf8");
|
|
7163
7277
|
const parsed = JSON.parse(raw);
|
|
7164
7278
|
if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
|
|
7165
7279
|
const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
|
|
@@ -7168,9 +7282,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
7168
7282
|
...parsed,
|
|
7169
7283
|
deviceId: derivedId
|
|
7170
7284
|
};
|
|
7171
|
-
|
|
7285
|
+
fs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
|
|
7172
7286
|
try {
|
|
7173
|
-
|
|
7287
|
+
fs.chmodSync(filePath, 384);
|
|
7174
7288
|
} catch {}
|
|
7175
7289
|
return {
|
|
7176
7290
|
deviceId: derivedId,
|
|
@@ -7195,9 +7309,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
7195
7309
|
privateKeyPem: identity.privateKeyPem,
|
|
7196
7310
|
createdAtMs: Date.now()
|
|
7197
7311
|
};
|
|
7198
|
-
|
|
7312
|
+
fs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
|
|
7199
7313
|
try {
|
|
7200
|
-
|
|
7314
|
+
fs.chmodSync(filePath, 384);
|
|
7201
7315
|
} catch {}
|
|
7202
7316
|
return identity;
|
|
7203
7317
|
}
|
|
@@ -7220,7 +7334,7 @@ function normalizeFingerprint(input) {
|
|
|
7220
7334
|
const execFileAsync = promisify(execFile);
|
|
7221
7335
|
async function fileExists(filePath) {
|
|
7222
7336
|
try {
|
|
7223
|
-
await fs.access(filePath);
|
|
7337
|
+
await fs$1.access(filePath);
|
|
7224
7338
|
return true;
|
|
7225
7339
|
} catch {
|
|
7226
7340
|
return false;
|
|
@@ -7247,8 +7361,8 @@ async function generateSelfSignedCert(params) {
|
|
|
7247
7361
|
"-subj",
|
|
7248
7362
|
"/CN=symi-gateway"
|
|
7249
7363
|
]);
|
|
7250
|
-
await fs.chmod(params.keyPath, 384).catch(() => {});
|
|
7251
|
-
await fs.chmod(params.certPath, 384).catch(() => {});
|
|
7364
|
+
await fs$1.chmod(params.keyPath, 384).catch(() => {});
|
|
7365
|
+
await fs$1.chmod(params.certPath, 384).catch(() => {});
|
|
7252
7366
|
params.log?.info?.(`gateway tls: generated self-signed cert at ${shortenHomeInString(params.certPath)}`);
|
|
7253
7367
|
}
|
|
7254
7368
|
async function loadGatewayTlsRuntime(cfg, log) {
|
|
@@ -7286,9 +7400,9 @@ async function loadGatewayTlsRuntime(cfg, log) {
|
|
|
7286
7400
|
error: "gateway tls: cert/key missing"
|
|
7287
7401
|
};
|
|
7288
7402
|
try {
|
|
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;
|
|
7403
|
+
const cert = await fs$1.readFile(certPath, "utf8");
|
|
7404
|
+
const key = await fs$1.readFile(keyPath, "utf8");
|
|
7405
|
+
const ca = caPath ? await fs$1.readFile(caPath, "utf8") : void 0;
|
|
7292
7406
|
const fingerprintSha256 = normalizeFingerprint(new X509Certificate(cert).fingerprint256 ?? "");
|
|
7293
7407
|
if (!fingerprintSha256) return {
|
|
7294
7408
|
enabled: false,
|
|
@@ -7347,8 +7461,8 @@ function resolveDeviceAuthPath(env = process.env) {
|
|
|
7347
7461
|
}
|
|
7348
7462
|
function readStore(filePath) {
|
|
7349
7463
|
try {
|
|
7350
|
-
if (!
|
|
7351
|
-
const raw =
|
|
7464
|
+
if (!fs.existsSync(filePath)) return null;
|
|
7465
|
+
const raw = fs.readFileSync(filePath, "utf8");
|
|
7352
7466
|
const parsed = JSON.parse(raw);
|
|
7353
7467
|
if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
|
|
7354
7468
|
if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
|
|
@@ -7358,10 +7472,10 @@ function readStore(filePath) {
|
|
|
7358
7472
|
}
|
|
7359
7473
|
}
|
|
7360
7474
|
function writeStore(filePath, store) {
|
|
7361
|
-
|
|
7362
|
-
|
|
7475
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
7476
|
+
fs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
|
|
7363
7477
|
try {
|
|
7364
|
-
|
|
7478
|
+
fs.chmodSync(filePath, 384);
|
|
7365
7479
|
} catch {}
|
|
7366
7480
|
}
|
|
7367
7481
|
function loadDeviceAuthToken(params) {
|
|
@@ -8668,7 +8782,7 @@ var GatewayClient = class {
|
|
|
8668
8782
|
if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
|
|
8669
8783
|
});
|
|
8670
8784
|
}
|
|
8671
|
-
this.ws = new WebSocket
|
|
8785
|
+
this.ws = new WebSocket(url, wsOptions);
|
|
8672
8786
|
this.ws.on("open", () => {
|
|
8673
8787
|
if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
|
|
8674
8788
|
const tlsError = this.validateTlsFingerprint();
|
|
@@ -8887,7 +9001,7 @@ var GatewayClient = class {
|
|
|
8887
9001
|
return null;
|
|
8888
9002
|
}
|
|
8889
9003
|
async request(method, params, opts) {
|
|
8890
|
-
if (!this.ws || this.ws.readyState !== WebSocket
|
|
9004
|
+
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
|
|
8891
9005
|
const id = randomUUID();
|
|
8892
9006
|
const frame = {
|
|
8893
9007
|
type: "req",
|
|
@@ -10153,7 +10267,7 @@ async function routeReply(params) {
|
|
|
10153
10267
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
10154
10268
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
10155
10269
|
try {
|
|
10156
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
10270
|
+
const { deliverOutboundPayloads } = await import("./deliver-C1HRkzPJ.js").then((n) => n.n);
|
|
10157
10271
|
return {
|
|
10158
10272
|
ok: true,
|
|
10159
10273
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -10549,7 +10663,7 @@ function normalizeSessionKey(value) {
|
|
|
10549
10663
|
}
|
|
10550
10664
|
function readSessionStore(storePath) {
|
|
10551
10665
|
try {
|
|
10552
|
-
const raw =
|
|
10666
|
+
const raw = fs.readFileSync(storePath, "utf-8");
|
|
10553
10667
|
const parsed = JSON5.parse(raw);
|
|
10554
10668
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
|
|
10555
10669
|
} catch {}
|
|
@@ -15608,7 +15722,7 @@ async function createModelSelectionState(params) {
|
|
|
15608
15722
|
}
|
|
15609
15723
|
}
|
|
15610
15724
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
15611
|
-
const { ensureAuthProfileStore } = await import("./auth-profiles-
|
|
15725
|
+
const { ensureAuthProfileStore } = await import("./auth-profiles-q3HjbboY.js").then((n) => n.t);
|
|
15612
15726
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
15613
15727
|
const providerKey = normalizeProviderId(provider);
|
|
15614
15728
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -17981,8 +18095,8 @@ const DEFAULT_SAFE_BINS = [
|
|
|
17981
18095
|
];
|
|
17982
18096
|
function isExecutableFile(filePath) {
|
|
17983
18097
|
try {
|
|
17984
|
-
if (!
|
|
17985
|
-
if (process.platform !== "win32")
|
|
18098
|
+
if (!fs.statSync(filePath).isFile()) return false;
|
|
18099
|
+
if (process.platform !== "win32") fs.accessSync(filePath, fs.constants.X_OK);
|
|
17986
18100
|
return true;
|
|
17987
18101
|
} catch {
|
|
17988
18102
|
return false;
|
|
@@ -18020,7 +18134,7 @@ function normalizeMatchTarget(value) {
|
|
|
18020
18134
|
}
|
|
18021
18135
|
function tryRealpath(value) {
|
|
18022
18136
|
try {
|
|
18023
|
-
return
|
|
18137
|
+
return fs.realpathSync(value);
|
|
18024
18138
|
} catch {
|
|
18025
18139
|
return null;
|
|
18026
18140
|
}
|
|
@@ -19252,7 +19366,7 @@ function mergeLegacyAgent(current, legacy) {
|
|
|
19252
19366
|
}
|
|
19253
19367
|
function ensureDir$1(filePath) {
|
|
19254
19368
|
const dir = path.dirname(filePath);
|
|
19255
|
-
|
|
19369
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
19256
19370
|
}
|
|
19257
19371
|
function coerceAllowlistEntries(allowlist) {
|
|
19258
19372
|
if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
|
|
@@ -19322,11 +19436,11 @@ function generateToken() {
|
|
|
19322
19436
|
function loadExecApprovals() {
|
|
19323
19437
|
const filePath = resolveExecApprovalsPath();
|
|
19324
19438
|
try {
|
|
19325
|
-
if (!
|
|
19439
|
+
if (!fs.existsSync(filePath)) return normalizeExecApprovals({
|
|
19326
19440
|
version: 1,
|
|
19327
19441
|
agents: {}
|
|
19328
19442
|
});
|
|
19329
|
-
const raw =
|
|
19443
|
+
const raw = fs.readFileSync(filePath, "utf8");
|
|
19330
19444
|
const parsed = JSON.parse(raw);
|
|
19331
19445
|
if (parsed?.version !== 1) return normalizeExecApprovals({
|
|
19332
19446
|
version: 1,
|
|
@@ -19343,9 +19457,9 @@ function loadExecApprovals() {
|
|
|
19343
19457
|
function saveExecApprovals(file) {
|
|
19344
19458
|
const filePath = resolveExecApprovalsPath();
|
|
19345
19459
|
ensureDir$1(filePath);
|
|
19346
|
-
|
|
19460
|
+
fs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
|
|
19347
19461
|
try {
|
|
19348
|
-
|
|
19462
|
+
fs.chmodSync(filePath, 384);
|
|
19349
19463
|
} catch {}
|
|
19350
19464
|
}
|
|
19351
19465
|
function ensureExecApprovals() {
|
|
@@ -19666,7 +19780,7 @@ function resolvePowerShellPath() {
|
|
|
19666
19780
|
const systemRoot = process.env.SystemRoot || process.env.WINDIR;
|
|
19667
19781
|
if (systemRoot) {
|
|
19668
19782
|
const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
|
|
19669
|
-
if (
|
|
19783
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
19670
19784
|
}
|
|
19671
19785
|
return "powershell.exe";
|
|
19672
19786
|
}
|
|
@@ -19704,7 +19818,7 @@ function resolveShellFromPath(name) {
|
|
|
19704
19818
|
for (const entry of entries) {
|
|
19705
19819
|
const candidate = path.join(entry, name);
|
|
19706
19820
|
try {
|
|
19707
|
-
|
|
19821
|
+
fs.accessSync(candidate, fs.constants.X_OK);
|
|
19708
19822
|
return candidate;
|
|
19709
19823
|
} catch {}
|
|
19710
19824
|
}
|
|
@@ -20452,7 +20566,7 @@ async function resolveSandboxWorkdir(params) {
|
|
|
20452
20566
|
cwd: process.cwd(),
|
|
20453
20567
|
root: params.sandbox.workspaceDir
|
|
20454
20568
|
});
|
|
20455
|
-
if (!(await fs.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
20569
|
+
if (!(await fs$1.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
20456
20570
|
const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
|
|
20457
20571
|
const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
|
|
20458
20572
|
return {
|
|
@@ -21503,13 +21617,13 @@ async function validateScriptFileForShellBleed(params) {
|
|
|
21503
21617
|
cwd: params.workdir,
|
|
21504
21618
|
root: params.workdir
|
|
21505
21619
|
});
|
|
21506
|
-
stat = await fs.stat(absPath);
|
|
21620
|
+
stat = await fs$1.stat(absPath);
|
|
21507
21621
|
} catch {
|
|
21508
21622
|
return;
|
|
21509
21623
|
}
|
|
21510
21624
|
if (!stat.isFile()) return;
|
|
21511
21625
|
if (stat.size > 512 * 1024) return;
|
|
21512
|
-
const content = await fs.readFile(absPath, "utf-8");
|
|
21626
|
+
const content = await fs$1.readFile(absPath, "utf-8");
|
|
21513
21627
|
const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
|
|
21514
21628
|
if (first) {
|
|
21515
21629
|
const idx = first.index;
|
|
@@ -22760,7 +22874,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
|
|
|
22760
22874
|
function hasGitMarker(repoRoot) {
|
|
22761
22875
|
const gitPath = path.join(repoRoot, ".git");
|
|
22762
22876
|
try {
|
|
22763
|
-
const stat =
|
|
22877
|
+
const stat = fs.statSync(gitPath);
|
|
22764
22878
|
return stat.isDirectory() || stat.isFile();
|
|
22765
22879
|
} catch {
|
|
22766
22880
|
return false;
|
|
@@ -22772,10 +22886,10 @@ function findGitRoot(startDir, opts = {}) {
|
|
|
22772
22886
|
function resolveGitDirFromMarker(repoRoot) {
|
|
22773
22887
|
const gitPath = path.join(repoRoot, ".git");
|
|
22774
22888
|
try {
|
|
22775
|
-
const stat =
|
|
22889
|
+
const stat = fs.statSync(gitPath);
|
|
22776
22890
|
if (stat.isDirectory()) return gitPath;
|
|
22777
22891
|
if (!stat.isFile()) return null;
|
|
22778
|
-
const match =
|
|
22892
|
+
const match = fs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
|
|
22779
22893
|
if (!match?.[1]) return null;
|
|
22780
22894
|
return path.resolve(repoRoot, match[1].trim());
|
|
22781
22895
|
} catch {
|
|
@@ -22842,7 +22956,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
22842
22956
|
cachedCommit = null;
|
|
22843
22957
|
return cachedCommit;
|
|
22844
22958
|
}
|
|
22845
|
-
const head =
|
|
22959
|
+
const head = fs.readFileSync(headPath, "utf-8").trim();
|
|
22846
22960
|
if (!head) {
|
|
22847
22961
|
cachedCommit = null;
|
|
22848
22962
|
return cachedCommit;
|
|
@@ -22850,7 +22964,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
22850
22964
|
if (head.startsWith("ref:")) {
|
|
22851
22965
|
const ref = head.replace(/^ref:\s*/i, "").trim();
|
|
22852
22966
|
const refPath = path.resolve(path.dirname(headPath), ref);
|
|
22853
|
-
cachedCommit = formatCommit(
|
|
22967
|
+
cachedCommit = formatCommit(fs.readFileSync(refPath, "utf-8").trim());
|
|
22854
22968
|
return cachedCommit;
|
|
22855
22969
|
}
|
|
22856
22970
|
cachedCommit = formatCommit(head);
|
|
@@ -23054,9 +23168,9 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
|
|
|
23054
23168
|
} catch {
|
|
23055
23169
|
return;
|
|
23056
23170
|
}
|
|
23057
|
-
if (!
|
|
23171
|
+
if (!fs.existsSync(logPath)) return;
|
|
23058
23172
|
try {
|
|
23059
|
-
const lines =
|
|
23173
|
+
const lines = fs.readFileSync(logPath, "utf-8").split(/\n+/);
|
|
23060
23174
|
let input = 0;
|
|
23061
23175
|
let output = 0;
|
|
23062
23176
|
let promptTokens = 0;
|
|
@@ -24296,7 +24410,7 @@ function resolveRepoRoot(params) {
|
|
|
24296
24410
|
const configured = params.config?.agents?.defaults?.repoRoot?.trim();
|
|
24297
24411
|
if (configured) try {
|
|
24298
24412
|
const resolved = path.resolve(configured);
|
|
24299
|
-
if (
|
|
24413
|
+
if (fs.statSync(resolved).isDirectory()) return resolved;
|
|
24300
24414
|
} catch {}
|
|
24301
24415
|
const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
|
|
24302
24416
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -24615,7 +24729,7 @@ async function buildContextReply(params) {
|
|
|
24615
24729
|
//#region src/auto-reply/reply/commands-export-session.ts
|
|
24616
24730
|
const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
|
|
24617
24731
|
function loadTemplate(fileName) {
|
|
24618
|
-
return
|
|
24732
|
+
return fs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
|
|
24619
24733
|
}
|
|
24620
24734
|
function generateHtml(sessionData) {
|
|
24621
24735
|
const template = loadTemplate("template.html");
|
|
@@ -24689,7 +24803,7 @@ async function buildExportSessionReply(params) {
|
|
|
24689
24803
|
} catch (err) {
|
|
24690
24804
|
return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
|
|
24691
24805
|
}
|
|
24692
|
-
if (!
|
|
24806
|
+
if (!fs.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
|
|
24693
24807
|
const sessionManager = SessionManager.open(sessionFile);
|
|
24694
24808
|
const entries = sessionManager.getEntries();
|
|
24695
24809
|
const header = sessionManager.getHeader();
|
|
@@ -24710,8 +24824,8 @@ async function buildExportSessionReply(params) {
|
|
|
24710
24824
|
const defaultFileName = `symi-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
|
|
24711
24825
|
const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
|
|
24712
24826
|
const outputDir = path.dirname(outputPath);
|
|
24713
|
-
if (!
|
|
24714
|
-
|
|
24827
|
+
if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir, { recursive: true });
|
|
24828
|
+
fs.writeFileSync(outputPath, html, "utf-8");
|
|
24715
24829
|
const relativePath = path.relative(params.workspaceDir, outputPath);
|
|
24716
24830
|
return { text: [
|
|
24717
24831
|
"✅ Session exported!",
|
|
@@ -24825,8 +24939,8 @@ function resolveZaiApiKey() {
|
|
|
24825
24939
|
}
|
|
24826
24940
|
try {
|
|
24827
24941
|
const authPath = path.join(os.homedir(), ".pi", "agent", "auth.json");
|
|
24828
|
-
if (!
|
|
24829
|
-
const data = JSON.parse(
|
|
24942
|
+
if (!fs.existsSync(authPath)) return;
|
|
24943
|
+
const data = JSON.parse(fs.readFileSync(authPath, "utf-8"));
|
|
24830
24944
|
return data["z-ai"]?.access || data.zai?.access;
|
|
24831
24945
|
} catch {
|
|
24832
24946
|
return;
|
|
@@ -26391,7 +26505,7 @@ function shouldPersistAnyBindingState() {
|
|
|
26391
26505
|
}
|
|
26392
26506
|
function shouldPersistBindingMutations() {
|
|
26393
26507
|
if (shouldPersistAnyBindingState()) return true;
|
|
26394
|
-
return
|
|
26508
|
+
return fs.existsSync(resolveThreadBindingsPath());
|
|
26395
26509
|
}
|
|
26396
26510
|
function saveBindingsToDisk(params = {}) {
|
|
26397
26511
|
if (!params.force && !shouldPersistAnyBindingState()) return;
|
|
@@ -27379,7 +27493,7 @@ const applyCostTotal = (totals, costTotal) => {
|
|
|
27379
27493
|
totals.totalCost += costTotal;
|
|
27380
27494
|
};
|
|
27381
27495
|
async function* readJsonlRecords(filePath) {
|
|
27382
|
-
const fileStream =
|
|
27496
|
+
const fileStream = fs.createReadStream(filePath, { encoding: "utf-8" });
|
|
27383
27497
|
const rl = readline.createInterface({
|
|
27384
27498
|
input: fileStream,
|
|
27385
27499
|
crlfDelay: Infinity
|
|
@@ -27451,10 +27565,10 @@ async function loadCostUsageSummary(params) {
|
|
|
27451
27565
|
const dailyMap = /* @__PURE__ */ new Map();
|
|
27452
27566
|
const totals = emptyTotals();
|
|
27453
27567
|
const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
|
|
27454
|
-
const entries = await
|
|
27568
|
+
const entries = await fs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
27455
27569
|
const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
|
|
27456
27570
|
const filePath = path.join(sessionsDir, entry.name);
|
|
27457
|
-
const stats = await
|
|
27571
|
+
const stats = await fs.promises.stat(filePath).catch(() => null);
|
|
27458
27572
|
if (!stats) return null;
|
|
27459
27573
|
if (stats.mtimeMs < sinceTime) return null;
|
|
27460
27574
|
return filePath;
|
|
@@ -27487,7 +27601,7 @@ async function loadCostUsageSummary(params) {
|
|
|
27487
27601
|
}
|
|
27488
27602
|
async function loadSessionCostSummary(params) {
|
|
27489
27603
|
const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
|
|
27490
|
-
if (!sessionFile || !
|
|
27604
|
+
if (!sessionFile || !fs.existsSync(sessionFile)) return null;
|
|
27491
27605
|
const totals = emptyTotals();
|
|
27492
27606
|
let firstActivity;
|
|
27493
27607
|
let lastActivity;
|
|
@@ -29359,7 +29473,7 @@ async function handleCommands(params) {
|
|
|
29359
29473
|
try {
|
|
29360
29474
|
const messages = [];
|
|
29361
29475
|
if (sessionFile) {
|
|
29362
|
-
const content = await fs.readFile(sessionFile, "utf-8");
|
|
29476
|
+
const content = await fs$1.readFile(sessionFile, "utf-8");
|
|
29363
29477
|
for (const line of content.split("\n")) {
|
|
29364
29478
|
if (!line.trim()) continue;
|
|
29365
29479
|
try {
|
|
@@ -31693,7 +31807,7 @@ function asBoolean(value) {
|
|
|
31693
31807
|
}
|
|
31694
31808
|
function resolveTempPathParts(opts) {
|
|
31695
31809
|
const tmpDir = opts.tmpDir ?? resolvePreferredSymiTmpDir();
|
|
31696
|
-
if (!opts.tmpDir)
|
|
31810
|
+
if (!opts.tmpDir) fs.mkdirSync(tmpDir, {
|
|
31697
31811
|
recursive: true,
|
|
31698
31812
|
mode: 448
|
|
31699
31813
|
});
|
|
@@ -31759,7 +31873,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
31759
31873
|
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}`);
|
|
31760
31874
|
const body = res.body;
|
|
31761
31875
|
if (!body) throw new Error(`failed to download ${url}: empty response body`);
|
|
31762
|
-
const fileHandle = await fs$
|
|
31876
|
+
const fileHandle = await fs$2.open(filePath, "w");
|
|
31763
31877
|
let bytes = 0;
|
|
31764
31878
|
let thrown;
|
|
31765
31879
|
try {
|
|
@@ -31778,7 +31892,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
31778
31892
|
await fileHandle.close();
|
|
31779
31893
|
}
|
|
31780
31894
|
if (thrown) {
|
|
31781
|
-
await fs$
|
|
31895
|
+
await fs$2.unlink(filePath).catch(() => {});
|
|
31782
31896
|
throw thrown;
|
|
31783
31897
|
}
|
|
31784
31898
|
return {
|
|
@@ -31788,7 +31902,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
31788
31902
|
}
|
|
31789
31903
|
async function writeBase64ToFile(filePath, base64) {
|
|
31790
31904
|
const buf = Buffer.from(base64, "base64");
|
|
31791
|
-
await fs$
|
|
31905
|
+
await fs$2.writeFile(filePath, buf);
|
|
31792
31906
|
return {
|
|
31793
31907
|
path: filePath,
|
|
31794
31908
|
bytes: buf.length
|
|
@@ -31854,7 +31968,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
31854
31968
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
|
|
31855
31969
|
throw new Error("jsonlPath outside allowed roots");
|
|
31856
31970
|
}
|
|
31857
|
-
const canonical = await fs.realpath(resolved).catch(() => resolved);
|
|
31971
|
+
const canonical = await fs$1.realpath(resolved).catch(() => resolved);
|
|
31858
31972
|
if (!isInboundPathAllowed({
|
|
31859
31973
|
filePath: canonical,
|
|
31860
31974
|
roots
|
|
@@ -31862,7 +31976,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
31862
31976
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
|
|
31863
31977
|
throw new Error("jsonlPath outside allowed roots");
|
|
31864
31978
|
}
|
|
31865
|
-
return await fs.readFile(canonical, "utf8");
|
|
31979
|
+
return await fs$1.readFile(canonical, "utf8");
|
|
31866
31980
|
}
|
|
31867
31981
|
const CanvasToolSchema = Type.Object({
|
|
31868
31982
|
action: stringEnum(CANVAS_ACTIONS),
|
|
@@ -32666,12 +32780,12 @@ function resolveRestartSentinelPath(env = process.env) {
|
|
|
32666
32780
|
}
|
|
32667
32781
|
async function writeRestartSentinel(payload, env = process.env) {
|
|
32668
32782
|
const filePath = resolveRestartSentinelPath(env);
|
|
32669
|
-
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
32783
|
+
await fs$1.mkdir(path.dirname(filePath), { recursive: true });
|
|
32670
32784
|
const data = {
|
|
32671
32785
|
version: 1,
|
|
32672
32786
|
payload
|
|
32673
32787
|
};
|
|
32674
|
-
await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
|
|
32788
|
+
await fs$1.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
|
|
32675
32789
|
return filePath;
|
|
32676
32790
|
}
|
|
32677
32791
|
|
|
@@ -33486,7 +33600,7 @@ async function hydrateAttachmentPayload(params) {
|
|
|
33486
33600
|
accountId: params.accountId
|
|
33487
33601
|
}),
|
|
33488
33602
|
sandboxValidated: true,
|
|
33489
|
-
readFile: (filePath) => fs.readFile(filePath)
|
|
33603
|
+
readFile: (filePath) => fs$1.readFile(filePath)
|
|
33490
33604
|
});
|
|
33491
33605
|
params.args.buffer = media.buffer.toString("base64");
|
|
33492
33606
|
if (!contentTypeParam && media.contentType) params.args.contentType = media.contentType;
|
|
@@ -36771,7 +36885,7 @@ function listExistingAgentIdsFromDisk() {
|
|
|
36771
36885
|
const root = resolveStateDir();
|
|
36772
36886
|
const agentsDir = path.join(root, "agents");
|
|
36773
36887
|
try {
|
|
36774
|
-
return
|
|
36888
|
+
return fs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
|
|
36775
36889
|
} catch {
|
|
36776
36890
|
return [];
|
|
36777
36891
|
}
|
|
@@ -40639,18 +40753,18 @@ function appendImagePathsToPrompt(prompt, paths) {
|
|
|
40639
40753
|
return `${trimmed}${trimmed ? "\n\n" : ""}${paths.join("\n")}`;
|
|
40640
40754
|
}
|
|
40641
40755
|
async function writeCliImages(images) {
|
|
40642
|
-
const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "symi-cli-images-"));
|
|
40756
|
+
const tempDir = await fs$1.mkdtemp(path.join(os.tmpdir(), "symi-cli-images-"));
|
|
40643
40757
|
const paths = [];
|
|
40644
40758
|
for (let i = 0; i < images.length; i += 1) {
|
|
40645
40759
|
const image = images[i];
|
|
40646
40760
|
const ext = resolveImageExtension(image.mimeType);
|
|
40647
40761
|
const filePath = path.join(tempDir, `image-${i + 1}.${ext}`);
|
|
40648
40762
|
const buffer = Buffer.from(image.data, "base64");
|
|
40649
|
-
await fs.writeFile(filePath, buffer, { mode: 384 });
|
|
40763
|
+
await fs$1.writeFile(filePath, buffer, { mode: 384 });
|
|
40650
40764
|
paths.push(filePath);
|
|
40651
40765
|
}
|
|
40652
40766
|
const cleanup = async () => {
|
|
40653
|
-
await fs.rm(tempDir, {
|
|
40767
|
+
await fs$1.rm(tempDir, {
|
|
40654
40768
|
recursive: true,
|
|
40655
40769
|
force: true
|
|
40656
40770
|
});
|
|
@@ -41724,7 +41838,7 @@ async function runAgentTurnWithFallback(params) {
|
|
|
41724
41838
|
if (corruptedSessionId) {
|
|
41725
41839
|
const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
|
|
41726
41840
|
try {
|
|
41727
|
-
|
|
41841
|
+
fs.unlinkSync(transcriptPath);
|
|
41728
41842
|
} catch {}
|
|
41729
41843
|
}
|
|
41730
41844
|
delete params.activeSessionStore[sessionKey];
|
|
@@ -42440,9 +42554,9 @@ function auditPostCompactionReads(readFilePaths, workspaceDir, requiredReads = D
|
|
|
42440
42554
|
* Returns messages from the last N lines (default 100).
|
|
42441
42555
|
*/
|
|
42442
42556
|
function readSessionMessages(sessionFile, maxLines = 100) {
|
|
42443
|
-
if (!
|
|
42557
|
+
if (!fs.existsSync(sessionFile)) return [];
|
|
42444
42558
|
try {
|
|
42445
|
-
const recentLines =
|
|
42559
|
+
const recentLines = fs.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
|
|
42446
42560
|
const messages = [];
|
|
42447
42561
|
for (const line of recentLines) try {
|
|
42448
42562
|
const entry = JSON.parse(line);
|
|
@@ -42483,8 +42597,8 @@ const MAX_CONTEXT_CHARS = 3e3;
|
|
|
42483
42597
|
async function readPostCompactionContext(workspaceDir) {
|
|
42484
42598
|
const agentsPath = path.join(workspaceDir, "AGENTS.md");
|
|
42485
42599
|
try {
|
|
42486
|
-
if (!
|
|
42487
|
-
const sections = extractSections(await
|
|
42600
|
+
if (!fs.existsSync(agentsPath)) return null;
|
|
42601
|
+
const sections = extractSections(await fs.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
|
|
42488
42602
|
if (sections.length === 0) return null;
|
|
42489
42603
|
const combined = sections.join("\n\n");
|
|
42490
42604
|
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);
|
|
@@ -42688,7 +42802,7 @@ async function runReplyAgent(params) {
|
|
|
42688
42802
|
if (resolved) transcriptCandidates.add(resolved);
|
|
42689
42803
|
transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
|
|
42690
42804
|
for (const candidate of transcriptCandidates) try {
|
|
42691
|
-
|
|
42805
|
+
fs.unlinkSync(candidate);
|
|
42692
42806
|
} catch {}
|
|
42693
42807
|
}
|
|
42694
42808
|
return true;
|
|
@@ -43594,7 +43708,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
43594
43708
|
return;
|
|
43595
43709
|
}
|
|
43596
43710
|
try {
|
|
43597
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
43711
|
+
const { deliverOutboundPayloads } = await import("./deliver-C1HRkzPJ.js").then((n) => n.n);
|
|
43598
43712
|
await deliverOutboundPayloads({
|
|
43599
43713
|
cfg: params.cfg,
|
|
43600
43714
|
channel,
|
|
@@ -43620,7 +43734,7 @@ function forkSessionFromParent(params) {
|
|
|
43620
43734
|
agentId: params.agentId,
|
|
43621
43735
|
sessionsDir: params.sessionsDir
|
|
43622
43736
|
});
|
|
43623
|
-
if (!parentSessionFile || !
|
|
43737
|
+
if (!parentSessionFile || !fs.existsSync(parentSessionFile)) return null;
|
|
43624
43738
|
try {
|
|
43625
43739
|
const manager = SessionManager.open(parentSessionFile);
|
|
43626
43740
|
const leafId = manager.getLeafId();
|
|
@@ -43644,7 +43758,7 @@ function forkSessionFromParent(params) {
|
|
|
43644
43758
|
cwd: manager.getCwd(),
|
|
43645
43759
|
parentSession: parentSessionFile
|
|
43646
43760
|
};
|
|
43647
|
-
|
|
43761
|
+
fs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
|
|
43648
43762
|
return {
|
|
43649
43763
|
sessionId,
|
|
43650
43764
|
sessionFile
|
|
@@ -43969,7 +44083,7 @@ async function stageSandboxMedia(params) {
|
|
|
43969
44083
|
};
|
|
43970
44084
|
try {
|
|
43971
44085
|
const destDir = sandbox ? path.join(effectiveWorkspaceDir, "media", "inbound") : effectiveWorkspaceDir;
|
|
43972
|
-
await fs.mkdir(destDir, { recursive: true });
|
|
44086
|
+
await fs$1.mkdir(destDir, { recursive: true });
|
|
43973
44087
|
const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
|
|
43974
44088
|
cfg,
|
|
43975
44089
|
accountId: ctx.AccountId
|
|
@@ -44019,7 +44133,7 @@ async function stageSandboxMedia(params) {
|
|
|
44019
44133
|
usedNames.add(fileName);
|
|
44020
44134
|
const dest = path.join(destDir, fileName);
|
|
44021
44135
|
if (ctx.MediaRemoteHost) await scpFile(ctx.MediaRemoteHost, source, dest);
|
|
44022
|
-
else await fs.copyFile(source, dest);
|
|
44136
|
+
else await fs$1.copyFile(source, dest);
|
|
44023
44137
|
const stagedPath = sandbox ? path.posix.join("media", "inbound", fileName) : dest;
|
|
44024
44138
|
staged.set(source, stagedPath);
|
|
44025
44139
|
}
|
|
@@ -47039,8 +47153,8 @@ async function describeStickerImage(params) {
|
|
|
47039
47153
|
const { provider, model } = resolved;
|
|
47040
47154
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
47041
47155
|
try {
|
|
47042
|
-
const buffer = await fs.readFile(imagePath);
|
|
47043
|
-
const { describeImageWithModel } = await import("./image-
|
|
47156
|
+
const buffer = await fs$1.readFile(imagePath);
|
|
47157
|
+
const { describeImageWithModel } = await import("./image-CbyTdMd5.js").then((n) => n.n);
|
|
47044
47158
|
return (await describeImageWithModel({
|
|
47045
47159
|
buffer,
|
|
47046
47160
|
fileName: "sticker.webp",
|
|
@@ -47463,7 +47577,7 @@ function createWhatsAppLoginTool() {
|
|
|
47463
47577
|
force: Type.Optional(Type.Boolean())
|
|
47464
47578
|
}),
|
|
47465
47579
|
execute: async (_toolCallId, args) => {
|
|
47466
|
-
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-
|
|
47580
|
+
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-q201Ckfe.js");
|
|
47467
47581
|
if ((args?.action ?? "start") === "wait") {
|
|
47468
47582
|
const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
|
|
47469
47583
|
return {
|
|
@@ -47745,7 +47859,7 @@ async function withMemoryManagerForAgent(params) {
|
|
|
47745
47859
|
}
|
|
47746
47860
|
async function checkReadableFile(pathname) {
|
|
47747
47861
|
try {
|
|
47748
|
-
await fs.access(pathname,
|
|
47862
|
+
await fs$1.access(pathname, fs.constants.R_OK);
|
|
47749
47863
|
return { exists: true };
|
|
47750
47864
|
} catch (err) {
|
|
47751
47865
|
const code = err.code;
|
|
@@ -47762,7 +47876,7 @@ async function scanSessionFiles(agentId) {
|
|
|
47762
47876
|
try {
|
|
47763
47877
|
return {
|
|
47764
47878
|
source: "sessions",
|
|
47765
|
-
totalFiles: (await fs.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
|
|
47879
|
+
totalFiles: (await fs$1.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
|
|
47766
47880
|
issues
|
|
47767
47881
|
};
|
|
47768
47882
|
} catch (err) {
|
|
@@ -47794,7 +47908,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
47794
47908
|
if (alt.issue) issues.push(alt.issue);
|
|
47795
47909
|
const resolvedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
|
|
47796
47910
|
for (const extraPath of resolvedExtraPaths) try {
|
|
47797
|
-
if ((await fs.lstat(extraPath)).isSymbolicLink()) continue;
|
|
47911
|
+
if ((await fs$1.lstat(extraPath)).isSymbolicLink()) continue;
|
|
47798
47912
|
const extraCheck = await checkReadableFile(extraPath);
|
|
47799
47913
|
if (extraCheck.issue) issues.push(extraCheck.issue);
|
|
47800
47914
|
} catch (err) {
|
|
@@ -47804,7 +47918,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
47804
47918
|
}
|
|
47805
47919
|
let dirReadable = null;
|
|
47806
47920
|
try {
|
|
47807
|
-
await fs.access(memoryDir,
|
|
47921
|
+
await fs$1.access(memoryDir, fs.constants.R_OK);
|
|
47808
47922
|
dirReadable = true;
|
|
47809
47923
|
} catch (err) {
|
|
47810
47924
|
const code = err.code;
|
|
@@ -47852,7 +47966,7 @@ async function summarizeQmdIndexArtifact(manager) {
|
|
|
47852
47966
|
if (!dbPath) return null;
|
|
47853
47967
|
let stat;
|
|
47854
47968
|
try {
|
|
47855
|
-
stat = await fs.stat(dbPath);
|
|
47969
|
+
stat = await fs$1.stat(dbPath);
|
|
47856
47970
|
} catch (err) {
|
|
47857
47971
|
const code = err.code;
|
|
47858
47972
|
if (code === "ENOENT") throw new Error(`QMD index file not found: ${shortenHomePath(dbPath)}`, { cause: err });
|
|
@@ -49702,7 +49816,7 @@ async function preflightDiscordMessage(params) {
|
|
|
49702
49816
|
let preflightTranscript;
|
|
49703
49817
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
49704
49818
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
49705
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
49819
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-K-s65jbB.js");
|
|
49706
49820
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
49707
49821
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
49708
49822
|
ctx: {
|
|
@@ -50665,7 +50779,7 @@ function identityHasValues(identity) {
|
|
|
50665
50779
|
}
|
|
50666
50780
|
function loadIdentityFromFile(identityPath) {
|
|
50667
50781
|
try {
|
|
50668
|
-
const parsed = parseIdentityMarkdown(
|
|
50782
|
+
const parsed = parseIdentityMarkdown(fs.readFileSync(identityPath, "utf-8"));
|
|
50669
50783
|
if (!identityHasValues(parsed)) return null;
|
|
50670
50784
|
return parsed;
|
|
50671
50785
|
} catch {
|
|
@@ -50704,7 +50818,7 @@ function isDataAvatar(value) {
|
|
|
50704
50818
|
}
|
|
50705
50819
|
function resolveExistingPath(value) {
|
|
50706
50820
|
try {
|
|
50707
|
-
return
|
|
50821
|
+
return fs.realpathSync(value);
|
|
50708
50822
|
} catch {
|
|
50709
50823
|
return path.resolve(value);
|
|
50710
50824
|
}
|
|
@@ -50728,7 +50842,7 @@ function resolveLocalAvatarPath(params) {
|
|
|
50728
50842
|
reason: "unsupported_extension"
|
|
50729
50843
|
};
|
|
50730
50844
|
try {
|
|
50731
|
-
if (!
|
|
50845
|
+
if (!fs.statSync(realPath).isFile()) return {
|
|
50732
50846
|
ok: false,
|
|
50733
50847
|
reason: "missing"
|
|
50734
50848
|
};
|
|
@@ -51591,7 +51705,7 @@ function sanitizeRecentModels(models, limit) {
|
|
|
51591
51705
|
}
|
|
51592
51706
|
async function readJsonFileWithFallback(filePath, fallback) {
|
|
51593
51707
|
try {
|
|
51594
|
-
const raw = await
|
|
51708
|
+
const raw = await fs.promises.readFile(filePath, "utf-8");
|
|
51595
51709
|
return {
|
|
51596
51710
|
value: JSON.parse(raw),
|
|
51597
51711
|
exists: true
|
|
@@ -51609,14 +51723,14 @@ async function readJsonFileWithFallback(filePath, fallback) {
|
|
|
51609
51723
|
}
|
|
51610
51724
|
async function writeJsonFileAtomically(filePath, value) {
|
|
51611
51725
|
const dir = path.dirname(filePath);
|
|
51612
|
-
await
|
|
51726
|
+
await fs.promises.mkdir(dir, {
|
|
51613
51727
|
recursive: true,
|
|
51614
51728
|
mode: 448
|
|
51615
51729
|
});
|
|
51616
51730
|
const tmp = path.join(dir, `${path.basename(filePath)}.${crypto.randomUUID()}.tmp`);
|
|
51617
|
-
await
|
|
51618
|
-
await
|
|
51619
|
-
await
|
|
51731
|
+
await fs.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
|
|
51732
|
+
await fs.promises.chmod(tmp, 384);
|
|
51733
|
+
await fs.promises.rename(tmp, filePath);
|
|
51620
51734
|
}
|
|
51621
51735
|
async function readPreferencesStore(filePath) {
|
|
51622
51736
|
const { value } = await readJsonFileWithFallback(filePath, {
|
|
@@ -53708,27 +53822,27 @@ function isVoiceChannelType(type) {
|
|
|
53708
53822
|
function createDefaultDeps() {
|
|
53709
53823
|
return {
|
|
53710
53824
|
sendMessageWhatsApp: async (...args) => {
|
|
53711
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
53825
|
+
const { sendMessageWhatsApp } = await import("./web-BUc-ts5b.js");
|
|
53712
53826
|
return await sendMessageWhatsApp(...args);
|
|
53713
53827
|
},
|
|
53714
53828
|
sendMessageTelegram: async (...args) => {
|
|
53715
|
-
const { sendMessageTelegram } = await import("./send-
|
|
53829
|
+
const { sendMessageTelegram } = await import("./send-DaBsat3L.js").then((n) => n.l);
|
|
53716
53830
|
return await sendMessageTelegram(...args);
|
|
53717
53831
|
},
|
|
53718
53832
|
sendMessageDiscord: async (...args) => {
|
|
53719
|
-
const { sendMessageDiscord } = await import("./send-
|
|
53833
|
+
const { sendMessageDiscord } = await import("./send-BNnv8GtF.js").then((n) => n.t);
|
|
53720
53834
|
return await sendMessageDiscord(...args);
|
|
53721
53835
|
},
|
|
53722
53836
|
sendMessageSlack: async (...args) => {
|
|
53723
|
-
const { sendMessageSlack } = await import("./send-
|
|
53837
|
+
const { sendMessageSlack } = await import("./send-DI9Vhnmw.js").then((n) => n.n);
|
|
53724
53838
|
return await sendMessageSlack(...args);
|
|
53725
53839
|
},
|
|
53726
53840
|
sendMessageSignal: async (...args) => {
|
|
53727
|
-
const { sendMessageSignal } = await import("./send-
|
|
53841
|
+
const { sendMessageSignal } = await import("./send-CZemAajS.js").then((n) => n.i);
|
|
53728
53842
|
return await sendMessageSignal(...args);
|
|
53729
53843
|
},
|
|
53730
53844
|
sendMessageIMessage: async (...args) => {
|
|
53731
|
-
const { sendMessageIMessage } = await import("./send-
|
|
53845
|
+
const { sendMessageIMessage } = await import("./send-B9EinkUl.js").then((n) => n.n);
|
|
53732
53846
|
return await sendMessageIMessage(...args);
|
|
53733
53847
|
}
|
|
53734
53848
|
};
|
|
@@ -54637,10 +54751,10 @@ function estimateDurationSeconds(pcm) {
|
|
|
54637
54751
|
return pcm.length / (bytesPerSample * SAMPLE_RATE);
|
|
54638
54752
|
}
|
|
54639
54753
|
async function writeWavFile(pcm) {
|
|
54640
|
-
const tempDir = await fs.mkdtemp(path.join(resolvePreferredSymiTmpDir(), "discord-voice-"));
|
|
54754
|
+
const tempDir = await fs$1.mkdtemp(path.join(resolvePreferredSymiTmpDir(), "discord-voice-"));
|
|
54641
54755
|
const filePath = path.join(tempDir, `segment-${randomUUID()}.wav`);
|
|
54642
54756
|
const wav = buildWavBuffer(pcm);
|
|
54643
|
-
await fs.writeFile(filePath, wav);
|
|
54757
|
+
await fs$1.writeFile(filePath, wav);
|
|
54644
54758
|
scheduleTempCleanup(tempDir);
|
|
54645
54759
|
return {
|
|
54646
54760
|
path: filePath,
|
|
@@ -54649,7 +54763,7 @@ async function writeWavFile(pcm) {
|
|
|
54649
54763
|
}
|
|
54650
54764
|
function scheduleTempCleanup(tempDir, delayMs = 1800 * 1e3) {
|
|
54651
54765
|
setTimeout(() => {
|
|
54652
|
-
fs.rm(tempDir, {
|
|
54766
|
+
fs$1.rm(tempDir, {
|
|
54653
54767
|
recursive: true,
|
|
54654
54768
|
force: true
|
|
54655
54769
|
}).catch((err) => {
|
|
@@ -56613,7 +56727,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
56613
56727
|
super(options);
|
|
56614
56728
|
}
|
|
56615
56729
|
createWebSocket(url) {
|
|
56616
|
-
return new WebSocket(url, { agent });
|
|
56730
|
+
return new WebSocket$1(url, { agent });
|
|
56617
56731
|
}
|
|
56618
56732
|
}
|
|
56619
56733
|
return new ProxyGatewayPlugin();
|
|
@@ -57713,7 +57827,7 @@ async function detectBinary(name) {
|
|
|
57713
57827
|
if (!isSafeExecutableValue(name)) return false;
|
|
57714
57828
|
const resolved = name.startsWith("~") ? resolveUserPath(name) : name;
|
|
57715
57829
|
if (path.isAbsolute(resolved) || resolved.startsWith(".") || resolved.includes("/") || resolved.includes("\\")) try {
|
|
57716
|
-
await fs.access(resolved);
|
|
57830
|
+
await fs$1.access(resolved);
|
|
57717
57831
|
return true;
|
|
57718
57832
|
} catch {
|
|
57719
57833
|
return false;
|
|
@@ -58263,7 +58377,7 @@ function normalizeAllowList$1(list) {
|
|
|
58263
58377
|
async function detectRemoteHostFromCliPath(cliPath) {
|
|
58264
58378
|
try {
|
|
58265
58379
|
const expanded = cliPath.startsWith("~") ? cliPath.replace(/^~/, process.env.HOME ?? "") : cliPath;
|
|
58266
|
-
const content = await fs.readFile(expanded, "utf8");
|
|
58380
|
+
const content = await fs$1.readFile(expanded, "utf8");
|
|
58267
58381
|
const userHostMatch = content.match(/\bssh\b[^\n]*?\s+([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/);
|
|
58268
58382
|
if (userHostMatch) return userHostMatch[1];
|
|
58269
58383
|
return content.match(/\bssh\b[^\n]*?\s+([a-zA-Z][a-zA-Z0-9._-]*)\s+\S*\bimsg\b/)?.[1];
|
|
@@ -58607,7 +58721,7 @@ async function monitorIMessageProvider(opts = {}) {
|
|
|
58607
58721
|
function readFileIfExists(filePath) {
|
|
58608
58722
|
if (!filePath) return;
|
|
58609
58723
|
try {
|
|
58610
|
-
return
|
|
58724
|
+
return fs.readFileSync(filePath, "utf-8").trim();
|
|
58611
58725
|
} catch {
|
|
58612
58726
|
return;
|
|
58613
58727
|
}
|
|
@@ -59168,7 +59282,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
|
|
|
59168
59282
|
prefix: "line-media",
|
|
59169
59283
|
extension: getExtensionForContentType(contentType)
|
|
59170
59284
|
});
|
|
59171
|
-
await
|
|
59285
|
+
await fs.promises.writeFile(filePath, buffer);
|
|
59172
59286
|
logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
|
|
59173
59287
|
return {
|
|
59174
59288
|
path: filePath,
|
|
@@ -64155,7 +64269,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
64155
64269
|
}
|
|
64156
64270
|
let commandsRegistry;
|
|
64157
64271
|
async function getCommandsRegistry() {
|
|
64158
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
64272
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-BSvi46KZ.js").then((n) => n.n);
|
|
64159
64273
|
return commandsRegistry;
|
|
64160
64274
|
}
|
|
64161
64275
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -64497,11 +64611,11 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
64497
64611
|
const channelName = channelInfo?.name;
|
|
64498
64612
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
64499
64613
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
64500
|
-
import("./resolve-route-
|
|
64614
|
+
import("./resolve-route-DX7xcMsD.js").then((n) => n.r),
|
|
64501
64615
|
import("./inbound-context-Dvqh1Tgb.js").then((n) => n.n),
|
|
64502
64616
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
64503
64617
|
]);
|
|
64504
|
-
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-
|
|
64618
|
+
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-CvEIl6_d.js").then((n) => n.n)]);
|
|
64505
64619
|
const route = resolveAgentRoute({
|
|
64506
64620
|
cfg,
|
|
64507
64621
|
channel: "slack",
|
|
@@ -64558,9 +64672,9 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
64558
64672
|
});
|
|
64559
64673
|
const deliverSlashPayloads = async (replies) => {
|
|
64560
64674
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
64561
|
-
import("./replies-
|
|
64562
|
-
import("./chunk-
|
|
64563
|
-
import("./markdown-tables-
|
|
64675
|
+
import("./replies-CBS0567j.js").then((n) => n.r),
|
|
64676
|
+
import("./chunk-BHW8Yu5A.js").then((n) => n.s),
|
|
64677
|
+
import("./markdown-tables-Dnj2LQUc.js").then((n) => n.t)
|
|
64564
64678
|
]);
|
|
64565
64679
|
await deliverSlackSlashReplies({
|
|
64566
64680
|
replies,
|
|
@@ -64613,7 +64727,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
64613
64727
|
let nativeCommands = [];
|
|
64614
64728
|
if (nativeEnabled) {
|
|
64615
64729
|
reg = await getCommandsRegistry();
|
|
64616
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
64730
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-BiPrghRt.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
64617
64731
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
64618
64732
|
skillCommands,
|
|
64619
64733
|
provider: "slack"
|
|
@@ -66831,7 +66945,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
66831
66945
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
66832
66946
|
let preflightTranscript;
|
|
66833
66947
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
66834
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
66948
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-K-s65jbB.js");
|
|
66835
66949
|
preflightTranscript = await transcribeFirstAudio({
|
|
66836
66950
|
ctx: {
|
|
66837
66951
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -68599,7 +68713,7 @@ function safeParseState(raw) {
|
|
|
68599
68713
|
async function readTelegramUpdateOffset(params) {
|
|
68600
68714
|
const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
|
|
68601
68715
|
try {
|
|
68602
|
-
return safeParseState(await fs.readFile(filePath, "utf-8"))?.lastUpdateId ?? null;
|
|
68716
|
+
return safeParseState(await fs$1.readFile(filePath, "utf-8"))?.lastUpdateId ?? null;
|
|
68603
68717
|
} catch (err) {
|
|
68604
68718
|
if (err.code === "ENOENT") return null;
|
|
68605
68719
|
return null;
|
|
@@ -68608,7 +68722,7 @@ async function readTelegramUpdateOffset(params) {
|
|
|
68608
68722
|
async function writeTelegramUpdateOffset(params) {
|
|
68609
68723
|
const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
|
|
68610
68724
|
const dir = path.dirname(filePath);
|
|
68611
|
-
await fs.mkdir(dir, {
|
|
68725
|
+
await fs$1.mkdir(dir, {
|
|
68612
68726
|
recursive: true,
|
|
68613
68727
|
mode: 448
|
|
68614
68728
|
});
|
|
@@ -68617,9 +68731,9 @@ async function writeTelegramUpdateOffset(params) {
|
|
|
68617
68731
|
version: STORE_VERSION,
|
|
68618
68732
|
lastUpdateId: params.updateId
|
|
68619
68733
|
};
|
|
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);
|
|
68734
|
+
await fs$1.writeFile(tmp, `${JSON.stringify(payload, null, 2)}\n`, { encoding: "utf-8" });
|
|
68735
|
+
await fs$1.chmod(tmp, 384);
|
|
68736
|
+
await fs$1.rename(tmp, filePath);
|
|
68623
68737
|
}
|
|
68624
68738
|
|
|
68625
68739
|
//#endregion
|
|
@@ -68976,23 +69090,23 @@ let webLoginQrPromise = null;
|
|
|
68976
69090
|
let webChannelPromise = null;
|
|
68977
69091
|
let whatsappActionsPromise = null;
|
|
68978
69092
|
function loadWebOutbound() {
|
|
68979
|
-
webOutboundPromise ??= import("./outbound-
|
|
69093
|
+
webOutboundPromise ??= import("./outbound-DL8bdXlZ.js").then((n) => n.t);
|
|
68980
69094
|
return webOutboundPromise;
|
|
68981
69095
|
}
|
|
68982
69096
|
function loadWebLogin() {
|
|
68983
|
-
webLoginPromise ??= import("./login-
|
|
69097
|
+
webLoginPromise ??= import("./login-BtBwGFrb.js").then((n) => n.n);
|
|
68984
69098
|
return webLoginPromise;
|
|
68985
69099
|
}
|
|
68986
69100
|
function loadWebLoginQr() {
|
|
68987
|
-
webLoginQrPromise ??= import("./login-qr-
|
|
69101
|
+
webLoginQrPromise ??= import("./login-qr-q201Ckfe.js");
|
|
68988
69102
|
return webLoginQrPromise;
|
|
68989
69103
|
}
|
|
68990
69104
|
function loadWebChannel() {
|
|
68991
|
-
webChannelPromise ??= import("./web-
|
|
69105
|
+
webChannelPromise ??= import("./web-BUc-ts5b.js");
|
|
68992
69106
|
return webChannelPromise;
|
|
68993
69107
|
}
|
|
68994
69108
|
function loadWhatsAppActions() {
|
|
68995
|
-
whatsappActionsPromise ??= import("./whatsapp-actions-
|
|
69109
|
+
whatsappActionsPromise ??= import("./whatsapp-actions-mBarFBeS.js");
|
|
68996
69110
|
return whatsappActionsPromise;
|
|
68997
69111
|
}
|
|
68998
69112
|
function createPluginRuntime() {
|
|
@@ -69213,7 +69327,7 @@ const resolvePluginSdkAliasFile = (params) => {
|
|
|
69213
69327
|
const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
|
|
69214
69328
|
const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
|
|
69215
69329
|
const orderedCandidates = isTest ? [distCandidate, srcCandidate] : [distCandidate];
|
|
69216
|
-
for (const candidate of orderedCandidates) if (
|
|
69330
|
+
for (const candidate of orderedCandidates) if (fs.existsSync(candidate)) return candidate;
|
|
69217
69331
|
const parent = path.dirname(cursor);
|
|
69218
69332
|
if (parent === cursor) break;
|
|
69219
69333
|
cursor = parent;
|
|
@@ -69759,7 +69873,7 @@ function resolvePluginTools(params) {
|
|
|
69759
69873
|
//#endregion
|
|
69760
69874
|
//#region src/agents/apply-patch-update.ts
|
|
69761
69875
|
async function defaultReadFile(filePath) {
|
|
69762
|
-
return fs.readFile(filePath, "utf8");
|
|
69876
|
+
return fs$1.readFile(filePath, "utf8");
|
|
69763
69877
|
}
|
|
69764
69878
|
async function applyUpdateHunk(filePath, chunks, options) {
|
|
69765
69879
|
const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
|
|
@@ -70003,10 +70117,10 @@ function resolvePatchFileOps(options) {
|
|
|
70003
70117
|
};
|
|
70004
70118
|
}
|
|
70005
70119
|
return {
|
|
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(() => {})
|
|
70120
|
+
readFile: (filePath) => fs$1.readFile(filePath, "utf8"),
|
|
70121
|
+
writeFile: (filePath, content) => fs$1.writeFile(filePath, content, "utf8"),
|
|
70122
|
+
remove: (filePath) => fs$1.rm(filePath),
|
|
70123
|
+
mkdirp: (dir) => fs$1.mkdir(dir, { recursive: true }).then(() => {})
|
|
70010
70124
|
};
|
|
70011
70125
|
}
|
|
70012
70126
|
async function ensureDir(filePath, ops) {
|
|
@@ -71251,7 +71365,7 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
71251
71365
|
};
|
|
71252
71366
|
let content;
|
|
71253
71367
|
try {
|
|
71254
|
-
content = await fs.readFile(sessionFile, "utf-8");
|
|
71368
|
+
content = await fs$1.readFile(sessionFile, "utf-8");
|
|
71255
71369
|
} catch (err) {
|
|
71256
71370
|
if (err?.code === "ENOENT") return {
|
|
71257
71371
|
repaired: false,
|
|
@@ -71299,15 +71413,15 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
71299
71413
|
const backupPath = `${sessionFile}.bak-${process.pid}-${Date.now()}`;
|
|
71300
71414
|
const tmpPath = `${sessionFile}.repair-${process.pid}-${Date.now()}.tmp`;
|
|
71301
71415
|
try {
|
|
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);
|
|
71416
|
+
const stat = await fs$1.stat(sessionFile).catch(() => null);
|
|
71417
|
+
await fs$1.writeFile(backupPath, content, "utf-8");
|
|
71418
|
+
if (stat) await fs$1.chmod(backupPath, stat.mode);
|
|
71419
|
+
await fs$1.writeFile(tmpPath, cleaned, "utf-8");
|
|
71420
|
+
if (stat) await fs$1.chmod(tmpPath, stat.mode);
|
|
71421
|
+
await fs$1.rename(tmpPath, sessionFile);
|
|
71308
71422
|
} catch (err) {
|
|
71309
71423
|
try {
|
|
71310
|
-
await fs.unlink(tmpPath);
|
|
71424
|
+
await fs$1.unlink(tmpPath);
|
|
71311
71425
|
} catch (cleanupErr) {
|
|
71312
71426
|
params.warn?.(`session file repair cleanup failed: ${cleanupErr instanceof Error ? cleanupErr.message : "unknown error"} (${path.basename(tmpPath)})`);
|
|
71313
71427
|
}
|
|
@@ -71588,6 +71702,10 @@ function installSessionToolResultGuard(sessionManager, opts) {
|
|
|
71588
71702
|
const guardedAppend = (message) => {
|
|
71589
71703
|
let nextMessage = message;
|
|
71590
71704
|
if (message.role === "assistant") {
|
|
71705
|
+
if (isEmptyAssistantMessage(message)) {
|
|
71706
|
+
if (allowSyntheticToolResults && pending.size > 0) flushPendingToolResults();
|
|
71707
|
+
return;
|
|
71708
|
+
}
|
|
71591
71709
|
const sanitized = sanitizeToolCallInputs([message]);
|
|
71592
71710
|
if (sanitized.length === 0) {
|
|
71593
71711
|
if (allowSyntheticToolResults && pending.size > 0) flushPendingToolResults();
|
|
@@ -71991,8 +72109,8 @@ async function readWorkspaceContextForSummary() {
|
|
|
71991
72109
|
const workspaceDir = process.cwd();
|
|
71992
72110
|
const agentsPath = path.join(workspaceDir, "AGENTS.md");
|
|
71993
72111
|
try {
|
|
71994
|
-
if (!
|
|
71995
|
-
const sections = extractSections(await
|
|
72112
|
+
if (!fs.existsSync(agentsPath)) return "";
|
|
72113
|
+
const sections = extractSections(await fs.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
|
|
71996
72114
|
if (sections.length === 0) return "";
|
|
71997
72115
|
const combined = sections.join("\n\n");
|
|
71998
72116
|
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>`;
|
|
@@ -72548,7 +72666,7 @@ async function prewarmSessionFile(sessionFile) {
|
|
|
72548
72666
|
if (!isSessionManagerCacheEnabled()) return;
|
|
72549
72667
|
if (isSessionManagerCached(sessionFile)) return;
|
|
72550
72668
|
try {
|
|
72551
|
-
const handle = await fs.open(sessionFile, "r");
|
|
72669
|
+
const handle = await fs$1.open(sessionFile, "r");
|
|
72552
72670
|
try {
|
|
72553
72671
|
const buffer = Buffer$1.alloc(4096);
|
|
72554
72672
|
await handle.read(buffer, 0, buffer.length, 0);
|
|
@@ -72681,14 +72799,14 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
72681
72799
|
if (!apiKeyInfo.apiKey) {
|
|
72682
72800
|
if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
72683
72801
|
} else if (model.provider === "github-copilot") {
|
|
72684
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
72802
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-cCYzSU9h.js").then((n) => n.n);
|
|
72685
72803
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
72686
72804
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
72687
72805
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
72688
72806
|
} catch (err) {
|
|
72689
72807
|
return fail(describeUnknownError(err));
|
|
72690
72808
|
}
|
|
72691
|
-
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
72809
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
72692
72810
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
72693
72811
|
const sandbox = await resolveSandboxContext({
|
|
72694
72812
|
config: params.config,
|
|
@@ -72696,7 +72814,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
72696
72814
|
workspaceDir: resolvedWorkspace
|
|
72697
72815
|
});
|
|
72698
72816
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
72699
|
-
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
72817
|
+
await fs$1.mkdir(effectiveWorkspace, { recursive: true });
|
|
72700
72818
|
await ensureSessionHeader({
|
|
72701
72819
|
sessionFile: params.sessionFile,
|
|
72702
72820
|
sessionId: params.sessionId,
|
|
@@ -73050,12 +73168,12 @@ function getQueuedFileWriter(writers, filePath) {
|
|
|
73050
73168
|
const existing = writers.get(filePath);
|
|
73051
73169
|
if (existing) return existing;
|
|
73052
73170
|
const dir = path.dirname(filePath);
|
|
73053
|
-
const ready = fs.mkdir(dir, { recursive: true }).catch(() => void 0);
|
|
73171
|
+
const ready = fs$1.mkdir(dir, { recursive: true }).catch(() => void 0);
|
|
73054
73172
|
let queue = Promise.resolve();
|
|
73055
73173
|
const writer = {
|
|
73056
73174
|
filePath,
|
|
73057
73175
|
write: (line) => {
|
|
73058
|
-
queue = queue.then(() => ready).then(() => fs.appendFile(filePath, line, "utf8")).catch(() => void 0);
|
|
73176
|
+
queue = queue.then(() => ready).then(() => fs$1.appendFile(filePath, line, "utf8")).catch(() => void 0);
|
|
73059
73177
|
}
|
|
73060
73178
|
};
|
|
73061
73179
|
writers.set(filePath, writer);
|
|
@@ -73531,6 +73649,10 @@ function createModelAwareStreamFn(opts) {
|
|
|
73531
73649
|
if (typeof mergedParams.top_p === "number") injections.top_p = mergedParams.top_p;
|
|
73532
73650
|
if (typeof mergedParams.top_k === "number") injections.top_k = mergedParams.top_k;
|
|
73533
73651
|
if (typeof mergedParams.repeat_penalty === "number") injections.repeat_penalty = mergedParams.repeat_penalty;
|
|
73652
|
+
if (typeof mergedParams.presence_penalty === "number") injections.presence_penalty = mergedParams.presence_penalty;
|
|
73653
|
+
if (typeof mergedParams.frequency_penalty === "number") injections.frequency_penalty = mergedParams.frequency_penalty;
|
|
73654
|
+
const chatTemplateKwargs = mergedParams.chatTemplateKwargs ?? mergedParams.chat_template_kwargs;
|
|
73655
|
+
if (chatTemplateKwargs && typeof chatTemplateKwargs === "object" && !Array.isArray(chatTemplateKwargs)) injections.chat_template_kwargs = chatTemplateKwargs;
|
|
73534
73656
|
const isVllm = isVllmProvider(opts.provider, opts.modelId, opts.config);
|
|
73535
73657
|
const isOpenRouter = opts.provider === "openrouter";
|
|
73536
73658
|
const extraHeaders = {};
|
|
@@ -74080,11 +74202,11 @@ function appendRawStream(payload) {
|
|
|
74080
74202
|
if (!rawStreamReady) {
|
|
74081
74203
|
rawStreamReady = true;
|
|
74082
74204
|
try {
|
|
74083
|
-
|
|
74205
|
+
fs.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
|
|
74084
74206
|
} catch {}
|
|
74085
74207
|
}
|
|
74086
74208
|
try {
|
|
74087
|
-
|
|
74209
|
+
fs.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
|
|
74088
74210
|
} catch {}
|
|
74089
74211
|
}
|
|
74090
74212
|
|
|
@@ -74138,7 +74260,11 @@ function handleMessageUpdate(ctx, evt) {
|
|
|
74138
74260
|
emitAgentEvent({
|
|
74139
74261
|
runId: ctx.params.runId,
|
|
74140
74262
|
stream: "thinking",
|
|
74141
|
-
data: {
|
|
74263
|
+
data: {
|
|
74264
|
+
phase: evtType,
|
|
74265
|
+
delta: thinkingDelta,
|
|
74266
|
+
content: thinkingContent
|
|
74267
|
+
}
|
|
74142
74268
|
});
|
|
74143
74269
|
if (ctx.state.streamReasoning) {
|
|
74144
74270
|
const partialThinking = extractAssistantThinking(msg);
|
|
@@ -75864,6 +75990,93 @@ Use the message tool with buttons:
|
|
|
75864
75990
|
[{"label": "✅ Proceed", "data": "/plan-proceed"}, {"label": "✏️ Modify", "data": "/plan-modify"}, {"label": "❌ Cancel", "data": "/plan-cancel"}]
|
|
75865
75991
|
</plan_mode>`;
|
|
75866
75992
|
|
|
75993
|
+
//#endregion
|
|
75994
|
+
//#region src/agents/session-empty-prune.ts
|
|
75995
|
+
/**
|
|
75996
|
+
* Pre-run prune of empty assistant entries from a session JSONL file.
|
|
75997
|
+
*
|
|
75998
|
+
* When a stream fails before any content arrives, pi-coding-agent persists
|
|
75999
|
+
* an assistant message with an empty content array. If this repeats (e.g. a
|
|
76000
|
+
* misconfigured provider fails on every retry), the session ends up with
|
|
76001
|
+
* hundreds of consecutive empty assistant entries. vLLM and other strict
|
|
76002
|
+
* providers then reject the request with a role-ordering error — once the
|
|
76003
|
+
* session is in that state, every future turn fails until the user runs /new.
|
|
76004
|
+
*
|
|
76005
|
+
* This helper runs before SessionManager opens the file, reads the JSONL
|
|
76006
|
+
* line-by-line, filters out any line whose `message` is an empty-content
|
|
76007
|
+
* assistant, and rewrites the file atomically if anything was dropped. The
|
|
76008
|
+
* in-memory SessionManager state and the on-disk file stay consistent.
|
|
76009
|
+
*
|
|
76010
|
+
* The append guard in {@link ./session-tool-result-guard.ts} prevents new
|
|
76011
|
+
* empty entries from being written; this helper retroactively cleans files
|
|
76012
|
+
* that were poisoned before the guard existed.
|
|
76013
|
+
*
|
|
76014
|
+
* @module
|
|
76015
|
+
*/
|
|
76016
|
+
async function readSessionFile(sessionFile) {
|
|
76017
|
+
try {
|
|
76018
|
+
return await fs$1.readFile(sessionFile, "utf-8");
|
|
76019
|
+
} catch {
|
|
76020
|
+
return null;
|
|
76021
|
+
}
|
|
76022
|
+
}
|
|
76023
|
+
async function writeAtomically(sessionFile, text) {
|
|
76024
|
+
const dir = path.dirname(sessionFile);
|
|
76025
|
+
const base = path.basename(sessionFile);
|
|
76026
|
+
const tmp = path.join(dir, `.${base}.prune-${process.pid}-${Date.now()}.tmp`);
|
|
76027
|
+
await fs$1.writeFile(tmp, text, "utf-8");
|
|
76028
|
+
await fs$1.rename(tmp, sessionFile);
|
|
76029
|
+
}
|
|
76030
|
+
/**
|
|
76031
|
+
* Remove empty assistant JSONL entries from the session file.
|
|
76032
|
+
*
|
|
76033
|
+
* Parses each line; lines that don't parse are preserved verbatim so we don't
|
|
76034
|
+
* lose unknown data. Only lines that parse into a `{type:"message", message:
|
|
76035
|
+
* <empty-assistant>}` entry are dropped.
|
|
76036
|
+
*/
|
|
76037
|
+
async function pruneEmptyAssistantsFromSessionFile(sessionFile) {
|
|
76038
|
+
const raw = await readSessionFile(sessionFile);
|
|
76039
|
+
if (raw === null || raw.length === 0) return {
|
|
76040
|
+
rewrote: false,
|
|
76041
|
+
pruned: 0,
|
|
76042
|
+
unparsable: 0
|
|
76043
|
+
};
|
|
76044
|
+
const lines = raw.split("\n");
|
|
76045
|
+
const kept = [];
|
|
76046
|
+
let pruned = 0;
|
|
76047
|
+
let unparsable = 0;
|
|
76048
|
+
for (const line of lines) {
|
|
76049
|
+
if (line.length === 0) {
|
|
76050
|
+
kept.push(line);
|
|
76051
|
+
continue;
|
|
76052
|
+
}
|
|
76053
|
+
let parsed = null;
|
|
76054
|
+
try {
|
|
76055
|
+
parsed = JSON.parse(line);
|
|
76056
|
+
} catch {
|
|
76057
|
+
unparsable += 1;
|
|
76058
|
+
kept.push(line);
|
|
76059
|
+
continue;
|
|
76060
|
+
}
|
|
76061
|
+
if (parsed?.type === "message" && isEmptyAssistantMessage(parsed.message)) {
|
|
76062
|
+
pruned += 1;
|
|
76063
|
+
continue;
|
|
76064
|
+
}
|
|
76065
|
+
kept.push(line);
|
|
76066
|
+
}
|
|
76067
|
+
if (pruned === 0) return {
|
|
76068
|
+
rewrote: false,
|
|
76069
|
+
pruned: 0,
|
|
76070
|
+
unparsable
|
|
76071
|
+
};
|
|
76072
|
+
await writeAtomically(sessionFile, kept.join("\n"));
|
|
76073
|
+
return {
|
|
76074
|
+
rewrote: true,
|
|
76075
|
+
pruned,
|
|
76076
|
+
unparsable
|
|
76077
|
+
};
|
|
76078
|
+
}
|
|
76079
|
+
|
|
75867
76080
|
//#endregion
|
|
75868
76081
|
//#region src/agents/session-version.ts
|
|
75869
76082
|
/**
|
|
@@ -75914,7 +76127,7 @@ function isInPoisonRange(version) {
|
|
|
75914
76127
|
*/
|
|
75915
76128
|
async function checkSessionPoison(sessionFile) {
|
|
75916
76129
|
try {
|
|
75917
|
-
const firstLine = (await fs.readFile(sessionFile, "utf-8")).split("\n")[0];
|
|
76130
|
+
const firstLine = (await fs$1.readFile(sessionFile, "utf-8")).split("\n")[0];
|
|
75918
76131
|
if (!firstLine) return null;
|
|
75919
76132
|
const header = JSON.parse(firstLine);
|
|
75920
76133
|
if (header.type !== "session") return null;
|
|
@@ -75932,7 +76145,7 @@ async function checkSessionPoison(sessionFile) {
|
|
|
75932
76145
|
*/
|
|
75933
76146
|
async function archivePoisonedSession(sessionFile) {
|
|
75934
76147
|
const archiveName = `${sessionFile}.archived-poison.${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
|
|
75935
|
-
await fs.rename(sessionFile, archiveName);
|
|
76148
|
+
await fs$1.rename(sessionFile, archiveName);
|
|
75936
76149
|
return archiveName;
|
|
75937
76150
|
}
|
|
75938
76151
|
/**
|
|
@@ -75941,14 +76154,14 @@ async function archivePoisonedSession(sessionFile) {
|
|
|
75941
76154
|
*/
|
|
75942
76155
|
async function stampSessionVersion(sessionFile) {
|
|
75943
76156
|
try {
|
|
75944
|
-
const lines = (await fs.readFile(sessionFile, "utf-8")).split("\n");
|
|
76157
|
+
const lines = (await fs$1.readFile(sessionFile, "utf-8")).split("\n");
|
|
75945
76158
|
if (lines.length === 0) return;
|
|
75946
76159
|
const header = JSON.parse(lines[0]);
|
|
75947
76160
|
if (header.type !== "session") return;
|
|
75948
76161
|
if (header.symiVersion === VERSION) return;
|
|
75949
76162
|
header.symiVersion = VERSION;
|
|
75950
76163
|
lines[0] = JSON.stringify(header);
|
|
75951
|
-
await fs.writeFile(sessionFile, lines.join("\n"), "utf-8");
|
|
76164
|
+
await fs$1.writeFile(sessionFile, lines.join("\n"), "utf-8");
|
|
75952
76165
|
} catch {}
|
|
75953
76166
|
}
|
|
75954
76167
|
/**
|
|
@@ -76111,7 +76324,7 @@ async function prepareSessionManagerForRun(params) {
|
|
|
76111
76324
|
return;
|
|
76112
76325
|
}
|
|
76113
76326
|
if (params.hadSessionFile && header && !hasAssistant) {
|
|
76114
|
-
await fs.writeFile(params.sessionFile, "", "utf-8");
|
|
76327
|
+
await fs$1.writeFile(params.sessionFile, "", "utf-8");
|
|
76115
76328
|
sm.fileEntries = [header];
|
|
76116
76329
|
sm.byId?.clear?.();
|
|
76117
76330
|
sm.labelsById?.clear?.();
|
|
@@ -76669,7 +76882,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
76669
76882
|
const prevCwd = process.cwd();
|
|
76670
76883
|
const runAbortController = new AbortController();
|
|
76671
76884
|
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"}`);
|
|
76672
|
-
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
76885
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
76673
76886
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
76674
76887
|
const sandbox = await resolveSandboxContext({
|
|
76675
76888
|
config: params.config,
|
|
@@ -76677,7 +76890,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
76677
76890
|
workspaceDir: resolvedWorkspace
|
|
76678
76891
|
});
|
|
76679
76892
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
76680
|
-
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
76893
|
+
await fs$1.mkdir(effectiveWorkspace, { recursive: true });
|
|
76681
76894
|
let restoreSkillEnv;
|
|
76682
76895
|
process.chdir(effectiveWorkspace);
|
|
76683
76896
|
try {
|
|
@@ -76907,7 +77120,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
76907
77120
|
sessionFile: params.sessionFile,
|
|
76908
77121
|
warn: (message) => log$9.warn(message)
|
|
76909
77122
|
});
|
|
76910
|
-
const hadSessionFile = await fs.stat(params.sessionFile).then(() => true).catch(() => false);
|
|
77123
|
+
const hadSessionFile = await fs$1.stat(params.sessionFile).then(() => true).catch(() => false);
|
|
76911
77124
|
const transcriptPolicy = resolveTranscriptPolicy({
|
|
76912
77125
|
modelApi: params.model?.api,
|
|
76913
77126
|
provider: params.provider,
|
|
@@ -76915,6 +77128,8 @@ async function runEmbeddedAttempt(params) {
|
|
|
76915
77128
|
});
|
|
76916
77129
|
const versionCheck = await handleSessionVersion(params.sessionFile);
|
|
76917
77130
|
if (versionCheck.archived) log$9.warn(`session archived: created by ${versionCheck.poisonVersion}, known corruption range → ${versionCheck.archivePath}`);
|
|
77131
|
+
const pruneReport = await pruneEmptyAssistantsFromSessionFile(params.sessionFile);
|
|
77132
|
+
if (pruneReport.rewrote) log$9.warn(`session prune: removed ${pruneReport.pruned} empty assistant entries from ${params.sessionFile}`);
|
|
76918
77133
|
await prewarmSessionFile(params.sessionFile);
|
|
76919
77134
|
sessionManager = guardSessionManager(SessionManager.open(params.sessionFile), {
|
|
76920
77135
|
agentId: sessionAgentId,
|
|
@@ -77892,7 +78107,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
77892
78107
|
return;
|
|
77893
78108
|
}
|
|
77894
78109
|
if (model.provider === "github-copilot") {
|
|
77895
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
78110
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-cCYzSU9h.js").then((n) => n.n);
|
|
77896
78111
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
77897
78112
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
77898
78113
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
@@ -77977,7 +78192,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
77977
78192
|
}
|
|
77978
78193
|
runLoopIterations += 1;
|
|
77979
78194
|
attemptedThinking.add(thinkLevel);
|
|
77980
|
-
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
78195
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
77981
78196
|
const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
|
|
77982
78197
|
const attempt = await runEmbeddedAttempt({
|
|
77983
78198
|
sessionId: params.sessionId,
|