@wirecat/cli-base 0.80.4 → 0.80.5

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,22 @@ 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.80.5 — 07.11.2026
12
+
13
+ ### Added
14
+
15
+ - **cli-core's schedule and stats words in the vocabulary**, so a CLI that mounts those shared commands needs no lint
16
+ override: `--notify-on <when>` (role `value`: when a scheduled run tells the owner) and `--deliver-to <route>` (role
17
+ `value`: where its result also goes, `telegram-bot:<profile>/<chat>` or `email:<profile>/<address>`, repeated for
18
+ more), `--max-cost-per-day <usd>` (role `budget`), `--who <side>` (role `target`: whose replies are measured),
19
+ `--open-new` (role `mode`: a read again for tasks also opens new ones) and the view noun `waiting` (chats whose
20
+ newest message waits on the owner). A route is `--deliver-to`, not `--to`: `--to` keeps one meaning, who a message
21
+ is for. A CLI that overrode these in `lint/overrides.json` removes the entries when it bumps; `cli-dev lint` reports
22
+ them as stale.
23
+ - **`cli-dev lint --allow-stale`** prints a stale baseline entry or override as a warning instead of failing. For
24
+ cli-core's CI, which lints each CLI built against its branch: a word cli-core's branch adds to the vocabulary makes
25
+ that CLI's entry stale, and removing it is the CLI's cleanup on its next bump, not a break.
26
+
11
27
  ## 0.80.4 — 07.11.2026
12
28
 
13
29
  ### Fixed
