@withbuddi/buddi 0.1.0-pre.19 → 0.1.0-pre.21

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 (525) hide show
  1. package/README.md +1 -1
  2. package/node_modules/@buddi/cli/dist/.tsbuildinfo +1 -1
  3. package/node_modules/@buddi/cli/dist/args.d.ts +6 -0
  4. package/node_modules/@buddi/cli/dist/args.d.ts.map +1 -1
  5. package/node_modules/@buddi/cli/dist/args.js +15 -0
  6. package/node_modules/@buddi/cli/dist/args.js.map +1 -1
  7. package/node_modules/@buddi/cli/dist/commands.d.ts.map +1 -1
  8. package/node_modules/@buddi/cli/dist/commands.js +18 -1
  9. package/node_modules/@buddi/cli/dist/commands.js.map +1 -1
  10. package/node_modules/@buddi/cli/dist/main.d.ts.map +1 -1
  11. package/node_modules/@buddi/cli/dist/main.js +19 -2
  12. package/node_modules/@buddi/cli/dist/main.js.map +1 -1
  13. package/node_modules/@buddi/cli/dist/status.d.ts +10 -0
  14. package/node_modules/@buddi/cli/dist/status.d.ts.map +1 -1
  15. package/node_modules/@buddi/cli/dist/status.js +4 -0
  16. package/node_modules/@buddi/cli/dist/status.js.map +1 -1
  17. package/node_modules/@buddi/core/dist/.tsbuildinfo +1 -1
  18. package/node_modules/@buddi/core/dist/agents/catalog.d.ts.map +1 -1
  19. package/node_modules/@buddi/core/dist/agents/catalog.js +7 -1
  20. package/node_modules/@buddi/core/dist/agents/catalog.js.map +1 -1
  21. package/node_modules/@buddi/core/dist/host/build.d.ts.map +1 -1
  22. package/node_modules/@buddi/core/dist/host/build.js +33 -16
  23. package/node_modules/@buddi/core/dist/host/build.js.map +1 -1
  24. package/node_modules/@buddi/core/dist/host/types.d.ts +17 -0
  25. package/node_modules/@buddi/core/dist/host/types.d.ts.map +1 -1
  26. package/node_modules/@buddi/core/dist/pages/__fixtures__/demo.d.ts.map +1 -1
  27. package/node_modules/@buddi/core/dist/pages/__fixtures__/demo.js +1 -0
  28. package/node_modules/@buddi/core/dist/pages/__fixtures__/demo.js.map +1 -1
  29. package/node_modules/@buddi/core/dist/pages.d.ts +74 -0
  30. package/node_modules/@buddi/core/dist/pages.d.ts.map +1 -1
  31. package/node_modules/@buddi/core/dist/pages.js +27 -1
  32. package/node_modules/@buddi/core/dist/pages.js.map +1 -1
  33. package/node_modules/@buddi/core/dist/plugin/index.d.ts +2 -2
  34. package/node_modules/@buddi/core/dist/plugin/index.d.ts.map +1 -1
  35. package/node_modules/@buddi/core/dist/plugin/version.d.ts +1 -1
  36. package/node_modules/@buddi/core/dist/plugin/version.js +1 -1
  37. package/node_modules/@buddi/core/dist/provider-accounts.d.ts +15 -1
  38. package/node_modules/@buddi/core/dist/provider-accounts.d.ts.map +1 -1
  39. package/node_modules/@buddi/core/dist/provider-accounts.js +22 -1
  40. package/node_modules/@buddi/core/dist/provider-accounts.js.map +1 -1
  41. package/node_modules/@buddi/core/dist/provider.d.ts +6 -0
  42. package/node_modules/@buddi/core/dist/provider.d.ts.map +1 -1
  43. package/node_modules/@buddi/core/dist/provider.js.map +1 -1
  44. package/node_modules/@buddi/core/dist/surfaces.d.ts +11 -0
  45. package/node_modules/@buddi/core/dist/surfaces.d.ts.map +1 -1
  46. package/node_modules/@buddi/core/dist/surfaces.js +4 -0
  47. package/node_modules/@buddi/core/dist/surfaces.js.map +1 -1
  48. package/node_modules/@buddi/core/migrations/046_ollama_device_key.sql +7 -0
  49. package/node_modules/@buddi/core/migrations/047_reported_context_windows.sql +5 -0
  50. package/node_modules/@buddi/core/migrations/048_surface_chat_voice.sql +13 -0
  51. package/node_modules/@buddi/core/migrations/049_surface_chat_voice_form.sql +8 -0
  52. package/node_modules/@buddi/gateway/dist/.tsbuildinfo +1 -1
  53. package/node_modules/@buddi/gateway/dist/agents-cli.d.ts +2 -0
  54. package/node_modules/@buddi/gateway/dist/agents-cli.d.ts.map +1 -1
  55. package/node_modules/@buddi/gateway/dist/agents-cli.js +5 -3
  56. package/node_modules/@buddi/gateway/dist/agents-cli.js.map +1 -1
  57. package/node_modules/@buddi/gateway/dist/chat/session.d.ts.map +1 -1
  58. package/node_modules/@buddi/gateway/dist/chat/session.js +2 -2
  59. package/node_modules/@buddi/gateway/dist/chat/session.js.map +1 -1
  60. package/node_modules/@buddi/gateway/dist/chat/usage.d.ts +16 -0
  61. package/node_modules/@buddi/gateway/dist/chat/usage.d.ts.map +1 -1
  62. package/node_modules/@buddi/gateway/dist/chat/usage.js +53 -11
  63. package/node_modules/@buddi/gateway/dist/chat/usage.js.map +1 -1
  64. package/node_modules/@buddi/gateway/dist/codex-accounts.d.ts +24 -11
  65. package/node_modules/@buddi/gateway/dist/codex-accounts.d.ts.map +1 -1
  66. package/node_modules/@buddi/gateway/dist/codex-accounts.js +151 -215
  67. package/node_modules/@buddi/gateway/dist/codex-accounts.js.map +1 -1
  68. package/node_modules/@buddi/gateway/dist/index.d.ts +2 -0
  69. package/node_modules/@buddi/gateway/dist/index.d.ts.map +1 -1
  70. package/node_modules/@buddi/gateway/dist/index.js +2 -0
  71. package/node_modules/@buddi/gateway/dist/index.js.map +1 -1
  72. package/node_modules/@buddi/gateway/dist/ollama-accounts.d.ts +87 -0
  73. package/node_modules/@buddi/gateway/dist/ollama-accounts.d.ts.map +1 -0
  74. package/node_modules/@buddi/gateway/dist/ollama-accounts.js +179 -0
  75. package/node_modules/@buddi/gateway/dist/ollama-accounts.js.map +1 -0
  76. package/node_modules/@buddi/gateway/dist/provider-accounts.d.ts +51 -1
  77. package/node_modules/@buddi/gateway/dist/provider-accounts.d.ts.map +1 -1
  78. package/node_modules/@buddi/gateway/dist/provider-accounts.js +184 -25
  79. package/node_modules/@buddi/gateway/dist/provider-accounts.js.map +1 -1
  80. package/node_modules/@buddi/gateway/dist/speech-cli.d.ts +43 -0
  81. package/node_modules/@buddi/gateway/dist/speech-cli.d.ts.map +1 -0
  82. package/node_modules/@buddi/gateway/dist/speech-cli.js +105 -0
  83. package/node_modules/@buddi/gateway/dist/speech-cli.js.map +1 -0
  84. package/node_modules/@buddi/gateway/dist/surfaces/context-budget.d.ts.map +1 -1
  85. package/node_modules/@buddi/gateway/dist/surfaces/context-budget.js +10 -3
  86. package/node_modules/@buddi/gateway/dist/surfaces/context-budget.js.map +1 -1
  87. package/node_modules/@buddi/gateway/dist/telegram/api.d.ts +10 -0
  88. package/node_modules/@buddi/gateway/dist/telegram/api.d.ts.map +1 -1
  89. package/node_modules/@buddi/gateway/dist/telegram/api.js +12 -0
  90. package/node_modules/@buddi/gateway/dist/telegram/api.js.map +1 -1
  91. package/node_modules/@buddi/gateway/dist/telegram/browser-view.d.ts +2 -1
  92. package/node_modules/@buddi/gateway/dist/telegram/browser-view.d.ts.map +1 -1
  93. package/node_modules/@buddi/gateway/dist/telegram/browser-view.js +4 -2
  94. package/node_modules/@buddi/gateway/dist/telegram/browser-view.js.map +1 -1
  95. package/node_modules/@buddi/gateway/dist/telegram/main.d.ts.map +1 -1
  96. package/node_modules/@buddi/gateway/dist/telegram/main.js +10 -2
  97. package/node_modules/@buddi/gateway/dist/telegram/main.js.map +1 -1
  98. package/node_modules/@buddi/gateway/dist/telegram/surface.d.ts +25 -0
  99. package/node_modules/@buddi/gateway/dist/telegram/surface.d.ts.map +1 -1
  100. package/node_modules/@buddi/gateway/dist/telegram/surface.js +212 -10
  101. package/node_modules/@buddi/gateway/dist/telegram/surface.js.map +1 -1
  102. package/node_modules/@buddi/gateway/dist/telegram/voice.d.ts +112 -0
  103. package/node_modules/@buddi/gateway/dist/telegram/voice.d.ts.map +1 -0
  104. package/node_modules/@buddi/gateway/dist/telegram/voice.js +220 -0
  105. package/node_modules/@buddi/gateway/dist/telegram/voice.js.map +1 -0
  106. package/node_modules/@buddi/gateway/dist/web/chat.d.ts +31 -8
  107. package/node_modules/@buddi/gateway/dist/web/chat.d.ts.map +1 -1
  108. package/node_modules/@buddi/gateway/dist/web/chat.js +3 -2
  109. package/node_modules/@buddi/gateway/dist/web/chat.js.map +1 -1
  110. package/node_modules/@buddi/gateway/dist/web/onboarding.d.ts +13 -2
  111. package/node_modules/@buddi/gateway/dist/web/onboarding.d.ts.map +1 -1
  112. package/node_modules/@buddi/gateway/dist/web/onboarding.js +24 -3
  113. package/node_modules/@buddi/gateway/dist/web/onboarding.js.map +1 -1
  114. package/node_modules/@buddi/gateway/dist/web/read.d.ts +15 -12
  115. package/node_modules/@buddi/gateway/dist/web/read.d.ts.map +1 -1
  116. package/node_modules/@buddi/gateway/dist/web/read.js +9 -10
  117. package/node_modules/@buddi/gateway/dist/web/read.js.map +1 -1
  118. package/node_modules/@buddi/gateway/dist/web/server.d.ts.map +1 -1
  119. package/node_modules/@buddi/gateway/dist/web/server.js +29 -13
  120. package/node_modules/@buddi/gateway/dist/web/server.js.map +1 -1
  121. package/node_modules/@buddi/gateway/dist/web/speech.d.ts +47 -0
  122. package/node_modules/@buddi/gateway/dist/web/speech.d.ts.map +1 -0
  123. package/node_modules/@buddi/gateway/dist/web/speech.js +83 -0
  124. package/node_modules/@buddi/gateway/dist/web/speech.js.map +1 -0
  125. package/node_modules/@buddi/gateway/dist/web/stream.d.ts +0 -24
  126. package/node_modules/@buddi/gateway/dist/web/stream.d.ts.map +1 -1
  127. package/node_modules/@buddi/gateway/dist/web/stream.js +26 -2
  128. package/node_modules/@buddi/gateway/dist/web/stream.js.map +1 -1
  129. package/node_modules/@buddi/gateway/dist/web/usage-view.d.ts +15 -0
  130. package/node_modules/@buddi/gateway/dist/web/usage-view.d.ts.map +1 -0
  131. package/node_modules/@buddi/gateway/dist/web/usage-view.js +20 -0
  132. package/node_modules/@buddi/gateway/dist/web/usage-view.js.map +1 -0
  133. package/node_modules/@buddi/install/dist/.tsbuildinfo +1 -1
  134. package/node_modules/@buddi/runtime/dist/.tsbuildinfo +1 -1
  135. package/node_modules/@buddi/runtime/dist/anthropic.d.ts +18 -0
  136. package/node_modules/@buddi/runtime/dist/anthropic.d.ts.map +1 -1
  137. package/node_modules/@buddi/runtime/dist/anthropic.js +65 -13
  138. package/node_modules/@buddi/runtime/dist/anthropic.js.map +1 -1
  139. package/node_modules/@buddi/runtime/dist/codex-direct.d.ts +55 -0
  140. package/node_modules/@buddi/runtime/dist/codex-direct.d.ts.map +1 -0
  141. package/node_modules/@buddi/runtime/dist/codex-direct.js +342 -0
  142. package/node_modules/@buddi/runtime/dist/codex-direct.js.map +1 -0
  143. package/node_modules/@buddi/runtime/dist/codex-oauth.d.ts +66 -0
  144. package/node_modules/@buddi/runtime/dist/codex-oauth.d.ts.map +1 -0
  145. package/node_modules/@buddi/runtime/dist/codex-oauth.js +210 -0
  146. package/node_modules/@buddi/runtime/dist/codex-oauth.js.map +1 -0
  147. package/node_modules/@buddi/runtime/dist/codex-profile.d.ts +19 -0
  148. package/node_modules/@buddi/runtime/dist/codex-profile.d.ts.map +1 -0
  149. package/node_modules/@buddi/runtime/dist/codex-profile.js +99 -0
  150. package/node_modules/@buddi/runtime/dist/codex-profile.js.map +1 -0
  151. package/node_modules/@buddi/runtime/dist/context-window.d.ts.map +1 -1
  152. package/node_modules/@buddi/runtime/dist/context-window.js +17 -4
  153. package/node_modules/@buddi/runtime/dist/context-window.js.map +1 -1
  154. package/node_modules/@buddi/runtime/dist/delegate.d.ts +24 -0
  155. package/node_modules/@buddi/runtime/dist/delegate.d.ts.map +1 -1
  156. package/node_modules/@buddi/runtime/dist/delegate.js +87 -11
  157. package/node_modules/@buddi/runtime/dist/delegate.js.map +1 -1
  158. package/node_modules/@buddi/runtime/dist/index.d.ts +4 -4
  159. package/node_modules/@buddi/runtime/dist/index.d.ts.map +1 -1
  160. package/node_modules/@buddi/runtime/dist/index.js +5 -5
  161. package/node_modules/@buddi/runtime/dist/index.js.map +1 -1
  162. package/node_modules/@buddi/runtime/dist/loop.d.ts +7 -0
  163. package/node_modules/@buddi/runtime/dist/loop.d.ts.map +1 -1
  164. package/node_modules/@buddi/runtime/dist/loop.js +54 -8
  165. package/node_modules/@buddi/runtime/dist/loop.js.map +1 -1
  166. package/node_modules/@buddi/runtime/dist/ollama-signing.d.ts +52 -0
  167. package/node_modules/@buddi/runtime/dist/ollama-signing.d.ts.map +1 -0
  168. package/node_modules/@buddi/runtime/dist/ollama-signing.js +154 -0
  169. package/node_modules/@buddi/runtime/dist/ollama-signing.js.map +1 -0
  170. package/node_modules/@buddi/runtime/dist/openai.d.ts +16 -4
  171. package/node_modules/@buddi/runtime/dist/openai.d.ts.map +1 -1
  172. package/node_modules/@buddi/runtime/dist/openai.js +44 -11
  173. package/node_modules/@buddi/runtime/dist/openai.js.map +1 -1
  174. package/node_modules/@buddi/runtime/dist/provider-models.d.ts +2 -0
  175. package/node_modules/@buddi/runtime/dist/provider-models.d.ts.map +1 -1
  176. package/node_modules/@buddi/runtime/dist/provider-models.js +13 -4
  177. package/node_modules/@buddi/runtime/dist/provider-models.js.map +1 -1
  178. package/node_modules/@buddi/tool-artifacts/dist/.tsbuildinfo +1 -1
  179. package/node_modules/@buddi/tool-browser/dist/.tsbuildinfo +1 -1
  180. package/node_modules/@buddi/tool-browser/dist/computer.d.ts +53 -1
  181. package/node_modules/@buddi/tool-browser/dist/computer.d.ts.map +1 -1
  182. package/node_modules/@buddi/tool-browser/dist/computer.js +154 -5
  183. package/node_modules/@buddi/tool-browser/dist/computer.js.map +1 -1
  184. package/node_modules/@buddi/tool-browser/dist/controller.d.ts +20 -3
  185. package/node_modules/@buddi/tool-browser/dist/controller.d.ts.map +1 -1
  186. package/node_modules/@buddi/tool-browser/dist/controller.js +170 -5
  187. package/node_modules/@buddi/tool-browser/dist/controller.js.map +1 -1
  188. package/node_modules/@buddi/tool-browser/dist/index.d.ts.map +1 -1
  189. package/node_modules/@buddi/tool-browser/dist/index.js +9 -1
  190. package/node_modules/@buddi/tool-browser/dist/index.js.map +1 -1
  191. package/node_modules/@buddi/tool-browser/dist/service.d.ts +14 -1
  192. package/node_modules/@buddi/tool-browser/dist/service.d.ts.map +1 -1
  193. package/node_modules/@buddi/tool-browser/dist/service.js +28 -5
  194. package/node_modules/@buddi/tool-browser/dist/service.js.map +1 -1
  195. package/node_modules/@buddi/tool-browser/dist/types.d.ts +11 -0
  196. package/node_modules/@buddi/tool-browser/dist/types.d.ts.map +1 -1
  197. package/node_modules/@buddi/tool-browser/dist/types.js +16 -3
  198. package/node_modules/@buddi/tool-browser/dist/types.js.map +1 -1
  199. package/node_modules/@buddi/tool-browser/package.json +1 -1
  200. package/node_modules/@buddi/tool-email/dist/.tsbuildinfo +1 -1
  201. package/node_modules/@buddi/tool-host/dist/.tsbuildinfo +1 -1
  202. package/node_modules/@buddi/tool-memory/dist/.tsbuildinfo +1 -1
  203. package/node_modules/@buddi/tool-web/dist/.tsbuildinfo +1 -1
  204. package/node_modules/imapflow/CHANGELOG.md +29 -0
  205. package/node_modules/imapflow/dist/cjs/commands/append.js +12 -12
  206. package/node_modules/imapflow/dist/cjs/commands/authenticate.d.ts +3 -8
  207. package/node_modules/imapflow/dist/cjs/commands/close.js +2 -1
  208. package/node_modules/imapflow/dist/cjs/commands/copy.js +4 -4
  209. package/node_modules/imapflow/dist/cjs/commands/create.js +2 -3
  210. package/node_modules/imapflow/dist/cjs/commands/delete.js +4 -4
  211. package/node_modules/imapflow/dist/cjs/commands/expunge.js +8 -5
  212. package/node_modules/imapflow/dist/cjs/commands/fetch.js +12 -10
  213. package/node_modules/imapflow/dist/cjs/commands/idle.js +6 -2
  214. package/node_modules/imapflow/dist/cjs/commands/list.js +22 -18
  215. package/node_modules/imapflow/dist/cjs/commands/move.js +11 -6
  216. package/node_modules/imapflow/dist/cjs/commands/namespace.js +1 -1
  217. package/node_modules/imapflow/dist/cjs/commands/quota.js +10 -9
  218. package/node_modules/imapflow/dist/cjs/commands/rename.js +4 -4
  219. package/node_modules/imapflow/dist/cjs/commands/search.js +7 -8
  220. package/node_modules/imapflow/dist/cjs/commands/select.js +12 -9
  221. package/node_modules/imapflow/dist/cjs/commands/status.js +11 -11
  222. package/node_modules/imapflow/dist/cjs/commands/store.js +5 -5
  223. package/node_modules/imapflow/dist/cjs/commands/subscribe.js +2 -17
  224. package/node_modules/imapflow/dist/cjs/commands/subscription.d.ts +10 -0
  225. package/node_modules/imapflow/dist/cjs/commands/subscription.js +29 -0
  226. package/node_modules/imapflow/dist/cjs/commands/unsubscribe.js +2 -17
  227. package/node_modules/imapflow/dist/cjs/download.d.ts +22 -0
  228. package/node_modules/imapflow/dist/cjs/download.js +588 -0
  229. package/node_modules/imapflow/dist/cjs/errors.d.ts +50 -1
  230. package/node_modules/imapflow/dist/cjs/errors.js +53 -1
  231. package/node_modules/imapflow/dist/cjs/handler/imap-compiler.js +1 -1
  232. package/node_modules/imapflow/dist/cjs/handler/imap-stream.d.ts +13 -2
  233. package/node_modules/imapflow/dist/cjs/handler/imap-stream.js +51 -30
  234. package/node_modules/imapflow/dist/cjs/handler/parser-instance.js +2 -2
  235. package/node_modules/imapflow/dist/cjs/handler/token-parser.js +15 -9
  236. package/node_modules/imapflow/dist/cjs/imap-flow.d.ts +30 -84
  237. package/node_modules/imapflow/dist/cjs/imap-flow.js +282 -734
  238. package/node_modules/imapflow/dist/cjs/jp-decoder.js +1 -1
  239. package/node_modules/imapflow/dist/cjs/package-info.d.ts +1 -1
  240. package/node_modules/imapflow/dist/cjs/package-info.js +3 -3
  241. package/node_modules/imapflow/dist/cjs/search-compiler.js +5 -12
  242. package/node_modules/imapflow/dist/cjs/tools.d.ts +52 -11
  243. package/node_modules/imapflow/dist/cjs/tools.js +86 -23
  244. package/node_modules/imapflow/dist/cjs/types.d.ts +30 -16
  245. package/node_modules/imapflow/dist/esm/commands/append.js +13 -13
  246. package/node_modules/imapflow/dist/esm/commands/authenticate.d.ts +3 -8
  247. package/node_modules/imapflow/dist/esm/commands/close.js +2 -1
  248. package/node_modules/imapflow/dist/esm/commands/copy.js +5 -5
  249. package/node_modules/imapflow/dist/esm/commands/create.js +3 -4
  250. package/node_modules/imapflow/dist/esm/commands/delete.js +5 -5
  251. package/node_modules/imapflow/dist/esm/commands/expunge.js +9 -6
  252. package/node_modules/imapflow/dist/esm/commands/fetch.js +13 -11
  253. package/node_modules/imapflow/dist/esm/commands/idle.js +7 -3
  254. package/node_modules/imapflow/dist/esm/commands/list.js +22 -18
  255. package/node_modules/imapflow/dist/esm/commands/move.js +12 -7
  256. package/node_modules/imapflow/dist/esm/commands/namespace.js +2 -2
  257. package/node_modules/imapflow/dist/esm/commands/quota.js +11 -10
  258. package/node_modules/imapflow/dist/esm/commands/rename.js +5 -5
  259. package/node_modules/imapflow/dist/esm/commands/search.js +8 -9
  260. package/node_modules/imapflow/dist/esm/commands/select.js +13 -10
  261. package/node_modules/imapflow/dist/esm/commands/status.js +12 -12
  262. package/node_modules/imapflow/dist/esm/commands/store.js +6 -6
  263. package/node_modules/imapflow/dist/esm/commands/subscribe.js +2 -17
  264. package/node_modules/imapflow/dist/esm/commands/subscription.d.ts +10 -0
  265. package/node_modules/imapflow/dist/esm/commands/subscription.js +26 -0
  266. package/node_modules/imapflow/dist/esm/commands/unsubscribe.js +2 -17
  267. package/node_modules/imapflow/dist/esm/download.d.ts +22 -0
  268. package/node_modules/imapflow/dist/esm/download.js +581 -0
  269. package/node_modules/imapflow/dist/esm/errors.d.ts +50 -1
  270. package/node_modules/imapflow/dist/esm/errors.js +52 -0
  271. package/node_modules/imapflow/dist/esm/handler/imap-compiler.js +1 -1
  272. package/node_modules/imapflow/dist/esm/handler/imap-stream.d.ts +13 -2
  273. package/node_modules/imapflow/dist/esm/handler/imap-stream.js +51 -30
  274. package/node_modules/imapflow/dist/esm/handler/parser-instance.js +2 -2
  275. package/node_modules/imapflow/dist/esm/handler/token-parser.js +15 -9
  276. package/node_modules/imapflow/dist/esm/imap-flow.d.ts +30 -84
  277. package/node_modules/imapflow/dist/esm/imap-flow.js +282 -735
  278. package/node_modules/imapflow/dist/esm/jp-decoder.js +1 -1
  279. package/node_modules/imapflow/dist/esm/package-info.d.ts +1 -1
  280. package/node_modules/imapflow/dist/esm/package-info.js +3 -3
  281. package/node_modules/imapflow/dist/esm/search-compiler.js +5 -12
  282. package/node_modules/imapflow/dist/esm/tools.d.ts +52 -11
  283. package/node_modules/imapflow/dist/esm/tools.js +79 -21
  284. package/node_modules/imapflow/dist/esm/types.d.ts +30 -16
  285. package/node_modules/imapflow/package.json +4 -4
  286. package/package.json +2 -2
  287. package/packages/cli/dist/.tsbuildinfo +1 -1
  288. package/packages/cli/dist/args.d.ts +6 -0
  289. package/packages/cli/dist/args.d.ts.map +1 -1
  290. package/packages/cli/dist/args.js +15 -0
  291. package/packages/cli/dist/args.js.map +1 -1
  292. package/packages/cli/dist/commands.d.ts.map +1 -1
  293. package/packages/cli/dist/commands.js +18 -1
  294. package/packages/cli/dist/commands.js.map +1 -1
  295. package/packages/cli/dist/main.d.ts.map +1 -1
  296. package/packages/cli/dist/main.js +19 -2
  297. package/packages/cli/dist/main.js.map +1 -1
  298. package/packages/cli/dist/status.d.ts +10 -0
  299. package/packages/cli/dist/status.d.ts.map +1 -1
  300. package/packages/cli/dist/status.js +4 -0
  301. package/packages/cli/dist/status.js.map +1 -1
  302. package/packages/core/dist/.tsbuildinfo +1 -1
  303. package/packages/core/dist/agents/catalog.d.ts.map +1 -1
  304. package/packages/core/dist/agents/catalog.js +7 -1
  305. package/packages/core/dist/agents/catalog.js.map +1 -1
  306. package/packages/core/dist/host/build.d.ts.map +1 -1
  307. package/packages/core/dist/host/build.js +33 -16
  308. package/packages/core/dist/host/build.js.map +1 -1
  309. package/packages/core/dist/host/types.d.ts +17 -0
  310. package/packages/core/dist/host/types.d.ts.map +1 -1
  311. package/packages/core/dist/pages/__fixtures__/demo.d.ts.map +1 -1
  312. package/packages/core/dist/pages/__fixtures__/demo.js +1 -0
  313. package/packages/core/dist/pages/__fixtures__/demo.js.map +1 -1
  314. package/packages/core/dist/pages.d.ts +74 -0
  315. package/packages/core/dist/pages.d.ts.map +1 -1
  316. package/packages/core/dist/pages.js +27 -1
  317. package/packages/core/dist/pages.js.map +1 -1
  318. package/packages/core/dist/plugin/index.d.ts +2 -2
  319. package/packages/core/dist/plugin/index.d.ts.map +1 -1
  320. package/packages/core/dist/plugin/version.d.ts +1 -1
  321. package/packages/core/dist/plugin/version.js +1 -1
  322. package/packages/core/dist/provider-accounts.d.ts +15 -1
  323. package/packages/core/dist/provider-accounts.d.ts.map +1 -1
  324. package/packages/core/dist/provider-accounts.js +22 -1
  325. package/packages/core/dist/provider-accounts.js.map +1 -1
  326. package/packages/core/dist/provider.d.ts +6 -0
  327. package/packages/core/dist/provider.d.ts.map +1 -1
  328. package/packages/core/dist/provider.js.map +1 -1
  329. package/packages/core/dist/surfaces.d.ts +11 -0
  330. package/packages/core/dist/surfaces.d.ts.map +1 -1
  331. package/packages/core/dist/surfaces.js +4 -0
  332. package/packages/core/dist/surfaces.js.map +1 -1
  333. package/packages/core/migrations/046_ollama_device_key.sql +7 -0
  334. package/packages/core/migrations/047_reported_context_windows.sql +5 -0
  335. package/packages/core/migrations/048_surface_chat_voice.sql +13 -0
  336. package/packages/core/migrations/049_surface_chat_voice_form.sql +8 -0
  337. package/packages/gateway/dist/.tsbuildinfo +1 -1
  338. package/packages/gateway/dist/agents-cli.d.ts +2 -0
  339. package/packages/gateway/dist/agents-cli.d.ts.map +1 -1
  340. package/packages/gateway/dist/agents-cli.js +5 -3
  341. package/packages/gateway/dist/agents-cli.js.map +1 -1
  342. package/packages/gateway/dist/chat/session.d.ts.map +1 -1
  343. package/packages/gateway/dist/chat/session.js +2 -2
  344. package/packages/gateway/dist/chat/session.js.map +1 -1
  345. package/packages/gateway/dist/chat/usage.d.ts +16 -0
  346. package/packages/gateway/dist/chat/usage.d.ts.map +1 -1
  347. package/packages/gateway/dist/chat/usage.js +53 -11
  348. package/packages/gateway/dist/chat/usage.js.map +1 -1
  349. package/packages/gateway/dist/codex-accounts.d.ts +24 -11
  350. package/packages/gateway/dist/codex-accounts.d.ts.map +1 -1
  351. package/packages/gateway/dist/codex-accounts.js +151 -215
  352. package/packages/gateway/dist/codex-accounts.js.map +1 -1
  353. package/packages/gateway/dist/index.d.ts +2 -0
  354. package/packages/gateway/dist/index.d.ts.map +1 -1
  355. package/packages/gateway/dist/index.js +2 -0
  356. package/packages/gateway/dist/index.js.map +1 -1
  357. package/packages/gateway/dist/ollama-accounts.d.ts +87 -0
  358. package/packages/gateway/dist/ollama-accounts.d.ts.map +1 -0
  359. package/packages/gateway/dist/ollama-accounts.js +179 -0
  360. package/packages/gateway/dist/ollama-accounts.js.map +1 -0
  361. package/packages/gateway/dist/provider-accounts.d.ts +51 -1
  362. package/packages/gateway/dist/provider-accounts.d.ts.map +1 -1
  363. package/packages/gateway/dist/provider-accounts.js +184 -25
  364. package/packages/gateway/dist/provider-accounts.js.map +1 -1
  365. package/packages/gateway/dist/speech-cli.d.ts +43 -0
  366. package/packages/gateway/dist/speech-cli.d.ts.map +1 -0
  367. package/packages/gateway/dist/speech-cli.js +105 -0
  368. package/packages/gateway/dist/speech-cli.js.map +1 -0
  369. package/packages/gateway/dist/surfaces/context-budget.d.ts.map +1 -1
  370. package/packages/gateway/dist/surfaces/context-budget.js +10 -3
  371. package/packages/gateway/dist/surfaces/context-budget.js.map +1 -1
  372. package/packages/gateway/dist/telegram/api.d.ts +10 -0
  373. package/packages/gateway/dist/telegram/api.d.ts.map +1 -1
  374. package/packages/gateway/dist/telegram/api.js +12 -0
  375. package/packages/gateway/dist/telegram/api.js.map +1 -1
  376. package/packages/gateway/dist/telegram/browser-view.d.ts +2 -1
  377. package/packages/gateway/dist/telegram/browser-view.d.ts.map +1 -1
  378. package/packages/gateway/dist/telegram/browser-view.js +4 -2
  379. package/packages/gateway/dist/telegram/browser-view.js.map +1 -1
  380. package/packages/gateway/dist/telegram/main.d.ts.map +1 -1
  381. package/packages/gateway/dist/telegram/main.js +10 -2
  382. package/packages/gateway/dist/telegram/main.js.map +1 -1
  383. package/packages/gateway/dist/telegram/surface.d.ts +25 -0
  384. package/packages/gateway/dist/telegram/surface.d.ts.map +1 -1
  385. package/packages/gateway/dist/telegram/surface.js +212 -10
  386. package/packages/gateway/dist/telegram/surface.js.map +1 -1
  387. package/packages/gateway/dist/telegram/voice.d.ts +112 -0
  388. package/packages/gateway/dist/telegram/voice.d.ts.map +1 -0
  389. package/packages/gateway/dist/telegram/voice.js +220 -0
  390. package/packages/gateway/dist/telegram/voice.js.map +1 -0
  391. package/packages/gateway/dist/web/chat.d.ts +31 -8
  392. package/packages/gateway/dist/web/chat.d.ts.map +1 -1
  393. package/packages/gateway/dist/web/chat.js +3 -2
  394. package/packages/gateway/dist/web/chat.js.map +1 -1
  395. package/packages/gateway/dist/web/onboarding.d.ts +13 -2
  396. package/packages/gateway/dist/web/onboarding.d.ts.map +1 -1
  397. package/packages/gateway/dist/web/onboarding.js +24 -3
  398. package/packages/gateway/dist/web/onboarding.js.map +1 -1
  399. package/packages/gateway/dist/web/read.d.ts +15 -12
  400. package/packages/gateway/dist/web/read.d.ts.map +1 -1
  401. package/packages/gateway/dist/web/read.js +9 -10
  402. package/packages/gateway/dist/web/read.js.map +1 -1
  403. package/packages/gateway/dist/web/server.d.ts.map +1 -1
  404. package/packages/gateway/dist/web/server.js +29 -13
  405. package/packages/gateway/dist/web/server.js.map +1 -1
  406. package/packages/gateway/dist/web/speech.d.ts +47 -0
  407. package/packages/gateway/dist/web/speech.d.ts.map +1 -0
  408. package/packages/gateway/dist/web/speech.js +83 -0
  409. package/packages/gateway/dist/web/speech.js.map +1 -0
  410. package/packages/gateway/dist/web/stream.d.ts +0 -24
  411. package/packages/gateway/dist/web/stream.d.ts.map +1 -1
  412. package/packages/gateway/dist/web/stream.js +26 -2
  413. package/packages/gateway/dist/web/stream.js.map +1 -1
  414. package/packages/gateway/dist/web/usage-view.d.ts +15 -0
  415. package/packages/gateway/dist/web/usage-view.d.ts.map +1 -0
  416. package/packages/gateway/dist/web/usage-view.js +20 -0
  417. package/packages/gateway/dist/web/usage-view.js.map +1 -0
  418. package/packages/install/dist/.tsbuildinfo +1 -1
  419. package/packages/runtime/dist/.tsbuildinfo +1 -1
  420. package/packages/runtime/dist/anthropic.d.ts +18 -0
  421. package/packages/runtime/dist/anthropic.d.ts.map +1 -1
  422. package/packages/runtime/dist/anthropic.js +65 -13
  423. package/packages/runtime/dist/anthropic.js.map +1 -1
  424. package/packages/runtime/dist/codex-direct.d.ts +55 -0
  425. package/packages/runtime/dist/codex-direct.d.ts.map +1 -0
  426. package/packages/runtime/dist/codex-direct.js +342 -0
  427. package/packages/runtime/dist/codex-direct.js.map +1 -0
  428. package/packages/runtime/dist/codex-oauth.d.ts +66 -0
  429. package/packages/runtime/dist/codex-oauth.d.ts.map +1 -0
  430. package/packages/runtime/dist/codex-oauth.js +210 -0
  431. package/packages/runtime/dist/codex-oauth.js.map +1 -0
  432. package/packages/runtime/dist/codex-profile.d.ts +19 -0
  433. package/packages/runtime/dist/codex-profile.d.ts.map +1 -0
  434. package/packages/runtime/dist/codex-profile.js +99 -0
  435. package/packages/runtime/dist/codex-profile.js.map +1 -0
  436. package/packages/runtime/dist/context-window.d.ts.map +1 -1
  437. package/packages/runtime/dist/context-window.js +17 -4
  438. package/packages/runtime/dist/context-window.js.map +1 -1
  439. package/packages/runtime/dist/delegate.d.ts +24 -0
  440. package/packages/runtime/dist/delegate.d.ts.map +1 -1
  441. package/packages/runtime/dist/delegate.js +87 -11
  442. package/packages/runtime/dist/delegate.js.map +1 -1
  443. package/packages/runtime/dist/index.d.ts +4 -4
  444. package/packages/runtime/dist/index.d.ts.map +1 -1
  445. package/packages/runtime/dist/index.js +5 -5
  446. package/packages/runtime/dist/index.js.map +1 -1
  447. package/packages/runtime/dist/loop.d.ts +7 -0
  448. package/packages/runtime/dist/loop.d.ts.map +1 -1
  449. package/packages/runtime/dist/loop.js +54 -8
  450. package/packages/runtime/dist/loop.js.map +1 -1
  451. package/packages/runtime/dist/ollama-signing.d.ts +52 -0
  452. package/packages/runtime/dist/ollama-signing.d.ts.map +1 -0
  453. package/packages/runtime/dist/ollama-signing.js +154 -0
  454. package/packages/runtime/dist/ollama-signing.js.map +1 -0
  455. package/packages/runtime/dist/openai.d.ts +16 -4
  456. package/packages/runtime/dist/openai.d.ts.map +1 -1
  457. package/packages/runtime/dist/openai.js +44 -11
  458. package/packages/runtime/dist/openai.js.map +1 -1
  459. package/packages/runtime/dist/provider-models.d.ts +2 -0
  460. package/packages/runtime/dist/provider-models.d.ts.map +1 -1
  461. package/packages/runtime/dist/provider-models.js +13 -4
  462. package/packages/runtime/dist/provider-models.js.map +1 -1
  463. package/packages/tools/artifacts/dist/.tsbuildinfo +1 -1
  464. package/packages/tools/browser/dist/.tsbuildinfo +1 -1
  465. package/packages/tools/browser/dist/computer.d.ts +53 -1
  466. package/packages/tools/browser/dist/computer.d.ts.map +1 -1
  467. package/packages/tools/browser/dist/computer.js +154 -5
  468. package/packages/tools/browser/dist/computer.js.map +1 -1
  469. package/packages/tools/browser/dist/controller.d.ts +20 -3
  470. package/packages/tools/browser/dist/controller.d.ts.map +1 -1
  471. package/packages/tools/browser/dist/controller.js +170 -5
  472. package/packages/tools/browser/dist/controller.js.map +1 -1
  473. package/packages/tools/browser/dist/index.d.ts.map +1 -1
  474. package/packages/tools/browser/dist/index.js +9 -1
  475. package/packages/tools/browser/dist/index.js.map +1 -1
  476. package/packages/tools/browser/dist/service.d.ts +14 -1
  477. package/packages/tools/browser/dist/service.d.ts.map +1 -1
  478. package/packages/tools/browser/dist/service.js +28 -5
  479. package/packages/tools/browser/dist/service.js.map +1 -1
  480. package/packages/tools/browser/dist/types.d.ts +11 -0
  481. package/packages/tools/browser/dist/types.d.ts.map +1 -1
  482. package/packages/tools/browser/dist/types.js +16 -3
  483. package/packages/tools/browser/dist/types.js.map +1 -1
  484. package/packages/tools/browser/package.json +1 -1
  485. package/packages/tools/email/dist/.tsbuildinfo +1 -1
  486. package/packages/tools/host/dist/.tsbuildinfo +1 -1
  487. package/packages/tools/memory/dist/.tsbuildinfo +1 -1
  488. package/packages/tools/web/dist/.tsbuildinfo +1 -1
  489. package/packages/web/dist/assets/index-D5cRFcgm.css +1 -0
  490. package/packages/web/dist/assets/index-GCFB1vBV.js +125 -0
  491. package/packages/web/dist/index.html +2 -2
  492. package/node_modules/@buddi/runtime/dist/codex-app-server.d.ts +0 -20
  493. package/node_modules/@buddi/runtime/dist/codex-app-server.d.ts.map +0 -1
  494. package/node_modules/@buddi/runtime/dist/codex-app-server.js +0 -172
  495. package/node_modules/@buddi/runtime/dist/codex-app-server.js.map +0 -1
  496. package/node_modules/@buddi/runtime/dist/codex-policy.d.ts +0 -6
  497. package/node_modules/@buddi/runtime/dist/codex-policy.d.ts.map +0 -1
  498. package/node_modules/@buddi/runtime/dist/codex-policy.js +0 -79
  499. package/node_modules/@buddi/runtime/dist/codex-policy.js.map +0 -1
  500. package/node_modules/@buddi/runtime/dist/codex-rpc.d.ts +0 -34
  501. package/node_modules/@buddi/runtime/dist/codex-rpc.d.ts.map +0 -1
  502. package/node_modules/@buddi/runtime/dist/codex-rpc.js +0 -152
  503. package/node_modules/@buddi/runtime/dist/codex-rpc.js.map +0 -1
  504. package/node_modules/@buddi/runtime/dist/codex-session.d.ts +0 -30
  505. package/node_modules/@buddi/runtime/dist/codex-session.d.ts.map +0 -1
  506. package/node_modules/@buddi/runtime/dist/codex-session.js +0 -169
  507. package/node_modules/@buddi/runtime/dist/codex-session.js.map +0 -1
  508. package/packages/runtime/dist/codex-app-server.d.ts +0 -20
  509. package/packages/runtime/dist/codex-app-server.d.ts.map +0 -1
  510. package/packages/runtime/dist/codex-app-server.js +0 -172
  511. package/packages/runtime/dist/codex-app-server.js.map +0 -1
  512. package/packages/runtime/dist/codex-policy.d.ts +0 -6
  513. package/packages/runtime/dist/codex-policy.d.ts.map +0 -1
  514. package/packages/runtime/dist/codex-policy.js +0 -79
  515. package/packages/runtime/dist/codex-policy.js.map +0 -1
  516. package/packages/runtime/dist/codex-rpc.d.ts +0 -34
  517. package/packages/runtime/dist/codex-rpc.d.ts.map +0 -1
  518. package/packages/runtime/dist/codex-rpc.js +0 -152
  519. package/packages/runtime/dist/codex-rpc.js.map +0 -1
  520. package/packages/runtime/dist/codex-session.d.ts +0 -30
  521. package/packages/runtime/dist/codex-session.d.ts.map +0 -1
  522. package/packages/runtime/dist/codex-session.js +0 -169
  523. package/packages/runtime/dist/codex-session.js.map +0 -1
  524. package/packages/web/dist/assets/index-B727JQsO.css +0 -1
  525. package/packages/web/dist/assets/index-OA0xgibo.js +0 -123
