@fased/fased 0.1.56 → 0.1.57

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 (359) 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/docs-path.js +3 -3
  10. package/dist/agents/embedded-pi-mcp.js +4 -4
  11. package/dist/agents/identity-avatar.js +3 -3
  12. package/dist/agents/identity-file.js +2 -2
  13. package/dist/agents/model-catalog-snapshot.js +124 -0
  14. package/dist/agents/openai-codex-app-server.js +35 -10
  15. package/dist/agents/openai-codex-runtime-component.js +39 -0
  16. package/dist/agents/pi-embedded-runner/compact.js +1 -1
  17. package/dist/agents/pi-embedded-runner/extra-params.js +28 -16
  18. package/dist/agents/pi-embedded-runner/run/attempt.js +1 -1
  19. package/dist/agents/pi-embedded-subscribe.raw-stream.js +3 -3
  20. package/dist/agents/pi-extensions/compaction-safeguard.js +3 -3
  21. package/dist/agents/pi-model-discovery.js +6 -6
  22. package/dist/agents/pi-project-settings.js +3 -3
  23. package/dist/agents/sandbox/fs-bridge.js +2 -2
  24. package/dist/agents/session-dirs.js +4 -4
  25. package/dist/agents/session-write-lock.js +13 -13
  26. package/dist/agents/shell-utils.js +5 -5
  27. package/dist/agents/skills/bundled-dir.js +4 -4
  28. package/dist/agents/skills/local-loader.js +6 -6
  29. package/dist/agents/skills/plugin-skills.js +2 -2
  30. package/dist/agents/skills/workspace.js +13 -13
  31. package/dist/agents/skills-install-download.js +7 -7
  32. package/dist/agents/skills-install-plan.js +2 -2
  33. package/dist/agents/skills-install.js +2 -2
  34. package/dist/agents/skills-status.js +2 -2
  35. package/dist/agents/subagent-depth.js +2 -2
  36. package/dist/agents/system-prompt-params.js +2 -2
  37. package/dist/agents/tools/session-status-tool.js +1 -1
  38. package/dist/agents/workspace.js +22 -22
  39. package/dist/auto-reply/reply/agent-runner-execution.js +2 -2
  40. package/dist/auto-reply/reply/agent-runner.js +2 -2
  41. package/dist/auto-reply/reply/commands-export-session.js +7 -7
  42. package/dist/auto-reply/reply/post-compaction-audit.js +3 -3
  43. package/dist/auto-reply/reply/post-compaction-context.js +3 -3
  44. package/dist/auto-reply/reply/session.js +3 -3
  45. package/dist/auto-reply/skill-commands.js +3 -3
  46. package/dist/auto-reply/status.js +6 -6
  47. package/dist/brand.js +1 -1
  48. package/dist/browser/chrome.executables.js +3 -3
  49. package/dist/browser/chrome.js +3 -3
  50. package/dist/browser/chrome.profile-decoration.js +6 -6
  51. package/dist/browser/profiles-service.js +2 -2
  52. package/dist/browser/server-context.js +2 -2
  53. package/dist/browser/trash.js +4 -4
  54. package/dist/build-info.json +3 -3
  55. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  56. package/dist/canvas-host/server.js +4 -4
  57. package/dist/capabilities/catalog.js +3 -3
  58. package/dist/capabilities/install.js +43 -0
  59. package/dist/channels/plugins/catalog.js +3 -3
  60. package/dist/cli/browser-cli-extension.js +6 -6
  61. package/dist/cli/command-format.js +2 -2
  62. package/dist/cli/components-cli.js +9 -31
  63. package/dist/cli/cron-cli/register.cron-simple.js +2 -2
  64. package/dist/cli/dns-cli.js +9 -9
  65. package/dist/cli/gateway-cli/dev.js +5 -5
  66. package/dist/cli/gateway-cli/run.js +2 -2
  67. package/dist/cli/hooks-cli.js +6 -6
  68. package/dist/cli/lightweight/gateway-runtime-probe.js +2 -2
  69. package/dist/cli/memory-cli.js +7 -7
  70. package/dist/cli/nodes-media-utils.js +2 -2
  71. package/dist/cli/plugins-cli.js +5 -5
  72. package/dist/cli/secrets-cli.js +3 -3
  73. package/dist/cli/update-cli/update-command.js +50 -12
  74. package/dist/cli/windows-argv.js +2 -2
  75. package/dist/commands/agent.js +1 -1
  76. package/dist/commands/auth-choice.apply.openai.js +9 -0
  77. package/dist/commands/auth-choice.apply.plugin-provider.js +1 -1
  78. package/dist/commands/dashboard-link.js +3 -3
  79. package/dist/commands/doctor-install.js +5 -5
  80. package/dist/commands/doctor-memory-search.js +2 -2
  81. package/dist/commands/doctor-platform-notes.js +2 -2
  82. package/dist/commands/doctor-sandbox.js +2 -2
  83. package/dist/commands/doctor-state-integrity.js +23 -23
  84. package/dist/commands/doctor-workspace.js +3 -3
  85. package/dist/commands/doctor.js +3 -3
  86. package/dist/commands/managed-up.js +2 -2
  87. package/dist/commands/onboard-auth.credentials.js +3 -3
  88. package/dist/commands/onboard-channels.js +1 -1
  89. package/dist/commands/onboarding/plugin-install.js +4 -4
  90. package/dist/commands/sessions-cleanup.js +2 -2
  91. package/dist/commands/signal-install.js +6 -6
  92. package/dist/commands/status-all/channels.js +2 -2
  93. package/dist/commands/wallet.js +47 -47
  94. package/dist/config/cache-utils.js +2 -2
  95. package/dist/config/includes.js +5 -5
  96. package/dist/config/io.js +2 -2
  97. package/dist/config/paths.js +3 -3
  98. package/dist/config/sat-runtime-ids.js +3 -3
  99. package/dist/config/sessions/disk-budget.js +6 -6
  100. package/dist/config/sessions/paths.js +2 -2
  101. package/dist/config/sessions/store.js +17 -17
  102. package/dist/config/sessions/transcript.js +4 -4
  103. package/dist/config/talk.js +2 -2
  104. package/dist/control-ui/assets/{app-D7TXyNRi.js → app-DltSyY4Y.js} +1689 -1689
  105. package/dist/control-ui/assets/{index-BmSBom-w.js → index-D5JlBp7f.js} +3 -3
  106. package/dist/control-ui/index.html +1 -1
  107. package/dist/control-ui/version.json +1 -1
  108. package/dist/cron/service/store.js +2 -2
  109. package/dist/cron/store.js +6 -6
  110. package/dist/daemon/systemd-system.js +5 -5
  111. package/dist/discord/monitor/thread-bindings.state.js +2 -2
  112. package/dist/extensions/sat-mining/src/sat-bond-layout.js +9 -9
  113. package/dist/gateway/control-ui-boot-check.js +6 -6
  114. package/dist/gateway/control-ui-login.js +7 -7
  115. package/dist/gateway/control-ui.js +9 -9
  116. package/dist/gateway/hooks-mapping.js +4 -4
  117. package/dist/gateway/protocol/schema/agents-models-skills.js +43 -1
  118. package/dist/gateway/server-discovery.js +2 -2
  119. package/dist/gateway/server-http.js +4 -4
  120. package/dist/gateway/server-methods/chat.js +3 -3
  121. package/dist/gateway/server-methods/hooks.js +1 -1
  122. package/dist/gateway/server-methods/models.js +12 -5
  123. package/dist/gateway/server-methods/plugins-marketplace.js +3 -3
  124. package/dist/gateway/server-methods/services.js +1 -1
  125. package/dist/gateway/server-methods/sessions.js +7 -7
  126. package/dist/gateway/server-methods/usage.js +2 -2
  127. package/dist/gateway/server.impl.js +3 -3
  128. package/dist/gateway/session-compaction-checkpoints.js +4 -4
  129. package/dist/gateway/session-utils.fs.js +24 -24
  130. package/dist/gateway/session-utils.js +6 -6
  131. package/dist/gateway/sessions-patch.js +1 -1
  132. package/dist/hooks/bundled-dir.js +4 -4
  133. package/dist/hooks/gmail-setup-utils.js +6 -6
  134. package/dist/hooks/import-url.js +2 -2
  135. package/dist/hooks/loader.js +4 -4
  136. package/dist/hooks/workspace.js +7 -7
  137. package/dist/infra/archive.js +17 -17
  138. package/dist/infra/boundary-file-read.js +2 -2
  139. package/dist/infra/boundary-path.js +15 -15
  140. package/dist/infra/brew.js +2 -2
  141. package/dist/infra/control-ui-assets.js +14 -14
  142. package/dist/infra/device-auth-store.js +8 -8
  143. package/dist/infra/device-identity.js +8 -8
  144. package/dist/infra/dotenv.js +2 -2
  145. package/dist/infra/exec-approvals.js +8 -8
  146. package/dist/infra/exec-command-resolution.js +4 -4
  147. package/dist/infra/exec-safe-bin-trust.js +2 -2
  148. package/dist/infra/fased-root.js +5 -5
  149. package/dist/infra/fs-safe.js +14 -14
  150. package/dist/infra/gateway-lock.js +11 -11
  151. package/dist/infra/git-commit.js +5 -5
  152. package/dist/infra/git-root.js +4 -4
  153. package/dist/infra/hosted-runtime-artifact.js +3 -3
  154. package/dist/infra/is-main.js +2 -2
  155. package/dist/infra/json-file.js +7 -7
  156. package/dist/infra/outbound/delivery-queue.js +16 -16
  157. package/dist/infra/path-env.js +3 -3
  158. package/dist/infra/ports-lsof.js +4 -4
  159. package/dist/infra/provider-usage.auth.js +3 -3
  160. package/dist/infra/safe-open-sync.js +2 -2
  161. package/dist/infra/session-cost-usage.js +9 -9
  162. package/dist/infra/shell-env.js +2 -2
  163. package/dist/infra/state-migrations.fs.js +6 -6
  164. package/dist/infra/state-migrations.js +23 -23
  165. package/dist/infra/tmp-fased-dir.js +6 -6
  166. package/dist/infra/widearea-dns.js +3 -3
  167. package/dist/infra/wsl.js +2 -2
  168. package/dist/light-update-status.js +11 -11
  169. package/dist/line/accounts.js +2 -2
  170. package/dist/line/download.js +2 -2
  171. package/dist/logging/config.js +3 -3
  172. package/dist/logging/logger.js +7 -7
  173. package/dist/managed/federation.js +3 -3
  174. package/dist/managed/tunnel.js +3 -3
  175. package/dist/media/store.js +13 -13
  176. package/dist/media-understanding/runner.js +3 -3
  177. package/dist/memory/embeddings.js +2 -2
  178. package/dist/memory/internal.js +10 -10
  179. package/dist/memory/manager-sync-ops.js +7 -7
  180. package/dist/memory/repair-executor.js +17 -17
  181. package/dist/node-host/invoke-system-run-plan.js +8 -8
  182. package/dist/node-host/invoke.js +2 -2
  183. package/dist/node-host/runner.js +3 -3
  184. package/dist/pairing/pairing-store.js +3 -3
  185. package/dist/plugin-sdk/{accounts-DzWlKv1U.js → accounts-CmMwe9Dt.js} +1 -1
  186. package/dist/plugin-sdk/{actions-BplQVLL6.js → actions-DYViFQiX.js} +2 -2
  187. package/dist/plugin-sdk/{active-listener-x4MLhYUw.js → active-listener-DVbpcisf.js} +1 -1
  188. package/dist/plugin-sdk/{agent-scope-BbgPlhtw.js → agent-scope-CCjfjKoO.js} +1 -1
  189. package/dist/plugin-sdk/{audio-preflight-G8h3Sn8_.js → audio-preflight-D-Mfay8i.js} +31 -31
  190. package/dist/plugin-sdk/{audit-CWknklvI.js → audit-JImYFOzJ.js} +1 -1
  191. package/dist/plugin-sdk/{channel-access-configure-CD4QDN5E.js → channel-access-configure-B_qYjml8.js} +1 -1
  192. package/dist/plugin-sdk/{channel-access-a9Dnfw7-.js → channel-access-cxCK2mci.js} +1 -1
  193. package/dist/plugin-sdk/channel-plugin-common.d.ts +2 -2
  194. package/dist/plugin-sdk/channel-plugin-common.js +5 -5
  195. package/dist/plugin-sdk/{chunk-B8EZkwiT.js → chunk-CF8nvZNj.js} +1 -1
  196. package/dist/plugin-sdk/{chunk-items-CEPklxGe.js → chunk-items-yLFoO571.js} +1 -1
  197. package/dist/plugin-sdk/command-status.js +31 -31
  198. package/dist/plugin-sdk/{commands-registry-BfEa4tFA.js → commands-registry-CK4KmMG0.js} +2 -2
  199. package/dist/plugin-sdk/{common-CbfckC19.js → common-Cky4hpqr.js} +1 -1
  200. package/dist/plugin-sdk/{config-Bt5GhnA-.js → config-Dbxj_jUP.js} +1125 -3
  201. package/dist/plugin-sdk/{config-schema-B9DKr6J5.js → config-schema-aKPMn6ML.js} +1749 -1387
  202. package/dist/plugin-sdk/device-pair.d.ts +1 -1
  203. package/dist/plugin-sdk/discord.d.ts +4 -4
  204. package/dist/plugin-sdk/discord.js +22 -22
  205. package/dist/plugin-sdk/{filesystem-manager-BGGGrkiN.js → filesystem-manager-ZoHU8oA7.js} +2 -2
  206. package/dist/plugin-sdk/{fs-safe-xBqok6yR.js → fs-safe-g4g7GT02.js} +2 -2
  207. package/dist/plugin-sdk/{handle-action-DbzZFYnG.js → handle-action-BSNDD2Vc.js} +17 -17
  208. package/dist/plugin-sdk/{helpers-CluGKuIV.js → helpers-CDo2XBSr.js} +1 -1
  209. package/dist/plugin-sdk/{image-ops-CUaLtIFj.js → image-ops-DbeBxbn4.js} +1 -1
  210. package/dist/plugin-sdk/index.d.ts +15 -15
  211. package/dist/plugin-sdk/index.js +33 -33
  212. package/dist/plugin-sdk/json-store.js +6 -6
  213. package/dist/plugin-sdk/{login-DJuHYDiK.js → login-CWXvFTd8.js} +3 -3
  214. package/dist/plugin-sdk/{login-qr-CbHL5ayf.js → login-qr-CJB2zjmM.js} +4 -4
  215. package/dist/plugin-sdk/{manager-oHAvZCT3.js → manager-CbiFFLKS.js} +4 -4
  216. package/dist/plugin-sdk/{markdown-tables-Mkx7k92Y.js → markdown-tables-Bskt9r8i.js} +1 -1
  217. package/dist/plugin-sdk/{media-CA8sTmVE.js → media-B3aAg5rh.js} +4 -4
  218. package/dist/plugin-sdk/{memory-search-VFll-AIb.js → memory-search-DTjIMw8J.js} +1 -1
  219. package/dist/plugin-sdk/{monitor-CZrN9pev.js → monitor-BJs6z7AT.js} +35 -35
  220. package/dist/plugin-sdk/{monitor-CmwGqNyV.js → monitor-BYGbTI5V.js} +36 -36
  221. package/dist/plugin-sdk/{openresponses-http-CWOd4war.js → openresponses-http-BGCl2dS2.js} +31 -31
  222. package/dist/plugin-sdk/{optional-runtime-dependency-DKmk9PZa.js → optional-runtime-dependency-BlTVkcAg.js} +1 -1
  223. package/dist/plugin-sdk/{outbound-0oN9IfNw.js → outbound-CIemga5_.js} +6 -6
  224. package/dist/plugin-sdk/{outbound-attachment-DdVkqUzE.js → outbound-attachment-2RckWqrk.js} +2 -2
  225. package/dist/plugin-sdk/{pairing-message-BMkkS038.d.ts → pairing-message-C403mq4K.d.ts} +1 -1
  226. package/dist/plugin-sdk/{pairing-message-ClqhfCUk.js → pairing-message-r-VQfhFB.js} +1 -1
  227. package/dist/plugin-sdk/{pairing-store-B01mCSct.js → pairing-store-uPnLfGgB.js} +2 -2
  228. package/dist/plugin-sdk/{path-alias-guards-BJZD5JMJ.js → path-alias-guards-DjgDArrp.js} +1 -1
  229. package/dist/plugin-sdk/{pi-model-discovery-Buz0JC1Y.js → pi-model-discovery-BpEilAym.js} +1 -1
  230. package/dist/plugin-sdk/{pi-model-discovery-runtime-DuwuoteY.js → pi-model-discovery-runtime-DwNdFaz-.js} +3 -3
  231. package/dist/plugin-sdk/{probe--7xtfzMm.js → probe-CJb5uR8B.js} +1 -1
  232. package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +1 -1
  233. package/dist/plugin-sdk/{pw-ai-B0domrii.js → pw-ai-H7UgunQQ.js} +6 -6
  234. package/dist/plugin-sdk/{qmd-manager-CFFeM4Fl.js → qmd-manager-DSyx77KY.js} +1 -1
  235. package/dist/plugin-sdk/{replies-1macZ1mZ.js → replies-CKMwkH4G.js} +2 -2
  236. package/dist/plugin-sdk/{reply-prefix-ClpxvL_w.js → reply-prefix-CeVw7Mn2.js} +1 -1
  237. package/dist/plugin-sdk/{probe-xY3Ky0Tx.js → resolve-channels-_-nV-EK2.js} +3 -2
  238. package/dist/plugin-sdk/{resolve-outbound-target-BdH6LUoW.js → resolve-outbound-target-B68fSoGi.js} +1 -1
  239. package/dist/plugin-sdk/{resolve-route-CkNIKKEW.js → resolve-route-B8fOfihG.js} +2 -2
  240. package/dist/plugin-sdk/{retry-policy-9ybIh4Fq.js → retry-policy-B6GQldxB.js} +1 -1
  241. package/dist/plugin-sdk/{runtime-dependency-CIw9t7-k.js → runtime-dependency-DlqVSsSs.js} +4 -4
  242. package/dist/plugin-sdk/{runtime-Dy420wBu.js → runtime-nVJl3PlS.js} +4 -4
  243. package/dist/plugin-sdk/{sandbox-paths-w64tYl0v.js → sandbox-paths-Dx2lUqCu.js} +2 -2
  244. package/dist/plugin-sdk/sat-runtime.d.ts +2 -2
  245. package/dist/plugin-sdk/sat-runtime.js +31 -31
  246. package/dist/plugin-sdk/{send-BQUtCJFW.js → send-BCJ4hi3t.js} +8 -8
  247. package/dist/plugin-sdk/{send-DPJIIYAs.js → send-BHokB4TR.js} +6 -6
  248. package/dist/plugin-sdk/{send-2VcOMTN5.js → send-CPK_HlYW.js} +5 -5
  249. package/dist/plugin-sdk/{send-J4JWKP62.js → send-D3DQOg2a.js} +6 -6
  250. package/dist/plugin-sdk/{send-Dqes9tdU.js → send-hSu1HWms.js} +7 -7
  251. package/dist/plugin-sdk/{session-C_n2S5ub.js → session-DQ4Dr-mf.js} +2 -2
  252. package/dist/plugin-sdk/{skill-commands-B7wx9ax8.js → skill-commands-CmdoKLh_.js} +4 -4
  253. package/dist/plugin-sdk/{slack-BouRQG-W.js → slack-B70NHpMF.js} +47 -47
  254. package/dist/plugin-sdk/{slack-actions-CasHVtiq.js → slack-actions-fSmP981b.js} +14 -14
  255. package/dist/plugin-sdk/slack.d.ts +4 -4
  256. package/dist/plugin-sdk/slack.js +12 -12
  257. package/dist/plugin-sdk/{sticker-cache-BvGEUas3.js → sticker-cache-B4dG2sKU.js} +3 -3
  258. package/dist/plugin-sdk/{tables-CjlQJV4r.js → tables-EX4Hy-a-.js} +1 -1
  259. package/dist/plugin-sdk/{targets-QfP164Dh.js → targets-BeGUCGWK.js} +1 -1
  260. package/dist/plugin-sdk/{telegram-actions-CwYjV6Db.js → telegram-actions-CM8SJgc9.js} +34 -34
  261. package/dist/plugin-sdk/telegram.d.ts +4 -4
  262. package/dist/plugin-sdk/telegram.js +9 -9
  263. package/dist/plugin-sdk/{thread-bindings.lifecycle-DU4iX_Jr.js → thread-bindings.lifecycle-tHK_1mvp.js} +3 -3
  264. package/dist/plugin-sdk/{thread-bindings.state-BgYWFjNF.js → thread-bindings.state-D7xG1GHu.js} +2 -2
  265. package/dist/plugin-sdk/{tmp-fased-dir-BdFQvrvw.d.ts → tmp-fased-dir-Ouj58axY.d.ts} +1 -1
  266. package/dist/plugin-sdk/{types-BYDL6dQj.d.ts → types-B4hj6HgR.d.ts} +1 -1
  267. package/dist/plugin-sdk/{types-CLIvQaVg.d.ts → types-dWZFX1fk.d.ts} +2 -2
  268. package/dist/plugin-sdk/{web-D0yENDve.js → web-BFolfZ3i.js} +36 -36
  269. package/dist/plugin-sdk/{whatsapp-actions-BT2nPLyo.js → whatsapp-actions-CYmleHCz.js} +16 -16
  270. package/dist/plugin-sdk/{whatsapp-heartbeat-CiABSZ6G.js → whatsapp-heartbeat-BEwm4GK3.js} +2 -2
  271. package/dist/plugin-sdk/whatsapp.d.ts +9 -9
  272. package/dist/plugin-sdk/whatsapp.js +13 -13
  273. package/dist/plugin-sdk/{wsl-B_ojyEtC.js → wsl-BtMDzMv5.js} +3 -3
  274. package/dist/plugin-sdk/{zod-schema.providers-core-CIzCjXH9.d.ts → zod-schema.providers-core-FaYR6KdD.d.ts} +61 -61
  275. package/dist/plugins/bundled-dir.js +3 -3
  276. package/dist/plugins/discovery.js +11 -11
  277. package/dist/plugins/lifecycle.js +1 -1
  278. package/dist/plugins/loader.js +13 -13
  279. package/dist/plugins/manifest-registry.js +28 -2
  280. package/dist/plugins/manifest.js +6 -4
  281. package/dist/plugins/marketplace.js +1 -1
  282. package/dist/plugins/path-safety.js +3 -3
  283. package/dist/plugins/status-cache.js +9 -9
  284. package/dist/plugins/update.js +4 -4
  285. package/dist/plugins/web-search-install-catalog.js +3 -3
  286. package/dist/providers/openai-codex-model-discovery.js +11 -1
  287. package/dist/providers/runtime-model-catalog.js +2 -2
  288. package/dist/secrets/apply.js +16 -16
  289. package/dist/secrets/audit.js +11 -11
  290. package/dist/secrets/shared.js +9 -9
  291. package/dist/security/scan-paths.js +2 -2
  292. package/dist/shared/config-eval.js +2 -2
  293. package/dist/shared/pid-alive.js +2 -2
  294. package/dist/tasks/standing-orders.js +5 -5
  295. package/dist/tasks/task-flow-registry.js +5 -5
  296. package/dist/tasks/task-registry.js +5 -5
  297. package/dist/tasks/workflow-definitions.js +6 -6
  298. package/dist/telegram/token.js +5 -5
  299. package/dist/utils.js +5 -5
  300. package/dist/wallet/local-socket-signer-broker.js +16 -16
  301. package/dist/wallet/providers/embedded-keystore-adapter.js +5 -5
  302. package/dist/wallet/providers/local-socket-signer-adapter.js +2 -2
  303. package/dist/wallet/wallet-approval-auth.js +5 -5
  304. package/dist/wallet/wallet-audit-log.js +5 -5
  305. package/dist/wallet/wallet-custody.js +21 -21
  306. package/dist/wallet/wallet-inbound-events.js +5 -5
  307. package/dist/wallet/wallet-observability.js +5 -5
  308. package/dist/wallet/wallet-policy.js +9 -9
  309. package/dist/wallet/wallet-provider-registry.js +7 -7
  310. package/dist/wallet/wallet-runtime-config.js +3 -3
  311. package/dist/wallet/wallet-secrets-store.js +22 -22
  312. package/dist/wallet/wallet-send-approvals.js +5 -5
  313. package/dist/wallet/wallet-settlement-links.js +5 -5
  314. package/dist/web/accounts.js +3 -3
  315. package/dist/web/auth-store.js +18 -18
  316. package/dist/web/session.js +4 -4
  317. package/dist/wizard/host-security-capability.js +2 -2
  318. package/dist/wizard/onboarding.finalize.js +1 -1
  319. package/dist/wizard/onboarding.host-security.js +7 -7
  320. package/dist/wizard/onboarding.js +7 -7
  321. package/dist/wizard/onboarding.wallet.js +44 -44
  322. package/extensions/acpx/package.json +1 -1
  323. package/extensions/bluebubbles/package.json +1 -1
  324. package/extensions/copilot-proxy/package.json +1 -1
  325. package/extensions/diagnostics-otel/package.json +1 -1
  326. package/extensions/fased-federation/package.json +1 -1
  327. package/extensions/google-gemini-cli-auth/package.json +1 -1
  328. package/extensions/imessage/package.json +1 -1
  329. package/extensions/irc/package.json +1 -1
  330. package/extensions/line/package.json +1 -1
  331. package/extensions/llm-task/package.json +1 -1
  332. package/extensions/lobster/package.json +1 -1
  333. package/extensions/matrix/CHANGELOG.md +6 -0
  334. package/extensions/matrix/package.json +1 -1
  335. package/extensions/mattermost/package.json +1 -1
  336. package/extensions/memory-core/package.json +2 -2
  337. package/extensions/memory-lancedb/package.json +1 -1
  338. package/extensions/minimax-portal-auth/package.json +1 -1
  339. package/extensions/msteams/CHANGELOG.md +6 -0
  340. package/extensions/msteams/package.json +1 -1
  341. package/extensions/nextcloud-talk/package.json +1 -1
  342. package/extensions/nostr/CHANGELOG.md +6 -0
  343. package/extensions/nostr/package.json +1 -1
  344. package/extensions/open-prose/package.json +1 -1
  345. package/extensions/sat-mining/package.json +1 -1
  346. package/extensions/signal/package.json +1 -1
  347. package/extensions/synology-chat/package.json +1 -1
  348. package/extensions/tlon/package.json +1 -1
  349. package/extensions/twitch/CHANGELOG.md +6 -0
  350. package/extensions/twitch/package.json +1 -1
  351. package/extensions/voice-call/CHANGELOG.md +6 -0
  352. package/extensions/voice-call/package.json +1 -1
  353. package/extensions/zalo/CHANGELOG.md +6 -0
  354. package/extensions/zalo/package.json +1 -1
  355. package/extensions/zalouser/CHANGELOG.md +6 -0
  356. package/extensions/zalouser/package.json +1 -1
  357. package/package.json +1 -1
  358. package/dist/plugin-sdk/resolve-channels-CwB2_019.js +0 -4
  359. /package/dist/plugin-sdk/{resolve-users-Cxb5wpAQ.js → resolve-users-DN9VQBwv.js} +0 -0
