@wirecat/mail-cli 0.16.0 → 0.16.1

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 (67) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +14 -14
  3. package/dist/bin/mail.js +2 -2
  4. package/dist/bundle/{chunk-M24BGP7M.js → chunk-UYOGVVQS.js} +12 -2
  5. package/dist/bundle/mail.js +2 -2
  6. package/dist/bundle/{program-L43S7DRF.js → program-ERLBUNWI.js} +142 -103
  7. package/dist/commands/account.js +1 -1
  8. package/dist/commands/account.js.map +1 -1
  9. package/dist/commands/attachments.js +3 -3
  10. package/dist/commands/attachments.js.map +1 -1
  11. package/dist/commands/context.d.ts +3 -0
  12. package/dist/commands/context.d.ts.map +1 -1
  13. package/dist/commands/context.js.map +1 -1
  14. package/dist/commands/drafts-send.js +1 -1
  15. package/dist/commands/drafts-send.js.map +1 -1
  16. package/dist/commands/drafts.d.ts.map +1 -1
  17. package/dist/commands/drafts.js +9 -6
  18. package/dist/commands/drafts.js.map +1 -1
  19. package/dist/commands/export.js +3 -3
  20. package/dist/commands/export.js.map +1 -1
  21. package/dist/commands/folders.d.ts.map +1 -1
  22. package/dist/commands/folders.js +7 -4
  23. package/dist/commands/folders.js.map +1 -1
  24. package/dist/commands/messages.js +11 -11
  25. package/dist/commands/messages.js.map +1 -1
  26. package/dist/commands/rules.d.ts.map +1 -1
  27. package/dist/commands/rules.js +55 -33
  28. package/dist/commands/rules.js.map +1 -1
  29. package/dist/commands/send.d.ts.map +1 -1
  30. package/dist/commands/send.js +7 -6
  31. package/dist/commands/send.js.map +1 -1
  32. package/dist/commands/session-start.js +1 -1
  33. package/dist/commands/session-start.js.map +1 -1
  34. package/dist/commands/session.d.ts.map +1 -1
  35. package/dist/commands/session.js +5 -2
  36. package/dist/commands/session.js.map +1 -1
  37. package/dist/commands/stats.js +4 -4
  38. package/dist/commands/stats.js.map +1 -1
  39. package/dist/commands/status.js +1 -1
  40. package/dist/commands/status.js.map +1 -1
  41. package/dist/commands/sync.js +3 -3
  42. package/dist/commands/sync.js.map +1 -1
  43. package/dist/commands/tags.d.ts.map +1 -1
  44. package/dist/commands/tags.js +3 -2
  45. package/dist/commands/tags.js.map +1 -1
  46. package/dist/mail/domain-age.d.ts.map +1 -1
  47. package/dist/mail/domain-age.js +3 -6
  48. package/dist/mail/domain-age.js.map +1 -1
  49. package/dist/mail/save.d.ts.map +1 -1
  50. package/dist/mail/save.js +3 -2
  51. package/dist/mail/save.js.map +1 -1
  52. package/dist/mail/send.d.ts +6 -0
  53. package/dist/mail/send.d.ts.map +1 -1
  54. package/dist/mail/send.js +11 -4
  55. package/dist/mail/send.js.map +1 -1
  56. package/dist/mail/smtp.d.ts.map +1 -1
  57. package/dist/mail/smtp.js +7 -5
  58. package/dist/mail/smtp.js.map +1 -1
  59. package/dist/oauth.js +1 -1
  60. package/dist/oauth.js.map +1 -1
  61. package/dist/reasons.d.ts.map +1 -1
  62. package/dist/reasons.js +10 -0
  63. package/dist/reasons.js.map +1 -1
  64. package/dist/version.d.ts +1 -1
  65. package/dist/version.js +1 -1
  66. package/package.json +1 -1
  67. package/skills/mail-cli/SKILL.md +16 -16
package/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  Notable changes to `@wirecat/mail-cli`. One section per version, newest first.
4
4
 
