@fased/fased 0.1.56 → 0.1.58

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 (362) 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 +5 -2
  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-snapshot.js +124 -0
  15. package/dist/agents/model-catalog-status.js +6 -1
  16. package/dist/agents/openai-codex-app-server.js +35 -10
  17. package/dist/agents/openai-codex-runtime-component.js +39 -0
  18. package/dist/agents/pi-embedded-runner/compact.js +1 -1
  19. package/dist/agents/pi-embedded-runner/extra-params.js +28 -16
  20. package/dist/agents/pi-embedded-runner/run/attempt.js +1 -1
  21. package/dist/agents/pi-embedded-runner/session-manager-init.js +5 -20
  22. package/dist/agents/pi-embedded-subscribe.raw-stream.js +3 -3
  23. package/dist/agents/pi-extensions/compaction-safeguard.js +3 -3
  24. package/dist/agents/pi-model-discovery.js +6 -6
  25. package/dist/agents/pi-project-settings.js +3 -3
  26. package/dist/agents/provider-extension-catalog-manifest.js +2 -2
  27. package/dist/agents/sandbox/fs-bridge.js +2 -2
  28. package/dist/agents/session-dirs.js +4 -4
  29. package/dist/agents/session-write-lock.js +13 -13
  30. package/dist/agents/shell-utils.js +5 -5
  31. package/dist/agents/skills/bundled-dir.js +4 -4
  32. package/dist/agents/skills/local-loader.js +6 -6
  33. package/dist/agents/skills/plugin-skills.js +2 -2
  34. package/dist/agents/skills/workspace.js +13 -13
  35. package/dist/agents/skills-install-download.js +7 -7
  36. package/dist/agents/skills-install-plan.js +2 -2
  37. package/dist/agents/skills-install.js +2 -2
  38. package/dist/agents/skills-status.js +2 -2
  39. package/dist/agents/subagent-depth.js +2 -2
  40. package/dist/agents/system-prompt-params.js +2 -2
  41. package/dist/agents/tools/session-status-tool.js +1 -1
  42. package/dist/agents/workspace.js +22 -22
  43. package/dist/auto-reply/reply/agent-runner-execution.js +2 -2
  44. package/dist/auto-reply/reply/agent-runner.js +2 -2
  45. package/dist/auto-reply/reply/commands-export-session.js +7 -7
  46. package/dist/auto-reply/reply/post-compaction-audit.js +3 -3
  47. package/dist/auto-reply/reply/post-compaction-context.js +3 -3
  48. package/dist/auto-reply/reply/session.js +3 -3
  49. package/dist/auto-reply/skill-commands.js +3 -3
  50. package/dist/auto-reply/status.js +6 -6
  51. package/dist/brand.js +1 -1
  52. package/dist/browser/chrome.executables.js +3 -3
  53. package/dist/browser/chrome.js +3 -3
  54. package/dist/browser/chrome.profile-decoration.js +6 -6
  55. package/dist/browser/profiles-service.js +2 -2
  56. package/dist/browser/server-context.js +2 -2
  57. package/dist/browser/trash.js +4 -4
  58. package/dist/build-info.json +3 -3
  59. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  60. package/dist/canvas-host/server.js +4 -4
  61. package/dist/capabilities/catalog.js +3 -3
  62. package/dist/capabilities/install.js +43 -0
  63. package/dist/channels/plugins/catalog.js +3 -3
  64. package/dist/cli/browser-cli-extension.js +6 -6
  65. package/dist/cli/command-format.js +2 -2
  66. package/dist/cli/components-cli.js +9 -31
  67. package/dist/cli/cron-cli/register.cron-simple.js +2 -2
  68. package/dist/cli/dns-cli.js +9 -9
  69. package/dist/cli/gateway-cli/dev.js +5 -5
  70. package/dist/cli/gateway-cli/run.js +2 -2
  71. package/dist/cli/hooks-cli.js +6 -6
  72. package/dist/cli/lightweight/gateway-runtime-probe.js +2 -2
  73. package/dist/cli/memory-cli.js +7 -7
  74. package/dist/cli/nodes-media-utils.js +2 -2
  75. package/dist/cli/plugins-cli.js +5 -5
  76. package/dist/cli/secrets-cli.js +3 -3
  77. package/dist/cli/update-cli/update-command.js +50 -12
  78. package/dist/cli/windows-argv.js +2 -2
  79. package/dist/commands/agent.js +1 -1
  80. package/dist/commands/auth-choice.apply.openai.js +9 -0
  81. package/dist/commands/auth-choice.apply.plugin-provider.js +1 -1
  82. package/dist/commands/dashboard-link.js +3 -3
  83. package/dist/commands/doctor-install.js +5 -5
  84. package/dist/commands/doctor-memory-search.js +2 -2
  85. package/dist/commands/doctor-platform-notes.js +2 -2
  86. package/dist/commands/doctor-sandbox.js +2 -2
  87. package/dist/commands/doctor-state-integrity.js +23 -23
  88. package/dist/commands/doctor-workspace.js +3 -3
  89. package/dist/commands/doctor.js +3 -3
  90. package/dist/commands/managed-up.js +2 -2
  91. package/dist/commands/onboard-auth.credentials.js +3 -3
  92. package/dist/commands/onboard-channels.js +1 -1
  93. package/dist/commands/onboarding/plugin-install.js +4 -4
  94. package/dist/commands/sessions-cleanup.js +2 -2
  95. package/dist/commands/signal-install.js +6 -6
  96. package/dist/commands/status-all/channels.js +2 -2
  97. package/dist/commands/wallet.js +47 -47
  98. package/dist/config/cache-utils.js +2 -2
  99. package/dist/config/includes.js +5 -5
  100. package/dist/config/io.js +2 -2
  101. package/dist/config/paths.js +3 -3
  102. package/dist/config/sat-runtime-ids.js +3 -3
  103. package/dist/config/sessions/disk-budget.js +6 -6
  104. package/dist/config/sessions/paths.js +2 -2
  105. package/dist/config/sessions/store.js +17 -17
  106. package/dist/config/sessions/transcript.js +4 -4
  107. package/dist/config/talk.js +2 -2
  108. package/dist/control-ui/assets/{app-D7TXyNRi.js → app-CpgQGqe6.js} +1689 -1689
  109. package/dist/control-ui/assets/{index-BmSBom-w.js → index-DiBBflpv.js} +3 -3
  110. package/dist/control-ui/index.html +1 -1
  111. package/dist/control-ui/version.json +1 -1
  112. package/dist/cron/service/store.js +2 -2
  113. package/dist/cron/store.js +6 -6
  114. package/dist/daemon/systemd-system.js +5 -5
  115. package/dist/discord/monitor/thread-bindings.state.js +2 -2
  116. package/dist/extensions/sat-mining/src/sat-bond-layout.js +9 -9
  117. package/dist/gateway/control-ui-boot-check.js +6 -6
  118. package/dist/gateway/control-ui-login.js +7 -7
  119. package/dist/gateway/control-ui.js +9 -9
  120. package/dist/gateway/hooks-mapping.js +4 -4
  121. package/dist/gateway/protocol/schema/agents-models-skills.js +43 -1
  122. package/dist/gateway/server-discovery.js +2 -2
  123. package/dist/gateway/server-http.js +4 -4
  124. package/dist/gateway/server-methods/chat.js +3 -3
  125. package/dist/gateway/server-methods/hooks.js +1 -1
  126. package/dist/gateway/server-methods/models.js +12 -5
  127. package/dist/gateway/server-methods/plugins-marketplace.js +3 -3
  128. package/dist/gateway/server-methods/services.js +1 -1
  129. package/dist/gateway/server-methods/sessions.js +7 -7
  130. package/dist/gateway/server-methods/usage.js +2 -2
  131. package/dist/gateway/server.impl.js +3 -3
  132. package/dist/gateway/session-compaction-checkpoints.js +4 -4
  133. package/dist/gateway/session-utils.fs.js +24 -24
  134. package/dist/gateway/session-utils.js +6 -6
  135. package/dist/gateway/sessions-patch.js +1 -1
  136. package/dist/hooks/bundled-dir.js +4 -4
  137. package/dist/hooks/gmail-setup-utils.js +6 -6
  138. package/dist/hooks/import-url.js +2 -2
  139. package/dist/hooks/loader.js +4 -4
  140. package/dist/hooks/workspace.js +7 -7
  141. package/dist/infra/archive.js +17 -17
  142. package/dist/infra/boundary-file-read.js +2 -2
  143. package/dist/infra/boundary-path.js +15 -15
  144. package/dist/infra/brew.js +2 -2
  145. package/dist/infra/control-ui-assets.js +14 -14
  146. package/dist/infra/device-auth-store.js +8 -8
  147. package/dist/infra/device-identity.js +8 -8
  148. package/dist/infra/dotenv.js +2 -2
  149. package/dist/infra/exec-approvals.js +8 -8
  150. package/dist/infra/exec-command-resolution.js +4 -4
  151. package/dist/infra/exec-safe-bin-trust.js +2 -2
  152. package/dist/infra/fased-root.js +5 -5
  153. package/dist/infra/fs-safe.js +14 -14
  154. package/dist/infra/gateway-lock.js +11 -11
  155. package/dist/infra/git-commit.js +5 -5
  156. package/dist/infra/git-root.js +4 -4
  157. package/dist/infra/hosted-runtime-artifact.js +3 -3
  158. package/dist/infra/is-main.js +2 -2
  159. package/dist/infra/json-file.js +7 -7
  160. package/dist/infra/outbound/delivery-queue.js +16 -16
  161. package/dist/infra/path-env.js +3 -3
  162. package/dist/infra/ports-lsof.js +4 -4
  163. package/dist/infra/provider-usage.auth.js +3 -3
  164. package/dist/infra/safe-open-sync.js +2 -2
  165. package/dist/infra/session-cost-usage.js +9 -9
  166. package/dist/infra/shell-env.js +2 -2
  167. package/dist/infra/state-migrations.fs.js +6 -6
  168. package/dist/infra/state-migrations.js +23 -23
  169. package/dist/infra/tmp-fased-dir.js +6 -6
  170. package/dist/infra/widearea-dns.js +3 -3
  171. package/dist/infra/wsl.js +2 -2
  172. package/dist/light-update-status.js +11 -11
  173. package/dist/line/accounts.js +2 -2
  174. package/dist/line/download.js +2 -2
  175. package/dist/logging/config.js +3 -3
  176. package/dist/logging/logger.js +7 -7
  177. package/dist/managed/federation.js +3 -3
  178. package/dist/managed/tunnel.js +3 -3
  179. package/dist/media/store.js +13 -13
  180. package/dist/media-understanding/runner.js +3 -3
  181. package/dist/memory/embeddings.js +2 -2
  182. package/dist/memory/internal.js +10 -10
  183. package/dist/memory/manager-sync-ops.js +7 -7
  184. package/dist/memory/repair-executor.js +17 -17
  185. package/dist/node-host/invoke-system-run-plan.js +8 -8
  186. package/dist/node-host/invoke.js +2 -2
  187. package/dist/node-host/runner.js +3 -3
  188. package/dist/pairing/pairing-store.js +3 -3
  189. package/dist/plugin-sdk/{accounts-DzWlKv1U.js → accounts-BJuN64m-.js} +1 -1
  190. package/dist/plugin-sdk/{actions-BplQVLL6.js → actions-DaEvM9Bl.js} +2 -2
  191. package/dist/plugin-sdk/{active-listener-x4MLhYUw.js → active-listener-B8Kuanet.js} +1 -1
  192. package/dist/plugin-sdk/{agent-scope-BbgPlhtw.js → agent-scope-CCjfjKoO.js} +1 -1
  193. package/dist/plugin-sdk/{audio-preflight-G8h3Sn8_.js → audio-preflight-D7tCO0EH.js} +31 -31
  194. package/dist/plugin-sdk/{audit-CWknklvI.js → audit-CVWH4BVP.js} +1 -1
  195. package/dist/plugin-sdk/{channel-access-a9Dnfw7-.js → channel-access-CH9FAS-I.js} +1 -1
  196. package/dist/plugin-sdk/{channel-access-configure-CD4QDN5E.js → channel-access-configure-CI0je66H.js} +1 -1
  197. package/dist/plugin-sdk/channel-plugin-common.d.ts +2 -2
  198. package/dist/plugin-sdk/channel-plugin-common.js +5 -5
  199. package/dist/plugin-sdk/{chunk-B8EZkwiT.js → chunk-01oBnQjh.js} +1 -1
  200. package/dist/plugin-sdk/{chunk-items-CEPklxGe.js → chunk-items-D2zDJ8q8.js} +1 -1
  201. package/dist/plugin-sdk/command-status.js +31 -31
  202. package/dist/plugin-sdk/{commands-registry-BfEa4tFA.js → commands-registry-ckg4fhYa.js} +2 -2
  203. package/dist/plugin-sdk/{common-CbfckC19.js → common-zHvdO8ly.js} +1 -1
  204. package/dist/plugin-sdk/{config-Bt5GhnA-.js → config-DrhYEiCM.js} +1128 -3
  205. package/dist/plugin-sdk/{config-schema-B9DKr6J5.js → config-schema-BtjeV5Hm.js} +1765 -1412
  206. package/dist/plugin-sdk/device-pair.d.ts +1 -1
  207. package/dist/plugin-sdk/discord.d.ts +3 -3
  208. package/dist/plugin-sdk/discord.js +22 -22
  209. package/dist/plugin-sdk/{filesystem-manager-BGGGrkiN.js → filesystem-manager-ZoHU8oA7.js} +2 -2
  210. package/dist/plugin-sdk/{fs-safe-xBqok6yR.js → fs-safe-g4g7GT02.js} +2 -2
  211. package/dist/plugin-sdk/{handle-action-DbzZFYnG.js → handle-action-5dhYpMbP.js} +17 -17
  212. package/dist/plugin-sdk/{helpers-CluGKuIV.js → helpers-E9aafRzA.js} +1 -1
  213. package/dist/plugin-sdk/{image-ops-CUaLtIFj.js → image-ops-D2U9ctmu.js} +1 -1
  214. package/dist/plugin-sdk/index.d.ts +5 -5
  215. package/dist/plugin-sdk/index.js +33 -33
  216. package/dist/plugin-sdk/json-store.js +6 -6
  217. package/dist/plugin-sdk/{login-DJuHYDiK.js → login-hql0fNuL.js} +3 -3
  218. package/dist/plugin-sdk/{login-qr-CbHL5ayf.js → login-qr-DJJ0svux.js} +4 -4
  219. package/dist/plugin-sdk/{manager-oHAvZCT3.js → manager-ciNnAMBn.js} +4 -4
  220. package/dist/plugin-sdk/{markdown-tables-Mkx7k92Y.js → markdown-tables-BKxbua_h.js} +1 -1
  221. package/dist/plugin-sdk/{media-CA8sTmVE.js → media-DUIZ6x9H.js} +4 -4
  222. package/dist/plugin-sdk/{memory-search-VFll-AIb.js → memory-search-DTjIMw8J.js} +1 -1
  223. package/dist/plugin-sdk/{monitor-CZrN9pev.js → monitor-CNSGw4uQ.js} +35 -35
  224. package/dist/plugin-sdk/{monitor-CmwGqNyV.js → monitor-D-giXewh.js} +38 -38
  225. package/dist/plugin-sdk/{openresponses-http-CWOd4war.js → openresponses-http-dbTd8UMk.js} +31 -31
  226. package/dist/plugin-sdk/{optional-runtime-dependency-DKmk9PZa.js → optional-runtime-dependency-CKsJL1PD.js} +1 -1
  227. package/dist/plugin-sdk/{outbound-0oN9IfNw.js → outbound-DhGrjRft.js} +6 -6
  228. package/dist/plugin-sdk/{outbound-attachment-DdVkqUzE.js → outbound-attachment-DAF8huFz.js} +2 -2
  229. package/dist/plugin-sdk/{pairing-message-ClqhfCUk.js → pairing-message-BsJVvXkb.js} +1 -1
  230. package/dist/plugin-sdk/{pairing-message-BMkkS038.d.ts → pairing-message-C403mq4K.d.ts} +1 -1
  231. package/dist/plugin-sdk/{pairing-store-B01mCSct.js → pairing-store-DwM-BNbj.js} +2 -2
  232. package/dist/plugin-sdk/{path-alias-guards-BJZD5JMJ.js → path-alias-guards-DjgDArrp.js} +1 -1
  233. package/dist/plugin-sdk/{pi-model-discovery-Buz0JC1Y.js → pi-model-discovery-DkIdlJvJ.js} +1 -1
  234. package/dist/plugin-sdk/{pi-model-discovery-runtime-DuwuoteY.js → pi-model-discovery-runtime-Cv7okUMt.js} +3 -3
  235. package/dist/plugin-sdk/{probe--7xtfzMm.js → probe-CJb5uR8B.js} +1 -1
  236. package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +1 -1
  237. package/dist/plugin-sdk/{pw-ai-B0domrii.js → pw-ai-Dxd87W3J.js} +6 -6
  238. package/dist/plugin-sdk/{qmd-manager-CFFeM4Fl.js → qmd-manager-DSyx77KY.js} +1 -1
  239. package/dist/plugin-sdk/{replies-1macZ1mZ.js → replies-Bx61SvAC.js} +2 -2
  240. package/dist/plugin-sdk/{reply-prefix-ClpxvL_w.js → reply-prefix-CeVw7Mn2.js} +1 -1
  241. package/dist/plugin-sdk/{probe-xY3Ky0Tx.js → resolve-channels-_-nV-EK2.js} +3 -2
  242. package/dist/plugin-sdk/{resolve-outbound-target-BdH6LUoW.js → resolve-outbound-target-bc-FpPZg.js} +1 -1
  243. package/dist/plugin-sdk/{resolve-route-CkNIKKEW.js → resolve-route-D0eBYPtb.js} +2 -2
  244. package/dist/plugin-sdk/{retry-policy-9ybIh4Fq.js → retry-policy-HTrC4zfC.js} +1 -1
  245. package/dist/plugin-sdk/{runtime-Dy420wBu.js → runtime-BVkIrYLQ.js} +4 -4
  246. package/dist/plugin-sdk/{runtime-dependency-CIw9t7-k.js → runtime-dependency-B2PqMdBu.js} +13 -13
  247. package/dist/plugin-sdk/{sandbox-paths-w64tYl0v.js → sandbox-paths-Dx2lUqCu.js} +2 -2
  248. package/dist/plugin-sdk/sat-runtime.d.ts +2 -2
  249. package/dist/plugin-sdk/sat-runtime.js +31 -31
  250. package/dist/plugin-sdk/{send-J4JWKP62.js → send-BGDGzxUu.js} +6 -6
  251. package/dist/plugin-sdk/{send-BQUtCJFW.js → send-C3QWSYLR.js} +8 -8
  252. package/dist/plugin-sdk/{send-Dqes9tdU.js → send-DT2egZNK.js} +7 -7
  253. package/dist/plugin-sdk/{send-2VcOMTN5.js → send-DgzZUx2i.js} +5 -5
  254. package/dist/plugin-sdk/{send-DPJIIYAs.js → send-KJy3ajA3.js} +6 -6
  255. package/dist/plugin-sdk/{session-C_n2S5ub.js → session-BCIEFOu1.js} +2 -2
  256. package/dist/plugin-sdk/{skill-commands-B7wx9ax8.js → skill-commands-CyIkcR8P.js} +4 -4
  257. package/dist/plugin-sdk/{slack-BouRQG-W.js → slack-DjKNh2uh.js} +47 -47
  258. package/dist/plugin-sdk/{slack-actions-CasHVtiq.js → slack-actions-CeM9LWDp.js} +14 -14
  259. package/dist/plugin-sdk/slack.d.ts +3 -3
  260. package/dist/plugin-sdk/slack.js +12 -12
  261. package/dist/plugin-sdk/{sticker-cache-BvGEUas3.js → sticker-cache-DcWzQ2wx.js} +3 -3
  262. package/dist/plugin-sdk/{tables-CjlQJV4r.js → tables-B2iehyjG.js} +1 -1
  263. package/dist/plugin-sdk/{targets-QfP164Dh.js → targets-BPket0SF.js} +1 -1
  264. package/dist/plugin-sdk/{telegram-actions-CwYjV6Db.js → telegram-actions-Cx_HWVht.js} +34 -34
  265. package/dist/plugin-sdk/telegram.d.ts +3 -3
  266. package/dist/plugin-sdk/telegram.js +9 -9
  267. package/dist/plugin-sdk/{thread-bindings.lifecycle-DU4iX_Jr.js → thread-bindings.lifecycle-CYH69SIw.js} +3 -3
  268. package/dist/plugin-sdk/{thread-bindings.state-BgYWFjNF.js → thread-bindings.state-BN6461WG.js} +2 -2
  269. package/dist/plugin-sdk/{tmp-fased-dir-BdFQvrvw.d.ts → tmp-fased-dir-Ouj58axY.d.ts} +1 -1
  270. package/dist/plugin-sdk/{types-BYDL6dQj.d.ts → types-B4hj6HgR.d.ts} +1 -1
  271. package/dist/plugin-sdk/{types-CLIvQaVg.d.ts → types-dWZFX1fk.d.ts} +2 -2
  272. package/dist/plugin-sdk/{web-D0yENDve.js → web-vR-oNiBv.js} +36 -36
  273. package/dist/plugin-sdk/{whatsapp-actions-BT2nPLyo.js → whatsapp-actions-BYNf8ceY.js} +16 -16
  274. package/dist/plugin-sdk/{whatsapp-heartbeat-CiABSZ6G.js → whatsapp-heartbeat-DZwa8MF0.js} +2 -2
  275. package/dist/plugin-sdk/whatsapp.d.ts +3 -3
  276. package/dist/plugin-sdk/whatsapp.js +13 -13
  277. package/dist/plugin-sdk/{wsl-B_ojyEtC.js → wsl-WGtdw_6h.js} +3 -3
  278. package/dist/plugins/bundled-dir.js +3 -3
  279. package/dist/plugins/discovery.js +11 -11
  280. package/dist/plugins/lifecycle.js +1 -1
  281. package/dist/plugins/loader.js +13 -13
  282. package/dist/plugins/manifest-registry.js +28 -2
  283. package/dist/plugins/manifest.js +6 -4
  284. package/dist/plugins/marketplace.js +1 -1
  285. package/dist/plugins/path-safety.js +3 -3
  286. package/dist/plugins/status-cache.js +9 -9
  287. package/dist/plugins/update.js +4 -4
  288. package/dist/plugins/web-search-install-catalog.js +3 -3
  289. package/dist/providers/openai-codex-model-discovery.js +11 -1
  290. package/dist/providers/runtime-model-catalog.js +2 -2
  291. package/dist/secrets/apply.js +16 -16
  292. package/dist/secrets/audit.js +11 -11
  293. package/dist/secrets/shared.js +9 -9
  294. package/dist/security/scan-paths.js +2 -2
  295. package/dist/shared/config-eval.js +2 -2
  296. package/dist/shared/pid-alive.js +2 -2
  297. package/dist/tasks/standing-orders.js +5 -5
  298. package/dist/tasks/task-flow-registry.js +5 -5
  299. package/dist/tasks/task-registry.js +5 -5
  300. package/dist/tasks/workflow-definitions.js +6 -6
  301. package/dist/telegram/token.js +5 -5
  302. package/dist/utils.js +5 -5
  303. package/dist/wallet/local-socket-signer-broker.js +16 -16
  304. package/dist/wallet/providers/embedded-keystore-adapter.js +5 -5
  305. package/dist/wallet/providers/local-socket-signer-adapter.js +2 -2
  306. package/dist/wallet/wallet-approval-auth.js +5 -5
  307. package/dist/wallet/wallet-audit-log.js +5 -5
  308. package/dist/wallet/wallet-custody.js +21 -21
  309. package/dist/wallet/wallet-inbound-events.js +5 -5
  310. package/dist/wallet/wallet-observability.js +5 -5
  311. package/dist/wallet/wallet-policy.js +9 -9
  312. package/dist/wallet/wallet-provider-registry.js +7 -7
  313. package/dist/wallet/wallet-runtime-config.js +3 -3
  314. package/dist/wallet/wallet-secrets-store.js +22 -22
  315. package/dist/wallet/wallet-send-approvals.js +5 -5
  316. package/dist/wallet/wallet-settlement-links.js +5 -5
  317. package/dist/web/accounts.js +3 -3
  318. package/dist/web/auth-store.js +18 -18
  319. package/dist/web/session.js +4 -4
  320. package/dist/wizard/host-security-capability.js +2 -2
  321. package/dist/wizard/onboarding.finalize.js +1 -1
  322. package/dist/wizard/onboarding.host-security.js +7 -7
  323. package/dist/wizard/onboarding.js +7 -7
  324. package/dist/wizard/onboarding.wallet.js +44 -44
  325. package/extensions/acpx/package.json +1 -1
  326. package/extensions/bluebubbles/package.json +1 -1
  327. package/extensions/copilot-proxy/package.json +1 -1
  328. package/extensions/diagnostics-otel/package.json +1 -1
  329. package/extensions/fased-federation/package.json +1 -1
  330. package/extensions/google-gemini-cli-auth/package.json +1 -1
  331. package/extensions/imessage/package.json +1 -1
  332. package/extensions/irc/package.json +1 -1
  333. package/extensions/line/package.json +1 -1
  334. package/extensions/llm-task/package.json +1 -1
  335. package/extensions/lobster/package.json +1 -1
  336. package/extensions/matrix/CHANGELOG.md +12 -0
  337. package/extensions/matrix/package.json +1 -1
  338. package/extensions/mattermost/package.json +1 -1
  339. package/extensions/memory-core/package.json +2 -2
  340. package/extensions/memory-lancedb/package.json +1 -1
  341. package/extensions/minimax-portal-auth/package.json +1 -1
  342. package/extensions/msteams/CHANGELOG.md +12 -0
  343. package/extensions/msteams/package.json +1 -1
  344. package/extensions/nextcloud-talk/package.json +1 -1
  345. package/extensions/nostr/CHANGELOG.md +12 -0
  346. package/extensions/nostr/package.json +1 -1
  347. package/extensions/open-prose/package.json +1 -1
  348. package/extensions/sat-mining/package.json +1 -1
  349. package/extensions/signal/package.json +1 -1
  350. package/extensions/synology-chat/package.json +1 -1
  351. package/extensions/tlon/package.json +1 -1
  352. package/extensions/twitch/CHANGELOG.md +12 -0
  353. package/extensions/twitch/package.json +1 -1
  354. package/extensions/voice-call/CHANGELOG.md +12 -0
  355. package/extensions/voice-call/package.json +1 -1
  356. package/extensions/zalo/CHANGELOG.md +12 -0
  357. package/extensions/zalo/package.json +1 -1
  358. package/extensions/zalouser/CHANGELOG.md +12 -0
  359. package/extensions/zalouser/package.json +1 -1
  360. package/package.json +1 -1
  361. package/dist/plugin-sdk/resolve-channels-CwB2_019.js +0 -4
  362. /package/dist/plugin-sdk/{resolve-users-Cxb5wpAQ.js → resolve-users-DN9VQBwv.js} +0 -0
