@wirecat/cli-base 0.69.0 → 0.70.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.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,25 @@ Versions before 0.8.0 are in the [git tags](https://github.com/WireCatLabs/cli-b
8
8
  Every entry says what changed as a caller sees it, why, and what to watch for — the rules are
9
9
  [`docs/dev/CONVENTIONS.md`](docs/dev/CONVENTIONS.md#the-changelog).
10
10
 
11
+ ## 0.70.0 — 01.11.2026
12
+
13
+ ### Added
14
+
15
+ - **Mail words in the vocabulary: the `drafts` resource and `--cc`, `--bcc`, `--reply-all`.** mail-cli saves drafts
16
+ in a mailbox's Drafts folder (`mail <profile> drafts list|create|update|delete`) and addresses e-mail with copies;
17
+ the command lint reported each as a word it did not know.
18
+ - **`--to` takes a chat or an e-mail address, `--subject` takes a reference or a subject line.** The owner ruled
19
+ that mail shares these two words with the messengers and notes instead of renaming them. `--to` is now
20
+ `<chat|address>`, a `string` (was an `id`); `--subject` is `<ref|text>`. The meaning per domain is in each flag's
21
+ text, so `flag-two-meanings` stops reporting mail's use. Mail-cli can drop its overrides for both.
22
+
23
+ ### Fixed
24
+
25
+ - **mail is compared in its own parity group, `mail-shared`, which leaves out `search`.** mail's `search messages` is
26
+ cli-core's mail search, a different command from the messengers' under the same path, and `audit --complete` took
27
+ its twenty-odd differences as inherited. mail is compared on every other shared root, and moves back into `all`
28
+ once its search is aligned with the messengers' or renamed.
29
+
11
30
  ## 0.69.0 — 01.11.2026
12
31
 
13
32
  ### Added
@@ -68,19 +68,35 @@ export const defineParityGroups = (input) => parseRegistry("parity groups", v.ar
68
68
  .map((entry) => `${group.name}: "${entry.target}" has \`absent\`, which measures the values itself; drop \`expected\``),
69
69
  ]),
70
70
  ]);
