@fased/fased 0.1.10 → 0.1.12

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.
Files changed (249) hide show
  1. package/README.md +7 -5
  2. package/dist/{active-listener-BC05EmaA.js → active-listener-CNrLAfOg.js} +1 -1
  3. package/dist/{agent-scope-DVw8mi_i.js → agent-scope-T2X-I1lP.js} +124 -124
  4. package/dist/{agents-CsxQP5xg.js → agents-Du8P7IN9.js} +8 -8
  5. package/dist/{attachment-normalize-CSxeaVcP.js → attachment-normalize-CXopR3aI.js} +1 -1
  6. package/dist/{attachment-normalize-f9lQXrZo.js → attachment-normalize-aZQqs-5G.js} +1 -1
  7. package/dist/{audio-preflight-DD1zXhwM.js → audio-preflight-BYZ53Lzg.js} +2 -2
  8. package/dist/{audio-preflight-C_g_wQAc.js → audio-preflight-CwheEXYS.js} +31 -31
  9. package/dist/{audio-preflight-CVU3GLti.js → audio-preflight-DWQBQ91D.js} +1 -1
  10. package/dist/{audio-preflight-BeJd4YPQ.js → audio-preflight-Dc1K_vOi.js} +2 -2
  11. package/dist/{audio-preflight-DBtzpOL_.js → audio-preflight-MekUgowQ.js} +1 -1
  12. package/dist/{audit-CDgqnjys.js → audit-Bjpi9xJU.js} +1 -1
  13. package/dist/{audit-BB2lDlNb.js → audit-T0cmU0nW.js} +1 -1
  14. package/dist/{auth-Bfgwy6TQ.js → auth-DPKqQb8Y.js} +5 -5
  15. package/dist/{auth-choice-DlcbJgp_.js → auth-choice-BpV7vqnP.js} +1 -1
  16. package/dist/{auth-choice-prompt-DMlwK9kF.js → auth-choice-prompt-B7PJvTVu.js} +1 -1
  17. package/dist/{auth-choice-prompt-CcOEzXoi.js → auth-choice-prompt-BFm4XkAG.js} +1 -1
  18. package/dist/{auth-choice-DbEAsUsi.js → auth-choice-yoUpVms3.js} +1 -1
  19. package/dist/build-info.json +3 -3
  20. package/dist/bundled/boot-md/handler.js +31 -31
  21. package/dist/bundled/bootstrap-extra-files/handler.js +3 -3
  22. package/dist/bundled/command-logger/handler.js +2 -2
  23. package/dist/bundled/session-memory/handler.js +31 -31
  24. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  25. package/dist/{channel-activity-D2IwnDWk.js → channel-activity-C0DEUhUn.js} +1 -1
  26. package/dist/{channel-web-CMZFjZzU.js → channel-web-BuXn4FNd.js} +1 -1
  27. package/dist/{channel-web-qHKfuCHE.js → channel-web-P7ida1rd.js} +1 -1
  28. package/dist/{channels-BoOF2dAy.js → channels-DUuqHLzY.js} +6 -6
  29. package/dist/{channels-DvT6s1kl.js → channels-DqIpnZo-.js} +6 -6
  30. package/dist/{channels-cli-NoUnbEgC.js → channels-cli-BJZkhaUa.js} +5 -5
  31. package/dist/{channels-cli-CNhEFKbn.js → channels-cli-Czjdq6Zj.js} +5 -5
  32. package/dist/{chunk-BFGwq8HC.js → chunk-Q3WlKwcl.js} +1 -1
  33. package/dist/cli/daemon-cli.js +1 -1
  34. package/dist/{cli-Ctvy4-cz.js → cli-25AS5uBh.js} +2 -2
  35. package/dist/{cli-CE8pVYeA.js → cli-BM7AHeMZ.js} +2 -2
  36. package/dist/{command-registry-fqlYdOTI.js → command-registry-CL3sTZBq.js} +9 -9
  37. package/dist/{commands-registry-C7qLmjBS.js → commands-registry-CwvSkARW.js} +1 -1
  38. package/dist/{completion-cli-CKzB1lB1.js → completion-cli-BeDxB08Q.js} +2 -2
  39. package/dist/{completion-cli-Bd9iPo4A.js → completion-cli-DXT5UV5h.js} +1 -1
  40. package/dist/{config-cli-CQpqSVFS.js → config-cli-0iLJIK_0.js} +1 -1
  41. package/dist/{config-cli-DUNkddbL.js → config-cli-BqKGZgHh.js} +1 -1
  42. package/dist/{config-eval-CG37crOn.js → config-eval-BMGRKCyr.js} +3 -3
  43. package/dist/{configure-B2WT8-lE.js → configure-C4jaHUYt.js} +12 -12
  44. package/dist/{configure-DxDNasaD.js → configure-C6WQjQYZ.js} +12 -12
  45. package/dist/control-ui/assets/app-wpJSg6bV.js.map +1 -1
  46. package/dist/{cron-cli-DYWW7cv1.js → cron-cli-CpAzr8UN.js} +2 -2
  47. package/dist/{cron-cli-D3Dznk0V.js → cron-cli-JKIl7U3h.js} +2 -2
  48. package/dist/{daemon-cli-DDUjmEow.js → daemon-cli-BNds0Hef.js} +1 -1
  49. package/dist/{daemon-cli-DFjCvbUo.js → daemon-cli-DB2nP-oP.js} +1 -1
  50. package/dist/daemon-cli.js +1 -1
  51. package/dist/{deps-4rCQ5SBd.js → deps-CZ5BtLba.js} +1 -1
  52. package/dist/{deps-CBapZnsi.js → deps-CmbKRFX-.js} +1 -1
  53. package/dist/{diagnostic-DWKSfm_q.js → diagnostic-PXNTTbiu.js} +1 -1
  54. package/dist/entry.js +1 -1
  55. package/dist/extensionAPI.js +1 -1
  56. package/dist/{fetch-DyKd0D6V.js → fetch-D6yXePhv.js} +1 -1
  57. package/dist/{fetch-guard-Ztzfiio9.js → fetch-guard-B-XqKRhJ.js} +1 -1
  58. package/dist/{filesystem-manager-9uqWGvqg.js → filesystem-manager-_ccVdKHj.js} +4 -4
  59. package/dist/{fs-safe--dkmYAev.js → fs-safe-CkRcL-Cg.js} +2 -2
  60. package/dist/{gateway-cli-CNCA_gcT.js → gateway-cli-DWdySCrK.js} +27 -27
  61. package/dist/{gateway-cli-BXl9lmch.js → gateway-cli-DZcWa_Tx.js} +27 -27
  62. package/dist/{github-copilot-token-DYrFvncE.js → github-copilot-token-eyrRGmGp.js} +8 -8
  63. package/dist/{health-C_g99tp_.js → health-Cd-khz-9.js} +2 -2
  64. package/dist/{health-DTTfLYjl.js → health-D4RxkHwO.js} +2 -2
  65. package/dist/{heartbeat-runner-D04n14H-.js → heartbeat-runner-Ba95YjHH.js} +1 -1
  66. package/dist/{heartbeat-runner-DXh84Wuy.js → heartbeat-runner-CpK_gAIv.js} +1 -1
  67. package/dist/{hooks-cli-FhVd5CE-.js → hooks-cli-B_dJIUTW.js} +3 -3
  68. package/dist/{hooks-cli-BDpBNlPV.js → hooks-cli-CJD6gu6w.js} +3 -3
  69. package/dist/index.js +7 -7
  70. package/dist/{internal-yBWuTfFC.js → internal-CtV-S2kE.js} +3 -3
  71. package/dist/{ipv4-P47TSJIK.js → ipv4-C3GrgewJ.js} +2 -2
  72. package/dist/{ipv4-Citn8Cno.js → ipv4-mFIX9nv4.js} +2 -2
  73. package/dist/{lifecycle-B4RibYD4.js → lifecycle-C4k_XIAn.js} +1 -1
  74. package/dist/{lifecycle-Bgh3V8Jt.js → lifecycle-OLgxIVgL.js} +1 -1
  75. package/dist/{list.auth-overview-BQzrIpgk.js → list.auth-overview-CaS7O8M6.js} +1 -1
  76. package/dist/{list.auth-overview-fBVXihg0.js → list.auth-overview-DvgE-pEr.js} +1 -1
  77. package/dist/llm-slug-generator.js +31 -31
  78. package/dist/{login-DPlzYTXi.js → login-C4KKxuM4.js} +2 -2
  79. package/dist/{login-qr-c2Drd9vA.js → login-qr-DMxUP87H.js} +3 -3
  80. package/dist/{manager-XJq9ONvb.js → manager-O_PUm8xA.js} +8 -8
  81. package/dist/{markdown-tables-7kI-7mng.js → markdown-tables-QOHpjP76.js} +1 -1
  82. package/dist/{media-D4nEnyX9.js → media-KeWZMCmf.js} +5 -5
  83. package/dist/{memory-search-Z2b0d-jA.js → memory-search-BVlFBMLd.js} +2 -2
  84. package/dist/{model-catalog-B2mRe6cZ.js → model-catalog-CuBQyuRB.js} +9 -9
  85. package/dist/{models-D8MTK6SG.js → models-CcYHBi_r.js} +4 -4
  86. package/dist/{models-cli-CXdCnyks.js → models-cli-BAsSzs36.js} +5 -5
  87. package/dist/{models-cli-Bl8xk6-0.js → models-cli-CwNjNmaD.js} +4 -4
  88. package/dist/{node-cli-DkgKrYS1.js → node-cli-CqENdMLC.js} +2 -2
  89. package/dist/{node-cli-Cqh8buCU.js → node-cli-LfnYXPVk.js} +2 -2
  90. package/dist/{onboard-BD0MOrv7.js → onboard-CjinvB7q.js} +6 -6
  91. package/dist/{onboard-Dz8z4vBi.js → onboard-DiAeyhSY.js} +6 -6
  92. package/dist/{onboard-channels-CPh2EJOi.js → onboard-channels-BOR7r6J2.js} +2 -2
  93. package/dist/{onboard-channels-DUa2qkms.js → onboard-channels-CEv6tCJQ.js} +2 -2
  94. package/dist/{onboard-search-BnHMgV2k.js → onboard-search-B3wBacDO.js} +5 -5
  95. package/dist/{onboard-search-CqiDzWQw.js → onboard-search-DE_DRU35.js} +5 -5
  96. package/dist/{onboarding-BC-5Pv9o.js → onboarding-CYRCJeTz.js} +100 -63
  97. package/dist/{onboarding-DgTB_zq7.js → onboarding-Cy5d82Kg.js} +100 -63
  98. package/dist/{openresponses-http-CcawkBY4.js → openresponses-http-BK_0sg-w.js} +2 -2
  99. package/dist/{openresponses-http-BirGBJTm.js → openresponses-http-CSrODtfo.js} +1 -1
  100. package/dist/{openresponses-http-BsQmM8zM.js → openresponses-http-D9Q0e2D0.js} +1 -1
  101. package/dist/{openresponses-http-BQa9rI-N.js → openresponses-http-Dr_hPplW.js} +31 -31
  102. package/dist/{openresponses-http-BYiaPg-e.js → openresponses-http-DypSiMi3.js} +2 -2
  103. package/dist/{outbound-attachment-BnC5ITTB.js → outbound-attachment-DO7UVxZm.js} +2 -2
  104. package/dist/{outbound-vYt3OL7q.js → outbound-nrqaUQPn.js} +6 -6
  105. package/dist/{parent-default-help-DbMf7NQe.js → parent-default-help-BaTTrhnu.js} +1 -1
  106. package/dist/{parent-default-help-CpfuGajV.js → parent-default-help-Df_c3iTF.js} +1 -1
  107. package/dist/{path-alias-guards-BgsaoH-B.js → path-alias-guards-BVcGMct5.js} +1 -1
  108. package/dist/{paths-0bvQb_LS.js → paths-WauZ9inL.js} +13 -13
  109. package/dist/{pi-embedded-Bapdl5Mb.js → pi-embedded-B6jLpS4e.js} +234 -234
  110. package/dist/{pi-embedded-DlBsi5bC.js → pi-embedded-DEzQtNcl.js} +5 -5
  111. package/dist/{pi-model-discovery-DpUv4v_r.js → pi-model-discovery-B1-QPAbn.js} +7 -7
  112. package/dist/pi-model-discovery-runtime-C3EP4IIA.js +5 -0
  113. package/dist/{plugin-registry-C7oTQytM.js → plugin-registry-BIMCuigY.js} +1 -1
  114. package/dist/{plugin-registry-2aqMgXpl.js → plugin-registry-DCy0l8-h.js} +1 -1
  115. package/dist/plugin-sdk/{audio-preflight-Vg4EuYfg.js → audio-preflight-DXwdBAPl.js} +1 -1
  116. package/dist/plugin-sdk/{audio-preflight-BbjERcpR.js → audio-preflight-K0n0C4E6.js} +1 -1
  117. package/dist/plugin-sdk/channel-plugin-common.js +1 -1
  118. package/dist/plugin-sdk/{channel-web-JBsCrpEe.js → channel-web-D6K8VR5v.js} +1 -1
  119. package/dist/plugin-sdk/command-status.js +1 -1
  120. package/dist/plugin-sdk/index.js +2 -2
  121. package/dist/plugin-sdk/{openresponses-http-dj-a8V7Z.js → openresponses-http-BP3xOe-Y.js} +1 -1
  122. package/dist/plugin-sdk/{openresponses-http-ihpGpya5.js → openresponses-http-BxWGSEv1.js} +1 -1
  123. package/dist/plugin-sdk/{pi-model-discovery-runtime-CddkbYKA.js → pi-model-discovery-runtime-Cv_H-NDs.js} +1 -1
  124. package/dist/plugin-sdk/{registry-BhjWgT6A.js → registry-Dpq_OloZ.js} +8 -8
  125. package/dist/plugin-sdk/{reply-CvmqbVx1.js → reply-Bg7g6Uem.js} +5 -5
  126. package/dist/plugin-sdk/src/brand.d.ts +2 -2
  127. package/dist/plugin-sdk/{status-DsTgMPSP.js → status-DvKbZrfW.js} +5 -5
  128. package/dist/plugin-sdk/{web-DHSHEbWK.js → web-BjxFpY7T.js} +2 -2
  129. package/dist/plugin-sdk/{web-CLXmBst6.js → web-CVUx-6o3.js} +1 -1
  130. package/dist/{plugins-cli-CXa9m7-A.js → plugins-cli-BnfUnqOU.js} +5 -5
  131. package/dist/{plugins-cli-Dj-p00ob.js → plugins-cli-D9zklM0p.js} +5 -5
  132. package/dist/{program-B3cXsVO0.js → program-CqMsm4EB.js} +7 -7
  133. package/dist/{program-context-Di7qiwOM.js → program-context-DPhz8FN3.js} +24 -24
  134. package/dist/{prompt-select-styled-C5o0Ff06.js → prompt-select-styled-BGaZLmeA.js} +4 -4
  135. package/dist/{prompt-select-styled-8KBIPNro.js → prompt-select-styled-D-2EpC11.js} +4 -4
  136. package/dist/{pw-ai-DAn5Q5Mg.js → pw-ai-CM1mw9Kc.js} +5 -5
  137. package/dist/{qmd-manager-BQu_lmJ6.js → qmd-manager--NffQxNh.js} +5 -5
  138. package/dist/{qmd-scope-Bv2HOfhX.js → qmd-scope-BgLcDW_Q.js} +1 -1
  139. package/dist/{query-expansion-LNmYRPvI.js → query-expansion-BW1RomSn.js} +2 -2
  140. package/dist/{register.agent-ll5ykI9x.js → register.agent-C6orfeKi.js} +9 -9
  141. package/dist/{register.agent-BYkIkPHf.js → register.agent-jy-C0MEz.js} +8 -8
  142. package/dist/{register.configure-DubkYh7h.js → register.configure-H9A87IRW.js} +12 -12
  143. package/dist/{register.configure-C0GU1zbA.js → register.configure-R5Gp68OD.js} +12 -12
  144. package/dist/{register.maintenance-Pz6desR4.js → register.maintenance-2VJJezzk.js} +9 -9
  145. package/dist/{register.maintenance-Corgqhj5.js → register.maintenance-CKLT7i2A.js} +8 -8
  146. package/dist/{register.message-COK8wYD_.js → register.message-M8tJ8ZGt.js} +3 -3
  147. package/dist/{register.message-oi2ewJpl.js → register.message-RbpY8_gf.js} +3 -3
  148. package/dist/{register.onboard-C7ysxMn6.js → register.onboard-Cmju7Jau.js} +14 -14
  149. package/dist/{register.onboard-zwRY0Dsh.js → register.onboard-CzuAo1h5.js} +14 -14
  150. package/dist/{register.setup-B1YGF1bz.js → register.setup-BIZLxrJN.js} +14 -14
  151. package/dist/{register.setup-J2tUgD6C.js → register.setup-CcFkJ--V.js} +14 -14
  152. package/dist/{register.status-health-sessions-DmjjMrJZ.js → register.status-health-sessions-BzNqkPbh.js} +6 -6
  153. package/dist/{register.status-health-sessions-DCazjMZa.js → register.status-health-sessions-DP58oA2z.js} +6 -6
  154. package/dist/{register.subclis-Bj8pFyAT.js → register.subclis-CcunjiP0.js} +16 -16
  155. package/dist/{replies-D0__mn7d.js → replies-lgWzXlwM.js} +2 -2
  156. package/dist/{reply-DQfPM5ia.js → reply-BBDR--RC.js} +9 -9
  157. package/dist/{reply-prefix-CteprwTK.js → reply-prefix-BM90m-1s.js} +1 -1
  158. package/dist/{resolve-route-Twc4mQV7.js → resolve-route-DyTOJJs4.js} +1 -1
  159. package/dist/{run-main-Cf6N-U3j.js → run-main-Hm6uygbR.js} +14 -14
  160. package/dist/{runtime-helper-grants-DONSfqWx.js → runtime-helper-grants-BX7MNAiX.js} +1 -1
  161. package/dist/{runtime-helper-grants-DzP6dgWv.js → runtime-helper-grants-DsRzAU91.js} +1 -1
  162. package/dist/{sandbox-cli-DHHAXWD8.js → sandbox-cli-C9LRf1BU.js} +2 -2
  163. package/dist/{sandbox-cli-CqUHfq55.js → sandbox-cli-CphPxb_Y.js} +2 -2
  164. package/dist/{security-cli-DNlCSlQR.js → security-cli-B1T-BpNW.js} +3 -3
  165. package/dist/{security-cli-CAEEYR8C.js → security-cli-DvQyNPyj.js} +3 -3
  166. package/dist/{send-BVmNzYrR.js → send-B8seeqjd.js} +18 -18
  167. package/dist/{send-BG45zdAY.js → send-BPleg3km.js} +5 -5
  168. package/dist/{send-BAtDZt7a.js → send-CAqldeiP.js} +5 -5
  169. package/dist/{send-DD6K3WP6.js → send-D63evlEI.js} +7 -7
  170. package/dist/{send-6RE7ZD_B.js → send-M0lHXvC5.js} +4 -4
  171. package/dist/{server-RYyJ2HTj.js → server-Dce2V0BV.js} +2 -2
  172. package/dist/{server-cron-D7rN6EY6.js → server-cron-DIvtrfmE.js} +2 -2
  173. package/dist/{server-cron-V9GBrg1S.js → server-cron-DYFn5b-C.js} +2 -2
  174. package/dist/{server-B67PKank.js → server-itEHgEB-.js} +2 -2
  175. package/dist/{server-node-events-eh5LuLg6.js → server-node-events-Bw_TYnRI.js} +3 -3
  176. package/dist/{server-node-events-CAG2ic6e.js → server-node-events-Cat4mX6Y.js} +3 -3
  177. package/dist/{session-CHL2ptKy.js → session-Cvg_ryor.js} +5 -5
  178. package/dist/{skill-commands-_zLgADck.js → skill-commands-D_QLBtje.js} +24 -24
  179. package/dist/{status-CTveTSuF.js → status-B-5uZdap.js} +1 -1
  180. package/dist/{status-DIkbKBxH.js → status-B3Mdifey.js} +4 -4
  181. package/dist/{status-BuGyo-1M.js → status-B_i6iCPI.js} +4 -4
  182. package/dist/{status-jb8w0SwX.js → status-DP-ZmLoI.js} +1 -1
  183. package/dist/{tables-Dtfop_e5.js → tables-Cif1OeQ1.js} +1 -1
  184. package/dist/{target-errors-DrHV8jza.js → target-errors-B-8Jf9OT.js} +2 -2
  185. package/dist/{tool-loop-detection-CPr-VVyD.js → tool-loop-detection-6p0-ziTi.js} +2 -2
  186. package/dist/{tui-Dinku0o-.js → tui-Cp1X0KaI.js} +1 -1
  187. package/dist/{tui-lmdDZi6Y.js → tui-DX2hKjKi.js} +1 -1
  188. package/dist/{tui-cli-dq7xafwR.js → tui-cli-DQIeHToU.js} +3 -3
  189. package/dist/{tui-cli-z5WV3SVg.js → tui-cli-ttzW7LkP.js} +3 -3
  190. package/dist/{update-cli-Cq47v0X_.js → update-cli-D5EsEoEh.js} +9 -9
  191. package/dist/{update-cli-BdQ3mRGs.js → update-cli-Dh0CR2-f.js} +10 -10
  192. package/dist/{update-runner-BnRMhKva.js → update-runner-B-O5EFkI.js} +1 -1
  193. package/dist/{update-runner-C0SU1jGT.js → update-runner-Bs5Vqr8x.js} +1 -1
  194. package/dist/{web-B9YrSF5u.js → web-BBv1hZEl.js} +1 -1
  195. package/dist/{web-D9wmjTDC.js → web-C7ARZ3T9.js} +3 -3
  196. package/dist/{web-DaMiLN7K.js → web-CKYCUuIo.js} +1 -1
  197. package/dist/{web-sBExtZCA.js → web-Cp2B8UG5.js} +35 -35
  198. package/dist/{web-BmjUKJI0.js → web-ifDkl2qg.js} +3 -3
  199. package/dist/{web-search-providers.runtime-TGCiBzhv.js → web-search-providers.runtime-B6bTk9-Z.js} +1 -1
  200. package/dist/{web-search-providers.runtime-gM-8LIxg.js → web-search-providers.runtime-tUcnQoHZ.js} +1 -1
  201. package/dist/{whatsapp-actions-C5qguyU5.js → whatsapp-actions-BAux9gs7.js} +12 -12
  202. package/docs/install/index.md +16 -10
  203. package/docs/install/installer.md +18 -9
  204. package/docs/install/node.md +5 -4
  205. package/docs/install/vps.md +7 -3
  206. package/extensions/acpx/package.json +1 -1
  207. package/extensions/bluebubbles/package.json +1 -1
  208. package/extensions/copilot-proxy/package.json +1 -1
  209. package/extensions/diagnostics-otel/package.json +1 -1
  210. package/extensions/discord/package.json +1 -1
  211. package/extensions/fased-federation/package.json +1 -1
  212. package/extensions/feishu/package.json +1 -1
  213. package/extensions/google-gemini-cli-auth/package.json +1 -1
  214. package/extensions/googlechat/package.json +1 -1
  215. package/extensions/imessage/package.json +1 -1
  216. package/extensions/irc/package.json +1 -1
  217. package/extensions/line/package.json +1 -1
  218. package/extensions/llm-task/package.json +1 -1
  219. package/extensions/lobster/package.json +1 -1
  220. package/extensions/matrix/CHANGELOG.md +12 -0
  221. package/extensions/matrix/package.json +1 -1
  222. package/extensions/mattermost/package.json +1 -1
  223. package/extensions/memory-core/package.json +1 -1
  224. package/extensions/memory-lancedb/package.json +1 -1
  225. package/extensions/minimax-portal-auth/package.json +1 -1
  226. package/extensions/msteams/CHANGELOG.md +12 -0
  227. package/extensions/msteams/package.json +1 -1
  228. package/extensions/nextcloud-talk/package.json +1 -1
  229. package/extensions/nostr/CHANGELOG.md +12 -0
  230. package/extensions/nostr/package.json +1 -1
  231. package/extensions/open-prose/package.json +1 -1
  232. package/extensions/sat-mining/package.json +1 -1
  233. package/extensions/signal/package.json +1 -1
  234. package/extensions/slack/package.json +1 -1
  235. package/extensions/synology-chat/package.json +1 -1
  236. package/extensions/telegram/package.json +1 -1
  237. package/extensions/tlon/package.json +1 -1
  238. package/extensions/twitch/CHANGELOG.md +12 -0
  239. package/extensions/twitch/package.json +1 -1
  240. package/extensions/voice-call/CHANGELOG.md +12 -0
  241. package/extensions/voice-call/package.json +1 -1
  242. package/extensions/whatsapp/package.json +1 -1
  243. package/extensions/zalo/CHANGELOG.md +12 -0
  244. package/extensions/zalo/package.json +1 -1
  245. package/extensions/zalouser/CHANGELOG.md +12 -0
  246. package/extensions/zalouser/package.json +1 -1
  247. package/package.json +1 -1
  248. package/scripts/start-managed.sh +53 -12
  249. package/dist/pi-model-discovery-runtime-9_2G9r_K.js +0 -5
