@fased/fased 0.1.9 → 0.1.11
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/README.md +7 -5
- package/dist/{active-listener-BC05EmaA.js → active-listener-CNrLAfOg.js} +1 -1
- package/dist/{agent-scope-DVw8mi_i.js → agent-scope-T2X-I1lP.js} +124 -124
- package/dist/{agents-C4jz1huI.js → agents-CMJVD0OP.js} +8 -8
- package/dist/{attachment-normalize-C-VpVpLd.js → attachment-normalize-CJ8osx0y.js} +1 -1
- package/dist/{attachment-normalize-DijgHIHy.js → attachment-normalize-Dqpm6stW.js} +1 -1
- package/dist/{audio-preflight-DLGJBu9O.js → audio-preflight-B2FUM6w4.js} +2 -2
- package/dist/{audio-preflight-oqlL2Kux.js → audio-preflight-BaItcO_S.js} +31 -31
- package/dist/{audio-preflight-CI7BIPwS.js → audio-preflight-CMBypKf2.js} +2 -2
- package/dist/{audio-preflight-U5m63Clr.js → audio-preflight-Cf6hrG6Y.js} +1 -1
- package/dist/{audio-preflight-C6Lb4XU1.js → audio-preflight-JNkJegO7.js} +1 -1
- package/dist/{audit-DwbVJt3i.js → audit-BjCVaoog.js} +1 -1
- package/dist/{audit-BCtx-_dH.js → audit-Dm9_Y9ek.js} +1 -1
- package/dist/{auth-DIBzLQ-S.js → auth-CmR3RRfx.js} +5 -5
- package/dist/{auth-choice-DOqXUqF_.js → auth-choice-C-sID0RY.js} +1 -1
- package/dist/{auth-choice-CEeiz47B.js → auth-choice-DPEogMvC.js} +1 -1
- package/dist/{auth-choice-prompt-yqlvFI-_.js → auth-choice-prompt-Cbcp3Ee2.js} +1 -1
- package/dist/{auth-choice-prompt-FJDk83bS.js → auth-choice-prompt-CzCpmXZF.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-D2IwnDWk.js → channel-activity-C0DEUhUn.js} +1 -1
- package/dist/{channel-web-DaircVlX.js → channel-web-BTEzRgur.js} +1 -1
- package/dist/{channel-web-CBfPvCCy.js → channel-web-DBR7OGrA.js} +1 -1
- package/dist/{channels-DgozxTBh.js → channels-DsRKZ6NL.js} +6 -6
- package/dist/{channels-BygboZOV.js → channels-FmXyntMa.js} +6 -6
- package/dist/{channels-cli-DNz7gmOI.js → channels-cli-D3X_07NV.js} +5 -5
- package/dist/{channels-cli-CY4n5HcO.js → channels-cli-DvmzEcUf.js} +5 -5
- package/dist/{chunk-BFGwq8HC.js → chunk-Q3WlKwcl.js} +1 -1
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-63C0cETT.js → cli-BvLMhUPA.js} +2 -2
- package/dist/{cli-CFgX3wef.js → cli-DMsf3uMe.js} +2 -2
- package/dist/{command-registry-DEiX9EPg.js → command-registry-DXN6Gm6U.js} +9 -9
- package/dist/{commands-registry-C7qLmjBS.js → commands-registry-CwvSkARW.js} +1 -1
- package/dist/{completion-cli-BzQetGgr.js → completion-cli-BakZ-vJj.js} +2 -2
- package/dist/{completion-cli-CRwAyWQL.js → completion-cli-is3s-YXN.js} +1 -1
- package/dist/{config-cli-CPl1vPz0.js → config-cli-CHZ9egMQ.js} +1 -1
- package/dist/{config-cli-C7vsh8Fg.js → config-cli-DTCrEIaK.js} +1 -1
- package/dist/{config-eval-CG37crOn.js → config-eval-BMGRKCyr.js} +3 -3
- package/dist/{configure-BEI_pe6B.js → configure-AXjfwCbC.js} +12 -12
- package/dist/{configure-C8lxNKpB.js → configure-t0_VefWH.js} +12 -12
- package/dist/control-ui/assets/app-wpJSg6bV.js.map +1 -1
- package/dist/{cron-cli-C7i4-Whp.js → cron-cli-BHTg4HPO.js} +2 -2
- package/dist/{cron-cli-BqD_ZSEC.js → cron-cli-DIedHCwY.js} +2 -2
- package/dist/{daemon-cli-D0AP3mOg.js → daemon-cli-DUMUVnTJ.js} +1 -1
- package/dist/{daemon-cli-DFYzYoB8.js → daemon-cli-lv-0kuHT.js} +1 -1
- package/dist/daemon-cli.js +1 -1
- package/dist/{deps-D9aJvXyD.js → deps-5PYELVCT.js} +1 -1
- package/dist/{deps-ddWLkZAO.js → deps-7Xjk7uTn.js} +1 -1
- package/dist/{diagnostic-DWKSfm_q.js → diagnostic-PXNTTbiu.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +1 -1
- package/dist/{fetch-DyKd0D6V.js → fetch-D6yXePhv.js} +1 -1
- package/dist/{fetch-guard-Ztzfiio9.js → fetch-guard-B-XqKRhJ.js} +1 -1
- package/dist/{filesystem-manager-9uqWGvqg.js → filesystem-manager-_ccVdKHj.js} +4 -4
- package/dist/{fs-safe--dkmYAev.js → fs-safe-CkRcL-Cg.js} +2 -2
- package/dist/{gateway-cli-D_Yd_yWi.js → gateway-cli-COUUlBN5.js} +27 -27
- package/dist/{gateway-cli-BJkYYsGs.js → gateway-cli-a_LcL_Yi.js} +27 -27
- package/dist/{github-copilot-token-DYrFvncE.js → github-copilot-token-eyrRGmGp.js} +8 -8
- package/dist/{health-gyJixAyN.js → health-DQlfle1u.js} +2 -2
- package/dist/{health-DCFLGVDU.js → health-DZ82kGpi.js} +2 -2
- package/dist/{heartbeat-runner-BFUvc4Y_.js → heartbeat-runner-BDe0KJF7.js} +1 -1
- package/dist/{heartbeat-runner-Bn9N5npL.js → heartbeat-runner-C2n7G095.js} +1 -1
- package/dist/{hooks-cli-BGFJQWmK.js → hooks-cli-8GN0KlvM.js} +3 -3
- package/dist/{hooks-cli-CGj2FDai.js → hooks-cli-yMMxy-yo.js} +3 -3
- package/dist/index.js +7 -7
- package/dist/{internal-yBWuTfFC.js → internal-CtV-S2kE.js} +3 -3
- package/dist/{ipv4-CjO0_Ry3.js → ipv4-D1FYQ4Mk.js} +2 -2
- package/dist/{ipv4-CBSPFYQB.js → ipv4-DgQOUcwH.js} +2 -2
- package/dist/{lifecycle-BBNnNoX_.js → lifecycle-BxdJxsFv.js} +1 -1
- package/dist/{lifecycle-DFvIF7r0.js → lifecycle-DUQ2P6lB.js} +1 -1
- package/dist/{list.auth-overview-DySKd1cu.js → list.auth-overview-C9QoS2ou.js} +1 -1
- package/dist/{list.auth-overview-CpmtoN2D.js → list.auth-overview-CrlYcU_A.js} +1 -1
- package/dist/llm-slug-generator.js +31 -31
- package/dist/{login-DPlzYTXi.js → login-C4KKxuM4.js} +2 -2
- package/dist/{login-qr-c2Drd9vA.js → login-qr-DMxUP87H.js} +3 -3
- package/dist/{manager-XJq9ONvb.js → manager-O_PUm8xA.js} +8 -8
- package/dist/{markdown-tables-7kI-7mng.js → markdown-tables-QOHpjP76.js} +1 -1
- package/dist/{media-D4nEnyX9.js → media-KeWZMCmf.js} +5 -5
- package/dist/{memory-search-Z2b0d-jA.js → memory-search-BVlFBMLd.js} +2 -2
- package/dist/{model-catalog-DfLJlqO8.js → model-catalog-D4rEoh5e.js} +9 -9
- package/dist/{models-cli-DpmciZv6.js → models-cli-C8qP0w3J.js} +5 -5
- package/dist/{models-cli-Bu09lWlb.js → models-cli-Cq7UxTbg.js} +4 -4
- package/dist/{models-BbfLyMBF.js → models-jVuLblxp.js} +4 -4
- package/dist/{node-cli-GbiqR_FY.js → node-cli-DScZRTL7.js} +2 -2
- package/dist/{node-cli-D6iG4Fev.js → node-cli-o6uY0qaP.js} +2 -2
- package/dist/{onboard-CViA2g_j.js → onboard-Ddf5Pf9K.js} +6 -6
- package/dist/{onboard-channels-BeKekf-a.js → onboard-channels-D8ENQiPK.js} +2 -2
- package/dist/{onboard-channels-gHaSwzTd.js → onboard-channels-Doc5AjLd.js} +2 -2
- package/dist/{onboard-BgU-rNfl.js → onboard-feH8VdPn.js} +6 -6
- package/dist/{onboard-search-COuzKj6_.js → onboard-search-DuxAp1aK.js} +5 -5
- package/dist/{onboard-search-DkOnHZm9.js → onboard-search-GxWu-SFZ.js} +5 -5
- package/dist/{onboarding-nabyJljA.js → onboarding-BR7OHJ2H.js} +100 -63
- package/dist/{onboarding-CowfhJUD.js → onboarding-Cxkh1WwH.js} +100 -63
- package/dist/{openresponses-http-BBydvP41.js → openresponses-http-BL1pUdQf.js} +2 -2
- package/dist/{openresponses-http-D42SXipZ.js → openresponses-http-CzuT0O2I.js} +31 -31
- package/dist/{openresponses-http-C66CR36w.js → openresponses-http-DCHdi7mF.js} +2 -2
- package/dist/{openresponses-http-CdO4hFg_.js → openresponses-http-DQ3c6n1-.js} +1 -1
- package/dist/{openresponses-http-One5KNo8.js → openresponses-http-MJ14c-46.js} +1 -1
- package/dist/{outbound-attachment-BnC5ITTB.js → outbound-attachment-DO7UVxZm.js} +2 -2
- package/dist/{outbound-vYt3OL7q.js → outbound-nrqaUQPn.js} +6 -6
- package/dist/{parent-default-help-82dOtJ5b.js → parent-default-help-BKBeFc1_.js} +1 -1
- package/dist/{parent-default-help-iR__S_d8.js → parent-default-help-BRMZI4YX.js} +1 -1
- package/dist/{path-alias-guards-BgsaoH-B.js → path-alias-guards-BVcGMct5.js} +1 -1
- package/dist/{paths-0bvQb_LS.js → paths-C2qpRqKS.js} +22 -22
- package/dist/{pi-embedded-DLEbV2ey.js → pi-embedded-Bqi9f0et.js} +5 -5
- package/dist/{pi-embedded-BqhMzKsb.js → pi-embedded-D2PqvAO_.js} +239 -239
- package/dist/{pi-model-discovery-DpUv4v_r.js → pi-model-discovery-B1-QPAbn.js} +7 -7
- package/dist/pi-model-discovery-runtime-C3EP4IIA.js +5 -0
- package/dist/{plugin-registry-DgLnDYKc.js → plugin-registry-CmfUTKxt.js} +1 -1
- package/dist/{plugin-registry-DgnprUWu.js → plugin-registry-VukRFBIJ.js} +1 -1
- package/dist/plugin-sdk/{active-listener-C5ltqLGu.js → active-listener-DoYouR42.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-B3yRlgpY.js → audio-preflight-CVzfTzWu.js} +29 -29
- package/dist/plugin-sdk/{audio-preflight-bl33qm06.js → audio-preflight-CfNG6Wtw.js} +1 -1
- package/dist/plugin-sdk/{channel-activity-C1o4f6CQ.js → channel-activity-DO70gTOL.js} +1 -1
- package/dist/plugin-sdk/channel-plugin-common.js +1 -1
- package/dist/plugin-sdk/{channel-web-BmhttJUt.js → channel-web-DksUuYJT.js} +14 -14
- package/dist/plugin-sdk/{chunk-CLhP_PY2.js → chunk-RXEaIS7Q.js} +1 -1
- package/dist/plugin-sdk/command-status.js +1 -1
- package/dist/plugin-sdk/{commands-registry-rxhYCn3h.js → commands-registry-Cc-MsC0s.js} +1 -1
- package/dist/plugin-sdk/{diagnostic-B18Fb_x_.js → diagnostic-B49XKTb2.js} +1 -1
- package/dist/plugin-sdk/{fetch-IDUrNG4h.js → fetch-5yC4s4HB.js} +1 -1
- package/dist/plugin-sdk/{fetch-guard-CNvu0czC.js → fetch-guard-D-xE9VSj.js} +1 -1
- package/dist/plugin-sdk/{filesystem-manager-BeVVhJWO.js → filesystem-manager-CJboYM0S.js} +3 -3
- package/dist/plugin-sdk/{fs-safe-DQ3_54XI.js → fs-safe-UcucKJic.js} +2 -2
- package/dist/plugin-sdk/index.js +34 -34
- package/dist/plugin-sdk/{internal-B5WwMXvo.js → internal-BPIA30Uo.js} +1 -1
- package/dist/plugin-sdk/{ir-wu6kjYKs.js → ir-DChJP1Kb.js} +4 -4
- package/dist/plugin-sdk/{login-D4XFYPCP.js → login-Blc_5Mfx.js} +2 -2
- package/dist/plugin-sdk/{login-qr-B9DNJMzT.js → login-qr-BQz8yyAp.js} +2 -2
- package/dist/plugin-sdk/{manager-DosJYKNm.js → manager-E2u7eTdN.js} +5 -5
- package/dist/plugin-sdk/{markdown-tables-BPDFC99a.js → markdown-tables-nBLwWu-q.js} +1 -1
- package/dist/plugin-sdk/{memory-search-BRc1w0pH.js → memory-search-BMfxsZst.js} +1 -1
- package/dist/plugin-sdk/{openresponses-http-BkfMH5vT.js → openresponses-http-DFcst5ak.js} +29 -29
- package/dist/plugin-sdk/{openresponses-http-DVsmkLyj.js → openresponses-http-G9zNQzxR.js} +1 -1
- package/dist/plugin-sdk/{outbound-DPWNpSQ2.js → outbound-D3S8AyO5.js} +6 -6
- package/dist/plugin-sdk/{outbound-attachment-sc88JFtf.js → outbound-attachment-Jnv1CNZB.js} +2 -2
- package/dist/plugin-sdk/{path-alias-guards-DVDPpKaI.js → path-alias-guards-B4FeK1hV.js} +1 -1
- package/dist/plugin-sdk/{paths-DPJkB1Zo.js → paths-DfSR5y6m.js} +2 -2
- package/dist/plugin-sdk/{pi-model-discovery-Bt88hotH.js → pi-model-discovery-CPfojvUt.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-C_BkP4_p.js → pi-model-discovery-runtime-BtVqhePh.js} +2 -2
- package/dist/plugin-sdk/{pi-model-discovery-runtime-Cv_H-NDs.js → pi-model-discovery-runtime-CddkbYKA.js} +1 -1
- package/dist/plugin-sdk/{pw-ai-z7u9z0Gl.js → pw-ai-Cy5GL4BO.js} +4 -4
- package/dist/plugin-sdk/{qmd-manager-CR7ZrE4D.js → qmd-manager-DTLLD9QF.js} +4 -4
- package/dist/plugin-sdk/{qmd-scope-D5pfYpTx.js → qmd-scope-0JoQj00s.js} +1 -1
- package/dist/plugin-sdk/{query-expansion-DMIckuk2.js → query-expansion-bWgC9vRe.js} +2 -2
- package/dist/plugin-sdk/{registry-Dpq_OloZ.js → registry-BhjWgT6A.js} +8 -8
- package/dist/plugin-sdk/{replies-ChLqx77a.js → replies-BbDYqvSQ.js} +2 -2
- package/dist/plugin-sdk/{reply-ceu7kXX1.js → reply-DvuHwHUJ.js} +67 -67
- package/dist/plugin-sdk/{reply-prefix-BMlximgi.js → reply-prefix-Zqi6lY5T.js} +1 -1
- package/dist/plugin-sdk/{resolve-outbound-target-CzHPZvQ9.js → resolve-outbound-target-B8kZ51TY.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-DlUpOg3_.js → resolve-route-DR2HJZkT.js} +1 -1
- package/dist/plugin-sdk/{runtime-x71O5s-N.js → runtime-45bZMjLH.js} +8 -8
- package/dist/plugin-sdk/{send-DY9n8pqC.js → send-BWTZZs_g.js} +7 -7
- package/dist/plugin-sdk/{send-DBVp3j7m.js → send-BtnKV_Vt.js} +5 -5
- package/dist/plugin-sdk/{send-DEQVHEZ4.js → send-DES1Q84z.js} +5 -5
- package/dist/plugin-sdk/{send-Ba0KNbhf.js → send-WNg2lRih.js} +4 -4
- package/dist/plugin-sdk/{send-BhMMKWOk.js → send-mGgg18UE.js} +7 -7
- package/dist/plugin-sdk/{session-BsRPv-eK.js → session-CgkSjr1g.js} +1 -1
- package/dist/plugin-sdk/{skill-commands-BctYBY9Z.js → skill-commands-mVqbX-Fs.js} +5 -5
- package/dist/plugin-sdk/src/brand.d.ts +2 -2
- package/dist/plugin-sdk/{status-BcZw5R2P.js → status-6xupAoj-.js} +5 -5
- package/dist/plugin-sdk/{tables-CBeKgNEN.js → tables-BHylyCNS.js} +1 -1
- package/dist/plugin-sdk/{target-errors-B4PsZKb0.js → target-errors-Boue6hd3.js} +2 -2
- package/dist/plugin-sdk/{tool-loop-detection-XlSYI5bB.js → tool-loop-detection-BxnMJJ7B.js} +1 -1
- package/dist/plugin-sdk/{web-DE0yQyjF.js → web-Cfri_iT8.js} +1 -1
- package/dist/plugin-sdk/web-Zyzl7IW6.js +40 -0
- package/dist/plugin-sdk/{whatsapp-actions-CSxYzpeM.js → whatsapp-actions-DJ5x-Sd_.js} +12 -12
- package/dist/{plugins-cli-gUow1y1s.js → plugins-cli-Bx0H7QQU.js} +5 -5
- package/dist/{plugins-cli-Bw8rkcLm.js → plugins-cli-HReUJLnn.js} +5 -5
- package/dist/{program-D7MpzAVA.js → program-BY3EZa_c.js} +7 -7
- package/dist/{program-context-BnMmmcLR.js → program-context-MZAw4oo8.js} +24 -24
- package/dist/{prompt-select-styled-DEZExK7l.js → prompt-select-styled-BasY5XsH.js} +4 -4
- package/dist/{prompt-select-styled-CZx9cLwR.js → prompt-select-styled-DBq1-yGB.js} +4 -4
- package/dist/{pw-ai-DAn5Q5Mg.js → pw-ai-D6C45ed-.js} +5 -5
- package/dist/{qmd-manager-BQu_lmJ6.js → qmd-manager--NffQxNh.js} +5 -5
- package/dist/{qmd-scope-Bv2HOfhX.js → qmd-scope-BgLcDW_Q.js} +1 -1
- package/dist/{query-expansion-LNmYRPvI.js → query-expansion-BW1RomSn.js} +2 -2
- package/dist/{register.agent-B9A7SDz_.js → register.agent-C7oqvzMO.js} +8 -8
- package/dist/{register.agent-DlatKWlA.js → register.agent-DPvilSbD.js} +9 -9
- package/dist/{register.configure-yNuOFQX6.js → register.configure-CmawJCq8.js} +12 -12
- package/dist/{register.configure-Tez2eNbW.js → register.configure-Jq4rlEpZ.js} +12 -12
- package/dist/{register.maintenance-BzVw1_e5.js → register.maintenance-DauG5FhL.js} +9 -9
- package/dist/{register.maintenance-Q6YI5mk9.js → register.maintenance-Db7KY5qy.js} +8 -8
- package/dist/{register.message-Cda69Xe6.js → register.message-B5itvC4t.js} +3 -3
- package/dist/{register.message-D9LYOvON.js → register.message-Cy9ynm9n.js} +3 -3
- package/dist/{register.onboard-BoLP06ui.js → register.onboard-BRtEN2AH.js} +14 -14
- package/dist/{register.onboard-D1a2rQDh.js → register.onboard-DQVkAX4S.js} +14 -14
- package/dist/{register.setup-DhppZhR2.js → register.setup-BJtgWkaG.js} +14 -14
- package/dist/{register.setup-D_qD7Gvk.js → register.setup-WqEzZMCR.js} +14 -14
- package/dist/{register.status-health-sessions-Csah3svc.js → register.status-health-sessions-CRLl-Xg2.js} +6 -6
- package/dist/{register.status-health-sessions-C0IsjCxS.js → register.status-health-sessions-CYft6R-u.js} +6 -6
- package/dist/{register.subclis-C4Dh6aQK.js → register.subclis-Di9x-uQJ.js} +16 -16
- package/dist/{replies-D0__mn7d.js → replies-lgWzXlwM.js} +2 -2
- package/dist/{reply-C3PsVpeQ.js → reply-CBhrmRrH.js} +9 -9
- package/dist/{reply-prefix-CteprwTK.js → reply-prefix-BM90m-1s.js} +1 -1
- package/dist/{resolve-route-Twc4mQV7.js → resolve-route-DyTOJJs4.js} +1 -1
- package/dist/{run-main-XXpwNNGn.js → run-main-BORzDxLY.js} +14 -14
- package/dist/{runtime-helper-grants-C10OJEih.js → runtime-helper-grants-Cuybmi1P.js} +1 -1
- package/dist/{runtime-helper-grants-BTCk3CzW.js → runtime-helper-grants-neC-6Mp_.js} +1 -1
- package/dist/{sandbox-cli-2MuBwFbv.js → sandbox-cli-BAfTtJI-.js} +2 -2
- package/dist/{sandbox-cli-Bft002rK.js → sandbox-cli-ZEYXtCXZ.js} +2 -2
- package/dist/{security-cli-6CmGeQ7I.js → security-cli-CFmeNE3e.js} +3 -3
- package/dist/{security-cli-DpQep_pt.js → security-cli-aO7V40WP.js} +3 -3
- package/dist/{send-BVmNzYrR.js → send-B8seeqjd.js} +18 -18
- package/dist/{send-BG45zdAY.js → send-BPleg3km.js} +5 -5
- package/dist/{send-BAtDZt7a.js → send-CAqldeiP.js} +5 -5
- package/dist/{send-DD6K3WP6.js → send-D63evlEI.js} +7 -7
- package/dist/{send-6RE7ZD_B.js → send-M0lHXvC5.js} +4 -4
- package/dist/{server-OidOCKoj.js → server-CU9N0zVA.js} +2 -2
- package/dist/{server-D62kYBqw.js → server-DtSfJaMU.js} +2 -2
- package/dist/{server-cron--g6K0O5V.js → server-cron-3feKZet8.js} +2 -2
- package/dist/{server-cron-DYKXfeLU.js → server-cron-B8nnjZ6j.js} +2 -2
- package/dist/{server-node-events-Csbl1Sw5.js → server-node-events-D4wjAoTI.js} +3 -3
- package/dist/{server-node-events-DSvH0zky.js → server-node-events-dJRsvJ1e.js} +3 -3
- package/dist/{session-CHL2ptKy.js → session-Cvg_ryor.js} +5 -5
- package/dist/{skill-commands-_zLgADck.js → skill-commands-D_QLBtje.js} +24 -24
- package/dist/{status-cY8_nNEN.js → status-B6xlt9hk.js} +1 -1
- package/dist/{status-DDWMOp5e.js → status-CKesh_zv.js} +4 -4
- package/dist/{status-CEqTBWFX.js → status-DsryVrZZ.js} +4 -4
- package/dist/{status-e52jwOFE.js → status-WM2U3wSq.js} +1 -1
- package/dist/{tables-Dtfop_e5.js → tables-Cif1OeQ1.js} +1 -1
- package/dist/{target-errors-DrHV8jza.js → target-errors-B-8Jf9OT.js} +2 -2
- package/dist/{tool-loop-detection-CPr-VVyD.js → tool-loop-detection-6p0-ziTi.js} +2 -2
- package/dist/{tui-K3OJBQvo.js → tui-C_15rImY.js} +1 -1
- package/dist/{tui-cli-DEHMUby1.js → tui-cli-CJ4ktGm6.js} +3 -3
- package/dist/{tui-cli-CNL0cM4e.js → tui-cli-Cf4QMwPG.js} +3 -3
- package/dist/{tui-B5xfA4bO.js → tui-m7pkF_Gw.js} +1 -1
- package/dist/{update-cli-Cr7BTqe1.js → update-cli-BdyzhH15.js} +9 -9
- package/dist/{update-cli-BqiZ9j4m.js → update-cli-CpVUWYIh.js} +10 -10
- package/dist/{update-runner-DcpjVgBR.js → update-runner-Cp2KspVC.js} +1 -1
- package/dist/{update-runner-CycjY65W.js → update-runner-polOgbQK.js} +1 -1
- package/dist/{web-ChgN9rvX.js → web-BK0Q-Mcx.js} +3 -3
- package/dist/{web-CLOmxVxX.js → web-Bd_VJKf7.js} +1 -1
- package/dist/{web-DhwWGdvc.js → web-CD6MuZp1.js} +35 -35
- package/dist/{web-D6CU81WZ.js → web-CnMZHMVF.js} +1 -1
- package/dist/{web-6MnkoZyD.js → web-CnS-eVr9.js} +3 -3
- package/dist/{web-search-providers.runtime-u6_OyUd6.js → web-search-providers.runtime-C0_Og2wh.js} +1 -1
- package/dist/{web-search-providers.runtime-D-uepqZ5.js → web-search-providers.runtime-kvogieHw.js} +1 -1
- package/dist/{whatsapp-actions-C5qguyU5.js → whatsapp-actions-BAux9gs7.js} +12 -12
- package/docs/install/index.md +16 -10
- package/docs/install/installer.md +18 -9
- package/docs/install/node.md +5 -4
- package/docs/install/vps.md +7 -3
- 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 -1
- package/scripts/run-node.mjs +294 -0
- package/scripts/start-managed.sh +1551 -0
- package/dist/pi-model-discovery-runtime-9_2G9r_K.js +0 -5
- package/dist/plugin-sdk/web-D_ze88LT.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 {}
|
|
@@ -597,14 +597,14 @@ function isPlainObject$2(value) {
|
|
|
597
597
|
//#endregion
|
|
598
598
|
//#region src/utils.ts
|
|
599
599
|
async function ensureDir(dir) {
|
|
600
|
-
await
|
|
600
|
+
await syncFs.promises.mkdir(dir, { recursive: true });
|
|
601
601
|
}
|
|
602
602
|
/**
|
|
603
603
|
* Check if a file or directory exists at the given path.
|
|
604
604
|
*/
|
|
605
605
|
async function pathExists$1(targetPath) {
|
|
606
606
|
try {
|
|
607
|
-
await
|
|
607
|
+
await syncFs.promises.access(targetPath);
|
|
608
608
|
return true;
|
|
609
609
|
} catch {
|
|
610
610
|
return false;
|
|
@@ -687,7 +687,7 @@ function readLidReverseMapping(lid, opts) {
|
|
|
687
687
|
for (const dir of mappingDirs) {
|
|
688
688
|
const mappingPath = path.join(dir, mappingFilename);
|
|
689
689
|
try {
|
|
690
|
-
const data =
|
|
690
|
+
const data = syncFs.readFileSync(mappingPath, "utf8");
|
|
691
691
|
const phone = JSON.parse(data);
|
|
692
692
|
if (phone === null || phone === void 0) continue;
|
|
693
693
|
return normalizeE164(String(phone));
|
|
@@ -772,7 +772,7 @@ function resolveConfigDir(env = process.env, homedir = os.homedir) {
|
|
|
772
772
|
if (override) return resolveUserPath(override);
|
|
773
773
|
const newDir = path.join(resolveRequiredHomeDir(env, homedir), ".fased");
|
|
774
774
|
try {
|
|
775
|
-
if (
|
|
775
|
+
if (syncFs.existsSync(newDir)) return newDir;
|
|
776
776
|
} catch {}
|
|
777
777
|
return newDir;
|
|
778
778
|
}
|
|
@@ -2959,7 +2959,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
2959
2959
|
const accountCfg = resolveAccountCfg(accountId !== DEFAULT_ACCOUNT_ID ? accountId : DEFAULT_ACCOUNT_ID);
|
|
2960
2960
|
const accountTokenFile = accountCfg?.tokenFile?.trim();
|
|
2961
2961
|
if (accountTokenFile) {
|
|
2962
|
-
if (!
|
|
2962
|
+
if (!syncFs.existsSync(accountTokenFile)) {
|
|
2963
2963
|
opts.logMissingFile?.(`channels.telegram.accounts.${accountId}.tokenFile not found: ${accountTokenFile}`);
|
|
2964
2964
|
return {
|
|
2965
2965
|
token: "",
|
|
@@ -2967,7 +2967,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
2967
2967
|
};
|
|
2968
2968
|
}
|
|
2969
2969
|
try {
|
|
2970
|
-
const token =
|
|
2970
|
+
const token = syncFs.readFileSync(accountTokenFile, "utf-8").trim();
|
|
2971
2971
|
if (token) return {
|
|
2972
2972
|
token,
|
|
2973
2973
|
source: "tokenFile"
|
|
@@ -2992,7 +2992,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
2992
2992
|
const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
|
|
2993
2993
|
const tokenFile = telegramCfg?.tokenFile?.trim();
|
|
2994
2994
|
if (tokenFile && allowEnv) {
|
|
2995
|
-
if (!
|
|
2995
|
+
if (!syncFs.existsSync(tokenFile)) {
|
|
2996
2996
|
opts.logMissingFile?.(`channels.telegram.tokenFile not found: ${tokenFile}`);
|
|
2997
2997
|
return {
|
|
2998
2998
|
token: "",
|
|
@@ -3000,7 +3000,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
3000
3000
|
};
|
|
3001
3001
|
}
|
|
3002
3002
|
try {
|
|
3003
|
-
const token =
|
|
3003
|
+
const token = syncFs.readFileSync(tokenFile, "utf-8").trim();
|
|
3004
3004
|
if (token) return {
|
|
3005
3005
|
token,
|
|
3006
3006
|
source: "tokenFile"
|
|
@@ -3174,7 +3174,7 @@ function resolveHintCliInvocation(argv = process.argv) {
|
|
|
3174
3174
|
if (!argv1) return fallback;
|
|
3175
3175
|
if (path.basename(argv1).trim() !== "run-node.mjs") return fallback;
|
|
3176
3176
|
const localRunner = path.resolve(process.cwd(), "scripts", "run-node.mjs");
|
|
3177
|
-
if (!
|
|
3177
|
+
if (!syncFs.existsSync(localRunner)) return fallback;
|
|
3178
3178
|
return "node scripts/run-node.mjs";
|
|
3179
3179
|
}
|
|
3180
3180
|
function formatCliCommand(command, env = process.env) {
|
|
@@ -3386,7 +3386,7 @@ function readAuthStoreLidReverseMapping(lid, opts) {
|
|
|
3386
3386
|
for (const dir of dirs) {
|
|
3387
3387
|
const mappingPath = path.join(dir, mappingFilename);
|
|
3388
3388
|
try {
|
|
3389
|
-
const data =
|
|
3389
|
+
const data = syncFs.readFileSync(mappingPath, "utf8");
|
|
3390
3390
|
const phone = JSON.parse(data);
|
|
3391
3391
|
if (phone !== null && phone !== void 0) return normalizeAuthStoreE164(String(phone));
|
|
3392
3392
|
} catch {}
|
|
@@ -3412,7 +3412,7 @@ function resolveWebCredsBackupPath(authDir) {
|
|
|
3412
3412
|
}
|
|
3413
3413
|
function hasWebCredsSync(authDir) {
|
|
3414
3414
|
try {
|
|
3415
|
-
const stats =
|
|
3415
|
+
const stats = syncFs.statSync(resolveWebCredsPath(authDir));
|
|
3416
3416
|
return stats.isFile() && stats.size > 1;
|
|
3417
3417
|
} catch {
|
|
3418
3418
|
return false;
|
|
@@ -3420,10 +3420,10 @@ function hasWebCredsSync(authDir) {
|
|
|
3420
3420
|
}
|
|
3421
3421
|
function readCredsJsonRaw(filePath) {
|
|
3422
3422
|
try {
|
|
3423
|
-
if (!
|
|
3424
|
-
const stats =
|
|
3423
|
+
if (!syncFs.existsSync(filePath)) return null;
|
|
3424
|
+
const stats = syncFs.statSync(filePath);
|
|
3425
3425
|
if (!stats.isFile() || stats.size <= 1) return null;
|
|
3426
|
-
return
|
|
3426
|
+
return syncFs.readFileSync(filePath, "utf-8");
|
|
3427
3427
|
} catch {
|
|
3428
3428
|
return null;
|
|
3429
3429
|
}
|
|
@@ -3441,9 +3441,9 @@ function maybeRestoreCredsFromBackup(authDir) {
|
|
|
3441
3441
|
const backupRaw = readCredsJsonRaw(backupPath);
|
|
3442
3442
|
if (!backupRaw) return;
|
|
3443
3443
|
JSON.parse(backupRaw);
|
|
3444
|
-
|
|
3444
|
+
syncFs.copyFileSync(backupPath, credsPath);
|
|
3445
3445
|
try {
|
|
3446
|
-
|
|
3446
|
+
syncFs.chmodSync(credsPath, 384);
|
|
3447
3447
|
} catch {}
|
|
3448
3448
|
logger.warn({ credsPath }, "restored corrupted WhatsApp creds.json from backup");
|
|
3449
3449
|
} catch {}
|
|
@@ -3499,11 +3499,11 @@ async function logoutWeb(params) {
|
|
|
3499
3499
|
function readWebSelfId(authDir = resolveDefaultWebAuthDir()) {
|
|
3500
3500
|
try {
|
|
3501
3501
|
const credsPath = resolveWebCredsPath(resolveAuthStoreUserPath(authDir));
|
|
3502
|
-
if (!
|
|
3502
|
+
if (!syncFs.existsSync(credsPath)) return {
|
|
3503
3503
|
e164: null,
|
|
3504
3504
|
jid: null
|
|
3505
3505
|
};
|
|
3506
|
-
const raw =
|
|
3506
|
+
const raw = syncFs.readFileSync(credsPath, "utf-8");
|
|
3507
3507
|
const jid = JSON.parse(raw)?.me?.id ?? null;
|
|
3508
3508
|
return {
|
|
3509
3509
|
e164: jid ? jidToE164ForAuthStore(jid, { authDir }) : null,
|
|
@@ -3522,7 +3522,7 @@ function readWebSelfId(authDir = resolveDefaultWebAuthDir()) {
|
|
|
3522
3522
|
*/
|
|
3523
3523
|
function getWebAuthAgeMs(authDir = resolveDefaultWebAuthDir()) {
|
|
3524
3524
|
try {
|
|
3525
|
-
const stats =
|
|
3525
|
+
const stats = syncFs.statSync(resolveWebCredsPath(resolveAuthStoreUserPath(authDir)));
|
|
3526
3526
|
return Date.now() - stats.mtimeMs;
|
|
3527
3527
|
} catch {
|
|
3528
3528
|
return null;
|
|
@@ -3554,7 +3554,7 @@ function listWhatsAppAuthDirs(cfg) {
|
|
|
3554
3554
|
accountId
|
|
3555
3555
|
}).authDir);
|
|
3556
3556
|
try {
|
|
3557
|
-
const entries =
|
|
3557
|
+
const entries = syncFs.readdirSync(whatsappDir, { withFileTypes: true });
|
|
3558
3558
|
for (const entry of entries) {
|
|
3559
3559
|
if (!entry.isDirectory()) continue;
|
|
3560
3560
|
authDirs.add(path.join(whatsappDir, entry.name));
|
|
@@ -3576,7 +3576,7 @@ function resolveLegacyAuthDir() {
|
|
|
3576
3576
|
}
|
|
3577
3577
|
function legacyAuthExists(authDir) {
|
|
3578
3578
|
try {
|
|
3579
|
-
return
|
|
3579
|
+
return syncFs.existsSync(path.join(authDir, "creds.json"));
|
|
3580
3580
|
} catch {
|
|
3581
3581
|
return false;
|
|
3582
3582
|
}
|
|
@@ -4948,7 +4948,7 @@ function shouldBlockWorkspaceDotEnvKey(key) {
|
|
|
4948
4948
|
function readDotEnvFile(params) {
|
|
4949
4949
|
let content;
|
|
4950
4950
|
try {
|
|
4951
|
-
content =
|
|
4951
|
+
content = syncFs.readFileSync(params.filePath, "utf8");
|
|
4952
4952
|
} catch (error) {
|
|
4953
4953
|
if (!params.quiet) {
|
|
4954
4954
|
if ((error && typeof error === "object" && "code" in error ? String(error.code) : void 0) !== "ENOENT") console.warn(`[dotenv] Failed to read ${params.filePath}: ${String(error)}`);
|
|
@@ -5066,7 +5066,7 @@ function resolveTimeoutMs(timeoutMs) {
|
|
|
5066
5066
|
function readEtcShells() {
|
|
5067
5067
|
if (cachedEtcShells !== void 0) return cachedEtcShells;
|
|
5068
5068
|
try {
|
|
5069
|
-
const entries =
|
|
5069
|
+
const entries = syncFs.readFileSync("/etc/shells", "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#") && path.isAbsolute(line));
|
|
5070
5070
|
cachedEtcShells = new Set(entries);
|
|
5071
5071
|
} catch {
|
|
5072
5072
|
cachedEtcShells = null;
|
|
@@ -5942,7 +5942,7 @@ function resolveBoundaryPathLexicalSync(params) {
|
|
|
5942
5942
|
lexicalCursor = path.join(lexicalCursor, segment);
|
|
5943
5943
|
let stat;
|
|
5944
5944
|
try {
|
|
5945
|
-
stat =
|
|
5945
|
+
stat = syncFs.lstatSync(lexicalCursor);
|
|
5946
5946
|
} catch (error) {
|
|
5947
5947
|
if (isNotFoundPathError(error)) {
|
|
5948
5948
|
const missingSuffix = segments.slice(idx);
|
|
@@ -6048,15 +6048,15 @@ function resolvePathViaExistingAncestorSync(targetPath) {
|
|
|
6048
6048
|
const normalized = path.resolve(targetPath);
|
|
6049
6049
|
let cursor = normalized;
|
|
6050
6050
|
const missingSuffix = [];
|
|
6051
|
-
while (!isFilesystemRoot(cursor) && !
|
|
6051
|
+
while (!isFilesystemRoot(cursor) && !syncFs.existsSync(cursor)) {
|
|
6052
6052
|
missingSuffix.unshift(path.basename(cursor));
|
|
6053
6053
|
const parent = path.dirname(cursor);
|
|
6054
6054
|
if (parent === cursor) break;
|
|
6055
6055
|
cursor = parent;
|
|
6056
6056
|
}
|
|
6057
|
-
if (!
|
|
6057
|
+
if (!syncFs.existsSync(cursor)) return normalized;
|
|
6058
6058
|
try {
|
|
6059
|
-
const resolvedAncestor = path.resolve(
|
|
6059
|
+
const resolvedAncestor = path.resolve(syncFs.realpathSync(cursor));
|
|
6060
6060
|
if (missingSuffix.length === 0) return resolvedAncestor;
|
|
6061
6061
|
return path.resolve(resolvedAncestor, ...missingSuffix);
|
|
6062
6062
|
} catch {
|
|
@@ -6081,7 +6081,7 @@ function getPathKindSync(absolutePath, preserveFinalSymlink) {
|
|
|
6081
6081
|
try {
|
|
6082
6082
|
return {
|
|
6083
6083
|
exists: true,
|
|
6084
|
-
kind: toResolvedKind(preserveFinalSymlink ?
|
|
6084
|
+
kind: toResolvedKind(preserveFinalSymlink ? syncFs.lstatSync(absolutePath) : syncFs.statSync(absolutePath))
|
|
6085
6085
|
};
|
|
6086
6086
|
} catch (error) {
|
|
6087
6087
|
if (isNotFoundPathError(error)) return {
|
|
@@ -6141,10 +6141,10 @@ async function resolveSymlinkHopPath(symlinkPath) {
|
|
|
6141
6141
|
}
|
|
6142
6142
|
function resolveSymlinkHopPathSync(symlinkPath) {
|
|
6143
6143
|
try {
|
|
6144
|
-
return path.resolve(
|
|
6144
|
+
return path.resolve(syncFs.realpathSync(symlinkPath));
|
|
6145
6145
|
} catch (error) {
|
|
6146
6146
|
if (!isNotFoundPathError(error)) throw error;
|
|
6147
|
-
const linkTarget =
|
|
6147
|
+
const linkTarget = syncFs.readlinkSync(symlinkPath);
|
|
6148
6148
|
return resolvePathViaExistingAncestorSync(path.resolve(path.dirname(symlinkPath), linkTarget));
|
|
6149
6149
|
}
|
|
6150
6150
|
}
|
|
@@ -6170,7 +6170,7 @@ function sameFileIdentity(left, right) {
|
|
|
6170
6170
|
return sameFileIdentity$1(left, right);
|
|
6171
6171
|
}
|
|
6172
6172
|
function openVerifiedFileSync(params) {
|
|
6173
|
-
const ioFs = params.ioFs ??
|
|
6173
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
6174
6174
|
const openReadFlags = ioFs.constants.O_RDONLY | (typeof ioFs.constants.O_NOFOLLOW === "number" ? ioFs.constants.O_NOFOLLOW : 0);
|
|
6175
6175
|
let fd = null;
|
|
6176
6176
|
try {
|
|
@@ -6242,7 +6242,7 @@ function canUseBoundaryFileOpen(ioFs) {
|
|
|
6242
6242
|
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;
|
|
6243
6243
|
}
|
|
6244
6244
|
function openBoundaryFileSync(params) {
|
|
6245
|
-
const ioFs = params.ioFs ??
|
|
6245
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
6246
6246
|
const absolutePath = path.resolve(params.absolutePath);
|
|
6247
6247
|
let resolvedPath;
|
|
6248
6248
|
let rootRealPath;
|
|
@@ -6441,7 +6441,7 @@ function normalizeChannelConfigs(value) {
|
|
|
6441
6441
|
function resolvePluginManifestPath(rootDir) {
|
|
6442
6442
|
for (const filename of PLUGIN_MANIFEST_FILENAMES) {
|
|
6443
6443
|
const candidate = path.join(rootDir, filename);
|
|
6444
|
-
if (
|
|
6444
|
+
if (syncFs.existsSync(candidate)) return candidate;
|
|
6445
6445
|
}
|
|
6446
6446
|
return path.join(rootDir, PLUGIN_MANIFEST_FILENAME);
|
|
6447
6447
|
}
|
|
@@ -6466,7 +6466,7 @@ function loadPluginManifest(rootDir) {
|
|
|
6466
6466
|
}
|
|
6467
6467
|
let raw;
|
|
6468
6468
|
try {
|
|
6469
|
-
raw = JSON5.parse(
|
|
6469
|
+
raw = JSON5.parse(syncFs.readFileSync(opened.fd, "utf-8"));
|
|
6470
6470
|
} catch (err) {
|
|
6471
6471
|
return {
|
|
6472
6472
|
ok: false,
|
|
@@ -6474,7 +6474,7 @@ function loadPluginManifest(rootDir) {
|
|
|
6474
6474
|
manifestPath
|
|
6475
6475
|
};
|
|
6476
6476
|
} finally {
|
|
6477
|
-
|
|
6477
|
+
syncFs.closeSync(opened.fd);
|
|
6478
6478
|
}
|
|
6479
6479
|
if (!isRecord$4(raw)) return {
|
|
6480
6480
|
ok: false,
|
|
@@ -10782,7 +10782,7 @@ async function readPackageName(dir) {
|
|
|
10782
10782
|
}
|
|
10783
10783
|
function readPackageNameSync(dir) {
|
|
10784
10784
|
try {
|
|
10785
|
-
const raw =
|
|
10785
|
+
const raw = syncFs.readFileSync(path.join(dir, "package.json"), "utf-8");
|
|
10786
10786
|
const parsed = JSON.parse(raw);
|
|
10787
10787
|
return typeof parsed.name === "string" ? parsed.name : null;
|
|
10788
10788
|
} catch {
|
|
@@ -10816,7 +10816,7 @@ function candidateDirsFromArgv1(argv1) {
|
|
|
10816
10816
|
const normalized = path.resolve(argv1);
|
|
10817
10817
|
const candidates = [path.dirname(normalized)];
|
|
10818
10818
|
try {
|
|
10819
|
-
const resolved =
|
|
10819
|
+
const resolved = syncFs.realpathSync(normalized);
|
|
10820
10820
|
if (resolved !== normalized) candidates.push(path.dirname(resolved));
|
|
10821
10821
|
} catch {}
|
|
10822
10822
|
const parts = normalized.split(path.sep);
|
|
@@ -10854,11 +10854,11 @@ function buildCandidates(opts) {
|
|
|
10854
10854
|
//#region src/plugins/bundled-dir.ts
|
|
10855
10855
|
function looksLikeBundledPluginsDir(dir) {
|
|
10856
10856
|
try {
|
|
10857
|
-
const entries =
|
|
10857
|
+
const entries = syncFs.readdirSync(dir, { withFileTypes: true });
|
|
10858
10858
|
for (const entry of entries) {
|
|
10859
10859
|
if (!entry.isDirectory()) continue;
|
|
10860
10860
|
const pluginRoot = path.join(dir, entry.name);
|
|
10861
|
-
if (
|
|
10861
|
+
if (syncFs.existsSync(path.join(pluginRoot, "fased.plugin.json"))) return true;
|
|
10862
10862
|
}
|
|
10863
10863
|
} catch {
|
|
10864
10864
|
return false;
|
|
@@ -10904,7 +10904,7 @@ function safeRealpathSync$1(targetPath, cache) {
|
|
|
10904
10904
|
const cached = cache?.get(targetPath);
|
|
10905
10905
|
if (cached) return cached;
|
|
10906
10906
|
try {
|
|
10907
|
-
const resolved =
|
|
10907
|
+
const resolved = syncFs.realpathSync(targetPath);
|
|
10908
10908
|
cache?.set(targetPath, resolved);
|
|
10909
10909
|
return resolved;
|
|
10910
10910
|
} catch {
|
|
@@ -10913,7 +10913,7 @@ function safeRealpathSync$1(targetPath, cache) {
|
|
|
10913
10913
|
}
|
|
10914
10914
|
function safeStatSync(targetPath) {
|
|
10915
10915
|
try {
|
|
10916
|
-
return
|
|
10916
|
+
return syncFs.statSync(targetPath);
|
|
10917
10917
|
} catch {
|
|
10918
10918
|
return null;
|
|
10919
10919
|
}
|
|
@@ -11041,12 +11041,12 @@ function readPackageManifest(dir) {
|
|
|
11041
11041
|
});
|
|
11042
11042
|
if (!opened.ok) return null;
|
|
11043
11043
|
try {
|
|
11044
|
-
const raw =
|
|
11044
|
+
const raw = syncFs.readFileSync(opened.fd, "utf-8");
|
|
11045
11045
|
return JSON.parse(raw);
|
|
11046
11046
|
} catch {
|
|
11047
11047
|
return null;
|
|
11048
11048
|
} finally {
|
|
11049
|
-
|
|
11049
|
+
syncFs.closeSync(opened.fd);
|
|
11050
11050
|
}
|
|
11051
11051
|
}
|
|
11052
11052
|
function normalizePackageEntry(entry) {
|
|
@@ -11072,7 +11072,7 @@ function inferLegacyPluginManifestExtensions(manifest, packageDir) {
|
|
|
11072
11072
|
seen.add(normalized);
|
|
11073
11073
|
const resolved = path.resolve(packageDir, normalized);
|
|
11074
11074
|
if (!isPathInside(packageDir, resolved)) continue;
|
|
11075
|
-
if (
|
|
11075
|
+
if (syncFs.existsSync(resolved) && isExtensionFile(resolved)) entries.push(normalized);
|
|
11076
11076
|
}
|
|
11077
11077
|
return entries;
|
|
11078
11078
|
}
|
|
@@ -11130,14 +11130,14 @@ function resolvePackageEntrySource(params) {
|
|
|
11130
11130
|
return null;
|
|
11131
11131
|
}
|
|
11132
11132
|
const safeSource = opened.path;
|
|
11133
|
-
|
|
11133
|
+
syncFs.closeSync(opened.fd);
|
|
11134
11134
|
return safeSource;
|
|
11135
11135
|
}
|
|
11136
11136
|
function discoverInDirectory(params) {
|
|
11137
|
-
if (!
|
|
11137
|
+
if (!syncFs.existsSync(params.dir)) return;
|
|
11138
11138
|
let entries = [];
|
|
11139
11139
|
try {
|
|
11140
|
-
entries =
|
|
11140
|
+
entries = syncFs.readdirSync(params.dir, { withFileTypes: true });
|
|
11141
11141
|
} catch (err) {
|
|
11142
11142
|
params.diagnostics.push({
|
|
11143
11143
|
level: "warn",
|
|
@@ -11200,7 +11200,7 @@ function discoverInDirectory(params) {
|
|
|
11200
11200
|
"index.js",
|
|
11201
11201
|
"index.mjs",
|
|
11202
11202
|
"index.cjs"
|
|
11203
|
-
].map((candidate) => path.join(fullPath, candidate)).find((candidate) =>
|
|
11203
|
+
].map((candidate) => path.join(fullPath, candidate)).find((candidate) => syncFs.existsSync(candidate));
|
|
11204
11204
|
if (indexFile && isExtensionFile(indexFile)) addCandidate({
|
|
11205
11205
|
candidates: params.candidates,
|
|
11206
11206
|
diagnostics: params.diagnostics,
|
|
@@ -11218,7 +11218,7 @@ function discoverInDirectory(params) {
|
|
|
11218
11218
|
}
|
|
11219
11219
|
function discoverFromPath(params) {
|
|
11220
11220
|
const resolved = resolveUserPath(params.rawPath);
|
|
11221
|
-
if (!
|
|
11221
|
+
if (!syncFs.existsSync(resolved)) {
|
|
11222
11222
|
params.diagnostics.push({
|
|
11223
11223
|
level: "error",
|
|
11224
11224
|
message: `plugin path not found: ${resolved}`,
|
|
@@ -11226,7 +11226,7 @@ function discoverFromPath(params) {
|
|
|
11226
11226
|
});
|
|
11227
11227
|
return;
|
|
11228
11228
|
}
|
|
11229
|
-
const stat =
|
|
11229
|
+
const stat = syncFs.statSync(resolved);
|
|
11230
11230
|
if (stat.isFile()) {
|
|
11231
11231
|
if (!isExtensionFile(resolved)) {
|
|
11232
11232
|
params.diagnostics.push({
|
|
@@ -11286,7 +11286,7 @@ function discoverFromPath(params) {
|
|
|
11286
11286
|
"index.js",
|
|
11287
11287
|
"index.mjs",
|
|
11288
11288
|
"index.cjs"
|
|
11289
|
-
].map((candidate) => path.join(resolved, candidate)).find((candidate) =>
|
|
11289
|
+
].map((candidate) => path.join(resolved, candidate)).find((candidate) => syncFs.existsSync(candidate));
|
|
11290
11290
|
if (indexFile && isExtensionFile(indexFile)) {
|
|
11291
11291
|
addCandidate({
|
|
11292
11292
|
candidates: params.candidates,
|
|
@@ -11471,7 +11471,7 @@ function buildCacheKey(params) {
|
|
|
11471
11471
|
}
|
|
11472
11472
|
function safeStatMtimeMs(filePath) {
|
|
11473
11473
|
try {
|
|
11474
|
-
return
|
|
11474
|
+
return syncFs.statSync(filePath).mtimeMs;
|
|
11475
11475
|
} catch {
|
|
11476
11476
|
return null;
|
|
11477
11477
|
}
|
|
@@ -11741,7 +11741,7 @@ function resolveProviderIdForAuth(provider, params) {
|
|
|
11741
11741
|
function isZombieProcess(pid) {
|
|
11742
11742
|
if (process.platform !== "linux") return false;
|
|
11743
11743
|
try {
|
|
11744
|
-
return
|
|
11744
|
+
return syncFs.readFileSync(`/proc/${pid}/status`, "utf8").match(/^State:\s+(\S)/m)?.[1] === "Z";
|
|
11745
11745
|
} catch {
|
|
11746
11746
|
return false;
|
|
11747
11747
|
}
|
|
@@ -11981,7 +11981,7 @@ function resolveAuthStorePathForDisplay(agentDir) {
|
|
|
11981
11981
|
return pathname.startsWith("~") ? pathname : resolveUserPath(pathname);
|
|
11982
11982
|
}
|
|
11983
11983
|
function ensureAuthStoreFile(pathname) {
|
|
11984
|
-
if (
|
|
11984
|
+
if (syncFs.existsSync(pathname)) return;
|
|
11985
11985
|
saveJsonFile(pathname, {
|
|
11986
11986
|
version: AUTH_STORE_VERSION,
|
|
11987
11987
|
profiles: {}
|
|
@@ -12243,7 +12243,7 @@ function loadAuthProfileStoreForAgent(agentDir, options) {
|
|
|
12243
12243
|
if (shouldWrite && legacy !== null) {
|
|
12244
12244
|
const legacyPath = resolveLegacyAuthStorePath(agentDir);
|
|
12245
12245
|
try {
|
|
12246
|
-
|
|
12246
|
+
syncFs.unlinkSync(legacyPath);
|
|
12247
12247
|
} catch (err) {
|
|
12248
12248
|
if (err?.code !== "ENOENT") log$10.warn("failed to delete legacy auth.json after migration", {
|
|
12249
12249
|
err,
|
|
@@ -18743,7 +18743,7 @@ function resolveActiveTalkProviderConfig(talk) {
|
|
|
18743
18743
|
};
|
|
18744
18744
|
}
|
|
18745
18745
|
function readTalkApiKeyFromProfile(deps = {}) {
|
|
18746
|
-
const fsImpl = deps.fs ??
|
|
18746
|
+
const fsImpl = deps.fs ?? syncFs;
|
|
18747
18747
|
const osImpl = deps.os ?? os;
|
|
18748
18748
|
const pathImpl = deps.path ?? path;
|
|
18749
18749
|
const home = osImpl.homedir();
|
|
@@ -19471,7 +19471,7 @@ var IncludeProcessor = class IncludeProcessor {
|
|
|
19471
19471
|
const normalized = path.normalize(resolved);
|
|
19472
19472
|
if (!isPathInside$1(this.rootDir, normalized)) throw new ConfigIncludeError(`Include path escapes config directory: ${includePath} (root: ${this.rootDir})`, includePath);
|
|
19473
19473
|
try {
|
|
19474
|
-
const real =
|
|
19474
|
+
const real = syncFs.realpathSync(normalized);
|
|
19475
19475
|
if (!isPathInside$1(this.rootRealDir, real)) throw new ConfigIncludeError(`Include path resolves outside config directory (symlink): ${includePath} (root: ${this.rootDir})`, includePath);
|
|
19476
19476
|
} catch (err) {
|
|
19477
19477
|
if (err instanceof ConfigIncludeError) throw err;
|
|
@@ -19513,13 +19513,13 @@ var IncludeProcessor = class IncludeProcessor {
|
|
|
19513
19513
|
};
|
|
19514
19514
|
function safeRealpath(target) {
|
|
19515
19515
|
try {
|
|
19516
|
-
return
|
|
19516
|
+
return syncFs.realpathSync(target);
|
|
19517
19517
|
} catch {
|
|
19518
19518
|
return target;
|
|
19519
19519
|
}
|
|
19520
19520
|
}
|
|
19521
19521
|
function readConfigIncludeFileWithGuards(params) {
|
|
19522
|
-
const ioFs = params.ioFs ??
|
|
19522
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
19523
19523
|
const maxBytes = params.maxBytes ?? MAX_INCLUDE_FILE_BYTES;
|
|
19524
19524
|
if (!canUseBoundaryFileOpen(ioFs)) return ioFs.readFileSync(params.resolvedPath, "utf-8");
|
|
19525
19525
|
const opened = openBoundaryFileSync({
|
|
@@ -19542,7 +19542,7 @@ function readConfigIncludeFileWithGuards(params) {
|
|
|
19542
19542
|
}
|
|
19543
19543
|
}
|
|
19544
19544
|
const defaultResolver = {
|
|
19545
|
-
readFile: (p) =>
|
|
19545
|
+
readFile: (p) => syncFs.readFileSync(p, "utf-8"),
|
|
19546
19546
|
readFileWithGuards: ({ includePath, resolvedPath, rootRealDir }) => readConfigIncludeFileWithGuards({
|
|
19547
19547
|
includePath,
|
|
19548
19548
|
resolvedPath,
|
|
@@ -21583,8 +21583,8 @@ const DEFAULT_SAFE_BINS = [
|
|
|
21583
21583
|
];
|
|
21584
21584
|
function isExecutableFile(filePath) {
|
|
21585
21585
|
try {
|
|
21586
|
-
if (!
|
|
21587
|
-
if (process.platform !== "win32")
|
|
21586
|
+
if (!syncFs.statSync(filePath).isFile()) return false;
|
|
21587
|
+
if (process.platform !== "win32") syncFs.accessSync(filePath, syncFs.constants.X_OK);
|
|
21588
21588
|
return true;
|
|
21589
21589
|
} catch {
|
|
21590
21590
|
return false;
|
|
@@ -21628,7 +21628,7 @@ function normalizeMatchTarget(value) {
|
|
|
21628
21628
|
}
|
|
21629
21629
|
function tryRealpath(value) {
|
|
21630
21630
|
try {
|
|
21631
|
-
return
|
|
21631
|
+
return syncFs.realpathSync(value);
|
|
21632
21632
|
} catch {
|
|
21633
21633
|
return null;
|
|
21634
21634
|
}
|
|
@@ -22509,7 +22509,7 @@ function listWritableExplicitTrustedSafeBinDirs(entries) {
|
|
|
22509
22509
|
for (const dir of resolved) {
|
|
22510
22510
|
let stat;
|
|
22511
22511
|
try {
|
|
22512
|
-
stat =
|
|
22512
|
+
stat = syncFs.statSync(dir);
|
|
22513
22513
|
} catch {
|
|
22514
22514
|
continue;
|
|
22515
22515
|
}
|
|
@@ -27813,7 +27813,7 @@ function resolveConfigPathForDeps(deps) {
|
|
|
27813
27813
|
}
|
|
27814
27814
|
function normalizeDeps(overrides = {}) {
|
|
27815
27815
|
return {
|
|
27816
|
-
fs: overrides.fs ??
|
|
27816
|
+
fs: overrides.fs ?? syncFs,
|
|
27817
27817
|
json5: overrides.json5 ?? JSON5,
|
|
27818
27818
|
env: overrides.env ?? process.env,
|
|
27819
27819
|
homedir: overrides.homedir ?? (() => resolveRequiredHomeDir(overrides.env ?? process.env, os.homedir)),
|
|
@@ -28531,7 +28531,7 @@ function resolveStructuralSessionFallbackPath(candidateAbsPath, expectedAgentId)
|
|
|
28531
28531
|
}
|
|
28532
28532
|
function safeRealpathSync(filePath) {
|
|
28533
28533
|
try {
|
|
28534
|
-
return
|
|
28534
|
+
return syncFs.realpathSync(filePath);
|
|
28535
28535
|
} catch {
|
|
28536
28536
|
return;
|
|
28537
28537
|
}
|
|
@@ -28869,7 +28869,7 @@ function releaseAllLocksSync() {
|
|
|
28869
28869
|
if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
|
|
28870
28870
|
} catch {}
|
|
28871
28871
|
try {
|
|
28872
|
-
|
|
28872
|
+
syncFs.rmSync(held.lockPath, { force: true });
|
|
28873
28873
|
} catch {}
|
|
28874
28874
|
HELD_LOCKS.delete(sessionFile);
|
|
28875
28875
|
}
|
|
@@ -29288,14 +29288,14 @@ function resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, a
|
|
|
29288
29288
|
function canonicalizePathForComparison$1(filePath) {
|
|
29289
29289
|
const resolved = path.resolve(filePath);
|
|
29290
29290
|
try {
|
|
29291
|
-
return
|
|
29291
|
+
return syncFs.realpathSync(resolved);
|
|
29292
29292
|
} catch {
|
|
29293
29293
|
return resolved;
|
|
29294
29294
|
}
|
|
29295
29295
|
}
|
|
29296
29296
|
function archiveFileOnDisk(filePath, reason) {
|
|
29297
29297
|
const archived = `${filePath}.${reason}.${formatSessionArchiveTimestamp()}`;
|
|
29298
|
-
|
|
29298
|
+
syncFs.renameSync(filePath, archived);
|
|
29299
29299
|
return archived;
|
|
29300
29300
|
}
|
|
29301
29301
|
/**
|
|
@@ -29311,7 +29311,7 @@ function archiveSessionTranscripts(opts) {
|
|
|
29311
29311
|
const relative = path.relative(storeDir, candidatePath);
|
|
29312
29312
|
if (!relative || relative.startsWith("..") || path.isAbsolute(relative)) continue;
|
|
29313
29313
|
}
|
|
29314
|
-
if (!
|
|
29314
|
+
if (!syncFs.existsSync(candidatePath)) continue;
|
|
29315
29315
|
try {
|
|
29316
29316
|
archived.push(archiveFileOnDisk(candidatePath, opts.reason));
|
|
29317
29317
|
} catch {}
|
|
@@ -29329,15 +29329,15 @@ async function cleanupArchivedSessionTranscripts(opts) {
|
|
|
29329
29329
|
let removed = 0;
|
|
29330
29330
|
let scanned = 0;
|
|
29331
29331
|
for (const dir of directories) {
|
|
29332
|
-
const entries = await
|
|
29332
|
+
const entries = await syncFs.promises.readdir(dir).catch(() => []);
|
|
29333
29333
|
for (const entry of entries) {
|
|
29334
29334
|
const timestamp = parseSessionArchiveTimestamp(entry, reason);
|
|
29335
29335
|
if (timestamp == null) continue;
|
|
29336
29336
|
scanned += 1;
|
|
29337
29337
|
if (now - timestamp <= opts.olderThanMs) continue;
|
|
29338
29338
|
const fullPath = path.join(dir, entry);
|
|
29339
|
-
if (!(await
|
|
29340
|
-
await
|
|
29339
|
+
if (!(await syncFs.promises.stat(fullPath).catch(() => null))?.isFile()) continue;
|
|
29340
|
+
await syncFs.promises.rm(fullPath).catch(() => void 0);
|
|
29341
29341
|
removed += 1;
|
|
29342
29342
|
}
|
|
29343
29343
|
}
|
|
@@ -29372,14 +29372,14 @@ function capArrayByJsonBytes(items, maxBytes) {
|
|
|
29372
29372
|
}
|
|
29373
29373
|
const MAX_LINES_TO_SCAN = 10;
|
|
29374
29374
|
function readSessionTitleFieldsFromTranscript(sessionId, storePath, sessionFile, agentId, opts) {
|
|
29375
|
-
const filePath = resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, agentId).find((p) =>
|
|
29375
|
+
const filePath = resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, agentId).find((p) => syncFs.existsSync(p));
|
|
29376
29376
|
if (!filePath) return {
|
|
29377
29377
|
firstUserMessage: null,
|
|
29378
29378
|
lastMessagePreview: null
|
|
29379
29379
|
};
|
|
29380
29380
|
let stat;
|
|
29381
29381
|
try {
|
|
29382
|
-
stat =
|
|
29382
|
+
stat = syncFs.statSync(filePath);
|
|
29383
29383
|
} catch {
|
|
29384
29384
|
return {
|
|
29385
29385
|
firstUserMessage: null,
|
|
@@ -29399,7 +29399,7 @@ function readSessionTitleFieldsFromTranscript(sessionId, storePath, sessionFile,
|
|
|
29399
29399
|
}
|
|
29400
29400
|
let fd = null;
|
|
29401
29401
|
try {
|
|
29402
|
-
fd =
|
|
29402
|
+
fd = syncFs.openSync(filePath, "r");
|
|
29403
29403
|
const size = stat.size;
|
|
29404
29404
|
let firstUserMessage = null;
|
|
29405
29405
|
try {
|
|
@@ -29426,7 +29426,7 @@ function readSessionTitleFieldsFromTranscript(sessionId, storePath, sessionFile,
|
|
|
29426
29426
|
};
|
|
29427
29427
|
} finally {
|
|
29428
29428
|
if (fd !== null) try {
|
|
29429
|
-
|
|
29429
|
+
syncFs.closeSync(fd);
|
|
29430
29430
|
} catch {}
|
|
29431
29431
|
}
|
|
29432
29432
|
}
|
|
@@ -29444,7 +29444,7 @@ function extractTextFromContent(content) {
|
|
|
29444
29444
|
}
|
|
29445
29445
|
function readTranscriptHeadChunk(fd, maxBytes = 8192) {
|
|
29446
29446
|
const buf = Buffer.alloc(maxBytes);
|
|
29447
|
-
const bytesRead =
|
|
29447
|
+
const bytesRead = syncFs.readSync(fd, buf, 0, buf.length, 0);
|
|
29448
29448
|
if (bytesRead <= 0) return null;
|
|
29449
29449
|
return buf.toString("utf-8", 0, bytesRead);
|
|
29450
29450
|
}
|
|
@@ -29468,7 +29468,7 @@ function readLastMessagePreviewFromOpenTranscript(params) {
|
|
|
29468
29468
|
const readStart = Math.max(0, params.size - LAST_MSG_MAX_BYTES);
|
|
29469
29469
|
const readLen = Math.min(params.size, LAST_MSG_MAX_BYTES);
|
|
29470
29470
|
const buf = Buffer.alloc(readLen);
|
|
29471
|
-
|
|
29471
|
+
syncFs.readSync(params.fd, buf, 0, readLen, readStart);
|
|
29472
29472
|
const tailLines = buf.toString("utf-8").split(/\r?\n/).filter((l) => l.trim()).slice(-LAST_MSG_MAX_LINES);
|
|
29473
29473
|
for (let i = tailLines.length - 1; i >= 0; i--) {
|
|
29474
29474
|
const line = tailLines[i];
|
|
@@ -29584,7 +29584,7 @@ function isCacheEnabled(ttlMs) {
|
|
|
29584
29584
|
}
|
|
29585
29585
|
function getFileMtimeMs(filePath) {
|
|
29586
29586
|
try {
|
|
29587
|
-
return
|
|
29587
|
+
return syncFs.statSync(filePath).mtimeMs;
|
|
29588
29588
|
} catch {
|
|
29589
29589
|
return;
|
|
29590
29590
|
}
|
|
@@ -29599,7 +29599,7 @@ const NOOP_LOGGER = {
|
|
|
29599
29599
|
function canonicalizePathForComparison(filePath) {
|
|
29600
29600
|
const resolved = path.resolve(filePath);
|
|
29601
29601
|
try {
|
|
29602
|
-
return
|
|
29602
|
+
return syncFs.realpathSync(resolved);
|
|
29603
29603
|
} catch {
|
|
29604
29604
|
return resolved;
|
|
29605
29605
|
}
|
|
@@ -29657,12 +29657,12 @@ function resolveReferencedSessionTranscriptPaths(params) {
|
|
|
29657
29657
|
return referenced;
|
|
29658
29658
|
}
|
|
29659
29659
|
async function readSessionsDirFiles(sessionsDir) {
|
|
29660
|
-
const dirEntries = await
|
|
29660
|
+
const dirEntries = await syncFs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
29661
29661
|
const files = [];
|
|
29662
29662
|
for (const dirent of dirEntries) {
|
|
29663
29663
|
if (!dirent.isFile()) continue;
|
|
29664
29664
|
const filePath = path.join(sessionsDir, dirent.name);
|
|
29665
|
-
const stat = await
|
|
29665
|
+
const stat = await syncFs.promises.stat(filePath).catch(() => null);
|
|
29666
29666
|
if (!stat?.isFile()) continue;
|
|
29667
29667
|
files.push({
|
|
29668
29668
|
path: filePath,
|
|
@@ -29675,9 +29675,9 @@ async function readSessionsDirFiles(sessionsDir) {
|
|
|
29675
29675
|
return files;
|
|
29676
29676
|
}
|
|
29677
29677
|
async function removeFileIfExists(filePath) {
|
|
29678
|
-
const stat = await
|
|
29678
|
+
const stat = await syncFs.promises.stat(filePath).catch(() => null);
|
|
29679
29679
|
if (!stat?.isFile()) return 0;
|
|
29680
|
-
await
|
|
29680
|
+
await syncFs.promises.rm(filePath, { force: true }).catch(() => void 0);
|
|
29681
29681
|
return stat.size;
|
|
29682
29682
|
}
|
|
29683
29683
|
async function removeFileForBudget(params) {
|
|
@@ -29951,7 +29951,7 @@ function loadSessionStore(storePath, opts = {}) {
|
|
|
29951
29951
|
const maxReadAttempts = process.platform === "win32" ? 3 : 1;
|
|
29952
29952
|
const retryBuf = maxReadAttempts > 1 ? new Int32Array(new SharedArrayBuffer(4)) : void 0;
|
|
29953
29953
|
for (let attempt = 0; attempt < maxReadAttempts; attempt++) try {
|
|
29954
|
-
const raw =
|
|
29954
|
+
const raw = syncFs.readFileSync(storePath, "utf-8");
|
|
29955
29955
|
if (raw.length === 0 && attempt < maxReadAttempts - 1) {
|
|
29956
29956
|
Atomics.wait(retryBuf, 0, 0, 50);
|
|
29957
29957
|
continue;
|
|
@@ -30154,7 +30154,7 @@ function capEntryCount(store, overrideMax, opts = {}) {
|
|
|
30154
30154
|
}
|
|
30155
30155
|
async function getSessionFileSize(storePath) {
|
|
30156
30156
|
try {
|
|
30157
|
-
return (await
|
|
30157
|
+
return (await syncFs.promises.stat(storePath)).size;
|
|
30158
30158
|
} catch {
|
|
30159
30159
|
return null;
|
|
30160
30160
|
}
|
|
@@ -30171,7 +30171,7 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
30171
30171
|
if (fileSize <= maxBytes) return false;
|
|
30172
30172
|
const backupPath = `${storePath}.bak.${Date.now()}`;
|
|
30173
30173
|
try {
|
|
30174
|
-
await
|
|
30174
|
+
await syncFs.promises.rename(storePath, backupPath);
|
|
30175
30175
|
log$2.info("rotated session store file", {
|
|
30176
30176
|
backupPath: path.basename(backupPath),
|
|
30177
30177
|
sizeBytes: fileSize
|
|
@@ -30182,11 +30182,11 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
30182
30182
|
try {
|
|
30183
30183
|
const dir = path.dirname(storePath);
|
|
30184
30184
|
const baseName = path.basename(storePath);
|
|
30185
|
-
const backups = (await
|
|
30185
|
+
const backups = (await syncFs.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
|
|
30186
30186
|
const maxBackups = 3;
|
|
30187
30187
|
if (backups.length > maxBackups) {
|
|
30188
30188
|
const toDelete = backups.slice(maxBackups);
|
|
30189
|
-
for (const old of toDelete) await
|
|
30189
|
+
for (const old of toDelete) await syncFs.promises.unlink(path.join(dir, old)).catch(() => void 0);
|
|
30190
30190
|
log$2.info("cleaned up old session store backups", { deleted: toDelete.length });
|
|
30191
30191
|
}
|
|
30192
30192
|
} catch {}
|
|
@@ -30291,14 +30291,14 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
30291
30291
|
});
|
|
30292
30292
|
}
|
|
30293
30293
|
}
|
|
30294
|
-
await
|
|
30294
|
+
await syncFs.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
30295
30295
|
const json = JSON.stringify(store, null, 2);
|
|
30296
30296
|
if (process.platform === "win32") {
|
|
30297
30297
|
const tmp = `${storePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
30298
30298
|
try {
|
|
30299
|
-
await
|
|
30299
|
+
await syncFs.promises.writeFile(tmp, json, "utf-8");
|
|
30300
30300
|
for (let i = 0; i < 5; i++) try {
|
|
30301
|
-
await
|
|
30301
|
+
await syncFs.promises.rename(tmp, storePath);
|
|
30302
30302
|
break;
|
|
30303
30303
|
} catch {
|
|
30304
30304
|
if (i < 4) await new Promise((r) => setTimeout(r, 50 * (i + 1)));
|
|
@@ -30308,27 +30308,27 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
30308
30308
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") return;
|
|
30309
30309
|
throw err;
|
|
30310
30310
|
} finally {
|
|
30311
|
-
await
|
|
30311
|
+
await syncFs.promises.rm(tmp, { force: true }).catch(() => void 0);
|
|
30312
30312
|
}
|
|
30313
30313
|
return;
|
|
30314
30314
|
}
|
|
30315
30315
|
const tmp = `${storePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
30316
30316
|
try {
|
|
30317
|
-
await
|
|
30317
|
+
await syncFs.promises.writeFile(tmp, json, {
|
|
30318
30318
|
mode: 384,
|
|
30319
30319
|
encoding: "utf-8"
|
|
30320
30320
|
});
|
|
30321
|
-
await
|
|
30322
|
-
await
|
|
30321
|
+
await syncFs.promises.rename(tmp, storePath);
|
|
30322
|
+
await syncFs.promises.chmod(storePath, 384);
|
|
30323
30323
|
} catch (err) {
|
|
30324
30324
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") {
|
|
30325
30325
|
try {
|
|
30326
|
-
await
|
|
30327
|
-
await
|
|
30326
|
+
await syncFs.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
30327
|
+
await syncFs.promises.writeFile(storePath, json, {
|
|
30328
30328
|
mode: 384,
|
|
30329
30329
|
encoding: "utf-8"
|
|
30330
30330
|
});
|
|
30331
|
-
await
|
|
30331
|
+
await syncFs.promises.chmod(storePath, 384);
|
|
30332
30332
|
} catch (err2) {
|
|
30333
30333
|
if ((err2 && typeof err2 === "object" && "code" in err2 ? String(err2.code) : null) === "ENOENT") return;
|
|
30334
30334
|
throw err2;
|
|
@@ -30337,7 +30337,7 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
30337
30337
|
}
|
|
30338
30338
|
throw err;
|
|
30339
30339
|
} finally {
|
|
30340
|
-
await
|
|
30340
|
+
await syncFs.promises.rm(tmp, { force: true });
|
|
30341
30341
|
}
|
|
30342
30342
|
}
|
|
30343
30343
|
async function saveSessionStore(storePath, store, opts) {
|
|
@@ -30681,8 +30681,8 @@ async function resolveSessionTranscriptFile(params) {
|
|
|
30681
30681
|
});
|
|
30682
30682
|
}
|
|
30683
30683
|
async function ensureSessionHeader(params) {
|
|
30684
|
-
if (
|
|
30685
|
-
await
|
|
30684
|
+
if (syncFs.existsSync(params.sessionFile)) return;
|
|
30685
|
+
await syncFs.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
|
|
30686
30686
|
const header = {
|
|
30687
30687
|
type: "session",
|
|
30688
30688
|
version: CURRENT_SESSION_VERSION,
|
|
@@ -30690,7 +30690,7 @@ async function ensureSessionHeader(params) {
|
|
|
30690
30690
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
30691
30691
|
cwd: process.cwd()
|
|
30692
30692
|
};
|
|
30693
|
-
await
|
|
30693
|
+
await syncFs.promises.writeFile(params.sessionFile, `${JSON.stringify(header)}\n`, {
|
|
30694
30694
|
encoding: "utf-8",
|
|
30695
30695
|
mode: 384
|
|
30696
30696
|
});
|
|
@@ -31091,7 +31091,7 @@ async function loadContextCache() {
|
|
|
31091
31091
|
await ensureFasedModelsJson(cfg);
|
|
31092
31092
|
} catch {}
|
|
31093
31093
|
try {
|
|
31094
|
-
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-runtime-
|
|
31094
|
+
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-runtime-C3EP4IIA.js");
|
|
31095
31095
|
const agentDir = resolveFasedAgentDir();
|
|
31096
31096
|
const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
|
|
31097
31097
|
applyDiscoveredContextWindows({
|
|
@@ -31252,7 +31252,7 @@ function isCombinedSessionStoreCacheFresh(entry) {
|
|
|
31252
31252
|
}
|
|
31253
31253
|
function readSessionStoreSignature(storePath) {
|
|
31254
31254
|
try {
|
|
31255
|
-
const stat =
|
|
31255
|
+
const stat = syncFs.statSync(storePath);
|
|
31256
31256
|
return {
|
|
31257
31257
|
storePath,
|
|
31258
31258
|
exists: true,
|
|
@@ -31334,7 +31334,7 @@ function listExistingAgentIdsFromDisk() {
|
|
|
31334
31334
|
const root = resolveStateDir();
|
|
31335
31335
|
const agentsDir = path.join(root, "agents");
|
|
31336
31336
|
try {
|
|
31337
|
-
return
|
|
31337
|
+
return syncFs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
|
|
31338
31338
|
} catch {
|
|
31339
31339
|
return [];
|
|
31340
31340
|
}
|
|
@@ -32853,14 +32853,14 @@ async function readWorkspaceFileWithGuards(params) {
|
|
|
32853
32853
|
const identity = workspaceFileIdentity(opened.stat, opened.path);
|
|
32854
32854
|
const cached = workspaceFileCache.get(params.filePath);
|
|
32855
32855
|
if (cached && cached.identity === identity) {
|
|
32856
|
-
|
|
32856
|
+
syncFs.closeSync(opened.fd);
|
|
32857
32857
|
return {
|
|
32858
32858
|
ok: true,
|
|
32859
32859
|
content: cached.content
|
|
32860
32860
|
};
|
|
32861
32861
|
}
|
|
32862
32862
|
try {
|
|
32863
|
-
const content =
|
|
32863
|
+
const content = syncFs.readFileSync(opened.fd, "utf-8");
|
|
32864
32864
|
workspaceFileCache.set(params.filePath, {
|
|
32865
32865
|
content,
|
|
32866
32866
|
identity
|
|
@@ -32877,7 +32877,7 @@ async function readWorkspaceFileWithGuards(params) {
|
|
|
32877
32877
|
error
|
|
32878
32878
|
};
|
|
32879
32879
|
} finally {
|
|
32880
|
-
|
|
32880
|
+
syncFs.closeSync(opened.fd);
|
|
32881
32881
|
}
|
|
32882
32882
|
}
|
|
32883
32883
|
function stripFrontMatter(content) {
|