@wirecat/cli-base 0.99.0 → 0.101.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 +38 -0
- package/dist/query/dates.js +12 -9
- package/dist/standards/audit.js +4 -3
- package/dist/standards/flags-calendar.js +7 -0
- package/dist/standards/flags-knowledge.d.ts +1 -1
- package/dist/standards/flags-knowledge.js +15 -1
- package/dist/standards/vocabulary.js +1 -0
- package/docs/standards/ci.md +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,44 @@ 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.101.0 — 14.11.2026
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **`calls` is a collection noun**: phone calls a phone system recorded, stored as meetings with their transcripts,
|
|
16
|
+
as in cli-core's `stats calls show` that pbx and beeline mount. The `unknown-resource` lint no longer refuses
|
|
17
|
+
`stats calls`.
|
|
18
|
+
- **The flag vocabulary has `--matching <query>`** (role `target`, string): every stored thing a search with this
|
|
19
|
+
query finds, and the command acts on each. cli-core's meeting `tags add` and `tags remove` take it, so
|
|
20
|
+
`pbx office tags add complaint --matching "refund OR complaint"` marks every call where those words are said.
|
|
21
|
+
- **The flag vocabulary has `--tag <name>`** (role `target`, string): a tag by its name or an alias, so only what
|
|
22
|
+
carries it is read. cli-core's shared `search meetings` has taken it for a while, and `option-role` reported it.
|
|
23
|
+
Watch for: zoom-cli's `lint/baseline/option-role.json` line `search meetings --tag` turns stale after adopting this
|
|
24
|
+
version; remove it then.
|
|
25
|
+
|
|
26
|
+
## 0.100.0 — 14.11.2026
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- `PARITY_GROUPS`' `shared-roots` group takes asterisk-cli (its command is `pbx`), compared like beeline on
|
|
31
|
+
`commands`, `doctor`, `skill`, `mcp` and `upgrade`, and WC-CI-9 reserves 02:48 UTC for its monthly run.
|
|
32
|
+
`cli-dev repo-check` then passes for asterisk-cli without its own `config/parity-groups.json`.
|
|
33
|
+
- `PARITY_GROUPS`' `shared-roots` group takes notion-cli (its command is `notion`), compared on `commands`, `doctor`,
|
|
34
|
+
`skill`, `mcp` and `upgrade` until its documents commands ship, and WC-CI-9 reserves 02:20 UTC for its monthly run.
|
|
35
|
+
`cli-dev repo-check` then passes for notion-cli without its own `config/parity-groups.json`.
|
|
36
|
+
|
|
37
|
+
- **The flag vocabulary has `--setting <name=value>`** (role `value`, string): one of the service's own settings,
|
|
38
|
+
repeated for more. cli-core's shared `meetings create` and `meetings update` take it, so a CLI that mounts them
|
|
39
|
+
passes `option-role` without a baseline line.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- **A query's `time` field takes a time without seconds or without an offset**, as cli-core's `--since-time` does:
|
|
44
|
+
`created_at>"2026-10-01T09:00"` and `created_at>"2026-10-01 09:00"` worked as flags but failed as
|
|
45
|
+
`query.invalid-date`. A time with no offset is read in the zone the query is evaluated in (`dateRange`'s `zone`);
|
|
46
|
+
one that daylight saving skips or repeats there is refused and asks for an offset. Watch for: `validateQuery`
|
|
47
|
+
checks a time without an offset in its `zone` option, UTC when none is given.
|
|
48
|
+
|
|
11
49
|
## 0.99.0 — 13.11.2026
|
|
12
50
|
|
|
13
51
|
### Changed — may break callers
|
package/dist/query/dates.js
CHANGED
|
@@ -11,7 +11,7 @@ export const timezoneOf = (given) => {
|
|
|
11
11
|
};
|
|
12
12
|
const calendar = (value, span) => {
|
|
13
13
|
if (!/^\d{4}-\d{2}-\d{2}$/u.test(value))
|
|
14
|
-
queryError("query.invalid-date", span, "use an ISO date
|
|
14
|
+
queryError("query.invalid-date", span, "use an ISO date such as 2026-10-01");
|
|
15
15
|
const year = Number(value.slice(0, 4)), month = Number(value.slice(5, 7)), day = Number(value.slice(8, 10));
|
|
16
16
|
const date = new Date(0);
|
|
17
17
|
date.setUTCFullYear(year, month - 1, day);
|
|
@@ -105,6 +105,7 @@ export const zonedMoment = (value, zone, span, { end = false } = {}) => {
|
|
|
105
105
|
return time;
|
|
106
106
|
};
|
|
107
107
|
const AGO = /^(\d+)(m|h|d)$/u;
|
|
108
|
+
const MOMENT = /^(\d{4}-\d{2}-\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})?$/u;
|
|
108
109
|
const AGO_MS = { m: 60_000, h: 3_600_000, d: 86_400_000 };
|
|
109
110
|
const dayOf = (word, zone, now, span) => {
|
|
110
111
|
const today = new Intl.DateTimeFormat("en-CA", {
|
|
@@ -133,14 +134,16 @@ export const dateEndpoint = (value, zone, side, inclusive, span, now = Date.now(
|
|
|
133
134
|
time: dayBoundary(value, zone, side === "lower" ? !inclusive : inclusive, span),
|
|
134
135
|
inclusive: side === "lower",
|
|
135
136
|
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
const [, day, hour, minute, second = "0", offset] = MOMENT.exec(value) ?? [];
|
|
138
|
+
if (day === undefined)
|
|
139
|
+
queryError("query.invalid-date", span, "use an ISO date, a date and time such as 2026-10-01T09:00 (optional seconds and offset), today, yesterday or " +
|
|
140
|
+
"30m/2h/7d ago");
|
|
141
|
+
const moment = value.replace(" ", "T");
|
|
142
|
+
if (offset === undefined)
|
|
143
|
+
return { time: wallTime(moment, zone, span), inclusive };
|
|
144
|
+
calendar(day, span);
|
|
145
|
+
const time = Date.parse(moment);
|
|
146
|
+
if (!Number.isFinite(time) || Number(hour) > 23 || Number(minute) > 59 || Number(second) > 59)
|
|
144
147
|
queryError("query.invalid-date", span);
|
|
145
148
|
return { time, inclusive };
|
|
146
149
|
};
|
package/dist/standards/audit.js
CHANGED
|
@@ -143,11 +143,12 @@ export const PARITY_GROUPS = defineParityGroups([
|
|
|
143
143
|
covers: ["commands", "upgrade", "notes", "meetings"],
|
|
144
144
|
differences: FAMILY_SINCE_0_98,
|
|
145
145
|
},
|
|
146
|
-
// bitrix24-cli's search is cli-core's CRM `search all`, and beeline-cli's meetings take call
|
|
147
|
-
// zoom-cli's:
|
|
146
|
+
// bitrix24-cli's search is cli-core's CRM `search all`, and beeline-cli's and asterisk-cli's meetings take call
|
|
147
|
+
// recordings, not zoom-cli's: they are compared on the root commands every CLI shares, the way gcal and mail are.
|
|
148
|
+
// notion-cli joins here until its documents commands ship; then it moves next to drive.
|
|
148
149
|
{
|
|
149
150
|
name: "shared-roots",
|
|
150
|
-
members: ["tg", "max", "memo", "drive", "zm", "wa", "b24", "beeline"],
|
|
151
|
+
members: ["tg", "max", "memo", "drive", "zm", "wa", "b24", "beeline", "pbx", "notion"],
|
|
151
152
|
covers: ["commands", "doctor", "skill", "mcp", "upgrade"],
|
|
152
153
|
differences: [...MEMO_HAS_NO_PROFILES, MEMO_DOCTOR_DEEP],
|
|
153
154
|
},
|
|
@@ -22,6 +22,13 @@ export const CALENDAR_FLAGS = [
|
|
|
22
22
|
type: "string",
|
|
23
23
|
meaning: "a person invited to the event, by email address; repeat it for more",
|
|
24
24
|
},
|
|
25
|
+
{
|
|
26
|
+
name: "--setting",
|
|
27
|
+
value: "<name=value>",
|
|
28
|
+
role: "value",
|
|
29
|
+
type: "string",
|
|
30
|
+
meaning: "one of the service's own settings, such as a meeting's waiting room; repeat it for more",
|
|
31
|
+
},
|
|
25
32
|
{
|
|
26
33
|
name: "--id",
|
|
27
34
|
value: "<id>",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { VocabularyFlag } from "./vocabulary.js";
|
|
2
|
-
/** Memories and facts that rest on cited sources,
|
|
2
|
+
/** Memories and facts that rest on cited sources, sources the owner adds by hand, and the owner's labels. */
|
|
3
3
|
export declare const KNOWLEDGE_FLAGS: VocabularyFlag[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Memories and facts that rest on cited sources,
|
|
1
|
+
/** Memories and facts that rest on cited sources, sources the owner adds by hand, and the owner's labels. */
|
|
2
2
|
export const KNOWLEDGE_FLAGS = [
|
|
3
3
|
{
|
|
4
4
|
name: "--accept-terms",
|
|
@@ -34,4 +34,18 @@ export const KNOWLEDGE_FLAGS = [
|
|
|
34
34
|
meaning: "at most this many characters read",
|
|
35
35
|
unit: "characters",
|
|
36
36
|
},
|
|
37
|
+
{
|
|
38
|
+
name: "--tag",
|
|
39
|
+
value: "<name>",
|
|
40
|
+
role: "target",
|
|
41
|
+
type: "string",
|
|
42
|
+
meaning: "a tag, by its name or an alias: only what carries it is read",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "--matching",
|
|
46
|
+
value: "<query>",
|
|
47
|
+
role: "target",
|
|
48
|
+
type: "string",
|
|
49
|
+
meaning: "every stored thing a search with this query finds, in its query language; the command acts on each",
|
|
50
|
+
},
|
|
37
51
|
];
|
|
@@ -298,6 +298,7 @@ const collections = [
|
|
|
298
298
|
["files", "files in the source, such as Google Drive, read and changed there"],
|
|
299
299
|
["comments", "comments people left on a thing in the source: a channel post or a file"],
|
|
300
300
|
["meetings", "stored meetings, from Zoom or another provider"],
|
|
301
|
+
["calls", "phone calls a phone system recorded, stored as meetings with their transcripts"],
|
|
301
302
|
["calendars", "calendars of an account, each synced or not"],
|
|
302
303
|
["events", "calendar entries: meetings, appointments and other things on a calendar"],
|
|
303
304
|
["people", "persons the owner deals with, such as the attendees of events"],
|
package/docs/standards/ci.md
CHANGED
|
@@ -168,6 +168,7 @@ its prompt in cli-template says so from cli-template 0.8.0. A CLI on an older te
|
|
|
168
168
|
| UTC | Repository |
|
|
169
169
|
|---|---|
|
|
170
170
|
| 02:17 | cli-base |
|
|
171
|
+
| 02:20 | notion-cli |
|
|
171
172
|
| 02:24 | whatsapp-cli |
|
|
172
173
|
| 02:27 | gcal-cli |
|
|
173
174
|
| 02:31 | cli-memo |
|
|
@@ -175,6 +176,7 @@ its prompt in cli-template says so from cli-template 0.8.0. A CLI on an older te
|
|
|
175
176
|
| 02:38 | cli-core |
|
|
176
177
|
| 02:41 | mail-cli |
|
|
177
178
|
| 02:45 | drive-cli |
|
|
179
|
+
| 02:48 | asterisk-cli |
|
|
178
180
|
| 02:52 | cli-testing |
|
|
179
181
|
| 02:59 | max-cli |
|
|
180
182
|
| 03:02 | cli-template |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.101.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",
|