@@ -2,7 +2,7 @@ import { isKnownCoreToolId } from "../agents/tool-catalog.js";
2
2
  import { DANGEROUS_ACP_TOOLS } from "../security/dangerous-tools.js";
3
3
  import { ensureFasedAgentCliOnPath } from "../infra/path-env.js";
4
4
  import { fileURLToPath } from "node:url";
5
- import syncFs from "node:fs";
5
+ import fs from "node:fs";
6
6
  import { homedir } from "node:os";
7
7
  import path from "node:path";
8
8
  import { spawn } from "node:child_process";
@@ -269,7 +269,7 @@ function resolveSelfEntryPath() {
269
269
  try {
270
270
  const here = fileURLToPath(import.meta.url);
271
271
  const candidate = path.resolve(path.dirname(here), "..", "entry.js");
272
- if (syncFs.existsSync(candidate)) {
272
+ if (fs.existsSync(candidate)) {
273
273
  return candidate;
274
274
  }
275
275
  } catch {}
@@ -1,5 +1,5 @@
1
1
  import { resolveUserPath } from "../utils.js";
2
- import syncFs from "node:fs";
2
+ import fs from "node:fs";
3
3
 
4
4
  //#region src/acp/secret-file.ts
5
5
  function readSecretFromFile(filePath, label) {
@@ -9,7 +9,7 @@ function readSecretFromFile(filePath, label) {
9
9
  }
10
10
  let raw = "";
11
11
  try {
12
- raw = syncFs.readFileSync(resolvedPath, "utf8");
12
+ raw = fs.readFileSync(resolvedPath, "utf8");
13
13
  } catch (err) {
14
14
  throw new Error(`Failed to read ${label} file at ${resolvedPath}: ${String(err)}`, { cause: err });
15
15
  }
@@ -6,7 +6,7 @@ import { parseAgentSessionKey } from "../sessions/session-key-utils.js";
6
6
  import { DEFAULT_AGENT_ID, normalizeAgentId, resolveAgentIdFromSessionKey } from "../routing/session-key.js";
7
7
  import { resolveEffectiveAgentSkillFilter } from "./skills/agent-filter.js";
8
8
  import { resolveDefaultAgentWorkspaceDir } from "./workspace.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/agents/agent-scope.ts
@@ -245,7 +245,7 @@ function normalizePathForComparison(input) {
245
245
  const resolved = path.resolve(stripNullBytes(resolveUserPath(input)));
246
246
  let normalized = resolved;
247
247
  try {
248
- normalized = syncFs.realpathSync.native(resolved);
248
+ normalized = fs.realpathSync.native(resolved);
249
249
  } catch {}
250
250
  if (process.platform === "win32") {
251
251
  return normalized.toLowerCase();
@@ -3,9 +3,9 @@ import { PATH_ALIAS_POLICIES } from "../infra/path-alias-guards.js";
3
3
  import { writeFileWithinRoot } from "../infra/fs-safe.js";
4
4
  import { applyUpdateHunk } from "./apply-patch-update.js";
5
5
  import { assertSandboxPath, resolveSandboxInputPath } from "./sandbox-paths.js";
6
- import syncFs from "node:fs";
6
+ import fs from "node:fs";
7
7
  import path from "node:path";
8
- import fs from "node:fs/promises";
8
+ import fs$1 from "node:fs/promises";
9
9
  import { Type } from "@sinclair/typebox";
10
10
 
11
11
  //#region src/agents/apply-patch.ts
@@ -159,7 +159,7 @@ function resolvePatchFileOps(options) {
159
159
  return {
160
160
  readFile: async (filePath) => {
161
161
  if (!workspaceOnly) {
162
- return await fs.readFile(filePath, "utf8");
162
+ return await fs$1.readFile(filePath, "utf8");
163
163
  }
164
164
  const opened = await openBoundaryFile({
165
165
  absolutePath: filePath,
@@ -168,14 +168,14 @@ function resolvePatchFileOps(options) {
168
168
  });
169
169
  assertBoundaryRead(opened, filePath);
170
170
  try {
171
- return syncFs.readFileSync(opened.fd, "utf8");
171
+ return fs.readFileSync(opened.fd, "utf8");
172
172
  } finally {
173
- syncFs.closeSync(opened.fd);
173
+ fs.closeSync(opened.fd);
174
174
  }
175
175
  },
176
176
  writeFile: async (filePath, content) => {
177
177
  if (!workspaceOnly) {
178
- await fs.writeFile(filePath, content, "utf8");
178
+ await fs$1.writeFile(filePath, content, "utf8");
179
179
  return;
180
180
  }
181
181
  const relative = toRelativeWorkspacePath(options.cwd, filePath);
@@ -186,8 +186,8 @@ function resolvePatchFileOps(options) {
186
186
  encoding: "utf8"
187
187
  });
188
188
  },
189
- remove: (filePath) => fs.rm(filePath),
190
- mkdirp: (dir) => fs.mkdir(dir, { recursive: true }).then(() => {})
189
+ remove: (filePath) => fs$1.rm(filePath),
190
+ mkdirp: (dir) => fs$1.mkdir(dir, { recursive: true }).then(() => {})
191
191
  };
192
192
  }
193
193
  async function ensureDir(filePath, ops) {
@@ -2,7 +2,7 @@ import { resolveUserPath } from "../../utils.js";
2
2
  import { saveJsonFile } from "../../infra/json-file.js";
3
3
  import { AUTH_PROFILE_FILENAME, AUTH_STORE_VERSION, LEGACY_AUTH_FILENAME } from "./constants.js";
4
4
  import { resolveFasedAgentAgentDir } from "../agent-paths.js";
5
- import syncFs from "node:fs";
5
+ import fs from "node:fs";
6
6
  import path from "node:path";
7
7
 
8
8
  //#region src/agents/auth-profiles/paths.ts
@@ -19,7 +19,7 @@ function resolveAuthStorePathForDisplay(agentDir) {
19
19
  return pathname.startsWith("~") ? pathname : resolveUserPath(pathname);
20
20
  }
21
21
  function ensureAuthStoreFile(pathname) {
22
- if (syncFs.existsSync(pathname)) {
22
+ if (fs.existsSync(pathname)) {
23
23
  return;
24
24
  }
25
25
  const payload = {
@@ -5,7 +5,7 @@ import { withFileLock } from "../../plugin-sdk/file-lock.js";
5
5
  import "../../infra/file-lock.js";
6
6
  import { syncExternalCliCredentials } from "./external-cli-sync.js";
7
7
  import { ensureAuthStoreFile, resolveAuthStorePath, resolveLegacyAuthStorePath } from "./paths.js";
8
- import syncFs from "node:fs";
8
+ import fs from "node:fs";
9
9
 
10
10
  //#region src/agents/auth-profiles/store.ts
11
11
  const AUTH_PROFILE_TYPES = new Set([
@@ -361,7 +361,7 @@ function loadAuthProfileStoreForAgent(agentDir, options) {
361
361
  if (shouldWrite && legacy !== null) {
362
362
  const legacyPath = resolveLegacyAuthStorePath(agentDir);
363
363
  try {
364
- syncFs.unlinkSync(legacyPath);
364
+ fs.unlinkSync(legacyPath);
365
365
  } catch (err) {
366
366
  if (err?.code !== "ENOENT") {
367
367
  log.warn("failed to delete legacy auth.json after migration", {
@@ -3,7 +3,7 @@ import { assertSandboxPath } from "./sandbox-paths.js";
3
3
  import { existsSync, statSync } from "node:fs";
4
4
  import { homedir } from "node:os";
5
5
  import path from "node:path";
6
- import fs from "node:fs/promises";
6
+ import fs$1 from "node:fs/promises";
7
7
 
8
8
  //#region src/agents/bash-tools.shared.ts
9
9
  const CHUNK_LIMIT = 8 * 1024;
@@ -67,7 +67,7 @@ async function resolveSandboxWorkdir(params) {
67
67
  cwd: process.cwd(),
68
68
  root: params.sandbox.workspaceDir
69
69
  });
70
- const stats = await fs.stat(resolved.resolved);
70
+ const stats = await fs$1.stat(resolved.resolved);
71
71
  if (!stats.isDirectory()) {
72
72
  throw new Error("workdir is not a directory");
73
73
  }
@@ -1,7 +1,7 @@
1
1
  import { resolveUserPath } from "../utils.js";
2
2
  import { createSubsystemLogger } from "../logging/subsystem.js";
3
3
  import { loadJsonFile, saveJsonFile } from "../infra/json-file.js";
4
- import syncFs from "node:fs";
4
+ import fs from "node:fs";
5
5
  import path from "node:path";
6
6
  import { execFileSync, execSync } from "node:child_process";
7
7
  import { createHash } from "node:crypto";
@@ -61,7 +61,7 @@ function resolveCodexHomePath() {
61
61
  const configured = process.env.CODEX_HOME;
62
62
  const home = configured ? resolveUserPath(configured) : resolveUserPath("~/.codex");
63
63
  try {
64
- return syncFs.realpathSync.native(home);
64
+ return fs.realpathSync.native(home);
65
65
  } catch {
66
66
  return home;
67
67
  }
@@ -264,7 +264,7 @@ function writeClaudeCliKeychainCredentials(newCredentials, options) {
264
264
  }
265
265
  function writeClaudeCliFileCredentials(newCredentials, options) {
266
266
  const credPath = resolveClaudeCliCredentialsPath(options?.homeDir);
267
- if (!syncFs.existsSync(credPath)) {
267
+ if (!fs.existsSync(credPath)) {
268
268
  return false;
269
269
  }
270
270
  try {
@@ -331,7 +331,7 @@ function readCodexCliCredentials(options) {
331
331
  }
332
332
  let expires;
333
333
  try {
334
- const stat = syncFs.statSync(authPath);
334
+ const stat = fs.statSync(authPath);
335
335
  expires = stat.mtimeMs + 60 * 60 * 1e3;
336
336
  } catch {
337
337
  expires = Date.now() + 60 * 60 * 1e3;
@@ -11,7 +11,7 @@ import { buildCopilotModelDefinition, buildCopilotProxyModelDefinition, getDefau
11
11
  import { CHUTES_BASE_URL, CHUTES_MODEL_CATALOG, buildChutesModelDefinition } from "./chutes-models.js";
12
12
  import { DOUBAO_BASE_URL, DOUBAO_CODING_BASE_URL, DOUBAO_CODING_MODEL_CATALOG, DOUBAO_MODEL_CATALOG, buildDoubaoModelDefinition } from "./doubao-models.js";
13
13
  import "./huggingface-models.js";
14
- import { normalizeProviderCatalogRows } from "./model-catalog-normalized.js";
14
+ import { normalizeModelCatalogProviderId, normalizeProviderCatalogRows } from "./model-catalog-normalized.js";
15
15
  import { getOpencodeZenStaticFallbackModels } from "./opencode-zen-models.js";
16
16
  import "./synthetic-models.js";
17
17
  import "./together-models.js";
@@ -945,6 +945,9 @@ function cloneCurrentModelProvider(provider) {
945
945
  }))
946
946
  };
947
947
  }
948
+ function listCurrentModelCatalogProviderIds() {
949
+ return Object.keys(CURRENT_MODEL_PROVIDER_CATALOG).map(normalizeModelCatalogProviderId).filter(Boolean).toSorted((left, right) => left.localeCompare(right));
950
+ }
948
951
  function listCurrentModelCatalogRows() {
949
952
  return Object.entries(CURRENT_MODEL_PROVIDER_CATALOG).flatMap(([provider, providerConfig]) => normalizeProviderCatalogRows({
950
953
  provider,
@@ -955,4 +958,4 @@ function listCurrentModelCatalogRows() {
955
958
  }
956
959
 
957
960
  //#endregion
958
- export { CURRENT_MODEL_PROVIDER_CATALOG, cloneCurrentModelProvider, listCurrentModelCatalogRows };
961
+ export { CURRENT_MODEL_PROVIDER_CATALOG, cloneCurrentModelProvider, listCurrentModelCatalogProviderIds, listCurrentModelCatalogRows };
@@ -1,5 +1,5 @@
1
1
  import { resolveFasedAgentPackageRoot } from "../infra/fased-root.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/agents/docs-path.ts
@@ -7,7 +7,7 @@ async function resolveFasedAgentDocsPath(params) {
7
7
  const workspaceDir = params.workspaceDir?.trim();
8
8
  if (workspaceDir) {
9
9
  const workspaceDocs = path.join(workspaceDir, "docs");
10
- if (syncFs.existsSync(workspaceDocs)) {
10
+ if (fs.existsSync(workspaceDocs)) {
11
11
  return workspaceDocs;
12
12
  }
13
13
  }
@@ -20,7 +20,7 @@ async function resolveFasedAgentDocsPath(params) {
20
20
  return null;
21
21
  }
22
22
  const packageDocs = path.join(packageRoot, "docs");
23
- return syncFs.existsSync(packageDocs) ? packageDocs : null;
23
+ return fs.existsSync(packageDocs) ? packageDocs : null;
24
24
  }
25
25
 
26
26
  //#endregion
@@ -1,6 +1,6 @@
1
1
  import { STATE_DIR } from "../config/paths.js";
2
2
  import { isRecord, resolveUserPath } from "../utils.js";
3
- import syncFs from "node:fs";
3
+ import fs from "node:fs";
4
4
  import path from "node:path";
5
5
 
6
6
  //#region src/agents/embedded-pi-mcp.ts
@@ -66,10 +66,10 @@ function readBundleMcpFile(params) {
66
66
  if (relative.startsWith("..") || path.isAbsolute(relative)) {
67
67
  return {};
68
68
  }
69
- if (!syncFs.existsSync(filePath)) {
69
+ if (!fs.existsSync(filePath)) {
70
70
  return {};
71
71
  }
72
- const raw = JSON.parse(syncFs.readFileSync(filePath, "utf-8"));
72
+ const raw = JSON.parse(fs.readFileSync(filePath, "utf-8"));
73
73
  const servers = extractMcpServerMap(raw);
74
74
  const baseDir = path.dirname(filePath);
75
75
  return Object.fromEntries(Object.entries(servers).map(([serverName, server]) => [serverName, absolutizeBundleMcpServer({
@@ -99,7 +99,7 @@ function loadEnabledBundleMcpConfig(params) {
99
99
  cfg: params.cfg,
100
100
  pluginId
101
101
  })) {
102
- if (!syncFs.existsSync(rootDir)) {
102
+ if (!fs.existsSync(rootDir)) {
103
103
  continue;
104
104
  }
105
105
  for (const fileName of BUNDLE_MCP_FILENAMES) {
@@ -3,7 +3,7 @@ import { resolveAgentWorkspaceDir } from "./agent-scope.js";
3
3
  import { AVATAR_MAX_BYTES, isAvatarDataUrl, isAvatarHttpUrl, isPathWithinRoot, isSupportedLocalAvatarExtension } from "../shared/avatar-policy.js";
4
4
  import { resolveAgentIdentity } from "./identity.js";
5
5
  import { loadAgentIdentityFromWorkspace } from "./identity-file.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/agents/identity-avatar.ts
@@ -28,7 +28,7 @@ function resolveAvatarSource(cfg, agentId, opts) {
28
28
  }
29
29
  function resolveExistingPath(value) {
30
30
  try {
31
- return syncFs.realpathSync(value);
31
+ return fs.realpathSync(value);
32
32
  } catch {
33
33
  return path.resolve(value);
34
34
  }
@@ -51,7 +51,7 @@ function resolveLocalAvatarPath(params) {
51
51
  };
52
52
  }
53
53
  try {
54
- const stat = syncFs.statSync(realPath);
54
+ const stat = fs.statSync(realPath);
55
55
  if (!stat.isFile()) {
56
56
  return {
57
57
  ok: false,
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_IDENTITY_FILENAME } from "./workspace.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/agents/identity-file.ts
@@ -67,7 +67,7 @@ function identityHasValues(identity) {
67
67
  }
68
68
  function loadIdentityFromFile(identityPath) {
69
69
  try {
70
- const content = syncFs.readFileSync(identityPath, "utf-8");
70
+ const content = fs.readFileSync(identityPath, "utf-8");
71
71
  const parsed = parseIdentityMarkdown(content);
72
72
  if (!identityHasValues(parsed)) {
73
73
  return null;
@@ -0,0 +1,124 @@
1
+ import { resolveAgentModelFallbackValues } from "../config/model-input.js";
2
+ import { resolveAgentEffectiveModelPrimary, resolveAgentModelFallbacksOverride } from "./agent-scope.js";
3
+ import { deriveModelMetadata } from "./model-metadata.js";
4
+ import { resolveAuthenticatedModelCatalog } from "./authenticated-model-catalog.js";
5
+ import { resolveTaskModelRole } from "../cron/task-model-roles.js";
6
+
7
+ //#region src/agents/model-catalog-snapshot.ts
8
+ const TASK_ROLES = [
9
+ "cheapCheck",
10
+ "strong",
11
+ "escalation",
12
+ "coding",
13
+ "summarizer"
14
+ ];
15
+ function normalizeRef(value) {
16
+ const trimmed = value?.trim();
17
+ return trimmed || undefined;
18
+ }
19
+ function collectAssignments(params) {
20
+ const assignments = [];
21
+ const add = (role, ref) => {
22
+ const normalized = normalizeRef(ref);
23
+ if (normalized && !assignments.some((entry) => entry.role === role && entry.ref === normalized)) {
24
+ assignments.push({
25
+ role,
26
+ ref: normalized
27
+ });
28
+ }
29
+ };
30
+ add("primary", resolveAgentEffectiveModelPrimary(params.cfg, params.agentId));
31
+ const fallbacks = resolveAgentModelFallbacksOverride(params.cfg, params.agentId) ?? resolveAgentModelFallbackValues(params.cfg.agents?.defaults?.model);
32
+ for (const fallback of fallbacks) {
33
+ add("fallback", fallback);
34
+ }
35
+ for (const role of TASK_ROLES) {
36
+ add(role, resolveTaskModelRole({
37
+ cfg: params.cfg,
38
+ agentId: params.agentId,
39
+ role
40
+ })?.model);
41
+ }
42
+ return assignments;
43
+ }
44
+ function modelRef(model) {
45
+ return `${model.provider}/${model.id}`;
46
+ }
47
+ function buildProviderSummaries(models) {
48
+ const summaries = new Map();
49
+ for (const model of models) {
50
+ const providerId = model.metadata.publicProviderId;
51
+ const existing = summaries.get(providerId) ?? {
52
+ id: providerId,
53
+ label: model.metadata.publicProviderLabel,
54
+ routes: [],
55
+ credentialRoutes: [],
56
+ available: 0,
57
+ recommended: 0,
58
+ assigned: 0
59
+ };
60
+ if (!existing.routes.includes(model.provider)) {
61
+ existing.routes.push(model.provider);
62
+ }
63
+ for (const route of model.metadata.credentialRoutes) {
64
+ if (!existing.credentialRoutes.some((entry) => entry.id === route.id)) {
65
+ existing.credentialRoutes.push(route);
66
+ }
67
+ }
68
+ existing.available += 1;
69
+ existing.recommended += model.recommended ? 1 : 0;
70
+ existing.assigned += model.assignedRoles.length > 0 ? 1 : 0;
71
+ summaries.set(providerId, existing);
72
+ }
73
+ return [...summaries.values()].map((summary) => ({
74
+ ...summary,
75
+ routes: summary.routes.toSorted(),
76
+ credentialRoutes: summary.credentialRoutes.toSorted((left, right) => left.label.localeCompare(right.label))
77
+ })).toSorted((left, right) => left.label.localeCompare(right.label));
78
+ }
79
+ async function resolveCanonicalModelCatalogSnapshot(params) {
80
+ const authenticated = await resolveAuthenticatedModelCatalog({
81
+ cfg: params.cfg,
82
+ store: params.store,
83
+ catalog: params.catalog,
84
+ defaultProvider: params.defaultProvider,
85
+ agentDir: params.agentDir
86
+ });
87
+ const configuredAssignments = collectAssignments({
88
+ cfg: params.cfg,
89
+ agentId: params.agentId
90
+ });
91
+ const assignmentsByRef = new Map();
92
+ for (const assignment of configuredAssignments) {
93
+ assignmentsByRef.set(assignment.ref, [...assignmentsByRef.get(assignment.ref) ?? [], assignment.role]);
94
+ }
95
+ const availableRefs = new Set(authenticated.usableCatalog.map(modelRef));
96
+ const runnableRefs = new Set(authenticated.allowedCatalog.map(modelRef));
97
+ const models = authenticated.usableCatalog.map((model) => {
98
+ const metadata = model.metadata ?? deriveModelMetadata({
99
+ model,
100
+ cfg: params.cfg
101
+ });
102
+ return {
103
+ ...model,
104
+ metadata,
105
+ available: true,
106
+ runnable: runnableRefs.size === 0 || runnableRefs.has(modelRef(model)),
107
+ recommended: metadata.recommended === true,
108
+ assignedRoles: assignmentsByRef.get(modelRef(model)) ?? []
109
+ };
110
+ }).toSorted((left, right) => left.metadata.publicProviderLabel.localeCompare(right.metadata.publicProviderLabel) || Number(right.recommended) - Number(left.recommended) || (left.metadata.recommendationRank ?? Number.MAX_SAFE_INTEGER) - (right.metadata.recommendationRank ?? Number.MAX_SAFE_INTEGER) || left.name.localeCompare(right.name));
111
+ return {
112
+ generatedAt: new Date().toISOString(),
113
+ agentId: params.agentId,
114
+ models,
115
+ providers: buildProviderSummaries(models),
116
+ assignments: configuredAssignments.map((assignment) => ({
117
+ ...assignment,
118
+ available: availableRefs.has(assignment.ref)
119
+ }))
120
+ };
121
+ }
122
+
123
+ //#endregion
124
+ export { resolveCanonicalModelCatalogSnapshot };
@@ -1,4 +1,5 @@
1
1
  import { normalizeProviderId } from "./provider-id.js";
2
+ import { listCurrentModelCatalogProviderIds } from "./current-model-catalog.js";
2
3
  import { deriveModelMetadata } from "./model-metadata.js";
3
4
  import { listProviderExtensionCatalogManifestEntries } from "./provider-extension-catalog-manifest.js";
4
5
 
@@ -137,7 +138,11 @@ function buildModelCatalogStatus(params) {
137
138
  })).toSorted((left, right) => left.provider.localeCompare(right.provider));
138
139
  const manifestEntries = listProviderExtensionCatalogManifestEntries();
139
140
  const mappedManifestProviderIds = [...new Set(manifestEntries.flatMap((entry) => entry.status === "mapped" ? entry.fasedProviderIds.map(normalizeProviderId) : []))].filter(Boolean).toSorted((left, right) => left.localeCompare(right));
140
- const catalogProviderIds = new Set(providerRows.map((provider) => provider.provider));
141
+ const catalogProviderIds = new Set([
142
+ ...listCurrentModelCatalogProviderIds(),
143
+ ...providerRows.map((provider) => provider.provider),
144
+ ...Object.keys(params.providerExtensionCatalog?.providers ?? {}).map(normalizeProviderId)
145
+ ]);
141
146
  const deferredProviderIds = manifestEntries.filter((entry) => entry.status === "deferred").map((entry) => normalizeProviderId(entry.upstreamProviderId)).filter(Boolean).toSorted((left, right) => left.localeCompare(right));
142
147
  const providerExtensionEntries = (params.providerExtensionCatalog?.entries ?? []).map((entry) => ({
143
148
  id: entry.id,
@@ -1,5 +1,6 @@
1
+ import { resolveFasedAgentPackageRootSync } from "../infra/fased-root.js";
1
2
  import { resolvePluginInstallDir } from "../plugins/install.js";
2
- import syncFs from "node:fs";
3
+ import fs from "node:fs";
3
4
  import os from "node:os";
4
5
  import path from "node:path";
5
6
  import { spawn } from "node:child_process";
@@ -42,30 +43,54 @@ function executableName() {
42
43
  function codexExecutableCandidates() {
43
44
  const configured = process.env.FASED_CODEX_BIN?.trim();
44
45
  const componentRoot = resolvePluginInstallDir("openai-runtime");
46
+ const packageRoot = resolveFasedAgentPackageRootSync({
47
+ moduleUrl: import.meta.url,
48
+ argv1: process.argv[1],
49
+ cwd: process.cwd()
50
+ });
45
51
  const candidates = [
46
52
  configured,
47
53
  path.join(componentRoot, "node_modules", ".bin", executableName()),
48
54
  path.join(componentRoot, "node_modules", "@openai", "codex", "bin", executableName()),
49
- "codex"
55
+ packageRoot ? path.join(packageRoot, "extensions", "runtime-openai", "node_modules", ".bin", executableName()) : undefined
50
56
  ].filter((value) => Boolean(value));
51
57
  return [...new Set(candidates)];
52
58
  }
53
59
  function resolveOpenAICodexExecutable() {
60
+ const explicitlyConfigured = process.env.FASED_CODEX_BIN?.trim();
54
61
  for (const candidate of codexExecutableCandidates()) {
55
- if (candidate === "codex") {
56
- return candidate;
57
- }
58
62
  try {
59
- if (syncFs.statSync(candidate).isFile()) {
63
+ if (!fs.statSync(candidate).isFile()) {
64
+ continue;
65
+ }
66
+ if (explicitlyConfigured && candidate === explicitlyConfigured) {
60
67
  return candidate;
61
68
  }
69
+ const resolved = fs.realpathSync(candidate);
70
+ let current = path.dirname(resolved);
71
+ for (let depth = 0; depth < 6; depth += 1) {
72
+ try {
73
+ const parsed = JSON.parse(fs.readFileSync(path.join(current, "package.json"), "utf8"));
74
+ if (parsed.name === "@openai/codex") {
75
+ if (parsed.version === OPENAI_CODEX_APP_SERVER_VERSION) {
76
+ return candidate;
77
+ }
78
+ break;
79
+ }
80
+ } catch {}
81
+ const parent = path.dirname(current);
82
+ if (parent === current) {
83
+ break;
84
+ }
85
+ current = parent;
86
+ }
62
87
  } catch {}
63
88
  }
64
89
  return null;
65
90
  }
66
91
  function managedCodexHome() {
67
92
  const directory = path.join(stateDir(), "runtime", "openai-codex");
68
- syncFs.mkdirSync(directory, {
93
+ fs.mkdirSync(directory, {
69
94
  recursive: true,
70
95
  mode: 448
71
96
  });
@@ -228,7 +253,7 @@ function parseAppServerModels(value) {
228
253
  });
229
254
  }
230
255
  async function listOpenAICodexAppServerModels(params) {
231
- const executable = params.executable ?? resolveOpenAICodexExecutable();
256
+ const executable = params.executable ?? (params.resolveExecutable ? await params.resolveExecutable() : resolveOpenAICodexExecutable());
232
257
  if (!executable) {
233
258
  throw new Error("OpenAI sign-in runtime is not installed. Run `fased components install openai-runtime`.");
234
259
  }
@@ -337,7 +362,7 @@ function createOpenAICodexAppServerStreamFn(params) {
337
362
  if (!token) {
338
363
  throw new Error("OpenAI ChatGPT sign-in is required");
339
364
  }
340
- const executable = resolveOpenAICodexExecutable();
365
+ const executable = params?.resolveExecutable ? await params.resolveExecutable() : resolveOpenAICodexExecutable();
341
366
  if (!executable) {
342
367
  throw new Error("OpenAI sign-in runtime is not installed. Run `fased components install openai-runtime`.");
343
368
  }
@@ -496,4 +521,4 @@ const testing = {
496
521
  };
497
522
 
498
523
  //#endregion
499
- export { createOpenAICodexAppServerStreamFn, listOpenAICodexAppServerModels };
524
+ export { createOpenAICodexAppServerStreamFn, listOpenAICodexAppServerModels, resolveOpenAICodexExecutable };
@@ -0,0 +1,39 @@
1
+ import { VERSION } from "../version.js";
2
+ import { resolveOpenAICodexExecutable } from "./openai-codex-app-server.js";
3
+ import { installCapabilityComponent } from "../capabilities/install.js";
4
+
5
+ //#region src/agents/openai-codex-runtime-component.ts
6
+ const OPENAI_RUNTIME_COMPONENT_ID = "openai-runtime";
7
+ function hasConfiguredOpenAICodexProfile(config) {
8
+ return Object.values(config.auth?.profiles ?? {}).some((profile) => profile?.provider === "openai-codex");
9
+ }
10
+ async function ensureOpenAICodexRuntimeComponent(params) {
11
+ const resolveExecutable = params.resolveExecutable ?? resolveOpenAICodexExecutable;
12
+ const existing = resolveExecutable();
13
+ if (existing) {
14
+ return {
15
+ config: params.config,
16
+ executable: existing,
17
+ installed: false,
18
+ slotWarnings: []
19
+ };
20
+ }
21
+ const installed = await (params.installComponent ?? installCapabilityComponent)({
22
+ id: OPENAI_RUNTIME_COMPONENT_ID,
23
+ config: params.config,
24
+ packageSpec: `@fased/openai-runtime@${params.version ?? VERSION}`
25
+ });
26
+ const executable = resolveExecutable();
27
+ if (!executable) {
28
+ throw new Error("OpenAI sign-in runtime installation completed without an executable. Run `fased components install openai-runtime` and retry.");
29
+ }
30
+ return {
31
+ config: installed.config,
32
+ executable,
33
+ installed: true,
34
+ slotWarnings: installed.slotWarnings
35
+ };
36
+ }
37
+
38
+ //#endregion
39
+ export { OPENAI_RUNTIME_COMPONENT_ID, ensureOpenAICodexRuntimeComponent, hasConfiguredOpenAICodexProfile };
@@ -19,8 +19,8 @@ import { enqueueCommandInLane } from "../../process/command-queue.js";
19
19
  import { resolveSignalReactionLevel } from "../../signal/reaction-level.js";
20
20
  import { resolveTelegramInlineButtonsScope } from "../../telegram/inline-buttons.js";
21
21
  import { resolveTelegramReactionLevel } from "../../telegram/reaction-level.js";
22
- import { buildModelAliasLines } from "../model-alias-lines.js";
23
22
  import { formatUserTime, resolveUserTimeFormat, resolveUserTimezone } from "../date-time.js";
23
+ import { buildModelAliasLines } from "../model-alias-lines.js";
24
24
  import { resolveModelForExecution } from "./model.js";
25
25
  import { buildTtsSystemPromptHint } from "../../tts/tts.js";
26
26
  import { isReasoningTagProvider } from "../../utils/provider-utils.js";