@wirecat/cli-base 0.81.0 → 0.83.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 +39 -0
- package/dist/standards/flags-calendar.js +2 -2
- package/dist/standards/flags-crm.js +96 -0
- package/dist/standards/flags-how.js +1 -0
- package/dist/standards/flags-what.js +16 -1
- package/dist/standards/vocabulary.js +14 -2
- package/docs/standards/new-cli.md +14 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,38 @@ 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.83.0 — 08.11.2026
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **The flag vocabulary has `--button <text=data>` and `--no-buttons`.** `--button` (value, string, repeatable) is one
|
|
16
|
+
inline button under a bot's message, as its text and the data a press sends back; `--no-buttons` takes the buttons
|
|
17
|
+
off a message being edited. Negations here are `--no-<thing>` (`--no-preview`, `--no-approval`), so this one is not
|
|
18
|
+
`--clear-buttons`; `--clear` stays the generic unset. cli-core's `bot messages send` and `edit` use them.
|
|
19
|
+
- **The new-CLI handbook names the data-folder rule for a CLI published outside `@wirecat`:** WireCat Desktop adds
|
|
20
|
+
such a tool only when its `appName` is `<scope>-<name>` of the package or starts with it. It also says that the
|
|
21
|
+
template now calls `wcatStart`, writes the `wcat-` command and names a reference CLI for mail and crm.
|
|
22
|
+
|
|
23
|
+
## 0.82.0 — 07.11.2026
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- **`--from-app`**, a mode switch: the owner did this in the app that runs the tool (WireCat Desktop), so the tool
|
|
28
|
+
records it as the owner's with no terminal question. It is the app's word, not a security check (memo's decisions).
|
|
29
|
+
- **Vocabulary words for business records.** cli-memo adds products, contracts, subscriptions, wallets and bank
|
|
30
|
+
transactions (cli-core's business entities plan), and `cli-dev lint` would report each new command word as unknown.
|
|
31
|
+
New resources: `contracts`, `subscriptions`, `prices`, `wallets`, `transactions`, `splits` and `lines` (the rows of
|
|
32
|
+
an order or an invoice). New verb: `match`, which links waiting records to what their identifiers name; a name alone
|
|
33
|
+
never matches, so it is not `link`. New value flags: `--status`, `--product`, `--contract`, `--payment`,
|
|
34
|
+
`--refund-of`, `--wallet`, `--supplier`, `--customer`, `--trial-end-date`, `--notice-days`, `--auto-renew`,
|
|
35
|
+
`--opening-balance`, `--opening-date`, `--institution`, `--unit`, `--sku` and `--archived`. `--status` takes
|
|
36
|
+
`<state>`, as memo's task board already does, so a CLI that kept a lint override for `--status`, such as memo's
|
|
37
|
+
`tasks add`, `tasks update` and `tasks move`, can drop it.
|
|
38
|
+
- **`--every` also takes a count and a calendar unit, such as `1-month`,** for how often a charge repeats. A timer
|
|
39
|
+
still takes a `<duration>`. `--interval` stays another name for `--pause`, which `flag-synonym` refuses.
|
|
40
|
+
- **Wider meanings, nothing renamed:** `products` covers what the owner buys as well as sells, `cancel` covers a
|
|
41
|
+
subscription, and `--start-date` and `--end-date` cover a contract as well as an all-day event.
|
|
42
|
+
|
|
11
43
|
## 0.81.0 — 07.11.2026
|
|
12
44
|
|
|
13
45
|
### Added
|
|
@@ -34,6 +66,13 @@ Every entry says what changed as a caller sees it, why, and what to watch for
|
|
|
34
66
|
|
|
35
67
|
## 0.80.9 — 07.11.2026
|
|
36
68
|
|
|
69
|
+
### Added
|
|
70
|
+
|
|
71
|
+
- **`browse` is a vocabulary verb.** It names a read-only listing of one level of a remote hierarchy, such as a
|
|
72
|
+
provider's folders, for a picker to step through: drive-cli's `folders browse` lists Google Drive folders so WireCat
|
|
73
|
+
Desktop can offer them before `folders add`. `list` there already names the local selection, and the `tree` view
|
|
74
|
+
names stored sources, so neither fits. `cli-dev lint` no longer reports `browse` as `unknown-verb`.
|
|
75
|
+
|
|
37
76
|
### Fixed
|
|
38
77
|
|
|
39
78
|
- **The `wcat` launcher no longer fails with `exec: …/wcat-max: not found` when its tool is gone.** A tool
|
|
@@ -5,14 +5,14 @@ export const CALENDAR_FLAGS = [
|
|
|
5
5
|
value: "<date>",
|
|
6
6
|
role: "value",
|
|
7
7
|
type: "time",
|
|
8
|
-
meaning: "the first day of something that lasts whole days, such as an all-day event",
|
|
8
|
+
meaning: "the first day of something that lasts whole days, such as an all-day event or a contract",
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
name: "--end-date",
|
|
12
12
|
value: "<date>",
|
|
13
13
|
role: "value",
|
|
14
14
|
type: "time",
|
|
15
|
-
meaning: "the last day of something that lasts whole days, such as an all-day event",
|
|
15
|
+
meaning: "the last day of something that lasts whole days, such as an all-day event or a contract",
|
|
16
16
|
},
|
|
17
17
|
{ name: "--location", value: "<text>", role: "value", type: "string", meaning: "where it takes place" },
|
|
18
18
|
{
|
|
@@ -35,4 +35,100 @@ export const CRM_FLAGS = [
|
|
|
35
35
|
type: "id",
|
|
36
36
|
meaning: "the CRM user a record is assigned to, by the CRM's id",
|
|
37
37
|
},
|
|
38
|
+
{
|
|
39
|
+
name: "--status",
|
|
40
|
+
value: "<state>",
|
|
41
|
+
role: "value",
|
|
42
|
+
type: "choice",
|
|
43
|
+
meaning: "the state to put it in; the command lists the states",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "--product",
|
|
47
|
+
value: "<product>",
|
|
48
|
+
role: "value",
|
|
49
|
+
type: "string",
|
|
50
|
+
meaning: "a product or service the owner sells or buys: product:<id>",
|
|
51
|
+
},
|
|
52
|
+
{ name: "--contract", value: "<contract>", role: "value", type: "string", meaning: "a contract: contract:<id>" },
|
|
53
|
+
{ name: "--payment", value: "<payment>", role: "value", type: "string", meaning: "a payment: payment:<id>" },
|
|
54
|
+
{
|
|
55
|
+
name: "--refund-of",
|
|
56
|
+
value: "<payment>",
|
|
57
|
+
role: "value",
|
|
58
|
+
type: "string",
|
|
59
|
+
meaning: "the payment this one gives money back for: payment:<id>",
|
|
60
|
+
},
|
|
61
|
+
{ name: "--wallet", value: "<wallet>", role: "value", type: "string", meaning: "a wallet: wallet:<id>" },
|
|
62
|
+
{
|
|
63
|
+
name: "--supplier",
|
|
64
|
+
value: "<party>",
|
|
65
|
+
role: "value",
|
|
66
|
+
type: "string",
|
|
67
|
+
meaning: "who supplies it: person:<uid> or organization:<id>",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "--customer",
|
|
71
|
+
value: "<party>",
|
|
72
|
+
role: "value",
|
|
73
|
+
type: "string",
|
|
74
|
+
meaning: "who receives it and pays for it: person:<uid> or organization:<id>",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "--trial-end-date",
|
|
78
|
+
value: "<date>",
|
|
79
|
+
role: "value",
|
|
80
|
+
type: "time",
|
|
81
|
+
meaning: "the day a free trial ends, YYYY-MM-DD",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "--notice-days",
|
|
85
|
+
value: "<days>",
|
|
86
|
+
role: "value",
|
|
87
|
+
type: "count",
|
|
88
|
+
meaning: "how many days before its end a party must say it will not go on",
|
|
89
|
+
unit: "days",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "--auto-renew",
|
|
93
|
+
value: "<on|off>",
|
|
94
|
+
role: "value",
|
|
95
|
+
type: "choice",
|
|
96
|
+
meaning: "it renews by itself at its end, or it does not",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "--opening-balance",
|
|
100
|
+
value: "<decimal>",
|
|
101
|
+
role: "value",
|
|
102
|
+
type: "string",
|
|
103
|
+
meaning: "the money it held on --opening-date, as a decimal such as 1500.50; later movements count from it",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "--opening-date",
|
|
107
|
+
value: "<date>",
|
|
108
|
+
role: "value",
|
|
109
|
+
type: "time",
|
|
110
|
+
meaning: "the day of the opening balance, YYYY-MM-DD",
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: "--institution",
|
|
114
|
+
value: "<text>",
|
|
115
|
+
role: "value",
|
|
116
|
+
type: "string",
|
|
117
|
+
meaning: "the bank or other company that holds it, by name",
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "--unit",
|
|
121
|
+
value: "<text>",
|
|
122
|
+
role: "value",
|
|
123
|
+
type: "string",
|
|
124
|
+
meaning: "what one of it is counted in, such as hour or piece",
|
|
125
|
+
},
|
|
126
|
+
{ name: "--sku", value: "<code>", role: "value", type: "string", meaning: "the stock code the seller gives it" },
|
|
127
|
+
{
|
|
128
|
+
name: "--archived",
|
|
129
|
+
value: "<on|off>",
|
|
130
|
+
role: "value",
|
|
131
|
+
type: "choice",
|
|
132
|
+
meaning: "set it aside as no longer in use, or bring it back; what points at it keeps pointing at it",
|
|
133
|
+
},
|
|
38
134
|
];
|
|
@@ -232,6 +232,7 @@ export const HOW_FLAGS = [
|
|
|
232
232
|
type: "switch",
|
|
233
233
|
meaning: "record the action as the owner's although an agent's terminal runs the tool",
|
|
234
234
|
},
|
|
235
|
+
{ name: "--from-app", role: "mode", type: "switch", meaning: "the owner acted in the app; its word, not a check" },
|
|
235
236
|
{
|
|
236
237
|
name: "--allow-any-file",
|
|
237
238
|
role: "mode",
|
|
@@ -723,7 +723,14 @@ export const WHAT_FLAGS = [
|
|
|
723
723
|
type: "id",
|
|
724
724
|
meaning: "the stored calendar event it is linked to, or none to unlink",
|
|
725
725
|
},
|
|
726
|
-
{
|
|
726
|
+
{
|
|
727
|
+
name: "--every",
|
|
728
|
+
value: "<duration>",
|
|
729
|
+
role: "value",
|
|
730
|
+
type: "duration",
|
|
731
|
+
otherValues: ["count-unit"],
|
|
732
|
+
meaning: "repeat this often: a length of time for a timer (<duration>), a count and a calendar unit for a charge, such as 1-month (<count-unit>)",
|
|
733
|
+
},
|
|
727
734
|
{
|
|
728
735
|
name: "--evidence",
|
|
729
736
|
value: "<ref...>",
|
|
@@ -794,7 +801,15 @@ export const WHAT_FLAGS = [
|
|
|
794
801
|
meaning: "what kind of thing it is; the command lists the kinds",
|
|
795
802
|
},
|
|
796
803
|
{ name: "--name", value: "<name>", role: "value", type: "string", meaning: "the name to give it" },
|
|
804
|
+
{
|
|
805
|
+
name: "--button",
|
|
806
|
+
value: "<text=data>",
|
|
807
|
+
role: "value",
|
|
808
|
+
type: "string",
|
|
809
|
+
meaning: "an inline button under a message: its text, then the data a press sends back; repeat for more in one row",
|
|
810
|
+
},
|
|
797
811
|
{ name: "--no-approval", role: "value", type: "switch", meaning: "anyone with the link joins at once" },
|
|
812
|
+
{ name: "--no-buttons", role: "value", type: "switch", meaning: "take the buttons off the message" },
|
|
798
813
|
{
|
|
799
814
|
name: "--notification",
|
|
800
815
|
value: "<text>",
|
|
@@ -99,6 +99,7 @@ export const defineVocabulary = (input) => parseRegistry("vocabulary", vocabular
|
|
|
99
99
|
const verbs = [
|
|
100
100
|
["list", "show many"],
|
|
101
101
|
["show", "show one"],
|
|
102
|
+
["browse", "list one level of a remote hierarchy, such as a provider's folders, to choose from; reads only"],
|
|
102
103
|
["search", "find by text; the description says where it looks"],
|
|
103
104
|
["prepare", "assemble bounded cited context for a selected upcoming activity without applying findings"],
|
|
104
105
|
["related", "what is nearest in meaning to one thing, without a query"],
|
|
@@ -129,7 +130,7 @@ const verbs = [
|
|
|
129
130
|
["revoke", "take back what was granted, so it stops working: a login, an invite link, a consent"],
|
|
130
131
|
["install", "install a system unit"],
|
|
131
132
|
["uninstall", "remove a system unit"],
|
|
132
|
-
["cancel", "stop a job
|
|
133
|
+
["cancel", "stop a job, a pending thing or a subscription"],
|
|
133
134
|
[
|
|
134
135
|
"sync",
|
|
135
136
|
"bring the local store up to date from the source: only what changed, or the whole list where the source cannot say; a mirror syncs both ways",
|
|
@@ -152,6 +153,10 @@ const verbs = [
|
|
|
152
153
|
// Only when someone asks, never from a matching name: WC-ACCT-11 in docs/standards/accounts.md.
|
|
153
154
|
["link", "record that two identities are one person"],
|
|
154
155
|
["unlink", "undo a link"],
|
|
156
|
+
[
|
|
157
|
+
"match",
|
|
158
|
+
"link each waiting record to the thing its identifiers name, such as a person by e-mail address; a name alone never matches",
|
|
159
|
+
],
|
|
155
160
|
["allocate", "match a payment to the invoice or order it settles, in whole or in part"],
|
|
156
161
|
["lookup", "ask the messenger who is behind a phone number"],
|
|
157
162
|
[
|
|
@@ -264,7 +269,14 @@ const collections = [
|
|
|
264
269
|
["leads", "possible customers not yet qualified into a deal"],
|
|
265
270
|
["pipelines", "ordered sets of stages a deal moves through"],
|
|
266
271
|
["stages", "steps of a pipeline, each open, won or lost"],
|
|
267
|
-
["products", "goods and services the owner sells, with their prices"],
|
|
272
|
+
["products", "goods and services the owner sells or buys, with their prices"],
|
|
273
|
+
["lines", "the rows of an order or an invoice: what, how many and at what price"],
|
|
274
|
+
["contracts", "agreements the owner is a party to, with their terms, dates and renewal"],
|
|
275
|
+
["subscriptions", "charges that repeat on a schedule, which the owner pays or is paid, with their price history"],
|
|
276
|
+
["prices", "what a thing costs over time, each price from its start date"],
|
|
277
|
+
["wallets", "places that hold the owner's money, such as a bank account, a card or cash"],
|
|
278
|
+
["transactions", "money that moved in or out of a wallet, as the bank or the owner recorded it"],
|
|
279
|
+
["splits", "parts of one transaction, each with its own amount and category"],
|
|
268
280
|
["users", "people who work in the owner's account at a service, such as a CRM's employees"],
|
|
269
281
|
["fields", "a record type's field definitions: code, label, type and options, such as a CRM's custom fields"],
|
|
270
282
|
[
|
|
@@ -38,8 +38,8 @@ Every choice question also takes `other:<your answer>`.
|
|
|
38
38
|
|
|
39
39
|
`new` copies the template of its own package version into `<name>-cli/`, renames the command word everywhere, runs
|
|
40
40
|
`git init`, records the template version in `template.json`, writes `docs/dev/DESIGN.md` from your answers and names
|
|
41
|
-
a reference CLI for your category in `AGENTS.md
|
|
42
|
-
|
|
41
|
+
a reference CLI for your category in `AGENTS.md`: mail-cli for `mail`, bitrix24-cli for `crm`. `other:` has none;
|
|
42
|
+
`AGENTS.md` then says to pick the nearest one with the owner from the Reference CLIs page. It does not
|
|
43
43
|
install packages, push, create the repository or publish. Then:
|
|
44
44
|
|
|
45
45
|
```sh
|
|
@@ -81,9 +81,9 @@ installing that command; nothing else is registered anywhere.
|
|
|
81
81
|
[WC-CMD-29](commands.md#wc-cmd-29--answer---wcat-describe-and-take-no-name-wirecat-reserves) asks a CLI outside
|
|
82
82
|
WireCat not to take one.
|
|
83
83
|
- **The command.** `"bin": { "wcat-<name>": "dist/bin/<name>.js" }`. `cli-dev lint` warns about a `"bin"` key without
|
|
84
|
-
the `wcat-` prefix. The template
|
|
85
|
-
- **The description `wcat --help` shows.** The
|
|
86
|
-
|
|
84
|
+
the `wcat-` prefix. The template writes both `<name>` and `wcat-<name>`.
|
|
85
|
+
- **The description `wcat --help` shows.** The bin calls `wcatStart` first, before the program loads; the template's
|
|
86
|
+
bin does:
|
|
87
87
|
|
|
88
88
|
```ts
|
|
89
89
|
import { wcatStart } from "@wirecat/cli-base/wcat/start"
|
|
@@ -109,11 +109,17 @@ installing that command; nothing else is registered anywhere.
|
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
`cli-dev manifest --program dist/program.js --identity dist/wcat.js` writes the file; `--check` in CI fails when it
|
|
112
|
-
is stale.
|
|
113
|
-
|
|
112
|
+
is stale. `wcatStart` reads the shipped file for `--wcat-describe`, so the bin needs only the format-1 fields and
|
|
113
|
+
keeps the program out of its first import. List `contracts/wirecat.json`, not all of `contracts`, in `files`
|
|
114
|
+
([WC-REL-16](releases.md#wc-rel-16--the-package-ships-only-the-files-it-names)). A CLI with a
|
|
114
115
|
`sync` command also sets `syncs`, what it copies in at most 40 characters. The file holds no version, and
|
|
115
116
|
`mcpServer` no port: Desktop reads the version from npm and gives the tool a free port. A command the manifest lists
|
|
116
|
-
without `effects` counts as a write; `permissionOf` adds each command's permission key. See
|
|
117
|
+
without `effects` counts as a write; `permissionOf` adds each command's permission key. See
|
|
118
|
+
[WC-CMD-29](commands.md#wc-cmd-29--answer---wcat-describe-and-take-no-name-wirecat-reserves).
|
|
119
|
+
- **A CLI published outside `@wirecat`.** WireCat Desktop adds it only when its data folder, the identity's `appName`,
|
|
120
|
+
is `<scope>-<name>` of the package or starts with `<scope>-<name>-`, with `.` and `_` read as `-`: `@acme/crm-cli`
|
|
121
|
+
keeps its data in `acme-crm-cli`. Only the scope's owner publishes under it, so the folder Desktop may delete is
|
|
122
|
+
theirs. `new` names it so for a package outside `@wirecat`.
|
|
117
123
|
- **The short name.** `wcat shortcuts add <name>` makes `<name>` a shortcut to `wcat-<name>`, only when no program on
|
|
118
124
|
PATH has that name. A CLI does not install its short name itself.
|
|
119
125
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.83.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",
|