package/dist/dev/main.js CHANGED
@@ -51,10 +51,11 @@ const USAGE = `usage: cli-dev <command> [options]
51
51
  test-matrix --program <module> --untested <module> --name <cli> [--page <path>] [--check]
52
52
  docs/dev/test-matrix.md from coverage/argv.jsonl
53
53
  lint (--cli <bin> | --commands <file>) [--baseline <dir>] [--overrides <file>] [--budget <n>]
54
- [--schemas <file>] [--write-baseline]
54
+ [--schemas <file>] [--write-baseline] [--allow-stale]
55
55
  the command tree against the standard's rules; fails on a
56
56
  new violation, a stale baseline entry or override, or more
57
- overrides than the budget (10). --write-baseline rewrites
57
+ overrides than the budget (10); --allow-stale only warns on a
58
+ stale entry. --write-baseline rewrites
58
59
  lint/baseline/<rule>.json to today's violations. --schemas
59
60
  is a JSON object of the CLI's own JSON Schemas by name
60
61
  audit (--cli <bin> | --commands <file>)... [--schemas <cli>=<file>]... [--reasons <cli>=<file>]...
@@ -361,6 +362,8 @@ const lintRun = (args, io) => {
361
362
  budget: { type: "string", default: String(OVERRIDE_BUDGET) },
362
363
  schemas: { type: "string" },
363
364
  "write-baseline": { type: "boolean", default: false },
365
+ // For a shared package's CI building its consumers: an entry its new words made stale is their cleanup.
366
+ "allow-stale": { type: "boolean", default: false },
364
367
  },
365
368
  });
366
369
  if (Boolean(values.cli) === Boolean(values.commands)) {
@@ -424,10 +427,11 @@ const lintRun = (args, io) => {
424
427
  problems.push(`no lint rule "${id}" (named in ${values.baseline} or ${values.overrides})`);
425
428
  for (const found of verdict.fresh)
426
429
  problems.push(`${severity.get(found.rule) ?? "?"} ${found.rule} ${found.target}: ${found.message}`);
427
- for (const entry of verdict.stale)
428
- problems.push(entry.in === "baseline"
429
- ? `stale baseline entry, fixed or overridden — remove it: ${values.baseline}/${entry.rule}.json "${entry.target}"`
430
- : `stale override, no such violation — remove it: ${entry.rule} "${entry.target}"`);
430
+ const stale = verdict.stale.map((entry) => entry.in === "baseline"
431
+ ? `stale baseline entry, fixed or overridden — remove it: ${values.baseline}/${entry.rule}.json "${entry.target}"`
432
+ : `stale override, no such violation — remove it: ${entry.rule} "${entry.target}"`);
433
+ if (!values["allow-stale"])
434
+ problems.push(...stale);
431
435
  const warnings = wcatWarnings(io.cwd, values.cli);
432
436
  const warned = new Set(warnings.map((warning) => `${warning.rule} ${warning.target}`));
433
437
  const wcatOverridden = new Set(overrides.filter(isWcat).map((entry) => `${entry.rule} ${entry.target}`));
@@ -441,6 +445,9 @@ const lintRun = (args, io) => {
441
445
  for (const warning of warnings)
442
446
  if (!wcatOverridden.has(`${warning.rule} ${warning.target}`))
443
447
  io.err(`warning ${warning.rule} ${warning.target}: ${warning.message}`);
448
+ if (values["allow-stale"])
449
+ for (const line of stale)
450
+ io.err(`warning ${line}`);
444
451
  return report(io, problems, "lint: ok");
445
452
  };
446
453
  const wcatWarnings = (cwd, cli) => {
@@ -323,6 +323,7 @@ export const HOW_FLAGS = [
323
323
  meaning: "tell the people it concerns about it: the chat's members, or an event's attendees",
324
324
  },
325
325
  { name: "--no-notify", role: "mode", type: "switch", meaning: "tell nobody about it" },
326
+ { name: "--open-new", role: "mode", type: "switch", meaning: "a read again for tasks also opens new tasks" },
326
327
  { name: "--offline", role: "mode", type: "switch", meaning: "answer from what was recorded and never connect" },
327
328
  {
328
329
  name: "--operation-id",
@@ -0,0 +1,2 @@
1
+ import type { VocabularyFlag } from "./vocabulary.js";
2
+ export declare const SCHEDULE_FLAGS: VocabularyFlag[];
@@ -0,0 +1,25 @@
1
+ export const SCHEDULE_FLAGS = [
2
+ {
3
+ name: "--notify-on",
4
+ value: "<when>",
5
+ role: "value",
6
+ type: "choice",
7
+ meaning: "when a scheduled run tells the owner: always, failures or never",
8
+ },
9
+ {
10
+ name: "--deliver-to",
11
+ value: "<route>",
12
+ role: "value",
13
+ type: "string",
14
+ meaning: "where a scheduled run's result also goes, by the owner's own CLI: telegram-bot:<profile>/<chat> or " +
15
+ "email:<profile>/<address>; repeat it for more. Not --to, which names who a message is for",
16
+ },
17
+ {
18
+ name: "--max-cost-per-day",
19
+ value: "<usd>",
20
+ role: "budget",
21
+ type: "number",
22
+ meaning: "start no run for the rest of the day once the day's runs cost this much; 0 for no cap",
23
+ unit: "US dollars",
24
+ },
25
+ ];
@@ -420,6 +420,13 @@ export const WHAT_FLAGS = [
420
420
  meaning: "look again from this day, for what arrived late",
421
421
  },
422
422
  { name: "--run", value: "<id>", role: "target", type: "id", meaning: "the run it is about" },
423
+ {
424
+ name: "--who",
425
+ value: "<side>",
426
+ role: "target",
427
+ type: "choice",
428
+ meaning: "whose replies are measured: me (the owner's) or others (the other side's)",
429
+ },
423
430
  {
424
431
  name: "--write",
425
432
  value: "<id>",
@@ -4,6 +4,7 @@ import { CRM_FLAGS } from "./flags-crm.js";
4
4
  import { HOW_FLAGS } from "./flags-how.js";
5
5
  import { MAIL_FLAGS } from "./flags-mail.js";
6
6
  import { PRIVACY_FLAGS } from "./flags-privacy.js";
7
+ import { SCHEDULE_FLAGS } from "./flags-schedule.js";
7
8
  import { WHAT_FLAGS } from "./flags-what.js";
8
9
  import { duplicates, parseRegistry, text, word } from "./registry.js";
9
10
  export const FLAG_TYPES = [
@@ -360,6 +361,7 @@ const views = [
360
361
  ["newcomers", "members observed joining during the selected time window"],
361
362
  ["retention", "whether members of a selected cohort remain or return over time"],
362
363
  ["responses", "observed replies between participants and the time taken to answer"],
364
+ ["waiting", "chats whose newest message waits on the owner's reply"],
363
365
  ["discussion", "source posts compared by known views and observed discussion replies"],
364
366
  ["unanswered", "questions without an observed qualifying answer"],
365
367
  ["me", "the account a profile's token belongs to"],
@@ -396,5 +398,13 @@ export const VOCABULARY = defineVocabulary({
396
398
  ],
397
399
  views: views.map(([entry, meaning]) => ({ word: entry, meaning })),
398
400
  roots: roots.map(([entry, meaning]) => ({ word: entry, meaning })),
399
- flags: [...HOW_FLAGS, ...WHAT_FLAGS, ...PRIVACY_FLAGS, ...CALENDAR_FLAGS, ...MAIL_FLAGS, ...CRM_FLAGS],
401
+ flags: [
402
+ ...HOW_FLAGS,
403
+ ...WHAT_FLAGS,
404
+ ...PRIVACY_FLAGS,
405
+ ...CALENDAR_FLAGS,
406
+ ...MAIL_FLAGS,
407
+ ...CRM_FLAGS,
408
+ ...SCHEDULE_FLAGS,
409
+ ],
400
410
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-base",
3
- "version": "0.80.4",
3
+ "version": "0.80.5",
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",