@withbuddi/buddi 0.1.0-pre.46 → 0.1.0-pre.48

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 (418) hide show
  1. package/extension/manifest.json +2 -2
  2. package/node_modules/@buddi/cli/dist/.tsbuildinfo +1 -1
  3. package/node_modules/@buddi/core/dist/.tsbuildinfo +1 -1
  4. package/node_modules/@buddi/core/dist/agents/frontmatter.d.ts +4 -4
  5. package/node_modules/@buddi/core/dist/host/build.d.ts +8 -1
  6. package/node_modules/@buddi/core/dist/host/build.d.ts.map +1 -1
  7. package/node_modules/@buddi/core/dist/host/build.js +33 -0
  8. package/node_modules/@buddi/core/dist/host/build.js.map +1 -1
  9. package/node_modules/@buddi/core/dist/host/types.d.ts +43 -0
  10. package/node_modules/@buddi/core/dist/host/types.d.ts.map +1 -1
  11. package/node_modules/@buddi/core/dist/index.d.ts +1 -0
  12. package/node_modules/@buddi/core/dist/index.d.ts.map +1 -1
  13. package/node_modules/@buddi/core/dist/index.js +1 -0
  14. package/node_modules/@buddi/core/dist/index.js.map +1 -1
  15. package/node_modules/@buddi/core/dist/onboarding/index.d.ts +1 -0
  16. package/node_modules/@buddi/core/dist/onboarding/index.d.ts.map +1 -1
  17. package/node_modules/@buddi/core/dist/onboarding/index.js +1 -0
  18. package/node_modules/@buddi/core/dist/onboarding/index.js.map +1 -1
  19. package/node_modules/@buddi/core/dist/plugin/index.d.ts +5 -1
  20. package/node_modules/@buddi/core/dist/plugin/index.d.ts.map +1 -1
  21. package/node_modules/@buddi/core/dist/plugin/index.js.map +1 -1
  22. package/node_modules/@buddi/core/dist/plugin/uses.d.ts +1 -1
  23. package/node_modules/@buddi/core/dist/plugin/uses.d.ts.map +1 -1
  24. package/node_modules/@buddi/core/dist/plugin/uses.js +2 -0
  25. package/node_modules/@buddi/core/dist/plugin/uses.js.map +1 -1
  26. package/node_modules/@buddi/core/dist/plugin/version.d.ts +1 -1
  27. package/node_modules/@buddi/core/dist/plugin/version.js +1 -1
  28. package/node_modules/@buddi/core/dist/runtimes/__fixtures__/server.d.ts +26 -0
  29. package/node_modules/@buddi/core/dist/runtimes/__fixtures__/server.d.ts.map +1 -0
  30. package/node_modules/@buddi/core/dist/runtimes/__fixtures__/server.js +93 -0
  31. package/node_modules/@buddi/core/dist/runtimes/__fixtures__/server.js.map +1 -0
  32. package/node_modules/@buddi/core/dist/runtimes/area.d.ts +22 -0
  33. package/node_modules/@buddi/core/dist/runtimes/area.d.ts.map +1 -0
  34. package/node_modules/@buddi/core/dist/runtimes/area.js +127 -0
  35. package/node_modules/@buddi/core/dist/runtimes/area.js.map +1 -0
  36. package/node_modules/@buddi/core/dist/runtimes/config.d.ts +54 -0
  37. package/node_modules/@buddi/core/dist/runtimes/config.d.ts.map +1 -0
  38. package/node_modules/@buddi/core/dist/runtimes/config.js +57 -0
  39. package/node_modules/@buddi/core/dist/runtimes/config.js.map +1 -0
  40. package/node_modules/@buddi/core/dist/runtimes/consent.d.ts +170 -0
  41. package/node_modules/@buddi/core/dist/runtimes/consent.d.ts.map +1 -0
  42. package/node_modules/@buddi/core/dist/runtimes/consent.js +205 -0
  43. package/node_modules/@buddi/core/dist/runtimes/consent.js.map +1 -0
  44. package/node_modules/@buddi/core/dist/runtimes/download.d.ts +95 -0
  45. package/node_modules/@buddi/core/dist/runtimes/download.d.ts.map +1 -0
  46. package/node_modules/@buddi/core/dist/runtimes/download.js +333 -0
  47. package/node_modules/@buddi/core/dist/runtimes/download.js.map +1 -0
  48. package/node_modules/@buddi/core/dist/runtimes/index.d.ts +10 -0
  49. package/node_modules/@buddi/core/dist/runtimes/index.d.ts.map +1 -0
  50. package/node_modules/@buddi/core/dist/runtimes/index.js +10 -0
  51. package/node_modules/@buddi/core/dist/runtimes/index.js.map +1 -0
  52. package/node_modules/@buddi/core/dist/runtimes/models.d.ts +78 -0
  53. package/node_modules/@buddi/core/dist/runtimes/models.d.ts.map +1 -0
  54. package/node_modules/@buddi/core/dist/runtimes/models.js +240 -0
  55. package/node_modules/@buddi/core/dist/runtimes/models.js.map +1 -0
  56. package/node_modules/@buddi/core/dist/runtimes/native.d.ts +49 -0
  57. package/node_modules/@buddi/core/dist/runtimes/native.d.ts.map +1 -0
  58. package/node_modules/@buddi/core/dist/runtimes/native.js +27 -0
  59. package/node_modules/@buddi/core/dist/runtimes/native.js.map +1 -0
  60. package/node_modules/@buddi/core/dist/runtimes/onnx.d.ts +87 -0
  61. package/node_modules/@buddi/core/dist/runtimes/onnx.d.ts.map +1 -0
  62. package/node_modules/@buddi/core/dist/runtimes/onnx.js +582 -0
  63. package/node_modules/@buddi/core/dist/runtimes/onnx.js.map +1 -0
  64. package/node_modules/@buddi/core/dist/runtimes/pins.d.ts +53 -0
  65. package/node_modules/@buddi/core/dist/runtimes/pins.d.ts.map +1 -0
  66. package/node_modules/@buddi/core/dist/runtimes/pins.js +75 -0
  67. package/node_modules/@buddi/core/dist/runtimes/pins.js.map +1 -0
  68. package/node_modules/@buddi/core/dist/scheduler/missions.d.ts +9 -3
  69. package/node_modules/@buddi/core/dist/scheduler/missions.d.ts.map +1 -1
  70. package/node_modules/@buddi/core/dist/scheduler/missions.js +12 -3
  71. package/node_modules/@buddi/core/dist/scheduler/missions.js.map +1 -1
  72. package/node_modules/@buddi/core/dist/scheduler/types.d.ts +8 -3
  73. package/node_modules/@buddi/core/dist/scheduler/types.d.ts.map +1 -1
  74. package/node_modules/@buddi/core/dist/scheduler/types.js +5 -1
  75. package/node_modules/@buddi/core/dist/scheduler/types.js.map +1 -1
  76. package/node_modules/@buddi/core/dist/secrets/approval.d.ts.map +1 -1
  77. package/node_modules/@buddi/core/dist/secrets/approval.js +3 -1
  78. package/node_modules/@buddi/core/dist/secrets/approval.js.map +1 -1
  79. package/node_modules/@buddi/core/dist/secrets/use.d.ts +3 -1
  80. package/node_modules/@buddi/core/dist/secrets/use.d.ts.map +1 -1
  81. package/node_modules/@buddi/core/dist/secrets/use.js +2 -0
  82. package/node_modules/@buddi/core/dist/secrets/use.js.map +1 -1
  83. package/node_modules/@buddi/core/dist/system-context.d.ts +6 -0
  84. package/node_modules/@buddi/core/dist/system-context.d.ts.map +1 -1
  85. package/node_modules/@buddi/core/dist/tools.d.ts +16 -0
  86. package/node_modules/@buddi/core/dist/tools.d.ts.map +1 -1
  87. package/node_modules/@buddi/core/dist/tools.js.map +1 -1
  88. package/node_modules/@buddi/core/dist/views.d.ts +8 -8
  89. package/node_modules/@buddi/core/migrations/079_mission_browser_owner.sql +7 -0
  90. package/node_modules/@buddi/gateway/dist/.tsbuildinfo +1 -1
  91. package/node_modules/@buddi/gateway/dist/agents/catalog.d.ts.map +1 -1
  92. package/node_modules/@buddi/gateway/dist/agents/catalog.js +6 -3
  93. package/node_modules/@buddi/gateway/dist/agents/catalog.js.map +1 -1
  94. package/node_modules/@buddi/gateway/dist/agents/catalogue-package.d.ts +24 -10
  95. package/node_modules/@buddi/gateway/dist/agents/catalogue-package.d.ts.map +1 -1
  96. package/node_modules/@buddi/gateway/dist/agents/catalogue-package.js +6 -2
  97. package/node_modules/@buddi/gateway/dist/agents/catalogue-package.js.map +1 -1
  98. package/node_modules/@buddi/gateway/dist/agents/platform-catalogue.d.ts +17 -4
  99. package/node_modules/@buddi/gateway/dist/agents/platform-catalogue.d.ts.map +1 -1
  100. package/node_modules/@buddi/gateway/dist/agents/platform-catalogue.js +25 -5
  101. package/node_modules/@buddi/gateway/dist/agents/platform-catalogue.js.map +1 -1
  102. package/node_modules/@buddi/gateway/dist/browser-host.d.ts +7 -0
  103. package/node_modules/@buddi/gateway/dist/browser-host.d.ts.map +1 -1
  104. package/node_modules/@buddi/gateway/dist/browser-host.js +22 -0
  105. package/node_modules/@buddi/gateway/dist/browser-host.js.map +1 -1
  106. package/node_modules/@buddi/gateway/dist/missions/agent-run.d.ts +6 -0
  107. package/node_modules/@buddi/gateway/dist/missions/agent-run.d.ts.map +1 -1
  108. package/node_modules/@buddi/gateway/dist/missions/agent-run.js +2 -1
  109. package/node_modules/@buddi/gateway/dist/missions/agent-run.js.map +1 -1
  110. package/node_modules/@buddi/gateway/dist/missions/chrome-scope.d.ts +91 -0
  111. package/node_modules/@buddi/gateway/dist/missions/chrome-scope.d.ts.map +1 -0
  112. package/node_modules/@buddi/gateway/dist/missions/chrome-scope.js +194 -0
  113. package/node_modules/@buddi/gateway/dist/missions/chrome-scope.js.map +1 -0
  114. package/node_modules/@buddi/gateway/dist/missions/execute.d.ts +20 -0
  115. package/node_modules/@buddi/gateway/dist/missions/execute.d.ts.map +1 -1
  116. package/node_modules/@buddi/gateway/dist/missions/execute.js +77 -5
  117. package/node_modules/@buddi/gateway/dist/missions/execute.js.map +1 -1
  118. package/node_modules/@buddi/gateway/dist/missions/reminders.d.ts +11 -2
  119. package/node_modules/@buddi/gateway/dist/missions/reminders.d.ts.map +1 -1
  120. package/node_modules/@buddi/gateway/dist/missions/reminders.js +55 -5
  121. package/node_modules/@buddi/gateway/dist/missions/reminders.js.map +1 -1
  122. package/node_modules/@buddi/gateway/dist/owner-notify.d.ts +0 -11
  123. package/node_modules/@buddi/gateway/dist/owner-notify.d.ts.map +1 -1
  124. package/node_modules/@buddi/gateway/dist/owner-notify.js +3 -1
  125. package/node_modules/@buddi/gateway/dist/owner-notify.js.map +1 -1
  126. package/node_modules/@buddi/gateway/dist/owner-profile-edit.d.ts +3 -2
  127. package/node_modules/@buddi/gateway/dist/owner-profile-edit.d.ts.map +1 -1
  128. package/node_modules/@buddi/gateway/dist/owner-profile-edit.js +4 -2
  129. package/node_modules/@buddi/gateway/dist/owner-profile-edit.js.map +1 -1
  130. package/node_modules/@buddi/gateway/dist/serve.d.ts.map +1 -1
  131. package/node_modules/@buddi/gateway/dist/serve.js +3 -2
  132. package/node_modules/@buddi/gateway/dist/serve.js.map +1 -1
  133. package/node_modules/@buddi/gateway/dist/system-context.d.ts +10 -2
  134. package/node_modules/@buddi/gateway/dist/system-context.d.ts.map +1 -1
  135. package/node_modules/@buddi/gateway/dist/system-context.js +24 -10
  136. package/node_modules/@buddi/gateway/dist/system-context.js.map +1 -1
  137. package/node_modules/@buddi/gateway/dist/telegram/approvals.d.ts +2 -1
  138. package/node_modules/@buddi/gateway/dist/telegram/approvals.d.ts.map +1 -1
  139. package/node_modules/@buddi/gateway/dist/telegram/approvals.js +16 -4
  140. package/node_modules/@buddi/gateway/dist/telegram/approvals.js.map +1 -1
  141. package/node_modules/@buddi/gateway/dist/web/api-routes.d.ts.map +1 -1
  142. package/node_modules/@buddi/gateway/dist/web/api-routes.js +8 -0
  143. package/node_modules/@buddi/gateway/dist/web/api-routes.js.map +1 -1
  144. package/node_modules/@buddi/gateway/dist/web/approval-ask.d.ts +8 -0
  145. package/node_modules/@buddi/gateway/dist/web/approval-ask.d.ts.map +1 -1
  146. package/node_modules/@buddi/gateway/dist/web/approval-ask.js +25 -0
  147. package/node_modules/@buddi/gateway/dist/web/approval-ask.js.map +1 -1
  148. package/node_modules/@buddi/gateway/dist/web/plugins.d.ts.map +1 -1
  149. package/node_modules/@buddi/gateway/dist/web/plugins.js +3 -1
  150. package/node_modules/@buddi/gateway/dist/web/plugins.js.map +1 -1
  151. package/node_modules/@buddi/gateway/dist/web/read.d.ts +2 -0
  152. package/node_modules/@buddi/gateway/dist/web/read.d.ts.map +1 -1
  153. package/node_modules/@buddi/gateway/dist/web/read.js +1 -0
  154. package/node_modules/@buddi/gateway/dist/web/read.js.map +1 -1
  155. package/node_modules/@buddi/gateway/dist/web/runtimes.d.ts +10 -0
  156. package/node_modules/@buddi/gateway/dist/web/runtimes.d.ts.map +1 -0
  157. package/node_modules/@buddi/gateway/dist/web/runtimes.js +25 -0
  158. package/node_modules/@buddi/gateway/dist/web/runtimes.js.map +1 -0
  159. package/node_modules/@buddi/gateway/dist/web/server.d.ts.map +1 -1
  160. package/node_modules/@buddi/gateway/dist/web/server.js +20 -2
  161. package/node_modules/@buddi/gateway/dist/web/server.js.map +1 -1
  162. package/node_modules/@buddi/gateway/dist/web/write.d.ts +11 -1
  163. package/node_modules/@buddi/gateway/dist/web/write.d.ts.map +1 -1
  164. package/node_modules/@buddi/gateway/dist/web/write.js +18 -1
  165. package/node_modules/@buddi/gateway/dist/web/write.js.map +1 -1
  166. package/node_modules/@buddi/install/dist/.tsbuildinfo +1 -1
  167. package/node_modules/@buddi/runtime/dist/.tsbuildinfo +1 -1
  168. package/node_modules/@buddi/runtime/dist/delegate.d.ts.map +1 -1
  169. package/node_modules/@buddi/runtime/dist/delegate.js +1 -0
  170. package/node_modules/@buddi/runtime/dist/delegate.js.map +1 -1
  171. package/node_modules/@buddi/runtime/dist/index.d.ts +1 -0
  172. package/node_modules/@buddi/runtime/dist/index.d.ts.map +1 -1
  173. package/node_modules/@buddi/runtime/dist/index.js +1 -0
  174. package/node_modules/@buddi/runtime/dist/index.js.map +1 -1
  175. package/node_modules/@buddi/runtime/dist/language.d.ts +65 -0
  176. package/node_modules/@buddi/runtime/dist/language.d.ts.map +1 -0
  177. package/node_modules/@buddi/runtime/dist/language.js +191 -0
  178. package/node_modules/@buddi/runtime/dist/language.js.map +1 -0
  179. package/node_modules/@buddi/runtime/dist/loop.d.ts +9 -1
  180. package/node_modules/@buddi/runtime/dist/loop.d.ts.map +1 -1
  181. package/node_modules/@buddi/runtime/dist/loop.js +78 -4
  182. package/node_modules/@buddi/runtime/dist/loop.js.map +1 -1
  183. package/node_modules/@buddi/tool-artifacts/dist/.tsbuildinfo +1 -1
  184. package/node_modules/@buddi/tool-browser/dist/.tsbuildinfo +1 -1
  185. package/node_modules/@buddi/tool-browser/dist/controller.d.ts +5 -0
  186. package/node_modules/@buddi/tool-browser/dist/controller.d.ts.map +1 -1
  187. package/node_modules/@buddi/tool-browser/dist/controller.js +41 -5
  188. package/node_modules/@buddi/tool-browser/dist/controller.js.map +1 -1
  189. package/node_modules/@buddi/tool-browser/dist/routes.d.ts +6 -0
  190. package/node_modules/@buddi/tool-browser/dist/routes.d.ts.map +1 -1
  191. package/node_modules/@buddi/tool-browser/dist/routes.js +2 -2
  192. package/node_modules/@buddi/tool-browser/dist/routes.js.map +1 -1
  193. package/node_modules/@buddi/tool-email/dist/.tsbuildinfo +1 -1
  194. package/node_modules/@buddi/tool-host/dist/.tsbuildinfo +1 -1
  195. package/node_modules/@buddi/tool-mcp/dist/.tsbuildinfo +1 -1
  196. package/node_modules/@buddi/tool-memory/dist/.tsbuildinfo +1 -1
  197. package/node_modules/@buddi/tool-web/dist/.tsbuildinfo +1 -1
  198. package/node_modules/express-rate-limit/dist/index.cjs +9 -7
  199. package/node_modules/express-rate-limit/dist/index.mjs +9 -7
  200. package/node_modules/express-rate-limit/package.json +9 -9
  201. package/node_modules/imapflow/CHANGELOG.md +8 -0
  202. package/node_modules/imapflow/dist/cjs/commands/copyuid-parser.js +16 -2
  203. package/node_modules/imapflow/dist/cjs/handler/imap-compiler.js +26 -19
  204. package/node_modules/imapflow/dist/cjs/handler/token-parser.js +127 -51
  205. package/node_modules/imapflow/dist/cjs/package-info.d.ts +1 -1
  206. package/node_modules/imapflow/dist/cjs/package-info.js +1 -1
  207. package/node_modules/imapflow/dist/cjs/search-compiler.js +7 -3
  208. package/node_modules/imapflow/dist/esm/commands/copyuid-parser.js +16 -2
  209. package/node_modules/imapflow/dist/esm/handler/imap-compiler.js +26 -19
  210. package/node_modules/imapflow/dist/esm/handler/token-parser.js +127 -51
  211. package/node_modules/imapflow/dist/esm/package-info.d.ts +1 -1
  212. package/node_modules/imapflow/dist/esm/package-info.js +1 -1
  213. package/node_modules/imapflow/dist/esm/search-compiler.js +7 -3
  214. package/node_modules/imapflow/package.json +3 -2
  215. package/package.json +2 -2
  216. package/packages/cli/dist/.tsbuildinfo +1 -1
  217. package/packages/core/dist/.tsbuildinfo +1 -1
  218. package/packages/core/dist/agents/frontmatter.d.ts +4 -4
  219. package/packages/core/dist/host/build.d.ts +8 -1
  220. package/packages/core/dist/host/build.d.ts.map +1 -1
  221. package/packages/core/dist/host/build.js +33 -0
  222. package/packages/core/dist/host/build.js.map +1 -1
  223. package/packages/core/dist/host/types.d.ts +43 -0
  224. package/packages/core/dist/host/types.d.ts.map +1 -1
  225. package/packages/core/dist/index.d.ts +1 -0
  226. package/packages/core/dist/index.d.ts.map +1 -1
  227. package/packages/core/dist/index.js +1 -0
  228. package/packages/core/dist/index.js.map +1 -1
  229. package/packages/core/dist/onboarding/index.d.ts +1 -0
  230. package/packages/core/dist/onboarding/index.d.ts.map +1 -1
  231. package/packages/core/dist/onboarding/index.js +1 -0
  232. package/packages/core/dist/onboarding/index.js.map +1 -1
  233. package/packages/core/dist/plugin/index.d.ts +5 -1
  234. package/packages/core/dist/plugin/index.d.ts.map +1 -1
  235. package/packages/core/dist/plugin/index.js.map +1 -1
  236. package/packages/core/dist/plugin/uses.d.ts +1 -1
  237. package/packages/core/dist/plugin/uses.d.ts.map +1 -1
  238. package/packages/core/dist/plugin/uses.js +2 -0
  239. package/packages/core/dist/plugin/uses.js.map +1 -1
  240. package/packages/core/dist/plugin/version.d.ts +1 -1
  241. package/packages/core/dist/plugin/version.js +1 -1
  242. package/packages/core/dist/runtimes/__fixtures__/server.d.ts +26 -0
  243. package/packages/core/dist/runtimes/__fixtures__/server.d.ts.map +1 -0
  244. package/packages/core/dist/runtimes/__fixtures__/server.js +93 -0
  245. package/packages/core/dist/runtimes/__fixtures__/server.js.map +1 -0
  246. package/packages/core/dist/runtimes/area.d.ts +22 -0
  247. package/packages/core/dist/runtimes/area.d.ts.map +1 -0
  248. package/packages/core/dist/runtimes/area.js +127 -0
  249. package/packages/core/dist/runtimes/area.js.map +1 -0
  250. package/packages/core/dist/runtimes/config.d.ts +54 -0
  251. package/packages/core/dist/runtimes/config.d.ts.map +1 -0
  252. package/packages/core/dist/runtimes/config.js +57 -0
  253. package/packages/core/dist/runtimes/config.js.map +1 -0
  254. package/packages/core/dist/runtimes/consent.d.ts +170 -0
  255. package/packages/core/dist/runtimes/consent.d.ts.map +1 -0
  256. package/packages/core/dist/runtimes/consent.js +205 -0
  257. package/packages/core/dist/runtimes/consent.js.map +1 -0
  258. package/packages/core/dist/runtimes/download.d.ts +95 -0
  259. package/packages/core/dist/runtimes/download.d.ts.map +1 -0
  260. package/packages/core/dist/runtimes/download.js +333 -0
  261. package/packages/core/dist/runtimes/download.js.map +1 -0
  262. package/packages/core/dist/runtimes/index.d.ts +10 -0
  263. package/packages/core/dist/runtimes/index.d.ts.map +1 -0
  264. package/packages/core/dist/runtimes/index.js +10 -0
  265. package/packages/core/dist/runtimes/index.js.map +1 -0
  266. package/packages/core/dist/runtimes/models.d.ts +78 -0
  267. package/packages/core/dist/runtimes/models.d.ts.map +1 -0
  268. package/packages/core/dist/runtimes/models.js +240 -0
  269. package/packages/core/dist/runtimes/models.js.map +1 -0
  270. package/packages/core/dist/runtimes/native.d.ts +49 -0
  271. package/packages/core/dist/runtimes/native.d.ts.map +1 -0
  272. package/packages/core/dist/runtimes/native.js +27 -0
  273. package/packages/core/dist/runtimes/native.js.map +1 -0
  274. package/packages/core/dist/runtimes/onnx.d.ts +87 -0
  275. package/packages/core/dist/runtimes/onnx.d.ts.map +1 -0
  276. package/packages/core/dist/runtimes/onnx.js +582 -0
  277. package/packages/core/dist/runtimes/onnx.js.map +1 -0
  278. package/packages/core/dist/runtimes/pins.d.ts +53 -0
  279. package/packages/core/dist/runtimes/pins.d.ts.map +1 -0
  280. package/packages/core/dist/runtimes/pins.js +75 -0
  281. package/packages/core/dist/runtimes/pins.js.map +1 -0
  282. package/packages/core/dist/scheduler/missions.d.ts +9 -3
  283. package/packages/core/dist/scheduler/missions.d.ts.map +1 -1
  284. package/packages/core/dist/scheduler/missions.js +12 -3
  285. package/packages/core/dist/scheduler/missions.js.map +1 -1
  286. package/packages/core/dist/scheduler/types.d.ts +8 -3
  287. package/packages/core/dist/scheduler/types.d.ts.map +1 -1
  288. package/packages/core/dist/scheduler/types.js +5 -1
  289. package/packages/core/dist/scheduler/types.js.map +1 -1
  290. package/packages/core/dist/secrets/approval.d.ts.map +1 -1
  291. package/packages/core/dist/secrets/approval.js +3 -1
  292. package/packages/core/dist/secrets/approval.js.map +1 -1
  293. package/packages/core/dist/secrets/use.d.ts +3 -1
  294. package/packages/core/dist/secrets/use.d.ts.map +1 -1
  295. package/packages/core/dist/secrets/use.js +2 -0
  296. package/packages/core/dist/secrets/use.js.map +1 -1
  297. package/packages/core/dist/system-context.d.ts +6 -0
  298. package/packages/core/dist/system-context.d.ts.map +1 -1
  299. package/packages/core/dist/tools.d.ts +16 -0
  300. package/packages/core/dist/tools.d.ts.map +1 -1
  301. package/packages/core/dist/tools.js.map +1 -1
  302. package/packages/core/dist/views.d.ts +8 -8
  303. package/packages/core/migrations/079_mission_browser_owner.sql +7 -0
  304. package/packages/gateway/dist/.tsbuildinfo +1 -1
  305. package/packages/gateway/dist/agents/catalog.d.ts.map +1 -1
  306. package/packages/gateway/dist/agents/catalog.js +6 -3
  307. package/packages/gateway/dist/agents/catalog.js.map +1 -1
  308. package/packages/gateway/dist/agents/catalogue-package.d.ts +24 -10
  309. package/packages/gateway/dist/agents/catalogue-package.d.ts.map +1 -1
  310. package/packages/gateway/dist/agents/catalogue-package.js +6 -2
  311. package/packages/gateway/dist/agents/catalogue-package.js.map +1 -1
  312. package/packages/gateway/dist/agents/platform-catalogue.d.ts +17 -4
  313. package/packages/gateway/dist/agents/platform-catalogue.d.ts.map +1 -1
  314. package/packages/gateway/dist/agents/platform-catalogue.js +25 -5
  315. package/packages/gateway/dist/agents/platform-catalogue.js.map +1 -1
  316. package/packages/gateway/dist/browser-host.d.ts +7 -0
  317. package/packages/gateway/dist/browser-host.d.ts.map +1 -1
  318. package/packages/gateway/dist/browser-host.js +22 -0
  319. package/packages/gateway/dist/browser-host.js.map +1 -1
  320. package/packages/gateway/dist/missions/agent-run.d.ts +6 -0
  321. package/packages/gateway/dist/missions/agent-run.d.ts.map +1 -1
  322. package/packages/gateway/dist/missions/agent-run.js +2 -1
  323. package/packages/gateway/dist/missions/agent-run.js.map +1 -1
  324. package/packages/gateway/dist/missions/chrome-scope.d.ts +91 -0
  325. package/packages/gateway/dist/missions/chrome-scope.d.ts.map +1 -0
  326. package/packages/gateway/dist/missions/chrome-scope.js +194 -0
  327. package/packages/gateway/dist/missions/chrome-scope.js.map +1 -0
  328. package/packages/gateway/dist/missions/execute.d.ts +20 -0
  329. package/packages/gateway/dist/missions/execute.d.ts.map +1 -1
  330. package/packages/gateway/dist/missions/execute.js +77 -5
  331. package/packages/gateway/dist/missions/execute.js.map +1 -1
  332. package/packages/gateway/dist/missions/reminders.d.ts +11 -2
  333. package/packages/gateway/dist/missions/reminders.d.ts.map +1 -1
  334. package/packages/gateway/dist/missions/reminders.js +55 -5
  335. package/packages/gateway/dist/missions/reminders.js.map +1 -1
  336. package/packages/gateway/dist/owner-notify.d.ts +0 -11
  337. package/packages/gateway/dist/owner-notify.d.ts.map +1 -1
  338. package/packages/gateway/dist/owner-notify.js +3 -1
  339. package/packages/gateway/dist/owner-notify.js.map +1 -1
  340. package/packages/gateway/dist/owner-profile-edit.d.ts +3 -2
  341. package/packages/gateway/dist/owner-profile-edit.d.ts.map +1 -1
  342. package/packages/gateway/dist/owner-profile-edit.js +4 -2
  343. package/packages/gateway/dist/owner-profile-edit.js.map +1 -1
  344. package/packages/gateway/dist/serve.d.ts.map +1 -1
  345. package/packages/gateway/dist/serve.js +3 -2
  346. package/packages/gateway/dist/serve.js.map +1 -1
  347. package/packages/gateway/dist/system-context.d.ts +10 -2
  348. package/packages/gateway/dist/system-context.d.ts.map +1 -1
  349. package/packages/gateway/dist/system-context.js +24 -10
  350. package/packages/gateway/dist/system-context.js.map +1 -1
  351. package/packages/gateway/dist/telegram/approvals.d.ts +2 -1
  352. package/packages/gateway/dist/telegram/approvals.d.ts.map +1 -1
  353. package/packages/gateway/dist/telegram/approvals.js +16 -4
  354. package/packages/gateway/dist/telegram/approvals.js.map +1 -1
  355. package/packages/gateway/dist/web/api-routes.d.ts.map +1 -1
  356. package/packages/gateway/dist/web/api-routes.js +8 -0
  357. package/packages/gateway/dist/web/api-routes.js.map +1 -1
  358. package/packages/gateway/dist/web/approval-ask.d.ts +8 -0
  359. package/packages/gateway/dist/web/approval-ask.d.ts.map +1 -1
  360. package/packages/gateway/dist/web/approval-ask.js +25 -0
  361. package/packages/gateway/dist/web/approval-ask.js.map +1 -1
  362. package/packages/gateway/dist/web/plugins.d.ts.map +1 -1
  363. package/packages/gateway/dist/web/plugins.js +3 -1
  364. package/packages/gateway/dist/web/plugins.js.map +1 -1
  365. package/packages/gateway/dist/web/read.d.ts +2 -0
  366. package/packages/gateway/dist/web/read.d.ts.map +1 -1
  367. package/packages/gateway/dist/web/read.js +1 -0
  368. package/packages/gateway/dist/web/read.js.map +1 -1
  369. package/packages/gateway/dist/web/runtimes.d.ts +10 -0
  370. package/packages/gateway/dist/web/runtimes.d.ts.map +1 -0
  371. package/packages/gateway/dist/web/runtimes.js +25 -0
  372. package/packages/gateway/dist/web/runtimes.js.map +1 -0
  373. package/packages/gateway/dist/web/server.d.ts.map +1 -1
  374. package/packages/gateway/dist/web/server.js +20 -2
  375. package/packages/gateway/dist/web/server.js.map +1 -1
  376. package/packages/gateway/dist/web/write.d.ts +11 -1
  377. package/packages/gateway/dist/web/write.d.ts.map +1 -1
  378. package/packages/gateway/dist/web/write.js +18 -1
  379. package/packages/gateway/dist/web/write.js.map +1 -1
  380. package/packages/install/dist/.tsbuildinfo +1 -1
  381. package/packages/runtime/dist/.tsbuildinfo +1 -1
  382. package/packages/runtime/dist/delegate.d.ts.map +1 -1
  383. package/packages/runtime/dist/delegate.js +1 -0
  384. package/packages/runtime/dist/delegate.js.map +1 -1
  385. package/packages/runtime/dist/index.d.ts +1 -0
  386. package/packages/runtime/dist/index.d.ts.map +1 -1
  387. package/packages/runtime/dist/index.js +1 -0
  388. package/packages/runtime/dist/index.js.map +1 -1
  389. package/packages/runtime/dist/language.d.ts +65 -0
  390. package/packages/runtime/dist/language.d.ts.map +1 -0
  391. package/packages/runtime/dist/language.js +191 -0
  392. package/packages/runtime/dist/language.js.map +1 -0
  393. package/packages/runtime/dist/loop.d.ts +9 -1
  394. package/packages/runtime/dist/loop.d.ts.map +1 -1
  395. package/packages/runtime/dist/loop.js +78 -4
  396. package/packages/runtime/dist/loop.js.map +1 -1
  397. package/packages/tools/artifacts/dist/.tsbuildinfo +1 -1
  398. package/packages/tools/browser/dist/.tsbuildinfo +1 -1
  399. package/packages/tools/browser/dist/controller.d.ts +5 -0
  400. package/packages/tools/browser/dist/controller.d.ts.map +1 -1
  401. package/packages/tools/browser/dist/controller.js +41 -5
  402. package/packages/tools/browser/dist/controller.js.map +1 -1
  403. package/packages/tools/browser/dist/routes.d.ts +6 -0
  404. package/packages/tools/browser/dist/routes.d.ts.map +1 -1
  405. package/packages/tools/browser/dist/routes.js +2 -2
  406. package/packages/tools/browser/dist/routes.js.map +1 -1
  407. package/packages/tools/email/dist/.tsbuildinfo +1 -1
  408. package/packages/tools/host/dist/.tsbuildinfo +1 -1
  409. package/packages/tools/mcp/dist/.tsbuildinfo +1 -1
  410. package/packages/tools/memory/dist/.tsbuildinfo +1 -1
  411. package/packages/tools/web/dist/.tsbuildinfo +1 -1
  412. package/packages/web/dist/assets/{index-C2yWZED2.css → index-CkzsX0YQ.css} +1 -1
  413. package/packages/web/dist/assets/index-Dg5Dl0iF.js +150 -0
  414. package/packages/web/dist/assets/{lottie_light-CVXFbeEK.js → lottie_light-vNpJ-Svm.js} +1 -1
  415. package/packages/web/dist/build.json +1 -1
  416. package/packages/web/dist/index.html +2 -2
  417. package/packages/web/dist/precache.json +4 -4
  418. package/packages/web/dist/assets/index-CIhME8Ui.js +0 -150
