@fased/fased 0.1.29 → 0.1.30

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 (251) hide show
  1. package/dist/{active-listener-Dmc7Xtuo.js → active-listener-Bw8DT1EX.js} +1 -1
  2. package/dist/{agent-scope-BYecP9O5.js → agent-scope-Bx0XQq3s.js} +124 -124
  3. package/dist/{agents-QMBcc8LJ.js → agents-BU4NqZkn.js} +8 -8
  4. package/dist/{attachment-normalize-BMCew2Ey.js → attachment-normalize-3_V1yb6a.js} +1 -1
  5. package/dist/{attachment-normalize-DwmM8lOf.js → attachment-normalize-D3LvGnxE.js} +1 -1
  6. package/dist/{audio-preflight-CTI1mqLA.js → audio-preflight-B4hZi0X5.js} +1 -1
  7. package/dist/{audio-preflight-C_vYWlCY.js → audio-preflight-DcQrkXYr.js} +2 -2
  8. package/dist/{audio-preflight-C7z6lGot.js → audio-preflight-MUfVeIPT.js} +31 -31
  9. package/dist/{audio-preflight-CJGUVWFw.js → audio-preflight-YPQKo93v.js} +2 -2
  10. package/dist/{audio-preflight-CNlrMezK.js → audio-preflight-r8PHFHTe.js} +2 -2
  11. package/dist/{audit-Bfagv6Q_.js → audit-BNmzld5I.js} +1 -1
  12. package/dist/{audit-Bxa7rPQ-.js → audit-ChF16w3M.js} +1 -1
  13. package/dist/{auth-BnPTjUVe.js → auth-DGXGqcN7.js} +5 -5
  14. package/dist/{auth-choice-sv4bQ9hn.js → auth-choice-BJGGTOYU.js} +1 -1
  15. package/dist/{auth-choice-CifBEhbT.js → auth-choice-UvbBnRhr.js} +1 -1
  16. package/dist/{auth-choice-prompt-B_-nyE2Q.js → auth-choice-prompt-9uH2hSjM.js} +1 -1
  17. package/dist/{auth-choice-prompt-CCj2g7-t.js → auth-choice-prompt-CPoTg_-G.js} +1 -1
  18. package/dist/build-info.json +3 -3
  19. package/dist/bundled/boot-md/handler.js +31 -31
  20. package/dist/bundled/bootstrap-extra-files/handler.js +3 -3
  21. package/dist/bundled/command-logger/handler.js +2 -2
  22. package/dist/bundled/session-memory/handler.js +31 -31
  23. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  24. package/dist/{channel-activity-D69hLBEQ.js → channel-activity-BvC4RbBO.js} +1 -1
  25. package/dist/{channel-web-IeOqPSI7.js → channel-web-0wKGD4yD.js} +1 -1
  26. package/dist/{channel-web-DEL7MdSZ.js → channel-web-DLD1undh.js} +1 -1
  27. package/dist/{channels-B4mOixPh.js → channels-B9bvlD7y.js} +6 -6
  28. package/dist/{channels-3joUoQXH.js → channels-CBT56Ap7.js} +6 -6
  29. package/dist/{channels-cli-BKOmeL07.js → channels-cli-CK1qojpR.js} +5 -5
  30. package/dist/{channels-cli-UrsljhH0.js → channels-cli-D6ioLe8o.js} +5 -5
  31. package/dist/{chunk-KatG8h1H.js → chunk-CiQeXMLG.js} +1 -1
  32. package/dist/cli/daemon-cli.js +1 -1
  33. package/dist/{cli-Aorf7_c_.js → cli-ByaZFcQl.js} +2 -2
  34. package/dist/{cli-Cf9cX445.js → cli-DgHb9Vld.js} +2 -2
  35. package/dist/{command-registry-DSG9UhC4.js → command-registry-mptWJW8S.js} +9 -9
  36. package/dist/{commands-registry-CG-_VuYC.js → commands-registry-t0hu8c_Z.js} +1 -1
  37. package/dist/{completion-cli-atZPWxpk.js → completion-cli-BRvgVQzN.js} +2 -2
  38. package/dist/{completion-cli-BacXX8YP.js → completion-cli-DyJbXhbh.js} +1 -1
  39. package/dist/{config-cli-CAylLKEL.js → config-cli-BrzPOli4.js} +1 -1
  40. package/dist/{config-cli-B6hmwh3V.js → config-cli-R0TQZDi7.js} +1 -1
  41. package/dist/{config-eval-DxNYxraZ.js → config-eval-CLXDBlCw.js} +3 -3
  42. package/dist/{configure-CFGxKEvE.js → configure-Bt3nH-_I.js} +12 -12
  43. package/dist/{configure-IVfhSGuI.js → configure-pREf12zB.js} +12 -12
  44. package/dist/control-ui/assets/app-DXYMrRJ9.js.map +1 -1
  45. package/dist/{cron-cli-C_WdKzEb.js → cron-cli-BIYfBpRP.js} +2 -2
  46. package/dist/{cron-cli-BH5kAloM.js → cron-cli-zdoRLQ0m.js} +2 -2
  47. package/dist/{daemon-cli-tLppiRYp.js → daemon-cli-Cj4_RgEM.js} +1 -1
  48. package/dist/{daemon-cli-DVu8h_ms.js → daemon-cli-LLGP6g2r.js} +1 -1
  49. package/dist/daemon-cli.js +1 -1
  50. package/dist/{deps-D7pGfos8.js → deps-QnUngXA3.js} +1 -1
  51. package/dist/{deps-ByxeDZxS.js → deps-sd-SQKYn.js} +1 -1
  52. package/dist/{diagnostic-BYQE13k1.js → diagnostic-C6MSQFZF.js} +1 -1
  53. package/dist/entry.js +1 -1
  54. package/dist/extensionAPI.js +2 -2
  55. package/dist/{fetch-CYWabNXm.js → fetch-BwkjkjT6.js} +1 -1
  56. package/dist/{fetch-guard-CNlKZ01R.js → fetch-guard-DdMratk8.js} +1 -1
  57. package/dist/{filesystem-manager-CWbYjhcQ.js → filesystem-manager-B8V6mEya.js} +4 -4
  58. package/dist/{fs-safe-T802CTm-.js → fs-safe-CrX7hR24.js} +2 -2
  59. package/dist/{gateway-cli-DNHD_N4M.js → gateway-cli-Cn3STpYX.js} +27 -27
  60. package/dist/{gateway-cli-sPMmhMYS.js → gateway-cli-yfNsUzH6.js} +27 -27
  61. package/dist/{github-copilot-token-eyrRGmGp.js → github-copilot-token-DYrFvncE.js} +8 -8
  62. package/dist/{health-Cn7Uypmr.js → health-BfGnSyOV.js} +2 -2
  63. package/dist/{health-Ds6nghRW.js → health-DcurJYny.js} +2 -2
  64. package/dist/{heartbeat-runner-DPf55KvT.js → heartbeat-runner-CJZStXhx.js} +1 -1
  65. package/dist/{heartbeat-runner-DZd7FWr_.js → heartbeat-runner-CY41VFZE.js} +1 -1
  66. package/dist/{hooks-cli-CklgZPuq.js → hooks-cli-DpkFISKR.js} +3 -3
  67. package/dist/{hooks-cli-Ds0rAsrn.js → hooks-cli-WtC65axA.js} +3 -3
  68. package/dist/index.js +7 -7
  69. package/dist/{internal-CGfrGFGR.js → internal-QlbJb-4V.js} +3 -3
  70. package/dist/{ipv4-QXi6T-GC.js → ipv4-BkY__Z0A.js} +2 -2
  71. package/dist/{ipv4-woqSIZCG.js → ipv4-CdRPraPM.js} +2 -2
  72. package/dist/{lifecycle-CDyiQkdm.js → lifecycle-DUPuKIvd.js} +1 -1
  73. package/dist/{lifecycle-Bt1wvv49.js → lifecycle-Dd-6tFQk.js} +1 -1
  74. package/dist/{list.auth-overview-BZLsTF6m.js → list.auth-overview-CE2_GQ-8.js} +1 -1
  75. package/dist/{list.auth-overview-DTmoeKoz.js → list.auth-overview-DcdJySBi.js} +1 -1
  76. package/dist/llm-slug-generator.js +31 -31
  77. package/dist/{login-H3-M4-wp.js → login-BGt2KP5c.js} +2 -2
  78. package/dist/{login-qr-DIly-pBD.js → login-qr-CDDF5Ark.js} +3 -3
  79. package/dist/{manager-ZRPdFyMZ.js → manager-BfodMNDG.js} +8 -8
  80. package/dist/{markdown-tables-KcZiNfqg.js → markdown-tables-C-HEtwaC.js} +1 -1
  81. package/dist/{media-93Hw7QIY.js → media-CInvDVc0.js} +5 -5
  82. package/dist/{memory-search-CueDEO0U.js → memory-search-BZt8FFLW.js} +2 -2
  83. package/dist/{model-catalog-CKJx3TlL.js → model-catalog-DOuyqwFa.js} +6 -6
  84. package/dist/{models-B3gfHQID.js → models-ItVo4_FF.js} +4 -4
  85. package/dist/{models-cli-DTH6o8Ah.js → models-cli-DKEzhF9X.js} +4 -4
  86. package/dist/{models-cli-C7_F9hA_.js → models-cli-YznPWFUE.js} +5 -5
  87. package/dist/{node-cli-CuA0F8du.js → node-cli-CZaJUGYu.js} +2 -2
  88. package/dist/{node-cli-BrZNQWK0.js → node-cli-qkHTKDmW.js} +2 -2
  89. package/dist/{onboard-BLjJLsrb.js → onboard--COJdfXc.js} +6 -6
  90. package/dist/{onboard-wtRNFZSO.js → onboard-Cpw2fP2S.js} +6 -6
  91. package/dist/{onboard-channels-CpYQ-jzg.js → onboard-channels-BH6atgy1.js} +2 -2
  92. package/dist/{onboard-channels-BpexXVlv.js → onboard-channels-CbQgdo3k.js} +2 -2
  93. package/dist/{onboard-search-D4eUoAEq.js → onboard-search-Bg8qvHBV.js} +5 -5
  94. package/dist/{onboard-search-CudukQ0P.js → onboard-search-BxaAdq5U.js} +5 -5
  95. package/dist/{onboarding-DZphW3tC.js → onboarding-B-_4gKpN.js} +7 -7
  96. package/dist/{onboarding-beY-khSY.js → onboarding-DiuUZg9l.js} +7 -7
  97. package/dist/{openresponses-http-BDR_C5c5.js → openresponses-http-BNIAyGrH.js} +1 -1
  98. package/dist/{openresponses-http-COlqXAAY.js → openresponses-http-BVdja8Nj.js} +2 -2
  99. package/dist/{openresponses-http-lRWgsixx.js → openresponses-http-DGAqU5K9.js} +2 -2
  100. package/dist/{openresponses-http-C3HFR4b5.js → openresponses-http-DhBER2sI.js} +2 -2
  101. package/dist/{openresponses-http-YZhTuhkt.js → openresponses-http-svQwMBaq.js} +31 -31
  102. package/dist/{outbound-C7mwBvhN.js → outbound-CfdOHhpP.js} +6 -6
  103. package/dist/{outbound-attachment-DILp822M.js → outbound-attachment-BL6wK70V.js} +2 -2
  104. package/dist/{parent-default-help-BHi1y6z-.js → parent-default-help-B2mCEhav.js} +1 -1
  105. package/dist/{parent-default-help-D6zpkza-.js → parent-default-help-DUqMyqko.js} +1 -1
  106. package/dist/{path-alias-guards-DyTCSx8q.js → path-alias-guards-Dalcwl5X.js} +1 -1
  107. package/dist/{paths-6Y-iET7k.js → paths-DGN5lNb7.js} +9 -9
  108. package/dist/{paths-DBTQPSY5.js → paths-zdeD1PNp.js} +13 -13
  109. package/dist/{pi-embedded-B6SkkATJ.js → pi-embedded-CrKlYvWM.js} +234 -234
  110. package/dist/{pi-embedded-e2Be1Pic.js → pi-embedded-DPl5Aqw4.js} +14 -14
  111. package/dist/{pi-model-discovery--TE7j7VE.js → pi-model-discovery-C1CAe7eM.js} +7 -7
  112. package/dist/pi-model-discovery-runtime-C34IWfDn.js +5 -0
  113. package/dist/{plugin-registry-CAsF45o1.js → plugin-registry-BBzitaxQ.js} +1 -1
  114. package/dist/{plugin-registry-D8bNkXOq.js → plugin-registry-CIiRwpQv.js} +1 -1
  115. package/dist/plugin-sdk/{audio-preflight-BjpOTfAA.js → audio-preflight-B-__-RfZ.js} +1 -1
  116. package/dist/plugin-sdk/{audio-preflight-BMNjQ8Qw.js → audio-preflight-DcJUk03P.js} +1 -1
  117. package/dist/plugin-sdk/channel-plugin-common.js +1 -1
  118. package/dist/plugin-sdk/{channel-web-Dd48mC59.js → channel-web-DoGtD0PQ.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-xYU4ta96.js → openresponses-http-DQWJE95u.js} +1 -1
  122. package/dist/plugin-sdk/{openresponses-http-iXBH6NN_.js → openresponses-http-VFgg_bR4.js} +1 -1
  123. package/dist/plugin-sdk/{pi-model-discovery-runtime-DaiqegxK.js → pi-model-discovery-runtime-CwXjrUIM.js} +1 -1
  124. package/dist/plugin-sdk/{registry-D1bAj51G.js → registry-C90cYLNB.js} +8 -8
  125. package/dist/plugin-sdk/{reply-CwbNFNQd.js → reply-D4WNXysa.js} +5 -5
  126. package/dist/plugin-sdk/src/brand.d.ts +2 -2
  127. package/dist/plugin-sdk/{status-sQR6iMdb.js → status-BlX9jStp.js} +5 -5
  128. package/dist/plugin-sdk/{web-BWOUsR2H.js → web-CEucw6Dl.js} +1 -1
  129. package/dist/plugin-sdk/{web-Q7_F3_66.js → web-Cr8AJx43.js} +2 -2
  130. package/dist/{plugins-cli-CmFo39YO.js → plugins-cli-B9w9SKYa.js} +5 -5
  131. package/dist/{plugins-cli-b28IZl2q.js → plugins-cli-CdRa6xYi.js} +5 -5
  132. package/dist/{program-b-bJ3jAf.js → program-C9wZbb_-.js} +7 -7
  133. package/dist/{program-context-C8TpaeJh.js → program-context-Dc8hoANx.js} +24 -24
  134. package/dist/{prompt-select-styled-BBW8ExAu.js → prompt-select-styled-9E7HlPjk.js} +4 -4
  135. package/dist/{prompt-select-styled--unDG0y5.js → prompt-select-styled-oUCALY2N.js} +4 -4
  136. package/dist/{pw-ai-4dv28kg0.js → pw-ai-5b6U6vNE.js} +5 -5
  137. package/dist/{pw-ai-DuNzIjgi.js → pw-ai-BaQ88hEN.js} +1 -1
  138. package/dist/{qmd-manager-DA3v0Y-t.js → qmd-manager-CVbI17-v.js} +5 -5
  139. package/dist/{qmd-scope-Byk5KlGv.js → qmd-scope-CL7VCB5M.js} +1 -1
  140. package/dist/{query-expansion-CGVFZR8O.js → query-expansion-DrMLz38Q.js} +2 -2
  141. package/dist/{register.agent-DXdz6bc0.js → register.agent-BhoMAqJe.js} +8 -8
  142. package/dist/{register.agent-te7qVBoR.js → register.agent-Dty2GQos.js} +9 -9
  143. package/dist/{register.configure-DjSmILA-.js → register.configure-CjQhBudl.js} +12 -12
  144. package/dist/{register.configure-u_mElz3G.js → register.configure-DZl7w5Se.js} +12 -12
  145. package/dist/{register.maintenance-BMe88N2s.js → register.maintenance-C9_UzTyI.js} +8 -8
  146. package/dist/{register.maintenance-CKx-2ze7.js → register.maintenance-CGFQEESj.js} +9 -9
  147. package/dist/{register.message-CWpF1VfE.js → register.message-C3BTjmhg.js} +3 -3
  148. package/dist/{register.message-D3P3PbvS.js → register.message-DnrC31ZC.js} +3 -3
  149. package/dist/{register.onboard-0rmVJjLc.js → register.onboard-DIxJ1bFs.js} +14 -14
  150. package/dist/{register.onboard-DtcpAkW4.js → register.onboard-DzO2dNpB.js} +14 -14
  151. package/dist/{register.setup-C5agvuLZ.js → register.setup-B5Ji_Smo.js} +14 -14
  152. package/dist/{register.setup-Do3sWvmu.js → register.setup-Cd8rXata.js} +14 -14
  153. package/dist/{register.status-health-sessions-DTOl2ffn.js → register.status-health-sessions-CUw6awJ6.js} +6 -6
  154. package/dist/{register.status-health-sessions-C3wrI8Rw.js → register.status-health-sessions-CYpKmq3y.js} +6 -6
  155. package/dist/{register.subclis-BmntpHBV.js → register.subclis-DEnba1hq.js} +16 -16
  156. package/dist/{replies-oXYe4wxf.js → replies-DEtI8EHM.js} +2 -2
  157. package/dist/{reply-5d_FBb8m.js → reply-DVGmtLPq.js} +6 -6
  158. package/dist/{reply-prefix-DZjj9KHV.js → reply-prefix-DVyUjzCQ.js} +1 -1
  159. package/dist/{resolve-route-D3-NnOVE.js → resolve-route-Dc1L-NXd.js} +1 -1
  160. package/dist/{run-main-D9Fxy0Hu.js → run-main-BqiU1shU.js} +14 -14
  161. package/dist/{runtime-helper-grants-BQYP50-i.js → runtime-helper-grants-BQl2Y_KJ.js} +1 -1
  162. package/dist/{runtime-helper-grants-CqyGNc1k.js → runtime-helper-grants-CHz5azhO.js} +1 -1
  163. package/dist/{sandbox-cli-Kf_iEEKT.js → sandbox-cli-BLWfhZh2.js} +2 -2
  164. package/dist/{sandbox-cli-g26xYeMo.js → sandbox-cli-C7tRjHGl.js} +2 -2
  165. package/dist/{security-cli-JBJPJKU6.js → security-cli-0-5Vgk1A.js} +3 -3
  166. package/dist/{security-cli-BXd-xPab.js → security-cli-DGCfCHzM.js} +3 -3
  167. package/dist/{send-BqgaWpoE.js → send-BohOQw4n.js} +4 -4
  168. package/dist/{send-B-sa1Rzn.js → send-CqQ88clX.js} +18 -18
  169. package/dist/{send-DQ3s5E33.js → send-D2IXnEJl.js} +7 -7
  170. package/dist/{send-C1YtjPQb.js → send-D8eFKkkd.js} +5 -5
  171. package/dist/{send-Bhj3bXKi.js → send-Ps08x526.js} +5 -5
  172. package/dist/{server-DTznnzCB.js → server-BMZYE37o.js} +2 -2
  173. package/dist/{server-DLj_G1sk.js → server-DamsmTjm.js} +2 -2
  174. package/dist/{server-cron-B_5Pv8wt.js → server-cron-BUWyjpTV.js} +2 -2
  175. package/dist/{server-cron-9NKGTvdH.js → server-cron-DC9t05LU.js} +2 -2
  176. package/dist/{server-node-events-HUAm9HRK.js → server-node-events-C3IOxSF_.js} +3 -3
  177. package/dist/{server-node-events-BQbTcvb4.js → server-node-events-cusaGrcY.js} +3 -3
  178. package/dist/{session-CYgXtJQQ.js → session-Cz9lOeBe.js} +5 -5
  179. package/dist/{skill-commands-HOHDwVYx.js → skill-commands-LW0SeGsB.js} +24 -24
  180. package/dist/{status-CRSeqOJk.js → status-B39ZJFhD.js} +1 -1
  181. package/dist/{status-C5BT3ShE.js → status-CrL7Hp3R.js} +4 -4
  182. package/dist/{status-BgIeE_GN.js → status-Dlt3xwcf.js} +4 -4
  183. package/dist/{status-CCDLtWaH.js → status-Doqt5wXN.js} +1 -1
  184. package/dist/{tables-BQMYTcw_.js → tables-CjmIs23-.js} +1 -1
  185. package/dist/{target-errors-iZTI1Fwr.js → target-errors-C3MQ1_UT.js} +2 -2
  186. package/dist/{tool-loop-detection-CqQip5ev.js → tool-loop-detection-CSfX9pJE.js} +2 -2
  187. package/dist/{tui-BUcLlnJf.js → tui-DdPEVWjR.js} +1 -1
  188. package/dist/{tui-CpFLYQvY.js → tui-R-P_OV8J.js} +1 -1
  189. package/dist/{tui-cli-BVCujDMk.js → tui-cli-BgihXvs7.js} +3 -3
  190. package/dist/{tui-cli-CBpiAWOs.js → tui-cli-ChpP9FsL.js} +3 -3
  191. package/dist/{update-cli-Cg1NsSYC.js → update-cli-DPdSuHZT.js} +14 -14
  192. package/dist/{update-cli-Bm9PtTTq.js → update-cli-DVCjSLYw.js} +15 -15
  193. package/dist/{update-runner-E5f53ziH.js → update-runner-COs-YDhT.js} +38 -4
  194. package/dist/{update-runner-giHs-roY.js → update-runner-DNPfs265.js} +38 -4
  195. package/dist/{web-C-SCrRnf.js → web-B2SWpLdC.js} +3 -3
  196. package/dist/{web-z6nfuAFN.js → web-BHp_2XHP.js} +1 -1
  197. package/dist/{web-D6QmuJSZ.js → web-D8bq1XRX.js} +3 -3
  198. package/dist/{web-DHzdcD5k.js → web-DQuQBwMr.js} +35 -35
  199. package/dist/{web-search-providers.runtime-BWcxW5PE.js → web-search-providers.runtime-BD9Vp8eD.js} +1 -1
  200. package/dist/{web-search-providers.runtime-C-08aAIL.js → web-search-providers.runtime-CiOoq6G3.js} +1 -1
  201. package/dist/{web-fv_H8Fvb.js → web-vGE7qeF-.js} +2 -2
  202. package/dist/{whatsapp-actions-CrVrn3wF.js → whatsapp-actions-oa93ddRw.js} +12 -12
  203. package/extensions/acpx/package.json +1 -1
  204. package/extensions/bluebubbles/package.json +1 -1
  205. package/extensions/copilot-proxy/package.json +1 -1
  206. package/extensions/diagnostics-otel/package.json +1 -1
  207. package/extensions/discord/package.json +1 -1
  208. package/extensions/fased-federation/package.json +1 -1
  209. package/extensions/feishu/package.json +1 -1
  210. package/extensions/google-gemini-cli-auth/package.json +1 -1
  211. package/extensions/googlechat/package.json +1 -1
  212. package/extensions/imessage/package.json +1 -1
  213. package/extensions/irc/package.json +1 -1
  214. package/extensions/line/package.json +1 -1
  215. package/extensions/llm-task/package.json +1 -1
  216. package/extensions/lobster/package.json +1 -1
  217. package/extensions/matrix/CHANGELOG.md +6 -0
  218. package/extensions/matrix/package.json +1 -1
  219. package/extensions/mattermost/package.json +1 -1
  220. package/extensions/memory-core/package.json +1 -1
  221. package/extensions/memory-lancedb/package.json +1 -1
  222. package/extensions/minimax-portal-auth/package.json +1 -1
  223. package/extensions/msteams/CHANGELOG.md +6 -0
  224. package/extensions/msteams/package.json +1 -1
  225. package/extensions/nextcloud-talk/package.json +1 -1
  226. package/extensions/nostr/CHANGELOG.md +6 -0
  227. package/extensions/nostr/package.json +1 -1
  228. package/extensions/open-prose/package.json +1 -1
  229. package/extensions/sat-mining/package.json +1 -1
  230. package/extensions/signal/package.json +1 -1
  231. package/extensions/slack/package.json +1 -1
  232. package/extensions/synology-chat/package.json +1 -1
  233. package/extensions/telegram/package.json +1 -1
  234. package/extensions/tlon/package.json +1 -1
  235. package/extensions/twitch/CHANGELOG.md +6 -0
  236. package/extensions/twitch/package.json +1 -1
  237. package/extensions/voice-call/CHANGELOG.md +6 -0
  238. package/extensions/voice-call/package.json +1 -1
  239. package/extensions/whatsapp/package.json +1 -1
  240. package/extensions/zalo/CHANGELOG.md +6 -0
  241. package/extensions/zalo/package.json +1 -1
  242. package/extensions/zalouser/CHANGELOG.md +6 -0
  243. package/extensions/zalouser/package.json +1 -1
  244. package/package.json +1 -1
  245. package/src/brand.ts +1 -1
  246. package/src/canvas-host/a2ui/.bundle.hash +1 -1
  247. package/src/cli/update-cli/progress.ts +2 -2
  248. package/src/cli/update-cli/update-command.ts +4 -3
  249. package/src/infra/update-global.ts +47 -0
  250. package/src/infra/update-runner.ts +10 -2
  251. package/dist/pi-model-discovery-runtime-DD55ZBCk.js +0 -5
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { Bo as resolveEffectiveEnableState, D as resolveEffectiveAgentSkillFilter, Fs as resolvePreferredFasedAgentTmpDir, Gi as isPathInside, Io as normalizeStringEntries, O as normalizeSkillFilter, Qr as loadPluginManifestRegistry, Vo as resolveMemorySlotDecision, Xi as isDangerousHostEnvVarName, es as CONFIG_DIR, k as createSubsystemLogger, l as resolveAgentWorkspaceDir, ps as resolveUserPath, r as listAgentIds, ri as resolveFasedAgentPackageRootSync, zo as normalizePluginsConfig } from "./agent-scope-BYecP9O5.js";
3
- import { f as resolveStateDir } from "./github-copilot-token-eyrRGmGp.js";
4
- import { n as assertNoPathAliasEscape } from "./path-alias-guards-DyTCSx8q.js";
5
- import { a as listChatCommands } from "./commands-registry-CG-_VuYC.js";
6
- import { a as normalizeStringList, c as resolveFasedAgentManifestBlock, d as resolveFasedAgentManifestRequires, f as parseFrontmatterBlock, i as getFrontmatterString, l as resolveFasedAgentManifestInstall, n as hasBinary, o as parseFasedAgentManifestInstallBase, r as isConfigPathTruthyWithDefaults, s as parseFrontmatterBool, t as evaluateRuntimeEligibility, u as resolveFasedAgentManifestOs } from "./config-eval-DxNYxraZ.js";
2
+ import { Bo as resolveEffectiveEnableState, D as resolveEffectiveAgentSkillFilter, Fs as resolvePreferredFasedAgentTmpDir, Gi as isPathInside, Io as normalizeStringEntries, O as normalizeSkillFilter, Qr as loadPluginManifestRegistry, Vo as resolveMemorySlotDecision, Xi as isDangerousHostEnvVarName, es as CONFIG_DIR, k as createSubsystemLogger, l as resolveAgentWorkspaceDir, ps as resolveUserPath, r as listAgentIds, ri as resolveFasedAgentPackageRootSync, zo as normalizePluginsConfig } from "./agent-scope-Bx0XQq3s.js";
3
+ import { f as resolveStateDir } from "./github-copilot-token-DYrFvncE.js";
4
+ import { n as assertNoPathAliasEscape } from "./path-alias-guards-Dalcwl5X.js";
5
+ import { a as listChatCommands } from "./commands-registry-t0hu8c_Z.js";
6
+ import { a as normalizeStringList, c as resolveFasedAgentManifestBlock, d as resolveFasedAgentManifestRequires, f as parseFrontmatterBlock, i as getFrontmatterString, l as resolveFasedAgentManifestInstall, n as hasBinary, o as parseFasedAgentManifestInstallBase, r as isConfigPathTruthyWithDefaults, s as parseFrontmatterBool, t as evaluateRuntimeEligibility, u as resolveFasedAgentManifestOs } from "./config-eval-CLXDBlCw.js";
7
7
  import fs from "node:fs/promises";
