@fased/fased 0.1.49 → 0.1.52

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 (337) hide show
  1. package/dist/acp/client.js +2 -2
  2. package/dist/acp/secret-file.js +2 -2
  3. package/dist/agents/agent-scope.js +2 -2
  4. package/dist/agents/apply-patch.js +8 -8
  5. package/dist/agents/auth-profiles/paths.js +2 -2
  6. package/dist/agents/auth-profiles/store.js +2 -2
  7. package/dist/agents/bash-tools.shared.js +2 -2
  8. package/dist/agents/cli-credentials.js +4 -4
  9. package/dist/agents/current-model-catalog.js +45 -0
  10. package/dist/agents/docs-path.js +3 -3
  11. package/dist/agents/embedded-pi-mcp.js +4 -4
  12. package/dist/agents/identity-avatar.js +3 -3
  13. package/dist/agents/identity-file.js +2 -2
  14. package/dist/agents/model-catalog-source.js +28 -3
  15. package/dist/agents/pi-embedded-subscribe.raw-stream.js +3 -3
  16. package/dist/agents/pi-extensions/compaction-safeguard.js +3 -3
  17. package/dist/agents/pi-model-discovery.js +6 -6
  18. package/dist/agents/pi-project-settings.js +3 -3
  19. package/dist/agents/provider-id.js +1 -1
  20. package/dist/agents/sandbox/fs-bridge.js +2 -2
  21. package/dist/agents/session-dirs.js +4 -4
  22. package/dist/agents/session-write-lock.js +13 -13
  23. package/dist/agents/shell-utils.js +5 -5
  24. package/dist/agents/skills/bundled-dir.js +4 -4
  25. package/dist/agents/skills/local-loader.js +6 -6
  26. package/dist/agents/skills/plugin-skills.js +2 -2
  27. package/dist/agents/skills/workspace.js +13 -13
  28. package/dist/agents/skills-install-download.js +7 -7
  29. package/dist/agents/skills-install-plan.js +2 -2
  30. package/dist/agents/skills-install.js +2 -2
  31. package/dist/agents/skills-status.js +2 -2
  32. package/dist/agents/subagent-depth.js +2 -2
  33. package/dist/agents/system-prompt-params.js +2 -2
  34. package/dist/agents/workspace.js +22 -22
  35. package/dist/auto-reply/reply/agent-runner-execution.js +2 -2
  36. package/dist/auto-reply/reply/agent-runner.js +2 -2
  37. package/dist/auto-reply/reply/commands-export-session.js +7 -7
  38. package/dist/auto-reply/reply/post-compaction-audit.js +3 -3
  39. package/dist/auto-reply/reply/post-compaction-context.js +3 -3
  40. package/dist/auto-reply/reply/session.js +3 -3
  41. package/dist/auto-reply/skill-commands.js +3 -3
  42. package/dist/auto-reply/status.js +6 -6
  43. package/dist/brand.js +1 -1
  44. package/dist/browser/chrome.executables.js +3 -3
  45. package/dist/browser/chrome.js +3 -3
  46. package/dist/browser/chrome.profile-decoration.js +6 -6
  47. package/dist/browser/profiles-service.js +2 -2
  48. package/dist/browser/server-context.js +2 -2
  49. package/dist/browser/trash.js +4 -4
  50. package/dist/build-info.json +3 -3
  51. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  52. package/dist/canvas-host/server.js +4 -4
  53. package/dist/capabilities/catalog.js +3 -3
  54. package/dist/channels/plugins/catalog.js +3 -3
  55. package/dist/cli/browser-cli-extension.js +6 -6
  56. package/dist/cli/command-format.js +2 -2
  57. package/dist/cli/cron-cli/register.cron-simple.js +2 -2
  58. package/dist/cli/dns-cli.js +9 -9
  59. package/dist/cli/gateway-cli/dev.js +5 -5
  60. package/dist/cli/gateway-cli/run.js +2 -2
  61. package/dist/cli/hooks-cli.js +5 -5
  62. package/dist/cli/lightweight/gateway-runtime-probe.js +50 -0
  63. package/dist/cli/memory-cli.js +7 -7
  64. package/dist/cli/nodes-media-utils.js +2 -2
  65. package/dist/cli/plugins-cli.js +2 -2
  66. package/dist/cli/secrets-cli.js +3 -3
  67. package/dist/cli/update-cli/update-command.js +120 -0
  68. package/dist/cli/windows-argv.js +2 -2
  69. package/dist/commands/dashboard-link.js +3 -3
  70. package/dist/commands/doctor-install.js +5 -5
  71. package/dist/commands/doctor-memory-search.js +2 -2
  72. package/dist/commands/doctor-platform-notes.js +2 -2
  73. package/dist/commands/doctor-sandbox.js +2 -2
  74. package/dist/commands/doctor-state-integrity.js +23 -23
  75. package/dist/commands/doctor-workspace.js +3 -3
  76. package/dist/commands/doctor.js +3 -3
  77. package/dist/commands/managed-up.js +2 -2
  78. package/dist/commands/onboard-auth.credentials.js +3 -3
  79. package/dist/commands/onboarding/plugin-install.js +2 -2
  80. package/dist/commands/sessions-cleanup.js +2 -2
  81. package/dist/commands/signal-install.js +6 -6
  82. package/dist/commands/status-all/channels.js +2 -2
  83. package/dist/commands/wallet.js +47 -47
  84. package/dist/config/cache-utils.js +2 -2
  85. package/dist/config/includes.js +5 -5
  86. package/dist/config/io.js +2 -2
  87. package/dist/config/paths.js +3 -3
  88. package/dist/config/sat-runtime-ids.js +3 -3
  89. package/dist/config/sessions/disk-budget.js +6 -6
  90. package/dist/config/sessions/paths.js +2 -2
  91. package/dist/config/sessions/store.js +17 -17
  92. package/dist/config/sessions/transcript.js +4 -4
  93. package/dist/config/talk.js +2 -2
  94. package/dist/control-ui/assets/{app-6iCry787.js → app-Bf5WlHKE.js} +1743 -1738
  95. package/dist/control-ui/assets/{chat-model-ref-C6CFR-GR.js → chat-model-ref-NT82zapt.js} +2 -2
  96. package/dist/control-ui/assets/{index-CNFgocD9.js → index-DWM6gKjy.js} +3 -3
  97. package/dist/control-ui/assets/{providers-WTJ1kMKy.js → providers-rQMhp1fb.js} +2 -11
  98. package/dist/control-ui/index.html +1 -1
  99. package/dist/cron/service/store.js +2 -2
  100. package/dist/cron/store.js +6 -6
  101. package/dist/daemon/systemd-system.js +5 -5
  102. package/dist/discord/monitor/thread-bindings.state.js +2 -2
  103. package/dist/extensions/sat-mining/src/sat-bond-layout.js +9 -9
  104. package/dist/gateway/control-ui-boot-check.js +6 -6
  105. package/dist/gateway/control-ui-login.js +7 -7
  106. package/dist/gateway/control-ui.js +9 -9
  107. package/dist/gateway/hooks-mapping.js +4 -4
  108. package/dist/gateway/probe-payload.js +14 -0
  109. package/dist/gateway/probe.js +8 -4
  110. package/dist/gateway/server-discovery.js +2 -2
  111. package/dist/gateway/server-http-lazy.js +2 -4
  112. package/dist/gateway/server-http.js +6 -8
  113. package/dist/gateway/server-methods/chat.js +3 -3
  114. package/dist/gateway/server-methods/models.js +3 -2
  115. package/dist/gateway/server-methods/sessions.js +6 -6
  116. package/dist/gateway/server-methods/usage.js +2 -2
  117. package/dist/gateway/server.impl.js +3 -3
  118. package/dist/gateway/session-compaction-checkpoints.js +4 -4
  119. package/dist/gateway/session-utils.fs.js +24 -24
  120. package/dist/gateway/session-utils.js +6 -6
  121. package/dist/hooks/bundled-dir.js +4 -4
  122. package/dist/hooks/gmail-setup-utils.js +6 -6
  123. package/dist/hooks/import-url.js +2 -2
  124. package/dist/hooks/loader.js +4 -4
  125. package/dist/hooks/workspace.js +7 -7
  126. package/dist/infra/archive.js +17 -17
  127. package/dist/infra/boundary-file-read.js +2 -2
  128. package/dist/infra/boundary-path.js +15 -15
  129. package/dist/infra/brew.js +2 -2
  130. package/dist/infra/control-ui-assets.js +14 -14
  131. package/dist/infra/device-auth-store.js +8 -8
  132. package/dist/infra/device-identity.js +8 -8
  133. package/dist/infra/dotenv.js +2 -2
  134. package/dist/infra/exec-approvals.js +8 -8
  135. package/dist/infra/exec-command-resolution.js +4 -4
  136. package/dist/infra/exec-safe-bin-trust.js +2 -2
  137. package/dist/infra/fased-root.js +5 -5
  138. package/dist/infra/fs-safe.js +14 -14
  139. package/dist/infra/gateway-lock.js +11 -11
  140. package/dist/infra/git-commit.js +5 -5
  141. package/dist/infra/git-root.js +4 -4
  142. package/dist/infra/hosted-runtime-artifact.js +3 -3
  143. package/dist/infra/is-main.js +2 -2
  144. package/dist/infra/json-file.js +7 -7
  145. package/dist/infra/outbound/delivery-queue.js +16 -16
  146. package/dist/infra/path-env.js +3 -3
  147. package/dist/infra/ports-lsof.js +4 -4
  148. package/dist/infra/provider-usage.auth.js +3 -3
  149. package/dist/infra/safe-open-sync.js +2 -2
  150. package/dist/infra/session-cost-usage.js +9 -9
  151. package/dist/infra/shell-env.js +2 -2
  152. package/dist/infra/state-migrations.fs.js +6 -6
  153. package/dist/infra/state-migrations.js +23 -23
  154. package/dist/infra/tmp-fased-dir.js +6 -6
  155. package/dist/infra/widearea-dns.js +3 -3
  156. package/dist/infra/wsl.js +2 -2
  157. package/dist/light-update-precheck.js +1 -1
  158. package/dist/light-update-status.js +1 -1
  159. package/dist/line/accounts.js +2 -2
  160. package/dist/line/download.js +2 -2
  161. package/dist/logging/config.js +3 -3
  162. package/dist/logging/logger.js +7 -7
  163. package/dist/managed/federation.js +3 -3
  164. package/dist/managed/tunnel.js +3 -3
  165. package/dist/media/store.js +13 -13
  166. package/dist/media-understanding/runner.js +3 -3
  167. package/dist/memory/embeddings.js +2 -2
  168. package/dist/memory/internal.js +10 -10
  169. package/dist/memory/manager-sync-ops.js +7 -7
  170. package/dist/memory/repair-executor.js +17 -17
  171. package/dist/node-host/invoke-system-run-plan.js +8 -8
  172. package/dist/node-host/invoke.js +2 -2
  173. package/dist/node-host/runner.js +3 -3
  174. package/dist/pairing/pairing-store.js +3 -3
  175. package/dist/plugin-sdk/{accounts-B5fY9hZy.js → accounts-BZrfqJmO.js} +1 -1
  176. package/dist/plugin-sdk/{actions-D-9SsSEy.js → actions-7_zTh8zC.js} +2 -2
  177. package/dist/plugin-sdk/{active-listener-BH7rDR47.js → active-listener-D8NVRD8J.js} +1 -1
  178. package/dist/plugin-sdk/{audio-preflight-4faayz5S.js → audio-preflight-D6IPconF.js} +26 -26
  179. package/dist/plugin-sdk/{audit-BQfsboqd.js → audit-2iRlVyQF.js} +1 -1
  180. package/dist/plugin-sdk/{channel-access-CDZ-cJPq.js → channel-access-BCf1rJsn.js} +1 -1
  181. package/dist/plugin-sdk/{channel-access-configure-DlpuhlH6.js → channel-access-configure-B-Z51Qsd.js} +1 -1
  182. package/dist/plugin-sdk/channel-plugin-common.d.ts +2 -2
  183. package/dist/plugin-sdk/channel-plugin-common.js +4 -4
  184. package/dist/plugin-sdk/{chunk-CZuCyS7k.js → chunk-BREC9ijl.js} +1 -1
  185. package/dist/plugin-sdk/{chunk-items-Cyc4Kl6A.js → chunk-items-CTp30xzl.js} +1 -1
  186. package/dist/plugin-sdk/command-status.js +26 -26
  187. package/dist/plugin-sdk/{commands-registry-COIbIjGO.js → commands-registry-D3-bFLsz.js} +2 -2
  188. package/dist/plugin-sdk/{common-LMHJe8KW.js → common-BlqMqEqn.js} +1 -1
  189. package/dist/plugin-sdk/{config-ZMbTT0kM.js → config-442EDe7Z.js} +81 -13
  190. package/dist/plugin-sdk/{config-schema-Cku0a8Tm.js → config-schema-DAyzv2C6.js} +2001 -449
  191. package/dist/plugin-sdk/device-pair.d.ts +1 -1
  192. package/dist/plugin-sdk/discord.d.ts +4 -4
  193. package/dist/plugin-sdk/discord.js +19 -19
  194. package/dist/plugin-sdk/{handle-action-C8ZZfORB.js → handle-action-pNaP87Dr.js} +13 -13
  195. package/dist/plugin-sdk/{helpers-vfzH9tBn.js → helpers-B994qqVW.js} +1 -1
  196. package/dist/plugin-sdk/{image-ops-BnOmQA5d.js → image-ops-Doq8nZQw.js} +1 -1
  197. package/dist/plugin-sdk/index.d.ts +18 -18
  198. package/dist/plugin-sdk/index.js +28 -28
  199. package/dist/plugin-sdk/json-store.js +6 -6
  200. package/dist/plugin-sdk/{login-C73Wpiw8.js → login-CK2zTIJA.js} +3 -3
  201. package/dist/plugin-sdk/{login-qr-CRKHA7i8.js → login-qr-u8Mn1mCp.js} +3 -3
  202. package/dist/plugin-sdk/{manager-CHYhpKHn.js → manager-CeJNf2bH.js} +2 -2
  203. package/dist/plugin-sdk/{markdown-tables-B84dPWNG.js → markdown-tables-DeZztrY6.js} +1 -1
  204. package/dist/plugin-sdk/{media-4daDcNER.js → media-CgUAEfhs.js} +2 -2
  205. package/dist/plugin-sdk/{monitor-DJhU-J5u.js → monitor-CY1W4VTW.js} +31 -31
  206. package/dist/plugin-sdk/{monitor-CChc6bQV.js → monitor-CkDlxeW5.js} +30 -30
  207. package/dist/plugin-sdk/{openresponses-http-Dvyczr35.js → openresponses-http-Cu7NLyPf.js} +26 -26
  208. package/dist/plugin-sdk/{optional-runtime-dependency-BFpqaCzp.js → optional-runtime-dependency-D0BdXz1C.js} +1 -1
  209. package/dist/plugin-sdk/{outbound-C1xBxfNb.js → outbound-DXGuFrdx.js} +6 -6
  210. package/dist/plugin-sdk/{outbound-attachment-DvcxPP7b.js → outbound-attachment-oxhGO33g.js} +2 -2
  211. package/dist/plugin-sdk/{pairing-message-DpYT614h.js → pairing-message-C29ixrvn.js} +1 -1
  212. package/dist/plugin-sdk/{pairing-message-DWXHX-jt.d.ts → pairing-message-DfIyssV_.d.ts} +1 -1
  213. package/dist/plugin-sdk/{pairing-store-CprpGco9.js → pairing-store-1kcsOWRs.js} +2 -2
  214. package/dist/plugin-sdk/{pi-model-discovery-BQ6fFRBA.js → pi-model-discovery-l-xqaEd0.js} +1 -1
  215. package/dist/plugin-sdk/{pi-model-discovery-runtime-BF_89lVj.js → pi-model-discovery-runtime-CibV8F8G.js} +2 -2
  216. package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +1 -1
  217. package/dist/plugin-sdk/{pw-ai-xgpIbHOr.js → pw-ai-9qEBW5-k.js} +3 -3
  218. package/dist/plugin-sdk/{replies-AzJ6U6Ut.js → replies-BX3L8fX7.js} +2 -2
  219. package/dist/plugin-sdk/{resolve-outbound-target-COo_TR7B.js → resolve-outbound-target-D0AK10E7.js} +1 -1
  220. package/dist/plugin-sdk/{resolve-route-CZFzHOIe.js → resolve-route-UO6XLYH3.js} +1 -1
  221. package/dist/plugin-sdk/{retry-policy-BSdqqXsI.js → retry-policy-C5N8JiHL.js} +1 -1
  222. package/dist/plugin-sdk/{runtime-CeoGffDi.js → runtime-Dnzwux3G.js} +3 -3
  223. package/dist/plugin-sdk/{runtime-dependency-Cvbs0GXf.js → runtime-dependency-BDDpVKBO.js} +2 -2
  224. package/dist/plugin-sdk/sat-runtime.d.ts +2 -2
  225. package/dist/plugin-sdk/sat-runtime.js +5 -5
  226. package/dist/plugin-sdk/{send-B_-UtG9F.js → send-B4XLsTL0.js} +6 -6
  227. package/dist/plugin-sdk/{send-DCxAv7bV.js → send-D5rgCP1r.js} +6 -6
  228. package/dist/plugin-sdk/{send-CGE7OgsA.js → send-DGEgo_6f.js} +5 -5
  229. package/dist/plugin-sdk/{send-DVpCBUuL.js → send-DcsYRH2f.js} +7 -7
  230. package/dist/plugin-sdk/{send-C0Q1u7N1.js → send-bcKv8F5E.js} +8 -8
  231. package/dist/plugin-sdk/{session-ETYBbhLn.js → session-BoGNOlwv.js} +2 -2
  232. package/dist/plugin-sdk/{skill-commands-BQL6TBIv.js → skill-commands-Be8s4TGQ.js} +2 -2
  233. package/dist/plugin-sdk/{slack-actions-CBPZkfTS.js → slack-actions-TNnAXiUx.js} +11 -11
  234. package/dist/plugin-sdk/{slack-Bs_4uivd.js → slack-papUjf_h.js} +38 -38
  235. package/dist/plugin-sdk/slack.d.ts +4 -4
  236. package/dist/plugin-sdk/slack.js +9 -9
  237. package/dist/plugin-sdk/{sticker-cache-BBZMp-oQ.js → sticker-cache-CPNu_LEe.js} +3 -3
  238. package/dist/plugin-sdk/{tables-B-G7Bb0l.js → tables-Ch4js2qy.js} +1 -1
  239. package/dist/plugin-sdk/{targets-D8UaoWHd.js → targets-BGfRUJPE.js} +1 -1
  240. package/dist/plugin-sdk/{telegram-actions-BARLx9zc.js → telegram-actions-BO-giM1s.js} +29 -29
  241. package/dist/plugin-sdk/telegram.d.ts +4 -4
  242. package/dist/plugin-sdk/telegram.js +8 -8
  243. package/dist/plugin-sdk/{thread-bindings.lifecycle-DwYKCLLq.js → thread-bindings.lifecycle-_uQ2EF17.js} +3 -3
  244. package/dist/plugin-sdk/{thread-bindings.state-BNWfHA0f.js → thread-bindings.state-DUg0s_1X.js} +2 -2
  245. package/dist/plugin-sdk/{tmp-fased-dir-Be1wBhVz.d.ts → tmp-fased-dir-Bcp1DTSV.d.ts} +1 -1
  246. package/dist/plugin-sdk/{types-CJGVZX6j.d.ts → types-BTkcYtOt.d.ts} +2 -2
  247. package/dist/plugin-sdk/{types-CXLEOrJX.d.ts → types-CMoLtViq.d.ts} +1 -1
  248. package/dist/plugin-sdk/{wallet-status-Coekn_SJ.js → wallet-status-M6aK3abH.js} +3 -3
  249. package/dist/plugin-sdk/{web-BwolzGVF.js → web-QpstZjDX.js} +31 -31
  250. package/dist/plugin-sdk/{whatsapp-actions-CSvf6eev.js → whatsapp-actions-CID_tqAX.js} +13 -13
  251. package/dist/plugin-sdk/{whatsapp-heartbeat-Bw7OtTe6.js → whatsapp-heartbeat-Bk-aZVMa.js} +2 -2
  252. package/dist/plugin-sdk/whatsapp.d.ts +9 -9
  253. package/dist/plugin-sdk/whatsapp.js +12 -12
  254. package/dist/plugin-sdk/{wsl-By1Mc-oS.js → wsl-C_STtED7.js} +3 -3
  255. package/dist/plugin-sdk/{zod-schema.providers-core-TI6sL-6B.d.ts → zod-schema.providers-core-CIzCjXH9.d.ts} +75 -75
  256. package/dist/plugins/bundled-dir.js +3 -3
  257. package/dist/plugins/discovery.js +11 -11
  258. package/dist/plugins/loader.js +13 -13
  259. package/dist/plugins/manifest-registry.js +2 -2
  260. package/dist/plugins/manifest.js +4 -4
  261. package/dist/plugins/path-safety.js +3 -3
  262. package/dist/plugins/status-cache.js +10 -10
  263. package/dist/plugins/update.js +3 -3
  264. package/dist/plugins/web-search-install-catalog.js +3 -3
  265. package/dist/providers/refresh.js +1 -1
  266. package/dist/providers/refreshed-model-capabilities.js +1935 -406
  267. package/dist/providers/registry.js +15 -12
  268. package/dist/secrets/apply.js +16 -16
  269. package/dist/secrets/audit.js +11 -11
  270. package/dist/secrets/shared.js +9 -9
  271. package/dist/security/scan-paths.js +2 -2
  272. package/dist/shared/config-eval.js +2 -2
  273. package/dist/shared/pid-alive.js +2 -2
  274. package/dist/tasks/standing-orders.js +5 -5
  275. package/dist/tasks/task-flow-registry.js +5 -5
  276. package/dist/tasks/task-registry.js +5 -5
  277. package/dist/tasks/workflow-definitions.js +6 -6
  278. package/dist/telegram/token.js +5 -5
  279. package/dist/utils.js +5 -5
  280. package/dist/wallet/local-socket-signer-broker.js +16 -16
  281. package/dist/wallet/providers/embedded-keystore-adapter.js +5 -5
  282. package/dist/wallet/providers/local-socket-signer-adapter.js +2 -2
  283. package/dist/wallet/wallet-approval-auth.js +5 -5
  284. package/dist/wallet/wallet-audit-log.js +5 -5
  285. package/dist/wallet/wallet-custody.js +21 -21
  286. package/dist/wallet/wallet-inbound-events.js +5 -5
  287. package/dist/wallet/wallet-observability.js +5 -5
  288. package/dist/wallet/wallet-policy.js +9 -9
  289. package/dist/wallet/wallet-provider-registry.js +7 -7
  290. package/dist/wallet/wallet-runtime-config.js +3 -3
  291. package/dist/wallet/wallet-secrets-store.js +22 -22
  292. package/dist/wallet/wallet-send-approvals.js +5 -5
  293. package/dist/wallet/wallet-settlement-links.js +5 -5
  294. package/dist/web/accounts.js +3 -3
  295. package/dist/web/auth-store.js +18 -18
  296. package/dist/web/session.js +4 -4
  297. package/dist/wizard/host-security-capability.js +2 -2
  298. package/dist/wizard/onboarding.host-security.js +7 -7
  299. package/dist/wizard/onboarding.js +7 -7
  300. package/dist/wizard/onboarding.wallet.js +44 -44
  301. package/extensions/acpx/package.json +1 -1
  302. package/extensions/bluebubbles/package.json +1 -1
  303. package/extensions/copilot-proxy/package.json +1 -1
  304. package/extensions/diagnostics-otel/package.json +1 -1
  305. package/extensions/fased-federation/package.json +1 -1
  306. package/extensions/google-gemini-cli-auth/package.json +1 -1
  307. package/extensions/imessage/package.json +1 -1
  308. package/extensions/irc/package.json +1 -1
  309. package/extensions/line/package.json +1 -1
  310. package/extensions/llm-task/package.json +1 -1
  311. package/extensions/lobster/package.json +1 -1
  312. package/extensions/matrix/CHANGELOG.md +18 -0
  313. package/extensions/matrix/package.json +1 -1
  314. package/extensions/mattermost/package.json +1 -1
  315. package/extensions/memory-core/package.json +2 -2
  316. package/extensions/memory-lancedb/package.json +1 -1
  317. package/extensions/minimax-portal-auth/package.json +1 -1
  318. package/extensions/msteams/CHANGELOG.md +18 -0
  319. package/extensions/msteams/package.json +1 -1
  320. package/extensions/nextcloud-talk/package.json +1 -1
  321. package/extensions/nostr/CHANGELOG.md +18 -0
  322. package/extensions/nostr/package.json +1 -1
  323. package/extensions/open-prose/package.json +1 -1
  324. package/extensions/sat-mining/package.json +1 -1
  325. package/extensions/signal/package.json +1 -1
  326. package/extensions/synology-chat/package.json +1 -1
  327. package/extensions/tlon/package.json +1 -1
  328. package/extensions/twitch/CHANGELOG.md +18 -0
  329. package/extensions/twitch/package.json +1 -1
  330. package/extensions/voice-call/CHANGELOG.md +18 -0
  331. package/extensions/voice-call/package.json +1 -1
  332. package/extensions/zalo/CHANGELOG.md +18 -0
  333. package/extensions/zalo/package.json +1 -1
  334. package/extensions/zalouser/CHANGELOG.md +18 -0
  335. package/extensions/zalouser/package.json +1 -1
  336. package/package.json +1 -1
  337. package/scripts/start-managed.sh +14 -0