@@ -7,7 +7,6 @@ const STATE_NORMAL = 0x003;
7
7
  const STATE_PARTIAL = 0x004;
8
8
  const STATE_SEQUENCE = 0x005;
9
9
  const STATE_STRING = 0x006;
10
- const RE_DIGITS = /^\d+$/;
11
10
  const RE_SINGLE_DIGIT = /^\d$/;
12
11
  // Prevents stack overflow from maliciously crafted deeply-nested IMAP input (e.g., (((((...))))))
13
12
  const MAX_NODE_DEPTH = 25;
@@ -169,6 +168,63 @@ export class TokenParser {
169
168
  i++;
170
169
  }
171
170
  };
171
+ // Whether chr is the closing delimiter of node: ")" ends a LIST, "]" ends a SECTION
172
+ const closesNode = (c, node) => !!node && ((c === ')' && node.type === 'LIST') || (c === ']' && node.type === 'SECTION'));
173
+ // Facts about the ATOM, SEQUENCE or PARTIAL token being read, kept up to date as its
174
+ // characters are appended. Reading them back from the value instead (value.at(-1),
175
+ // value.includes('*'), a regex test) makes V8 flatten the string built with += on every
176
+ // character, which is quadratic in the token length, and the server decides that length:
177
+ // a 600 KB ESEARCH result took seconds of event loop time
178
+ let tokenLength = 0;
179
+ let tokenLast = '';
180
+ let tokenPrev = '';
181
+ let tokenDigitsOnly = true;
182
+ let tokenHasStar = false;
183
+ let tokenHasDot = false;
184
+ const appendToToken = (c) => {
185
+ this.currentNode.value += c;
186
+ tokenLength++;
187
+ tokenPrev = tokenLast;
188
+ tokenLast = c;
189
+ tokenDigitsOnly = tokenDigitsOnly && RE_SINGLE_DIGIT.test(c);
190
+ tokenHasStar = tokenHasStar || c === '*';
191
+ tokenHasDot = tokenHasDot || c === '.';
192
+ };
193
+ // A digit-led token is only a guess at a sequence set. ":" and "," are ATOM-CHARs, so a
194
+ // server sends a mailbox name, keyword or label such as "2024:Q1" or "1,a" unquoted, and
195
+ // rejecting it would drop the whole response line: the mailbox missing from LIST, the
196
+ // message missing from FETCH. When the sequence grammar breaks, such a token is read on as
197
+ // an atom, and the atom rules decide whether the current character is acceptable. A token
198
+ // holding "*" can not be an atom ("*" is not an ATOM-CHAR), so it keeps the sequence errors
199
+ const continueAsAtom = () => {
200
+ this.currentNode.type = 'ATOM';
201
+ this.state = STATE_ATOM;
202
+ // read the current character again, in STATE_ATOM
203
+ i--;
204
+ };
205
+ // Starts the value of the current node as a new token, with its first character if any
206
+ const startToken = (first) => {
207
+ this.currentNode.value = '';
208
+ tokenLength = 0;
209
+ tokenLast = tokenPrev = '';
210
+ tokenDigitsOnly = true;
211
+ tokenHasStar = tokenHasDot = false;
212
+ if (first) {
213
+ appendToToken(first);
214
+ }
215
+ };
216
+ // ImapStream supplies one buffer per literal marker it framed, {0} included. A marker
217
+ // without a buffer means the line and its literals do not match up, so fail with a parser
218
+ // error instead of reading a missing buffer or shifting every later literal by one
219
+ const takeLiteral = (literals) => {
220
+ if (!literals.length) {
221
+ let error = new Error(`Literal without data at position ${this.pos + i} [E35]`);
222
+ error.code = 'ParserError35';
223
+ error.parserContext = { input: this.str, pos: this.pos + i, chr };
224
+ throw error;
225
+ }
226
+ return literals.shift();
227
+ };
172
228
  // Any ATOM supported char starts a new Atom sequence, otherwise throw an error