5
+ ## 0.16.1 — 05.11.2026
6
+
7
+ ### Fixed
8
+
9
+ - **The tests of the private file modes skip the mode check on Windows**, where files have no Unix modes.
10
+ - **Docs, help examples and the skill name the example profile `personal`, not `ya`**, as tg does. A second
11
+ mailbox in an example is `work`. No behaviour changes.
12
+ - **`docs/configuration.md` says which flag answers `ask`**: `--allow-dangerous` for `drafts delete`, `--yes` for
13
+ every other change, and `confirmation_required` without a terminal or a flag.
14
+ - **The sender domain cache and the sign-in records folder are private to you.** `domain-ages.json` is written with
15
+ mode 600 and the folder that holds `sign-ins.json` with mode 700, as every other private file of mail's.
16
+ - **Every error and issue reason mail raises is in its registry**, so `mail commands info` lists it and an agent can
17
+ branch on it: `mail.smtp-login-refused`, `mail.no-drafts`, `mail.draft-unknown`, `mail.gmail-objectid`,
18
+ `mail.export-destination-exists`, `download.exists`, `mail.unreadable`, `mail.deletions-skipped`,
19
+ `mail.rules-unreadable` and `mail.export-unreadable`. A test keeps the list complete.
20
+ - **The secret scan knows Google's OAuth access tokens, refresh tokens and client secrets.**
21
+ - **`mail commands info` says what `rules remove`, `rules apply` and `rules import` answer with**, as every other
22
+ command does: `mail_rule_change`, `mail_rules_apply` and `mail_rule_import`. The answers are unchanged.
23
+ - **`rules apply` closes its connection to the mail server before it answers**, and the tag commands hand the store
24
+ to the run, so a timeout or a signal closes it too.
25
+
5
26
  ## 0.16.0 — 05.11.2026
6
27
 
7
28
  ### Changed — may break callers
package/README.md CHANGED
@@ -20,19 +20,19 @@ change one you can undo. It keeps drafts, and sends, replies and forwards over S
20
20
 
21
21
  First turn on IMAP in your mailbox and make an app password:
22
22
  [the steps for every provider](https://github.com/WireCatLabs/mail-cli/blob/main/docs/providers.md). Then, with a
23
- profile name of your choice (`ya` here) and your own address in place of the synthetic `me@example.com`:
23
+ profile name of your choice (`personal` here) and your own address in place of the synthetic `me@example.com`:
24
24
 
25
25
  ```sh
26
26
  npm install -g @wirecat/mail-cli
27
- mail ya session start --address me@example.com # finds the server, shows the steps, asks for the app password
28
- mail ya account check # logs in and lists what the server supports
29
- mail ya sync # reads the last 30 days into the shared store
30
- mail ya status # how far the sync is
31
- mail ya search messages invoice # search the stored mail
27
+ mail personal session start --address me@example.com # finds the server, shows the steps, asks for the app password.
28
+ mail personal account check # logs in and lists what the server supports
29
+ mail personal sync # reads the last 30 days into the shared store
30
+ mail personal status # how far the sync is
31
+ mail personal search messages invoice # search the stored mail
32
32
  mail skill install # optional: instructions for your AI agent
33
33
  ```
34
34
 
35
- Now the mail is in the store. `mail ya messages show <ref>` reads a search hit whole. [memo](https://github.com/WireCatLabs/cli-memo)
35
+ Now the mail is in the store. `mail personal messages show <ref>` reads a search hit whole. [memo](https://github.com/WireCatLabs/cli-memo)
36
36
  searches it together with your messages and notes: `memo search all "invoice"`.
37
37
 
38
38
  You need Node.js 22.16 or a later 22.x, or 24 or later. To try it with no install, run
@@ -77,8 +77,8 @@ You need Node.js 22.16 or a later 22.x, or 24 or later. To try it with no instal
77
77
 
78
78
  ```sh
79
79
  mail skill install # instructions for Claude Code, Codex, Gemini CLI and OpenClaw
80
- mail ya mcp add claude-code --allow-writes # or codex: adds this profile's MCP server
81
- mail ya mcp config # the entry for Claude Desktop, Cursor and others
80
+ mail personal mcp add claude-code --allow-writes # or codex: adds this profile's MCP server
81
+ mail personal mcp config # the entry for Claude Desktop, Cursor and others
82
82
  ```
83
83
 
84
84
  `mcp add` stops until you pass `--allow-writes`, because the server's `write` tool runs commands that change the
@@ -107,7 +107,7 @@ as data, never as instructions.
107
107
 
108
108
  ## Sign-in and profiles
109
109
 
110
- A profile is a name you choose for one mailbox and the first word of every command that uses it: `mail ya sync`.
110
+ A profile is a name you choose for one mailbox and the first word of every command that uses it: `mail personal sync`.
111
111
  `session start` creates the profile and signs it in, `session status` says where the password comes from (`--check`
112
112
  logs in to prove it works), `session end` forgets the password and keeps the mail, and `mail session list` lists the
113
113
  profiles.
@@ -126,8 +126,8 @@ permissions decide what a command may do (`allow`, `ask`, `readonly` or `deny`);
126
126
  write. See [settings](https://github.com/WireCatLabs/mail-cli/blob/main/docs/configuration.md).
127
127
 
128
128
  ```sh
129
- mail ya config set permissions.sync readonly # this profile cannot sync
130
- mail ya config show # every setting and where it came from
129
+ mail personal config set permissions.sync readonly # this profile cannot sync
130
+ mail personal config show # every setting and where it came from
131
131
  ```
132
132
 
133
133
  ## Limits
@@ -163,8 +163,8 @@ See [security](https://github.com/WireCatLabs/mail-cli/blob/main/docs/security.m
163
163
 
164
164
  ```sh
165
165
  mail doctor # version, paths, settings and profiles; no keyring, no network
166
- mail ya session status # where the app password comes from
167
- mail ya runs list # failed and partial runs are kept
166
+ mail personal session status # where the app password comes from
167
+ mail personal runs list # failed and partial runs are kept
168
168
  ```
169
169
 
170
170
  See [when something goes wrong](https://github.com/WireCatLabs/mail-cli/blob/main/docs/troubleshooting.md).
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.16.0\n")
12
+ process.stdout.write("0.16.1\n")
13
13
  } else {
14
14
  // Before the bundle compiles: the bundle's own call comes after its chunks.
15
15
  module.enableCompileCache()
@@ -28,7 +28,7 @@ if (
28
28
  : next(specifier, context),
29
29
  })
30
30
  }
31
- const chunks = ["../bundle/all-profiles-TUDREUUW.js","../bundle/anthropic-KQOVSP6C.js","../bundle/app-server-QK7PKVT7.js","../bundle/bun-2NMWL5YB.js","../bundle/bun-sqlite-Y4FP6SDX.js","../bundle/decode-WCS4KOHV.js","../bundle/dispatch-3ILCYZ4Q.js","../bundle/dist-FL422DTA.js","../bundle/dist-HFUVURJG.js","../bundle/echarts-45D6USAX.js","../bundle/embed-4B4ATLCN.js","../bundle/embedder-ASWGJXNV.js","../bundle/failure-UDL5QZRZ.js","../bundle/first-screen-NNX54MYC.js","../bundle/instructions-6EFSPC7C.js","../bundle/mcp-PPVOM4SE.js","../bundle/node-KM3CUABH.js","../bundle/node-OXC26QXO.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-PXHZAG7Y.js","../bundle/oauth-YK2QLC7U.js","../bundle/open-SABDXZ4B.js","../bundle/openai-DPURPXEU.js","../bundle/process-YWPAOI6G.js","../bundle/program-L43S7DRF.js","../bundle/prompt-GKVNFGFE.js","../bundle/recognize-344YDSLX.js","../bundle/remote-53UZUJJU.js","../bundle/rerank-PAIRND6R.js","../bundle/serve-DZSO7LJK.js","../bundle/server-EGG3V67I.js","../bundle/server-SGGMRV2K.js","../bundle/sqlite-runtime-ZQ6F3VYZ.js","../bundle/state-LXPOWLZ5.js","../bundle/store-4ZMSK5R5.js","../bundle/store-PHT75I6S.js","../bundle/store-maintenance-command-C6ONZNRX.js"]
31
+ const chunks = ["../bundle/all-profiles-TUDREUUW.js","../bundle/anthropic-KQOVSP6C.js","../bundle/app-server-QK7PKVT7.js","../bundle/bun-2NMWL5YB.js","../bundle/bun-sqlite-Y4FP6SDX.js","../bundle/decode-WCS4KOHV.js","../bundle/dispatch-3ILCYZ4Q.js","../bundle/dist-FL422DTA.js","../bundle/dist-HFUVURJG.js","../bundle/echarts-45D6USAX.js","../bundle/embed-4B4ATLCN.js","../bundle/embedder-ASWGJXNV.js","../bundle/failure-UDL5QZRZ.js","../bundle/first-screen-NNX54MYC.js","../bundle/instructions-6EFSPC7C.js","../bundle/mcp-PPVOM4SE.js","../bundle/node-KM3CUABH.js","../bundle/node-OXC26QXO.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-PXHZAG7Y.js","../bundle/oauth-YK2QLC7U.js","../bundle/open-SABDXZ4B.js","../bundle/openai-DPURPXEU.js","../bundle/process-YWPAOI6G.js","../bundle/program-ERLBUNWI.js","../bundle/prompt-GKVNFGFE.js","../bundle/recognize-344YDSLX.js","../bundle/remote-53UZUJJU.js","../bundle/rerank-PAIRND6R.js","../bundle/serve-DZSO7LJK.js","../bundle/server-EGG3V67I.js","../bundle/server-SGGMRV2K.js","../bundle/sqlite-runtime-ZQ6F3VYZ.js","../bundle/state-LXPOWLZ5.js","../bundle/store-4ZMSK5R5.js","../bundle/store-PHT75I6S.js","../bundle/store-maintenance-command-C6ONZNRX.js"]
32
32
  if (((words) => words
33
33
  .filter((word) => !word.startsWith("-"))
34
34
  .slice(0, 2)
@@ -22,12 +22,22 @@ var ENTRIES = [
22
22
  ["mail.folder-not-empty", "validation_error", "the folder still holds mail"],
23
23
  ["mail.run-unknown", "not_found", "no change run has this id for this mailbox"],
24
24
  ["mail.archive-unverified", "validation_error", "no store backup under 8 days old is recorded"],
25
- ["mail.cleanup-scheduled", "permission_error", "messages delete --rules does not run from a schedule"]
25
+ ["mail.cleanup-scheduled", "permission_error", "messages delete --rules does not run from a schedule"],
26
+ ["mail.smtp-login-refused", "authentication_error", "the submission server refused the login"],
27
+ ["mail.no-drafts", "provider_unavailable", "the mailbox has no Drafts folder this tool can find"],
28
+ ["mail.draft-unknown", "not_found", "no draft has this id in the Drafts folder"],
29
+ ["mail.gmail-objectid", "provider_error", "Gmail announces OBJECTID, which this build cannot read"],
30
+ ["mail.export-destination-exists", "validation_error", "the export folder already holds files"],
31
+ ["download.exists", "validation_error", "the file to save already exists"],
32
+ ["mail.unreadable", "invalid_response", "some emails could not be read"],
33
+ ["mail.deletions-skipped", "outcome_unknown", "deletions on the server were not checked this run"],
34
+ ["mail.rules-unreadable", "configuration_error", "some stored rules could not be read"],
35
+ ["mail.export-unreadable", "outcome_unknown", "some emails could not be read for the export"]
26
36
  ];
27
37
  var REASONS = defineReasons(ENTRIES.map(([reason, code, message]) => ({ reason, code, message, details: [] })));
28
38
 
29
39
  // dist/version.js
30
- var VERSION = "0.16.0";
40
+ var VERSION = "0.16.1";
31
41
 
32
42
  // dist/identity.js
33
43
  var PACKAGE = "@wirecat/mail-cli";
@@ -3,7 +3,7 @@ import { createRequire as __bundleRequire } from "node:module";
3
3
  const require = __bundleRequire(import.meta.url);
4
4
  import {
5
5
  IDENTITY
6
- } from "./chunk-M24BGP7M.js";
6
+ } from "./chunk-UYOGVVQS.js";
7
7
  import {
8
8
  installerOf
9
9
  } from "./chunk-KV4267S4.js";
@@ -158,7 +158,7 @@ if (wcat.code !== void 0) {
158
158
  process.exitCode = wcat.code;
159
159
  } else {
160
160
  const stopCatching = catchCrashes({ cli: IDENTITY.command, interactive: process.stdout.isTTY === true });
161
- const { run } = await import("./program-L43S7DRF.js");
161
+ const { run } = await import("./program-ERLBUNWI.js");
162
162
  try {
163
163
  process.exitCode = await run(process.argv.slice(2));
164
164
  } finally {