@wirecat/mail-cli 0.5.0 → 0.7.0

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 (296) hide show
  1. package/CHANGELOG.md +149 -0
  2. package/README.md +48 -13
  3. package/dist/bin/mail.js +2 -2
  4. package/dist/bundle/{all-profiles-GR5JXYEQ.js → all-profiles-SI67TKZM.js} +9 -9
  5. package/dist/bundle/{anthropic-REBXE65F.js → anthropic-DALMLC3Y.js} +6 -6
  6. package/dist/bundle/{app-server-QJ7ICQXZ.js → app-server-XOH327Z2.js} +46 -46
  7. package/dist/bundle/{bun-WAX4QHW5.js → bun-ORL67CJ6.js} +2 -2
  8. package/dist/bundle/{bun-sqlite-5S7TQ4SG.js → bun-sqlite-DGXFNFHI.js} +5 -5
  9. package/dist/bundle/{chunk-ZD3WUGR2.js → chunk-23IEVVL2.js} +4 -4
  10. package/dist/bundle/{chunk-B5WSIWY5.js → chunk-2M4K7HYR.js} +17 -17
  11. package/dist/bundle/{chunk-IWDOGGMY.js → chunk-35KD2CI2.js} +501 -301
  12. package/dist/bundle/{chunk-7A7BHABA.js → chunk-3GZK5GTU.js} +1 -1
  13. package/dist/bundle/{chunk-JJBQPA7D.js → chunk-3TYEJRMZ.js} +4 -4
  14. package/dist/bundle/{chunk-M6BDHZON.js → chunk-45KA5667.js} +26 -13
  15. package/dist/bundle/{chunk-LOA4X6JW.js → chunk-4NYWHINR.js} +6 -6
  16. package/dist/bundle/{dist-KJOAJ6NF.js → chunk-4ULY3GDL.js} +16 -116
  17. package/dist/bundle/{chunk-2FXVBCA3.js → chunk-5BSEGMNE.js} +4 -4
  18. package/dist/bundle/{chunk-HCMUGUAG.js → chunk-5JEYIHS6.js} +3 -3
  19. package/dist/bundle/{chunk-QXOSGGKS.js → chunk-6LK7KTWB.js} +1 -1
  20. package/dist/bundle/{chunk-ESNNQA7D.js → chunk-6RMMAUUW.js} +28 -28
  21. package/dist/bundle/{chunk-VXAZZGXE.js → chunk-6XNPXAJU.js} +33 -27
  22. package/dist/bundle/{chunk-5INWLYBD.js → chunk-73OJJGZE.js} +14 -3
  23. package/dist/bundle/{chunk-4XJ4AM3K.js → chunk-7K6KJWTO.js} +12 -12
  24. package/dist/bundle/{chunk-KIDF77MA.js → chunk-AP7V256W.js} +1 -1
  25. package/dist/bundle/{chunk-4BMNP2FT.js → chunk-BEMLGWY4.js} +1 -1
  26. package/dist/bundle/{chunk-BFJV4FWJ.js → chunk-BGUMGCUY.js} +2 -2
  27. package/dist/bundle/{chunk-5BVIWP3S.js → chunk-BM445GYF.js} +2 -2
  28. package/dist/bundle/{chunk-F3NYA4KN.js → chunk-CAKBG5FC.js} +6 -6
  29. package/dist/bundle/{chunk-EB3R2PV3.js → chunk-DKQWTQVY.js} +23 -23
  30. package/dist/bundle/{chunk-6TY3DGCC.js → chunk-DXGMPMFP.js} +4 -4
  31. package/dist/bundle/{chunk-LFRHIXCF.js → chunk-E3DRM6YP.js} +3 -3
  32. package/dist/bundle/{chunk-FSUNGHRI.js → chunk-EYT33MM3.js} +47 -46
  33. package/dist/bundle/{chunk-DXDQOZ2P.js → chunk-FPOGVDLS.js} +2 -2
  34. package/dist/bundle/{chunk-S677WGOQ.js → chunk-FTFNWGIR.js} +8 -8
  35. package/dist/bundle/{chunk-TI6VBZKJ.js → chunk-FUB3X25H.js} +4 -4
  36. package/dist/bundle/{chunk-7JCRQX56.js → chunk-GJUUTUK4.js} +8 -8
  37. package/dist/bundle/{chunk-BLS5YG77.js → chunk-HFJNEXU7.js} +2 -2
  38. package/dist/bundle/{chunk-YKPBC3NL.js → chunk-HV3EIYX4.js} +1 -1
  39. package/dist/bundle/{chunk-EL554DV2.js → chunk-IYZHM3ZN.js} +3 -3
  40. package/dist/bundle/{chunk-6EO7GVYJ.js → chunk-JFMUI4H6.js} +1 -1
  41. package/dist/bundle/{chunk-2YQNBIDQ.js → chunk-LZ5J3UXD.js} +4 -4
  42. package/dist/bundle/{chunk-WNCCYHRV.js → chunk-M2JCUVCJ.js} +116 -95
  43. package/dist/bundle/{chunk-7F3NDIYL.js → chunk-MCJ7LKYR.js} +6 -6
  44. package/dist/bundle/{chunk-VDAIJM5L.js → chunk-MHQKHWCJ.js} +88 -34
  45. package/dist/bundle/{chunk-SQ7KOBRA.js → chunk-MMXMVGA6.js} +10 -8
  46. package/dist/bundle/{chunk-AFCGOZR7.js → chunk-NNIXREJH.js} +7 -7
  47. package/dist/bundle/{chunk-LQ37ALDJ.js → chunk-NXJLC2WK.js} +8 -8
  48. package/dist/bundle/{chunk-6GE3EADU.js → chunk-OHTR4WFO.js} +2 -2
  49. package/dist/bundle/{chunk-PJCTWPJB.js → chunk-PDL4UREY.js} +8 -8
  50. package/dist/bundle/{chunk-J3QXTBD2.js → chunk-Q2C3VMSU.js} +20 -18
  51. package/dist/bundle/{chunk-SWJAG5IE.js → chunk-Q44AYEOB.js} +2 -2
  52. package/dist/bundle/{chunk-P7P5MNAU.js → chunk-QZBT6BOU.js} +1 -1
  53. package/dist/bundle/{chunk-IBYTYIYO.js → chunk-R5MML3FC.js} +61 -54
  54. package/dist/bundle/{chunk-CEAANMJ2.js → chunk-RQVWZBW3.js} +3 -3
  55. package/dist/bundle/{chunk-5CXAH4Y6.js → chunk-S4YUR4S3.js} +656 -572
  56. package/dist/bundle/{chunk-QX7RCLRS.js → chunk-SQLCCKEL.js} +1 -1
  57. package/dist/bundle/chunk-U6UJ3HRS.js +58 -0
  58. package/dist/bundle/{chunk-YRGBZZUW.js → chunk-V4TDG4KF.js} +14 -14
  59. package/dist/bundle/{chunk-5FK6RD4M.js → chunk-VBOMKZ4E.js} +73 -57
  60. package/dist/bundle/{chunk-MQUJEQTU.js → chunk-VKPWP3AK.js} +2 -2
  61. package/dist/bundle/{chunk-7XNPSIWD.js → chunk-VNJMO5F6.js} +2 -2
  62. package/dist/bundle/{chunk-MMDCL42A.js → chunk-VSHJWTX5.js} +12 -6
  63. package/dist/bundle/{chunk-2MRECWJZ.js → chunk-XQJWMBDY.js} +6 -6
  64. package/dist/bundle/{chunk-2U4IANVV.js → chunk-ZKCNMW7G.js} +2 -2
  65. package/dist/bundle/{chunk-LNS27BTB.js → chunk-ZKZABB4K.js} +3 -3
  66. package/dist/bundle/{chunk-WNI5BZFB.js → chunk-ZNGQ3NZ4.js} +9 -9
  67. package/dist/bundle/command-contract-CB5BII3S.js +34 -0
  68. package/dist/bundle/{decode-D7BDVIVB.js → decode-KOBURZIQ.js} +5 -5
  69. package/dist/bundle/{dispatch-EUKKT3PD.js → dispatch-GDAH4JHS.js} +8 -8
  70. package/dist/bundle/dist-T7HMT675.js +134 -0
  71. package/dist/bundle/{echarts-IVRX7XHP.js → echarts-LEWTQO6H.js} +2 -2
  72. package/dist/bundle/{embed-X527RBTG.js → embed-PUFE4BSQ.js} +6 -6
  73. package/dist/bundle/{embedder-F4PSJS6S.js → embedder-3G4BQQ6X.js} +9 -9
  74. package/dist/bundle/{failure-OAIC5VAP.js → failure-6COJAO7T.js} +2 -2
  75. package/dist/bundle/{first-run-M5CIX6NA.js → first-run-FLXOC53U.js} +11 -11
  76. package/dist/bundle/first-screen-VUZEDSQW.js +32 -0
  77. package/dist/bundle/{instructions-UX36BT5F.js → instructions-HGSXDCBT.js} +1 -1
  78. package/dist/bundle/mail.js +12 -11
  79. package/dist/bundle/{mcp-L7SRVDRN.js → mcp-GAPDLFWA.js} +2 -2
  80. package/dist/bundle/{node-OXT7WE2T.js → node-5Z7PS4F5.js} +2 -2
  81. package/dist/bundle/{node-sqlite-X2PSEHA4.js → node-sqlite-OAW7APIX.js} +5 -5
  82. package/dist/bundle/{oauth-MYK4BSYN.js → oauth-ZFZWPAJN.js} +7 -7
  83. package/dist/bundle/{open-GONIP2DH.js → open-ZQMBZVH4.js} +4 -4
  84. package/dist/bundle/{openai-YJFNUOQT.js → openai-XT2RIXAK.js} +14 -14
  85. package/dist/bundle/{process-7IEUUSRK.js → process-VVEQIHPE.js} +1 -1
  86. package/dist/bundle/{program-Q73TTG3E.js → program-RD3BBDNY.js} +21470 -7075
  87. package/dist/bundle/{prompt-SKQ72KN7.js → prompt-PU7GE4Z4.js} +5 -5
  88. package/dist/bundle/{recognize-GC7CU2DB.js → recognize-AG4A3KUK.js} +4 -4
  89. package/dist/bundle/{remote-UEXFZP2I.js → remote-D6TQ6T7F.js} +7 -7
  90. package/dist/bundle/{rerank-2U2NDEZP.js → rerank-GO24HJPF.js} +7 -7
  91. package/dist/bundle/{serve-OOGKFEWL.js → serve-WCHJAH6G.js} +9 -9
  92. package/dist/bundle/server-5KJJ3D6P.js +63 -0
  93. package/dist/bundle/{server-FZ3LFQTF.js → server-CAVNBG3P.js} +38 -38
  94. package/dist/bundle/{sqlite-runtime-GIQSW6LJ.js → sqlite-runtime-ANXC4AW2.js} +5 -5
  95. package/dist/bundle/{state-EMFXPQVZ.js → state-EGJ66A62.js} +6 -6
  96. package/dist/bundle/{store-BDU4UPNK.js → store-OON7FCMQ.js} +15 -15
  97. package/dist/bundle/{store-LDI62AUG.js → store-SBFA444C.js} +13 -13
  98. package/dist/bundle/store-maintenance-command-UEOJLYMJ.js +52 -0
  99. package/dist/commands/attachments.d.ts +3 -0
  100. package/dist/commands/attachments.d.ts.map +1 -0
  101. package/dist/commands/attachments.js +97 -0
  102. package/dist/commands/attachments.js.map +1 -0
  103. package/dist/commands/context.d.ts +21 -6
  104. package/dist/commands/context.d.ts.map +1 -1
  105. package/dist/commands/context.js +58 -7
  106. package/dist/commands/context.js.map +1 -1
  107. package/dist/commands/drafts-send.d.ts +7 -0
  108. package/dist/commands/drafts-send.d.ts.map +1 -0
  109. package/dist/commands/drafts-send.js +58 -0
  110. package/dist/commands/drafts-send.js.map +1 -0
  111. package/dist/commands/drafts.d.ts +3 -0
  112. package/dist/commands/drafts.d.ts.map +1 -0
  113. package/dist/commands/drafts.js +243 -0
  114. package/dist/commands/drafts.js.map +1 -0
  115. package/dist/commands/export.d.ts +3 -0
  116. package/dist/commands/export.d.ts.map +1 -0
  117. package/dist/commands/export.js +278 -0
  118. package/dist/commands/export.js.map +1 -0
  119. package/dist/commands/folders.d.ts.map +1 -1
  120. package/dist/commands/folders.js +120 -2
  121. package/dist/commands/folders.js.map +1 -1
  122. package/dist/commands/messages.d.ts +25 -0
  123. package/dist/commands/messages.d.ts.map +1 -0
  124. package/dist/commands/messages.js +506 -0
  125. package/dist/commands/messages.js.map +1 -0
  126. package/dist/commands/read.d.ts +4 -1
  127. package/dist/commands/read.d.ts.map +1 -1
  128. package/dist/commands/read.js +14 -3
  129. package/dist/commands/read.js.map +1 -1
  130. package/dist/commands/rules.d.ts +3 -0
  131. package/dist/commands/rules.d.ts.map +1 -0
  132. package/dist/commands/rules.js +292 -0
  133. package/dist/commands/rules.js.map +1 -0
  134. package/dist/commands/send.d.ts +39 -0
  135. package/dist/commands/send.d.ts.map +1 -0
  136. package/dist/commands/send.js +309 -0
  137. package/dist/commands/send.js.map +1 -0
  138. package/dist/commands/server-search.d.ts +8 -0
  139. package/dist/commands/server-search.d.ts.map +1 -0
  140. package/dist/commands/server-search.js +38 -0
  141. package/dist/commands/server-search.js.map +1 -0
  142. package/dist/commands/session-start.d.ts.map +1 -1
  143. package/dist/commands/session-start.js +107 -10
  144. package/dist/commands/session-start.js.map +1 -1
  145. package/dist/commands/session.d.ts.map +1 -1
  146. package/dist/commands/session.js +72 -9
  147. package/dist/commands/session.js.map +1 -1
  148. package/dist/commands/stats.d.ts +3 -0
  149. package/dist/commands/stats.d.ts.map +1 -0
  150. package/dist/commands/stats.js +89 -0
  151. package/dist/commands/stats.js.map +1 -0
  152. package/dist/commands/status.js +2 -2
  153. package/dist/commands/status.js.map +1 -1
  154. package/dist/commands/sync.d.ts +6 -0
  155. package/dist/commands/sync.d.ts.map +1 -1
  156. package/dist/commands/sync.js +28 -20
  157. package/dist/commands/sync.js.map +1 -1
  158. package/dist/commands/tags.d.ts +3 -0
  159. package/dist/commands/tags.d.ts.map +1 -0
  160. package/dist/commands/tags.js +144 -0
  161. package/dist/commands/tags.js.map +1 -0
  162. package/dist/config.d.ts +15 -0
  163. package/dist/config.d.ts.map +1 -1
  164. package/dist/config.js +52 -1
  165. package/dist/config.js.map +1 -1
  166. package/dist/export/format.d.ts +19 -0
  167. package/dist/export/format.d.ts.map +1 -0
  168. package/dist/export/format.js +40 -0
  169. package/dist/export/format.js.map +1 -0
  170. package/dist/export/journal.d.ts +32 -0
  171. package/dist/export/journal.d.ts.map +1 -0
  172. package/dist/export/journal.js +84 -0
  173. package/dist/export/journal.js.map +1 -0
  174. package/dist/export/write.d.ts +14 -0
  175. package/dist/export/write.d.ts.map +1 -0
  176. package/dist/export/write.js +42 -0
  177. package/dist/export/write.js.map +1 -0
  178. package/dist/identity.d.ts.map +1 -1
  179. package/dist/identity.js +3 -0
  180. package/dist/identity.js.map +1 -1
  181. package/dist/mail/backend.d.ts +104 -2
  182. package/dist/mail/backend.d.ts.map +1 -1
  183. package/dist/mail/backend.js +4 -1
  184. package/dist/mail/backend.js.map +1 -1
  185. package/dist/mail/changes.d.ts +91 -0
  186. package/dist/mail/changes.d.ts.map +1 -0
  187. package/dist/mail/changes.js +198 -0
  188. package/dist/mail/changes.js.map +1 -0
  189. package/dist/mail/cleanup.d.ts +41 -0
  190. package/dist/mail/cleanup.d.ts.map +1 -0
  191. package/dist/mail/cleanup.js +119 -0
  192. package/dist/mail/cleanup.js.map +1 -0
  193. package/dist/mail/compose.d.ts +73 -0
  194. package/dist/mail/compose.d.ts.map +1 -0
  195. package/dist/mail/compose.js +110 -0
  196. package/dist/mail/compose.js.map +1 -0
  197. package/dist/mail/doctor.d.ts +67 -0
  198. package/dist/mail/doctor.d.ts.map +1 -0
  199. package/dist/mail/doctor.js +115 -0
  200. package/dist/mail/doctor.js.map +1 -0
  201. package/dist/mail/drafts.d.ts +54 -0
  202. package/dist/mail/drafts.d.ts.map +1 -0
  203. package/dist/mail/drafts.js +104 -0
  204. package/dist/mail/drafts.js.map +1 -0
  205. package/dist/mail/imap/connection.d.ts +13 -3
  206. package/dist/mail/imap/connection.d.ts.map +1 -1
  207. package/dist/mail/imap/connection.js +87 -18
  208. package/dist/mail/imap/connection.js.map +1 -1
  209. package/dist/mail/imap/index.d.ts +3 -3
  210. package/dist/mail/imap/index.d.ts.map +1 -1
  211. package/dist/mail/imap/index.js +14 -4
  212. package/dist/mail/imap/index.js.map +1 -1
  213. package/dist/mail/imap/messages.d.ts +5 -6
  214. package/dist/mail/imap/messages.d.ts.map +1 -1
  215. package/dist/mail/imap/messages.js +14 -28
  216. package/dist/mail/imap/messages.js.map +1 -1
  217. package/dist/mail/imap/read.d.ts.map +1 -1
  218. package/dist/mail/imap/read.js +27 -13
  219. package/dist/mail/imap/read.js.map +1 -1
  220. package/dist/mail/imap/search.d.ts +14 -0
  221. package/dist/mail/imap/search.d.ts.map +1 -0
  222. package/dist/mail/imap/search.js +55 -0
  223. package/dist/mail/imap/search.js.map +1 -0
  224. package/dist/mail/imap/write.d.ts +5 -0
  225. package/dist/mail/imap/write.d.ts.map +1 -0
  226. package/dist/mail/imap/write.js +93 -0
  227. package/dist/mail/imap/write.js.map +1 -0
  228. package/dist/mail/organise.d.ts +116 -0
  229. package/dist/mail/organise.d.ts.map +1 -0
  230. package/dist/mail/organise.js +531 -0
  231. package/dist/mail/organise.js.map +1 -0
  232. package/dist/mail/rethread.d.ts +1 -2
  233. package/dist/mail/rethread.d.ts.map +1 -1
  234. package/dist/mail/rethread.js +8 -3
  235. package/dist/mail/rethread.js.map +1 -1
  236. package/dist/mail/rules/apply.d.ts +40 -0
  237. package/dist/mail/rules/apply.d.ts.map +1 -0
  238. package/dist/mail/rules/apply.js +114 -0
  239. package/dist/mail/rules/apply.js.map +1 -0
  240. package/dist/mail/rules/file.d.ts +9 -0
  241. package/dist/mail/rules/file.d.ts.map +1 -0
  242. package/dist/mail/rules/file.js +51 -0
  243. package/dist/mail/rules/file.js.map +1 -0
  244. package/dist/mail/rules/filters.d.ts +11 -0
  245. package/dist/mail/rules/filters.d.ts.map +1 -0
  246. package/dist/mail/rules/filters.js +150 -0
  247. package/dist/mail/rules/filters.js.map +1 -0
  248. package/dist/mail/rules/folders.d.ts +11 -0
  249. package/dist/mail/rules/folders.d.ts.map +1 -0
  250. package/dist/mail/rules/folders.js +17 -0
  251. package/dist/mail/rules/folders.js.map +1 -0
  252. package/dist/mail/rules/query.d.ts +15 -0
  253. package/dist/mail/rules/query.d.ts.map +1 -0
  254. package/dist/mail/rules/query.js +103 -0
  255. package/dist/mail/rules/query.js.map +1 -0
  256. package/dist/mail/rules/store.d.ts +9 -0
  257. package/dist/mail/rules/store.d.ts.map +1 -0
  258. package/dist/mail/rules/store.js +17 -0
  259. package/dist/mail/rules/store.js.map +1 -0
  260. package/dist/mail/save.d.ts +9 -0
  261. package/dist/mail/save.d.ts.map +1 -0
  262. package/dist/mail/save.js +50 -0
  263. package/dist/mail/save.js.map +1 -0
  264. package/dist/mail/send.d.ts +67 -0
  265. package/dist/mail/send.d.ts.map +1 -0
  266. package/dist/mail/send.js +173 -0
  267. package/dist/mail/send.js.map +1 -0
  268. package/dist/mail/smtp.d.ts +4 -0
  269. package/dist/mail/smtp.d.ts.map +1 -0
  270. package/dist/mail/smtp.js +133 -0
  271. package/dist/mail/smtp.js.map +1 -0
  272. package/dist/oauth.d.ts +74 -0
  273. package/dist/oauth.d.ts.map +1 -0
  274. package/dist/oauth.js +230 -0
  275. package/dist/oauth.js.map +1 -0
  276. package/dist/program.d.ts.map +1 -1
  277. package/dist/program.js +26 -4
  278. package/dist/program.js.map +1 -1
  279. package/dist/providers.d.ts +96 -9
  280. package/dist/providers.d.ts.map +1 -1
  281. package/dist/providers.js +69 -16
  282. package/dist/providers.js.map +1 -1
  283. package/dist/reasons.d.ts +9 -0
  284. package/dist/reasons.d.ts.map +1 -0
  285. package/dist/reasons.js +27 -0
  286. package/dist/reasons.js.map +1 -0
  287. package/dist/version.d.ts +1 -1
  288. package/dist/version.js +1 -1
  289. package/package.json +7 -5
  290. package/skills/mail-cli/SKILL.md +30 -3
  291. package/dist/bundle/chunk-YD5WV757.js +0 -27
  292. package/dist/bundle/command-contract-GPUED3GT.js +0 -34
  293. package/dist/bundle/first-screen-M7MT776O.js +0 -32
  294. package/dist/bundle/server-4JMHDHZ7.js +0 -63
  295. package/dist/bundle/store-maintenance-command-OFRPORN2.js +0 -52
  296. /package/dist/bundle/{chunk-NPGVOZVK.js → chunk-WJWLHLQ7.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,155 @@
2
2
 
3
3
  Notable changes to `@wirecat/mail-cli`. One section per version, newest first.
4
4
 
5
+ ## 0.7.0 — 01.11.2026
6
+
7
+ ### Changed — may break callers
8
+
9
+ - **`drafts delete` takes `--allow-dangerous`, not `--yes`**, because a draft deleted this way does not come back
10
+ (WC-PERM-9). Only the owner passes it; an agent over MCP gets a preview.
11
+
12
+ ### Added
13
+
14
+ - **`messages export --output` refuses credential folders** and the WireCat apps' folders, as `attachments download`
15
+ does.
16
+ - **Outlook.com and Microsoft 365 sign in with OAuth.** `mail <profile> session start --address <you>@outlook.com`
17
+ shows what it will ask for, opens Microsoft's page in the browser, logs in to IMAP with the new token, and only then
18
+ saves the profile and the tokens (keyring entry `oauth:microsoft:<profile>`). Sync and `messages send` use the token
19
+ over IMAP and SMTP (XOAUTH2), refreshing it as needed; a token the server refuses is refreshed once, then the error
20
+ `mail.oauth-refused` asks for a new sign-in. `session status` shows the app, scopes and expiry, never a token;
21
+ `session end` forgets the sign-in and names where Microsoft lists the app. `--no-browser` prints the link only.
22
+ - **`microsoft_client_id`**: the Microsoft app to sign in with, set by you once (`config set --defaults`); an agent
23
+ over MCP cannot change it. WireCat's own app is not registered yet, so for now this is required;
24
+ [register a Microsoft app](docs/oauth-microsoft.md) gives the steps.
25
+ - **Gmail over OAuth with your own Google app**: `session start --client-file <Desktop client JSON>`
26
+ (or, on a profile switched with `config set auth oauth`, `MAIL_GOOGLE_CLIENT_ID` and `MAIL_GOOGLE_CLIENT_SECRET`),
27
+ for an account that cannot make an app password. The signed-in address must match the profile's. Gmail profiles
28
+ keep app passwords unless switched.
29
+ [Gmail with your own Google app](docs/oauth-google.md) gives the steps: a Google project just for mail, published
30
+ without verification. `session end --revoke` asks Google to revoke it, which ends every sign-in of that project.
31
+ - **`mail doctor` lists each OAuth profile** with its app and last sign-in, from disk only, and warns from day 6 that
32
+ a Google app left in Testing ends its sign-ins on day 7.
33
+ - `session status` and `session list` answer `auth` too.
34
+
35
+ ### Fixed
36
+
37
+ - **An agent over MCP can attach several files**: `--file` of `messages send` and `messages forward` is a list there.
38
+ - **Sending a message no longer shortens the archive's coverage** to the last 10 minutes, which memo reported until
39
+ the next full sync.
40
+ - **`attachments list` and `download` show every attachment**, not the first 50, and `drafts update` keeps them all.
41
+ - **Attachments are saved through cli-core's atomic write**, which also syncs the file and the folder to disk.
42
+ - The `memo mail delete` command is named as it is now, in the docs and the help of `messages delete --rules`.
43
+ - **Microsoft 365 is its own provider**, found by its MX record, and sends through `smtp.office365.com:587`
44
+ ([Microsoft](https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365));
45
+ Outlook.com keeps `smtp-mail.outlook.com`.
46
+
47
+ ## 0.6.0 — 01.11.2026
48
+
49
+ ### Added
50
+
51
+ - **`mail <profile> messages export [query] --output <folder>`** writes the original messages of the stored mail that
52
+ match a query to mbox files (one per folder, mboxrd) or a Maildir++ tree (`--format maildir`), for backup or for mu
53
+ and notmuch. The store keeps text only, so each message is read from the server again. The folder is private (mode
54
+ 700, files 600); a folder with something in it is refused unless `--resume` goes on with an export or `--replace`
55
+ writes over files of the same name. `--limit` and `--max-pages` bound a run, which also stops before its deadline;
56
+ `--resume` skips what the folder holds and cuts back a half-written message.
57
+ - **`mail <profile> stats messages top --by sender|list|domain`** ranks the stored mail by sender, mailing list or
58
+ sender domain, with unread counts and size.
59
+ - **`mail <profile> messages mark-read|mark-unread|star|unstar <ref…>`** and **`messages update <ref…> --flag <flag>
60
+ --unflag <flag> [--replace]`** change flags and keywords on the server (read, flagged, answered, draft, `$Junk`, words
61
+ of your own); a folder that keeps no keywords answers `provider_unavailable`.
62
+ - **`messages move|copy <ref…> --folder <folder|role>`** files mail by folder; on Gmail a move is a label added and
63
+ `Inbox` taken away, a copy a label added, `--folder archive` only `Inbox` taken away.
64
+ - **`messages delete <ref…>`** moves mail to Trash, never expunges it; `--rules` is memo's envelope cleanup, moved
65
+ here: envelope mail the rules let go, each decided again, with Gmail's labels and stars read again just before the
66
+ move, a fresh store backup required and a first run of at most 100; it refuses to run from a schedule.
67
+ - **`messages restore --run <id>`** undoes a change run, last step first: Trash back to where the mail was (on Gmail
68
+ with its labels), moves back, copies removed, flags as they were. memo's `mail delete` run ids restore here too.
69
+ Outside Gmail a copy is removed for good by the UID the server gave it, never by a Message-ID search that could find
70
+ the original.
71
+ - **`folders create|rename|delete`**; `delete` is a preview until `--yes`, and refuses a folder that holds mail, or
72
+ whose count the server does not give, unless `--allow-dangerous`, which only the owner passes at a terminal.
73
+ - **`rules list|add|remove|apply|export|import`**, moved from memo with the same options: the profile is the mailbox,
74
+ so there is no account argument; the default import format is `mail`, the file memo's export writes.
75
+ - Every message write takes the messages by `ref` or by `--filter '<query>'` (`--limit`, newest first). A deletion,
76
+ a `--filter` change and a change of more than 20 messages answer with a preview and the command with `--yes` in
77
+ `next`; `--dry-run` only previews. The store follows each server change at once: flags, folder and UID, Gmail labels,
78
+ deletion.
79
+ - **Permissions:** `messages.delete`, `folders.delete` and `messages.bulk` (any change of many) ask; the rest of the
80
+ changes go ahead. `MAIL_READ_ONLY=1` refuses them all. Each attempt goes into the send journal (cli-core 0.522.0).
81
+ - Error reasons (`mail.no-trash`, `mail.run-unknown`, `mail.archive-unverified`, …) now reach the JSON error.
82
+ - **`mail <profile> drafts list|create|update|delete`** keeps drafts in the mailbox's own Drafts folder, so an agent
83
+ writes one and the owner checks and sends it from any mail app. `create` takes `--to`, `--cc`, `--bcc`, `--subject`
84
+ and the text (`-` reads stdin); `--reply-to <ref> [--reply-all]` answers a stored message in its thread. A draft is
85
+ named by its Message-ID; `update` replaces only what is given and keeps the rest, the thread and the attachments,
86
+ and moves the old version to Trash; `delete` removes it for good and asks first (`drafts.delete`).
87
+ - **`mail <profile> tags add|remove <tag…> --message <ref> | --chat <ref>`** and **`tags list`** put your own tags on
88
+ stored mail and conversations. They stay in the local store, in the same tables memo tags with, and never reach the
89
+ server; `search messages tag:<tag>` finds them. Provider keywords stay `messages update --flag`, Gmail labels
90
+ `messages move|copy --folder`.
91
+ - **`mail doctor`** says when a change run stopped part way, and when mail a run moved to Gmail's Trash is within five
92
+ days of Gmail emptying it, with the `messages restore` command for each. memo's doctor said this until the cleanup
93
+ moved here; memo's own cleanup runs count too. It needs cli-core 0.524.0 (`appDoctorCommand`'s `local` check).
94
+ - **`search messages` asks the mail server too** for mail sync has not read yet: `--backend archive|server|both`
95
+ (default `both`) and `--server-time` (default 5s), as `tg search messages` has them. Gmail is searched once in All
96
+ Mail with its own syntax (X-GM-RAW); other servers with IMAP `UID SEARCH` in INBOX, Sent and Archive, or the
97
+ profile's `folders`. The server gets the words, `from:`, `to:`, `cc:`, `subject:`, `body:`, `is:` and `date:`; what
98
+ it finds is stored, and the same query then runs on the store, so the answer means the same on both backends and
99
+ each hit says `found_in`. The mailbox is opened read only. `permissions.messages.server-search=deny` turns it off;
100
+ `--offline` and `MAIL_READ_ONLY` keep to the store (cli-core 0.525.0).
101
+ - **`mail <profile> messages send --to … --subject … [text]`** sends over the provider's SMTP server with the same
102
+ app password; the text comes from stdin when left out. `--cc`, `--bcc`, `--file <path>` (repeat; a named path, never
103
+ a pattern; credential and WireCat folders refused without `--allow-any-file`, which an agent over MCP never gets). `--reply-to <ref> [--reply-all]`
104
+ answers a stored email: `In-Reply-To`, `References`, `Re:`, the original quoted, `\Answered` set on it.
105
+ - **`messages forward <ref> --to … [text]`** sends the original attached whole (`message/rfc822`), `Fwd:` before its
106
+ subject, and sets `$Forwarded` on it.
107
+ - **Sent and the store after a send.** Gmail files SMTP mail in Sent itself; elsewhere the copy (with its Bcc line) is
108
+ appended to Sent unless Sent already holds that Message-ID. The message is then read into the store as `sync` reads it,
109
+ so it has the server's id and never a second row.
110
+ - **Safety for sends.** Mail to anyone but the owner asks first: new key `messages.send.others`, default `ask`, which
111
+ the owner may set to `allow`. The question shows from, to, cc, bcc, subject, each attachment and the first
112
+ lines. `MAIL_READ_ONLY=1`, `readonly` and `deny` refuse; every attempt goes into the send journal without addresses,
113
+ subject or text; each recipient counts toward `sends_per_hour`; sends are spaced with the shared request pace
114
+ (cli-core 0.523.0). An answer lost after the message left is `outcome_unknown`; `--operation-id` retries it and sends
115
+ nothing when Sent already has it. `--dry-run` builds the message and sends nothing. A text that says "attached" with
116
+ no file warns.
117
+ - **`drafts send <id>`** sends a saved draft through the same path as `messages send` (its keys and question, the
118
+ hourly limit, the journal, the Sent copy), then removes it from Drafts.
119
+ - **`attachments list <ref>`** and **`attachments download <ref> [number…] --output-dir <dir> [--replace]`**: the
120
+ files of one email, read from the server and numbered as the store numbers them, saved readable only by you under
121
+ their plain names; an existing file is kept unless `--replace`.
122
+ - **Profile keys `smtp_host`, `smtp_port`, `smtp_security`** name the submission server for a provider the built-in
123
+ list does not know. The built-in servers were checked against each provider's help page; Yandex's is now
124
+ `smtp.yandex.ru:465`.
125
+
126
+ ### Changed — may break callers
127
+
128
+ - **An agent over MCP mails only the owner.** `messages send`, `messages forward` and `drafts send` to anyone else
129
+ answer `permission_error` over MCP until the owner sets `permissions.messages.send.others` in the config (`ask` or
130
+ `allow`); an `mcp serve --permission` cannot open it. At a terminal it still asks.
131
+ - `mail` is no longer read-only: an MCP client with `--allow-writes` can change the mailbox through the `write` tool,
132
+ within the profile's permissions.
133
+ - **On a server with OBJECTID (Fastmail, Cyrus) an email's id is the hash of its Message-ID, as memo makes it**, not
134
+ the server's EMAILID, and its thread comes from References. Ids come from cli-core's `mailIds`, which memo uses too,
135
+ so the two never store one email twice. Gmail keeps its own ids; Yandex and Mail.ru ids do not change.
136
+ - **An agent cannot change where the app password goes, nor who it may mail.** Over MCP, `config set` and
137
+ `config unset` refuse `address`, `login`, `imap_host`, `imap_port`, `imap_security`, `smtp_host`, `smtp_port`,
138
+ `smtp_security`, `auth` and `permissions.messages.send.others` even with `mcp.authority`; the owner changes them in a
139
+ terminal (cli-core 0.530.0).
140
+
141
+ ### Fixed
142
+
143
+ - **Built on cli-core 0.530.0 and cli-base 0.71.0.** The command lint now knows `drafts`, `--cc`, `--bcc` and
144
+ `--reply-all`, and accepts `--to <address>` and `--subject <text>` beside the messengers' `<chat>` and `<ref>`, so
145
+ thirteen lint overrides are gone and the budget is 11. The audit compares mail in cli-base's `mail-shared` group and
146
+ runs without `--complete`. cli-core also stops hiding a locked store when it scores senders.
147
+ - **Gmail labels are decoded once.** imapflow already decodes them, and mail decoded `R&D-team` again into `Rteam`.
148
+ - **`sync` says when it leaves stored rules out**: `rules_unread` and `rules_unread_why` (such as `condition label`)
149
+ in the answer and a `mail.rules-unreadable` issue, when the rules hold a condition this mail does not know.
150
+ - **`sync --rescan` fails on a locked or broken store** instead of reporting the rethreading done.
151
+ - **An attachment's file name is cleaned as cli-core's downloads clean it**: direction and zero-width characters
152
+ that disguise an extension go, and on Windows a reserved name (CON, NUL, …) falls back to `attachment-<n>`.
153
+
5
154
  ## 0.5.0 — 01.11.2026
