@wirecat/cli-base 0.80.4 → 0.80.6
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 +25 -0
- package/dist/dev/main.js +13 -6
- package/dist/standards/audit.js +8 -0
- package/dist/standards/flags-how.js +1 -0
- package/dist/standards/flags-schedule.d.ts +2 -0
- package/dist/standards/flags-schedule.js +25 -0
- package/dist/standards/flags-what.js +7 -0
- package/dist/standards/vocabulary.js +11 -1
- package/docs/standards/ci.md +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,31 @@ 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.6 — 07.11.2026
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **`cli-dev audit` and `repo-check` know bitrix24-cli (`b24`) and beeline-cli (`beeline`).** Both join a new parity
|
|
16
|
+
group, `shared-roots`, compared with the other CLIs on `commands`, `doctor`, `skill`, `mcp` and `upgrade` only:
|
|
17
|
+
b24's `search all` is cli-core's CRM search and beeline's `meetings` take call recordings, so each differs from the
|
|
18
|
+
others there by design. WC-CI-9's list holds their monthly minutes, 02:34 for bitrix24-cli and 03:09 for
|
|
19
|
+
beeline-cli.
|
|
20
|
+
|
|
21
|
+
## 0.80.5 — 07.11.2026
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- **cli-core's schedule and stats words in the vocabulary**, so a CLI that mounts those shared commands needs no lint
|
|
26
|
+
override: `--notify-on <when>` (role `value`: when a scheduled run tells the owner) and `--deliver-to <route>` (role
|
|
27
|
+
`value`: where its result also goes, `telegram-bot:<profile>/<chat>` or `email:<profile>/<address>`, repeated for
|
|
28
|
+
more), `--max-cost-per-day <usd>` (role `budget`), `--who <side>` (role `target`: whose replies are measured),
|
|
29
|
+
`--open-new` (role `mode`: a read again for tasks also opens new ones) and the view noun `waiting` (chats whose
|
|
30
|
+
newest message waits on the owner). A route is `--deliver-to`, not `--to`: `--to` keeps one meaning, who a message
|
|
31
|
+
is for. A CLI that overrode these in `lint/overrides.json` removes the entries when it bumps; `cli-dev lint` reports
|
|
32
|
+
them as stale.
|
|
33
|
+
- **`cli-dev lint --allow-stale`** prints a stale baseline entry or override as a warning instead of failing. For
|
|
34
|
+
cli-core's CI, which lints each CLI built against its branch: a word cli-core's branch adds to the vocabulary makes
|
|
35
|
+
that CLI's entry stale, and removing it is the CLI's cleanup on its next bump, not a break.
|
|
11
36
|
## 0.80.4 — 07.11.2026
|
|
12
37
|
|
|
13
38
|
### 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)
|
|
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
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
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) => {
|
package/dist/standards/audit.js
CHANGED
|
@@ -106,6 +106,14 @@ export const PARITY_GROUPS = defineParityGroups([
|
|
|
106
106
|
covers: ["commands", "upgrade", "notes", "meetings"],
|
|
107
107
|
differences: [],
|
|
108
108
|
},
|
|
109
|
+
// bitrix24-cli's search is cli-core's CRM `search all`, and beeline-cli's meetings take call recordings, not
|
|
110
|
+
// zoom-cli's: both are compared on the root commands every CLI shares, the way gcal and mail are on theirs.
|
|
111
|
+
{
|
|
112
|
+
name: "shared-roots",
|
|
113
|
+
members: ["tg", "max", "memo", "drive", "zm", "wa", "b24", "beeline"],
|
|
114
|
+
covers: ["commands", "doctor", "skill", "mcp", "upgrade"],
|
|
115
|
+
differences: MEMO_HAS_NO_PROFILES,
|
|
116
|
+
},
|
|
109
117
|
]);
|
|
110
118
|
const requiredRootSchema = v.strictObject({ path: v.pipe(v.array(segment), v.minLength(1)), meaning: text });
|
|
111
119
|
export const defineRequiredRoots = (input) => parseRegistry("required roots", v.array(requiredRootSchema), input, (roots) => duplicates(roots.map((root) => root.path.join(" "))).map((path) => `"${path}" is listed twice`));
|
|
@@ -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,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: [
|
|
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/docs/standards/ci.md
CHANGED
|
@@ -171,6 +171,7 @@ its prompt in cli-template says so from cli-template 0.8.0. A CLI on an older te
|
|
|
171
171
|
| 02:24 | whatsapp-cli |
|
|
172
172
|
| 02:27 | gcal-cli |
|
|
173
173
|
| 02:31 | cli-memo |
|
|
174
|
+
| 02:34 | bitrix24-cli |
|
|
174
175
|
| 02:38 | cli-core |
|
|
175
176
|
| 02:41 | mail-cli |
|
|
176
177
|
| 02:45 | drive-cli |
|
|
@@ -178,6 +179,7 @@ its prompt in cli-template says so from cli-template 0.8.0. A CLI on an older te
|
|
|
178
179
|
| 02:59 | max-cli |
|
|
179
180
|
| 03:02 | cli-template |
|
|
180
181
|
| 03:06 | tg-cli |
|
|
182
|
+
| 03:09 | beeline-cli |
|
|
181
183
|
| 03:13 | zoom-cli |
|
|
182
184
|
| 03:20 | cli-docs |
|
|
183
185
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-base",
|
|
3
|
-
"version": "0.80.
|
|
3
|
+
"version": "0.80.6",
|
|
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",
|