@@ -1,5 +1,5 @@
1
1
  import { ensureWalletStateDir } from "./wallet-runtime-config.js";
2
- import syncFs from "node:fs";
2
+ import fs from "node:fs";
3
3
  import path from "node:path";
4
4
 
5
5
  //#region src/wallet/wallet-settlement-links.ts
@@ -8,14 +8,14 @@ function linksFilePath(env = process.env) {
8
8
  }
9
9
  function loadFile(env = process.env) {
10
10
  const filePath = linksFilePath(env);
11
- if (!syncFs.existsSync(filePath)) {
11
+ if (!fs.existsSync(filePath)) {
12
12
  return {
13
13
  version: 1,
14
14
  links: []
15
15
  };
16
16
  }
17
17
  try {
18
- const parsed = JSON.parse(syncFs.readFileSync(filePath, "utf8"));
18
+ const parsed = JSON.parse(fs.readFileSync(filePath, "utf8"));
19
19
  if (parsed?.version === 1 && Array.isArray(parsed.links)) {
20
20
  return {
21
21
  version: 1,
@@ -30,12 +30,12 @@ function loadFile(env = process.env) {
30
30
  }
31
31
  function saveFile(file, env = process.env) {
32
32
  const filePath = linksFilePath(env);
33
- syncFs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, {
33
+ fs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, {
34
34
  encoding: "utf8",
35
35
  mode: 384
36
36
  });
37
37
  try {
38
- syncFs.chmodSync(filePath, 384);
38
+ fs.chmodSync(filePath, 384);
39
39
  } catch {}
40
40
  }
41
41
  function upsertWalletSettlementLink(params) {
@@ -5,7 +5,7 @@ import "../routing/session-key.js";
5
5
  import { resolveAccountEntry } from "../routing/account-lookup.js";
6
6
  import { createAccountListHelpers } from "../channels/plugins/account-helpers.js";
7
7
  import { hasWebCredsSync } from "./auth-store.js";
8
- import syncFs from "node:fs";
8
+ import fs from "node:fs";
9
9
  import path from "node:path";
10
10
 
11
11
  //#region src/web/accounts.ts
@@ -24,7 +24,7 @@ function listWhatsAppAuthDirs(cfg) {
24
24
  }).authDir);
25
25
  }
26
26
  try {
27
- const entries = syncFs.readdirSync(whatsappDir, { withFileTypes: true });
27
+ const entries = fs.readdirSync(whatsappDir, { withFileTypes: true });
28
28
  for (const entry of entries) {
29
29
  if (!entry.isDirectory()) {
30
30
  continue;
@@ -48,7 +48,7 @@ function resolveLegacyAuthDir() {
48
48
  }
49
49
  function legacyAuthExists(authDir) {
50
50
  try {
51
- return syncFs.existsSync(path.join(authDir, "creds.json"));
51
+ return fs.existsSync(path.join(authDir, "creds.json"));
52
52
  } catch {
53
53
  return false;
54
54
  }
@@ -4,10 +4,10 @@ import { info, success } from "../globals.js";
4
4
  import { defaultRuntime } from "../runtime.js";
5
5
  import { formatCliCommand } from "../cli/command-format.js";
6
6
  import "../logging.js";
7
- import syncFs from "node:fs";
7
+ import fs from "node:fs";
8
8
  import os from "node:os";
9
9
  import path from "node:path";
10
- import fs from "node:fs/promises";
10
+ import fs$1 from "node:fs/promises";
11
11
 
12
12
  //#region src/web/auth-store.ts
13
13
  const DEFAULT_WEB_AUTH_ACCOUNT_ID = "default";
@@ -65,7 +65,7 @@ function readAuthStoreLidReverseMapping(lid, opts) {
65
65
  for (const dir of dirs) {
66
66
  const mappingPath = path.join(dir, mappingFilename);
67
67
  try {
68
- const data = syncFs.readFileSync(mappingPath, "utf8");
68
+ const data = fs.readFileSync(mappingPath, "utf8");
69
69
  const phone = JSON.parse(data);
70
70
  if (phone !== null && phone !== undefined) {
71
71
  return normalizeAuthStoreE164(String(phone));
@@ -97,7 +97,7 @@ function resolveWebCredsBackupPath(authDir) {
97
97
  }
98
98
  function hasWebCredsSync(authDir) {
99
99
  try {
100
- const stats = syncFs.statSync(resolveWebCredsPath(authDir));
100
+ const stats = fs.statSync(resolveWebCredsPath(authDir));
101
101
  return stats.isFile() && stats.size > 1;
102
102
  } catch {
103
103
  return false;
@@ -105,14 +105,14 @@ function hasWebCredsSync(authDir) {
105
105
  }
106
106
  function readCredsJsonRaw(filePath) {
107
107
  try {
108
- if (!syncFs.existsSync(filePath)) {
108
+ if (!fs.existsSync(filePath)) {
109
109
  return null;
110
110
  }
111
- const stats = syncFs.statSync(filePath);
111
+ const stats = fs.statSync(filePath);
112
112
  if (!stats.isFile() || stats.size <= 1) {
113
113
  return null;
114
114
  }
115
- return syncFs.readFileSync(filePath, "utf-8");
115
+ return fs.readFileSync(filePath, "utf-8");
116
116
  } catch {
117
117
  return null;
118
118
  }
@@ -132,9 +132,9 @@ function maybeRestoreCredsFromBackup(authDir) {
132
132
  return;
133
133
  }
134
134
  JSON.parse(backupRaw);
135
- syncFs.copyFileSync(backupPath, credsPath);
135
+ fs.copyFileSync(backupPath, credsPath);
136
136
  try {
137
- syncFs.chmodSync(credsPath, 384);
137
+ fs.chmodSync(credsPath, 384);
138
138
  } catch {}
139
139
  logger.warn({ credsPath }, "restored corrupted WhatsApp creds.json from backup");
140
140
  } catch {}
@@ -144,16 +144,16 @@ async function webAuthExists(authDir = resolveDefaultWebAuthDir()) {
144
144
  maybeRestoreCredsFromBackup(resolvedAuthDir);
145
145
  const credsPath = resolveWebCredsPath(resolvedAuthDir);
146
146
  try {
147
- await fs.access(resolvedAuthDir);
147
+ await fs$1.access(resolvedAuthDir);
148
148
  } catch {
149
149
  return false;
150
150
  }
151
151
  try {
152
- const stats = await fs.stat(credsPath);
152
+ const stats = await fs$1.stat(credsPath);
153
153
  if (!stats.isFile() || stats.size <= 1) {
154
154
  return false;
155
155
  }
156
- const raw = await fs.readFile(credsPath, "utf-8");
156
+ const raw = await fs$1.readFile(credsPath, "utf-8");
157
157
  JSON.parse(raw);
158
158
  return true;
159
159
  } catch {
@@ -161,7 +161,7 @@ async function webAuthExists(authDir = resolveDefaultWebAuthDir()) {
161
161
  }
162
162
  }
163
163
  async function clearLegacyBaileysAuthState(authDir) {
164
- const entries = await fs.readdir(authDir, { withFileTypes: true });
164
+ const entries = await fs$1.readdir(authDir, { withFileTypes: true });
165
165
  const shouldDelete = (name) => {
166
166
  if (name === "oauth.json") {
167
167
  return false;
@@ -181,7 +181,7 @@ async function clearLegacyBaileysAuthState(authDir) {
181
181
  if (!shouldDelete(entry.name)) {
182
182
  return;
183
183
  }
184
- await fs.rm(path.join(authDir, entry.name), { force: true });
184
+ await fs$1.rm(path.join(authDir, entry.name), { force: true });
185
185
  }));
186
186
  }
187
187
  async function logoutWeb(params) {
@@ -195,7 +195,7 @@ async function logoutWeb(params) {
195
195
  if (params.isLegacyAuthDir) {
196
196
  await clearLegacyBaileysAuthState(resolvedAuthDir);
197
197
  } else {
198
- await fs.rm(resolvedAuthDir, {
198
+ await fs$1.rm(resolvedAuthDir, {
199
199
  recursive: true,
200
200
  force: true
201
201
  });
@@ -206,13 +206,13 @@ async function logoutWeb(params) {
206
206
  function readWebSelfId(authDir = resolveDefaultWebAuthDir()) {
207
207
  try {
208
208
  const credsPath = resolveWebCredsPath(resolveAuthStoreUserPath(authDir));
209
- if (!syncFs.existsSync(credsPath)) {
209
+ if (!fs.existsSync(credsPath)) {
210
210
  return {
211
211
  e164: null,
212
212
  jid: null
213
213
  };
214
214
  }
215
- const raw = syncFs.readFileSync(credsPath, "utf-8");
215
+ const raw = fs.readFileSync(credsPath, "utf-8");
216
216
  const parsed = JSON.parse(raw);
217
217
  const jid = parsed?.me?.id ?? null;
218
218
  const e164 = jid ? jidToE164ForAuthStore(jid, { authDir }) : null;
@@ -233,7 +233,7 @@ function readWebSelfId(authDir = resolveDefaultWebAuthDir()) {
233
233
  */
234
234
  function getWebAuthAgeMs(authDir = resolveDefaultWebAuthDir()) {
235
235
  try {
236
- const stats = syncFs.statSync(resolveWebCredsPath(resolveAuthStoreUserPath(authDir)));
236
+ const stats = fs.statSync(resolveWebCredsPath(resolveAuthStoreUserPath(authDir)));
237
237
  return Date.now() - stats.mtimeMs;
238
238
  } catch {
239
239
  return null;
@@ -7,7 +7,7 @@ import { redactSensitiveText } from "../logging/redact.js";
7
7
  import "../logging.js";
8
8
  import { WA_WEB_AUTH_DIR, getWebAuthAgeMs, logWebSelfId, logoutWeb, maybeRestoreCredsFromBackup, pickWebChannel, readCredsJsonRaw, readWebSelfId, resolveDefaultWebAuthDir, resolveWebCredsBackupPath, resolveWebCredsPath, webAuthExists } from "./auth-store.js";
9
9
  import { redactSensitiveUrlLikeString } from "../shared/net/redact-sensitive-url.js";
10
- import syncFs from "node:fs";
10
+ import fs from "node:fs";
11
11
  import { randomUUID } from "node:crypto";
12
12
  import { DisconnectReason, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "@whiskeysockets/baileys";
13
13
  import qrcode from "qrcode-terminal";
@@ -27,9 +27,9 @@ async function safeSaveCreds(authDir, saveCreds, logger) {
27
27
  if (raw) {
28
28
  try {
29
29
  JSON.parse(raw);
30
- syncFs.copyFileSync(credsPath, backupPath);
30
+ fs.copyFileSync(credsPath, backupPath);
31
31
  try {
32
- syncFs.chmodSync(backupPath, 384);
32
+ fs.chmodSync(backupPath, 384);
33
33
  } catch {}
34
34
  } catch {}
35
35
  }
@@ -37,7 +37,7 @@ async function safeSaveCreds(authDir, saveCreds, logger) {
37
37
  try {
38
38
  await Promise.resolve(saveCreds());
39
39
  try {
40
- syncFs.chmodSync(resolveWebCredsPath(authDir), 384);
40
+ fs.chmodSync(resolveWebCredsPath(authDir), 384);
41
41
  } catch {}
42
42
  } catch (err) {
43
43
  logger.warn({ error: formatError(err) }, "failed saving WhatsApp creds");
@@ -1,4 +1,4 @@
1
- import syncFs from "node:fs";
1
+ import fs from "node:fs";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
4
  import { spawnSync } from "node:child_process";
@@ -24,7 +24,7 @@ function isHostedSecurityCapableSession(explicitFlag = false) {
24
24
  const currentUser = currentUserName();
25
25
  if (currentUser) {
26
26
  const sudoersPath = path.join("/etc/sudoers.d", `fased-host-maintenance-${currentUser}`);
27
- if (syncFs.existsSync(sudoersPath)) {
27
+ if (fs.existsSync(sudoersPath)) {
28
28
  return true;
29
29
  }
30
30
  }
@@ -2,7 +2,7 @@ import { redactSensitiveText } from "../logging/redact.js";
2
2
  import { redactSensitiveUrlLikeString } from "../shared/net/redact-sensitive-url.js";
3
3
  import { noteCommands, noteHeading, noteStep, noteWarn } from "./onboarding-note-format.js";
4
4
  import { isHostingProfile } from "./onboarding.types.js";
5
- import syncFs from "node:fs";
5
+ import fs from "node:fs";
6
6
  import os from "node:os";
7
7
  import path from "node:path";
8
8
  import { spawn, spawnSync } from "node:child_process";
@@ -12,7 +12,7 @@ import { Buffer } from "node:buffer";
12
12
  function resolveHostSecurityLogPath() {
13
13
  const home = process.env.HOME?.trim() || os.homedir();
14
14
  const logDir = path.join(home, ".fased", "logs");
15
- syncFs.mkdirSync(logDir, {
15
+ fs.mkdirSync(logDir, {
16
16
  recursive: true,
17
17
  mode: 448
18
18
  });
@@ -26,7 +26,7 @@ function appendHostSecurityLog(logPath, title, detail) {
26
26
  sanitizedDetail?.trim() || "(no output)",
27
27
  ""
28
28
  ].join("\n");
29
- syncFs.appendFileSync(logPath, body, "utf8");
29
+ fs.appendFileSync(logPath, body, "utf8");
30
30
  }
31
31
  function resolveTailnetSshConfirmationPath() {
32
32
  const stateDir = process.env.FASED_STATE_DIR?.trim() || process.env.FASED_CONFIG_DIR?.trim() || path.join(process.env.HOME?.trim() || os.homedir(), ".fased");
@@ -34,7 +34,7 @@ function resolveTailnetSshConfirmationPath() {
34
34
  }
35
35
  function hasStoredTailnetSshConfirmation(target) {
36
36
  try {
37
- const raw = syncFs.readFileSync(resolveTailnetSshConfirmationPath(), "utf8");
37
+ const raw = fs.readFileSync(resolveTailnetSshConfirmationPath(), "utf8");
38
38
  const parsed = JSON.parse(raw);
39
39
  return parsed.user === target.user && parsed.repoDir === target.repoDir;
40
40
  } catch {
@@ -43,11 +43,11 @@ function hasStoredTailnetSshConfirmation(target) {
43
43
  }
44
44
  function writeTailnetSshConfirmation(target) {
45
45
  const markerPath = resolveTailnetSshConfirmationPath();
46
- syncFs.mkdirSync(path.dirname(markerPath), {
46
+ fs.mkdirSync(path.dirname(markerPath), {
47
47
  recursive: true,
48
48
  mode: 448
49
49
  });
50
- syncFs.writeFileSync(markerPath, `${JSON.stringify({
50
+ fs.writeFileSync(markerPath, `${JSON.stringify({
51
51
  confirmedAt: new Date().toISOString(),
52
52
  user: target.user,
53
53
  host: target.host,
@@ -75,7 +75,7 @@ const HOST_MAINTENANCE_HELPER = "/usr/local/sbin/fased-host-maintenance";
75
75
  function detectTotalMemoryMb() {
76
76
  if (process.platform === "linux") {
77
77
  try {
78
- const meminfo = syncFs.readFileSync("/proc/meminfo", "utf8");
78
+ const meminfo = fs.readFileSync("/proc/meminfo", "utf8");
79
79
  const match = meminfo.match(/^MemTotal:\s+(\d+)\s+kB/m);
80
80
  if (match?.[1]) {
81
81
  return Math.floor(Number.parseInt(match[1], 10) / 1024);
@@ -29,7 +29,7 @@ import { finalizeOnboardingWizard } from "./onboarding.finalize.js";
29
29
  import { configureGatewayForOnboarding } from "./onboarding.gateway-config.js";
30
30
  import { applyHostingSecurity } from "./onboarding.host-security.js";
31
31
  import { normalizeHostedWalletPaths } from "./wallet-path-migration.js";
32
- import syncFs from "node:fs";
32
+ import fs from "node:fs";
33
33
  import path from "node:path";
34
34
  import { spawn, spawnSync } from "node:child_process";
35
35
 
@@ -472,7 +472,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
472
472
  const stateRoot = String(process.env.FASED_STATE_DIR ?? "").trim() || path.join(String(process.env.HOME ?? "").trim() || process.cwd(), ".fased");
473
473
  const installRoot = path.join(stateRoot, "toolchains", `go${goVersion}`);
474
474
  const goBin = path.join(installRoot, "bin", "go");
475
- if (syncFs.existsSync(goBin)) {
475
+ if (fs.existsSync(goBin)) {
476
476
  process.env.FASED_GO_BIN = goBin;
477
477
  return goModernEnough() ? "installed" : "unavailable";
478
478
  }
@@ -505,7 +505,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
505
505
  if (String(process.env.FASED_FORCE_NATIVE_SIGNER_BUILD ?? "").trim() === "1") {
506
506
  return false;
507
507
  }
508
- return syncFs.existsSync(resolveSignerdBinaryPath(process.env));
508
+ return fs.existsSync(resolveSignerdBinaryPath(process.env));
509
509
  };
510
510
  const maybeInstallGoForOnboarding = async () => {
511
511
  if (goModernEnough()) {
@@ -539,7 +539,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
539
539
  return goModernEnough();
540
540
  };
541
541
  const prepareLocalSignerForOnboarding = async (params) => {
542
- if (syncFs.existsSync(params.binPath) || String(process.env.FASED_SKIP_NATIVE_SIGNER_BUILD ?? "").trim() === "1" || hasExplicitSignerAssetSource()) {
542
+ if (fs.existsSync(params.binPath) || String(process.env.FASED_SKIP_NATIVE_SIGNER_BUILD ?? "").trim() === "1" || hasExplicitSignerAssetSource()) {
543
543
  return;
544
544
  }
545
545
  if (goModernEnough()) {
@@ -1092,8 +1092,8 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
1092
1092
  const configuredPaths = keystoreKeys.map((key) => (nextConfig.env?.vars?.[key] ?? "").trim() || String(process.env[key] ?? "").trim()).filter(Boolean);
1093
1093
  for (const file of new Set([...configuredPaths, ...defaultKeystorePaths])) {
1094
1094
  try {
1095
- if (file && syncFs.existsSync(file)) {
1096
- syncFs.rmSync(file, { force: true });
1095
+ if (file && fs.existsSync(file)) {
1096
+ fs.rmSync(file, { force: true });
1097
1097
  }
1098
1098
  } catch {}
1099
1099
  }
@@ -1215,7 +1215,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
1215
1215
  process.env[rpcKey] = effectiveRpcUrl;
1216
1216
  try {
1217
1217
  let moveToSignerDir = false;
1218
- if (isolatedTargetKeystorePath && syncFs.existsSync(isolatedTargetKeystorePath)) {
1218
+ if (isolatedTargetKeystorePath && fs.existsSync(isolatedTargetKeystorePath)) {
1219
1219
  moveToSignerDir = await prompter.confirm({
1220
1220
  message: "Signer keystore already exists. Overwrite it?",
1221
1221
  initialValue: false
@@ -6,7 +6,7 @@ import { applyWalletPolicyConfig, resolveWalletRoleForId } from "../wallet/walle
6
6
  import { callLocalSocketSigner } from "../wallet/providers/local-socket-signer-adapter.js";
7
7
  import { resolveWalletProviderId } from "../wallet/wallet-provider-resolver.js";
8
8
  import { fileURLToPath } from "node:url";
9
- import syncFs from "node:fs";
9
+ import fs from "node:fs";
10
10
  import path from "node:path";
11
11
  import { execSync, spawn, spawnSync } from "node:child_process";
12
12
  import { randomBytes } from "node:crypto";
@@ -48,7 +48,7 @@ function runCommand(params) {
48
48
  }
49
49
  function isSignerdRunning(socketPath) {
50
50
  try {
51
- syncFs.statSync(socketPath);
51
+ fs.statSync(socketPath);
52
52
  return true;
53
53
  } catch {
54
54
  return false;
@@ -77,7 +77,7 @@ async function sleep(ms) {
77
77
  }
78
78
  function readFileTail(filePath, maxLines = 20) {
79
79
  try {
80
- const text = syncFs.readFileSync(filePath, "utf8").trim();
80
+ const text = fs.readFileSync(filePath, "utf8").trim();
81
81
  if (!text) {
82
82
  return undefined;
83
83
  }
@@ -159,7 +159,7 @@ async function readSignerdHealth(socketPath) {
159
159
  function resolveInstallScript() {
160
160
  for (const rel of INSTALL_SCRIPT_RELPATHS) {
161
161
  const abs = path.resolve(rel);
162
- if (syncFs.existsSync(abs)) {
162
+ if (fs.existsSync(abs)) {
163
163
  return abs;
164
164
  }
165
165
  }
@@ -168,7 +168,7 @@ function resolveInstallScript() {
168
168
  function resolveBuildScript() {
169
169
  for (const rel of BUILD_SCRIPT_RELPATHS) {
170
170
  const abs = path.resolve(rel);
171
- if (syncFs.existsSync(abs)) {
171
+ if (fs.existsSync(abs)) {
172
172
  return abs;
173
173
  }
174
174
  }
@@ -177,7 +177,7 @@ function resolveBuildScript() {
177
177
  function resolveBrokerCliPath() {
178
178
  for (const rel of BROKER_CLI_RELPATHS) {
179
179
  const candidate = fileURLToPath(new URL(rel, import.meta.url));
180
- if (syncFs.existsSync(candidate)) {
180
+ if (fs.existsSync(candidate)) {
181
181
  return candidate;
182
182
  }
183
183
  }
@@ -190,17 +190,17 @@ function resolveLocalSignerdReleaseBaseUrl(installScriptPath) {
190
190
  const arch = process.arch === "arm64" ? "arm64" : "amd64";
191
191
  const assetPath = path.join(releaseDir, `fased-signerd-${platform}-${arch}`);
192
192
  const checksumsPath = path.join(releaseDir, "fased-signerd-checksums.txt");
193
- if (!syncFs.existsSync(assetPath) || !syncFs.existsSync(checksumsPath)) {
193
+ if (!fs.existsSync(assetPath) || !fs.existsSync(checksumsPath)) {
194
194
  return null;
195
195
  }
196
196
  return `file://${releaseDir}`;
197
197
  }
198
198
  function resolveGoBinary(env = process.env) {
199
199
  const explicit = String(env.FASED_GO_BIN ?? "").trim();
200
- if (explicit && syncFs.existsSync(explicit)) {
200
+ if (explicit && fs.existsSync(explicit)) {
201
201
  return explicit;
202
202
  }
203
- if (syncFs.existsSync("/usr/local/go/bin/go")) {
203
+ if (fs.existsSync("/usr/local/go/bin/go")) {
204
204
  return "/usr/local/go/bin/go";
205
205
  }
206
206
  const child = spawnSync("bash", ["-lc", "command -v go || true"], {
@@ -271,7 +271,7 @@ function runScriptOrThrow(params) {
271
271
  function copySignerdBinaryToTarget(params) {
272
272
  const sourcePath = path.resolve(params.sourcePath);
273
273
  const targetPath = path.resolve(params.targetPath);
274
- if (!syncFs.existsSync(sourcePath)) {
274
+ if (!fs.existsSync(sourcePath)) {
275
275
  throw new Error(`fased-signerd build completed but binary was not found at ${sourcePath}.`);
276
276
  }
277
277
  if (params.runAsUser) {
@@ -295,9 +295,9 @@ function copySignerdBinaryToTarget(params) {
295
295
  }
296
296
  return;
297
297
  }
298
- syncFs.mkdirSync(path.dirname(targetPath), { recursive: true });
299
- syncFs.copyFileSync(sourcePath, targetPath);
300
- syncFs.chmodSync(targetPath, 493);
298
+ fs.mkdirSync(path.dirname(targetPath), { recursive: true });
299
+ fs.copyFileSync(sourcePath, targetPath);
300
+ fs.chmodSync(targetPath, 493);
301
301
  }
302
302
  function buildSignerdBinaryFromSource(binPath) {
303
303
  if (String(process.env.FASED_SKIP_NATIVE_SIGNER_BUILD ?? "").trim() === "1") {
@@ -353,7 +353,7 @@ function installSignerdBinaryFromExplicitAsset(binPath) {
353
353
  throw new Error(detail || "fased-signerd install failed", { cause: err });
354
354
  }
355
355
  const installedPath = runAsUser ? stagingPath : binPath;
356
- if (!syncFs.existsSync(installedPath)) {
356
+ if (!fs.existsSync(installedPath)) {
357
357
  throw new Error(`fased-signerd install script ran but binary not found at ${binPath}.\n` + `Check install script output above for errors.`);
358
358
  }
359
359
  if (runAsUser && installedPath !== binPath) {
@@ -376,7 +376,7 @@ function installSignerdBinaryFromExplicitAsset(binPath) {
376
376
  });
377
377
  }
378
378
  }
379
- if (!syncFs.existsSync(binPath)) {
379
+ if (!fs.existsSync(binPath)) {
380
380
  throw new Error(`fased-signerd install script completed but target binary not found at ${binPath}.\n` + `Check install script output above for errors.`);
381
381
  }
382
382
  return true;
@@ -434,7 +434,7 @@ function inferScopedSignerKeystoreEnv(materialDir, env) {
434
434
  const solanaKey = `FASED_WALLET_SOLANA_KEYSTORE_PATH__${envSuffix}`;
435
435
  if (!String(env[solanaKey] ?? "").trim()) {
436
436
  const candidate = path.join(materialDir, `keystore-solana-${fileSuffix}.v1.enc`);
437
- if (syncFs.existsSync(candidate)) {
437
+ if (fs.existsSync(candidate)) {
438
438
  inferred[solanaKey] = candidate;
439
439
  }
440
440
  }
@@ -469,7 +469,7 @@ function resolveLocalSignerPassphraseSource(materialDir, env) {
469
469
  const candidates = [configuredFile ? path.resolve(configuredFile) : "", path.join(materialDir, "passphrase")].filter(Boolean);
470
470
  for (const candidate of candidates) {
471
471
  try {
472
- const value = syncFs.readFileSync(candidate, "utf8").trim();
472
+ const value = fs.readFileSync(candidate, "utf8").trim();
473
473
  if (value) {
474
474
  return {
475
475
  kind: "file",
@@ -636,11 +636,11 @@ function writeLocalSignerEnvFile(params) {
636
636
  ...cfg.env?.vars
637
637
  };
638
638
  const signerEnvPath = path.resolve(ensureWalletStateDir(mergedEnv).rootDir, "signer.env");
639
- syncFs.mkdirSync(path.dirname(signerEnvPath), {
639
+ fs.mkdirSync(path.dirname(signerEnvPath), {
640
640
  recursive: true,
641
641
  mode: 448
642
642
  });
643
- syncFs.writeFileSync(signerEnvPath, renderLocalSignerEnvFile({
643
+ fs.writeFileSync(signerEnvPath, renderLocalSignerEnvFile({
644
644
  config: cfg,
645
645
  env: mergedEnv
646
646
  }), {
@@ -648,7 +648,7 @@ function writeLocalSignerEnvFile(params) {
648
648
  mode: 384
649
649
  });
650
650
  try {
651
- syncFs.chmodSync(signerEnvPath, 384);
651
+ fs.chmodSync(signerEnvPath, 384);
652
652
  } catch {}
653
653
  return signerEnvPath;
654
654
  }
@@ -690,7 +690,7 @@ function startSignerIsolationHelperBackground(runAsUser, args, logPath, env = pr
690
690
  if (!helperArgs) {
691
691
  return false;
692
692
  }
693
- const out = syncFs.openSync(logPath, "a", 384);
693
+ const out = fs.openSync(logPath, "a", 384);
694
694
  const child = spawn("sudo", [
695
695
  "-n",
696
696
  "-E",
@@ -711,10 +711,10 @@ function startSignerIsolationHelperBackground(runAsUser, args, logPath, env = pr
711
711
  return true;
712
712
  }
713
713
  function signerMaintenanceHelperArgs(runAsUser, args) {
714
- if (syncFs.existsSync(SIGNER_MAINTENANCE_HELPER)) {
714
+ if (fs.existsSync(SIGNER_MAINTENANCE_HELPER)) {
715
715
  return [SIGNER_MAINTENANCE_HELPER, ...args];
716
716
  }
717
- if (syncFs.existsSync(SIGNER_ISOLATION_HELPER)) {
717
+ if (fs.existsSync(SIGNER_ISOLATION_HELPER)) {
718
718
  return [
719
719
  SIGNER_ISOLATION_HELPER,
720
720
  resolveCurrentUnixUser(),
@@ -769,16 +769,16 @@ function ensureLocalSignerPassphrase() {
769
769
  const generated = existing.kind === "value" ? existing.value : randomBytes(24).toString("base64url");
770
770
  const stagingDir = ensureWalletStateDir(process.env).rootDir;
771
771
  const stagingPath = path.join(stagingDir, `.local-signer-passphrase-${process.pid}-${Date.now()}`);
772
- syncFs.mkdirSync(path.dirname(stagingPath), {
772
+ fs.mkdirSync(path.dirname(stagingPath), {
773
773
  recursive: true,
774
774
  mode: 448
775
775
  });
776
- syncFs.writeFileSync(stagingPath, `${generated}\n`, {
776
+ fs.writeFileSync(stagingPath, `${generated}\n`, {
777
777
  encoding: "utf8",
778
778
  mode: 384
779
779
  });
780
780
  try {
781
- syncFs.chmodSync(stagingPath, 384);
781
+ fs.chmodSync(stagingPath, 384);
782
782
  } catch {}
783
783
  let passphrasePath = path.join(materialDir, "passphrase");
784
784
  try {
@@ -808,7 +808,7 @@ function ensureLocalSignerPassphrase() {
808
808
  process.env.FASED_WALLET_PASSPHRASE = generated;
809
809
  } catch (err) {
810
810
  try {
811
- syncFs.rmSync(stagingPath, { force: true });
811
+ fs.rmSync(stagingPath, { force: true });
812
812
  } catch {}
813
813
  const detail = err instanceof Error ? err.message : String(err);
814
814
  if (!detail.includes("passphrase already exists")) {
@@ -826,16 +826,16 @@ function ensureLocalSignerPassphrase() {
826
826
  }
827
827
  const generated = randomBytes(24).toString("base64url");
828
828
  const passphraseFile = path.join(materialDir, "passphrase");
829
- syncFs.mkdirSync(path.dirname(passphraseFile), {
829
+ fs.mkdirSync(path.dirname(passphraseFile), {
830
830
  recursive: true,
831
831
  mode: 448
832
832
  });
833
- syncFs.writeFileSync(passphraseFile, `${generated}\n`, {
833
+ fs.writeFileSync(passphraseFile, `${generated}\n`, {
834
834
  encoding: "utf8",
835
835
  mode: 384
836
836
  });
837
837
  try {
838
- syncFs.chmodSync(passphraseFile, 384);
838
+ fs.chmodSync(passphraseFile, 384);
839
839
  } catch {}
840
840
  process.env.FASED_WALLET_PASSPHRASE_FILE = passphraseFile;
841
841
  delete process.env.FASED_WALLET_PASSPHRASE;
@@ -887,8 +887,8 @@ function startSignerdBackground(binPath, socketPath, materialDir, env = process.
887
887
  throw new Error(`failed to launch isolated signer as ${runAsUser}: ${err instanceof Error ? err.message : String(err)}`, { cause: err });
888
888
  }
889
889
  }
890
- const out = syncFs.openSync(logPath, "a", 384);
891
- const err = syncFs.openSync(logPath, "a", 384);
890
+ const out = fs.openSync(logPath, "a", 384);
891
+ const err = fs.openSync(logPath, "a", 384);
892
892
  const child = spawn(binPath, [
893
893
  "-socket",
894
894
  socketPath,
@@ -964,7 +964,7 @@ function stopProcessBySocket(socketPath, runAsUser) {
964
964
  }
965
965
  for (const candidatePidPath of pidPaths) {
966
966
  try {
967
- const pid = Number.parseInt(syncFs.readFileSync(candidatePidPath, "utf8").trim(), 10);
967
+ const pid = Number.parseInt(fs.readFileSync(candidatePidPath, "utf8").trim(), 10);
968
968
  if (Number.isFinite(pid) && pid > 0) {
969
969
  try {
970
970
  const command = readProcessCommand(pid);
@@ -975,16 +975,16 @@ function stopProcessBySocket(socketPath, runAsUser) {
975
975
  }
976
976
  } catch {}
977
977
  try {
978
- syncFs.unlinkSync(candidatePidPath);
978
+ fs.unlinkSync(candidatePidPath);
979
979
  } catch {}
980
980
  }
981
981
  try {
982
- syncFs.unlinkSync(socketPath);
982
+ fs.unlinkSync(socketPath);
983
983
  } catch {}
984
984
  }
985
985
  function readProcessCommand(pid) {
986
986
  try {
987
- const cmdline = syncFs.readFileSync(`/proc/${pid}/cmdline`, "utf8").replaceAll("\0", " ").trim();
987
+ const cmdline = fs.readFileSync(`/proc/${pid}/cmdline`, "utf8").replaceAll("\0", " ").trim();
988
988
  if (cmdline) {
989
989
  return cmdline;
990
990
  }
@@ -1050,8 +1050,8 @@ function startSignerBrokerBackground(appSocketPath, backendSocketPath, materialD
1050
1050
  throw new Error(`failed to launch isolated signer broker as ${runAsUser}: ${err instanceof Error ? err.message : String(err)}`, { cause: err });
1051
1051
  }
1052
1052
  }
1053
- const out = syncFs.openSync(logPath, "a", 384);
1054
- const err = syncFs.openSync(logPath, "a", 384);
1053
+ const out = fs.openSync(logPath, "a", 384);
1054
+ const err = fs.openSync(logPath, "a", 384);
1055
1055
  const child = spawn(process.execPath, [
1056
1056
  brokerCli,
1057
1057
  "wallet",
@@ -1087,7 +1087,7 @@ async function restartLocalSocketSigner(walletDir, env = process.env) {
1087
1087
  const binPath = resolveSignerdBinaryPath(env);
1088
1088
  const materialDir = resolveLocalSignerMaterialRootDir(env);
1089
1089
  const runAsUser = resolveLocalSignerRunAsUser(env);
1090
- if (!syncFs.existsSync(binPath)) {
1090
+ if (!fs.existsSync(binPath)) {
1091
1091
  return;
1092
1092
  }
1093
1093
  stopProcessBySocket(socketPath, runAsUser);
@@ -1130,7 +1130,7 @@ async function syncLocalSocketSignerFromConfig(params) {
1130
1130
  env: mergedEnv
1131
1131
  });
1132
1132
  const binPath = resolveSignerdBinaryPath(mergedEnv);
1133
- if (!syncFs.existsSync(binPath)) {
1133
+ if (!fs.existsSync(binPath)) {
1134
1134
  installSignerdBinary(binPath);
1135
1135
  }
1136
1136
  if (params?.restart === false) {
@@ -1159,7 +1159,7 @@ function migrateLocalSignerKeystoreToMaterialDir(params) {
1159
1159
  return targetPath;
1160
1160
  }
1161
1161
  ensureIsolatedSignerPaths(materialDir, resolveLocalSignerBackendSocketPath(process.env), resolveLocalSignerSocketPath(process.env), runAsUser);
1162
- if (syncFs.existsSync(targetPath) && !params.force) {
1162
+ if (fs.existsSync(targetPath) && !params.force) {
1163
1163
  throw new Error(`Keystore already exists: ${targetPath}`);
1164
1164
  }
1165
1165
  if (runSignerIsolationHelper(runAsUser, [
@@ -1257,7 +1257,7 @@ function hasConfiguredWalletMaterial(params) {
1257
1257
  }
1258
1258
  try {
1259
1259
  const walletDir = ensureWalletStateDir(mergedEnv).rootDir;
1260
- return syncFs.readdirSync(walletDir).some((entry) => /^keystore-solana(?:-[A-Za-z0-9_-]+)?\.v1\.enc$/.test(entry) || /^keystore-evm(?:-[A-Za-z0-9_-]+)?\.v1\.enc$/.test(entry));
1260
+ return fs.readdirSync(walletDir).some((entry) => /^keystore-solana(?:-[A-Za-z0-9_-]+)?\.v1\.enc$/.test(entry) || /^keystore-evm(?:-[A-Za-z0-9_-]+)?\.v1\.enc$/.test(entry));
1261
1261
  } catch {
1262
1262
  return false;
1263
1263
  }
@@ -1356,12 +1356,12 @@ async function configureWalletForOnboarding(params) {
1356
1356
  const binPath = resolveSignerdBinaryPath(process.env);
1357
1357
  const runAsUser = resolveLocalSignerRunAsUser(process.env);
1358
1358
  ensureLocalSignerPassphrase();
1359
- if (!syncFs.existsSync(binPath)) {
1359
+ if (!fs.existsSync(binPath)) {
1360
1360
  if (!quietSignerNotes) {
1361
1361
  await prompter.note([`fased-signerd not found at: ${binPath}`, "Building fased-signerd locally when Go is available, or using an explicitly configured signer asset."].join("\n"), "Local socket signer");
1362
1362
  }
1363
1363
  await params.prepareLocalSigner?.({ binPath });
1364
- if (!syncFs.existsSync(binPath)) {
1364
+ if (!fs.existsSync(binPath)) {
1365
1365
  installSignerdBinary(binPath);
1366
1366
  }
1367
1367
  if (!quietSignerNotes) {