@wirecat/mail-cli 0.1.0 → 0.2.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 (212) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +37 -11
  3. package/dist/bin/mail.js +2 -2
  4. package/dist/bundle/{all-profiles-TKMBELRZ.js → all-profiles-7WILOT5E.js} +5 -5
  5. package/dist/bundle/{anthropic-7LMUAEIZ.js → anthropic-NHWLIMEZ.js} +3 -3
  6. package/dist/bundle/{app-server-JGMIJDD4.js → app-server-XDMYCJLV.js} +39 -39
  7. package/dist/bundle/{bun-XRO6XJHQ.js → bun-GTG5IYLQ.js} +2 -2
  8. package/dist/bundle/{bun-sqlite-Z54LEHVM.js → bun-sqlite-KGH5F33G.js} +2 -2
  9. package/dist/bundle/{chunk-JVMVLITS.js → chunk-2X4WYZPA.js} +4 -2
  10. package/dist/bundle/{chunk-GN62YOT5.js → chunk-4I3YT5KK.js} +4 -4
  11. package/dist/bundle/{chunk-MS53RALV.js → chunk-5FLW25US.js} +5 -5
  12. package/dist/bundle/{chunk-FZ5FXIG6.js → chunk-5JOKRFWE.js} +1 -1
  13. package/dist/bundle/{chunk-KHTO2Q6E.js → chunk-6HIW7IJL.js} +4 -4
  14. package/dist/bundle/{chunk-TVREDYX4.js → chunk-76IKLP2M.js} +95 -91
  15. package/dist/bundle/{chunk-ZANYM66S.js → chunk-77VHMI3A.js} +1 -1
  16. package/dist/bundle/{chunk-TQFCPUIM.js → chunk-7LKJDJNS.js} +1 -1
  17. package/dist/bundle/{chunk-WLFLBWNH.js → chunk-7QEE5I7H.js} +2 -2
  18. package/dist/bundle/{chunk-6MAZWSC3.js → chunk-7REG25RM.js} +3 -3
  19. package/dist/bundle/{chunk-TWTATDM7.js → chunk-AJIT2T3F.js} +6 -6
  20. package/dist/bundle/{chunk-JBBZCTTF.js → chunk-AROBJF5P.js} +1 -1
  21. package/dist/bundle/{chunk-NK7EB63L.js → chunk-BKZEYTLU.js} +849 -440
  22. package/dist/bundle/{chunk-4FEMINO2.js → chunk-BPF7IXJT.js} +5 -5
  23. package/dist/bundle/{chunk-BTQX2ZSZ.js → chunk-BUOSCMCD.js} +2 -2
  24. package/dist/bundle/{chunk-5NYMNSSO.js → chunk-CT7NG7BI.js} +3 -3
  25. package/dist/bundle/{chunk-TWPDVUBR.js → chunk-D7UZXUSB.js} +2 -2
  26. package/dist/bundle/{chunk-OTUOZ33L.js → chunk-DDMJ3RVO.js} +2 -2
  27. package/dist/bundle/{chunk-3KEVLSNN.js → chunk-EKE3R36Y.js} +46 -8
  28. package/dist/bundle/{chunk-YO4CUH5E.js → chunk-ETPT7TPW.js} +1 -1
  29. package/dist/bundle/{chunk-3KOA73LS.js → chunk-GPAAQ6LY.js} +14 -14
  30. package/dist/bundle/{chunk-GQQJOH7A.js → chunk-GQKYSGIA.js} +58 -46
  31. package/dist/bundle/{chunk-QLEUNU6G.js → chunk-H5BW7454.js} +4 -4
  32. package/dist/bundle/{chunk-KM7Q67Z3.js → chunk-H66ZMBDD.js} +1 -1
  33. package/dist/bundle/{chunk-VEIZZRQ5.js → chunk-H7NUGJPV.js} +12 -3
  34. package/dist/bundle/{chunk-2LLNPNMB.js → chunk-H7XOHNRY.js} +1 -1
  35. package/dist/bundle/{chunk-F6D6PJ34.js → chunk-HJRUFT5Y.js} +5 -5
  36. package/dist/bundle/{chunk-5WGEUDE4.js → chunk-MABCR67K.js} +1 -1
  37. package/dist/bundle/{chunk-IK5TH3O7.js → chunk-MDVXIPA3.js} +10 -10
  38. package/dist/bundle/{chunk-YPQQ5J4X.js → chunk-QJHCKFFC.js} +16 -16
  39. package/dist/bundle/{chunk-Z34ICZA3.js → chunk-QLYHLW54.js} +5 -5
  40. package/dist/bundle/{chunk-7SXGLT6T.js → chunk-QUGFBY7O.js} +9 -8
  41. package/dist/bundle/{chunk-CEW6KIFA.js → chunk-QUSZWBZF.js} +21 -21
  42. package/dist/bundle/{chunk-FDCGTODC.js → chunk-R5JD4GMA.js} +1 -1
  43. package/dist/bundle/{chunk-K4FVKPDQ.js → chunk-S2GSU4MT.js} +9 -9
  44. package/dist/bundle/{chunk-T6464KYA.js → chunk-STC45HZX.js} +204 -203
  45. package/dist/bundle/{chunk-75CWWETH.js → chunk-SVNTRF5O.js} +11 -11
  46. package/dist/bundle/{chunk-GWDCKUBI.js → chunk-THVLMTH7.js} +30 -29
  47. package/dist/bundle/{chunk-4E7BN3TC.js → chunk-TMVIQJCG.js} +2 -2
  48. package/dist/bundle/{chunk-EOEDICIE.js → chunk-UZR3IKS7.js} +1 -1
  49. package/dist/bundle/{chunk-CH6RXYAX.js → chunk-VBLFQJY3.js} +1 -1
  50. package/dist/bundle/{chunk-GAH7N7HO.js → chunk-VRQRBVKT.js} +44 -44
  51. package/dist/bundle/{chunk-GK4M2SUP.js → chunk-VWO3XXSF.js} +1 -1
  52. package/dist/bundle/{chunk-QQB7WT7R.js → chunk-WJ3LUWRN.js} +3 -3
  53. package/dist/bundle/{chunk-3E3WA2L6.js → chunk-Y5WA7AOA.js} +21 -21
  54. package/dist/bundle/{chunk-TE5U5OAM.js → chunk-Y6KUKIQZ.js} +2 -2
  55. package/dist/bundle/{chunk-J6MSJLIW.js → chunk-YQAUH3PN.js} +1 -1
  56. package/dist/bundle/{chunk-MNOIRJEO.js → chunk-Z6F7EXT2.js} +7 -7
  57. package/dist/bundle/{chunk-WXAXYJJ7.js → chunk-ZKH5CHGI.js} +5 -5
  58. package/dist/bundle/{chunk-UH4DDRHA.js → chunk-ZNYJG4AY.js} +42 -42
  59. package/dist/bundle/{command-contract-WU434ZUL.js → command-contract-Y42ULKE5.js} +13 -13
  60. package/dist/bundle/{decode-YB3ZDTES.js → decode-L4X542L3.js} +2 -2
  61. package/dist/bundle/{dist-X36THCOF.js → dist-HFUVURJG.js} +1 -1
  62. package/dist/bundle/{dist-A6GKSKFC.js → dist-WKIRHOLK.js} +14 -14
  63. package/dist/bundle/{echarts-YNGCOYHW.js → echarts-G6QLXR4X.js} +2 -2
  64. package/dist/bundle/{embed-LWNHIRBQ.js → embed-E33ZBHQR.js} +3 -3
  65. package/dist/bundle/{embedder-2LYD3U37.js → embedder-EMBCIVGF.js} +6 -6
  66. package/dist/bundle/{first-run-N3HJKGU7.js → first-run-WF2HF5FI.js} +5 -5
  67. package/dist/bundle/{first-screen-4U2DMV3G.js → first-screen-DZFOUUZC.js} +14 -14
  68. package/dist/bundle/{instructions-GJHHFV64.js → instructions-DUH7265J.js} +1 -1
  69. package/dist/bundle/mail.js +2 -2
  70. package/dist/bundle/{node-GFOH6FKP.js → node-73PKCCE7.js} +2 -2
  71. package/dist/bundle/{node-sqlite-NBXQXBIU.js → node-sqlite-FDD5N6GC.js} +2 -2
  72. package/dist/bundle/{oauth-56EFO5AQ.js → oauth-ND3K2F7B.js} +4 -4
  73. package/dist/bundle/{open-2V7QZQJP.js → open-FZYY6TKE.js} +1 -1
  74. package/dist/bundle/{openai-V3SVACVL.js → openai-BXOF6XIM.js} +10 -10
  75. package/dist/bundle/{process-XVDX4SPD.js → process-TXIK4VJP.js} +1 -1
  76. package/dist/bundle/{program-ILID6EAT.js → program-2SUR4WOS.js} +1700 -1459
  77. package/dist/bundle/{prompt-YKWAI222.js → prompt-I5GCP73M.js} +2 -2
  78. package/dist/bundle/{recognize-PAR66KVM.js → recognize-ILYEKXVB.js} +1 -1
  79. package/dist/bundle/{remote-CE43TKXC.js → remote-SSPZEAJ7.js} +4 -4
  80. package/dist/bundle/{rerank-M7S7P2TW.js → rerank-NAO5RMGB.js} +4 -4
  81. package/dist/bundle/{serve-ENPMIV6J.js → serve-UDXIEQKC.js} +6 -6
  82. package/dist/bundle/{server-MBEZLVKZ.js → server-KTPELKAN.js} +31 -31
  83. package/dist/bundle/server-UZFSEKNJ.js +63 -0
  84. package/dist/bundle/{sqlite-runtime-HVGDHBJJ.js → sqlite-runtime-AONFLND6.js} +2 -2
  85. package/dist/bundle/{state-QZSOSKBD.js → state-I4PLX3UB.js} +3 -3
  86. package/dist/bundle/{store-UJ7SNKXI.js → store-OHQH3MGN.js} +30 -12
  87. package/dist/bundle/{store-2BUX6LVX.js → store-ZPPRXGPY.js} +9 -9
  88. package/dist/bundle/store-maintenance-command-QOYXEBT6.js +52 -0
  89. package/dist/commands/account.d.ts.map +1 -1
  90. package/dist/commands/account.js +6 -5
  91. package/dist/commands/account.js.map +1 -1
  92. package/dist/commands/context.d.ts +19 -8
  93. package/dist/commands/context.d.ts.map +1 -1
  94. package/dist/commands/context.js +14 -10
  95. package/dist/commands/context.js.map +1 -1
  96. package/dist/commands/folders.js +4 -4
  97. package/dist/commands/folders.js.map +1 -1
  98. package/dist/commands/login.d.ts +2 -2
  99. package/dist/commands/login.d.ts.map +1 -1
  100. package/dist/commands/login.js +3 -5
  101. package/dist/commands/login.js.map +1 -1
  102. package/dist/commands/mailbox.d.ts +2 -1
  103. package/dist/commands/mailbox.d.ts.map +1 -1
  104. package/dist/commands/mailbox.js.map +1 -1
  105. package/dist/commands/session-start.d.ts +3 -0
  106. package/dist/commands/session-start.d.ts.map +1 -0
  107. package/dist/commands/session-start.js +117 -0
  108. package/dist/commands/session-start.js.map +1 -0
  109. package/dist/commands/session.d.ts.map +1 -1
  110. package/dist/commands/session.js +9 -117
  111. package/dist/commands/session.js.map +1 -1
  112. package/dist/commands/status.d.ts.map +1 -1
  113. package/dist/commands/status.js +8 -20
  114. package/dist/commands/status.js.map +1 -1
  115. package/dist/commands/sync.d.ts.map +1 -1
  116. package/dist/commands/sync.js +49 -26
  117. package/dist/commands/sync.js.map +1 -1
  118. package/dist/config.d.ts +2 -0
  119. package/dist/config.d.ts.map +1 -1
  120. package/dist/config.js +4 -0
  121. package/dist/config.js.map +1 -1
  122. package/dist/discovery.d.ts +4 -15
  123. package/dist/discovery.d.ts.map +1 -1
  124. package/dist/discovery.js +19 -92
  125. package/dist/discovery.js.map +1 -1
  126. package/dist/mail/backend.d.ts +36 -0
  127. package/dist/mail/backend.d.ts.map +1 -0
  128. package/dist/mail/backend.js +2 -0
  129. package/dist/mail/backend.js.map +1 -0
  130. package/dist/mail/imap/account.d.ts +5 -0
  131. package/dist/mail/imap/account.d.ts.map +1 -0
  132. package/dist/mail/imap/account.js +41 -0
  133. package/dist/mail/imap/account.js.map +1 -0
  134. package/dist/mail/imap/connection.d.ts +62 -0
  135. package/dist/mail/imap/connection.d.ts.map +1 -0
  136. package/dist/mail/imap/connection.js +188 -0
  137. package/dist/mail/imap/connection.js.map +1 -0
  138. package/dist/mail/{imap-errors.d.ts → imap/errors.d.ts} +1 -1
  139. package/dist/mail/imap/errors.d.ts.map +1 -0
  140. package/dist/mail/{imap-errors.js → imap/errors.js} +1 -1
  141. package/dist/mail/imap/errors.js.map +1 -0
  142. package/dist/mail/imap/index.d.ts +7 -0
  143. package/dist/mail/imap/index.d.ts.map +1 -0
  144. package/dist/mail/imap/index.js +11 -0
  145. package/dist/mail/imap/index.js.map +1 -0
  146. package/dist/mail/{imap-messages.d.ts → imap/messages.d.ts} +9 -9
  147. package/dist/mail/imap/messages.d.ts.map +1 -0
  148. package/dist/mail/imap/messages.js +66 -0
  149. package/dist/mail/imap/messages.js.map +1 -0
  150. package/dist/mail/imap/read.d.ts +7 -0
  151. package/dist/mail/imap/read.d.ts.map +1 -0
  152. package/dist/mail/imap/read.js +164 -0
  153. package/dist/mail/imap/read.js.map +1 -0
  154. package/dist/mail/rethread.d.ts +15 -0
  155. package/dist/mail/rethread.d.ts.map +1 -0
  156. package/dist/mail/rethread.js +52 -0
  157. package/dist/mail/rethread.js.map +1 -0
  158. package/dist/profile.d.ts +2 -1
  159. package/dist/profile.d.ts.map +1 -1
  160. package/dist/profile.js +1 -0
  161. package/dist/profile.js.map +1 -1
  162. package/dist/providers.d.ts +126 -26
  163. package/dist/providers.d.ts.map +1 -1
  164. package/dist/providers.js +141 -72
  165. package/dist/providers.js.map +1 -1
  166. package/dist/secret.d.ts +2 -1
  167. package/dist/secret.d.ts.map +1 -1
  168. package/dist/secret.js +1 -0
  169. package/dist/secret.js.map +1 -1
  170. package/dist/version.d.ts +1 -1
  171. package/dist/version.js +1 -1
  172. package/package.json +3 -2
  173. package/skills/mail-cli/SKILL.md +8 -0
  174. package/dist/bundle/server-JRTHUCVY.js +0 -63
  175. package/dist/bundle/store-maintenance-command-I7V5C44K.js +0 -52
  176. package/dist/commands/doctor.d.ts +0 -77
  177. package/dist/commands/doctor.d.ts.map +0 -1
  178. package/dist/commands/doctor.js +0 -74
  179. package/dist/commands/doctor.js.map +0 -1
  180. package/dist/commands/mcp.d.ts +0 -3
  181. package/dist/commands/mcp.d.ts.map +0 -1
  182. package/dist/commands/mcp.js +0 -97
  183. package/dist/commands/mcp.js.map +0 -1
  184. package/dist/commands/setup.d.ts +0 -3
  185. package/dist/commands/setup.d.ts.map +0 -1
  186. package/dist/commands/setup.js +0 -156
  187. package/dist/commands/setup.js.map +0 -1
  188. package/dist/mail/imap-errors.d.ts.map +0 -1
  189. package/dist/mail/imap-errors.js.map +0 -1
  190. package/dist/mail/imap-messages.d.ts.map +0 -1
  191. package/dist/mail/imap-messages.js +0 -66
  192. package/dist/mail/imap-messages.js.map +0 -1
  193. package/dist/mail/imap.d.ts +0 -67
  194. package/dist/mail/imap.d.ts.map +0 -1
  195. package/dist/mail/imap.js +0 -348
  196. package/dist/mail/imap.js.map +0 -1
  197. package/dist/mail/parse.d.ts +0 -18
  198. package/dist/mail/parse.d.ts.map +0 -1
  199. package/dist/mail/parse.js +0 -31
  200. package/dist/mail/parse.js.map +0 -1
  201. package/dist/mail/port.d.ts +0 -50
  202. package/dist/mail/port.d.ts.map +0 -1
  203. package/dist/mail/port.js +0 -4
  204. package/dist/mail/port.js.map +0 -1
  205. package/dist/mcp.d.ts +0 -29
  206. package/dist/mcp.d.ts.map +0 -1
  207. package/dist/mcp.js +0 -98
  208. package/dist/mcp.js.map +0 -1
  209. package/dist/sync.d.ts +0 -26
  210. package/dist/sync.d.ts.map +0 -1
  211. package/dist/sync.js +0 -75
  212. package/dist/sync.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,60 @@