71
+ const MEMO_HAS_NO_PROFILES = [
72
+ "mcp serve",
73
+ "mcp revoke",
74
+ "mcp server start",
75
+ "mcp server status",
76
+ "mcp server stop",
77
+ ].map((path) => ({
78
+ rule: "same-path-contract",
79
+ target: `${path} --profiles`,
80
+ absent: "memo",
81
+ reason: "memo has no profiles: it reads other CLIs' stores and selects their accounts with --source and --account " +
82
+ "(https://github.com/WireCatLabs/cli-base/issues/390)",
83
+ }));
71
84
  export const PARITY_GROUPS = defineParityGroups([
72
85
  { name: "messengers", members: ["tg", "max"], covers: "tree", differences: [] },
73
86
  {
74
87
  name: "all",
75
- members: ["tg", "max", "memo", "drive", "zm", "wa", "mail"],
88
+ members: ["tg", "max", "memo", "drive", "zm", "wa"],
76
89
  covers: ["commands", "doctor", "skill", "mcp", "upgrade", "search", "notes", "meetings"],
77
- differences: ["mcp serve", "mcp revoke", "mcp server start", "mcp server status", "mcp server stop"].map((path) => ({
78
- rule: "same-path-contract",
79
- target: `${path} --profiles`,
80
- absent: "memo",
81
- reason: "memo has no profiles: it reads other CLIs' stores and selects their accounts with --source and --account " +
82
- "(https://github.com/WireCatLabs/cli-base/issues/390)",
83
- })),
90
+ differences: MEMO_HAS_NO_PROFILES,
91
+ },
92
+ // mail's `search messages` is cli-core's mail search, not the messengers' command: --complete took their 20-odd
93
+ // differences as inherited (https://github.com/WireCatLabs/cli-base/issues/390). mail is compared everywhere else
94
+ // and moves back into "all" once its search is aligned with the messengers' or renamed.
95
+ {
96
+ name: "mail-shared",
97
+ members: ["tg", "max", "memo", "drive", "zm", "wa", "mail"],
98
+ covers: ["commands", "doctor", "skill", "mcp", "upgrade", "notes", "meetings"],
99
+ differences: MEMO_HAS_NO_PROFILES,
84
100
  },
85
101
  // gcal is compared on what it already shares with every CLI; doctor, mcp, search and skill wait until the published
86
102
  // CLIs agree there (https://github.com/WireCatLabs/cli-base/issues/390), then gcal moves back into "all".
@@ -0,0 +1,2 @@
1
+ import type { VocabularyFlag } from "./vocabulary.js";
2
+ export declare const MAIL_FLAGS: VocabularyFlag[];
@@ -0,0 +1,22 @@
1
+ export const MAIL_FLAGS = [
2
+ {
3
+ name: "--cc",
4
+ value: "<address>",
5
+ role: "value",
6
+ type: "string",
7
+ meaning: "an e-mail address that gets a copy; repeat it for more",
8
+ },
9
+ {
10
+ name: "--bcc",
11
+ value: "<address>",
12
+ role: "value",
13
+ type: "string",
14
+ meaning: "an e-mail address that gets a blind copy; repeat it for more",
15
+ },
16
+ {
17
+ name: "--reply-all",
18
+ role: "value",
19
+ type: "switch",
20
+ meaning: "with --reply-to, an e-mail reply also goes to everyone the message went to",
21
+ },
22
+ ];
@@ -442,7 +442,13 @@ export const WHAT_FLAGS = [
442
442
  meaning: "keep a token an operation returns only in this bot profile's keyring; never print it",
443
443
  },
444
444
  { name: "--task", value: "<id>", role: "target", type: "id", meaning: "a task, by id" },
445
- { name: "--to", value: "<chat>", role: "target", type: "id", meaning: "the chat it goes to" },
445
+ {
446
+ name: "--to",
447
+ value: "<chat|address>",
448
+ role: "target",
449
+ type: "string",
450
+ meaning: "who it goes to: a chat in a messenger, an e-mail address in mail; repeat it for more addresses",
451
+ },
446
452
  {
447
453
  name: "--topic-name",
448
454
  value: "<name>",
@@ -889,10 +895,10 @@ export const WHAT_FLAGS = [
889
895
  { name: "--sticker", value: "<id>", role: "value", type: "id", meaning: "send this sticker, alone" },
890
896
  {
891
897
  name: "--subject",
892
- value: "<ref>",
898
+ value: "<ref|text>",
893
899
  role: "value",
894
900
  type: "string",
895
- meaning: "what it is about, as a reference",
901
+ meaning: "what it is about: a reference in a note or task, the subject line in mail",
896
902
  replaces: ["--about"],
897
903
  },
898
904
  {
@@ -1,6 +1,7 @@
1
1
  import * as v from "valibot";
2
2
  import { CALENDAR_FLAGS } from "./flags-calendar.js";
3
3
  import { HOW_FLAGS } from "./flags-how.js";
4
+ import { MAIL_FLAGS } from "./flags-mail.js";
4
5
  import { WHAT_FLAGS } from "./flags-what.js";
5
6
  import { duplicates, parseRegistry, text, word } from "./registry.js";
6
7
  export const FLAG_TYPES = [
@@ -212,6 +213,7 @@ const collections = [
212
213
  ["chats", "conversations in a messenger"],
213
214
  ["contacts", "identities in a messenger's contact list"],
214
215
  ["messages", "posts in a messenger chat, or emails"],
216
+ ["drafts", "e-mails saved in a mailbox's Drafts folder, written and not sent"],
215
217
  ["polls", "polls in a chat"],
216
218
  ["reactions", "reactions to a message"],
217
219
  ["recipients", "who a message goes to"],
@@ -359,5 +361,5 @@ export const VOCABULARY = defineVocabulary({
359
361
  ],
360
362
  views: views.map(([entry, meaning]) => ({ word: entry, meaning })),
361
363
  roots: roots.map(([entry, meaning]) => ({ word: entry, meaning })),
362
- flags: [...HOW_FLAGS, ...WHAT_FLAGS, ...CALENDAR_FLAGS],
364
+ flags: [...HOW_FLAGS, ...WHAT_FLAGS, ...CALENDAR_FLAGS, ...MAIL_FLAGS],
363
365
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-base",
3
- "version": "0.69.0",
3
+ "version": "0.70.0",
4
4
  "description": "The parts every command line tool needs: output modes, terminal rendering, error model, exit codes, credentials, clocks",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Viacheslav Ptsarev",