173
229
  // Allow \ as the first char for atom to support system flags
174
230
  // Allow % to support LIST '' %
@@ -184,7 +240,7 @@ export class TokenParser {
184
240
  }
185
241
  this.currentNode = this.createNode(this.currentNode, this.pos + i);
186
242
  this.currentNode.type = 'ATOM';
187
- this.currentNode.value = chr;
243
+ startToken(chr);
188
244
  this.state = STATE_ATOM;
189
245
  };
190
246
  for (i = 0, len = this.str.length; i < len; i++) {
@@ -239,12 +295,13 @@ export class TokenParser {
239
295
  if (this.str.charAt(i - 1) !== ']') {
240
296
  this.currentNode = this.createNode(this.currentNode, this.pos + i);
241
297
  this.currentNode.type = 'ATOM';
242
- this.currentNode.value = chr;
298
+ startToken(chr);
243
299
  this.state = STATE_ATOM;
244
300
  }
245
301
  else {
246
302
  this.currentNode = this.createNode(this.currentNode, this.pos + i);
247
303
  this.currentNode.type = 'PARTIAL';
304
+ startToken();
248
305
  this.state = STATE_PARTIAL;
249
306
  this.currentNode.isClosed = false;
250
307
  }
@@ -254,12 +311,14 @@ export class TokenParser {
254
311
  case '~': {
255
312
  let nextChr = this.str.charAt(i + 1);
256
313
  if (nextChr !== '{') {
257
- if (imapFormalSyntax['ATOM-CHAR']().includes(nextChr)) {
258
- // '~' not followed by '{' but followed by an ATOM char: treat as ATOM
259
- this.currentNode = this.createNode(this.currentNode, this.pos + i);
260
- this.currentNode.type = 'ATOM';
261
- this.currentNode.value = chr;
262
- this.state = STATE_ATOM;
314
+ // '~' is an ATOM-CHAR itself, so when it does not start a literal8
315
+ // it starts an atom, including the one-character atom "~" that a
316
+ // space, the end of the line or a closing delimiter ends
317
+ if (imapFormalSyntax['ATOM-CHAR']().includes(nextChr) ||
318
+ nextChr === ' ' ||
319
+ nextChr === '' ||
320
+ closesNode(nextChr, this.currentNode)) {
321
+ startAtom();
263
322
  break;
264
323
  }
265
324
  let error = new Error(`Unexpected literal8 marker at position ${this.pos + i} [E12]`);
@@ -285,7 +344,7 @@ export class TokenParser {
285
344
  case '*':
286
345
  this.currentNode = this.createNode(this.currentNode, this.pos + i);
287
346
  this.currentNode.type = 'SEQUENCE';
288
- this.currentNode.value = chr;
347
+ startToken(chr);
289
348
  this.currentNode.isClosed = false;
290
349
  this.state = STATE_SEQUENCE;
291
350
  break;
@@ -366,8 +425,7 @@ export class TokenParser {
366
425
  break;
367
426
  }
368
427
  // ')' or ']' terminates the atom AND closes the enclosing LIST or SECTION
369
- if (this.currentNode.parentNode &&
370
- ((chr === ')' && this.currentNode.parentNode.type === 'LIST') || (chr === ']' && this.currentNode.parentNode.type === 'SECTION'))) {
428
+ if (closesNode(chr, this.currentNode.parentNode)) {
371
429
  this.currentNode.endPos = this.pos + i - 1;
372
430
  this.currentNode = this.currentNode.parentNode;
373
431
  this.currentNode.isClosed = true;
@@ -403,14 +461,16 @@ export class TokenParser {
403
461
  }
404
462
  // If the atom so far is all digits and we see ',' or ':', it is actually
405
463
  // a sequence set (e.g., "1:5" or "1,3,5"), so reclassify and switch state
406
- if ((chr === ',' || chr === ':') && RE_DIGITS.test(this.currentNode.value)) {
464
+ if ((chr === ',' || chr === ':') && tokenLength && tokenDigitsOnly) {
407
465
  this.currentNode.type = 'SEQUENCE';
408
466
  this.currentNode.isClosed = true;
409
467
  this.state = STATE_SEQUENCE;
410
468
  }
411
469
  // [ starts a section group for this element
412
470
  // Allowed only for selected elements, otherwise falls through to regular ATOM processing
413
- if (chr === '[' && ['BODY', 'BODY.PEEK', 'BINARY', 'BINARY.PEEK'].includes(this.currentNode.value.toUpperCase())) {
471
+ if (chr === '[' &&
472
+ tokenLength <= 11 &&
473
+ ['BODY', 'BODY.PEEK', 'BINARY', 'BINARY.PEEK'].includes(this.currentNode.value.toUpperCase())) {
414
474
  this.currentNode.endPos = this.pos + i;
415
475
  this.currentNode = this.createNode(this.currentNode.parentNode, this.pos + i);
416
476
  this.currentNode.type = 'SECTION';
@@ -435,7 +495,7 @@ export class TokenParser {
435
495
  error.parserContext = { input: this.str, pos: this.pos + i, chr };
436
496
  throw error;
437
497
  }
438
- this.currentNode.value += chr;
498
+ appendToToken(chr);
439
499
  break;
440
500
  case STATE_STRING:
441
501
  // DQUOTE ends the string sequence
@@ -462,7 +522,7 @@ export class TokenParser {
462
522
  break;
463
523
  case STATE_PARTIAL:
464
524
  if (chr === '>') {
465
- if (this.currentNode.value.at(-1) === '.') {
525
+ if (tokenLast === '.') {
466
526
  let error = new Error(`Unexpected end of partial at position ${this.pos + i} [E19]`);
467
527
  error.code = 'ParserError19';
468
528
  error.parserContext = { input: this.str, pos: this.pos + i, chr };
@@ -475,7 +535,7 @@ export class TokenParser {
475
535
  checkSP();
476
536
  break;
477
537
  }
478
- if (chr === '.' && (this.currentNode.value === '' || this.currentNode.value.includes('.'))) {
538
+ if (chr === '.' && (!tokenLength || tokenHasDot)) {
479
539
  let error = new Error(`Unexpected partial separator . at position ${this.pos + i} [E20]`);
480
540
  error.code = 'ParserError20';
481
541
  error.parserContext = { input: this.str, pos: this.pos + i, chr };
@@ -487,13 +547,13 @@ export class TokenParser {
487
547
  error.parserContext = { input: this.str, pos: this.pos + i, chr };
488
548
  throw error;
489
549
  }
490
- if ((this.currentNode.value === '0' || this.currentNode.value.endsWith('.0')) && chr !== '.') {
550
+ if (tokenLast === '0' && (tokenLength === 1 || tokenPrev === '.') && chr !== '.') {
491
551
  let error = new Error(`Invalid partial at position ${this.pos + i} [E22: ${JSON.stringify(chr)}]`);
492
552
  error.code = 'ParserError22';
493
553
  error.parserContext = { input: this.str, pos: this.pos + i, chr };
494
554
  throw error;
495
555
  }
496
- this.currentNode.value += chr;
556
+ appendToToken(chr);
497
557
  break;
498
558
  case STATE_LITERAL:
499
559
  if (this.currentNode.started) {
@@ -544,12 +604,10 @@ export class TokenParser {
544
604
  if (!this.currentNode.literalLength) {
545
605
  // special case where literal content length is 0
546
606
  // close the node right away, do not wait for additional input
547
- if (this.options.literals && this.options.literals.length) {
548
- // ImapStream queues a Buffer for every literal marker it
549
- // extracts, including {0} - consume the queue entry so
550
- // subsequent literals in the same response stay aligned
551
- // with their markers instead of shifting by one
552
- this.currentNode.value = this.options.literals.shift();
607
+ if (this.options.literals) {
608
+ // consume the queue entry of the {0} marker too, so later
609
+ // literals in the same response stay aligned with their markers
610
+ this.currentNode.value = takeLiteral(this.options.literals);
553
611
  }
554
612
  this.currentNode.endPos = this.pos + i;
555
613
  this.currentNode.isClosed = true;
@@ -559,7 +617,7 @@ export class TokenParser {
559
617
  }
560
618
  else if (this.options.literals) {
561
619
  // use the next precached literal values
562
- this.currentNode.value = this.options.literals.shift();
620
+ this.currentNode.value = takeLiteral(this.options.literals);
563
621
  // only APPEND arguments are kept as Buffers
564
622
  /*
565
623
  if ((this.parent.command || '').toString().toUpperCase() !== 'APPEND') {
@@ -614,19 +672,24 @@ export class TokenParser {
614
672
  }
615
673
  this.currentNode.literalLength = (this.currentNode.literalLength || '') + chr;
616
674
  break;
617
- case STATE_SEQUENCE:
618
- // space finishes the sequence set
619
- if (chr === ' ') {
620
- if (!RE_SINGLE_DIGIT.test(this.currentNode.value.at(-1)) && this.currentNode.value.at(-1) !== '*') {
621
- let error = new Error(`Unexpected whitespace at position ${this.pos + i} [E27]`);
675
+ case STATE_SEQUENCE: {
676
+ // A space ends the sequence set, and so does the closing delimiter of the
677
+ // enclosing list or section ("PARTIAL (1:100 5,7,9)", "[COPYUID 1 1:3 4,5]")
678
+ let closesParent = closesNode(chr, this.currentNode.parentNode);
679
+ if (chr === ' ' || closesParent) {
680
+ if (!RE_SINGLE_DIGIT.test(tokenLast) && tokenLast !== '*') {
681
+ if (!tokenHasStar) {
682
+ // a dangling separator, "10:" or "1,"
683
+ continueAsAtom();
684
+ break;
685
+ }
686
+ let error = new Error(`Unexpected end of sequence at position ${this.pos + i} [E27: ${JSON.stringify(chr)}]`);
622
687
  error.code = 'ParserError27';
623
688
  error.parserContext = { input: this.str, pos: this.pos + i, chr };
624
689
  throw error;
625
690
  }
626
- if (this.currentNode.value !== '*' &&
627
- this.currentNode.value.at(-1) === '*' &&
628
- this.currentNode.value.at(-2) !== ':') {
629
- let error = new Error(`Unexpected whitespace at position ${this.pos + i} [E28]`);
691
+ if (this.currentNode.value !== '*' && tokenLast === '*' && tokenPrev !== ':') {
692
+ let error = new Error(`Unexpected end of sequence at position ${this.pos + i} [E28: ${JSON.stringify(chr)}]`);
630
693
  error.code = 'ParserError28';
631
694
  error.parserContext = { input: this.str, pos: this.pos + i, chr };
632
695
  throw error;
@@ -635,20 +698,20 @@ export class TokenParser {
635
698
  this.currentNode.endPos = this.pos + i - 1;
636
699
  this.currentNode = this.currentNode.parentNode;
637
700
  this.state = STATE_NORMAL;
638
- break;
639
- }
640
- else if (this.currentNode.parentNode && chr === ']' && this.currentNode.parentNode.type === 'SECTION') {
641
- this.currentNode.endPos = this.pos + i - 1;
642
- this.currentNode = this.currentNode.parentNode;
643
- this.currentNode.isClosed = true;
644
- this.currentNode.endPos = this.pos + i;
645
- this.currentNode = this.currentNode.parentNode;
646
- this.state = STATE_NORMAL;
647
- checkSP();
701
+ if (closesParent) {
702
+ this.currentNode.isClosed = true;
703
+ this.currentNode.endPos = this.pos + i;
704
+ this.currentNode = this.currentNode.parentNode;
705
+ checkSP();
706
+ }
648
707
  break;
649
708
  }
650
709
  if (chr === ':') {
651
- if (!RE_SINGLE_DIGIT.test(this.currentNode.value.at(-1)) && this.currentNode.value.at(-1) !== '*') {
710
+ if (!RE_SINGLE_DIGIT.test(tokenLast) && tokenLast !== '*') {
711
+ if (!tokenHasStar) {
712
+ continueAsAtom();
713
+ break;
714
+ }
652
715
  let error = new Error(`Unexpected range separator : at position ${this.pos + i} [E29]`);
653
716
  error.code = 'ParserError29';
654
717
  error.parserContext = { input: this.str, pos: this.pos + i, chr };
@@ -656,7 +719,7 @@ export class TokenParser {
656
719
  }
657
720
  }
658
721
  else if (chr === '*') {
659
- if (![',', ':'].includes(this.currentNode.value.at(-1))) {
722
+ if (![',', ':'].includes(tokenLast)) {
660
723
  let error = new Error(`Unexpected range wildcard at position ${this.pos + i} [E30]`);
661
724
  error.code = 'ParserError30';
662
725
  error.parserContext = { input: this.str, pos: this.pos + i, chr };
@@ -664,13 +727,17 @@ export class TokenParser {
664
727
  }
665
728
  }
666
729
  else if (chr === ',') {
667
- if (!RE_SINGLE_DIGIT.test(this.currentNode.value.at(-1)) && this.currentNode.value.at(-1) !== '*') {
730
+ if (!RE_SINGLE_DIGIT.test(tokenLast) && tokenLast !== '*') {
731
+ if (!tokenHasStar) {
732
+ continueAsAtom();
733
+ break;
734
+ }
668
735
  let error = new Error(`Unexpected sequence separator , at position ${this.pos + i} [E31]`);
669
736
  error.code = 'ParserError31';
670
737
  error.parserContext = { input: this.str, pos: this.pos + i, chr };
671
738
  throw error;
672
739
  }
673
- if (this.currentNode.value.at(-1) === '*' && this.currentNode.value.at(-2) !== ':') {
740
+ if (tokenLast === '*' && tokenPrev !== ':') {
674
741
  let error = new Error(`Unexpected sequence separator , at position ${this.pos + i} [E32]`);
675
742
  error.code = 'ParserError32';
676
743
  error.parserContext = { input: this.str, pos: this.pos + i, chr };
@@ -678,20 +745,29 @@ export class TokenParser {
678
745
  }
679
746
  }
680
747
  else if (!RE_SINGLE_DIGIT.test(chr)) {
748
+ if (!tokenHasStar) {
749
+ continueAsAtom();
750
+ break;
751
+ }
681
752
  let error = new Error(`Unexpected char at position ${this.pos + i} [E33: ${JSON.stringify(chr)}]`);
682
753
  error.code = 'ParserError33';
683
754
  error.parserContext = { input: this.str, pos: this.pos + i, chr };
684
755
  throw error;
685
756
  }
686
- if (RE_SINGLE_DIGIT.test(chr) && this.currentNode.value.at(-1) === '*') {
757
+ if (RE_SINGLE_DIGIT.test(chr) && tokenLast === '*') {
687
758
  let error = new Error(`Unexpected number at position ${this.pos + i} [E34: ${JSON.stringify(chr)}]`);
688
759
  error.code = 'ParserError34';
689
760
  error.parserContext = { input: this.str, pos: this.pos + i, chr };
690
761
  throw error;
691
762
  }
692
- this.currentNode.value += chr;
763
+ appendToToken(chr);
693
764
  break;
765
+ }
694
766
  }
695
767
  }
768
+ // the same applies to a digit-led token that ends the input on a dangling separator ("10:")
769
+ if (this.state === STATE_SEQUENCE && (tokenLast === ':' || tokenLast === ',') && !tokenHasStar) {
770
+ this.currentNode.type = 'ATOM';
771
+ }
696
772
  }
697
773
  }
@@ -1,3 +1,3 @@
1
1
  export declare const name = "imapflow";
2
- export declare const version = "2.2.5";
2
+ export declare const version = "2.2.6";
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
2
  export const name = "imapflow";
3
- export const version = "2.2.5";
3
+ export const version = "2.2.6";
4
4
  export const homepage = "https://imapflow.com/";
@@ -386,8 +386,12 @@ export const searchCompiler = (connection, query) => {
386
386
  }
387
387
  break;
388
388
  // NOT operator
389
+ // A falsy operand means no NOT clause (`not: cond && {...}`). Any other one goes
390
+ // through walkOperand(), which refuses a value that is not a query object or
391
+ // compiles to nothing: dropping it would turn the filter into a search that
392
+ // matches everything
389
393
  case 'NOT':
390
- if (params[term] && typeof params[term] === 'object') {
394
+ if (params[term]) {
391
395
  attributes.push({ type: 'ATOM', value: 'NOT' });
392
396
  walkOperand('NOT', params[term]);
393
397
  }
@@ -400,8 +404,8 @@ export const searchCompiler = (connection, query) => {
400
404
  }
401
405
  // Single element - just process it directly
402
406
  if (params[term].length === 1) {
403
- if (typeof params[term][0] === 'object' && params[term][0]) {
404
- walk(params[term][0]);
407
+ if (params[term][0]) {
408
+ walkOperand('OR', params[term][0]);
405
409
  }
406
410
  break;
407
411
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imapflow",
3
- "version": "2.2.5",
3
+ "version": "2.2.6",
4
4
  "description": "IMAP Client for Node",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/imap-flow.js",
@@ -45,6 +45,7 @@
45
45
  "pretest:workers": "npm run build",
46
46
  "test:workers": "node --import tsx --test test/cloudflare/cloudflare-test.ts",
47
47
  "test:rev2": "bash test/integration/run-rev2-tests.sh",
48
+ "test:mutation": "node scripts/mutation-test.js",
48
49
  "format": "prettier --write \"**/*.{js,cjs,ts,json,md,yml,yaml}\"",
49
50
  "format:check": "prettier --check \"**/*.{js,cjs,ts,json,md,yml,yaml}\"",
50
51
  "lint": "npm run typecheck && eslint .",
@@ -77,7 +78,7 @@
77
78
  "tsx": "4.23.15",
78
79
  "types-node-legacy": "npm:@types/node@20.0.0",
79
80
  "typescript": "6.0.3",
80
- "typescript-eslint": "8.71.0",
81
+ "typescript-eslint": "8.71.1",
81
82
  "wrangler": "4.147.0"
82
83
  },
83
84
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withbuddi/buddi",
3
- "version": "0.1.0-pre.46",
3
+ "version": "0.1.0-pre.48",
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- Plugin pages can hide just the figures: a page query may name the values that are sensitive (a balance, a total) instead of hiding everything that reads it. The page then shows its whole layout with those values as •••• and one \"Show amounts\" button in its head, which reveals the page (and the next one) until you switch to another app or tab, or five minutes pass. Showing or hiding amounts never empties a form you are typing in, and a field still showing •••• cannot be saved, in a form, a row's sheet or an editor alike. Over MCP, `buddi.page_query` returns those values as \"(hidden)\" unless asked with `includeSensitive`. (Host API 1.31.)\n\n### Changed\n\n- Canvas tabs in long conversations: a tab is now known by the tool and what it was about (a file, an account, a page, a site), titled \"Staged import · savings.csv\" instead of by the tool alone. Two files with the same name in different folders get a tab each. A repeat call on the same subject updates that tab and keeps the earlier results one step back inside it. The strip holds three tabs, most recently looked at first; the rest are a scrollable timeline (Now / Earlier this turn / Earlier) with Close others and Close all. A staged result past its expiry closes itself and a failure with nothing to show moves into the timeline; their chat rows still open them. Closed tabs and the order are kept per conversation by buddi, not in the browser.\n\n### Fixed\n\n- Agents can download files in the browser. A CFO on a bank site could not get a transactions CSV: buddi's own browser cancelled every download. Now a file an agent's click downloads goes into your Files (\"Downloaded from bank.example\", credited to the agent), and the agent gets its id to hand to the plugin that imports it. At most 50 MB a file and 500 MB per agent (a bigger one is refused and the agent says why), never executable; Files keeps the only copy. Settings → Browser & apps → Downloads shows any file that could not be filed and is waiting (cleared after 30 days), with Clear. In your Chrome, press Allow downloads in the buddi extension's popup once: then downloads an agent's click starts are picked up too, and the ones you start yourself are never touched.\n- Agents' downloads are held to tighter rules. In buddi's own browser a download is stopped the moment it passes 50 MB or runs past five minutes, and when the run is cancelled, instead of first downloading all of it; Chromium's copy is deleted once the file was filed or refused. In your Chrome, a download is read only from Chrome's download folder (`~/Downloads`, or the browser setting `downloadsFolder`), never through a linked folder, a dot-folder or buddi's own data, and the file checked is the file read. A site an agent visited earlier no longer makes your own download from it look like the agent's: each agent action counts only its own sites, for its own 15 seconds.\n- Settings → Browser & apps → Downloads lists each file waiting there (name, agent, day) with File it, which puts it in your Files; Clear asks first and says these copies are not in Files.\n- Reading a long file no longer overflows the reply: `artifacts.text` returns at most 16 KB and says how much there was (\"16 KB of 35 KB; use artifacts.describe or the plugin's import tool\"), and agents are told that a statement or CSV goes to the owning plugin's import tool, not into their answer.\n\n- The chat sends files on their own: drop three statements, press Enter, and they go with no words needed. An empty box with nothing attached still sends nothing.\n- The chat takes files while the agent is working. They used to be refused (\"Send files once the agent has answered.\"); now they queue with the words, the agent picks them up at its next step, or they open the next turn when the answer is already being written. A file can also be sent on its own mid-run. The box says where it goes in a full sentence under itself, and the bubble reads \"Queued with 1 file\".\n- Plugin pages update when the plugin's own tools write: after the CFO records balances in chat, an open Money page shows them within a second instead of still saying \"Start with one account\"; a form you are filling in keeps what you typed. It works for every plugin, whether the agent ran in chat, on Telegram or in a mission."
20
+ "notes": "### Added\n\n- Plugins that run models on this computer share one engine that buddi downloads only when it is first needed, for this platform only, instead of each plugin carrying its own 200 MB copy for every platform. The first plugin to need it shows one card (\"Download the Whisper base model (135 MB) and the engine that runs it (114 MB)?\"); later plugins use it without asking. The download is checked against a checksum pinned in buddi before anything is kept or loaded. Settings → System → Local models shows the engine (state, version, size) and the models plugins keep there, each with Remove. Linux x64 and arm64 and Apple silicon Macs; not available on Windows or Intel Macs yet (the Intel build is held back until it has been checked on one). Models run in a worker thread of their own, so a long transcription never freezes the dashboard, Telegram or other plugins. (Host API 1.32: `uses: ['onnx']`, `ctx.buddi.onnx`, `ctx.buddi.models`.)\n- When an agent proposes a schedule (or an agent package adds a mission) that will use your Chrome, the card says so in one line right under the ask, like \"Runs every day at 07:00, using your Chrome for PNC\", and approving it grants exactly that. Agents can say so themselves (`browser: 'owner'` in `schedule.propose`); otherwise buddi works it out when the plan names a site on your \"needs my sign-in\" list. Nothing gets your Chrome silently.\n- Missions: a mission that looks at pages shows \"Uses your Chrome\" or \"Own browser\", with a switch to change it either way.\n\n### Fixed\n\n- Local-model downloads follow the same address rules as every other fetch: no private or local addresses (also after a redirect or through DNS), no credentials in the address, only the web's own ports, at most five redirects.\n- A failed local-model download no longer logs, keeps or shows the full address it failed on; the reason names the host only, with any stored secret scrubbed.\n- Two models downloading at the same time no longer delete each other's half-finished files; a download a restart cut short resumes on the next ask without a second card, and its leftovers are cleaned up at start.\n- Two plugins asking for the engine at the same moment get one card between them, and that card now reaches Telegram and push, headed with its question (an owner secret's card too).\n- Closing a local-model session while it is still loading no longer leaves the model loaded.\n- Settings → Local models asks before removing a ready engine (\"Plugins that use it will ask you again\").\n- A mission run that needed your Chrome now stops there for real: nothing after it runs, so \"nothing was read or changed\" is always true and no other approval can jump ahead of the Chrome card.\n- Approving a schedule where buddi worked out that it needs your Chrome no longer fails as \"the effect changed\".\n- An agent can no longer ask for your Chrome for a mission that never browsed; when an agent (not a stopped run) asks, the card says the agent asks. Allow on a mission that is off or ended only grants it, runs nothing, and the card says so.\n\n### Changed\n\n- A scheduled mission that needs your signed-in Chrome no longer tells you to \"ask me in a normal chat\" to change it. The run stops without opening anything and you get one card, \"Let the PNC pull use your Chrome?\", saying nothing was read or changed and when it last brought you something, with Allow and Not now, on Home, in chat and on Telegram. Allow lets that mission use your Chrome from now on and runs it once straight away; Not now leaves it as it was. While the card is open, another refused run does not ask again."
21
21
  },
22
22
  "files": [
23
23
  "packages",