8
8
  import os from "node:os";
9
9
  import path from "node:path";
10
- import syncFs from "node:fs";
10
+ import fs$1 from "node:fs";
11
11
  import { randomUUID } from "node:crypto";
12
12
  import { URL, fileURLToPath } from "node:url";
13
13
  import { formatSkillsForPrompt, loadSkillsFromDir } from "@mariozechner/pi-coding-agent";
@@ -578,13 +578,13 @@ function applySkillEnvOverridesFromSnapshot(params) {
578
578
  //#region src/agents/skills/bundled-dir.ts
579
579
  function looksLikeSkillsDir(dir) {
580
580
  try {
581
- const entries = syncFs.readdirSync(dir, { withFileTypes: true });
581
+ const entries = fs$1.readdirSync(dir, { withFileTypes: true });
582
582
  for (const entry of entries) {
583
583
  if (entry.name.startsWith(".")) continue;
584
584
  const fullPath = path.join(dir, entry.name);
585
585
  if (entry.isFile() && entry.name.endsWith(".md")) return true;
586
586
  if (entry.isDirectory()) {
587
- if (syncFs.existsSync(path.join(fullPath, "SKILL.md"))) return true;
587
+ if (fs$1.existsSync(path.join(fullPath, "SKILL.md"))) return true;
588
588
  }
589
589
  }
590
590
  } catch {
@@ -599,7 +599,7 @@ function resolveBundledSkillsDir(opts = {}) {
599
599
  const execPath = opts.execPath ?? process.execPath;
600
600
  const execDir = path.dirname(execPath);
601
601
  const sibling = path.join(execDir, "skills");
602
- if (syncFs.existsSync(sibling)) return sibling;
602
+ if (fs$1.existsSync(sibling)) return sibling;
603
603
  } catch {}
604
604
  try {
605
605
  const moduleUrl = opts.moduleUrl ?? import.meta.url;
@@ -662,7 +662,7 @@ function resolvePluginSkillDirs(params) {
662
662
  const trimmed = raw.trim();
663
663
  if (!trimmed) continue;
664
664
  const candidate = path.resolve(record.rootDir, trimmed);
665
- if (!syncFs.existsSync(candidate)) {
665
+ if (!fs$1.existsSync(candidate)) {
666
666
  log$2.warn(`plugin skill path not found (${record.id}): ${candidate}`);
667
667
  continue;
668
668
  }
@@ -689,7 +689,7 @@ async function serializeByKey(key, task) {
689
689
 
690
690
  //#endregion
691
691
  //#region src/agents/skills/workspace.ts
692
- const fsp = syncFs.promises;
692
+ const fsp = fs$1.promises;
693
693
  const skillsLogger = createSubsystemLogger("skills");
694
694
  const skillCommandDebugOnce = /* @__PURE__ */ new Set();
695
695
  /**
@@ -735,10 +735,10 @@ function isPathWithinRoot(candidatePath, rootPath) {
735
735
  let candidate = path.resolve(candidatePath);
736
736
  let root = path.resolve(rootPath);
737
737
  try {
738
- candidate = syncFs.realpathSync.native(candidate);
738
+ candidate = fs$1.realpathSync.native(candidate);
739
739
  } catch {}
740
740
  try {
741
- root = syncFs.realpathSync.native(root);
741
+ root = fs$1.realpathSync.native(root);
742
742
  } catch {}
743
743
  const relative = path.relative(root, candidate);
744
744
  return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
@@ -778,7 +778,7 @@ function resolveSkillsLimits(config) {
778
778
  }
779
779
  function listChildDirectories(dir) {
780
780
  try {
781
- const entries = syncFs.readdirSync(dir, { withFileTypes: true });
781
+ const entries = fs$1.readdirSync(dir, { withFileTypes: true });
782
782
  const dirs = [];
783
783
  for (const entry of entries) {
784
784
  if (entry.name.startsWith(".")) continue;
@@ -789,7 +789,7 @@ function listChildDirectories(dir) {
789
789
  continue;
790
790
  }
791
791
  if (entry.isSymbolicLink()) try {
792
- if (syncFs.statSync(fullPath).isDirectory()) dirs.push(entry.name);
792
+ if (fs$1.statSync(fullPath).isDirectory()) dirs.push(entry.name);
793
793
  } catch {}
794
794
  }
795
795
  return dirs;
@@ -800,7 +800,7 @@ function listChildDirectories(dir) {
800
800
  function resolveNestedSkillsRoot(dir, opts) {
801
801
  const nested = path.join(dir, "skills");
802
802
  try {
803
- if (!syncFs.existsSync(nested) || !syncFs.statSync(nested).isDirectory()) return { baseDir: dir };
803
+ if (!fs$1.existsSync(nested) || !fs$1.statSync(nested).isDirectory()) return { baseDir: dir };
804
804
  } catch {
805
805
  return { baseDir: dir };
806
806
  }
@@ -809,7 +809,7 @@ function resolveNestedSkillsRoot(dir, opts) {
809
809
  const toScan = scanLimit === 0 ? [] : nestedDirs.slice(0, Math.min(nestedDirs.length, scanLimit));
810
810
  for (const name of toScan) {
811
811
  const skillMd = path.join(nested, name, "SKILL.md");
812
- if (syncFs.existsSync(skillMd)) return {
812
+ if (fs$1.existsSync(skillMd)) return {
813
813
  baseDir: nested,
814
814
  note: `Detected nested skills root at ${nested}`
815
815
  };
@@ -829,9 +829,9 @@ function loadSkillEntries(workspaceDir, opts) {
829
829
  const loadSkills = (params) => {
830
830
  const baseDir = resolveNestedSkillsRoot(params.dir, { maxEntriesToScan: limits.maxCandidatesPerRoot }).baseDir;
831
831
  const rootSkillMd = path.join(baseDir, "SKILL.md");
832
- if (syncFs.existsSync(rootSkillMd)) {
832
+ if (fs$1.existsSync(rootSkillMd)) {
833
833
  try {
834
- const size = syncFs.statSync(rootSkillMd).size;
834
+ const size = fs$1.statSync(rootSkillMd).size;
835
835
  if (size > limits.maxSkillFileBytes) {
836
836
  skillsLogger.warn("Skipping skills root due to oversized SKILL.md.", {
837
837
  dir: baseDir,
@@ -870,9 +870,9 @@ function loadSkillEntries(workspaceDir, opts) {
870
870
  for (const name of limitedChildren) {
871
871
  const skillDir = path.join(baseDir, name);
872
872
  const skillMd = path.join(skillDir, "SKILL.md");
873
- if (!syncFs.existsSync(skillMd)) continue;
873
+ if (!fs$1.existsSync(skillMd)) continue;
874
874
  try {
875
- const size = syncFs.statSync(skillMd).size;
875
+ const size = fs$1.statSync(skillMd).size;
876
876
  if (size > limits.maxSkillFileBytes) {
877
877
  skillsLogger.warn("Skipping skill due to oversized SKILL.md.", {
878
878
  skill: name,
@@ -940,7 +940,7 @@ function loadSkillEntries(workspaceDir, opts) {
940
940
  return Array.from(merged.values()).map((skill) => {
941
941
  let frontmatter = {};
942
942
  try {
943
- frontmatter = parseFrontmatter(syncFs.readFileSync(skill.filePath, "utf-8"));
943
+ frontmatter = parseFrontmatter(fs$1.readFileSync(skill.filePath, "utf-8"));
944
944
  } catch {}
945
945
  return {
946
946
  skill,
@@ -1395,8 +1395,8 @@ function listSkillCommandsForAgents(params) {
1395
1395
  const visitedDirs = /* @__PURE__ */ new Set();
1396
1396
  for (const agentId of agentIds) {
1397
1397
  const workspaceDir = resolveAgentWorkspaceDir(params.cfg, agentId);
1398
- if (!syncFs.existsSync(workspaceDir)) continue;
1399
- const canonicalDir = syncFs.realpathSync(workspaceDir);
1398
+ if (!fs$1.existsSync(workspaceDir)) continue;
1399
+ const canonicalDir = fs$1.realpathSync(workspaceDir);
1400
1400
  if (visitedDirs.has(canonicalDir)) continue;
1401
1401
  visitedDirs.add(canonicalDir);
1402
1402
  const commands = buildWorkspaceSkillCommandSpecs(workspaceDir, {
@@ -1,5 +1,5 @@
1
1
  import { A as resolveDefaultAgentWorkspaceDir, Dn as loadConfig, F as createSubsystemLogger, d as resolveDefaultAgentId, u as resolveAgentWorkspaceDir } from "./agent-scope-CrCe9L5D.js";
2
- import { Nt as loadFasedAgentPlugins, la as createPluginLoaderLogger } from "./reply-5d_FBb8m.js";
2
+ import { Nt as loadFasedAgentPlugins, la as createPluginLoaderLogger } from "./reply-DVGmtLPq.js";
3
3
 
4
4
  //#region src/plugins/status.ts
5
5
  const log = createSubsystemLogger("plugins");
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
2
  import { A as resolveSessionModelRef, Bt as resolveFreshSessionTotalTokens, C as listAgentsForGateway, Cu as formatCliCommand, Gl as listChannelPlugins, Gt as resolveMainSessionKey, L as resolveContextTokensForModel, Qt as readConfigFileSnapshot, Rr as resolveConfiguredModelRef, Wu as resolveAgentWorkspaceDir, X as loadSessionStore, Xt as loadConfig, Yc as VERSION, fd as resolveFasedAgentPackageRoot, hd as runExec, x as classifySessionKey } from "./env-BegRUDBP.js";
3
3
  import { H as theme, V as isRich, j as info } from "./agent-paths-BI1hx-tF.js";
4
- import { E as resolveControlUiLinks, Gr as summarizeRestartSentinel, Jt as buildChannelSummary, Ri as resolveStrictAgenticRuntimeMode, So as getTailnetHostname, Wa as normalizeControlUiBasePath, Wr as readRestartSentinel, Xt as formatChannelAllowFrom, Yt as buildChannelAccountSnapshot, _r as loadProviderUsageSummary, rr as peekSystemEvents, vr as formatUsageReportLines, wo as readTailscaleStatusJson } from "./model-catalog-CKJx3TlL.js";
4
+ import { E as resolveControlUiLinks, Gr as summarizeRestartSentinel, Jt as buildChannelSummary, Ri as resolveStrictAgenticRuntimeMode, So as getTailnetHostname, Wa as normalizeControlUiBasePath, Wr as readRestartSentinel, Xt as formatChannelAllowFrom, Yt as buildChannelAccountSnapshot, _r as loadProviderUsageSummary, rr as peekSystemEvents, vr as formatUsageReportLines, wo as readTailscaleStatusJson } from "./model-catalog-DOuyqwFa.js";
5
5
  import { n as DEFAULT_MODEL, r as DEFAULT_PROVIDER, t as DEFAULT_CONTEXT_TOKENS } from "./defaults-BDW-7D7s.js";
6
6
  import { gt as resolveGatewayPort, it as parseAgentSessionKey, v as resolveStorePath } from "./entry.js";
7
7
  import { t as getMemorySearchManager } from "./memory-DwzB7ik7.js";
@@ -18,9 +18,9 @@ import { s as resolveGatewayLogPaths, t as resolveGatewayService } from "./servi
18
18
  import { t as formatRuntimeStatusWithDetails } from "./runtime-status-Ol8emLbF.js";
19
19
  import { t as readLastGatewayErrorLine } from "./diagnostics-J_ooWcgT.js";
20
20
  import { t as renderTable } from "./table-DiHPQeoC.js";
21
- import { o as probeGateway, r as resolveGatewayProbeAuth$1, t as runSecurityAudit } from "./audit-Bxa7rPQ-.js";
22
- import { t as formatHealthChannelLines, u as getLastGatewayStartupTraceSnapshot } from "./health-Cn7Uypmr.js";
23
- import { t as resolveHeartbeatSummaryForAgent } from "./heartbeat-runner-DPf55KvT.js";
21
+ import { o as probeGateway, r as resolveGatewayProbeAuth$1, t as runSecurityAudit } from "./audit-ChF16w3M.js";
22
+ import { t as formatHealthChannelLines, u as getLastGatewayStartupTraceSnapshot } from "./health-BfGnSyOV.js";
23
+ import { t as resolveHeartbeatSummaryForAgent } from "./heartbeat-runner-CJZStXhx.js";
24
24
  import { d as formatUpdateChannelLabel, h as resolveEffectiveUpdateChannel, i as formatGitInstallLabel, m as normalizeUpdateChannel, n as compareSemverStrings, t as checkUpdateStatus } from "./update-check-vt58Ppts.js";
25
25
  import { t as resolveNodeService } from "./node-service-Df8qw7i5.js";
26
26
  import { t as collectChannelStatusIssues } from "./channels-status-issues-DzJA9WTM.js";
@@ -1,7 +1,7 @@
1
1
  import { u as resolveGatewayPort } from "./paths-C9FmTW1x.js";
2
2
  import { H as isRich, M as info, U as theme } from "./agent-paths-DmOVZE7g.js";
3
3
  import { $ as listAgentsForGateway, Dn as loadConfig, Et as loadSessionStore, Nu as listChannelPlugins, Sn as resolveMainSessionKey, Z as classifySessionKey, _n as resolveFreshSessionTotalTokens, bl as VERSION, dd as formatCliCommand, eu as runExec, hi as resolveConfiguredModelRef, kn as readConfigFileSnapshot, ot as resolveSessionModelRef, po as resolveFasedAgentPackageRoot, pt as resolveContextTokensForModel, u as resolveAgentWorkspaceDir } from "./agent-scope-CrCe9L5D.js";
4
- import { $o as getTailnetHostname, B as buildChannelAccountSnapshot, Br as loadProviderUsageSummary, Qt as resolveControlUiLinks, V as formatChannelAllowFrom, Vr as formatUsageReportLines, gt as resolveStrictAgenticRuntimeMode, hi as summarizeRestartSentinel, mi as readRestartSentinel, ra as peekSystemEvents, ts as readTailscaleStatusJson, xo as normalizeControlUiBasePath, z as buildChannelSummary } from "./reply-5d_FBb8m.js";
4
+ import { $o as getTailnetHostname, B as buildChannelAccountSnapshot, Br as loadProviderUsageSummary, Qt as resolveControlUiLinks, V as formatChannelAllowFrom, Vr as formatUsageReportLines, gt as resolveStrictAgenticRuntimeMode, hi as summarizeRestartSentinel, mi as readRestartSentinel, ra as peekSystemEvents, ts as readTailscaleStatusJson, xo as normalizeControlUiBasePath, z as buildChannelSummary } from "./reply-DVGmtLPq.js";
5
5
  import { w as parseAgentSessionKey } from "./session-key-LmCHAJTQ.js";
6
6
  import { n as DEFAULT_MODEL, r as DEFAULT_PROVIDER, t as DEFAULT_CONTEXT_TOKENS } from "./defaults-CzImVi0V.js";
7
7
  import { g as resolveStorePath } from "./chat-envelope-D_wSv26N.js";
@@ -19,9 +19,9 @@ import { s as resolveGatewayLogPaths, t as resolveGatewayService } from "./servi
19
19
  import { t as formatRuntimeStatusWithDetails } from "./runtime-status-S9nJA1dv.js";
20
20
  import { t as readLastGatewayErrorLine } from "./diagnostics-BHiuBYC1.js";
21
21
  import { t as renderTable } from "./table-BMmOL0ek.js";
22
- import { o as probeGateway, r as resolveGatewayProbeAuth$1, t as runSecurityAudit } from "./audit-Bfagv6Q_.js";
23
- import { l as getLastGatewayStartupTraceSnapshot, t as formatHealthChannelLines } from "./health-Ds6nghRW.js";
24
- import { t as resolveHeartbeatSummaryForAgent } from "./heartbeat-runner-DZd7FWr_.js";
22
+ import { o as probeGateway, r as resolveGatewayProbeAuth$1, t as runSecurityAudit } from "./audit-BNmzld5I.js";
23
+ import { l as getLastGatewayStartupTraceSnapshot, t as formatHealthChannelLines } from "./health-DcurJYny.js";
24
+ import { t as resolveHeartbeatSummaryForAgent } from "./heartbeat-runner-CY41VFZE.js";
25
25
  import { d as formatUpdateChannelLabel, h as resolveEffectiveUpdateChannel, i as formatGitInstallLabel, m as normalizeUpdateChannel, n as compareSemverStrings, t as checkUpdateStatus } from "./update-check-DxBZOPm_.js";
26
26
  import { t as resolveNodeService } from "./node-service-CDCLR3s1.js";
27
27
  import { t as collectChannelStatusIssues } from "./channels-status-issues-BfghfzFs.js";
@@ -1,5 +1,5 @@
1
1
  import { Gu as resolveDefaultAgentId, Wu as resolveAgentWorkspaceDir, Xt as loadConfig, a as createSubsystemLogger, ud as resolveDefaultAgentWorkspaceDir } from "./env-BegRUDBP.js";
2
- import { Oi as createPluginLoaderLogger, c as loadFasedAgentPlugins } from "./model-catalog-CKJx3TlL.js";
2
+ import { Oi as createPluginLoaderLogger, c as loadFasedAgentPlugins } from "./model-catalog-DOuyqwFa.js";
3
3
 
4
4
  //#region src/plugins/status.ts
5
5
  const log = createSubsystemLogger("plugins");
@@ -1,4 +1,4 @@
1
- import { p as markdownToIRWithMeta } from "./media-93Hw7QIY.js";
1
+ import { p as markdownToIRWithMeta } from "./media-CInvDVc0.js";
2
2
  import { t as renderMarkdownWithMarkers } from "./render-BRr7caFG.js";
3
3
 
4
4
  //#region src/markdown/tables.ts
@@ -1,5 +1,5 @@
1
- import { k as createSubsystemLogger } from "./agent-scope-BYecP9O5.js";
2
- import { a as buildImageResizeSideGrid, g as detectMime, i as IMAGE_REDUCE_QUALITY_STEPS, o as getImageMetadata, s as resizeToJpeg } from "./media-93Hw7QIY.js";
1
+ import { k as createSubsystemLogger } from "./agent-scope-Bx0XQq3s.js";
2
+ import { a as buildImageResizeSideGrid, g as detectMime, i as IMAGE_REDUCE_QUALITY_STEPS, o as getImageMetadata, s as resizeToJpeg } from "./media-CInvDVc0.js";
3
3
  import fs from "node:fs/promises";
4
4
 
5
5
  //#region src/media/base64.ts
@@ -1,5 +1,5 @@
1
- import { k as createSubsystemLogger, xs as isPlainObject } from "./agent-scope-BYecP9O5.js";
2
- import "./github-copilot-token-eyrRGmGp.js";
1
+ import { k as createSubsystemLogger, xs as isPlainObject } from "./agent-scope-Bx0XQq3s.js";
2
+ import "./github-copilot-token-DYrFvncE.js";
3
3
  import { createHash } from "node:crypto";
4
4
 
5
5
  //#region src/agents/tool-loop-detection.ts
@@ -1,6 +1,6 @@
1
1
  import { Dn as loadConfig, bl as VERSION, d as resolveDefaultAgentId, df as GATEWAY_CLIENT_CAPS, ld as stripAnsi$1, lp as listThinkingLevelLabels, mf as GATEWAY_CLIENT_NAMES, pf as GATEWAY_CLIENT_MODES, sp as formatThinkingLevels, ud as visibleWidth } from "./agent-scope-CrCe9L5D.js";
2
2
  import { E as resolveResponseUsageMode, a as listChatCommands, o as listChatCommandsForConfig, w as normalizeUsageDisplay } from "./commands-registry-yEHQnayd.js";
3
- import { Z as formatRawAssistantErrorForUi, cr as resolveToolDisplay, sr as formatToolDetail } from "./reply-5d_FBb8m.js";
3
+ import { Z as formatRawAssistantErrorForUi, cr as resolveToolDisplay, sr as formatToolDetail } from "./reply-DVGmtLPq.js";
4
4
  import { c as normalizeMainKey, r as buildAgentMainSessionKey, s as normalizeAgentId, w as parseAgentSessionKey } from "./session-key-LmCHAJTQ.js";
5
5
  import { i as stripLeadingInboundMetadata } from "./chat-envelope-D_wSv26N.js";
6
6
  import { t as redactSensitiveUrl } from "./redact-sensitive-url-B0RJQqO7.js";
@@ -1,5 +1,5 @@
1
1
  import { Cf as GATEWAY_CLIENT_MODES, Gu as resolveDefaultAgentId, Hc as formatThinkingLevels, Su as visibleWidth, Wc as listThinkingLevelLabels, Xt as loadConfig, Yc as VERSION, wf as GATEWAY_CLIENT_NAMES, xf as GATEWAY_CLIENT_CAPS, xu as stripAnsi$1 } from "./env-BegRUDBP.js";
2
- import { Ti as resolveToolDisplay, kn as formatRawAssistantErrorForUi, wi as formatToolDetail } from "./model-catalog-CKJx3TlL.js";
2
+ import { Ti as resolveToolDisplay, kn as formatRawAssistantErrorForUi, wi as formatToolDetail } from "./model-catalog-DOuyqwFa.js";
3
3
  import { H as normalizeMainKey, L as buildAgentMainSessionKey, V as normalizeAgentId, it as parseAgentSessionKey, o as stripLeadingInboundMetadata } from "./entry.js";
4
4
  import { t as redactSensitiveUrl } from "./redact-sensitive-url-BW03TVj8.js";
5
5
  import { a as listChatCommands, o as listChatCommandsForConfig, x as resolveResponseUsageMode, y as normalizeUsageDisplay } from "./commands-registry-lZm1rbcm.js";
@@ -2,7 +2,7 @@ import "./env-BegRUDBP.js";
2
2
  import { H as theme } from "./agent-paths-BI1hx-tF.js";
3
3
  import "./send-DiY-R7xq.js";
4
4
  import "./send-D52Cqe9Z.js";
5
- import "./model-catalog-CKJx3TlL.js";
5
+ import "./model-catalog-DOuyqwFa.js";
6
6
  import "./github-copilot-token-A9DiaCB0.js";
7
7
  import { A as defaultRuntime } from "./entry.js";
8
8
  import "./reply-prefix-CKOTLAs6.js";
@@ -45,7 +45,7 @@ import "./send-tByitNFq.js";
45
45
  import "./outbound-attachment-DjAMOo70.js";
46
46
  import "./fetch-C1-cYcji.js";
47
47
  import "./delivery-queue-D7zHbNm4.js";
48
- import "./deps-D7pGfos8.js";
48
+ import "./deps-QnUngXA3.js";
49
49
  import "./frontmatter-BPHGMwFk.js";
50
50
  import "./skills-2eSRzTmM.js";
51
51
  import "./skills-remote-CQrWVunR.js";
@@ -74,7 +74,7 @@ import "./progress-DkVYFLij.js";
74
74
  import "./replies-B5LeYSuO.js";
75
75
  import "./prompt-style-Rmj3c-Ir.js";
76
76
  import "./pairing-labels-u5J0k1yz.js";
77
- import { t as runTui } from "./tui-CpFLYQvY.js";
77
+ import { t as runTui } from "./tui-R-P_OV8J.js";
78
78
 
79
79
  //#region src/cli/tui-cli.ts
80
80
  function registerTuiCli(program) {
@@ -2,7 +2,7 @@ import "./paths-C9FmTW1x.js";
2
2
  import { U as theme } from "./agent-paths-DmOVZE7g.js";
3
3
  import "./agent-scope-CrCe9L5D.js";
4
4
  import "./commands-registry-yEHQnayd.js";
5
- import "./reply-5d_FBb8m.js";
5
+ import "./reply-DVGmtLPq.js";
6
6
  import { d as defaultRuntime } from "./errors-Dx3S3Nrp.js";
7
7
  import "./send-Dbz4ciHO.js";
8
8
  import "./send-BdbzQtpU.js";
@@ -37,7 +37,7 @@ import "./ssrf-Blf4NrHS.js";
37
37
  import "./outbound-attachment-CWs_0-GB.js";
38
38
  import "./fetch-C7U6zkCW.js";
39
39
  import "./delivery-queue-D3PC9MW-.js";
40
- import "./deps-ByxeDZxS.js";
40
+ import "./deps-sd-SQKYn.js";
41
41
  import "./memory-_djkFopW.js";
42
42
  import "./memory-search-DooAj6Eu.js";
43
43
  import "./manager-bJh9XOLh.js";
@@ -76,7 +76,7 @@ import "./skills-remote-DrJ8xN_q.js";
76
76
  import "./skill-commands-Cvv0vOCD.js";
77
77
  import "./prompt-style-CWAacuMq.js";
78
78
  import "./pairing-labels-v1JixmOK.js";
79
- import { t as runTui } from "./tui-BUcLlnJf.js";
79
+ import { t as runTui } from "./tui-DdPEVWjR.js";
80
80
 
81
81
  //#region src/cli/tui-cli.ts
82
82
  function registerTuiCli(program) {
@@ -2,7 +2,7 @@ import { _ as resolveStateDir, u as resolveGatewayPort } from "./paths-C9FmTW1x.
2
2
  import { U as theme, v as pathExists } from "./agent-paths-DmOVZE7g.js";
3
3
  import { $l as runCommandWithTimeout, Mn as writeConfigFile, co as parseSemver, dd as formatCliCommand, fd as replaceCliName, kn as readConfigFileSnapshot, pd as resolveCliName, po as resolveFasedAgentPackageRoot } from "./agent-scope-CrCe9L5D.js";
4
4
  import "./commands-registry-yEHQnayd.js";
5
- import { gi as trimLogTail } from "./reply-5d_FBb8m.js";
5
+ import { gi as trimLogTail } from "./reply-DVGmtLPq.js";
6
6
  import { d as defaultRuntime } from "./errors-Dx3S3Nrp.js";
7
7
  import "./send-Dbz4ciHO.js";
8
8
  import "./send-BdbzQtpU.js";
@@ -37,7 +37,7 @@ import "./ssrf-Blf4NrHS.js";
37
37
  import "./outbound-attachment-CWs_0-GB.js";
38
38
  import "./fetch-C7U6zkCW.js";
39
39
  import "./delivery-queue-D3PC9MW-.js";
40
- import "./deps-ByxeDZxS.js";
40
+ import "./deps-sd-SQKYn.js";
41
41
  import "./memory-_djkFopW.js";
42
42
  import "./memory-search-DooAj6Eu.js";
43
43
  import "./manager-bJh9XOLh.js";
@@ -77,33 +77,33 @@ import "./skills-remote-DrJ8xN_q.js";
77
77
  import "./skill-commands-Cvv0vOCD.js";
78
78
  import { i as stylePromptMessage } from "./prompt-style-CWAacuMq.js";
79
79
  import "./pairing-labels-v1JixmOK.js";
80
- import "./program-context-C8TpaeJh.js";
80
+ import "./program-context-Dc8hoANx.js";
81
81
  import "./skills-status-B-wsfIlG.js";
82
82
  import { n as inheritOptionFromParent } from "./command-options-DEPpN8NK.js";
83
- import { r as installCompletion } from "./completion-cli-BacXX8YP.js";
83
+ import { r as installCompletion } from "./completion-cli-DyJbXhbh.js";
84
84
  import "./managed-up-BykEd-7K.js";
85
85
  import "./daemon-install-helpers-BdhhuvlY.js";
86
86
  import "./systemd-6vRLjUEu.js";
87
87
  import { t as resolveGatewayService } from "./service-DRKrlJSw.js";
88
88
  import "./service-audit-1anzCSV2.js";
89
89
  import "./shared-DnllDWpn.js";
90
- import { a as terminateStaleGatewayPids, i as renderRestartDiagnostics, o as waitForGatewayHealthyRestart, r as runDaemonRestart, s as runDaemonInstall } from "./daemon-cli-tLppiRYp.js";
90
+ import { a as terminateStaleGatewayPids, i as renderRestartDiagnostics, o as waitForGatewayHealthyRestart, r as runDaemonRestart, s as runDaemonInstall } from "./daemon-cli-Cj4_RgEM.js";
91
91
  import "./diagnostics-BHiuBYC1.js";
92
92
  import { t as renderTable } from "./table-BMmOL0ek.js";
93
- import "./health-Ds6nghRW.js";
94
- import "./heartbeat-runner-DZd7FWr_.js";
93
+ import "./health-DcurJYny.js";
94
+ import "./heartbeat-runner-CY41VFZE.js";
95
95
  import { a as resolveNpmChannelTag, c as DEFAULT_PACKAGE_CHANNEL, d as formatUpdateChannelLabel, g as resolveUpdateChannelDisplay, h as resolveEffectiveUpdateChannel, m as normalizeUpdateChannel, n as compareSemverStrings, r as fetchNpmTagVersion, s as DEFAULT_GIT_CHANNEL, t as checkUpdateStatus, u as channelToNpmTag } from "./update-check-DxBZOPm_.js";
96
96
  import "./logging-Dv2wthF_.js";
97
97
  import "./installs-8bxu3Tg4.js";
98
98
  import { n as updateNpmInstalledPlugins, t as syncPluginsForUpdateChannel } from "./update-DSvuG3PT.js";
99
99
  import "./channels-status-issues-BfghfzFs.js";
100
100
  import { i as resolveUpdateAvailability, n as formatUpdateOneLiner, t as formatUpdateAvailableHint } from "./status.update-C0YURTQB.js";
101
- import { a as globalInstallArgs, c as readPackageVersion, i as detectGlobalInstallManagerForRoot, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as readPackageName, t as runGatewayUpdate } from "./update-runner-giHs-roY.js";
101
+ import { a as globalInstallArgs, c as readPackageName, i as detectGlobalInstallManagerForRoot, l as readPackageVersion, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as resolveNodeModulesRootForPackageRoot, t as runGatewayUpdate } from "./update-runner-DNPfs265.js";
102
102
  import "./note-CxT47nBY.js";
103
103
  import "./doctor-config-flow-Dm0RO_rE.js";
104
104
  import "./systemd-linger-dUwTq3fl.js";
105
105
  import "./health-format-BGbDYfmf.js";
106
- import { a as ensureCompletionCacheExists, i as checkShellCompletionStatus, n as doctorCommand, r as runPostUpdateDoctorRepair, t as selectStyled } from "./prompt-select-styled--unDG0y5.js";
106
+ import { a as ensureCompletionCacheExists, i as checkShellCompletionStatus, n as doctorCommand, r as runPostUpdateDoctorRepair, t as selectStyled } from "./prompt-select-styled-oUCALY2N.js";
107
107
  import os from "node:os";
108
108
  import path from "node:path";
109
109
  import fs from "node:fs/promises";
@@ -426,11 +426,11 @@ function inferUpdateFailureHints(result) {
426
426
  const hints = [];
427
427
  if (failedStep.name.startsWith("global update") && stderr.includes("eacces")) {
428
428
  hints.push("Detected permission failure (EACCES). Re-run with a writable global prefix or sudo (for system-managed Node installs).");
429
- hints.push("Example: npm config set prefix ~/.local && npm i -g fased@latest");
429
+ hints.push("Example: npm config set prefix ~/.local && npm i -g @fased/fased@latest");
430
430
  }
431
431
  if (failedStep.name.startsWith("global update") && (stderr.includes("node-gyp") || stderr.includes("@discordjs/opus") || stderr.includes("prebuild"))) {
432
432
  hints.push("Detected native optional dependency build failure (e.g. opus). The updater retries with --omit=optional automatically.");
433
- hints.push("If it still fails: npm i -g fased@latest --omit=optional");
433
+ hints.push("If it still fails: npm i -g @fased/fased@latest --omit=optional");
434
434
  }
435
435
  return hints;
436
436
  }
@@ -789,7 +789,7 @@ async function runPackageInstallUpdate(params) {
789
789
  const packageName = (pkgRoot ? await readPackageName(pkgRoot) : await readPackageName(params.root)) ?? DEFAULT_PACKAGE_NAME;
790
790
  const beforeVersion = pkgRoot ? await readPackageVersion(pkgRoot) : null;
791
791
  if (pkgRoot) await cleanupGlobalRenameDirs({
792
- globalRoot: path.dirname(pkgRoot),
792
+ globalRoot: resolveNodeModulesRootForPackageRoot(pkgRoot),
793
793
  packageName
794
794
  });
795
795
  const steps = [await runUpdateStep({
@@ -1085,7 +1085,7 @@ async function updateCommand(opts) {
1085
1085
  else if (updateInstallKind === "git") {
1086
1086
  actions.push(`Run git update flow on channel ${channel}`);
1087
1087
  if (channel === "dev") actions.push(opts.safeFallback ? "Dev repair mode: try older main commits if the latest commit fails preflight" : "Dev mode: preflight only latest origin/main");
1088
- } else actions.push(`Run global package manager update with spec fased@${tag}`);
1088
+ } else actions.push(`Run global package manager update with spec ${DEFAULT_PACKAGE_NAME}@${tag}`);
1089
1089
  actions.push("Run plugin update sync after core update");
1090
1090
  actions.push("Refresh shell completion cache (if needed)");
1091
1091
  actions.push(shouldRestart ? "Restart gateway service and run doctor checks" : "Skip restart (because --no-restart is set)");
@@ -1189,7 +1189,7 @@ async function updateCommand(opts) {
1189
1189
  if (result.reason === "dirty") defaultRuntime.log(theme.warn("Skipped: working directory has uncommitted changes. Commit or stash them first."));
1190
1190
  if (result.reason === "not-git-install") {
1191
1191
  defaultRuntime.log(theme.warn(`Skipped: this FasedAgent install isn't a git checkout, and the package manager couldn't be detected. Update via your package manager, then run \`${replaceCliName(formatCliCommand("fased doctor"), CLI_NAME)}\` and \`${replaceCliName(formatCliCommand("fased gateway restart"), CLI_NAME)}\`.`));
1192
- defaultRuntime.log(theme.muted(`Examples: \`${replaceCliName("npm i -g fased@latest", CLI_NAME)}\` or \`${replaceCliName("pnpm add -g fased@latest", CLI_NAME)}\``));
1192
+ defaultRuntime.log(theme.muted(`Examples: \`${replaceCliName("npm i -g @fased/fased@latest", CLI_NAME)}\` or \`${replaceCliName("pnpm add -g @fased/fased@latest", CLI_NAME)}\``));
1193
1193
  }
1194
1194
  defaultRuntime.exit(0);
1195
1195
  return;
@@ -2,7 +2,7 @@ import { Cu as formatCliCommand, Qt as readConfigFileSnapshot, Tu as resolveCliN
2
2
  import { H as theme, _ as pathExists } from "./agent-paths-BI1hx-tF.js";
3
3
  import "./send-DiY-R7xq.js";
4
4
  import "./send-D52Cqe9Z.js";
5
- import { Kr as trimLogTail } from "./model-catalog-CKJx3TlL.js";
5
+ import { Kr as trimLogTail } from "./model-catalog-DOuyqwFa.js";
6
6
  import "./github-copilot-token-A9DiaCB0.js";
7
7
  import { A as defaultRuntime, Ct as resolveStateDir, gt as resolveGatewayPort } from "./entry.js";
8
8
  import "./reply-prefix-CKOTLAs6.js";
@@ -45,7 +45,7 @@ import "./send-tByitNFq.js";
45
45
  import "./outbound-attachment-DjAMOo70.js";
46
46
  import "./fetch-C1-cYcji.js";
47
47
  import "./delivery-queue-D7zHbNm4.js";
48
- import "./deps-D7pGfos8.js";
48
+ import "./deps-QnUngXA3.js";
49
49
  import "./frontmatter-BPHGMwFk.js";
50
50
  import "./skills-2eSRzTmM.js";
51
51
  import "./skills-remote-CQrWVunR.js";
@@ -77,9 +77,9 @@ import { i as stylePromptMessage } from "./prompt-style-Rmj3c-Ir.js";
77
77
  import "./pairing-labels-u5J0k1yz.js";
78
78
  import "./skills-status-peBM5vvA.js";
79
79
  import { n as inheritOptionFromParent } from "./command-options-j8s8APBQ.js";
80
- import { r as installCompletion } from "./completion-cli-atZPWxpk.js";
81
- import "./register.subclis-BmntpHBV.js";
82
- import "./command-registry-DSG9UhC4.js";
80
+ import { r as installCompletion } from "./completion-cli-BRvgVQzN.js";
81
+ import "./register.subclis-DEnba1hq.js";
82
+ import "./command-registry-mptWJW8S.js";
83
83
  import "./program-context-CDFrVtWb.js";
84
84
  import "./managed-up-DhYefvn4.js";
85
85
  import "./daemon-install-helpers-BPdikKF-.js";
@@ -87,23 +87,23 @@ import "./systemd-CWa7eQgH.js";
87
87
  import { t as resolveGatewayService } from "./service-CPGs_iPU.js";
88
88
  import "./service-audit-Daqv2ulM.js";
89
89
  import "./shared-BO4hP_yT.js";
90
- import { a as terminateStaleGatewayPids, i as renderRestartDiagnostics, o as waitForGatewayHealthyRestart, r as runDaemonRestart, s as runDaemonInstall } from "./daemon-cli-DVu8h_ms.js";
90
+ import { a as terminateStaleGatewayPids, i as renderRestartDiagnostics, o as waitForGatewayHealthyRestart, r as runDaemonRestart, s as runDaemonInstall } from "./daemon-cli-LLGP6g2r.js";
91
91
  import "./diagnostics-J_ooWcgT.js";
92
92
  import { t as renderTable } from "./table-DiHPQeoC.js";
93
- import "./health-Cn7Uypmr.js";
94
- import "./heartbeat-runner-DPf55KvT.js";
93
+ import "./health-BfGnSyOV.js";
94
+ import "./heartbeat-runner-CJZStXhx.js";
95
95
  import { a as resolveNpmChannelTag, c as DEFAULT_PACKAGE_CHANNEL, d as formatUpdateChannelLabel, g as resolveUpdateChannelDisplay, h as resolveEffectiveUpdateChannel, m as normalizeUpdateChannel, n as compareSemverStrings, r as fetchNpmTagVersion, s as DEFAULT_GIT_CHANNEL, t as checkUpdateStatus, u as channelToNpmTag } from "./update-check-vt58Ppts.js";
96
96
  import "./logging-DZ32I_SP.js";
97
97
  import "./installs-C05yaQSr.js";
98
98
  import { n as updateNpmInstalledPlugins, t as syncPluginsForUpdateChannel } from "./update-CfW8YMNn.js";
99
99
  import "./channels-status-issues-DzJA9WTM.js";
100
100
  import { i as resolveUpdateAvailability, n as formatUpdateOneLiner, t as formatUpdateAvailableHint } from "./status.update-B7_3iIjY.js";
101
- import { a as globalInstallArgs, c as readPackageVersion, i as detectGlobalInstallManagerForRoot, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as readPackageName, t as runGatewayUpdate } from "./update-runner-E5f53ziH.js";
101
+ import { a as globalInstallArgs, c as readPackageName, i as detectGlobalInstallManagerForRoot, l as readPackageVersion, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as resolveNodeModulesRootForPackageRoot, t as runGatewayUpdate } from "./update-runner-COs-YDhT.js";
102
102
  import "./note-CNqZk-m3.js";
103
103
  import "./doctor-config-flow-BHTw4J71.js";
104
104
  import "./systemd-linger-BMCefXv6.js";
105
105
  import "./health-format-DEsFwYbP.js";
106
- import { a as ensureCompletionCacheExists, i as checkShellCompletionStatus, n as doctorCommand, r as runPostUpdateDoctorRepair, t as selectStyled } from "./prompt-select-styled-BBW8ExAu.js";
106
+ import { a as ensureCompletionCacheExists, i as checkShellCompletionStatus, n as doctorCommand, r as runPostUpdateDoctorRepair, t as selectStyled } from "./prompt-select-styled-9E7HlPjk.js";
107
107
  import { spawn, spawnSync } from "node:child_process";
108
108
  import os from "node:os";
109
109
  import path from "node:path";
@@ -426,11 +426,11 @@ function inferUpdateFailureHints(result) {
426
426
  const hints = [];
427
427
  if (failedStep.name.startsWith("global update") && stderr.includes("eacces")) {
428
428
  hints.push("Detected permission failure (EACCES). Re-run with a writable global prefix or sudo (for system-managed Node installs).");
429
- hints.push("Example: npm config set prefix ~/.local && npm i -g fased@latest");
429
+ hints.push("Example: npm config set prefix ~/.local && npm i -g @fased/fased@latest");
430
430
  }
431
431
  if (failedStep.name.startsWith("global update") && (stderr.includes("node-gyp") || stderr.includes("@discordjs/opus") || stderr.includes("prebuild"))) {
432
432
  hints.push("Detected native optional dependency build failure (e.g. opus). The updater retries with --omit=optional automatically.");
433
- hints.push("If it still fails: npm i -g fased@latest --omit=optional");
433
+ hints.push("If it still fails: npm i -g @fased/fased@latest --omit=optional");
434
434
  }
435
435
  return hints;
436
436
  }
@@ -789,7 +789,7 @@ async function runPackageInstallUpdate(params) {
789
789
  const packageName = (pkgRoot ? await readPackageName(pkgRoot) : await readPackageName(params.root)) ?? DEFAULT_PACKAGE_NAME;
790
790
  const beforeVersion = pkgRoot ? await readPackageVersion(pkgRoot) : null;
791
791
  if (pkgRoot) await cleanupGlobalRenameDirs({
792
- globalRoot: path.dirname(pkgRoot),
792
+ globalRoot: resolveNodeModulesRootForPackageRoot(pkgRoot),
793
793
  packageName
794
794
  });
795
795
  const steps = [await runUpdateStep({
@@ -1085,7 +1085,7 @@ async function updateCommand(opts) {
1085
1085
  else if (updateInstallKind === "git") {
1086
1086
  actions.push(`Run git update flow on channel ${channel}`);
1087
1087
  if (channel === "dev") actions.push(opts.safeFallback ? "Dev repair mode: try older main commits if the latest commit fails preflight" : "Dev mode: preflight only latest origin/main");
1088
- } else actions.push(`Run global package manager update with spec fased@${tag}`);
1088
+ } else actions.push(`Run global package manager update with spec ${DEFAULT_PACKAGE_NAME}@${tag}`);
1089
1089
  actions.push("Run plugin update sync after core update");
1090
1090
  actions.push("Refresh shell completion cache (if needed)");
1091
1091
  actions.push(shouldRestart ? "Restart gateway service and run doctor checks" : "Skip restart (because --no-restart is set)");
@@ -1189,7 +1189,7 @@ async function updateCommand(opts) {
1189
1189
  if (result.reason === "dirty") defaultRuntime.log(theme.warn("Skipped: working directory has uncommitted changes. Commit or stash them first."));
1190
1190
  if (result.reason === "not-git-install") {
1191
1191
  defaultRuntime.log(theme.warn(`Skipped: this FasedAgent install isn't a git checkout, and the package manager couldn't be detected. Update via your package manager, then run \`${replaceCliName(formatCliCommand("fased doctor"), CLI_NAME)}\` and \`${replaceCliName(formatCliCommand("fased gateway restart"), CLI_NAME)}\`.`));
1192
- defaultRuntime.log(theme.muted(`Examples: \`${replaceCliName("npm i -g fased@latest", CLI_NAME)}\` or \`${replaceCliName("pnpm add -g fased@latest", CLI_NAME)}\``));
1192
+ defaultRuntime.log(theme.muted(`Examples: \`${replaceCliName("npm i -g @fased/fased@latest", CLI_NAME)}\` or \`${replaceCliName("pnpm add -g @fased/fased@latest", CLI_NAME)}\``));
1193
1193
  }
1194
1194
  defaultRuntime.exit(0);
1195
1195
  return;
@@ -1,6 +1,6 @@
1
1
  import { md as runCommandWithTimeout } from "./env-BegRUDBP.js";
2
2
  import { _ as pathExists } from "./agent-paths-BI1hx-tF.js";
3
- import { Ja as resolveControlUiDistIndexPathForRoot, Kr as trimLogTail, qa as resolveControlUiDistIndexHealth } from "./model-catalog-CKJx3TlL.js";
3
+ import { Ja as resolveControlUiDistIndexPathForRoot, Kr as trimLogTail, qa as resolveControlUiDistIndexHealth } from "./model-catalog-DOuyqwFa.js";
4
4
  import { c as DEFAULT_PACKAGE_CHANNEL, f as isBetaTag, l as DEV_BRANCH, n as compareSemverStrings, o as detectPackageManager$1, p as isStableTag, s as DEFAULT_GIT_CHANNEL, u as channelToNpmTag } from "./update-check-vt58Ppts.js";
5
5
  import os from "node:os";
6
6
  import path from "node:path";
@@ -48,6 +48,31 @@ function resolveBunGlobalRoot() {
48
48
  const bunInstall = process.env.BUN_INSTALL?.trim() || path.join(os.homedir(), ".bun");
49
49
  return path.join(bunInstall, "install", "global", "node_modules");
50
50
  }
51
+ function resolveNodeModulesRootForPackageRoot(pkgRoot) {
52
+ const parent = path.dirname(pkgRoot);
53
+ if (path.basename(parent).startsWith("@")) return path.dirname(parent);
54
+ return parent;
55
+ }
56
+ function resolveHostedNpmInstallTarget(pkgRoot) {
57
+ const resolved = path.resolve(pkgRoot);
58
+ const prefixMarker = `${path.sep}.fased${path.sep}install-cache${path.sep}npm-global`;
59
+ const globalRootMarker = `${prefixMarker}${`${path.sep}lib${path.sep}node_modules`}`;
60
+ const markerIndex = resolved.indexOf(`${globalRootMarker}${path.sep}`);
61
+ if (markerIndex < 0) return null;
62
+ const prefix = resolved.slice(0, markerIndex + prefixMarker.length);
63
+ const globalRoot = path.join(prefix, "lib", "node_modules");
64
+ const cache = path.join(path.dirname(prefix), "npm-cache");
65
+ const expectedRoot = resolveNodeModulesRootForPackageRoot(resolved);
66
+ if (path.resolve(expectedRoot) !== path.resolve(globalRoot)) return null;
67
+ return {
68
+ manager: "npm",
69
+ globalRoot,
70
+ env: {
71
+ npm_config_prefix: prefix,
72
+ npm_config_cache: cache
73
+ }
74
+ };
75
+ }
51
76
  async function resolveGlobalRoot(manager, runCommand, timeoutMs) {
52
77
  if (manager === "bun") return resolveBunGlobalRoot();
53
78
  const res = await runCommand(manager === "pnpm" ? [
@@ -72,6 +97,8 @@ async function resolveGlobalPackageRoot(manager, runCommand, timeoutMs) {
72
97
  return path.join(root, PRIMARY_PACKAGE_NAME);
73
98
  }
74
99
  async function detectGlobalInstallManagerForRoot(runCommand, pkgRoot, timeoutMs) {
100
+ const hostedTarget = resolveHostedNpmInstallTarget(pkgRoot);
101
+ if (hostedTarget) return hostedTarget.manager;
75
102
  const pkgReal = await tryRealpath(pkgRoot);
76
103
  for (const { manager, argv } of [{
77
104
  manager: "npm",
@@ -913,11 +940,16 @@ async function runGatewayUpdate(opts = {}) {
913
940
  durationMs: Date.now() - startedAt
914
941
  };
915
942
  const beforeVersion = await readPackageVersion(pkgRoot);
916
- const globalManager = await detectGlobalInstallManagerForRoot(runCommand, pkgRoot, timeoutMs);
943
+ const hostedTarget = resolveHostedNpmInstallTarget(pkgRoot);
944
+ const globalManager = hostedTarget?.manager ?? await detectGlobalInstallManagerForRoot(runCommand, pkgRoot, timeoutMs);
917
945
  if (globalManager) {
918
946
  const packageName = await readPackageName(pkgRoot) ?? DEFAULT_PACKAGE_NAME;
947
+ const globalEnv = hostedTarget?.env ? {
948
+ ...process.env,
949
+ ...hostedTarget.env
950
+ } : void 0;
919
951
  await cleanupGlobalRenameDirs({
920
- globalRoot: path.dirname(pkgRoot),
952
+ globalRoot: hostedTarget?.globalRoot ?? resolveNodeModulesRootForPackageRoot(pkgRoot),
921
953
  packageName
922
954
  });
923
955
  const channel = opts.channel ?? DEFAULT_PACKAGE_CHANNEL;
@@ -929,6 +961,7 @@ async function runGatewayUpdate(opts = {}) {
929
961
  argv: globalInstallArgs(globalManager, spec),
930
962
  cwd: pkgRoot,
931
963
  timeoutMs,
964
+ env: globalEnv,
932
965
  progress,
933
966
  stepIndex: 0,
934
967
  totalSteps: 1
@@ -944,6 +977,7 @@ async function runGatewayUpdate(opts = {}) {
944
977
  argv: fallbackArgv,
945
978
  cwd: pkgRoot,
946
979
  timeoutMs,
980
+ env: globalEnv,
947
981
  progress,
948
982
  stepIndex: 0,
949
983
  totalSteps: 1
@@ -976,4 +1010,4 @@ async function runGatewayUpdate(opts = {}) {
976
1010
  }
977
1011
 
978
1012
  //#endregion
979
- export { globalInstallArgs as a, readPackageVersion as c, detectGlobalInstallManagerForRoot as i, cleanupGlobalRenameDirs as n, resolveGlobalPackageRoot as o, detectGlobalInstallManagerByPresence as r, readPackageName as s, runGatewayUpdate as t };
1013
+ export { globalInstallArgs as a, readPackageName as c, detectGlobalInstallManagerForRoot as i, readPackageVersion as l, cleanupGlobalRenameDirs as n, resolveGlobalPackageRoot as o, detectGlobalInstallManagerByPresence as r, resolveNodeModulesRootForPackageRoot as s, runGatewayUpdate as t };