@@ -16,7 +16,6 @@ import "../../config/sessions.js";
16
16
  import { captureSessionCompactionSnapshot, cleanupSessionCompactionSnapshot, getSessionCompactionCheckpoint, listSessionCompactionCheckpoints, persistSessionCompactionCheckpoint } from "../session-compaction-checkpoints.js";
17
17
  import { invalidateCombinedSessionStoreCache, listSessionsFromStore, loadCombinedSessionStoreForGateway, pruneLegacyStoreKeys, resolveGatewaySessionStoreTarget, resolveSessionModelRef } from "../session-utils.js";
18
18
  import { getGlobalHookRunner } from "../../plugins/hook-runner-global.js";
19
- import { buildUsableModelProviderSet } from "../../agents/model-catalog-access.js";
20
19
  import "../../agents/pi-embedded.js";
21
20
  import { ErrorCodes, errorShape } from "../protocol/schema/error-codes.js";
22
21
  import { validateSessionsCompactParams, validateSessionsCompactionBranchParams, validateSessionsCompactionGetParams, validateSessionsCompactionListParams, validateSessionsCompactionRestoreParams, validateSessionsDeleteParams, validateSessionsListParams, validateSessionsMessagesSubscribeParams, validateSessionsMessagesUnsubscribeParams, validateSessionsPatchParams, validateSessionsPreviewParams, validateSessionsResetParams, validateSessionsResolveParams } from "../protocol/index.js";