@@ -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-DYrFvncE.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-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 fs$1, { constants } from "node:fs";
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 = fs$1.constants.W_OK | fs$1.constants.X_OK;
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 ?? fs$1.accessSync;
170
- const chmodSync = options.chmodSync ?? fs$1.chmodSync;
171
- const lstatSync = options.lstatSync ?? fs$1.lstatSync;
172
- const mkdirSync = options.mkdirSync ?? fs$1.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 (!fs$1.existsSync(configPath)) return;
266
- const raw = fs$1.readFileSync(configPath, "utf-8");
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
- fs$1.mkdirSync(path.dirname(settings.file), { recursive: true });
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 fs$1.statSync(file).size;
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
- fs$1.appendFileSync(file, line, { encoding: "utf8" });
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 = fs$1.readdirSync(dir, { withFileTypes: true });
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 (fs$1.statSync(fullPath).mtimeMs < cutoff) fs$1.rmSync(fullPath, { force: true });
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 fs$1.promises.mkdir(dir, { recursive: true });
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 fs$1.promises.access(targetPath);
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 = fs$1.readFileSync(mappingPath, "utf8");
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 (fs$1.existsSync(newDir)) return newDir;
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 (!fs$1.existsSync(accountTokenFile)) {
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 = fs$1.readFileSync(accountTokenFile, "utf-8").trim();
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 (!fs$1.existsSync(tokenFile)) {
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 = fs$1.readFileSync(tokenFile, "utf-8").trim();
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 (!fs$1.existsSync(localRunner)) return fallback;
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 = fs$1.readFileSync(mappingPath, "utf8");
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 = fs$1.statSync(resolveWebCredsPath(authDir));
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 (!fs$1.existsSync(filePath)) return null;
3424
- const stats = fs$1.statSync(filePath);
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 fs$1.readFileSync(filePath, "utf-8");
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
- fs$1.copyFileSync(backupPath, credsPath);
3444
+ syncFs.copyFileSync(backupPath, credsPath);
3445
3445
  try {
3446
- fs$1.chmodSync(credsPath, 384);
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 (!fs$1.existsSync(credsPath)) return {
3502
+ if (!syncFs.existsSync(credsPath)) return {
3503
3503
  e164: null,
3504
3504
  jid: null
3505
3505
  };
3506
- const raw = fs$1.readFileSync(credsPath, "utf-8");
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 = fs$1.statSync(resolveWebCredsPath(resolveAuthStoreUserPath(authDir)));
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 = fs$1.readdirSync(whatsappDir, { withFileTypes: true });
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 fs$1.existsSync(path.join(authDir, "creds.json"));
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 = fs$1.readFileSync(params.filePath, "utf8");
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 = fs$1.readFileSync("/etc/shells", "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#") && path.isAbsolute(line));
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 = fs$1.lstatSync(lexicalCursor);
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) && !fs$1.existsSync(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 (!fs$1.existsSync(cursor)) return normalized;
6057
+ if (!syncFs.existsSync(cursor)) return normalized;
6058
6058
  try {
6059
- const resolvedAncestor = path.resolve(fs$1.realpathSync(cursor));
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 ? fs$1.lstatSync(absolutePath) : fs$1.statSync(absolutePath))
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(fs$1.realpathSync(symlinkPath));
6144
+ return path.resolve(syncFs.realpathSync(symlinkPath));
6145
6145
  } catch (error) {
6146
6146
  if (!isNotFoundPathError(error)) throw error;
6147
- const linkTarget = fs$1.readlinkSync(symlinkPath);
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 ?? fs$1;
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 ?? fs$1;
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 (fs$1.existsSync(candidate)) return candidate;
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(fs$1.readFileSync(opened.fd, "utf-8"));
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
- fs$1.closeSync(opened.fd);
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 = fs$1.readFileSync(path.join(dir, "package.json"), "utf-8");
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 = fs$1.realpathSync(normalized);
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 = fs$1.readdirSync(dir, { withFileTypes: true });
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 (fs$1.existsSync(path.join(pluginRoot, "fased.plugin.json"))) return true;
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 = fs$1.realpathSync(targetPath);
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 fs$1.statSync(targetPath);
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 = fs$1.readFileSync(opened.fd, "utf-8");
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
- fs$1.closeSync(opened.fd);
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 (fs$1.existsSync(resolved) && isExtensionFile(resolved)) entries.push(normalized);
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
- fs$1.closeSync(opened.fd);
11133
+ syncFs.closeSync(opened.fd);
11134
11134
  return safeSource;
11135
11135
  }
11136
11136
  function discoverInDirectory(params) {
11137
- if (!fs$1.existsSync(params.dir)) return;
11137
+ if (!syncFs.existsSync(params.dir)) return;
11138
11138
  let entries = [];
11139
11139
  try {
11140
- entries = fs$1.readdirSync(params.dir, { withFileTypes: true });
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) => fs$1.existsSync(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 (!fs$1.existsSync(resolved)) {
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 = fs$1.statSync(resolved);
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) => fs$1.existsSync(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 fs$1.statSync(filePath).mtimeMs;
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 fs$1.readFileSync(`/proc/${pid}/status`, "utf8").match(/^State:\s+(\S)/m)?.[1] === "Z";
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 (fs$1.existsSync(pathname)) return;
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
- fs$1.unlinkSync(legacyPath);
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 ?? fs$1;
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 = fs$1.realpathSync(normalized);
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 fs$1.realpathSync(target);
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 ?? fs$1;
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) => fs$1.readFileSync(p, "utf-8"),
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 (!fs$1.statSync(filePath).isFile()) return false;
21587
- if (process.platform !== "win32") fs$1.accessSync(filePath, fs$1.constants.X_OK);
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 fs$1.realpathSync(value);
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 = fs$1.statSync(dir);
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 ?? fs$1,
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 fs$1.realpathSync(filePath);
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
- fs$1.rmSync(held.lockPath, { force: true });
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 fs$1.realpathSync(resolved);
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
- fs$1.renameSync(filePath, archived);
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 (!fs$1.existsSync(candidatePath)) continue;
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 fs$1.promises.readdir(dir).catch(() => []);
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 fs$1.promises.stat(fullPath).catch(() => null))?.isFile()) continue;
29340
- await fs$1.promises.rm(fullPath).catch(() => void 0);
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) => fs$1.existsSync(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 = fs$1.statSync(filePath);
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 = fs$1.openSync(filePath, "r");
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
- fs$1.closeSync(fd);
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 = fs$1.readSync(fd, buf, 0, buf.length, 0);
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
- fs$1.readSync(params.fd, buf, 0, readLen, readStart);
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 fs$1.statSync(filePath).mtimeMs;
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 fs$1.realpathSync(resolved);
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 fs$1.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
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 fs$1.promises.stat(filePath).catch(() => null);
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 fs$1.promises.stat(filePath).catch(() => null);
29678
+ const stat = await syncFs.promises.stat(filePath).catch(() => null);
29679
29679
  if (!stat?.isFile()) return 0;
29680
- await fs$1.promises.rm(filePath, { force: true }).catch(() => void 0);
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 = fs$1.readFileSync(storePath, "utf-8");
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 fs$1.promises.stat(storePath)).size;
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 fs$1.promises.rename(storePath, backupPath);
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 fs$1.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
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 fs$1.promises.unlink(path.join(dir, old)).catch(() => void 0);
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 fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
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 fs$1.promises.writeFile(tmp, json, "utf-8");
30299
+ await syncFs.promises.writeFile(tmp, json, "utf-8");
30300
30300
  for (let i = 0; i < 5; i++) try {
30301
- await fs$1.promises.rename(tmp, storePath);
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 fs$1.promises.rm(tmp, { force: true }).catch(() => void 0);
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 fs$1.promises.writeFile(tmp, json, {
30317
+ await syncFs.promises.writeFile(tmp, json, {
30318
30318
  mode: 384,
30319
30319
  encoding: "utf-8"
30320
30320
  });
30321
- await fs$1.promises.rename(tmp, storePath);
30322
- await fs$1.promises.chmod(storePath, 384);
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 fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
30327
- await fs$1.promises.writeFile(storePath, json, {
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 fs$1.promises.chmod(storePath, 384);
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 fs$1.promises.rm(tmp, { force: true });
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 (fs$1.existsSync(params.sessionFile)) return;
30685
- await fs$1.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
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 fs$1.promises.writeFile(params.sessionFile, `${JSON.stringify(header)}\n`, {
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-9_2G9r_K.js");
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 = fs$1.statSync(storePath);
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 fs$1.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
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
- fs$1.closeSync(opened.fd);
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 = fs$1.readFileSync(opened.fd, "utf-8");
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
- fs$1.closeSync(opened.fd);
32880
+ syncFs.closeSync(opened.fd);
32881
32881
  }
32882
32882
  }
32883
32883
  function stripFrontMatter(content) {