@@ -31,7 +31,7 @@ export class JPDecoder extends Transform {
31
31
  chunk = Buffer.from(chunk, encoding);
32
32
  }
33
33
  if (this.chunklen + chunk.length > this.maxBytes) {
34
- chunk = chunk.slice(0, Math.max(0, this.maxBytes - this.chunklen));
34
+ chunk = chunk.subarray(0, Math.max(0, this.maxBytes - this.chunklen));
35
35
  }
36
36
  if (chunk.length) {
37
37
  this.chunks.push(chunk);
@@ -1,3 +1,3 @@
1
1
  export declare const name = "imapflow";
2
- export declare const version = "2.0.7";
2
+ export declare const version = "2.1.0";
3
3
  export declare const homepage = "https://imapflow.com/";
@@ -1,4 +1,4 @@
1
1
  // Generated by scripts/build.js from package.json. Do not edit by hand.
2
- export const name = 'imapflow';
3
- export const version = '2.0.7';
4
- export const homepage = 'https://imapflow.com/';
2
+ export const name = "imapflow";
3
+ export const version = "2.1.0";
4
+ export const homepage = "https://imapflow.com/";
@@ -403,21 +403,14 @@ export const searchCompiler = (connection, query) => {
403
403
  * @returns Binary tree structure
404
404
  */
405
405
  let genOrTree = (list) => {
406
- let group = false;
407
406
  let groups = [];
408
407
  // Group items in pairs
409
- list.forEach((entry, i) => {
410
- if (i % 2 === 0) {
411
- group = [entry];
412
- }
413
- else {
414
- group.push(entry);
415
- groups.push(group);
416
- group = false;
417
- }
418
- });
408
+ for (let i = 0; i + 1 < list.length; i += 2) {
409
+ groups.push([list[i], list[i + 1]]);
410
+ }
419
411
  // Handle odd number of items
420
- if (group && group.length) {
412
+ if (list.length % 2) {
413
+ let group = [list[list.length - 1]];
421
414
  while (group.length === 1 && Array.isArray(group[0])) {
422
415
  group = group[0];
423
416
  }
@@ -1,8 +1,8 @@
1
1
  import type { Transform } from 'node:stream';
2
2
  import type { ImapFlow } from './imap-flow.js';
3
- import type { ConnectionErrorSite, ImapFlowError } from './errors.js';
3
+ import { type ConnectionErrorSite, type ImapFlowError } from './errors.js';
4
4
  import type { ImapAttributeList, ImapAttributeNode, ImapResponse } from './handler/types.js';
5
- import type { FetchMessageObject, ListResponse, ListTreeResponse, MailboxObject, MessageEnvelopeObject, MessageStructureObject, StatusQuery } from './types.js';
5
+ import type { FetchMessageObject, ListResponse, ListTreeResponse, MailboxObject, MessageEnvelopeObject, MessageStructureObject, ImapFlowEvents, StatusQuery } from './types.js';
6
6
  export { AuthenticationFailure } from './errors.js';
7
7
  export declare const EXPANDED_RANGE_LIMIT = 16777216;
8
8
  export declare const MAX_UINT32_DIGITS = 10;
@@ -80,6 +80,13 @@ export declare function guardedPromise<T>(executor: (resolve: (value: T | Promis
80
80
  * @returns Rejected promise, with its rejection already observed
81
81
  */
82
82
  export declare function guardedReject(error: Error): Promise<never>;
83
+ /**
84
+ * Clears a timer that may already have been dropped. `clearTimeout()` accepts undefined but not
85
+ * null, and the connection nulls its timer fields once cleared, so every site clears through here.
86
+ *
87
+ * @param timer - Timer handle returned by setTimeout, or null/undefined when none is armed
88
+ */
89
+ export declare function clearTimer(timer: NodeJS.Timeout | null | undefined): void;
83
90
  /**
84
91
  * Detaches a background timer from the event loop, so it cannot keep the process alive on its
85
92
  * own. Applied to every background timer (auto-IDLE, IDLE restart, fallback polling, throttle
@@ -89,13 +96,6 @@ export declare function guardedReject(error: Error): Promise<never>;
89
96
  * @param timer - Timer handle returned by setTimeout
90
97
  * @returns The same timer handle
91
98
  */
92
- /**
93
- * Clears a timer that may already have been dropped. `clearTimeout()` accepts undefined but not
94
- * null, and the connection nulls its timer fields once cleared, so every site clears through here.
95
- *
96
- * @param timer - Timer handle returned by setTimeout, or null/undefined when none is armed
97
- */
98
- export declare function clearTimer(timer: NodeJS.Timeout | null | undefined): void;
99
99
  export declare function unrefTimer<T extends NodeJS.Timeout | null | undefined>(timer: T): T;
100
100
  /**
101
101
  * Logs a failure from background connection work at the level its cause deserves.
@@ -200,6 +200,25 @@ export declare function updateCapabilities(list: ImapAttributeList | null | unde
200
200
  * @returns Uppercase status code string, or false if not found
201
201
  */
202
202
  export declare function getStatusCode(response: ImapResponse | string | false | undefined): string | false;
203
+ /**
204
+ * Emits a state-change event from inside the command pipeline. A listener that throws must not
205
+ * abort the code that emitted it: select() emits before it releases the response, so the throw
206
+ * would leave the reader loop waiting forever, and close() would never get to emit 'close'. The
207
+ * error is logged instead, the same contract untagged handlers and the 'response' event get.
208
+ *
209
+ * @param connection - IMAP connection instance
210
+ * @param event - Event name
211
+ * @param args - Event arguments
212
+ */
213
+ export declare function emitSafe<K extends keyof ImapFlowEvents>(connection: ImapFlow, event: K, ...args: ImapFlowEvents[K]): void;
214
+ /**
215
+ * Collects the values of the TEXT tokens of a parsed response (the human-readable
216
+ * part of a status response, a greeting or a BYE).
217
+ *
218
+ * @param attributes - Attributes of a parsed IMAP response
219
+ * @returns Values of the TEXT tokens, in order
220
+ */
221
+ export declare function getTextValues(attributes: ImapAttributeList | undefined): string[];
203
222
  /**
204
223
  * Compiles an IMAP response object back into a human-readable string.
205
224
  *
@@ -214,6 +233,28 @@ export declare function getErrorText(response: ImapResponse | string | false | u
214
233
  * @returns The enhanced error with `serverResponseCode` and string `response`
215
234
  */
216
235
  export declare function enhanceCommandError(err: ImapFlowError): Promise<ImapFlowError>;
236
+ /**
237
+ * Enhances a failed command's error (see enhanceCommandError()) and logs it, the shared first
238
+ * step of every command's failure path. The caller decides whether to throw or return.
239
+ *
240
+ * @param connection - IMAP connection instance
241
+ * @param err - The command error
242
+ */
243
+ export declare function reportCommandError(connection: ImapFlow, err: ImapFlowError): Promise<void>;
244
+ /**
245
+ * Whether the session is authenticated, that is in the AUTHENTICATED or SELECTED state, which
246
+ * every mailbox-level command requires.
247
+ *
248
+ * @param connection - IMAP connection instance
249
+ */
250
+ export declare function isAuthenticatedState(connection: ImapFlow): boolean;
251
+ /**
252
+ * Returns the selected mailbox, or false when the connection is not in the SELECTED state.
253
+ * Message-level commands use it as their precondition, which also narrows the mailbox type.
254
+ *
255
+ * @param connection - IMAP connection instance
256
+ */
257
+ export declare function getSelectedMailbox(connection: ImapFlow): MailboxObject | false;
217
258
  /**
218
259
  * Converts a flat list of mailbox folders into a tree structure.
219
260
  *
@@ -305,14 +346,14 @@ export declare function toValidDate(value: unknown): Date | null;
305
346
  * @param value - Date to format
306
347
  * @returns Formatted date string, or undefined if invalid
307
348
  */
308
- export declare function formatDate(value: Date | string | null | undefined): string | undefined;
349
+ export declare function formatDate(value: unknown): string | undefined;
309
350
  /**
310
351
  * Formats a date value into IMAP date-time format (DD-Mon-YYYY HH:MM:SS +0000).
311
352
  *
312
353
  * @param value - Date to format
313
354
  * @returns Formatted date-time string, or undefined if invalid
314
355
  */
315
- export declare function formatDateTime(value: Date | string | null | undefined): string | undefined;
356
+ export declare function formatDateTime(value: unknown): string | undefined;
316
357
  /**
317
358
  * Normalizes a flag string. Returns false for non-settable flags (e.g. \Recent),
318
359
  * and capitalizes system flags properly.
@@ -5,10 +5,11 @@ import { compiler } from './handler/imap-handler.js';
5
5
  import { createHash } from 'node:crypto';
6
6
  import { JPDecoder } from './jp-decoder.js';
7
7
  import iconv from 'iconv-lite';
8
+ import { ImapFlowErrorCode } from './errors.js';
8
9
  export { AuthenticationFailure } from './errors.js';
9
10
  const FLAG_COLORS = ['red', 'orange', 'yellow', 'green', 'blue', 'purple', 'grey'];
10
11
  // Error codes that only mean the connection is no longer usable. See logConnectionError().
11
- const CONNECTION_GONE_CODES = new Set(['NoConnection', 'EConnectionClosed', 'StateLogout']);
12
+ const CONNECTION_GONE_CODES = new Set([ImapFlowErrorCode.NoConnection, ImapFlowErrorCode.EConnectionClosed, ImapFlowErrorCode.StateLogout]);
12
13
  // Upper bound for expanding server-supplied sequence ranges (see expandRange). 2^24
13
14
  // entries in total is far beyond any legitimate mailbox while keeping the worst-case
14
15
  // expansion of a hostile range set bounded.
@@ -158,15 +159,6 @@ export function guardedReject(error) {
158
159
  promise.catch(noop);
159
160
  return promise;
160
161
  }
161
- /**
162
- * Detaches a background timer from the event loop, so it cannot keep the process alive on its
163
- * own. Applied to every background timer (auto-IDLE, IDLE restart, fallback polling, throttle
164
- * back-off, held-lock diagnostics); connection and greeting deadlines are deliberately left
165
- * attached, because a caller is waiting for connect() to settle.
166
- *
167
- * @param timer - Timer handle returned by setTimeout
168
- * @returns The same timer handle
169
- */
170
162
  /**
171
163
  * Clears a timer that may already have been dropped. `clearTimeout()` accepts undefined but not
172
164
  * null, and the connection nulls its timer fields once cleared, so every site clears through here.
@@ -178,6 +170,15 @@ export function clearTimer(timer) {
178
170
  clearTimeout(timer);
179
171
  }
180
172
  }
173
+ /**
174
+ * Detaches a background timer from the event loop, so it cannot keep the process alive on its
175
+ * own. Applied to every background timer (auto-IDLE, IDLE restart, fallback polling, throttle
176
+ * back-off, held-lock diagnostics); connection and greeting deadlines are deliberately left
177
+ * attached, because a caller is waiting for connect() to settle.
178
+ *
179
+ * @param timer - Timer handle returned by setTimeout
180
+ * @returns The same timer handle
181
+ */
181
182
  export function unrefTimer(timer) {
182
183
  /* c8 ignore next 3 */ // node timers always expose unref(); the guard covers replaced globals in tests
183
184
  if (timer && typeof timer.unref === 'function') {
@@ -393,7 +394,7 @@ export function updateCapabilities(list) {
393
394
  }
394
395
  if (capability.startsWith('APPENDLIMIT=')) {
395
396
  let splitPos = capability.indexOf('=');
396
- map.set('APPENDLIMIT', parseUintValue(capability.substr(splitPos + 1)) || 0);
397
+ map.set('APPENDLIMIT', parseUintValue(capability.slice(splitPos + 1)) || 0);
397
398
  return;
398
399
  }
399
400
  map.set(capability, true);
@@ -419,6 +420,34 @@ export function getStatusCode(response) {
419
420
  ? response.attributes[0].section[0].value.toUpperCase().trim()
420
421
  : false;
421
422
  }
423
+ /**
424
+ * Emits a state-change event from inside the command pipeline. A listener that throws must not
425
+ * abort the code that emitted it: select() emits before it releases the response, so the throw
426
+ * would leave the reader loop waiting forever, and close() would never get to emit 'close'. The
427
+ * error is logged instead, the same contract untagged handlers and the 'response' event get.
428
+ *
429
+ * @param connection - IMAP connection instance
430
+ * @param event - Event name
431
+ * @param args - Event arguments
432
+ */
433
+ export function emitSafe(connection, event, ...args) {
434
+ try {
435
+ connection.emit(event, ...args);
436
+ }
437
+ catch (err) {
438
+ connection.log.warn({ msg: 'Event listener failed', event, err, cid: connection.id });
439
+ }
440
+ }
441
+ /**
442
+ * Collects the values of the TEXT tokens of a parsed response (the human-readable
443
+ * part of a status response, a greeting or a BYE).
444
+ *
445
+ * @param attributes - Attributes of a parsed IMAP response
446
+ * @returns Values of the TEXT tokens, in order
447
+ */
448
+ export function getTextValues(attributes) {
449
+ return (attributes || []).filter(attr => attr?.type === 'TEXT').map(attr => String(attr?.value ?? ''));
450
+ }
422
451
  /**
423
452
  * Compiles an IMAP response object back into a human-readable string.
424
453
  *
@@ -456,6 +485,35 @@ export async function enhanceCommandError(err) {
456
485
  err.response = await getErrorText(err.response);
457
486
  return err;
458
487
  }
488
+ /**
489
+ * Enhances a failed command's error (see enhanceCommandError()) and logs it, the shared first
490
+ * step of every command's failure path. The caller decides whether to throw or return.
491
+ *
492
+ * @param connection - IMAP connection instance
493
+ * @param err - The command error
494
+ */
495
+ export async function reportCommandError(connection, err) {
496
+ await enhanceCommandError(err);
497
+ connection.log.warn({ err, cid: connection.id });
498
+ }
499
+ /**
500
+ * Whether the session is authenticated, that is in the AUTHENTICATED or SELECTED state, which
501
+ * every mailbox-level command requires.
502
+ *
503
+ * @param connection - IMAP connection instance
504
+ */
505
+ export function isAuthenticatedState(connection) {
506
+ return connection.state === connection.states.AUTHENTICATED || connection.state === connection.states.SELECTED;
507
+ }
508
+ /**
509
+ * Returns the selected mailbox, or false when the connection is not in the SELECTED state.
510
+ * Message-level commands use it as their precondition, which also narrows the mailbox type.
511
+ *
512
+ * @param connection - IMAP connection instance
513
+ */
514
+ export function getSelectedMailbox(connection) {
515
+ return connection.state === connection.states.SELECTED && connection.mailbox ? connection.mailbox : false;
516
+ }
459
517
  /**
460
518
  * Converts a flat list of mailbox folders into a tree structure.
461
519
  *
@@ -943,7 +1001,7 @@ export function getStructuredParams(arr) {
943
1001
  // nothing to do here, does not seem like a continuation param
944
1002
  return;
945
1003
  }
946
- actualKey = key.substr(0, match.index).toLowerCase();
1004
+ actualKey = key.substring(0, match.index).toLowerCase();
947
1005
  nr = Number(match[2]) || 0;
948
1006
  if (isUnsafeKey(actualKey)) {
949
1007
  // A continuation key like "__proto__*0*" would group under "__proto__":
@@ -1035,7 +1093,7 @@ export function parseBodystructure(entry) {
1035
1093
  curNode.type = 'multipart/' + ((node[i++] || {}).value || '').toString().toLowerCase();
1036
1094
  // extension data (not available for BODY requests)
1037
1095
  // body parameter parenthesized list
1038
- if (i < node.length - 1) {
1096
+ if (i < node.length) {
1039
1097
  if (node[i]) {
1040
1098
  curNode.parameters = getStructuredParams(node[i]);
1041
1099
  }
@@ -1117,7 +1175,7 @@ export function parseBodystructure(entry) {
1117
1175
  }
1118
1176
  // extension data (not available for BODY requests)
1119
1177
  // md5
1120
- if (i < node.length - 1) {
1178
+ if (i < node.length) {
1121
1179
  if (node[i]) {
1122
1180
  curNode.md5 = (node[i].value || '').toString().toLowerCase();
1123
1181
  }
@@ -1127,7 +1185,7 @@ export function parseBodystructure(entry) {
1127
1185
  // the following are shared extension values (for both multipart and non-multipart parts)
1128
1186
  // not available for BODY requests
1129
1187
  // body disposition
1130
- if (i < node.length - 1) {
1188
+ if (i < node.length) {
1131
1189
  let disposition = node[i];
1132
1190
  if (Array.isArray(disposition) && disposition.length) {
1133
1191
  curNode.disposition = ((disposition[0] && disposition[0].value) || '').toString().toLowerCase();
@@ -1138,7 +1196,7 @@ export function parseBodystructure(entry) {
1138
1196
  i++;
1139
1197
  }
1140
1198
  // body language
1141
- if (i < node.length - 1) {
1199
+ if (i < node.length) {
1142
1200
  if (node[i]) {
1143
1201
  /* c8 ignore next */ // node[i] is truthy inside this guard, so the [] fallback is unreachable
1144
1202
  curNode.language = [].concat(node[i] || []).map(val => ((val && val.value) || '').toString().toLowerCase());
@@ -1148,7 +1206,7 @@ export function parseBodystructure(entry) {
1148
1206
  // body location
1149
1207
  // NB! defined as a "string list" in RFC3501 but replaced in errata document with "string"
1150
1208
  // Errata: http://www.rfc-editor.org/errata_search.php?rfc=3501
1151
- if (i < node.length - 1) {
1209
+ if (i < node.length) {
1152
1210
  if (node[i]) {
1153
1211
  curNode.location = (node[i].value || '').toString();
1154
1212
  }
@@ -1195,7 +1253,7 @@ export function formatDate(value) {
1195
1253
  if (!date) {
1196
1254
  return;
1197
1255
  }
1198
- let dateParts = date.toISOString().substr(0, 10).split('-');
1256
+ let dateParts = date.toISOString().substring(0, 10).split('-');
1199
1257
  dateParts.reverse();
1200
1258
  let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
1201
1259
  dateParts[1] = months[Number(dateParts[1]) - 1];
@@ -1213,7 +1271,7 @@ export function formatDateTime(value) {
1213
1271
  return;
1214
1272
  }
1215
1273
  let dateStr = formatDate(date).replace(/^0/, ' '); //starts with date-day-fixed with leading 0 replaced by SP
1216
- let timeStr = date.toISOString().substr(11, 8);
1274
+ let timeStr = date.toISOString().substring(11, 19);
1217
1275
  return `${dateStr} ${timeStr} +0000`;
1218
1276
  }
1219
1277
  /**
@@ -1367,8 +1425,8 @@ export function expandRange(range) {
1367
1425
  }
1368
1426
  continue;
1369
1427
  }
1370
- let first = Number(entry.substr(0, colon));
1371
- let second = Number(entry.substr(colon + 1));
1428
+ let first = Number(entry.substring(0, colon));
1429
+ let second = Number(entry.slice(colon + 1));
1372
1430
  if (!isValidSequenceValue(first) || !isValidSequenceValue(second)) {
1373
1431
  continue;
1374
1432
  }
@@ -207,26 +207,32 @@ export interface IdInfoObject {
207
207
  'support-url'?: string | false | undefined;
208
208
  /** Date program was released */
209
209
  date?: Date | string | false | undefined;
210
- [key: string]: any;
210
+ /** Any other field, sent as its string form */
211
+ [key: string]: unknown;
212
+ }
213
+ /**
214
+ * Usage and limit of one quota resource. The `storage` values are bytes (the wire format is
215
+ * kilobytes), the other resources are counts
216
+ */
217
+ export interface QuotaResource {
218
+ /** Current usage, missing when the server did not send a usable number */
219
+ usage?: number | undefined;
220
+ /** The limit, missing when the server did not send a usable number */
221
+ limit?: number | undefined;
222
+ /** Usage as a percentage of the limit, e.g. "50%", set once a limit above zero is known */
223
+ status?: string | undefined;
211
224
  }
212
225
  export interface QuotaResponse {
213
226
  /** Mailbox path this quota applies to */
214
227
  path: string;
215
- /** Storage quota if provided by server */
216
- storage?: {
217
- /** Used storage in bytes */
218
- used: number;
219
- /** Total storage available */
220
- limit: number;
221
- } | undefined;
222
- /** Message count quota if provided by server */
223
- messages?: {
224
- /** Stored messages */
225
- used: number;
226
- /** Maximum messages allowed */
227
- limit: number;
228
- } | undefined;
229
- [resource: string]: any;
228
+ /** The quota root the server reported for the mailbox, if any */
229
+ quotaRoot?: string | undefined;
230
+ /** The STORAGE resource, if the server reports one */
231
+ storage?: QuotaResource | undefined;
232
+ /** The MESSAGE resource, if the server reports one */
233
+ message?: QuotaResource | undefined;
234
+ /** Any other resource the server reports, under its lowercased name (e.g. "mailbox") */
235
+ [resource: string]: QuotaResource | string | undefined;
230
236
  }
231
237
  /**
232
238
  * Status data items to request with `status()` or the `statusQuery` listing option
@@ -616,6 +622,14 @@ export interface DownloadObject {
616
622
  /** Streamed content */
617
623
  content: Readable;
618
624
  }
625
+ /**
626
+ * What `download()` resolves with when there is nothing to download: no mailbox is selected, or
627
+ * the message or part was not found. Check `content` before using the result.
628
+ */
629
+ export interface DownloadNotFound {
630
+ meta?: undefined;
631
+ content?: undefined;
632
+ }
619
633
  export interface DownloadOptions {
620
634
  /** If true then uses UID number instead of sequence number for `range` */
621
635
  uid?: boolean | undefined;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imapflow",
3
- "version": "2.0.7",
3
+ "version": "2.1.0",
4
4
  "description": "IMAP Client for Node",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/imap-flow.js",
@@ -47,7 +47,7 @@
47
47
  "test:rev2": "bash test/integration/run-rev2-tests.sh",
48
48
  "format": "prettier --write \"**/*.{js,cjs,ts,json,md,yml,yaml}\"",
49
49
  "format:check": "prettier --check \"**/*.{js,cjs,ts,json,md,yml,yaml}\"",
50
- "lint": "eslint . && npm run typecheck",
50
+ "lint": "npm run typecheck && eslint .",
51
51
  "lint:fix": "eslint . --fix",
52
52
  "prepare": "npm run build",
53
53
  "update": "rm -rf node_modules package-lock.json && ncu -u && npm install"
@@ -73,12 +73,12 @@
73
73
  "eslint": "10.11.0",
74
74
  "eslint-config-prettier": "10.1.8",
75
75
  "globals": "17.12.0",
76
- "prettier": "3.9.8",
76
+ "prettier": "3.9.9",
77
77
  "tsx": "4.23.15",
78
78
  "types-node-legacy": "npm:@types/node@20.0.0",
79
79
  "typescript": "6.0.3",
80
80
  "typescript-eslint": "8.70.1",
81
- "wrangler": "4.136.3"
81
+ "wrangler": "4.142.0"
82
82
  },
83
83
  "dependencies": {
84
84
  "@zone-eu/mailsplit": "5.4.17",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withbuddi/buddi",
3
- "version": "0.1.0-pre.19",
3
+ "version": "0.1.0-pre.21",
4
4
  "type": "module",
5
5
  "description": "Your personal agents, on your computer",
6
6
  "repository": {
@@ -17,7 +17,7 @@
17
17
  "buddi": "packages/install/dist/launcher.js"
18
18
  },
19
19
  "buddi": {
20
- "notes": "### Added\n\n- `buddi uninstall` removes buddi from the machine: the background service, the data directory with its bundled Postgres, the secrets in the keychain (the file vault on Linux), the dashboard app, the extension pairing and the Telegram menu. It prints every path first and removes nothing until you type yes (or pass `--yes`). It takes one last backup and moves it to `~/buddi-backups`, where it stays; `--no-backup` skips it and `--keep-data` keeps the data directory and its secrets for a reinstall. In a source checkout it removes the service and the keychain entries, stops the Docker Postgres, and leaves the repository and `.env` alone.\n- [docs/dashboard.md](docs/dashboard.md): the dashboard place by place, with one thing to try in each. The docs index has a new group, \"Where you talk to buddi\": the dashboard, Telegram (now with example exchanges), the command line (now opening with what it is for and five examples), Claude Code and notifications.\n- `secret.list` tells an agent which of your secrets the browser may fill, by name, and where each may go, so it no longer asks you for the names. It never returns a value.\n- A goal can watch a number you report yourself, like your weight. When no plugin measures it, the agent creates the metric as it proposes the goal and takes the number you just said as the start; the card says \"measured by you, when you tell buddi\", and `goal.metrics` lists these metrics with the source `owner`.\n- `goal.record` writes down a number you tell any agent (\"285 this morning\", \"ran today\"), names the goal or the metric rather than whose goal it is, and answers with where the goal stands in one sentence. A number more than half away from the last one, or of the other sign, is asked about before it is kept.\n- When a week (or a day, for a daily goal) passes without you telling buddi the number, the goal's agent says so once, in the end-of-day message: \"You have not told me your weight this week.\" A watcher finding can ask for this with `notify: { urgency: 'today' }`.\n- Frequency goals: \"run three times a week\". A goal can count how many times you tell buddi something in each week (Monday to Sunday, your timezone) or month. The card says \"3 times a week\"; a week that closes short is said once, a streak milestone (\"4 weeks in a row\") once, and at the deadline the goal is met when more weeks met the count than fell short.\n- The Goals page shows the numbers you told buddi for a goal you measure, and a frequency goal's weeks as met, short or partial. In chat, `goal.status` draws your own values, or the count for each week, against the target.\n- Settings → Notifications has a Telegram panel: save or replace the bot token, see the phones you paired and unpair one, and pair another with the same QR code first run shows. Telegram appears in \"Where buddi reaches you\" as soon as the bot starts, without a restart.\n- On Telegram, the files a run saved arrive after its answer: pictures as photos, everything else as documents under their own names. A file over Telegram's 50 MB limit is named in one sentence that points to the Files page.\n- On Telegram, a table an agent draws arrives as monospace text when it fits one message, and as a CSV named after the table when it does not. A chart or another view answers with one line, and the dashboard link when a public address is set.\n- On Telegram, the answer streams into one message as the model writes it, updated at most every 1.5 seconds; the last update is the whole answer.\n- A new learning proposal (a skill, a rule for a plugin, a change to an agent's file) is a notification that waits for the end of your day and keeps quiet hours. On Telegram it arrives as a card with Keep and Discard; a tap decides it exactly as the Proposals page does, and a plain \"yes\" in the chat decides nothing.\n- [docs/telegram.md](docs/telegram.md): what the Telegram surface is and is not, pairing, what arrives on the phone, what you can send, the commands, the limits and what leaves this computer.\n- Three read-only Telegram commands: `/missions` lists the next five scheduled missions with their times and agents, `/goals` each open goal with its number and whether it is on track, behind or ahead, and `/where` the dashboard address when your phone can reach it.\n\n### Changed\n\n- The Claude and ChatGPT subscription pages ([anthropic-oauth.md](docs/anthropic-oauth.md), [codex-accounts.md](docs/codex-accounts.md)) are rewritten as reference: setup as the dashboard shows it, what it costs, what buddi keeps, what leaves the machine, limits and how to turn the sign-ins off. Across the docs, the packaged install comes first, `buddi init` and other checkout commands appear only as the source checkout path, and migration numbers and dated test notes are gone.\n- When a site mails a one-time code, an agent with the email tools reads it from your inbox before asking you: the newest message from that site, from the last ten minutes. The code is never stored or reused. The browser's guidance, `email.search` and the first assistant's \"How you work\" say so.\n- Every browser observation says when it was taken (\"Observed 12:04:35 UTC.\", and `observedAt` on the observation), and the agent observes once more after a click that submits or navigates before it says whether it worked, judging from the newest observation only. A sign-in that succeeded is no longer reported as failed from an older page.\n- A browser binding for a secret can name a wildcard origin, like `*.wikimedia.org`, so one binding covers a site's sign-in host and its pages. `*.` stands for the leftmost part only and may not sit on a public suffix such as `*.com` or `*.github.io`; the card and the use log still name the real site. A form data binding's origin is read the same way as a field binding's.\n- A secret's browser binding takes the site as you type it: a bare host becomes its https origin, a full address is cut to its origin, and anything else is refused with an example.\n- On Telegram a browser screenshot's caption no longer counts steps; the count appears only when five or fewer are left.\n- Signing in with Claude from the first run starts the account on the model catalogue's default for Claude, rather than a fixed Sonnet 5; Sonnet 5 is used only when the catalogue names none.\n- A goal that stays off track wakes its agent at most once per cadence for the same drift: once a week for a weekly goal, once a day for a daily one. The first drift still wakes it at once. A watcher's finding can set its own `cooldownMs`.\n- On Telegram, an answer longer than 4,096 characters keeps its first part in the message that said \"Working on it\" and sends the rest after it, split between paragraphs, instead of deleting that message.\n- The model list knows Claude Opus 5.5 (`claude-opus-5-5`, $4 and $20 a million tokens) and Fable 5.1; Sonnet 5 stays the default, at half the price. The context table knows Fable 5.1, Opus 5.5 and Sonnet 5 hold a million tokens.\n- Signing in with Claude from the first run opens the consent page itself; the button stays for a browser that blocks the window.\n- Signing in with a Claude or ChatGPT subscription is offered by default; `BUDDI_SUBSCRIPTION_SIGNINS=off` hides both. The setup wizard shows the Claude card first, with a line on the plan's monthly Agent SDK credits. `buddi doctor` says whether the sign-ins are offered or hidden.\n\n### Deprecated\n\n- `BUDDI_ANTHROPIC_OAUTH_EXPERIMENT` and `BUDDI_CODEX_EXPERIMENT` are no longer needed. For one release, setting either to `0` still hides that one sign-in, and `buddi doctor` names the new variable.\n\n### Fixed\n\n- A model account imported from an environment variable no longer writes a refused use to the Keys and secrets log on every reload: its key answers from the vault directly, as the docs say.\n- When you are looking at the tab an agent wants to act or fill in, the agent now asks you once to switch to another tab or window, instead of failing twice and retrying.\n- `secret.fill` fills a username. A secret bound to a site as a browser field now goes into any field on that site, not only a password field, and the card names the field.\n\n…"
20
+ "notes": "### Changed\n\n- Recording in the composer is now a clear Listening state with a live waveform, a ✓ to transcribe and a × to discard, with Enter and Escape doing the same.\n- The dot on Settings, which means a newer buddi is ready, now shows on the System entry too, so it leads to the Version panel instead of pointing at nothing.\n\n- Asking an agent to open an app you have not allowed for computer control now asks you with a card, Once or Always, instead of sending you to Settings. Always adds the app to the list.\n- Plugin pages can show a progress bar; the Speech page uses it for the model downloads.\n- Settings → Speech asks which languages you speak instead of one language hint, so a French note and an English one are both heard right on this computer, and it lists the models your account offers instead of asking you to type one.\n- Plugin pages can offer a select that takes several choices (`multiple: true`).\n- Settings → Speech: a play button beside the voice speaks a short sample in the browser with the chosen service and voice; nothing is saved. The old Test that wrote a file to Files is gone.\n- Plugin pages can play a sound a tool returns (`play: { mime, data }`), and a select can carry a small button of its own (`action`) that runs a tool with the form's unsaved values.\n- Choosing several things on a plugin page, the languages you speak for example, is done with chips and an Add list instead of a scrolling box.\n- A voice note on Telegram tells the agent which language you spoke in, so it answers in it.\n- Settings → Speech: with Kokoro, you choose a voice for each language you speak, English and French each with their own, and a reply picks the voice of its language.\n- Plugin page forms can lay fields out three to a row; Settings → Speech uses it for the speaking voices.\n- Voice on Telegram: a voice note is no longer echoed back as text; `/voice` chooses when to speak (spoken, always, off) and what to send (the voice note alone, or with the text), also on Settings → Speech. What is spoken is rewritten for the ear first: handles read as names, dates and amounts as words, links as their site, no markdown.\n\n### Added\n\n- First run and Add account offer Gemini: paste a Google AI key and buddi connects through Google's OpenAI-compatible endpoint, lists the models and picks the newest Pro. Gemini's context window and prices are known to the usage view.\n- Kokoro on this computer now speaks French, Spanish, Italian, Portuguese and Hindi with its own voices for those languages (espeak-ng, fetched with the model, does the pronunciation); a reply in one of them picks the matching voice. Japanese and Chinese still need a cloud speaker.\n- Home has a composer: write to your front desk straight from the first page, by keyboard or voice, and the conversation opens with the answer. `/` focuses the composer anywhere.\n- On the dashboard, a microphone in the composer turns what you say into text (Shift to send at once), and a speaker toggle reads each reply aloud, through the listening and speaking you chose in Settings → Speech.\n- Prompt caching: buddi marks the tool list, the instructions and the earlier conversation for Anthropic's cache and keys OpenAI's automatic cache by conversation, so a long conversation's repeated prompt is billed at the cached rate. Usage shows cached tokens separately and the cost estimate prices them.\n- Voice on Telegram: a voice note is transcribed and answered, spoken back as a voice note when you spoke (`/voice` chooses spoken, always or off). Listening and speaking can run on this computer: Settings → Speech installs Whisper and Kokoro (about 250 MB and 90 MB) with one button or `buddi speech install`; nothing leaves the machine then.\n- A speech plugin: agents can listen to an audio file (`speech.transcribe`) and answer with a voice (`speech.say`) through an OpenAI or OpenAI-compatible account chosen on Settings → Speech, with daily caps.\n- Under each reply, Copy and Read aloud. buddi's front desk can now make an audio file on request (`speech.say`), and an audio file in a conversation shows as a small player with a download link.\n\n### Fixed\n\n- Local Whisper and Kokoro now run in their own thread. A long reply read aloud used to freeze the whole of buddi, dashboard and Telegram included, until it finished.\n- Computer control: an app name with a typo now gets the close matches back (\"Did you mean Vocito?\"), and when your own window pushed the agent's app behind, the agent brings it forward again itself instead of asking you to."
21
21
  },
22
22
  "files": [
23
23
  "packages",