2
2
 
3
3
  Notable changes to `@wirecat/mail-cli`. One section per version, newest first.
4
4
 
5
+ ## 0.2.0 — 01.11.2026
6
+
7
+ ### Added
8
+
9
+ - **The skill on ClawHub names its program and npm package**, so an OpenClaw user is told to install `@wirecat/mail-cli`
10
+ before the skill works, as with the other WireCat skills.
11
+ - **mail's MCP server is listed in the official MCP Registry** as `dev.wirecat/mail-cli`.
12
+ - **`session start` prints the server it found before it sends the password**: host, port, security and login, so
13
+ a wrong guess of discovery is seen before the password goes to it.
14
+ - **A new profile saves how it signs in (`auth`).** A profile saved before keeps working with its `imap_*` settings and
15
+ signs in with an app password, with nothing to migrate.
16
+
17
+ ### Changed — may break callers
18
+
19
+ - **`sync` reads All Mail on Gmail when the profile names no folders.** Archived Gmail mail leaves INBOX, so a sync of
20
+ INBOX alone took it for deleted. All Mail is found by its role, so a Gmail account in another language works too.
21
+ - **Headers are read as memo reads them.** A mailing list's `List-Id` is stored without its angle
22
+ brackets and in lower case, and Reply-To, Gmail's SPF, DKIM and DMARC verdicts and the attachment hint are read at
23
+ list time, so the owner's rules see the same fields in both tools.
24
+
25
+ ### Fixed
26
+
27
+ - **`sync` applies the account's stored mail rules, as memo does.** A skip or envelope rule decided in memo now holds
28
+ for `mail sync` too, and both tools keep the same saved position, which holds a fingerprint of the rules. A Gmail
29
+ profile syncs in Gmail mode, as memo does.
30
+ - **Gmail labels are named as memo names them** (`Inbox`, `Sent`, `Starred`, decoded names), so stored `label:Inbox`
31
+ mailboxes keep matching and nothing is stored as `label:\Inbox`.
32
+ - **`sync --rescan` moves replies stored by 0.1 into their thread** on a server without thread ids, such as Yandex.
33
+ The answer says how many in `rethreaded`. Gmail's threads are not touched.
34
+ - **A reply is stored in its conversation on servers without thread ids, such as Yandex and Mail.ru.** The thread is
35
+ the first email named in References, else in In-Reply-To. Mail stored before moves with `sync --rescan`
36
+ (above). Gmail keeps its own ids.
37
+ - **Every command that asks the server is bound by the run's deadline and Ctrl-C.** `session start` and
38
+ `session status --check` opened the mailbox on their own, without the deadline or the abort the other commands
39
+ had, and a source could reconnect after it was closed.
40
+ - **`sync` asks for at most 20 MB of message bodies in one request**, as well as at most 15 messages, so a batch of
41
+ large attachments does not hold a connection for minutes or fill memory.
42
+ - **The schemas of `account check` and `session status` name `file` as a password source.** A password kept in the
43
+ private file was answered as `file` while the published schema allowed only `environment`, `keyring` and
44
+ `himalaya`, so a client that checks answers against the schema refused it.
45
+ - **A `sync` that `--limit` stopped says so.** It answers `stopped: "limit"` and how many new emails it left in
46
+ `remaining`, and its next step says the run saved the emails `--limit` allows, instead of saying it stopped to
47
+ answer in time.
48
+
49
+ ## 0.1.1 — 01.11.2026
50
+
51
+ ### Fixed
52
+
53
+ - **The docs take you from `sync` to a first found email, and say how the password is really kept.** Installation,
54
+ usage and the docs index end with `memo search mail`, since `mail` fills the shared store and memo searches it. The
55
+ password is kept in the keyring, falls back to a private file when the keyring fails, and can come from
56
+ `MAIL_PASSWORD`; it is never read from stdin. `rate_limited` names both causes: the server limiting the account, and
57
+ `sync` running out of its own request budget. The docs also say that `memo mail delete` moves Gmail mail to Trash.
58
+
5
59
  ## 0.1.0 — 31.10.2026
