@fased/fased 0.1.27 → 0.1.28
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/{active-listener-Bw8DT1EX.js → active-listener-Dmc7Xtuo.js} +1 -1
- package/dist/{agent-scope-Bx0XQq3s.js → agent-scope-BYecP9O5.js} +124 -124
- package/dist/{agents-PLOoSFBh.js → agents-iYhhEhBa.js} +8 -8
- package/dist/{attachment-normalize-BIZB4CND.js → attachment-normalize-BhAxfpDx.js} +1 -1
- package/dist/{attachment-normalize-ChuwwIS8.js → attachment-normalize-CKtDb7Dr.js} +1 -1
- package/dist/{audio-preflight-DS-zoM7T.js → audio-preflight-C8g4U208.js} +1 -1
- package/dist/{audio-preflight-DCByMRyo.js → audio-preflight-Cay8mZwp.js} +2 -2
- package/dist/{audio-preflight-Ca5VMwBa.js → audio-preflight-Ck89DLHq.js} +31 -31
- package/dist/{audio-preflight-CauBE2g_.js → audio-preflight-W0jytQTE.js} +2 -2
- package/dist/{audio-preflight-w8nKC_zF.js → audio-preflight-ktHzRxN9.js} +2 -2
- package/dist/{audit-CBKvcMiw.js → audit-DAgPJ6XG.js} +1 -1
- package/dist/{audit--Uj8Mv8B.js → audit-nu4TuGmi.js} +1 -1
- package/dist/{auth-BM6Ysl_r.js → auth-BXZyivvK.js} +5 -5
- package/dist/{auth-choice-Bjt7dFoE.js → auth-choice--uTO5KF9.js} +1 -1
- package/dist/{auth-choice-B6TwaDrq.js → auth-choice-T0k3b6-S.js} +1 -1
- package/dist/{auth-choice-prompt-0CJxkm9g.js → auth-choice-prompt-CpPAxYWh.js} +1 -1
- package/dist/{auth-choice-prompt-B-MUEZKO.js → auth-choice-prompt-DT4lamSy.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +31 -31
- package/dist/bundled/bootstrap-extra-files/handler.js +3 -3
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +31 -31
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-BvC4RbBO.js → channel-activity-D69hLBEQ.js} +1 -1
- package/dist/{channel-web-d-gVS8PK.js → channel-web-C5m2F4jn.js} +1 -1
- package/dist/{channel-web-B9RMCX6L.js → channel-web-DCEtUdZl.js} +1 -1
- package/dist/{channels-COP0GMYS.js → channels-BKcpSzps.js} +6 -6
- package/dist/{channels-Dwz-DRz2.js → channels-DmfjfmuY.js} +6 -6
- package/dist/{channels-cli-CN_1e7BH.js → channels-cli-CQoyRjEk.js} +5 -5
- package/dist/{channels-cli-D7Z_4VdM.js → channels-cli-Cz7A96xt.js} +5 -5
- package/dist/{chunk-CiQeXMLG.js → chunk-KatG8h1H.js} +1 -1
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-CkL6EZ2f.js → cli-CTiidr2w.js} +2 -2
- package/dist/{cli-BbyRRGp-.js → cli-D6qlo3sU.js} +2 -2
- package/dist/{command-registry-DdDH0kwR.js → command-registry-DjcstblD.js} +9 -9
- package/dist/{commands-registry-t0hu8c_Z.js → commands-registry-CG-_VuYC.js} +1 -1
- package/dist/{completion-cli-CGaMvenV.js → completion-cli-B_uil7u0.js} +1 -1
- package/dist/{completion-cli-D2VoNwGt.js → completion-cli-DId41h2e.js} +2 -2
- package/dist/{config-cli-Cvli_FYY.js → config-cli-B6Eyt9Xm.js} +1 -1
- package/dist/{config-cli-BGg7Pf90.js → config-cli-atr2j6q9.js} +1 -1
- package/dist/{config-eval-CLXDBlCw.js → config-eval-DxNYxraZ.js} +3 -3
- package/dist/{configure-BOk0QyDm.js → configure-C5toPgaS.js} +12 -12
- package/dist/{configure-DEmZM_YG.js → configure-CrAz2sq9.js} +12 -12
- package/dist/control-ui/assets/app-DXYMrRJ9.js.map +1 -1
- package/dist/{cron-cli-DCnD8EW6.js → cron-cli-B9LYsXv6.js} +2 -2
- package/dist/{cron-cli-DOljEleF.js → cron-cli-CJ90NUZf.js} +2 -2
- package/dist/{daemon-cli-CZb48IA1.js → daemon-cli-BS1JARm_.js} +1 -1
- package/dist/{daemon-cli-BNr159ZN.js → daemon-cli-D2K0A2cj.js} +1 -1
- package/dist/daemon-cli.js +1 -1
- package/dist/{deps-GpT8ZL7k.js → deps-BX9qxzg9.js} +1 -1
- package/dist/{deps-CUgTrfT_.js → deps-BtUx0oOa.js} +1 -1
- package/dist/{diagnostic-C6MSQFZF.js → diagnostic-BYQE13k1.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +2 -2
- package/dist/{fetch-BwkjkjT6.js → fetch-CYWabNXm.js} +1 -1
- package/dist/{fetch-guard-DdMratk8.js → fetch-guard-CNlKZ01R.js} +1 -1
- package/dist/{filesystem-manager-B8V6mEya.js → filesystem-manager-CWbYjhcQ.js} +4 -4
- package/dist/{fs-safe-CrX7hR24.js → fs-safe-T802CTm-.js} +2 -2
- package/dist/{gateway-cli-BP-_F4-K.js → gateway-cli-C8uThQly.js} +27 -27
- package/dist/{gateway-cli-DajIhoiB.js → gateway-cli-DQUDvD-P.js} +27 -27
- package/dist/{github-copilot-token-DYrFvncE.js → github-copilot-token-eyrRGmGp.js} +8 -8
- package/dist/{health-DZI1Wr4L.js → health-BH3E5Lbb.js} +2 -2
- package/dist/{health-DYfR2tAL.js → health-ylUwlg54.js} +2 -2
- package/dist/{heartbeat-runner-ChGSttk8.js → heartbeat-runner-7_Hl_o9c.js} +1 -1
- package/dist/{heartbeat-runner-BZRpdbzQ.js → heartbeat-runner-CrsGVWl5.js} +1 -1
- package/dist/{hooks-cli-DUc3nSFU.js → hooks-cli-CeznlOC9.js} +3 -3
- package/dist/{hooks-cli-C6Z69pLM.js → hooks-cli-tKMQrFUs.js} +3 -3
- package/dist/index.js +7 -7
- package/dist/{internal-QlbJb-4V.js → internal-CGfrGFGR.js} +3 -3
- package/dist/{ipv4-Blh2hgTQ.js → ipv4-BdcUd7th.js} +2 -2
- package/dist/{ipv4-Br8CDyh3.js → ipv4-xPPu8uhS.js} +2 -2
- package/dist/{lifecycle-CioP0p09.js → lifecycle-BiI4r6Yk.js} +1 -1
- package/dist/{lifecycle-J7GLbdbo.js → lifecycle-Dgvcj0y7.js} +1 -1
- package/dist/{list.auth-overview-CyhYp6EQ.js → list.auth-overview-CEuyMCA_.js} +1 -1
- package/dist/{list.auth-overview-CfC_nfJI.js → list.auth-overview-DBtoDv3I.js} +1 -1
- package/dist/llm-slug-generator.js +31 -31
- package/dist/{login-BGt2KP5c.js → login-H3-M4-wp.js} +2 -2
- package/dist/{login-qr-CDDF5Ark.js → login-qr-DIly-pBD.js} +3 -3
- package/dist/{manager-BfodMNDG.js → manager-ZRPdFyMZ.js} +8 -8
- package/dist/{markdown-tables-C-HEtwaC.js → markdown-tables-KcZiNfqg.js} +1 -1
- package/dist/{media-CInvDVc0.js → media-93Hw7QIY.js} +5 -5
- package/dist/{memory-search-BZt8FFLW.js → memory-search-CueDEO0U.js} +2 -2
- package/dist/{model-catalog-CMQwKS9K.js → model-catalog-CZu0lceX.js} +6 -6
- package/dist/{models-lNc4x6We.js → models-CH88-l57.js} +4 -4
- package/dist/{models-cli-D280hUIX.js → models-cli-BidzQ2ub.js} +5 -5
- package/dist/{models-cli-BRSRv8OR.js → models-cli-DaSPxlwv.js} +4 -4
- package/dist/{node-cli-CS_VyUoo.js → node-cli-DHodXSn8.js} +2 -2
- package/dist/{node-cli-nyS7caUG.js → node-cli-DtpX07Iy.js} +2 -2
- package/dist/{onboard-0OuxwPZt.js → onboard-C6FZXU0s.js} +6 -6
- package/dist/{onboard-DrDXqfYu.js → onboard-DxuuLAd-.js} +6 -6
- package/dist/{onboard-channels-B8E0CT6W.js → onboard-channels-CD98bI5k.js} +2 -2
- package/dist/{onboard-channels-ZLgokMu8.js → onboard-channels-md6qnWB2.js} +2 -2
- package/dist/{onboard-search-BS4tAvvO.js → onboard-search-DxM2zPhD.js} +5 -5
- package/dist/{onboard-search-Ba2ytDqC.js → onboard-search-VCCwZ9cO.js} +5 -5
- package/dist/{onboarding-DMNX3BK-.js → onboarding-CIOt4f3q.js} +7 -7
- package/dist/{onboarding-0-tN3rpU.js → onboarding-CUFTjmEm.js} +7 -7
- package/dist/{openresponses-http-DnQfIUr0.js → openresponses-http-B6U9EAH8.js} +1 -1
- package/dist/{openresponses-http-BIkAOTxf.js → openresponses-http-BQnFLiT5.js} +2 -2
- package/dist/{openresponses-http-Bo9vSaZm.js → openresponses-http-C-s0pFs7.js} +2 -2
- package/dist/{openresponses-http-BmZeLRVZ.js → openresponses-http-CP2yl2hZ.js} +2 -2
- package/dist/{openresponses-http-8dFSInBJ.js → openresponses-http-D4z9eTJH.js} +31 -31
- package/dist/{outbound-CfdOHhpP.js → outbound-C7mwBvhN.js} +6 -6
- package/dist/{outbound-attachment-BL6wK70V.js → outbound-attachment-DILp822M.js} +2 -2
- package/dist/{parent-default-help-Bw0TQqao.js → parent-default-help-ChpJAsU-.js} +1 -1
- package/dist/{parent-default-help-BUGE3N5M.js → parent-default-help-DbZXyZlW.js} +1 -1
- package/dist/{path-alias-guards-Dalcwl5X.js → path-alias-guards-DyTCSx8q.js} +1 -1
- package/dist/{paths-zdeD1PNp.js → paths-DBTQPSY5.js} +13 -13
- package/dist/{paths-6Y-iET7k.js → paths-DGN5lNb7.js} +9 -9
- package/dist/{pi-embedded-B4QplhHK.js → pi-embedded-B8HZySK8.js} +234 -234
- package/dist/{pi-embedded-CqBy4Ow1.js → pi-embedded-CulwZKSH.js} +14 -14
- package/dist/{pi-model-discovery-C1CAe7eM.js → pi-model-discovery--TE7j7VE.js} +7 -7
- package/dist/pi-model-discovery-runtime-DD55ZBCk.js +5 -0
- package/dist/{plugin-registry-B-5zsRCJ.js → plugin-registry-BnvUlYjK.js} +1 -1
- package/dist/{plugin-registry-CwdlIibL.js → plugin-registry-DxU6FpxL.js} +1 -1
- package/dist/plugin-sdk/{active-listener-BMdC_vyr.js → active-listener--vjYvMEK.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-B9XwrK8E.js → audio-preflight-DVUWB0LK.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-BzkkPOSy.js → audio-preflight-IwS9Ev0P.js} +29 -29
- package/dist/plugin-sdk/{channel-activity-NWX3LiLh.js → channel-activity-DkLb5E2L.js} +1 -1
- package/dist/plugin-sdk/{channel-web-edStGPJ_.js → channel-web-B2i4wI9t.js} +14 -14
- package/dist/plugin-sdk/{chunk-DnpNE3Xp.js → chunk-BDulh-FS.js} +1 -1
- package/dist/plugin-sdk/command-status.js +1 -1
- package/dist/plugin-sdk/{commands-registry-D-wBX44P.js → commands-registry-Cl80XXdf.js} +1 -1
- package/dist/plugin-sdk/{diagnostic-BjLGAdPW.js → diagnostic-BDrUrfZB.js} +1 -1
- package/dist/plugin-sdk/{fetch-CwQDqOty.js → fetch-dvtAysG4.js} +1 -1
- package/dist/plugin-sdk/{fetch-guard-C9OlAzZl.js → fetch-guard-BxBS-Ozv.js} +1 -1
- package/dist/plugin-sdk/{filesystem-manager-D2yRTu4v.js → filesystem-manager-6RcmLJuY.js} +3 -3
- package/dist/plugin-sdk/{fs-safe-Vt6xas26.js → fs-safe-CVSBTTvX.js} +2 -2
- package/dist/plugin-sdk/index.js +34 -34
- package/dist/plugin-sdk/{internal-BRBMoaD6.js → internal-s9L09jdh.js} +1 -1
- package/dist/plugin-sdk/{ir-BD_A53gm.js → ir-BmFS6Dzq.js} +4 -4
- package/dist/plugin-sdk/{login-Beyw9UA5.js → login-DNZBECsI.js} +2 -2
- package/dist/plugin-sdk/{login-qr-CvB90Ony.js → login-qr-B4GBAfDr.js} +2 -2
- package/dist/plugin-sdk/{manager-BQu1VKQ6.js → manager-BlHbK3u2.js} +5 -5
- package/dist/plugin-sdk/{markdown-tables-trVxBCrI.js → markdown-tables-CnJAOUZL.js} +1 -1
- package/dist/plugin-sdk/{memory-search-DjvKx_Hd.js → memory-search-nQXS-L20.js} +1 -1
- package/dist/plugin-sdk/{openresponses-http-DROo9RHP.js → openresponses-http-CCgnaxp6.js} +1 -1
- package/dist/plugin-sdk/{openresponses-http-CaUbvHEV.js → openresponses-http-CFXgOYZ8.js} +29 -29
- package/dist/plugin-sdk/{outbound-D_1hFaJ-.js → outbound-DNozCpaG.js} +6 -6
- package/dist/plugin-sdk/{outbound-attachment-DenNTymT.js → outbound-attachment-D22qcHys.js} +2 -2
- package/dist/plugin-sdk/{path-alias-guards-Wu92iGvE.js → path-alias-guards-DN9j8duf.js} +1 -1
- package/dist/plugin-sdk/{paths-CK25m2hW.js → paths-Cn8yCaSN.js} +2 -2
- package/dist/plugin-sdk/{pi-model-discovery-DMqhr7U_.js → pi-model-discovery-BeAR6-Xm.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-DScmspTB.js → pi-model-discovery-runtime-DRhhMGTg.js} +2 -2
- package/dist/plugin-sdk/{pw-ai-Cs75h-nL.js → pw-ai-CVhjKZsh.js} +4 -4
- package/dist/plugin-sdk/{qmd-manager-DEcJj-8k.js → qmd-manager-Hhb9s5Ex.js} +4 -4
- package/dist/plugin-sdk/{qmd-scope-BjxICI2O.js → qmd-scope-DOiYgpAa.js} +1 -1
- package/dist/plugin-sdk/{query-expansion-6wijZpq6.js → query-expansion-DlX2-yhE.js} +2 -2
- package/dist/plugin-sdk/{replies-C28zWuLO.js → replies-DsTSTkkm.js} +2 -2
- package/dist/plugin-sdk/{reply-c8Rhs5lm.js → reply-BzHXWKR0.js} +67 -67
- package/dist/plugin-sdk/{reply-prefix-CZBe0Ovo.js → reply-prefix-CM9vmzNS.js} +1 -1
- package/dist/plugin-sdk/{resolve-outbound-target-DyNIwkzd.js → resolve-outbound-target-BmAvZt5m.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-aT1YT8Ih.js → resolve-route-DB2O8xap.js} +1 -1
- package/dist/plugin-sdk/{runtime-Dxpfvz83.js → runtime-B3BC00NW.js} +8 -8
- package/dist/plugin-sdk/{send-Bf5cNKV-.js → send-B2PuRxAo.js} +5 -5
- package/dist/plugin-sdk/{send-D4Figs17.js → send-CX4dzEhO.js} +5 -5
- package/dist/plugin-sdk/{send-Des0LL0Y.js → send-Co84r8KW.js} +7 -7
- package/dist/plugin-sdk/{send-5VxqNtsW.js → send-Dzl1P-r1.js} +7 -7
- package/dist/plugin-sdk/{send-Uasa6JPL.js → send-LjnXKHz9.js} +4 -4
- package/dist/plugin-sdk/{session-BYUOdzi1.js → session-KVX2v7T3.js} +1 -1
- package/dist/plugin-sdk/{skill-commands-FnaJNY1m.js → skill-commands-CZ5QzawX.js} +5 -5
- package/dist/plugin-sdk/src/brand.d.ts +2 -2
- package/dist/plugin-sdk/{status-DvtcKSTx.js → status-B0XnEiYk.js} +5 -5
- package/dist/plugin-sdk/{tables-DjSNh4Qx.js → tables-B8koh_pB.js} +1 -1
- package/dist/plugin-sdk/{target-errors-DDRTJb87.js → target-errors-Bnnn54IW.js} +2 -2
- package/dist/plugin-sdk/{tool-loop-detection-B0pfI1b9.js → tool-loop-detection-ImTTGqAY.js} +1 -1
- package/dist/plugin-sdk/{web-CL-Tw8In.js → web-C9P8KPay.js} +1 -1
- package/dist/plugin-sdk/web-qxwuv8Ap.js +40 -0
- package/dist/plugin-sdk/{whatsapp-actions-Bx1OtYYh.js → whatsapp-actions-DjtDOMIg.js} +12 -12
- package/dist/{plugins-cli-3QWys_6K.js → plugins-cli-1E09EVlV.js} +5 -5
- package/dist/{plugins-cli-BZkTm6sr.js → plugins-cli-ipO2s_1B.js} +5 -5
- package/dist/{program-DvjNk69F.js → program-CDxLwJ0z.js} +7 -7
- package/dist/{program-context-BWy3h2ha.js → program-context-BD93RW74.js} +24 -24
- package/dist/{prompt-select-styled-BlI2vulE.js → prompt-select-styled-C-zi15KS.js} +4 -4
- package/dist/{prompt-select-styled-AIok8h9p.js → prompt-select-styled-CAKroAbM.js} +4 -4
- package/dist/{pw-ai-5b6U6vNE.js → pw-ai-4dv28kg0.js} +5 -5
- package/dist/{pw-ai-DuNzIjgi.js → pw-ai-BaQ88hEN.js} +1 -1
- package/dist/{qmd-manager-CVbI17-v.js → qmd-manager-DA3v0Y-t.js} +5 -5
- package/dist/{qmd-scope-CL7VCB5M.js → qmd-scope-Byk5KlGv.js} +1 -1
- package/dist/{query-expansion-DrMLz38Q.js → query-expansion-CGVFZR8O.js} +2 -2
- package/dist/{register.agent-B0v5EFb9.js → register.agent-BGaZQH1X.js} +8 -8
- package/dist/{register.agent-CM6ChCCM.js → register.agent-eKraQHJw.js} +9 -9
- package/dist/{register.configure-BrS9fnGg.js → register.configure-BA-xnssd.js} +12 -12
- package/dist/{register.configure-4lAnV0h2.js → register.configure-GwR5so5q.js} +12 -12
- package/dist/{register.maintenance-BZJ_FgeN.js → register.maintenance-BXgIzrdf.js} +9 -9
- package/dist/{register.maintenance-DWWFG05E.js → register.maintenance-C8OesoUh.js} +8 -8
- package/dist/{register.message-DpHNpm_f.js → register.message-Cu7PekBP.js} +3 -3
- package/dist/{register.message-BvoFyPQe.js → register.message-DhqGREy0.js} +3 -3
- package/dist/{register.onboard-BKkNiA3f.js → register.onboard-CQU1AliO.js} +14 -14
- package/dist/{register.onboard-BZBSH7lT.js → register.onboard-DkIAVugY.js} +14 -14
- package/dist/{register.setup-CxUzflwM.js → register.setup-BusNqDdc.js} +14 -14
- package/dist/{register.setup-e257emro.js → register.setup-DQaKZMeV.js} +14 -14
- package/dist/{register.status-health-sessions-kiaOc9lw.js → register.status-health-sessions-ChOZwDRw.js} +6 -6
- package/dist/{register.status-health-sessions-CaiPI_3z.js → register.status-health-sessions-D6VCFOIo.js} +6 -6
- package/dist/{register.subclis-BDKJfKQC.js → register.subclis-Drc4P-Nq.js} +16 -16
- package/dist/{replies-DEtI8EHM.js → replies-oXYe4wxf.js} +2 -2
- package/dist/{reply-DE8Gag1_.js → reply-BiTQJbqI.js} +6 -6
- package/dist/{reply-prefix-DVyUjzCQ.js → reply-prefix-DZjj9KHV.js} +1 -1
- package/dist/{resolve-route-Dc1L-NXd.js → resolve-route-D3-NnOVE.js} +1 -1
- package/dist/{run-main-BudffsJB.js → run-main-BY0Rwey1.js} +14 -14
- package/dist/{runtime-helper-grants-DtHN6AEs.js → runtime-helper-grants-DfJj0yBK.js} +1 -1
- package/dist/{runtime-helper-grants-BDKhdCvl.js → runtime-helper-grants-KLyyfrTt.js} +1 -1
- package/dist/{sandbox-cli-BLhIlpbj.js → sandbox-cli-DA7q2-Ck.js} +2 -2
- package/dist/{sandbox-cli-Bsy4jDbW.js → sandbox-cli-DaBgqYew.js} +2 -2
- package/dist/{security-cli-DSBudhYJ.js → security-cli-BzwvvYlN.js} +3 -3
- package/dist/{security-cli-BMWm4Crb.js → security-cli-CjylWZ8O.js} +3 -3
- package/dist/{send-CqQ88clX.js → send-B-sa1Rzn.js} +18 -18
- package/dist/{send-Ps08x526.js → send-Bhj3bXKi.js} +5 -5
- package/dist/{send-BohOQw4n.js → send-BqgaWpoE.js} +4 -4
- package/dist/{send-D8eFKkkd.js → send-C1YtjPQb.js} +5 -5
- package/dist/{send-D2IXnEJl.js → send-DQ3s5E33.js} +7 -7
- package/dist/{server-DHQlbvr9.js → server-B-QKsL4x.js} +2 -2
- package/dist/{server-BT5F2Q5J.js → server-Bz-J2_5y.js} +2 -2
- package/dist/{server-cron-B2xgEgPD.js → server-cron-B5wrfwxM.js} +2 -2
- package/dist/{server-cron-CSHTxY52.js → server-cron-CyHe5fDq.js} +2 -2
- package/dist/{server-node-events-DE9bSSlP.js → server-node-events-0EBnfqMC.js} +3 -3
- package/dist/{server-node-events-BWteIuKj.js → server-node-events-Baqsf2NX.js} +3 -3
- package/dist/{session-Cz9lOeBe.js → session-CYgXtJQQ.js} +5 -5
- package/dist/{skill-commands-LW0SeGsB.js → skill-commands-HOHDwVYx.js} +24 -24
- package/dist/{status-Chve8nMF.js → status-B2XDD6O1.js} +4 -4
- package/dist/{status-C5Q3Dpz_.js → status-Bn_17wli.js} +1 -1
- package/dist/{status-VUMxenOh.js → status-CedgExBn.js} +4 -4
- package/dist/{status-Di79Ffwx.js → status-DkO_XJ89.js} +1 -1
- package/dist/{tables-CjmIs23-.js → tables-BQMYTcw_.js} +1 -1
- package/dist/{target-errors-C3MQ1_UT.js → target-errors-iZTI1Fwr.js} +2 -2
- package/dist/{tool-loop-detection-CSfX9pJE.js → tool-loop-detection-CqQip5ev.js} +2 -2
- package/dist/{tui-BKEzJV51.js → tui-CM1AENKh.js} +1 -1
- package/dist/{tui-DRyWzqYP.js → tui-DNfrxf46.js} +1 -1
- package/dist/{tui-cli-BSDU_mov.js → tui-cli-CCBB8SMS.js} +3 -3
- package/dist/{tui-cli-TYJG1L7w.js → tui-cli-DIW91DD7.js} +3 -3
- package/dist/{update-cli-1PEl-Fyn.js → update-cli-BjzhdsTf.js} +9 -9
- package/dist/{update-cli-C03GytAg.js → update-cli-BmVv97nm.js} +10 -10
- package/dist/{update-runner-CnItFRwI.js → update-runner-Bqlzlgnj.js} +1 -1
- package/dist/{update-runner-DtjYE_ge.js → update-runner-CweCoZFE.js} +1 -1
- package/dist/{web-DSormx61.js → web-BpZesxOB.js} +2 -2
- package/dist/{web-BgaF3FE-.js → web-By4q48rt.js} +3 -3
- package/dist/{web-Dn2r7XXj.js → web-Cx5CZwIi.js} +3 -3
- package/dist/{web-CAKCDdZw.js → web-D2vp8fmO.js} +35 -35
- package/dist/{web-CCTKMh_4.js → web-D9Laamj2.js} +1 -1
- package/dist/{web-search-providers.runtime-CiHKVMIP.js → web-search-providers.runtime-C_62DK_P.js} +1 -1
- package/dist/{web-search-providers.runtime-DHTq36lb.js → web-search-providers.runtime-CuW6jS_G.js} +1 -1
- package/dist/{whatsapp-actions-oa93ddRw.js → whatsapp-actions-CrVrn3wF.js} +12 -12
- package/extensions/acpx/package.json +1 -1
- 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/fased-federation/package.json +1 -1
- package/extensions/feishu/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/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +6 -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 +6 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +6 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/sat-mining/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +6 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +6 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +6 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +6 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +3 -2
- package/src/brand.ts +1 -1
- package/src/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/pi-model-discovery-runtime-C34IWfDn.js +0 -5
- package/dist/plugin-sdk/web-p3U1neKt.js +0 -40
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { a as saveJsonFile, c as resolveDefaultConfigCandidates, d as resolveOAuthPath, f as resolveStateDir, h as resolveRequiredHomeDir, i as loadJsonFile, m as resolveEffectiveHomeDir, p as expandHomePrefix, r as resolveCopilotApiToken, s as resolveConfigPath, t as DEFAULT_COPILOT_API_BASE_URL, u as resolveOAuthDir } from "./github-copilot-token-
|
|
2
|
+
import { a as saveJsonFile, c as resolveDefaultConfigCandidates, d as resolveOAuthPath, f as resolveStateDir, h as resolveRequiredHomeDir, i as loadJsonFile, m as resolveEffectiveHomeDir, p as expandHomePrefix, r as resolveCopilotApiToken, s as resolveConfigPath, t as DEFAULT_COPILOT_API_BASE_URL, u as resolveOAuthDir } from "./github-copilot-token-eyrRGmGp.js";
|
|
3
3
|
import { n as resolveConversationLabel, r as normalizeChatType } from "./conversation-label-BNq0hhpR.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import os from "node:os";
|
|
7
7
|
import path from "node:path";
|
|
8
|
-
import
|
|
8
|
+
import syncFs, { constants } from "node:fs";
|
|
9
9
|
import chalk, { Chalk } from "chalk";
|
|
10
10
|
import { Logger } from "tslog";
|
|
11
11
|
import JSON5 from "json5";
|
|
@@ -161,15 +161,15 @@ function normalizePluginGatewayMethodScope(method, scope) {
|
|
|
161
161
|
//#endregion
|
|
162
162
|
//#region src/infra/tmp-fased-dir.ts
|
|
163
163
|
const POSIX_FASED_TMP_DIR = "/tmp/fased";
|
|
164
|
-
const TMP_DIR_ACCESS_MODE =
|
|
164
|
+
const TMP_DIR_ACCESS_MODE = syncFs.constants.W_OK | syncFs.constants.X_OK;
|
|
165
165
|
function isNodeErrorWithCode(err, code) {
|
|
166
166
|
return typeof err === "object" && err !== null && "code" in err && err.code === code;
|
|
167
167
|
}
|
|
168
168
|
function resolvePreferredFasedAgentTmpDir(options = {}) {
|
|
169
|
-
const accessSync = options.accessSync ??
|
|
170
|
-
const chmodSync = options.chmodSync ??
|
|
171
|
-
const lstatSync = options.lstatSync ??
|
|
172
|
-
const mkdirSync = options.mkdirSync ??
|
|
169
|
+
const accessSync = options.accessSync ?? syncFs.accessSync;
|
|
170
|
+
const chmodSync = options.chmodSync ?? syncFs.chmodSync;
|
|
171
|
+
const lstatSync = options.lstatSync ?? syncFs.lstatSync;
|
|
172
|
+
const mkdirSync = options.mkdirSync ?? syncFs.mkdirSync;
|
|
173
173
|
const warn = options.warn ?? ((message) => console.warn(message));
|
|
174
174
|
const getuid = options.getuid ?? (() => {
|
|
175
175
|
try {
|
|
@@ -262,8 +262,8 @@ function resolvePreferredFasedAgentTmpDir(options = {}) {
|
|
|
262
262
|
function readLoggingConfig() {
|
|
263
263
|
const configPath = resolveConfigPath();
|
|
264
264
|
try {
|
|
265
|
-
if (!
|
|
266
|
-
const raw =
|
|
265
|
+
if (!syncFs.existsSync(configPath)) return;
|
|
266
|
+
const raw = syncFs.readFileSync(configPath, "utf-8");
|
|
267
267
|
const logging = JSON5.parse(raw)?.logging;
|
|
268
268
|
if (!logging || typeof logging !== "object" || Array.isArray(logging)) return;
|
|
269
269
|
return logging;
|
|
@@ -398,7 +398,7 @@ function isFileLogLevelEnabled(level) {
|
|
|
398
398
|
return levelToMinLevel(level) <= levelToMinLevel(settings.level);
|
|
399
399
|
}
|
|
400
400
|
function buildLogger(settings) {
|
|
401
|
-
|
|
401
|
+
syncFs.mkdirSync(path.dirname(settings.file), { recursive: true });
|
|
402
402
|
if (isRollingPath(settings.file)) pruneOldRollingLogs(path.dirname(settings.file));
|
|
403
403
|
let currentFileBytes = getCurrentLogFileBytes(settings.file);
|
|
404
404
|
let warnedAboutSizeCap = false;
|
|
@@ -442,14 +442,14 @@ function resolveMaxLogFileBytes(raw) {
|
|
|
442
442
|
}
|
|
443
443
|
function getCurrentLogFileBytes(file) {
|
|
444
444
|
try {
|
|
445
|
-
return
|
|
445
|
+
return syncFs.statSync(file).size;
|
|
446
446
|
} catch {
|
|
447
447
|
return 0;
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
function appendLogLine(file, line) {
|
|
451
451
|
try {
|
|
452
|
-
|
|
452
|
+
syncFs.appendFileSync(file, line, { encoding: "utf8" });
|
|
453
453
|
return true;
|
|
454
454
|
} catch {
|
|
455
455
|
return false;
|
|
@@ -501,14 +501,14 @@ function isRollingPath(file) {
|
|
|
501
501
|
}
|
|
502
502
|
function pruneOldRollingLogs(dir) {
|
|
503
503
|
try {
|
|
504
|
-
const entries =
|
|
504
|
+
const entries = syncFs.readdirSync(dir, { withFileTypes: true });
|
|
505
505
|
const cutoff = Date.now() - MAX_LOG_AGE_MS;
|
|
506
506
|
for (const entry of entries) {
|
|
507
507
|
if (!entry.isFile()) continue;
|
|
508
508
|
if (!entry.name.startsWith(`${LOG_PREFIX}-`) || !entry.name.endsWith(LOG_SUFFIX)) continue;
|
|
509
509
|
const fullPath = path.join(dir, entry.name);
|
|
510
510
|
try {
|
|
511
|
-
if (
|
|
511
|
+
if (syncFs.statSync(fullPath).mtimeMs < cutoff) syncFs.rmSync(fullPath, { force: true });
|
|
512
512
|
} catch {}
|
|
513
513
|
}
|
|
514
514
|
} catch {}
|
|
@@ -600,14 +600,14 @@ function isPlainObject$2(value) {
|
|
|
600
600
|
//#endregion
|
|
601
601
|
//#region src/utils.ts
|
|
602
602
|
async function ensureDir(dir) {
|
|
603
|
-
await
|
|
603
|
+
await syncFs.promises.mkdir(dir, { recursive: true });
|
|
604
604
|
}
|
|
605
605
|
/**
|
|
606
606
|
* Check if a file or directory exists at the given path.
|
|
607
607
|
*/
|
|
608
608
|
async function pathExists$1(targetPath) {
|
|
609
609
|
try {
|
|
610
|
-
await
|
|
610
|
+
await syncFs.promises.access(targetPath);
|
|
611
611
|
return true;
|
|
612
612
|
} catch {
|
|
613
613
|
return false;
|
|
@@ -690,7 +690,7 @@ function readLidReverseMapping(lid, opts) {
|
|
|
690
690
|
for (const dir of mappingDirs) {
|
|
691
691
|
const mappingPath = path.join(dir, mappingFilename);
|
|
692
692
|
try {
|
|
693
|
-
const data =
|
|
693
|
+
const data = syncFs.readFileSync(mappingPath, "utf8");
|
|
694
694
|
const phone = JSON.parse(data);
|
|
695
695
|
if (phone === null || phone === void 0) continue;
|
|
696
696
|
return normalizeE164(String(phone));
|
|
@@ -775,7 +775,7 @@ function resolveConfigDir(env = process.env, homedir = os.homedir) {
|
|
|
775
775
|
if (override) return resolveUserPath(override);
|
|
776
776
|
const newDir = path.join(resolveRequiredHomeDir(env, homedir), ".fased");
|
|
777
777
|
try {
|
|
778
|
-
if (
|
|
778
|
+
if (syncFs.existsSync(newDir)) return newDir;
|
|
779
779
|
} catch {}
|
|
780
780
|
return newDir;
|
|
781
781
|
}
|
|
@@ -2962,7 +2962,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
2962
2962
|
const accountCfg = resolveAccountCfg(accountId !== DEFAULT_ACCOUNT_ID ? accountId : DEFAULT_ACCOUNT_ID);
|
|
2963
2963
|
const accountTokenFile = accountCfg?.tokenFile?.trim();
|
|
2964
2964
|
if (accountTokenFile) {
|
|
2965
|
-
if (!
|
|
2965
|
+
if (!syncFs.existsSync(accountTokenFile)) {
|
|
2966
2966
|
opts.logMissingFile?.(`channels.telegram.accounts.${accountId}.tokenFile not found: ${accountTokenFile}`);
|
|
2967
2967
|
return {
|
|
2968
2968
|
token: "",
|
|
@@ -2970,7 +2970,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
2970
2970
|
};
|
|
2971
2971
|
}
|
|
2972
2972
|
try {
|
|
2973
|
-
const token =
|
|
2973
|
+
const token = syncFs.readFileSync(accountTokenFile, "utf-8").trim();
|
|
2974
2974
|
if (token) return {
|
|
2975
2975
|
token,
|
|
2976
2976
|
source: "tokenFile"
|
|
@@ -2995,7 +2995,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
2995
2995
|
const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
|
|
2996
2996
|
const tokenFile = telegramCfg?.tokenFile?.trim();
|
|
2997
2997
|
if (tokenFile && allowEnv) {
|
|
2998
|
-
if (!
|
|
2998
|
+
if (!syncFs.existsSync(tokenFile)) {
|
|
2999
2999
|
opts.logMissingFile?.(`channels.telegram.tokenFile not found: ${tokenFile}`);
|
|
3000
3000
|
return {
|
|
3001
3001
|
token: "",
|
|
@@ -3003,7 +3003,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
3003
3003
|
};
|
|
3004
3004
|
}
|
|
3005
3005
|
try {
|
|
3006
|
-
const token =
|
|
3006
|
+
const token = syncFs.readFileSync(tokenFile, "utf-8").trim();
|
|
3007
3007
|
if (token) return {
|
|
3008
3008
|
token,
|
|
3009
3009
|
source: "tokenFile"
|
|
@@ -3177,7 +3177,7 @@ function resolveHintCliInvocation(argv = process.argv) {
|
|
|
3177
3177
|
if (!argv1) return fallback;
|
|
3178
3178
|
if (path.basename(argv1).trim() !== "run-node.mjs") return fallback;
|
|
3179
3179
|
const localRunner = path.resolve(process.cwd(), "scripts", "run-node.mjs");
|
|
3180
|
-
if (!
|
|
3180
|
+
if (!syncFs.existsSync(localRunner)) return fallback;
|
|
3181
3181
|
return "node scripts/run-node.mjs";
|
|
3182
3182
|
}
|
|
3183
3183
|
function formatCliCommand(command, env = process.env) {
|
|
@@ -3389,7 +3389,7 @@ function readAuthStoreLidReverseMapping(lid, opts) {
|
|
|
3389
3389
|
for (const dir of dirs) {
|
|
3390
3390
|
const mappingPath = path.join(dir, mappingFilename);
|
|
3391
3391
|
try {
|
|
3392
|
-
const data =
|
|
3392
|
+
const data = syncFs.readFileSync(mappingPath, "utf8");
|
|
3393
3393
|
const phone = JSON.parse(data);
|
|
3394
3394
|
if (phone !== null && phone !== void 0) return normalizeAuthStoreE164(String(phone));
|
|
3395
3395
|
} catch {}
|
|
@@ -3415,7 +3415,7 @@ function resolveWebCredsBackupPath(authDir) {
|
|
|
3415
3415
|
}
|
|
3416
3416
|
function hasWebCredsSync(authDir) {
|
|
3417
3417
|
try {
|
|
3418
|
-
const stats =
|
|
3418
|
+
const stats = syncFs.statSync(resolveWebCredsPath(authDir));
|
|
3419
3419
|
return stats.isFile() && stats.size > 1;
|
|
3420
3420
|
} catch {
|
|
3421
3421
|
return false;
|
|
@@ -3423,10 +3423,10 @@ function hasWebCredsSync(authDir) {
|
|
|
3423
3423
|
}
|
|
3424
3424
|
function readCredsJsonRaw(filePath) {
|
|
3425
3425
|
try {
|
|
3426
|
-
if (!
|
|
3427
|
-
const stats =
|
|
3426
|
+
if (!syncFs.existsSync(filePath)) return null;
|
|
3427
|
+
const stats = syncFs.statSync(filePath);
|
|
3428
3428
|
if (!stats.isFile() || stats.size <= 1) return null;
|
|
3429
|
-
return
|
|
3429
|
+
return syncFs.readFileSync(filePath, "utf-8");
|
|
3430
3430
|
} catch {
|
|
3431
3431
|
return null;
|
|
3432
3432
|
}
|
|
@@ -3444,9 +3444,9 @@ function maybeRestoreCredsFromBackup(authDir) {
|
|
|
3444
3444
|
const backupRaw = readCredsJsonRaw(backupPath);
|
|
3445
3445
|
if (!backupRaw) return;
|
|
3446
3446
|
JSON.parse(backupRaw);
|
|
3447
|
-
|
|
3447
|
+
syncFs.copyFileSync(backupPath, credsPath);
|
|
3448
3448
|
try {
|
|
3449
|
-
|
|
3449
|
+
syncFs.chmodSync(credsPath, 384);
|
|
3450
3450
|
} catch {}
|
|
3451
3451
|
logger.warn({ credsPath }, "restored corrupted WhatsApp creds.json from backup");
|
|
3452
3452
|
} catch {}
|
|
@@ -3502,11 +3502,11 @@ async function logoutWeb(params) {
|
|
|
3502
3502
|
function readWebSelfId(authDir = resolveDefaultWebAuthDir()) {
|
|
3503
3503
|
try {
|
|
3504
3504
|
const credsPath = resolveWebCredsPath(resolveAuthStoreUserPath(authDir));
|
|
3505
|
-
if (!
|
|
3505
|
+
if (!syncFs.existsSync(credsPath)) return {
|
|
3506
3506
|
e164: null,
|
|
3507
3507
|
jid: null
|
|
3508
3508
|
};
|
|
3509
|
-
const raw =
|
|
3509
|
+
const raw = syncFs.readFileSync(credsPath, "utf-8");
|
|
3510
3510
|
const jid = JSON.parse(raw)?.me?.id ?? null;
|
|
3511
3511
|
return {
|
|
3512
3512
|
e164: jid ? jidToE164ForAuthStore(jid, { authDir }) : null,
|
|
@@ -3525,7 +3525,7 @@ function readWebSelfId(authDir = resolveDefaultWebAuthDir()) {
|
|
|
3525
3525
|
*/
|
|
3526
3526
|
function getWebAuthAgeMs(authDir = resolveDefaultWebAuthDir()) {
|
|
3527
3527
|
try {
|
|
3528
|
-
const stats =
|
|
3528
|
+
const stats = syncFs.statSync(resolveWebCredsPath(resolveAuthStoreUserPath(authDir)));
|
|
3529
3529
|
return Date.now() - stats.mtimeMs;
|
|
3530
3530
|
} catch {
|
|
3531
3531
|
return null;
|
|
@@ -3557,7 +3557,7 @@ function listWhatsAppAuthDirs(cfg) {
|
|
|
3557
3557
|
accountId
|
|
3558
3558
|
}).authDir);
|
|
3559
3559
|
try {
|
|
3560
|
-
const entries =
|
|
3560
|
+
const entries = syncFs.readdirSync(whatsappDir, { withFileTypes: true });
|
|
3561
3561
|
for (const entry of entries) {
|
|
3562
3562
|
if (!entry.isDirectory()) continue;
|
|
3563
3563
|
authDirs.add(path.join(whatsappDir, entry.name));
|
|
@@ -3579,7 +3579,7 @@ function resolveLegacyAuthDir() {
|
|
|
3579
3579
|
}
|
|
3580
3580
|
function legacyAuthExists(authDir) {
|
|
3581
3581
|
try {
|
|
3582
|
-
return
|
|
3582
|
+
return syncFs.existsSync(path.join(authDir, "creds.json"));
|
|
3583
3583
|
} catch {
|
|
3584
3584
|
return false;
|
|
3585
3585
|
}
|
|
@@ -4951,7 +4951,7 @@ function shouldBlockWorkspaceDotEnvKey(key) {
|
|
|
4951
4951
|
function readDotEnvFile(params) {
|
|
4952
4952
|
let content;
|
|
4953
4953
|
try {
|
|
4954
|
-
content =
|
|
4954
|
+
content = syncFs.readFileSync(params.filePath, "utf8");
|
|
4955
4955
|
} catch (error) {
|
|
4956
4956
|
if (!params.quiet) {
|
|
4957
4957
|
if ((error && typeof error === "object" && "code" in error ? String(error.code) : void 0) !== "ENOENT") console.warn(`[dotenv] Failed to read ${params.filePath}: ${String(error)}`);
|
|
@@ -5069,7 +5069,7 @@ function resolveTimeoutMs(timeoutMs) {
|
|
|
5069
5069
|
function readEtcShells() {
|
|
5070
5070
|
if (cachedEtcShells !== void 0) return cachedEtcShells;
|
|
5071
5071
|
try {
|
|
5072
|
-
const entries =
|
|
5072
|
+
const entries = syncFs.readFileSync("/etc/shells", "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#") && path.isAbsolute(line));
|
|
5073
5073
|
cachedEtcShells = new Set(entries);
|
|
5074
5074
|
} catch {
|
|
5075
5075
|
cachedEtcShells = null;
|
|
@@ -5945,7 +5945,7 @@ function resolveBoundaryPathLexicalSync(params) {
|
|
|
5945
5945
|
lexicalCursor = path.join(lexicalCursor, segment);
|
|
5946
5946
|
let stat;
|
|
5947
5947
|
try {
|
|
5948
|
-
stat =
|
|
5948
|
+
stat = syncFs.lstatSync(lexicalCursor);
|
|
5949
5949
|
} catch (error) {
|
|
5950
5950
|
if (isNotFoundPathError(error)) {
|
|
5951
5951
|
const missingSuffix = segments.slice(idx);
|
|
@@ -6051,15 +6051,15 @@ function resolvePathViaExistingAncestorSync(targetPath) {
|
|
|
6051
6051
|
const normalized = path.resolve(targetPath);
|
|
6052
6052
|
let cursor = normalized;
|
|
6053
6053
|
const missingSuffix = [];
|
|
6054
|
-
while (!isFilesystemRoot(cursor) && !
|
|
6054
|
+
while (!isFilesystemRoot(cursor) && !syncFs.existsSync(cursor)) {
|
|
6055
6055
|
missingSuffix.unshift(path.basename(cursor));
|
|
6056
6056
|
const parent = path.dirname(cursor);
|
|
6057
6057
|
if (parent === cursor) break;
|
|
6058
6058
|
cursor = parent;
|
|
6059
6059
|
}
|
|
6060
|
-
if (!
|
|
6060
|
+
if (!syncFs.existsSync(cursor)) return normalized;
|
|
6061
6061
|
try {
|
|
6062
|
-
const resolvedAncestor = path.resolve(
|
|
6062
|
+
const resolvedAncestor = path.resolve(syncFs.realpathSync(cursor));
|
|
6063
6063
|
if (missingSuffix.length === 0) return resolvedAncestor;
|
|
6064
6064
|
return path.resolve(resolvedAncestor, ...missingSuffix);
|
|
6065
6065
|
} catch {
|
|
@@ -6084,7 +6084,7 @@ function getPathKindSync(absolutePath, preserveFinalSymlink) {
|
|
|
6084
6084
|
try {
|
|
6085
6085
|
return {
|
|
6086
6086
|
exists: true,
|
|
6087
|
-
kind: toResolvedKind(preserveFinalSymlink ?
|
|
6087
|
+
kind: toResolvedKind(preserveFinalSymlink ? syncFs.lstatSync(absolutePath) : syncFs.statSync(absolutePath))
|
|
6088
6088
|
};
|
|
6089
6089
|
} catch (error) {
|
|
6090
6090
|
if (isNotFoundPathError(error)) return {
|
|
@@ -6144,10 +6144,10 @@ async function resolveSymlinkHopPath(symlinkPath) {
|
|
|
6144
6144
|
}
|
|
6145
6145
|
function resolveSymlinkHopPathSync(symlinkPath) {
|
|
6146
6146
|
try {
|
|
6147
|
-
return path.resolve(
|
|
6147
|
+
return path.resolve(syncFs.realpathSync(symlinkPath));
|
|
6148
6148
|
} catch (error) {
|
|
6149
6149
|
if (!isNotFoundPathError(error)) throw error;
|
|
6150
|
-
const linkTarget =
|
|
6150
|
+
const linkTarget = syncFs.readlinkSync(symlinkPath);
|
|
6151
6151
|
return resolvePathViaExistingAncestorSync(path.resolve(path.dirname(symlinkPath), linkTarget));
|
|
6152
6152
|
}
|
|
6153
6153
|
}
|
|
@@ -6173,7 +6173,7 @@ function sameFileIdentity(left, right) {
|
|
|
6173
6173
|
return sameFileIdentity$1(left, right);
|
|
6174
6174
|
}
|
|
6175
6175
|
function openVerifiedFileSync(params) {
|
|
6176
|
-
const ioFs = params.ioFs ??
|
|
6176
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
6177
6177
|
const openReadFlags = ioFs.constants.O_RDONLY | (typeof ioFs.constants.O_NOFOLLOW === "number" ? ioFs.constants.O_NOFOLLOW : 0);
|
|
6178
6178
|
let fd = null;
|
|
6179
6179
|
try {
|
|
@@ -6245,7 +6245,7 @@ function canUseBoundaryFileOpen(ioFs) {
|
|
|
6245
6245
|
return typeof ioFs.openSync === "function" && typeof ioFs.closeSync === "function" && typeof ioFs.fstatSync === "function" && typeof ioFs.lstatSync === "function" && typeof ioFs.realpathSync === "function" && typeof ioFs.readFileSync === "function" && typeof ioFs.constants === "object" && ioFs.constants !== null;
|
|
6246
6246
|
}
|
|
6247
6247
|
function openBoundaryFileSync(params) {
|
|
6248
|
-
const ioFs = params.ioFs ??
|
|
6248
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
6249
6249
|
const absolutePath = path.resolve(params.absolutePath);
|
|
6250
6250
|
let resolvedPath;
|
|
6251
6251
|
let rootRealPath;
|
|
@@ -6444,7 +6444,7 @@ function normalizeChannelConfigs(value) {
|
|
|
6444
6444
|
function resolvePluginManifestPath(rootDir) {
|
|
6445
6445
|
for (const filename of PLUGIN_MANIFEST_FILENAMES) {
|
|
6446
6446
|
const candidate = path.join(rootDir, filename);
|
|
6447
|
-
if (
|
|
6447
|
+
if (syncFs.existsSync(candidate)) return candidate;
|
|
6448
6448
|
}
|
|
6449
6449
|
return path.join(rootDir, PLUGIN_MANIFEST_FILENAME);
|
|
6450
6450
|
}
|
|
@@ -6469,7 +6469,7 @@ function loadPluginManifest(rootDir) {
|
|
|
6469
6469
|
}
|
|
6470
6470
|
let raw;
|
|
6471
6471
|
try {
|
|
6472
|
-
raw = JSON5.parse(
|
|
6472
|
+
raw = JSON5.parse(syncFs.readFileSync(opened.fd, "utf-8"));
|
|
6473
6473
|
} catch (err) {
|
|
6474
6474
|
return {
|
|
6475
6475
|
ok: false,
|
|
@@ -6477,7 +6477,7 @@ function loadPluginManifest(rootDir) {
|
|
|
6477
6477
|
manifestPath
|
|
6478
6478
|
};
|
|
6479
6479
|
} finally {
|
|
6480
|
-
|
|
6480
|
+
syncFs.closeSync(opened.fd);
|
|
6481
6481
|
}
|
|
6482
6482
|
if (!isRecord$4(raw)) return {
|
|
6483
6483
|
ok: false,
|
|
@@ -10670,7 +10670,7 @@ async function readPackageName(dir) {
|
|
|
10670
10670
|
}
|
|
10671
10671
|
function readPackageNameSync(dir) {
|
|
10672
10672
|
try {
|
|
10673
|
-
const raw =
|
|
10673
|
+
const raw = syncFs.readFileSync(path.join(dir, "package.json"), "utf-8");
|
|
10674
10674
|
const parsed = JSON.parse(raw);
|
|
10675
10675
|
return typeof parsed.name === "string" ? parsed.name : null;
|
|
10676
10676
|
} catch {
|
|
@@ -10704,7 +10704,7 @@ function candidateDirsFromArgv1(argv1) {
|
|
|
10704
10704
|
const normalized = path.resolve(argv1);
|
|
10705
10705
|
const candidates = [path.dirname(normalized)];
|
|
10706
10706
|
try {
|
|
10707
|
-
const resolved =
|
|
10707
|
+
const resolved = syncFs.realpathSync(normalized);
|
|
10708
10708
|
if (resolved !== normalized) candidates.push(path.dirname(resolved));
|
|
10709
10709
|
} catch {}
|
|
10710
10710
|
const parts = normalized.split(path.sep);
|
|
@@ -10742,11 +10742,11 @@ function buildCandidates(opts) {
|
|
|
10742
10742
|
//#region src/plugins/bundled-dir.ts
|
|
10743
10743
|
function looksLikeBundledPluginsDir(dir) {
|
|
10744
10744
|
try {
|
|
10745
|
-
const entries =
|
|
10745
|
+
const entries = syncFs.readdirSync(dir, { withFileTypes: true });
|
|
10746
10746
|
for (const entry of entries) {
|
|
10747
10747
|
if (!entry.isDirectory()) continue;
|
|
10748
10748
|
const pluginRoot = path.join(dir, entry.name);
|
|
10749
|
-
if (
|
|
10749
|
+
if (syncFs.existsSync(path.join(pluginRoot, "fased.plugin.json"))) return true;
|
|
10750
10750
|
}
|
|
10751
10751
|
} catch {
|
|
10752
10752
|
return false;
|
|
@@ -10792,7 +10792,7 @@ function safeRealpathSync$1(targetPath, cache) {
|
|
|
10792
10792
|
const cached = cache?.get(targetPath);
|
|
10793
10793
|
if (cached) return cached;
|
|
10794
10794
|
try {
|
|
10795
|
-
const resolved =
|
|
10795
|
+
const resolved = syncFs.realpathSync(targetPath);
|
|
10796
10796
|
cache?.set(targetPath, resolved);
|
|
10797
10797
|
return resolved;
|
|
10798
10798
|
} catch {
|
|
@@ -10801,7 +10801,7 @@ function safeRealpathSync$1(targetPath, cache) {
|
|
|
10801
10801
|
}
|
|
10802
10802
|
function safeStatSync(targetPath) {
|
|
10803
10803
|
try {
|
|
10804
|
-
return
|
|
10804
|
+
return syncFs.statSync(targetPath);
|
|
10805
10805
|
} catch {
|
|
10806
10806
|
return null;
|
|
10807
10807
|
}
|
|
@@ -10929,12 +10929,12 @@ function readPackageManifest(dir) {
|
|
|
10929
10929
|
});
|
|
10930
10930
|
if (!opened.ok) return null;
|
|
10931
10931
|
try {
|
|
10932
|
-
const raw =
|
|
10932
|
+
const raw = syncFs.readFileSync(opened.fd, "utf-8");
|
|
10933
10933
|
return JSON.parse(raw);
|
|
10934
10934
|
} catch {
|
|
10935
10935
|
return null;
|
|
10936
10936
|
} finally {
|
|
10937
|
-
|
|
10937
|
+
syncFs.closeSync(opened.fd);
|
|
10938
10938
|
}
|
|
10939
10939
|
}
|
|
10940
10940
|
function normalizePackageEntry(entry) {
|
|
@@ -10960,7 +10960,7 @@ function inferLegacyPluginManifestExtensions(manifest, packageDir) {
|
|
|
10960
10960
|
seen.add(normalized);
|
|
10961
10961
|
const resolved = path.resolve(packageDir, normalized);
|
|
10962
10962
|
if (!isPathInside(packageDir, resolved)) continue;
|
|
10963
|
-
if (
|
|
10963
|
+
if (syncFs.existsSync(resolved) && isExtensionFile(resolved)) entries.push(normalized);
|
|
10964
10964
|
}
|
|
10965
10965
|
return entries;
|
|
10966
10966
|
}
|
|
@@ -11018,14 +11018,14 @@ function resolvePackageEntrySource(params) {
|
|
|
11018
11018
|
return null;
|
|
11019
11019
|
}
|
|
11020
11020
|
const safeSource = opened.path;
|
|
11021
|
-
|
|
11021
|
+
syncFs.closeSync(opened.fd);
|
|
11022
11022
|
return safeSource;
|
|
11023
11023
|
}
|
|
11024
11024
|
function discoverInDirectory(params) {
|
|
11025
|
-
if (!
|
|
11025
|
+
if (!syncFs.existsSync(params.dir)) return;
|
|
11026
11026
|
let entries = [];
|
|
11027
11027
|
try {
|
|
11028
|
-
entries =
|
|
11028
|
+
entries = syncFs.readdirSync(params.dir, { withFileTypes: true });
|
|
11029
11029
|
} catch (err) {
|
|
11030
11030
|
params.diagnostics.push({
|
|
11031
11031
|
level: "warn",
|
|
@@ -11088,7 +11088,7 @@ function discoverInDirectory(params) {
|
|
|
11088
11088
|
"index.js",
|
|
11089
11089
|
"index.mjs",
|
|
11090
11090
|
"index.cjs"
|
|
11091
|
-
].map((candidate) => path.join(fullPath, candidate)).find((candidate) =>
|
|
11091
|
+
].map((candidate) => path.join(fullPath, candidate)).find((candidate) => syncFs.existsSync(candidate));
|
|
11092
11092
|
if (indexFile && isExtensionFile(indexFile)) addCandidate({
|
|
11093
11093
|
candidates: params.candidates,
|
|
11094
11094
|
diagnostics: params.diagnostics,
|
|
@@ -11106,7 +11106,7 @@ function discoverInDirectory(params) {
|
|
|
11106
11106
|
}
|
|
11107
11107
|
function discoverFromPath(params) {
|
|
11108
11108
|
const resolved = resolveUserPath(params.rawPath);
|
|
11109
|
-
if (!
|
|
11109
|
+
if (!syncFs.existsSync(resolved)) {
|
|
11110
11110
|
params.diagnostics.push({
|
|
11111
11111
|
level: "error",
|
|
11112
11112
|
message: `plugin path not found: ${resolved}`,
|
|
@@ -11114,7 +11114,7 @@ function discoverFromPath(params) {
|
|
|
11114
11114
|
});
|
|
11115
11115
|
return;
|
|
11116
11116
|
}
|
|
11117
|
-
const stat =
|
|
11117
|
+
const stat = syncFs.statSync(resolved);
|
|
11118
11118
|
if (stat.isFile()) {
|
|
11119
11119
|
if (!isExtensionFile(resolved)) {
|
|
11120
11120
|
params.diagnostics.push({
|
|
@@ -11174,7 +11174,7 @@ function discoverFromPath(params) {
|
|
|
11174
11174
|
"index.js",
|
|
11175
11175
|
"index.mjs",
|
|
11176
11176
|
"index.cjs"
|
|
11177
|
-
].map((candidate) => path.join(resolved, candidate)).find((candidate) =>
|
|
11177
|
+
].map((candidate) => path.join(resolved, candidate)).find((candidate) => syncFs.existsSync(candidate));
|
|
11178
11178
|
if (indexFile && isExtensionFile(indexFile)) {
|
|
11179
11179
|
addCandidate({
|
|
11180
11180
|
candidates: params.candidates,
|
|
@@ -11359,7 +11359,7 @@ function buildCacheKey(params) {
|
|
|
11359
11359
|
}
|
|
11360
11360
|
function safeStatMtimeMs(filePath) {
|
|
11361
11361
|
try {
|
|
11362
|
-
return
|
|
11362
|
+
return syncFs.statSync(filePath).mtimeMs;
|
|
11363
11363
|
} catch {
|
|
11364
11364
|
return null;
|
|
11365
11365
|
}
|
|
@@ -11629,7 +11629,7 @@ function resolveProviderIdForAuth(provider, params) {
|
|
|
11629
11629
|
function isZombieProcess(pid) {
|
|
11630
11630
|
if (process.platform !== "linux") return false;
|
|
11631
11631
|
try {
|
|
11632
|
-
return
|
|
11632
|
+
return syncFs.readFileSync(`/proc/${pid}/status`, "utf8").match(/^State:\s+(\S)/m)?.[1] === "Z";
|
|
11633
11633
|
} catch {
|
|
11634
11634
|
return false;
|
|
11635
11635
|
}
|
|
@@ -11869,7 +11869,7 @@ function resolveAuthStorePathForDisplay(agentDir) {
|
|
|
11869
11869
|
return pathname.startsWith("~") ? pathname : resolveUserPath(pathname);
|
|
11870
11870
|
}
|
|
11871
11871
|
function ensureAuthStoreFile(pathname) {
|
|
11872
|
-
if (
|
|
11872
|
+
if (syncFs.existsSync(pathname)) return;
|
|
11873
11873
|
saveJsonFile(pathname, {
|
|
11874
11874
|
version: AUTH_STORE_VERSION,
|
|
11875
11875
|
profiles: {}
|
|
@@ -12131,7 +12131,7 @@ function loadAuthProfileStoreForAgent(agentDir, options) {
|
|
|
12131
12131
|
if (shouldWrite && legacy !== null) {
|
|
12132
12132
|
const legacyPath = resolveLegacyAuthStorePath(agentDir);
|
|
12133
12133
|
try {
|
|
12134
|
-
|
|
12134
|
+
syncFs.unlinkSync(legacyPath);
|
|
12135
12135
|
} catch (err) {
|
|
12136
12136
|
if (err?.code !== "ENOENT") log$10.warn("failed to delete legacy auth.json after migration", {
|
|
12137
12137
|
err,
|
|
@@ -18502,7 +18502,7 @@ function resolveActiveTalkProviderConfig(talk) {
|
|
|
18502
18502
|
};
|
|
18503
18503
|
}
|
|
18504
18504
|
function readTalkApiKeyFromProfile(deps = {}) {
|
|
18505
|
-
const fsImpl = deps.fs ??
|
|
18505
|
+
const fsImpl = deps.fs ?? syncFs;
|
|
18506
18506
|
const osImpl = deps.os ?? os;
|
|
18507
18507
|
const pathImpl = deps.path ?? path;
|
|
18508
18508
|
const home = osImpl.homedir();
|
|
@@ -19230,7 +19230,7 @@ var IncludeProcessor = class IncludeProcessor {
|
|
|
19230
19230
|
const normalized = path.normalize(resolved);
|
|
19231
19231
|
if (!isPathInside$1(this.rootDir, normalized)) throw new ConfigIncludeError(`Include path escapes config directory: ${includePath} (root: ${this.rootDir})`, includePath);
|
|
19232
19232
|
try {
|
|
19233
|
-
const real =
|
|
19233
|
+
const real = syncFs.realpathSync(normalized);
|
|
19234
19234
|
if (!isPathInside$1(this.rootRealDir, real)) throw new ConfigIncludeError(`Include path resolves outside config directory (symlink): ${includePath} (root: ${this.rootDir})`, includePath);
|
|
19235
19235
|
} catch (err) {
|
|
19236
19236
|
if (err instanceof ConfigIncludeError) throw err;
|
|
@@ -19272,13 +19272,13 @@ var IncludeProcessor = class IncludeProcessor {
|
|
|
19272
19272
|
};
|
|
19273
19273
|
function safeRealpath(target) {
|
|
19274
19274
|
try {
|
|
19275
|
-
return
|
|
19275
|
+
return syncFs.realpathSync(target);
|
|
19276
19276
|
} catch {
|
|
19277
19277
|
return target;
|
|
19278
19278
|
}
|
|
19279
19279
|
}
|
|
19280
19280
|
function readConfigIncludeFileWithGuards(params) {
|
|
19281
|
-
const ioFs = params.ioFs ??
|
|
19281
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
19282
19282
|
const maxBytes = params.maxBytes ?? MAX_INCLUDE_FILE_BYTES;
|
|
19283
19283
|
if (!canUseBoundaryFileOpen(ioFs)) return ioFs.readFileSync(params.resolvedPath, "utf-8");
|
|
19284
19284
|
const opened = openBoundaryFileSync({
|
|
@@ -19301,7 +19301,7 @@ function readConfigIncludeFileWithGuards(params) {
|
|
|
19301
19301
|
}
|
|
19302
19302
|
}
|
|
19303
19303
|
const defaultResolver = {
|
|
19304
|
-
readFile: (p) =>
|
|
19304
|
+
readFile: (p) => syncFs.readFileSync(p, "utf-8"),
|
|
19305
19305
|
readFileWithGuards: ({ includePath, resolvedPath, rootRealDir }) => readConfigIncludeFileWithGuards({
|
|
19306
19306
|
includePath,
|
|
19307
19307
|
resolvedPath,
|
|
@@ -21342,8 +21342,8 @@ const DEFAULT_SAFE_BINS = [
|
|
|
21342
21342
|
];
|
|
21343
21343
|
function isExecutableFile(filePath) {
|
|
21344
21344
|
try {
|
|
21345
|
-
if (!
|
|
21346
|
-
if (process.platform !== "win32")
|
|
21345
|
+
if (!syncFs.statSync(filePath).isFile()) return false;
|
|
21346
|
+
if (process.platform !== "win32") syncFs.accessSync(filePath, syncFs.constants.X_OK);
|
|
21347
21347
|
return true;
|
|
21348
21348
|
} catch {
|
|
21349
21349
|
return false;
|
|
@@ -21387,7 +21387,7 @@ function normalizeMatchTarget(value) {
|
|
|
21387
21387
|
}
|
|
21388
21388
|
function tryRealpath(value) {
|
|
21389
21389
|
try {
|
|
21390
|
-
return
|
|
21390
|
+
return syncFs.realpathSync(value);
|
|
21391
21391
|
} catch {
|
|
21392
21392
|
return null;
|
|
21393
21393
|
}
|
|
@@ -22268,7 +22268,7 @@ function listWritableExplicitTrustedSafeBinDirs(entries) {
|
|
|
22268
22268
|
for (const dir of resolved) {
|
|
22269
22269
|
let stat;
|
|
22270
22270
|
try {
|
|
22271
|
-
stat =
|
|
22271
|
+
stat = syncFs.statSync(dir);
|
|
22272
22272
|
} catch {
|
|
22273
22273
|
continue;
|
|
22274
22274
|
}
|
|
@@ -27572,7 +27572,7 @@ function resolveConfigPathForDeps(deps) {
|
|
|
27572
27572
|
}
|
|
27573
27573
|
function normalizeDeps(overrides = {}) {
|
|
27574
27574
|
return {
|
|
27575
|
-
fs: overrides.fs ??
|
|
27575
|
+
fs: overrides.fs ?? syncFs,
|
|
27576
27576
|
json5: overrides.json5 ?? JSON5,
|
|
27577
27577
|
env: overrides.env ?? process.env,
|
|
27578
27578
|
homedir: overrides.homedir ?? (() => resolveRequiredHomeDir(overrides.env ?? process.env, os.homedir)),
|
|
@@ -28290,7 +28290,7 @@ function resolveStructuralSessionFallbackPath(candidateAbsPath, expectedAgentId)
|
|
|
28290
28290
|
}
|
|
28291
28291
|
function safeRealpathSync(filePath) {
|
|
28292
28292
|
try {
|
|
28293
|
-
return
|
|
28293
|
+
return syncFs.realpathSync(filePath);
|
|
28294
28294
|
} catch {
|
|
28295
28295
|
return;
|
|
28296
28296
|
}
|
|
@@ -28628,7 +28628,7 @@ function releaseAllLocksSync() {
|
|
|
28628
28628
|
if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
|
|
28629
28629
|
} catch {}
|
|
28630
28630
|
try {
|
|
28631
|
-
|
|
28631
|
+
syncFs.rmSync(held.lockPath, { force: true });
|
|
28632
28632
|
} catch {}
|
|
28633
28633
|
HELD_LOCKS.delete(sessionFile);
|
|
28634
28634
|
}
|
|
@@ -29047,14 +29047,14 @@ function resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, a
|
|
|
29047
29047
|
function canonicalizePathForComparison$1(filePath) {
|
|
29048
29048
|
const resolved = path.resolve(filePath);
|
|
29049
29049
|
try {
|
|
29050
|
-
return
|
|
29050
|
+
return syncFs.realpathSync(resolved);
|
|
29051
29051
|
} catch {
|
|
29052
29052
|
return resolved;
|
|
29053
29053
|
}
|
|
29054
29054
|
}
|
|
29055
29055
|
function archiveFileOnDisk(filePath, reason) {
|
|
29056
29056
|
const archived = `${filePath}.${reason}.${formatSessionArchiveTimestamp()}`;
|
|
29057
|
-
|
|
29057
|
+
syncFs.renameSync(filePath, archived);
|
|
29058
29058
|
return archived;
|
|
29059
29059
|
}
|
|
29060
29060
|
/**
|
|
@@ -29070,7 +29070,7 @@ function archiveSessionTranscripts(opts) {
|
|
|
29070
29070
|
const relative = path.relative(storeDir, candidatePath);
|
|
29071
29071
|
if (!relative || relative.startsWith("..") || path.isAbsolute(relative)) continue;
|
|
29072
29072
|
}
|
|
29073
|
-
if (!
|
|
29073
|
+
if (!syncFs.existsSync(candidatePath)) continue;
|
|
29074
29074
|
try {
|
|
29075
29075
|
archived.push(archiveFileOnDisk(candidatePath, opts.reason));
|
|
29076
29076
|
} catch {}
|
|
@@ -29088,15 +29088,15 @@ async function cleanupArchivedSessionTranscripts(opts) {
|
|
|
29088
29088
|
let removed = 0;
|
|
29089
29089
|
let scanned = 0;
|
|
29090
29090
|
for (const dir of directories) {
|
|
29091
|
-
const entries = await
|
|
29091
|
+
const entries = await syncFs.promises.readdir(dir).catch(() => []);
|
|
29092
29092
|
for (const entry of entries) {
|
|
29093
29093
|
const timestamp = parseSessionArchiveTimestamp(entry, reason);
|
|
29094
29094
|
if (timestamp == null) continue;
|
|
29095
29095
|
scanned += 1;
|
|
29096
29096
|
if (now - timestamp <= opts.olderThanMs) continue;
|
|
29097
29097
|
const fullPath = path.join(dir, entry);
|
|
29098
|
-
if (!(await
|
|
29099
|
-
await
|
|
29098
|
+
if (!(await syncFs.promises.stat(fullPath).catch(() => null))?.isFile()) continue;
|
|
29099
|
+
await syncFs.promises.rm(fullPath).catch(() => void 0);
|
|
29100
29100
|
removed += 1;
|
|
29101
29101
|
}
|
|
29102
29102
|
}
|
|
@@ -29131,14 +29131,14 @@ function capArrayByJsonBytes(items, maxBytes) {
|
|
|
29131
29131
|
}
|
|
29132
29132
|
const MAX_LINES_TO_SCAN = 10;
|
|
29133
29133
|
function readSessionTitleFieldsFromTranscript(sessionId, storePath, sessionFile, agentId, opts) {
|
|
29134
|
-
const filePath = resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, agentId).find((p) =>
|
|
29134
|
+
const filePath = resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, agentId).find((p) => syncFs.existsSync(p));
|
|
29135
29135
|
if (!filePath) return {
|
|
29136
29136
|
firstUserMessage: null,
|
|
29137
29137
|
lastMessagePreview: null
|
|
29138
29138
|
};
|
|
29139
29139
|
let stat;
|
|
29140
29140
|
try {
|
|
29141
|
-
stat =
|
|
29141
|
+
stat = syncFs.statSync(filePath);
|
|
29142
29142
|
} catch {
|
|
29143
29143
|
return {
|
|
29144
29144
|
firstUserMessage: null,
|
|
@@ -29158,7 +29158,7 @@ function readSessionTitleFieldsFromTranscript(sessionId, storePath, sessionFile,
|
|
|
29158
29158
|
}
|
|
29159
29159
|
let fd = null;
|
|
29160
29160
|
try {
|
|
29161
|
-
fd =
|
|
29161
|
+
fd = syncFs.openSync(filePath, "r");
|
|
29162
29162
|
const size = stat.size;
|
|
29163
29163
|
let firstUserMessage = null;
|
|
29164
29164
|
try {
|
|
@@ -29185,7 +29185,7 @@ function readSessionTitleFieldsFromTranscript(sessionId, storePath, sessionFile,
|
|
|
29185
29185
|
};
|
|
29186
29186
|
} finally {
|
|
29187
29187
|
if (fd !== null) try {
|
|
29188
|
-
|
|
29188
|
+
syncFs.closeSync(fd);
|
|
29189
29189
|
} catch {}
|
|
29190
29190
|
}
|
|
29191
29191
|
}
|
|
@@ -29203,7 +29203,7 @@ function extractTextFromContent(content) {
|
|
|
29203
29203
|
}
|
|
29204
29204
|
function readTranscriptHeadChunk(fd, maxBytes = 8192) {
|
|
29205
29205
|
const buf = Buffer.alloc(maxBytes);
|
|
29206
|
-
const bytesRead =
|
|
29206
|
+
const bytesRead = syncFs.readSync(fd, buf, 0, buf.length, 0);
|
|
29207
29207
|
if (bytesRead <= 0) return null;
|
|
29208
29208
|
return buf.toString("utf-8", 0, bytesRead);
|
|
29209
29209
|
}
|
|
@@ -29227,7 +29227,7 @@ function readLastMessagePreviewFromOpenTranscript(params) {
|
|
|
29227
29227
|
const readStart = Math.max(0, params.size - LAST_MSG_MAX_BYTES);
|
|
29228
29228
|
const readLen = Math.min(params.size, LAST_MSG_MAX_BYTES);
|
|
29229
29229
|
const buf = Buffer.alloc(readLen);
|
|
29230
|
-
|
|
29230
|
+
syncFs.readSync(params.fd, buf, 0, readLen, readStart);
|
|
29231
29231
|
const tailLines = buf.toString("utf-8").split(/\r?\n/).filter((l) => l.trim()).slice(-LAST_MSG_MAX_LINES);
|
|
29232
29232
|
for (let i = tailLines.length - 1; i >= 0; i--) {
|
|
29233
29233
|
const line = tailLines[i];
|
|
@@ -29343,7 +29343,7 @@ function isCacheEnabled(ttlMs) {
|
|
|
29343
29343
|
}
|
|
29344
29344
|
function getFileMtimeMs(filePath) {
|
|
29345
29345
|
try {
|
|
29346
|
-
return
|
|
29346
|
+
return syncFs.statSync(filePath).mtimeMs;
|
|
29347
29347
|
} catch {
|
|
29348
29348
|
return;
|
|
29349
29349
|
}
|
|
@@ -29358,7 +29358,7 @@ const NOOP_LOGGER = {
|
|
|
29358
29358
|
function canonicalizePathForComparison(filePath) {
|
|
29359
29359
|
const resolved = path.resolve(filePath);
|
|
29360
29360
|
try {
|
|
29361
|
-
return
|
|
29361
|
+
return syncFs.realpathSync(resolved);
|
|
29362
29362
|
} catch {
|
|
29363
29363
|
return resolved;
|
|
29364
29364
|
}
|
|
@@ -29416,12 +29416,12 @@ function resolveReferencedSessionTranscriptPaths(params) {
|
|
|
29416
29416
|
return referenced;
|
|
29417
29417
|
}
|
|
29418
29418
|
async function readSessionsDirFiles(sessionsDir) {
|
|
29419
|
-
const dirEntries = await
|
|
29419
|
+
const dirEntries = await syncFs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
29420
29420
|
const files = [];
|
|
29421
29421
|
for (const dirent of dirEntries) {
|
|
29422
29422
|
if (!dirent.isFile()) continue;
|
|
29423
29423
|
const filePath = path.join(sessionsDir, dirent.name);
|
|
29424
|
-
const stat = await
|
|
29424
|
+
const stat = await syncFs.promises.stat(filePath).catch(() => null);
|
|
29425
29425
|
if (!stat?.isFile()) continue;
|
|
29426
29426
|
files.push({
|
|
29427
29427
|
path: filePath,
|
|
@@ -29434,9 +29434,9 @@ async function readSessionsDirFiles(sessionsDir) {
|
|
|
29434
29434
|
return files;
|
|
29435
29435
|
}
|
|
29436
29436
|
async function removeFileIfExists(filePath) {
|
|
29437
|
-
const stat = await
|
|
29437
|
+
const stat = await syncFs.promises.stat(filePath).catch(() => null);
|
|
29438
29438
|
if (!stat?.isFile()) return 0;
|
|
29439
|
-
await
|
|
29439
|
+
await syncFs.promises.rm(filePath, { force: true }).catch(() => void 0);
|
|
29440
29440
|
return stat.size;
|
|
29441
29441
|
}
|
|
29442
29442
|
async function removeFileForBudget(params) {
|
|
@@ -29710,7 +29710,7 @@ function loadSessionStore(storePath, opts = {}) {
|
|
|
29710
29710
|
const maxReadAttempts = process.platform === "win32" ? 3 : 1;
|
|
29711
29711
|
const retryBuf = maxReadAttempts > 1 ? new Int32Array(new SharedArrayBuffer(4)) : void 0;
|
|
29712
29712
|
for (let attempt = 0; attempt < maxReadAttempts; attempt++) try {
|
|
29713
|
-
const raw =
|
|
29713
|
+
const raw = syncFs.readFileSync(storePath, "utf-8");
|
|
29714
29714
|
if (raw.length === 0 && attempt < maxReadAttempts - 1) {
|
|
29715
29715
|
Atomics.wait(retryBuf, 0, 0, 50);
|
|
29716
29716
|
continue;
|
|
@@ -29913,7 +29913,7 @@ function capEntryCount(store, overrideMax, opts = {}) {
|
|
|
29913
29913
|
}
|
|
29914
29914
|
async function getSessionFileSize(storePath) {
|
|
29915
29915
|
try {
|
|
29916
|
-
return (await
|
|
29916
|
+
return (await syncFs.promises.stat(storePath)).size;
|
|
29917
29917
|
} catch {
|
|
29918
29918
|
return null;
|
|
29919
29919
|
}
|
|
@@ -29930,7 +29930,7 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
29930
29930
|
if (fileSize <= maxBytes) return false;
|
|
29931
29931
|
const backupPath = `${storePath}.bak.${Date.now()}`;
|
|
29932
29932
|
try {
|
|
29933
|
-
await
|
|
29933
|
+
await syncFs.promises.rename(storePath, backupPath);
|
|
29934
29934
|
log$2.info("rotated session store file", {
|
|
29935
29935
|
backupPath: path.basename(backupPath),
|
|
29936
29936
|
sizeBytes: fileSize
|
|
@@ -29941,11 +29941,11 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
29941
29941
|
try {
|
|
29942
29942
|
const dir = path.dirname(storePath);
|
|
29943
29943
|
const baseName = path.basename(storePath);
|
|
29944
|
-
const backups = (await
|
|
29944
|
+
const backups = (await syncFs.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
|
|
29945
29945
|
const maxBackups = 3;
|
|
29946
29946
|
if (backups.length > maxBackups) {
|
|
29947
29947
|
const toDelete = backups.slice(maxBackups);
|
|
29948
|
-
for (const old of toDelete) await
|
|
29948
|
+
for (const old of toDelete) await syncFs.promises.unlink(path.join(dir, old)).catch(() => void 0);
|
|
29949
29949
|
log$2.info("cleaned up old session store backups", { deleted: toDelete.length });
|
|
29950
29950
|
}
|
|
29951
29951
|
} catch {}
|
|
@@ -30050,14 +30050,14 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
30050
30050
|
});
|
|
30051
30051
|
}
|
|
30052
30052
|
}
|
|
30053
|
-
await
|
|
30053
|
+
await syncFs.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
30054
30054
|
const json = JSON.stringify(store, null, 2);
|
|
30055
30055
|
if (process.platform === "win32") {
|
|
30056
30056
|
const tmp = `${storePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
30057
30057
|
try {
|
|
30058
|
-
await
|
|
30058
|
+
await syncFs.promises.writeFile(tmp, json, "utf-8");
|
|
30059
30059
|
for (let i = 0; i < 5; i++) try {
|
|
30060
|
-
await
|
|
30060
|
+
await syncFs.promises.rename(tmp, storePath);
|
|
30061
30061
|
break;
|
|
30062
30062
|
} catch {
|
|
30063
30063
|
if (i < 4) await new Promise((r) => setTimeout(r, 50 * (i + 1)));
|
|
@@ -30067,27 +30067,27 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
30067
30067
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") return;
|
|
30068
30068
|
throw err;
|
|
30069
30069
|
} finally {
|
|
30070
|
-
await
|
|
30070
|
+
await syncFs.promises.rm(tmp, { force: true }).catch(() => void 0);
|
|
30071
30071
|
}
|
|
30072
30072
|
return;
|
|
30073
30073
|
}
|
|
30074
30074
|
const tmp = `${storePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
30075
30075
|
try {
|
|
30076
|
-
await
|
|
30076
|
+
await syncFs.promises.writeFile(tmp, json, {
|
|
30077
30077
|
mode: 384,
|
|
30078
30078
|
encoding: "utf-8"
|
|
30079
30079
|
});
|
|
30080
|
-
await
|
|
30081
|
-
await
|
|
30080
|
+
await syncFs.promises.rename(tmp, storePath);
|
|
30081
|
+
await syncFs.promises.chmod(storePath, 384);
|
|
30082
30082
|
} catch (err) {
|
|
30083
30083
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") {
|
|
30084
30084
|
try {
|
|
30085
|
-
await
|
|
30086
|
-
await
|
|
30085
|
+
await syncFs.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
30086
|
+
await syncFs.promises.writeFile(storePath, json, {
|
|
30087
30087
|
mode: 384,
|
|
30088
30088
|
encoding: "utf-8"
|
|
30089
30089
|
});
|
|
30090
|
-
await
|
|
30090
|
+
await syncFs.promises.chmod(storePath, 384);
|
|
30091
30091
|
} catch (err2) {
|
|
30092
30092
|
if ((err2 && typeof err2 === "object" && "code" in err2 ? String(err2.code) : null) === "ENOENT") return;
|
|
30093
30093
|
throw err2;
|
|
@@ -30096,7 +30096,7 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
30096
30096
|
}
|
|
30097
30097
|
throw err;
|
|
30098
30098
|
} finally {
|
|
30099
|
-
await
|
|
30099
|
+
await syncFs.promises.rm(tmp, { force: true });
|
|
30100
30100
|
}
|
|
30101
30101
|
}
|
|
30102
30102
|
async function saveSessionStore(storePath, store, opts) {
|
|
@@ -30440,8 +30440,8 @@ async function resolveSessionTranscriptFile(params) {
|
|
|
30440
30440
|
});
|
|
30441
30441
|
}
|
|
30442
30442
|
async function ensureSessionHeader(params) {
|
|
30443
|
-
if (
|
|
30444
|
-
await
|
|
30443
|
+
if (syncFs.existsSync(params.sessionFile)) return;
|
|
30444
|
+
await syncFs.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
|
|
30445
30445
|
const header = {
|
|
30446
30446
|
type: "session",
|
|
30447
30447
|
version: CURRENT_SESSION_VERSION,
|
|
@@ -30449,7 +30449,7 @@ async function ensureSessionHeader(params) {
|
|
|
30449
30449
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
30450
30450
|
cwd: process.cwd()
|
|
30451
30451
|
};
|
|
30452
|
-
await
|
|
30452
|
+
await syncFs.promises.writeFile(params.sessionFile, `${JSON.stringify(header)}\n`, {
|
|
30453
30453
|
encoding: "utf-8",
|
|
30454
30454
|
mode: 384
|
|
30455
30455
|
});
|
|
@@ -30850,7 +30850,7 @@ async function loadContextCache() {
|
|
|
30850
30850
|
await ensureFasedModelsJson(cfg);
|
|
30851
30851
|
} catch {}
|
|
30852
30852
|
try {
|
|
30853
|
-
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-runtime-
|
|
30853
|
+
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-runtime-DD55ZBCk.js");
|
|
30854
30854
|
const agentDir = resolveFasedAgentDir();
|
|
30855
30855
|
const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
|
|
30856
30856
|
applyDiscoveredContextWindows({
|
|
@@ -31011,7 +31011,7 @@ function isCombinedSessionStoreCacheFresh(entry) {
|
|
|
31011
31011
|
}
|
|
31012
31012
|
function readSessionStoreSignature(storePath) {
|
|
31013
31013
|
try {
|
|
31014
|
-
const stat =
|
|
31014
|
+
const stat = syncFs.statSync(storePath);
|
|
31015
31015
|
return {
|
|
31016
31016
|
storePath,
|
|
31017
31017
|
exists: true,
|
|
@@ -31093,7 +31093,7 @@ function listExistingAgentIdsFromDisk() {
|
|
|
31093
31093
|
const root = resolveStateDir();
|
|
31094
31094
|
const agentsDir = path.join(root, "agents");
|
|
31095
31095
|
try {
|
|
31096
|
-
return
|
|
31096
|
+
return syncFs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
|
|
31097
31097
|
} catch {
|
|
31098
31098
|
return [];
|
|
31099
31099
|
}
|
|
@@ -32612,14 +32612,14 @@ async function readWorkspaceFileWithGuards(params) {
|
|
|
32612
32612
|
const identity = workspaceFileIdentity(opened.stat, opened.path);
|
|
32613
32613
|
const cached = workspaceFileCache.get(params.filePath);
|
|
32614
32614
|
if (cached && cached.identity === identity) {
|
|
32615
|
-
|
|
32615
|
+
syncFs.closeSync(opened.fd);
|
|
32616
32616
|
return {
|
|
32617
32617
|
ok: true,
|
|
32618
32618
|
content: cached.content
|
|
32619
32619
|
};
|
|
32620
32620
|
}
|
|
32621
32621
|
try {
|
|
32622
|
-
const content =
|
|
32622
|
+
const content = syncFs.readFileSync(opened.fd, "utf-8");
|
|
32623
32623
|
workspaceFileCache.set(params.filePath, {
|
|
32624
32624
|
content,
|
|
32625
32625
|
identity
|
|
@@ -32636,7 +32636,7 @@ async function readWorkspaceFileWithGuards(params) {
|
|
|
32636
32636
|
error
|
|
32637
32637
|
};
|
|
32638
32638
|
} finally {
|
|
32639
|
-
|
|
32639
|
+
syncFs.closeSync(opened.fd);
|
|
32640
32640
|
}
|
|
32641
32641
|
}
|
|
32642
32642
|
function stripFrontMatter(content) {
|