@@ -24,13 +23,14 @@ import { clearSessionQueues } from "../../auto-reply/reply/queue/cleanup.js";
24
23
  import "../../auto-reply/reply/queue.js";
25
24
  import { stopSubagentsForRequester } from "../../auto-reply/reply/abort.js";
26
25
  import { getAcpSessionManager } from "../../acp/control-plane/manager.js";
26
+ import { buildUsableModelProviderSet } from "../../agents/model-catalog-access.js";
27
27
  import { clearBootstrapSnapshot } from "../../agents/bootstrap-cache.js";
28
28
  import { abortEmbeddedPiRun, waitForEmbeddedPiRunEnd } from "../../agents/pi-embedded-runner/runs.js";
29
29
  import { clearCheckpointBranchIsolationFields } from "../session-compaction-isolation.js";
30
30
  import { applySessionsPatchToStore } from "../sessions-patch.js";
31
31
  import { resolveSessionKeyFromResolveParams } from "../sessions-resolve.js";
32
32
  import { assertValidParams } from "./validation.js";
33
- import syncFs from "node:fs";
33
+ import fs from "node:fs";
34
34
  import path from "node:path";
35
35
  import { randomUUID } from "node:crypto";
36
36
  import { SessionManager } from "@mariozechner/pi-coding-agent";