6
155
 
7
156
  ### Fixed
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # mail CLI for people, scripts and agents
2
2
 
3
3
  `mail` copies your mailbox into the shared WireCat store on your computer, so you and your AI agents can search it
4
- and read it there. It reads over IMAP and never changes the mailbox: it does not send, move, flag or delete mail.
5
- It searches and reads what it stored, offline.
4
+ and read it there, offline. It also organises the mailbox on the server: flags, folders, and deletion to Trash, each
5
+ change one you can undo. It keeps drafts, and sends, replies and forwards over SMTP.
6
6
 
7
7
  [Documentation](https://github.com/WireCatLabs/mail-cli/blob/main/docs/index.md) · [Roadmap](https://github.com/WireCatLabs/mail-cli/blob/main/docs/roadmap.md) · [WireCat](https://wirecat.dev)
8
8
 
@@ -40,12 +40,32 @@ You need Node.js 22.16 or a later 22.x, or 24 or later. To try it with no instal
40
40
  newest first, and skips what is already stored. `--since-time 2026-10-01` reads from local midnight of that day.
41
41
  - **Search and read the stored mail.** `search messages 'from:ann@example.com has:attachment date>30d'` uses the
42
42
  query language of every WireCat CLI, with `list:` for mailing lists; `messages show` gives an email whole with its
43
- attachments' text, `conversations list|show` its threads. It reads the profile's mailbox only and asks no server.
43
+ attachments' text, `conversations list|show` its threads. It searches the profile's mailbox only; it also asks the mail server
44
+ for mail `sync` has not read yet, and `--backend archive` keeps to the store.
44
45
  [memo](https://github.com/WireCatLabs/cli-memo) searches every mailbox together with your messages and notes.
46
+ - **Export to mbox or Maildir.** `messages export 'from:ann@example.com' --output ~/mail-backup` reads the original
47
+ messages from the server into a private folder, one mbox file per folder or a Maildir++ tree for mu and notmuch;
48
+ it can be resumed and bounded. `stats messages top --by list` ranks senders, lists and domains.
45
49
  - **Sync a big mailbox in parts.** A run stops before its deadline, keeps what it read and tells you to run it again;
46
50
  `status` shows how far it is.
47
51
  - **Check a mailbox.** `account check` shows what the server supports, `folders list` the folders with their role and
48
52
  message counts.
53
+ - **Organise it on the server.** `messages mark-read|mark-unread|star|unstar|update` change flags and keywords,
54
+ `messages move|copy --folder` file mail (by label on Gmail), `messages delete` moves it to Trash, and
55
+ `messages restore --run <id>` undoes any of them. `folders create|rename|delete` look after the folders. A search
56
+ shows each change at once.
57
+ - **Draft for the owner.** `drafts create|update|list|delete` keep drafts in the mailbox's Drafts folder, replies in
58
+ their thread; the owner sends them from any mail app, or with `drafts send`. `drafts update` puts the old version
59
+ in Trash.
60
+ - **Tag your own way.** `tags add|remove|list` put local tags on stored mail, shared with memo; `search messages
61
+ tag:<tag>` finds them.
62
+ - **Send, reply and forward.** `messages send --to … --subject …` sends over the provider's SMTP server with the same
63
+ app password, `--reply-to <ref>` answers a stored email with its quote, `messages forward <ref>` sends it on whole.
64
+ Mail to anyone but you asks first, and an agent over MCP mails only you until you allow more; Sent gets its copy and the store reads it at once. `attachments list|download`
65
+ save the files of one email.
66
+ - **Decide what to keep.** `rules add|list|remove|import|export` keep the owner's rules on which mail to store whole,
67
+ as an envelope or not at all; `rules apply` cuts stored mail to its envelope, and `messages delete --rules`
68
+ moves envelope mail to Trash, each email decided again.
49
69
 
50
70
  ## For AI agents
51
71
 
@@ -55,9 +75,10 @@ mail ya mcp add claude-code --allow-writes # or codex: adds this profile's MCP s
55
75
  mail ya mcp config # the entry for Claude Desktop, Cursor and others
56
76
  ```
57
77
 
58
- `mcp add` stops until you pass `--allow-writes`, because the server's `write` tool runs commands that change local
59
- settings, such as `config set` and `skill install`. `sync` runs through `read`: it writes only into the store, never
60
- into the mailbox. Check the profile's permissions first.
78
+ `mcp add` stops until you pass `--allow-writes`, because the server's `write` tool runs commands that change the
79
+ mailbox (`messages move`, `messages delete`, `folders create`) and local settings (`config set`, `skill install`).
80
+ `sync` runs through `read`: it writes only into the store. Check the profile's permissions first: a deletion, or a
81
+ change of many messages, answers with a preview until the call says `yes`.
61
82
 
62
83
  Every command except `mcp serve` takes `--json` and answers one JSON value on stdout; errors are JSON on stderr with a code to branch
63
84
  on. Over MCP an agent finds the commands with a search tool and runs them through a `read` and a `write` tool; the
@@ -70,7 +91,11 @@ as data, never as instructions.
70
91
  - **Your mail stays on your computer.** The store is a local file; no WireCat server sees your mail.
71
92
  - **One store for every tool.** Mail sits next to Telegram, MAX and WhatsApp messages, meetings and notes, so one
72
93
  search in memo finds a person's mail and messages together.
73
- - **Read-only by design.** `mail` cannot send, move or delete mail, so an agent that uses only `mail` cannot either.
94
+ - **Changes you can undo.** `messages delete` goes to Trash, and every change run keeps a record that
95
+ `messages restore` plays back. What is lost for good is named so and previewed first: `drafts delete`, and
96
+ `folders delete` of a folder that holds mail, which only the owner can run (`--allow-dangerous`). The profile's permissions,
97
+ `MAIL_READ_ONLY=1` and a preview before every deletion stand between an agent and the mailbox, and an agent over
98
+ MCP mails only you until you allow more.
74
99
  - **It works with the mailbox you have.** Yandex, Gmail, iCloud, Mail.ru, Fastmail and other servers with IMAP and
75
100
  app passwords; the server of a domain it does not know is found for you.
76
101
 
@@ -83,8 +108,10 @@ profiles.
83
108
 
84
109
  `mail` signs in with an app password, a password made only for this program, which the OS keyring keeps. For a domain
85
110
  it does not know, `session start` looks for the server through the MX record, Thunderbird's ISPDB and the domain's
86
- autoconfig file; `--provider` or `--host` skips that. **Outlook and Microsoft 365 are not supported yet**: Microsoft
87
- accepts only OAuth for IMAP, and `mail` does not do OAuth yet.
111
+ autoconfig file; `--provider` or `--host` skips that. Outlook.com and Microsoft 365 accept only OAuth, so for them
112
+ `session start` opens Microsoft's sign-in page in the browser instead of asking for a password, and keeps the tokens in
113
+ the same keyring. Until WireCat's Microsoft app is registered, this needs an app of your own, set once with
114
+ `mail config set --defaults microsoft_client_id <id>` ([register a Microsoft app](https://github.com/WireCatLabs/mail-cli/blob/main/docs/oauth-microsoft.md)).
88
115
 
89
116
  ## Settings and permissions
90
117
 
@@ -99,12 +126,17 @@ mail ya config show # every setting and where it came
99
126
 
100
127
  ## Limits
101
128
 
102
- - Read-only: `mail` never sends, moves, flags or deletes mail. But memo has `memo mail delete`, which moves Gmail mail
103
- to Trash, so an agent with write access to memo can change mail.
129
+ - `messages delete` goes to Trash, and the provider empties Trash in its own time (Gmail: 30 days). Three changes
130
+ are for good, with no restore: `drafts delete`, `drafts send` taking the sent draft out of Drafts, and
131
+ `folders delete --allow-dangerous` of a folder that holds mail (outside Gmail, its mail is gone).
132
+ Undoing `messages copy` outside Gmail removes the copy for good, never the original.
104
133
  - Text and headers only: the text of attachments is stored, not the files, nor the original message.
105
- - No OAuth yet, so no Outlook or Microsoft 365, and no Google Workspace domain that turns app passwords off.
134
+ - Gmail over OAuth needs a Google app of your own
135
+ ([steps](https://github.com/WireCatLabs/mail-cli/blob/main/docs/oauth-google.md)); `mail` ships no Google app for
136
+ mail.
106
137
  - Gmail caps IMAP downloads at 2,500 MB a day; a new Yandex app password can take 2 to 3 hours to work.
107
- - Search reads what `sync` stored: mail not synced yet is not found. Search on the server is planned.
138
+ - Search reads the store and asks the mail server for mail `sync` has not read yet; `--backend archive` keeps to
139
+ the store.
108
140
 
109
141
  What comes next, such as OAuth sign-in, is on the
110
142
  [roadmap](https://github.com/WireCatLabs/mail-cli/blob/main/docs/roadmap.md).
@@ -164,6 +196,9 @@ keyring, the store, MCP) come from [cli-base](https://github.com/WireCatLabs/cli
164
196
  mail-cli is part of [WireCat](https://wirecat.dev): an open context layer for AI agents that keeps your data on your
165
197
  computer. Start with mail. Add Telegram, MAX and notes when you need them.
166
198
 
199
+ Questions and setup help: join the [WireCat Discord](https://discord.gg/DebENqbRrJ). Bugs go to this
200
+ repository's issues.
201
+
167
202
  ## Contributing and license
168
203
 
169
204
  Pull requests, bug reports and ideas: [issues](https://github.com/WireCatLabs/mail-cli/issues).
package/dist/bin/mail.js CHANGED
@@ -9,7 +9,7 @@ if (
9
9
  (words[0] === "--version" || words[0] === "-V") &&
10
10
  !Object.keys(process.env).some((key) => key.endsWith("_TEST_ARGV_LOG"))
11
11
  ) {
12
- process.stdout.write("0.5.0\n")
12
+ process.stdout.write("0.7.0\n")
13
13
  } else {
14
14
  // Before the bundle compiles: the bundle's own call comes after its chunks.
15
15
  module.enableCompileCache()
@@ -29,7 +29,7 @@ if (
29
29
  })
30
30
  }
31
31
  const running = import("../bundle/mail.js")
32
- const chunks = ["../bundle/all-profiles-GR5JXYEQ.js","../bundle/anthropic-REBXE65F.js","../bundle/app-server-QJ7ICQXZ.js","../bundle/bun-WAX4QHW5.js","../bundle/bun-sqlite-5S7TQ4SG.js","../bundle/decode-D7BDVIVB.js","../bundle/dispatch-EUKKT3PD.js","../bundle/dist-HFUVURJG.js","../bundle/dist-KJOAJ6NF.js","../bundle/echarts-IVRX7XHP.js","../bundle/embed-X527RBTG.js","../bundle/embedder-F4PSJS6S.js","../bundle/failure-OAIC5VAP.js","../bundle/first-screen-M7MT776O.js","../bundle/instructions-UX36BT5F.js","../bundle/mcp-L7SRVDRN.js","../bundle/node-KM3CUABH.js","../bundle/node-OXT7WE2T.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-X2PSEHA4.js","../bundle/oauth-MYK4BSYN.js","../bundle/open-GONIP2DH.js","../bundle/openai-YJFNUOQT.js","../bundle/process-7IEUUSRK.js","../bundle/program-Q73TTG3E.js","../bundle/prompt-SKQ72KN7.js","../bundle/recognize-GC7CU2DB.js","../bundle/remote-UEXFZP2I.js","../bundle/rerank-2U2NDEZP.js","../bundle/serve-OOGKFEWL.js","../bundle/server-4JMHDHZ7.js","../bundle/server-FZ3LFQTF.js","../bundle/sqlite-runtime-GIQSW6LJ.js","../bundle/state-EMFXPQVZ.js","../bundle/store-BDU4UPNK.js","../bundle/store-LDI62AUG.js","../bundle/store-maintenance-command-OFRPORN2.js"]
32
+ const chunks = ["../bundle/all-profiles-SI67TKZM.js","../bundle/anthropic-DALMLC3Y.js","../bundle/app-server-XOH327Z2.js","../bundle/bun-ORL67CJ6.js","../bundle/bun-sqlite-DGXFNFHI.js","../bundle/decode-KOBURZIQ.js","../bundle/dispatch-GDAH4JHS.js","../bundle/dist-HFUVURJG.js","../bundle/dist-T7HMT675.js","../bundle/echarts-LEWTQO6H.js","../bundle/embed-PUFE4BSQ.js","../bundle/embedder-3G4BQQ6X.js","../bundle/failure-6COJAO7T.js","../bundle/first-screen-VUZEDSQW.js","../bundle/instructions-HGSXDCBT.js","../bundle/mcp-GAPDLFWA.js","../bundle/node-5Z7PS4F5.js","../bundle/node-KM3CUABH.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-OAW7APIX.js","../bundle/oauth-ZFZWPAJN.js","../bundle/open-ZQMBZVH4.js","../bundle/openai-XT2RIXAK.js","../bundle/process-VVEQIHPE.js","../bundle/program-RD3BBDNY.js","../bundle/prompt-PU7GE4Z4.js","../bundle/recognize-AG4A3KUK.js","../bundle/remote-D6TQ6T7F.js","../bundle/rerank-GO24HJPF.js","../bundle/serve-WCHJAH6G.js","../bundle/server-5KJJ3D6P.js","../bundle/server-CAVNBG3P.js","../bundle/sqlite-runtime-ANXC4AW2.js","../bundle/state-EGJ66A62.js","../bundle/store-OON7FCMQ.js","../bundle/store-SBFA444C.js","../bundle/store-maintenance-command-UEOJLYMJ.js"]
33
33
  // After the server answers its first request, so it starts no later.
34
34
  if (serves) setTimeout(() => void Promise.allSettled(chunks.map((chunk) => import(chunk))), 2000).unref()
35
35
  await running
@@ -2,28 +2,28 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  answeredWire
5
- } from "./chunk-7A7BHABA.js";
5
+ } from "./chunk-3GZK5GTU.js";
6
6
  import {
7
7
  CALLER_META_KEY,
8
8
  PROXY_CLIENT_NAME,
9
9
  StdioServerTransport,
10
10
  callerOf,
11
11
  serveStdio
12
- } from "./chunk-7XNPSIWD.js";
12
+ } from "./chunk-VNJMO5F6.js";
13
13
  import {
14
14
  McpServer
15
15
  } from "./chunk-5D4AEUVA.js";
16
- import "./chunk-WNI5BZFB.js";
17
- import "./chunk-NPGVOZVK.js";
18
- import "./chunk-J3QXTBD2.js";
19
- import "./chunk-LQ37ALDJ.js";
16
+ import "./chunk-ZNGQ3NZ4.js";
17
+ import "./chunk-WJWLHLQ7.js";
18
+ import "./chunk-Q2C3VMSU.js";
19
+ import "./chunk-NXJLC2WK.js";
20
20
  import "./chunk-Y5E2WNWB.js";
21
- import "./chunk-5BVIWP3S.js";
21
+ import "./chunk-BM445GYF.js";
22
22
  import {
23
23
  __name
24
24
  } from "./chunk-ZVVMGPBJ.js";
25
25
 
26
- // node_modules/.pnpm/@wirecat+cli-core@0.521.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_66d5ccffb8b88e4b24c051b84ef1952a/node_modules/@wirecat/cli-core/dist/mcp/all-profiles.js
26
+ // node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/mcp/all-profiles.js
27
27
  import { spawn } from "node:child_process";
28
28
  import { randomUUID } from "node:crypto";
29
29
  var PROTOCOL = "2025-06-18";
@@ -257,7 +257,7 @@ var serveAllProfilesOverStdio = /* @__PURE__ */ __name(async (options, io = {})
257
257
  }, "serveAllProfilesOverStdio");
258
258
  var serveAllProfilesOverHttp = /* @__PURE__ */ __name(async (options, http) => {
259
259
  const { build, close } = allProfilesServer(options);
260
- const { serveOverHttp } = await import("./serve-OOGKFEWL.js");
260
+ const { serveOverHttp } = await import("./serve-WCHJAH6G.js");
261
261
  const listening = await serveOverHttp(build, {
262
262
  ...http,
263
263
  appName: options.command,
@@ -5,25 +5,25 @@ import {
5
5
  } from "./chunk-XQUUANA2.js";
6
6
  import {
7
7
  checkedOptions
8
- } from "./chunk-LNS27BTB.js";
8
+ } from "./chunk-ZKZABB4K.js";
9
9
  import {
10
10
  messagesFor,
11
11
  systemFor
12
- } from "./chunk-2U4IANVV.js";
13
- import "./chunk-J3QXTBD2.js";
12
+ } from "./chunk-ZKCNMW7G.js";
13
+ import "./chunk-Q2C3VMSU.js";
14
14
  import {
15
15
  array,
16
16
  optional,
17
17
  strictObject,
18
18
  string
19
- } from "./chunk-LQ37ALDJ.js";
19
+ } from "./chunk-NXJLC2WK.js";
20
20
  import "./chunk-Y5E2WNWB.js";
21
- import "./chunk-5BVIWP3S.js";
21
+ import "./chunk-BM445GYF.js";
22
22
  import {
23
23
  __name
24
24
  } from "./chunk-ZVVMGPBJ.js";
25
25
 
26
- // node_modules/.pnpm/@wirecat+cli-core@0.521.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_66d5ccffb8b88e4b24c051b84ef1952a/node_modules/@wirecat/cli-core/dist/models/anthropic.js
26
+ // node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/models/anthropic.js
27
27
  var options = strictObject({
28
28
  stop_sequences: optional(array(string()))
29
29
  });
@@ -3,43 +3,43 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  PER_RUN,
5
5
  envelope
6
- } from "./chunk-ESNNQA7D.js";
6
+ } from "./chunk-6RMMAUUW.js";
7
7
  import {
8
8
  answered,
9
9
  failed,
10
10
  registerCommands,
11
11
  runCommandForAgent,
12
12
  toolsFromCommands
13
- } from "./chunk-VDAIJM5L.js";
13
+ } from "./chunk-MHQKHWCJ.js";
14
14
  import {
15
15
  mcpUrlOf
16
- } from "./chunk-VXAZZGXE.js";
16
+ } from "./chunk-6XNPXAJU.js";
17
17
  import {
18
18
  agentJson,
19
19
  skillResource
20
- } from "./chunk-YRGBZZUW.js";
21
- import "./chunk-5INWLYBD.js";
20
+ } from "./chunk-V4TDG4KF.js";
21
+ import "./chunk-73OJJGZE.js";
22
22
  import {
23
23
  appInstructions
24
- } from "./chunk-6EO7GVYJ.js";
24
+ } from "./chunk-JFMUI4H6.js";
25
25
  import {
26
26
  answeredWire
27
- } from "./chunk-7A7BHABA.js";
27
+ } from "./chunk-3GZK5GTU.js";
28
28
  import {
29
29
  StdioServerTransport,
30
30
  serveStdio
31
- } from "./chunk-7XNPSIWD.js";
31
+ } from "./chunk-VNJMO5F6.js";
32
32
  import {
33
33
  McpServer
34
34
  } from "./chunk-5D4AEUVA.js";
35
- import "./chunk-EB3R2PV3.js";
36
- import "./chunk-5CXAH4Y6.js";
37
- import "./chunk-M6BDHZON.js";
38
- import "./chunk-S677WGOQ.js";
39
- import "./chunk-2U4IANVV.js";
40
- import "./chunk-BFJV4FWJ.js";
41
- import "./chunk-AFCGOZR7.js";
42
- import "./chunk-WNCCYHRV.js";
35
+ import "./chunk-DKQWTQVY.js";
36
+ import "./chunk-S4YUR4S3.js";
37
+ import "./chunk-45KA5667.js";
38
+ import "./chunk-FTFNWGIR.js";
39
+ import "./chunk-ZKCNMW7G.js";
40
+ import "./chunk-BGUMGCUY.js";
41
+ import "./chunk-NNIXREJH.js";
42
+ import "./chunk-M2JCUVCJ.js";
43
43
  import {
44
44
  DEFAULT_OUTPUT_BYTES,
45
45
  changesAuthorityAt,
@@ -49,47 +49,47 @@ import {
49
49
  judgedTargets,
50
50
  readOnlyLockOf,
51
51
  rootOf2 as rootOf
52
- } from "./chunk-IBYTYIYO.js";
53
- import "./chunk-MMDCL42A.js";
54
- import "./chunk-WNI5BZFB.js";
55
- import "./chunk-ZD3WUGR2.js";
56
- import "./chunk-P7P5MNAU.js";
57
- import "./chunk-EL554DV2.js";
52
+ } from "./chunk-R5MML3FC.js";
53
+ import "./chunk-VSHJWTX5.js";
54
+ import "./chunk-ZNGQ3NZ4.js";
55
+ import "./chunk-23IEVVL2.js";
56
+ import "./chunk-QZBT6BOU.js";
57
+ import "./chunk-IYZHM3ZN.js";
58
58
  import {
59
59
  mcpHttpMarker
60
- } from "./chunk-6TY3DGCC.js";
61
- import "./chunk-HCMUGUAG.js";
62
- import "./chunk-QXOSGGKS.js";
63
- import "./chunk-CEAANMJ2.js";
64
- import "./chunk-B5WSIWY5.js";
65
- import "./chunk-2FXVBCA3.js";
66
- import "./chunk-IWDOGGMY.js";
67
- import "./chunk-7F3NDIYL.js";
68
- import "./chunk-SQ7KOBRA.js";
69
- import "./chunk-5FK6RD4M.js";
70
- import "./chunk-NPGVOZVK.js";
71
- import "./chunk-7JCRQX56.js";
72
- import "./chunk-LOA4X6JW.js";
73
- import "./chunk-2MRECWJZ.js";
74
- import "./chunk-KIDF77MA.js";
75
- import "./chunk-QX7RCLRS.js";
60
+ } from "./chunk-DXGMPMFP.js";
61
+ import "./chunk-5JEYIHS6.js";
62
+ import "./chunk-6LK7KTWB.js";
63
+ import "./chunk-RQVWZBW3.js";
64
+ import "./chunk-2M4K7HYR.js";
65
+ import "./chunk-5BSEGMNE.js";
66
+ import "./chunk-35KD2CI2.js";
67
+ import "./chunk-MCJ7LKYR.js";
68
+ import "./chunk-MMXMVGA6.js";
69
+ import "./chunk-VBOMKZ4E.js";
70
+ import "./chunk-GJUUTUK4.js";
71
+ import "./chunk-4NYWHINR.js";
72
+ import "./chunk-XQJWMBDY.js";
73
+ import "./chunk-AP7V256W.js";
74
+ import "./chunk-SQLCCKEL.js";
75
+ import "./chunk-WJWLHLQ7.js";
76
76
  import "./chunk-D72URWJE.js";
77
- import "./chunk-F3NYA4KN.js";
78
- import "./chunk-JJBQPA7D.js";
79
- import "./chunk-SWJAG5IE.js";
80
- import "./chunk-J3QXTBD2.js";
77
+ import "./chunk-CAKBG5FC.js";
78
+ import "./chunk-3TYEJRMZ.js";
79
+ import "./chunk-Q44AYEOB.js";
80
+ import "./chunk-Q2C3VMSU.js";
81
81
  import {
82
82
  mcpErrorResult
83
- } from "./chunk-LQ37ALDJ.js";
83
+ } from "./chunk-NXJLC2WK.js";
84
84
  import "./chunk-Y5E2WNWB.js";
85
85
  import {
86
86
  CliError
87
- } from "./chunk-5BVIWP3S.js";
87
+ } from "./chunk-BM445GYF.js";
88
88
  import {
89
89
  __name
90
90
  } from "./chunk-ZVVMGPBJ.js";
91
91
 
92
- // node_modules/.pnpm/@wirecat+cli-core@0.521.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_66d5ccffb8b88e4b24c051b84ef1952a/node_modules/@wirecat/cli-core/dist/mcp/app-server.js
92
+ // node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/mcp/app-server.js
93
93
  var EXCLUDED = [["mcp"]];
94
94
  var createAppServer = /* @__PURE__ */ __name((command, context, options) => {
95
95
  const { app } = options;
@@ -204,7 +204,7 @@ var serveAppOverStdio = /* @__PURE__ */ __name(async (command, context, options)
204
204
  var serveAppOverHttp = /* @__PURE__ */ __name(async (command, context, options, http) => {
205
205
  const { app } = options;
206
206
  const { build } = createAppServer(command, context, options);
207
- const { serveOverHttp } = await import("./serve-OOGKFEWL.js");
207
+ const { serveOverHttp } = await import("./serve-WCHJAH6G.js");
208
208
  const listening = await serveOverHttp(build, {
209
209
  ...http,
210
210
  appName: app.command,
@@ -18,12 +18,12 @@ import {
18
18
  jitCompatCheck,
19
19
  refineSqliteCodecs,
20
20
  sql
21
- } from "./chunk-KIDF77MA.js";
21
+ } from "./chunk-AP7V256W.js";
22
22
  import {
23
23
  __name
24
24
  } from "./chunk-ZVVMGPBJ.js";
25
25
 
26
- // node_modules/.pnpm/@wirecat+cli-core@0.521.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_66d5ccffb8b88e4b24c051b84ef1952a/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/bun.js
26
+ // node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/bun.js
27
27
  import { Database } from "bun:sqlite";
28
28
  var bunSQLiteCodecs = refineSqliteCodecs({
29
29
  "integer:boolean": { normalize: booleanFromInteger },
@@ -3,18 +3,18 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  loadVectorExtension,
5
5
  vectorExtension
6
- } from "./chunk-MQUJEQTU.js";
7
- import "./chunk-J3QXTBD2.js";
8
- import "./chunk-LQ37ALDJ.js";
6
+ } from "./chunk-VKPWP3AK.js";
7
+ import "./chunk-Q2C3VMSU.js";
8
+ import "./chunk-NXJLC2WK.js";
9
9
  import {
10
10
  importFrom
11
11
  } from "./chunk-Y5E2WNWB.js";
12
- import "./chunk-5BVIWP3S.js";
12
+ import "./chunk-BM445GYF.js";
13
13
  import {
14
14
  __name
15
15
  } from "./chunk-ZVVMGPBJ.js";
16
16
 
17
- // node_modules/.pnpm/@wirecat+cli-core@0.521.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_66d5ccffb8b88e4b24c051b84ef1952a/node_modules/@wirecat/cli-core/dist/store/drivers/bun-sqlite.js
17
+ // node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/drivers/bun-sqlite.js
18
18
  var customised = false;
19
19
  var ownLibrary = /* @__PURE__ */ __name(async () => {
20
20
  try {
@@ -3,26 +3,26 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  executableEnvironment,
5
5
  executableOnPath
6
- } from "./chunk-P7P5MNAU.js";
6
+ } from "./chunk-QZBT6BOU.js";
7
7
  import {
8
8
  require_cross_spawn
9
9
  } from "./chunk-D72URWJE.js";
10
10
  import {
11
11
  loadConfigFile,
12
12
  saveConfigFile
13
- } from "./chunk-J3QXTBD2.js";
13
+ } from "./chunk-Q2C3VMSU.js";
14
14
  import {
15
15
  number,
16
16
  object,
17
17
  optional,
18
18
  string
19
- } from "./chunk-LQ37ALDJ.js";
19
+ } from "./chunk-NXJLC2WK.js";
20
20
  import {
21
21
  __name,
22
22
  __toESM
23
23
  } from "./chunk-ZVVMGPBJ.js";
24
24
 
25
- // node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/update/index.js
25
+ // node_modules/.pnpm/@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/update/index.js
26
26
  var import_cross_spawn = __toESM(require_cross_spawn(), 1);
27
27
  import { existsSync } from "node:fs";
28
28
  var updateCommand = /* @__PURE__ */ __name((installer, packageName) => {