6
60
 
7
61
  ### Added
package/README.md CHANGED
@@ -2,12 +2,14 @@
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
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 does not search or show mail itself: you read and search the stored mail in memo.
5
6
 
6
- [Documentation](https://github.com/WireCatLabs/mail-cli/blob/main/docs/index.md) · [WireCat](https://wirecat.dev)
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)
7
8
 
8
9
  [![npm](https://img.shields.io/npm/v/@wirecat/mail-cli)](https://www.npmjs.com/package/@wirecat/mail-cli)
9
10
  [![CI](https://github.com/WireCatLabs/mail-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/WireCatLabs/mail-cli/actions/workflows/ci.yml)
10
11
  [![Node](https://img.shields.io/node/v/@wirecat/mail-cli)](https://nodejs.org/)
12
+ [![npm downloads](https://img.shields.io/npm/dm/@wirecat/mail-cli)](https://www.npmjs.com/package/@wirecat/mail-cli)
11
13
  [![License: Apache 2.0](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
12
14
 
13
15
  ## Quick start
@@ -22,14 +24,19 @@ mail ya session start --address me@example.com # finds the server, shows the s
22
24
  mail ya account check # logs in and lists what the server supports
23
25
  mail ya sync # reads the last 30 days into the shared store
24
26
  mail ya status # how far the sync is
27
+ mail skill install # optional: instructions for your AI agent
25
28
  ```
26
29
 
27
- You need Node.js 22.16 or a later 22.x, or 24 or later.
30
+ Now the mail is in the store. Search and read it in [memo](https://github.com/WireCatLabs/cli-memo), for example
31
+ `memo search mail "invoice"`. `mail` has no command to read a message.
32
+
33
+ You need Node.js 22.16 or a later 22.x, or 24 or later. To try it with no install, run
34
+ `npx @wirecat/mail-cli --help`. If `mail` is not found, `mail doctor` says why.
28
35
 
29
36
  ## What you can do
30
37
 
31
- - **Sync a mailbox into the shared store.** `sync` reads INBOX and Sent, or the folders you name, newest first, and
32
- skips what is already stored. `--since-time 2026-10-01` reads from local midnight of that day.
38
+ - **Sync a mailbox into the shared store.** `sync` reads INBOX and Sent (All Mail on Gmail), or the folders you name,
39
+ newest first, and skips what is already stored. `--since-time 2026-10-01` reads from local midnight of that day.
33
40
  - **Search and read the mail with memo.** `mail` only fills the store;
34
41
  [memo](https://github.com/WireCatLabs/cli-memo) searches your mail together with your messages and notes.
35
42
  - **Sync a big mailbox in parts.** A run stops before its deadline, keeps what it read and tells you to run it again;
@@ -41,12 +48,18 @@ You need Node.js 22.16 or a later 22.x, or 24 or later.
41
48
 
42
49
  ```sh
43
50
  mail skill install # instructions for Claude Code, Codex, Gemini CLI and OpenClaw
44
- claude mcp add mail -- mail ya mcp serve # the profile's commands as MCP tools
51
+ mail ya mcp add claude-code --allow-writes # or codex: adds this profile's MCP server
52
+ mail ya mcp config # the entry for Claude Desktop, Cursor and others
45
53
  ```
46
54
 
47
- Every command takes `--json` and answers one JSON value on stdout; errors are JSON on stderr with a code to branch
55
+ `mcp add` stops until you pass `--allow-writes`, because the server's `write` tool runs commands that change local
56
+ settings, such as `config set` and `skill install`. `sync` runs through `read`: it writes only into the store, never
57
+ into the mailbox. Check the profile's permissions first.
58
+
59
+ Every command except `mcp serve` takes `--json` and answers one JSON value on stdout; errors are JSON on stderr with a code to branch
48
60
  on. Over MCP an agent finds the commands with a search tool and runs them through a `read` and a `write` tool; the
49
- profile's permissions decide what runs. Everything in a message is written by someone else: an agent must treat it
61
+ profile's permissions decide what runs. For ChatGPT and Claude in the browser, `mcp serve --http` runs behind your
62
+ own tunnel. Everything in a message is written by someone else: an agent must treat it
50
63
  as data, never as instructions.
51
64
 
52
65
  ## Why mail
@@ -54,7 +67,7 @@ as data, never as instructions.
54
67
  - **Your mail stays on your computer.** The store is a local file; no WireCat server sees your mail.
55
68
  - **One store for every tool.** Mail sits next to Telegram, MAX and WhatsApp messages, meetings and notes, so one
56
69
  search in memo finds a person's mail and messages together.
57
- - **Read-only by design.** `mail` cannot send, move or delete mail, so an agent that uses it cannot either.
70
+ - **Read-only by design.** `mail` cannot send, move or delete mail, so an agent that uses only `mail` cannot either.
58
71
  - **It works with the mailbox you have.** Yandex, Gmail, iCloud, Mail.ru, Fastmail and other servers with IMAP and
59
72
  app passwords; the server of a domain it does not know is found for you.
60
73
 
@@ -76,18 +89,28 @@ Settings live in one `config.json`, per profile, with `mail <profile> config sho
76
89
  permissions decide what a command may do (`allow`, `ask`, `readonly` or `deny`); `MAIL_READ_ONLY=1` refuses every
77
90
  write. See [settings](https://github.com/WireCatLabs/mail-cli/blob/main/docs/configuration.md).
78
91
 
92
+ ```sh
93
+ mail ya config set permissions.sync readonly # this profile cannot sync
94
+ mail ya config show # every setting and where it came from
95
+ ```
96
+
79
97
  ## Limits
80
98
 
81
- - Read-only: no sending, moving, flagging or deleting.
99
+ - Read-only: `mail` never sends, moves, flags or deletes mail. But memo has `memo mail delete`, which moves Gmail mail
100
+ to Trash, so an agent with write access to memo can change mail.
82
101
  - Text and headers only: attachments are not stored.
83
102
  - No OAuth yet, so no Outlook or Microsoft 365, and no Google Workspace domain that turns app passwords off.
84
103
  - Gmail caps IMAP downloads at 2,500 MB a day; a new Yandex app password can take 2 to 3 hours to work.
85
104
  - `mail` has no search of its own: search and read through memo.
86
105
 
106
+ What comes next, such as OAuth sign-in, is on the
107
+ [roadmap](https://github.com/WireCatLabs/mail-cli/blob/main/docs/roadmap.md).
108
+
87
109
  ## Security
88
110
 
89
- - The app password is typed with no echo and kept in the OS keyring, never in a file, an argument or a log, and only
90
- after the server accepted it.
111
+ - The app password is typed with no echo, or read from `MAIL_PASSWORD` when there is no terminal. It is kept in the
112
+ OS keyring, only after the server accepted it. If the keyring fails, it goes to a private file (mode 600). It is
113
+ never an argument, never in `config.json` or a log. `mail` also reads the entry Himalaya left.
91
114
  - Every connection to the mail server uses TLS or STARTTLS; one with no encryption is refused.
92
115
  - To find the server of a new address, `session start` sends the domain, never the address, to your DNS resolver,
93
116
  `autoconfig.thunderbird.net` and `autoconfig.<domain>`. `--provider` or `--host` skips it.
@@ -116,6 +139,9 @@ See [when something goes wrong](https://github.com/WireCatLabs/mail-cli/blob/mai
116
139
  | When something goes wrong | [troubleshooting](https://github.com/WireCatLabs/mail-cli/blob/main/docs/troubleshooting.md) · [security](https://github.com/WireCatLabs/mail-cli/blob/main/docs/security.md) |
117
140
  | Project | [roadmap](https://github.com/WireCatLabs/mail-cli/blob/main/docs/roadmap.md) · [changelog](https://github.com/WireCatLabs/mail-cli/blob/main/CHANGELOG.md) |
118
141
 
142
+ For developers: [design](https://github.com/WireCatLabs/mail-cli/blob/main/docs/dev/DESIGN.md) and
143
+ [tests](https://github.com/WireCatLabs/mail-cli/blob/main/docs/dev/TESTING.md).
144
+
119
145
  ## Development
120
146
 
121
147
  ```sh
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.1.0\n")
12
+ process.stdout.write("0.2.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-TKMBELRZ.js","../bundle/anthropic-7LMUAEIZ.js","../bundle/app-server-JGMIJDD4.js","../bundle/bun-XRO6XJHQ.js","../bundle/bun-sqlite-Z54LEHVM.js","../bundle/decode-YB3ZDTES.js","../bundle/dispatch-EUKKT3PD.js","../bundle/dist-A6GKSKFC.js","../bundle/dist-X36THCOF.js","../bundle/echarts-YNGCOYHW.js","../bundle/embed-LWNHIRBQ.js","../bundle/embedder-2LYD3U37.js","../bundle/failure-OAIC5VAP.js","../bundle/first-screen-4U2DMV3G.js","../bundle/instructions-GJHHFV64.js","../bundle/mcp-L7SRVDRN.js","../bundle/node-GFOH6FKP.js","../bundle/node-KM3CUABH.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-NBXQXBIU.js","../bundle/oauth-56EFO5AQ.js","../bundle/open-2V7QZQJP.js","../bundle/openai-V3SVACVL.js","../bundle/process-XVDX4SPD.js","../bundle/program-ILID6EAT.js","../bundle/prompt-YKWAI222.js","../bundle/recognize-PAR66KVM.js","../bundle/remote-CE43TKXC.js","../bundle/rerank-M7S7P2TW.js","../bundle/serve-ENPMIV6J.js","../bundle/server-JRTHUCVY.js","../bundle/server-MBEZLVKZ.js","../bundle/sqlite-runtime-HVGDHBJJ.js","../bundle/state-QZSOSKBD.js","../bundle/store-2BUX6LVX.js","../bundle/store-UJ7SNKXI.js","../bundle/store-maintenance-command-I7V5C44K.js"]
32
+ const chunks = ["../bundle/all-profiles-7WILOT5E.js","../bundle/anthropic-NHWLIMEZ.js","../bundle/app-server-XDMYCJLV.js","../bundle/bun-GTG5IYLQ.js","../bundle/bun-sqlite-KGH5F33G.js","../bundle/decode-L4X542L3.js","../bundle/dispatch-EUKKT3PD.js","../bundle/dist-HFUVURJG.js","../bundle/dist-WKIRHOLK.js","../bundle/echarts-G6QLXR4X.js","../bundle/embed-E33ZBHQR.js","../bundle/embedder-EMBCIVGF.js","../bundle/failure-OAIC5VAP.js","../bundle/first-screen-DZFOUUZC.js","../bundle/instructions-DUH7265J.js","../bundle/mcp-L7SRVDRN.js","../bundle/node-73PKCCE7.js","../bundle/node-KM3CUABH.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-FDD5N6GC.js","../bundle/oauth-ND3K2F7B.js","../bundle/open-FZYY6TKE.js","../bundle/openai-BXOF6XIM.js","../bundle/process-TXIK4VJP.js","../bundle/program-2SUR4WOS.js","../bundle/prompt-I5GCP73M.js","../bundle/recognize-ILYEKXVB.js","../bundle/remote-SSPZEAJ7.js","../bundle/rerank-NAO5RMGB.js","../bundle/serve-UDXIEQKC.js","../bundle/server-KTPELKAN.js","../bundle/server-UZFSEKNJ.js","../bundle/sqlite-runtime-AONFLND6.js","../bundle/state-I4PLX3UB.js","../bundle/store-OHQH3MGN.js","../bundle/store-ZPPRXGPY.js","../bundle/store-maintenance-command-QOYXEBT6.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,18 +2,18 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  answeredWire
5
- } from "./chunk-JBBZCTTF.js";
5
+ } from "./chunk-AROBJF5P.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-VEIZZRQ5.js";
12
+ } from "./chunk-H7NUGJPV.js";
13
13
  import {
14
14
  McpServer
15
15
  } from "./chunk-5D4AEUVA.js";
16
- import "./chunk-7SXGLT6T.js";
16
+ import "./chunk-QUGFBY7O.js";
17
17
  import "./chunk-NPGVOZVK.js";
18
18
  import "./chunk-J3QXTBD2.js";
19
19
  import "./chunk-LQ37ALDJ.js";
@@ -23,7 +23,7 @@ import {
23
23
  __name
24
24
  } from "./chunk-ZVVMGPBJ.js";
25
25
 
26
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/mcp/all-profiles.js
26
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/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-ENPMIV6J.js");
260
+ const { serveOverHttp } = await import("./serve-UDXIEQKC.js");
261
261
  const listening = await serveOverHttp(build, {
262
262
  ...http,
263
263
  appName: options.command,
@@ -5,11 +5,11 @@ import {
5
5
  } from "./chunk-XQUUANA2.js";
6
6
  import {
7
7
  checkedOptions
8
- } from "./chunk-YO4CUH5E.js";
8
+ } from "./chunk-ETPT7TPW.js";
9
9
  import {
10
10
  messagesFor,
11
11
  systemFor
12
- } from "./chunk-J6MSJLIW.js";
12
+ } from "./chunk-YQAUH3PN.js";
13
13
  import "./chunk-J3QXTBD2.js";
14
14
  import {
15
15
  array,
@@ -23,7 +23,7 @@ import {
23
23
  __name
24
24
  } from "./chunk-ZVVMGPBJ.js";
25
25
 
26
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/models/anthropic.js
26
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/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-GWDCKUBI.js";
6
+ } from "./chunk-THVLMTH7.js";
7
7
  import {
8
8
  answered,
9
9
  failed,
10
10
  registerCommands,
11
11
  runCommandForAgent,
12
12
  toolsFromCommands
13
- } from "./chunk-3KOA73LS.js";
13
+ } from "./chunk-GPAAQ6LY.js";
14
14
  import {
15
15
  mcpUrlOf
16
- } from "./chunk-CEW6KIFA.js";
16
+ } from "./chunk-QUSZWBZF.js";
17
17
  import {
18
18
  agentJson,
19
19
  skillResource
20
- } from "./chunk-K4FVKPDQ.js";
21
- import "./chunk-JVMVLITS.js";
20
+ } from "./chunk-S2GSU4MT.js";
21
+ import "./chunk-2X4WYZPA.js";
22
22
  import {
23
23
  appInstructions
24
- } from "./chunk-TQFCPUIM.js";
24
+ } from "./chunk-7LKJDJNS.js";
25
25
  import {
26
26
  answeredWire
27
- } from "./chunk-JBBZCTTF.js";
27
+ } from "./chunk-AROBJF5P.js";
28
28
  import {
29
29
  StdioServerTransport,
30
30
  serveStdio
31
- } from "./chunk-VEIZZRQ5.js";
31
+ } from "./chunk-H7NUGJPV.js";
32
32
  import {
33
33
  McpServer
34
34
  } from "./chunk-5D4AEUVA.js";
35
- import "./chunk-3E3WA2L6.js";
36
- import "./chunk-T6464KYA.js";
37
- import "./chunk-75CWWETH.js";
38
- import "./chunk-WXAXYJJ7.js";
39
- import "./chunk-J6MSJLIW.js";
40
- import "./chunk-CH6RXYAX.js";
41
- import "./chunk-MS53RALV.js";
42
- import "./chunk-TVREDYX4.js";
35
+ import "./chunk-Y5WA7AOA.js";
36
+ import "./chunk-STC45HZX.js";
37
+ import "./chunk-SVNTRF5O.js";
38
+ import "./chunk-ZKH5CHGI.js";
39
+ import "./chunk-YQAUH3PN.js";
40
+ import "./chunk-VBLFQJY3.js";
41
+ import "./chunk-5FLW25US.js";
42
+ import "./chunk-76IKLP2M.js";
43
43
  import {
44
44
  DEFAULT_OUTPUT_BYTES,
45
45
  changesAuthorityAt,
@@ -49,34 +49,34 @@ import {
49
49
  judgedTargets,
50
50
  readOnlyLockOf,
51
51
  rootOf2 as rootOf
52
- } from "./chunk-GQQJOH7A.js";
53
- import "./chunk-QLEUNU6G.js";
54
- import "./chunk-7SXGLT6T.js";
52
+ } from "./chunk-GQKYSGIA.js";
53
+ import "./chunk-H5BW7454.js";
54
+ import "./chunk-QUGFBY7O.js";
55
55
  import "./chunk-ZD3WUGR2.js";
56
56
  import "./chunk-P7P5MNAU.js";
57
- import "./chunk-WLFLBWNH.js";
57
+ import "./chunk-7QEE5I7H.js";
58
58
  import {
59
59
  mcpHttpMarker
60
- } from "./chunk-GN62YOT5.js";
61
- import "./chunk-TE5U5OAM.js";
62
- import "./chunk-KM7Q67Z3.js";
63
- import "./chunk-4E7BN3TC.js";
64
- import "./chunk-YPQQ5J4X.js";
65
- import "./chunk-6MAZWSC3.js";
66
- import "./chunk-NK7EB63L.js";
67
- import "./chunk-4FEMINO2.js";
68
- import "./chunk-3KEVLSNN.js";
69
- import "./chunk-UH4DDRHA.js";
60
+ } from "./chunk-4I3YT5KK.js";
61
+ import "./chunk-Y6KUKIQZ.js";
62
+ import "./chunk-H66ZMBDD.js";
63
+ import "./chunk-TMVIQJCG.js";
64
+ import "./chunk-QJHCKFFC.js";
65
+ import "./chunk-7REG25RM.js";
66
+ import "./chunk-BKZEYTLU.js";
67
+ import "./chunk-BPF7IXJT.js";
68
+ import "./chunk-EKE3R36Y.js";
69
+ import "./chunk-ZNYJG4AY.js";
70
70
  import "./chunk-NPGVOZVK.js";
71
- import "./chunk-MNOIRJEO.js";
72
- import "./chunk-KHTO2Q6E.js";
73
- import "./chunk-F6D6PJ34.js";
74
- import "./chunk-EOEDICIE.js";
71
+ import "./chunk-Z6F7EXT2.js";
72
+ import "./chunk-6HIW7IJL.js";
73
+ import "./chunk-HJRUFT5Y.js";
74
+ import "./chunk-UZR3IKS7.js";
75
75
  import "./chunk-QX7RCLRS.js";
76
76
  import "./chunk-D72URWJE.js";
77
- import "./chunk-Z34ICZA3.js";
78
- import "./chunk-5NYMNSSO.js";
79
- import "./chunk-FZ5FXIG6.js";
77
+ import "./chunk-QLYHLW54.js";
78
+ import "./chunk-CT7NG7BI.js";
79
+ import "./chunk-5JOKRFWE.js";
80
80
  import "./chunk-J3QXTBD2.js";
81
81
  import {
82
82
  mcpErrorResult
@@ -89,7 +89,7 @@ import {
89
89
  __name
90
90
  } from "./chunk-ZVVMGPBJ.js";
91
91
 
92
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/mcp/app-server.js
92
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/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-ENPMIV6J.js");
207
+ const { serveOverHttp } = await import("./serve-UDXIEQKC.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-EOEDICIE.js";
21
+ } from "./chunk-UZR3IKS7.js";
22
22
  import {
23
23
  __name
24
24
  } from "./chunk-ZVVMGPBJ.js";
25
25
 
26
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/bun.js
26
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/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,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  loadVectorExtension,
5
5
  vectorExtension
6
- } from "./chunk-ZANYM66S.js";
6
+ } from "./chunk-77VHMI3A.js";
7
7
  import "./chunk-J3QXTBD2.js";
8
8
  import "./chunk-LQ37ALDJ.js";
9
9
  import {
@@ -14,7 +14,7 @@ import {
14
14
  __name
15
15
  } from "./chunk-ZVVMGPBJ.js";
16
16
 
17
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/store/drivers/bun-sqlite.js
17
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/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 {
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  QUERY_REASONS
5
- } from "./chunk-UH4DDRHA.js";
5
+ } from "./chunk-ZNYJG4AY.js";
6
6
  import {
7
7
  defineReasons
8
8
  } from "./chunk-LQ37ALDJ.js";
@@ -10,7 +10,7 @@ import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/errors/reasons.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/errors/reasons.js
14
14
  var validation = /* @__PURE__ */ __name((reason, message) => [reason, "validation_error", message], "validation");
15
15
  var QUERY = [
16
16
  ["query.aborted", "the search was stopped before it finished"],
@@ -130,6 +130,8 @@ var OTHERS = [
130
130
  validation("task.category-unknown", "the category is not in the task category list"),
131
131
  validation("task.claimed", "someone else holds the task"),
132
132
  validation("task.closed", "the task is already closed"),
133
+ ["task.stale", "configuration_error", "the task changed since it was read; read it again"],
134
+ validation("task.column", "the task beside which it moves is in another column than the status asked for"),
133
135
  validation("task.dependency-cycle", "the task would depend on itself"),
134
136
  validation("task.duplicate-candidates", "open tasks may be the same job: attach to one, or add it as new"),
135
137
  validation("task.certainty-required", "an agent closes a task with its certainty, 0 to 1"),
@@ -5,15 +5,15 @@ import {
5
5
  readLock,
6
6
  releaseLock,
7
7
  takeLock
8
- } from "./chunk-TE5U5OAM.js";
8
+ } from "./chunk-Y6KUKIQZ.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
14
14
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
17
17
  import { randomBytes } from "node:crypto";
18
18
  import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";
@@ -86,7 +86,7 @@ var activityRecorder = /* @__PURE__ */ __name((path, now = Date.now) => {
86
86
  };
87
87
  }, "activityRecorder");
88
88
 
89
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
89
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
90
90
  var ACCESS_SECONDS = 60 * 60;
91
91
  var REFRESH_SECONDS = 30 * 24 * 60 * 60;
92
92
  var readStored = /* @__PURE__ */ __name((path) => existsSync2(path) ? JSON.parse(readFileSync2(path, "utf8")) : { clients: [], tokens: [] }, "readStored");
@@ -2,16 +2,16 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  ENTITIES
5
- } from "./chunk-TVREDYX4.js";
5
+ } from "./chunk-76IKLP2M.js";
6
6
  import {
7
7
  annotate,
8
8
  answerSchema,
9
9
  describeOptions,
10
10
  metaOf
11
- } from "./chunk-GQQJOH7A.js";
11
+ } from "./chunk-GQKYSGIA.js";
12
12
  import {
13
13
  keyForCommand
14
- } from "./chunk-QLEUNU6G.js";
14
+ } from "./chunk-H5BW7454.js";
15
15
  import {
16
16
  jsonSchemaOf
17
17
  } from "./chunk-LQ37ALDJ.js";
@@ -22,7 +22,7 @@ import {
22
22
  __name
23
23
  } from "./chunk-ZVVMGPBJ.js";
24
24
 
25
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
25
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
26
26
  var schemas = /* @__PURE__ */ new WeakMap();
27
27
  var answerEntity = /* @__PURE__ */ __name((command, name, schema, options = {}) => {
28
28
  if (Object.hasOwn(ENTITIES, name))
@@ -52,7 +52,7 @@ var answerProjectionSchema = /* @__PURE__ */ __name((command) => {
52
52
  return own && metaOf(command).output?.entity === own.name ? own.project : void 0;
53
53
  }, "answerProjectionSchema");
54
54
 
55
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
55
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
56
56
  var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
57
57
  var outputOf = /* @__PURE__ */ __name((command) => {
58
58
  const entity = answerEntitySchema(command);
@@ -7,7 +7,7 @@ import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/store/path.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/path.js
11
11
  import { join } from "node:path";
12
12
  var wirecatDirectory = /* @__PURE__ */ __name((env = process.env, platform) => resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env, ...platform ? { platform } : {} }).state, "wirecatDirectory");
13
13
  var storePath = /* @__PURE__ */ __name((env = process.env) => env.MESSAGING_STORE ?? join(wirecatDirectory(env), "wirecat.db"), "storePath");
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  storePath
5
- } from "./chunk-FZ5FXIG6.js";
5
+ } from "./chunk-5JOKRFWE.js";
6
6
  import {
7
7
  resolvePaths
8
8
  } from "./chunk-J3QXTBD2.js";
@@ -14,11 +14,11 @@ import {
14
14
  __name
15
15
  } from "./chunk-ZVVMGPBJ.js";
16
16
 
17
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/store/shared-config.js
17
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/shared-config.js
18
18
  import { mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
19
19
  import { dirname, join, resolve } from "node:path";
20
20
 
21
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/domain/task-categories.js
21
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/task-categories.js
22
22
  var DEFAULT_TASK_CATEGORIES = [
23
23
  {
24
24
  name: "taxes",
@@ -773,7 +773,7 @@ var storedTaskCategories = /* @__PURE__ */ __name((json) => {
773
773
  }
774
774
  }, "storedTaskCategories");
775
775
 
776
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/store/shared-config.js
776
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/shared-config.js
777
777
  var SECTION = "task_categories";
778
778
  var sharedConfigPath = /* @__PURE__ */ __name((store, env = process.env) => {
779
779
  const paths = resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env });