@@ -196,7 +196,7 @@ function resolveCheckpointSnapshotFile(params) {
196
196
  return null;
197
197
  }
198
198
  try {
199
- if (!syncFs.statSync(filePath).isFile()) {
199
+ if (!fs.statSync(filePath).isFile()) {
200
200
  return null;
201
201
  }
202
202
  } catch {
@@ -543,7 +543,7 @@ const sessionsHandlers = {
543
543
  }
544
544
  const cleanupRestoredFile = () => {
545
545
  try {
546
- syncFs.rmSync(sessionFile, { force: true });
546
+ fs.rmSync(sessionFile, { force: true });
547
547
  } catch {}
548
548
  };
549
549
  const cleanupError = await ensureSessionRuntimeCleanup({
@@ -1068,7 +1068,7 @@ const sessionsHandlers = {
1068
1068
  }, undefined);
1069
1069
  return;
1070
1070
  }
1071
- const filePath = resolveSessionTranscriptCandidates(sessionId, storePath, entry?.sessionFile, target.agentId).find((candidate) => syncFs.existsSync(candidate));
1071
+ const filePath = resolveSessionTranscriptCandidates(sessionId, storePath, entry?.sessionFile, target.agentId).find((candidate) => fs.existsSync(candidate));
1072
1072
  if (!filePath) {
1073
1073
  respond(true, {
1074
1074
  ok: true,
@@ -1078,7 +1078,7 @@ const sessionsHandlers = {
1078
1078
  }, undefined);
1079
1079
  return;
1080
1080
  }
1081
- const raw = syncFs.readFileSync(filePath, "utf-8");
1081
+ const raw = fs.readFileSync(filePath, "utf-8");
1082
1082
  const lines = raw.split(/\r?\n/).filter((l) => l.trim().length > 0);
1083
1083
  if (lines.length <= maxLines) {
1084
1084
  respond(true, {
@@ -1096,7 +1096,7 @@ const sessionsHandlers = {
1096
1096
  const archived = archiveFileOnDisk(filePath, "bak");
1097
1097
  const keptLines = lines.slice(-maxLines);
1098
1098
  try {
1099
- syncFs.writeFileSync(filePath, `${keptLines.join("\n")}\n`, "utf-8");
1099
+ fs.writeFileSync(filePath, `${keptLines.join("\n")}\n`, "utf-8");
1100
1100
  } catch (error) {
1101
1101
  if (preCompactionSnapshot) {
1102
1102
  cleanupSessionCompactionSnapshot(preCompactionSnapshot);
@@ -12,7 +12,7 @@ import { readCronRunLogEntriesPageAll } from "../../cron/run-log.js";
12
12
  import { loadCronStore, resolveCronStorePath } from "../../cron/store.js";
13
13
  import { discoverAllSessions, loadCostUsageSummary, loadSessionCostSummary, loadSessionUsageTimeSeries } from "../../infra/session-cost-usage.js";
14
14
  import { buildUsageAggregateTail } from "../../shared/usage-aggregates.js";
15
- import syncFs from "node:fs";
15
+ import fs from "node:fs";
16
16
 
17
17
  //#region src/gateway/server-methods/usage.ts
18
18
  const COST_USAGE_CACHE_TTL_MS = 3e4;
@@ -662,7 +662,7 @@ const usageHandlers = {
662
662
  return;
663
663
  }
664
664
  try {
665
- const stats = syncFs.statSync(sessionFile);
665
+ const stats = fs.statSync(sessionFile);
666
666
  if (stats.isFile()) {
667
667
  mergedEntries.push({
668
668
  key: resolvedStoreKey,
@@ -68,7 +68,7 @@ import { createWizardSessionTracker } from "./server-wizard-sessions.js";
68
68
  import { attachGatewayWsHandlers } from "./server-ws-runtime.js";
69
69
  import { loadGatewayTlsRuntime } from "./server/tls.js";
70
70
  import { createSessionEventSubscriberRegistry, createSessionMessageSubscriberRegistry } from "./session-event-subscribers.js";
71
- import syncFs from "node:fs";
71
+ import fs from "node:fs";
72
72
  import path from "node:path";
73
73
 
74
74
  //#region src/gateway/server.impl.ts
@@ -99,10 +99,10 @@ function hasConfiguredLocalSignerKeystoreMaterial(env) {
99
99
  }
100
100
  try {
101
101
  const materialDir = resolveLocalSignerMaterialRootDir(env);
102
- if (!syncFs.existsSync(materialDir)) {
102
+ if (!fs.existsSync(materialDir)) {
103
103
  return false;
104
104
  }
105
- return syncFs.readdirSync(materialDir, { withFileTypes: true }).some((entry) => entry.isFile() && /^keystore-solana(?:-.+)?\.v1\.enc$/i.test(entry.name));
105
+ return fs.readdirSync(materialDir, { withFileTypes: true }).some((entry) => entry.isFile() && /^keystore-solana(?:-.+)?\.v1\.enc$/i.test(entry.name));
106
106
  } catch {
107
107
  return false;
108
108
  }
@@ -1,6 +1,6 @@
1
1
  import { isSessionCompactionCheckpointArtifactName } from "../config/sessions/artifacts.js";
2
2
  import "../config/sessions.js";
3
- import syncFs from "node:fs";
3
+ import fs from "node:fs";
4
4
  import path from "node:path";
5
5
  import { randomUUID } from "node:crypto";
6
6
 
@@ -88,7 +88,7 @@ function deleteCheckpointSnapshotIfSafe(filePath, expectedDir) {
88
88
  return;
89
89
  }
90
90
  try {
91
- syncFs.unlinkSync(resolved);
91
+ fs.unlinkSync(resolved);
92
92
  } catch {}
93
93
  }
94
94
  function cleanupSessionCompactionSnapshot(reference) {
@@ -105,7 +105,7 @@ function captureSessionCompactionSnapshot(params) {
105
105
  const resolved = path.resolve(sessionFile);
106
106
  let stat;
107
107
  try {
108
- stat = syncFs.statSync(resolved);
108
+ stat = fs.statSync(resolved);
109
109
  } catch {
110
110
  return null;
111
111
  }
@@ -123,7 +123,7 @@ function captureSessionCompactionSnapshot(params) {
123
123
  const base = path.basename(resolved, ".jsonl");
124
124
  const snapshotFile = path.join(dir, `${base}.checkpoint.${randomUUID()}.jsonl`);
125
125
  try {
126
- syncFs.copyFileSync(resolved, snapshotFile);
126
+ fs.copyFileSync(resolved, snapshotFile);
127
127
  } catch {
128
128
  return null;
129
129
  }
@@ -7,7 +7,7 @@ import { extractToolCallNames, hasToolCall } from "../utils/transcript-tools.js"
7
7
  import { stripEnvelope } from "../shared/chat-envelope.js";
8
8
  import "./chat-sanitize.js";
9
9
  import "../config/sessions.js";
10
- import syncFs from "node:fs";
10
+ import fs from "node:fs";
11
11
  import os from "node:os";
12
12
  import path from "node:path";
13
13
 
@@ -50,11 +50,11 @@ function setCachedSessionTitleFields(cacheKey, stat, value) {
50
50
  }
51
51
  function readSessionMessages(sessionId, storePath, sessionFile) {
52
52
  const candidates = resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile);
53
- const filePath = candidates.find((p) => syncFs.existsSync(p));
53
+ const filePath = candidates.find((p) => fs.existsSync(p));
54
54
  if (!filePath) {
55
55
  return [];
56
56
  }
57
- const lines = syncFs.readFileSync(filePath, "utf-8").split(/\r?\n/);
57
+ const lines = fs.readFileSync(filePath, "utf-8").split(/\r?\n/);
58
58
  const messages = [];
59
59
  for (const line of lines) {
60
60
  if (!line.trim()) {
@@ -123,7 +123,7 @@ function resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, a
123
123
  function canonicalizePathForComparison(filePath) {
124
124
  const resolved = path.resolve(filePath);
125
125
  try {
126
- return syncFs.realpathSync(resolved);
126
+ return fs.realpathSync(resolved);
127
127
  } catch {
128
128
  return resolved;
129
129
  }
@@ -131,7 +131,7 @@ function canonicalizePathForComparison(filePath) {
131
131
  function archiveFileOnDisk(filePath, reason) {
132
132
  const ts = formatSessionArchiveTimestamp();
133
133
  const archived = `${filePath}.${reason}.${ts}`;
134
- syncFs.renameSync(filePath, archived);
134
+ fs.renameSync(filePath, archived);
135
135
  return archived;
136
136
  }
137
137
  /**
@@ -149,7 +149,7 @@ function archiveSessionTranscripts(opts) {
149
149
  continue;
150
150
  }
151
151
  }
152
- if (!syncFs.existsSync(candidatePath)) {
152
+ if (!fs.existsSync(candidatePath)) {
153
153
  continue;
154
154
  }
155
155
  try {
@@ -171,7 +171,7 @@ async function cleanupArchivedSessionTranscripts(opts) {
171
171
  let removed = 0;
172
172
  let scanned = 0;
173
173
  for (const dir of directories) {
174
- const entries = await syncFs.promises.readdir(dir).catch(() => []);
174
+ const entries = await fs.promises.readdir(dir).catch(() => []);
175
175
  for (const entry of entries) {
176
176
  const timestamp = parseSessionArchiveTimestamp(entry, reason);
177
177
  if (timestamp == null) {
@@ -182,11 +182,11 @@ async function cleanupArchivedSessionTranscripts(opts) {
182
182
  continue;
183
183
  }
184
184
  const fullPath = path.join(dir, entry);
185
- const stat = await syncFs.promises.stat(fullPath).catch(() => null);
185
+ const stat = await fs.promises.stat(fullPath).catch(() => null);
186
186
  if (!stat?.isFile()) {
187
187
  continue;
188
188
  }
189
- await syncFs.promises.rm(fullPath).catch(() => undefined);
189
+ await fs.promises.rm(fullPath).catch(() => undefined);
190
190
  removed += 1;
191
191
  }
192
192
  }
@@ -225,7 +225,7 @@ function capArrayByJsonBytes(items, maxBytes) {
225
225
  const MAX_LINES_TO_SCAN = 10;
226
226
  function readSessionTitleFieldsFromTranscript(sessionId, storePath, sessionFile, agentId, opts) {
227
227
  const candidates = resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, agentId);
228
- const filePath = candidates.find((p) => syncFs.existsSync(p));
228
+ const filePath = candidates.find((p) => fs.existsSync(p));
229
229
  if (!filePath) {
230
230
  return {
231
231
  firstUserMessage: null,
@@ -234,7 +234,7 @@ function readSessionTitleFieldsFromTranscript(sessionId, storePath, sessionFile,
234
234
  }
235
235
  let stat;
236
236
  try {
237
- stat = syncFs.statSync(filePath);
237
+ stat = fs.statSync(filePath);
238
238
  } catch {
239
239
  return {
240
240
  firstUserMessage: null,
@@ -256,7 +256,7 @@ function readSessionTitleFieldsFromTranscript(sessionId, storePath, sessionFile,
256
256
  }
257
257
  let fd = null;
258
258
  try {
259
- fd = syncFs.openSync(filePath, "r");
259
+ fd = fs.openSync(filePath, "r");
260
260
  const size = stat.size;
261
261
  let firstUserMessage = null;
262
262
  try {
@@ -286,7 +286,7 @@ function readSessionTitleFieldsFromTranscript(sessionId, storePath, sessionFile,
286
286
  } finally {
287
287
  if (fd !== null) {
288
288
  try {
289
- syncFs.closeSync(fd);
289
+ fs.closeSync(fd);
290
290
  } catch {}
291
291
  }
292
292
  }
@@ -314,7 +314,7 @@ function extractTextFromContent(content) {
314
314
  }
315
315
  function readTranscriptHeadChunk(fd, maxBytes = 8192) {
316
316
  const buf = Buffer.alloc(maxBytes);
317
- const bytesRead = syncFs.readSync(fd, buf, 0, buf.length, 0);
317
+ const bytesRead = fs.readSync(fd, buf, 0, buf.length, 0);
318
318
  if (bytesRead <= 0) {
319
319
  return null;
320
320
  }
@@ -345,16 +345,16 @@ function extractFirstUserMessageFromTranscriptChunk(chunk, opts) {
345
345
  }
346
346
  function findExistingTranscriptPath(sessionId, storePath, sessionFile, agentId) {
347
347
  const candidates = resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, agentId);
348
- return candidates.find((p) => syncFs.existsSync(p)) ?? null;
348
+ return candidates.find((p) => fs.existsSync(p)) ?? null;
349
349
  }
350
350
  function withOpenTranscriptFd(filePath, read) {
351
351
  let fd = null;
352
352
  try {
353
- fd = syncFs.openSync(filePath, "r");
353
+ fd = fs.openSync(filePath, "r");
354
354
  return read(fd);
355
355
  } catch {} finally {
356
356
  if (fd !== null) {
357
- syncFs.closeSync(fd);
357
+ fs.closeSync(fd);
358
358
  }
359
359
  }
360
360
  return null;
@@ -378,7 +378,7 @@ function readLastMessagePreviewFromOpenTranscript(params) {
378
378
  const readStart = Math.max(0, params.size - LAST_MSG_MAX_BYTES);
379
379
  const readLen = Math.min(params.size, LAST_MSG_MAX_BYTES);
380
380
  const buf = Buffer.alloc(readLen);
381
- syncFs.readSync(params.fd, buf, 0, readLen, readStart);
381
+ fs.readSync(params.fd, buf, 0, readLen, readStart);
382
382
  const chunk = buf.toString("utf-8");
383
383
  const lines = chunk.split(/\r?\n/).filter((l) => l.trim());
384
384
  const tailLines = lines.slice(-LAST_MSG_MAX_LINES);
@@ -404,7 +404,7 @@ function readLastMessagePreviewFromTranscript(sessionId, storePath, sessionFile,
404
404
  return null;
405
405
  }
406
406
  return withOpenTranscriptFd(filePath, (fd) => {
407
- const stat = syncFs.fstatSync(fd);
407
+ const stat = fs.fstatSync(fd);
408
408
  const size = stat.size;
409
409
  if (size === 0) {
410
410
  return null;
@@ -522,8 +522,8 @@ function buildPreviewItems(messages, maxItems, maxChars) {
522
522
  function readRecentMessagesFromTranscript(filePath, maxMessages, readBytes) {
523
523
  let fd = null;
524
524
  try {
525
- fd = syncFs.openSync(filePath, "r");
526
- const stat = syncFs.fstatSync(fd);
525
+ fd = fs.openSync(filePath, "r");
526
+ const stat = fs.fstatSync(fd);
527
527
  const size = stat.size;
528
528
  if (size === 0) {
529
529
  return [];
@@ -531,7 +531,7 @@ function readRecentMessagesFromTranscript(filePath, maxMessages, readBytes) {
531
531
  const readStart = Math.max(0, size - readBytes);
532
532
  const readLen = Math.min(size, readBytes);
533
533
  const buf = Buffer.alloc(readLen);
534
- syncFs.readSync(fd, buf, 0, readLen, readStart);
534
+ fs.readSync(fd, buf, 0, readLen, readStart);
535
535
  const chunk = buf.toString("utf-8");
536
536
  const lines = chunk.split(/\r?\n/).filter((l) => l.trim());
537
537
  const tailLines = lines.slice(-PREVIEW_MAX_LINES);
@@ -554,13 +554,13 @@ function readRecentMessagesFromTranscript(filePath, maxMessages, readBytes) {
554
554
  return [];
555
555
  } finally {
556
556
  if (fd !== null) {
557
- syncFs.closeSync(fd);
557
+ fs.closeSync(fd);
558
558
  }
559
559
  }
560
560
  }
561
561
  function readSessionPreviewItemsFromTranscript(sessionId, storePath, sessionFile, agentId, maxItems, maxChars) {
562
562
  const candidates = resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, agentId);
563
- const filePath = candidates.find((p) => syncFs.existsSync(p));
563
+ const filePath = candidates.find((p) => fs.existsSync(p));
564
564
  if (!filePath) {
565
565
  return [];
566
566
  }
@@ -19,7 +19,7 @@ import { loadSessionStore } from "../config/sessions/store.js";
19
19
  import "../config/sessions.js";
20
20
  import { lookupContextTokens } from "../agents/context.js";
21
21
  import { listSessionCompactionCheckpoints } from "./session-compaction-checkpoints.js";
22
- import syncFs from "node:fs";
22
+ import fs from "node:fs";
23
23
  import path from "node:path";
24
24
 
25
25
  //#region src/gateway/session-utils.ts
@@ -41,7 +41,7 @@ function isCombinedSessionStoreCacheFresh(entry) {
41
41
  }
42
42
  function readSessionStoreSignature(storePath) {
43
43
  try {
44
- const stat = syncFs.statSync(storePath);
44
+ const stat = fs.statSync(storePath);
45
45
  return {
46
46
  storePath,
47
47
  exists: true,
@@ -94,7 +94,7 @@ function clearCombinedSessionStoreCacheForTest() {
94
94
  }
95
95
  function tryResolveExistingPath(value) {
96
96
  try {
97
- return syncFs.realpathSync(value);
97
+ return fs.realpathSync(value);
98
98
  } catch {
99
99
  return null;
100
100
  }
@@ -132,11 +132,11 @@ function resolveIdentityAvatarUrl(cfg, agentId, avatar) {
132
132
  return undefined;
133
133
  }
134
134
  try {
135
- const buffer = syncFs.readFileSync(opened.fd);
135
+ const buffer = fs.readFileSync(opened.fd);
136
136
  const mime = resolveAvatarMime(resolvedCandidate);
137
137
  return `data:${mime};base64,${buffer.toString("base64")}`;
138
138
  } finally {
139
- syncFs.closeSync(opened.fd);
139
+ fs.closeSync(opened.fd);
140
140
  }
141
141
  } catch {
142
142
  return undefined;
@@ -304,7 +304,7 @@ function listExistingAgentIdsFromDisk() {
304
304
  const root = resolveStateDir();
305
305
  const agentsDir = path.join(root, "agents");
306
306
  try {
307
- const entries = syncFs.readdirSync(agentsDir, { withFileTypes: true });
307
+ const entries = fs.readdirSync(agentsDir, { withFileTypes: true });
308
308
  return entries.filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
309
309
  } catch {
310
310
  return [];
@@ -5,11 +5,11 @@ import { normalizeAgentId } from "../routing/session-key.js";
5
5
  import { resolveDefaultAgentId } from "../agents/agent-scope.js";
6
6
  import { isStandardProviderModelRef } from "../providers/registry.js";
7
7
  import { modelKey, resolveAllowedModelRef, resolveDefaultModelForAgent, resolveSubagentConfiguredModelSelection } from "../agents/model-selection.js";
8
- import { filterModelCatalogByProviders } from "../agents/model-catalog-access.js";
9
8
  import { parseSessionLabel } from "../sessions/session-label.js";
10
9
  import { ErrorCodes, errorShape } from "./protocol/schema/error-codes.js";
11
10
  import "./protocol/index.js";
12
11
  import { normalizeSendPolicy } from "../sessions/send-policy.js";
12
+ import { filterModelCatalogByProviders } from "../agents/model-catalog-access.js";
13
13
  import { normalizeGroupActivation } from "../auto-reply/group-activation.js";
14
14
  import { applyModelOverrideToSessionEntry } from "../sessions/model-overrides.js";
15
15
  import { applyVerboseOverride, parseVerboseOverride } from "../sessions/level-overrides.js";
@@ -1,5 +1,5 @@
1
1
  import { fileURLToPath } from "node:url";
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/hooks/bundled-dir.ts
@@ -11,14 +11,14 @@ function resolveBundledHooksDir() {
11
11
  try {
12
12
  const execDir = path.dirname(process.execPath);
13
13
  const sibling = path.join(execDir, "hooks", "bundled");
14
- if (syncFs.existsSync(sibling)) {
14
+ if (fs.existsSync(sibling)) {
15
15
  return sibling;
16
16
  }
17
17
  } catch {}
18
18
  try {
19
19
  const moduleDir = path.dirname(fileURLToPath(import.meta.url));
20
20
  const distBundled = path.join(moduleDir, "bundled");
21
- if (syncFs.existsSync(distBundled)) {
21
+ if (fs.existsSync(distBundled)) {
22
22
  return distBundled;
23
23
  }
24
24
  } catch {}
@@ -26,7 +26,7 @@ function resolveBundledHooksDir() {
26
26
  const moduleDir = path.dirname(fileURLToPath(import.meta.url));
27
27
  const root = path.resolve(moduleDir, "..", "..");
28
28
  const srcBundled = path.join(root, "src", "hooks", "bundled");
29
- if (syncFs.existsSync(srcBundled)) {
29
+ if (fs.existsSync(srcBundled)) {
30
30
  return srcBundled;
31
31
  }
32
32
  } catch {}
@@ -3,7 +3,7 @@ import { runCommandWithTimeout } from "../process/exec.js";
3
3
  import { hasBinary } from "../shared/config-eval.js";
4
4
  import "../agents/skills.js";
5
5
  import { normalizeServePath } from "./gmail.js";
6
- import syncFs from "node:fs";
6
+ import fs from "node:fs";
7
7
  import path from "node:path";
8
8
 
9
9
  //#region src/hooks/gmail-setup-utils.ts
@@ -71,7 +71,7 @@ function findExecutablesOnPath(bins) {
71
71
  continue;
72
72
  }
73
73
  try {
74
- syncFs.accessSync(candidate, syncFs.constants.X_OK);
74
+ fs.accessSync(candidate, fs.constants.X_OK);
75
75
  matches.push(candidate);
76
76
  seen.add(candidate);
77
77
  } catch {}
@@ -100,7 +100,7 @@ function ensureGcloudOnPath() {
100
100
  ];
101
101
  for (const candidate of candidates) {
102
102
  try {
103
- syncFs.accessSync(candidate, syncFs.constants.X_OK);
103
+ fs.accessSync(candidate, fs.constants.X_OK);
104
104
  ensurePathIncludes(path.dirname(candidate), "append");
105
105
  return true;
106
106
  } catch {}
@@ -126,7 +126,7 @@ async function resolvePythonExecutablePath() {
126
126
  continue;
127
127
  }
128
128
  try {
129
- syncFs.accessSync(resolved, syncFs.constants.X_OK);
129
+ fs.accessSync(resolved, fs.constants.X_OK);
130
130
  cachedPythonPath = resolved;
131
131
  return resolved;
132
132
  } catch {}
@@ -303,11 +303,11 @@ async function ensureTailscaleEndpoint(params) {
303
303
  async function resolveProjectIdFromGogCredentials() {
304
304
  const candidates = gogCredentialsPaths();
305
305
  for (const candidate of candidates) {
306
- if (!syncFs.existsSync(candidate)) {
306
+ if (!fs.existsSync(candidate)) {
307
307
  continue;
308
308
  }
309
309
  try {
310
- const raw = syncFs.readFileSync(candidate, "utf-8");
310
+ const raw = fs.readFileSync(candidate, "utf-8");
311
311
  const parsed = JSON.parse(raw);
312
312
  const clientId = extractGogClientId(parsed);
313
313
  const projectNumber = extractProjectNumber(clientId);
@@ -1,5 +1,5 @@
1
1
  import { pathToFileURL } from "node:url";
2
- import syncFs from "node:fs";
2
+ import fs from "node:fs";
3
3
 
4
4
  //#region src/hooks/import-url.ts
5
5
  /**
@@ -24,7 +24,7 @@ function buildImportUrl(handlerPath, source) {
24
24
  return base;
25
25
  }
26
26
  try {
27
- const { mtimeMs, size } = syncFs.statSync(handlerPath);
27
+ const { mtimeMs, size } = fs.statSync(handlerPath);
28
28
  return `${base}?t=${mtimeMs}&s=${size}`;
29
29
  } catch {
30
30
  return `${base}?t=${Date.now()}`;
@@ -5,7 +5,7 @@ import { resolveHookConfig, shouldIncludeHook } from "./config.js";
5
5
  import { resolveFunctionModuleExport } from "./module-loader.js";
6
6
  import { loadWorkspaceHookEntries } from "./workspace.js";
7
7
  import { buildImportUrl } from "./import-url.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/hooks/loader.ts
@@ -67,7 +67,7 @@ async function loadInternalHooks(cfg, workspaceDir, opts) {
67
67
  continue;
68
68
  }
69
69
  const safeHandlerPath = opened.path;
70
- syncFs.closeSync(opened.fd);
70
+ fs.closeSync(opened.fd);
71
71
  const importUrl = buildImportUrl(safeHandlerPath, entry.hook.source);
72
72
  const mod = await import(importUrl);
73
73
  const exportName = entry.metadata?.export ?? "default";
@@ -127,7 +127,7 @@ async function loadInternalHooks(cfg, workspaceDir, opts) {
127
127
  continue;
128
128
  }
129
129
  const safeModulePath = opened.path;
130
- syncFs.closeSync(opened.fd);
130
+ fs.closeSync(opened.fd);
131
131
  const importUrl = buildImportUrl(safeModulePath, "fased-workspace");
132
132
  const mod = await import(importUrl);
133
133
  const exportName = handlerConfig.export ?? "default";
@@ -150,7 +150,7 @@ async function loadInternalHooks(cfg, workspaceDir, opts) {
150
150
  }
151
151
  function safeRealpathOrResolve(value) {
152
152
  try {
153
- return syncFs.realpathSync(value);
153
+ return fs.realpathSync(value);
154
154
  } catch {
155
155
  return path.resolve(value);
156
156
  }
@@ -6,7 +6,7 @@ import { isPathInsideWithRealpath } from "../security/scan-paths.js";
6
6
  import { parseFrontmatter, resolveFasedAgentMetadata, resolveHookInvocationPolicy } from "./frontmatter.js";
7
7
  import { shouldIncludeHook } from "./config.js";
8
8
  import { resolveBundledHooksDir } from "./bundled-dir.js";
9
- import syncFs from "node:fs";
9
+ import fs from "node:fs";
10
10
  import path from "node:path";
11
11
 
12
12
  //#region src/hooks/workspace.ts
@@ -106,15 +106,15 @@ function loadHookFromDir(params) {
106
106
  */
107
107
  function loadHooksFromDir(params) {
108
108
  const { dir, source, pluginId } = params;
109
- if (!syncFs.existsSync(dir)) {
109
+ if (!fs.existsSync(dir)) {
110
110
  return [];
111
111
  }
112
- const stat = syncFs.statSync(dir);
112
+ const stat = fs.statSync(dir);
113
113
  if (!stat.isDirectory()) {
114
114
  return [];
115
115
  }
116
116
  const hooks = [];
117
- const entries = syncFs.readdirSync(dir, { withFileTypes: true });
117
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
118
118
  for (const entry of entries) {
119
119
  if (!entry.isDirectory()) {
120
120
  continue;
@@ -263,11 +263,11 @@ function readBoundaryFileUtf8(params) {
263
263
  return null;
264
264
  }
265
265
  try {
266
- return syncFs.readFileSync(opened.fd, "utf-8");
266
+ return fs.readFileSync(opened.fd, "utf-8");
267
267
  } catch {
268
268
  return null;
269
269
  } finally {
270
- syncFs.closeSync(opened.fd);
270
+ fs.closeSync(opened.fd);
271
271
  }
272
272
  }
273
273
  function resolveBoundaryFilePath(params) {
@@ -280,7 +280,7 @@ function resolveBoundaryFilePath(params) {
280
280
  return null;
281
281
  }
282
282
  const safePath = opened.path;
283
- syncFs.closeSync(opened.fd);
283
+ fs.closeSync(opened.fd);
284
284
  return safePath;
285
285
  }
286
286