@wirecat/cli-base 0.46.0 → 0.47.1
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 +22 -0
- package/dist/failure.d.ts +1 -0
- package/dist/failure.js +1 -1
- package/dist/standards/errors.d.ts +2 -0
- package/dist/standards/flags-what.js +7 -0
- package/dist/standards/output.d.ts +17 -0
- package/dist/standards/output.js +5 -0
- package/docs/standards/output.md +4 -2
- package/docs/standards/permissions.md +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,28 @@ 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.47.1 — 19.10.2026
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **`--alias <name>` is a vocabulary flag** (role `query`): another name of the thing, searched as its own
|
|
16
|
+
alternative beside its name, repeatable. memo's `projects evidence` takes extra project names with it; before,
|
|
17
|
+
a CLI that wanted the option failed `option-role`.
|
|
18
|
+
|
|
19
|
+
## 0.47.0 — 18.10.2026
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- **A command step may carry `line`, the whole command to type** (`nextStepSchema`): `tg personal mcp config`, with
|
|
24
|
+
the profile, where `command` stays the bare path the MCP router takes. A CLI fills it, since only it knows the
|
|
25
|
+
profile; `renderError` prints `line` when it is there.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- **The permissions page says wa's `listen` is on main, not released**: WC-PERM-12's "Who follows these rules
|
|
30
|
+
today" said wa pins cli-core 0.341.0 with no `listen`. whatsapp-cli#136 moved wa's main branch to 0.343.0 with
|
|
31
|
+
`listen`, so its one-shot commands save incoming history there; wa 0.1.0, the newest release, still does not.
|
|
32
|
+
|
|
11
33
|
## 0.46.0 — 18.10.2026
|
|
12
34
|
|
|
13
35
|
### Added
|
package/dist/failure.d.ts
CHANGED
package/dist/failure.js
CHANGED
|
@@ -150,7 +150,7 @@ export const renderError = (object, options) => {
|
|
|
150
150
|
return [
|
|
151
151
|
`✗ ${visibleControls(message)}`,
|
|
152
152
|
...(step?.kind === "command"
|
|
153
|
-
? [`→ ${visibleControls(step.why)}: ${visibleControls(commandLine(options.cli, step))}`]
|
|
153
|
+
? [`→ ${visibleControls(step.why)}: ${visibleControls(step.line ?? commandLine(options.cli, step))}`]
|
|
154
154
|
: step
|
|
155
155
|
? [`→ ${visibleControls(step.why)}`]
|
|
156
156
|
: []),
|
|
@@ -19,6 +19,7 @@ export declare const errorObjectSchema: v.StrictObjectSchema<{
|
|
|
19
19
|
readonly step: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "dotted lower-case words, such as `page.next`">]>;
|
|
20
20
|
readonly command: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
21
21
|
readonly args: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
22
|
+
readonly line: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>, undefined>;
|
|
22
23
|
readonly why: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
23
24
|
readonly safe_to_auto_execute: v.BooleanSchema<undefined>;
|
|
24
25
|
}, undefined>, v.StrictObjectSchema<{
|
|
@@ -33,6 +34,7 @@ export declare const errorObjectSchema: v.StrictObjectSchema<{
|
|
|
33
34
|
args: {
|
|
34
35
|
[x: string]: unknown;
|
|
35
36
|
};
|
|
37
|
+
line?: string | undefined;
|
|
36
38
|
why: string;
|
|
37
39
|
safe_to_auto_execute: boolean;
|
|
38
40
|
} | {
|
|
@@ -13,6 +13,13 @@ export const WHAT_FLAGS = [
|
|
|
13
13
|
type: "string",
|
|
14
14
|
meaning: "literal words to find within the communications selected for preparation",
|
|
15
15
|
},
|
|
16
|
+
{
|
|
17
|
+
name: "--alias",
|
|
18
|
+
value: "<name>",
|
|
19
|
+
role: "query",
|
|
20
|
+
type: "string",
|
|
21
|
+
meaning: "another name of the thing, searched as its own alternative beside its name; repeat for more",
|
|
22
|
+
},
|
|
16
23
|
{
|
|
17
24
|
name: "--context-since-time",
|
|
18
25
|
value: "<time>",
|
|
@@ -10,6 +10,11 @@ export declare const nextStepSchema: v.VariantSchema<"kind", [v.StrictObjectSche
|
|
|
10
10
|
/** The command path as one string, `messages list` — what the MCP router tools take as `command`. */
|
|
11
11
|
readonly command: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
12
12
|
readonly args: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
13
|
+
/**
|
|
14
|
+
* The whole line to type, with the tool and the profile it ran with: `tg personal mcp config`. Only the CLI
|
|
15
|
+
* knows the profile, so it fills this; MCP answers leave it out.
|
|
16
|
+
*/
|
|
17
|
+
readonly line: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>, undefined>;
|
|
13
18
|
readonly why: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
14
19
|
/** True only when the target command is known to write nothing, here or at the provider. */
|
|
15
20
|
readonly safe_to_auto_execute: v.BooleanSchema<undefined>;
|
|
@@ -80,6 +85,11 @@ export declare const listEnvelopeSchema: <T extends v.GenericSchema>(item: T) =>
|
|
|
80
85
|
/** The command path as one string, `messages list` — what the MCP router tools take as `command`. */
|
|
81
86
|
readonly command: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
82
87
|
readonly args: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
88
|
+
/**
|
|
89
|
+
* The whole line to type, with the tool and the profile it ran with: `tg personal mcp config`. Only the CLI
|
|
90
|
+
* knows the profile, so it fills this; MCP answers leave it out.
|
|
91
|
+
*/
|
|
92
|
+
readonly line: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>, undefined>;
|
|
83
93
|
readonly why: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
84
94
|
/** True only when the target command is known to write nothing, here or at the provider. */
|
|
85
95
|
readonly safe_to_auto_execute: v.BooleanSchema<undefined>;
|
|
@@ -95,6 +105,7 @@ export declare const listEnvelopeSchema: <T extends v.GenericSchema>(item: T) =>
|
|
|
95
105
|
args: {
|
|
96
106
|
[x: string]: unknown;
|
|
97
107
|
};
|
|
108
|
+
line?: string | undefined;
|
|
98
109
|
why: string;
|
|
99
110
|
safe_to_auto_execute: boolean;
|
|
100
111
|
} | {
|
|
@@ -131,6 +142,11 @@ export declare const itemEnvelopeSchema: <T extends v.GenericSchema>(item: T) =>
|
|
|
131
142
|
/** The command path as one string, `messages list` — what the MCP router tools take as `command`. */
|
|
132
143
|
readonly command: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
133
144
|
readonly args: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
145
|
+
/**
|
|
146
|
+
* The whole line to type, with the tool and the profile it ran with: `tg personal mcp config`. Only the CLI
|
|
147
|
+
* knows the profile, so it fills this; MCP answers leave it out.
|
|
148
|
+
*/
|
|
149
|
+
readonly line: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>, undefined>;
|
|
134
150
|
readonly why: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
135
151
|
/** True only when the target command is known to write nothing, here or at the provider. */
|
|
136
152
|
readonly safe_to_auto_execute: v.BooleanSchema<undefined>;
|
|
@@ -146,6 +162,7 @@ export declare const itemEnvelopeSchema: <T extends v.GenericSchema>(item: T) =>
|
|
|
146
162
|
args: {
|
|
147
163
|
[x: string]: unknown;
|
|
148
164
|
};
|
|
165
|
+
line?: string | undefined;
|
|
149
166
|
why: string;
|
|
150
167
|
safe_to_auto_execute: boolean;
|
|
151
168
|
} | {
|
package/dist/standards/output.js
CHANGED
|
@@ -13,6 +13,11 @@ export const nextStepSchema = v.variant("kind", [
|
|
|
13
13
|
/** The command path as one string, `messages list` — what the MCP router tools take as `command`. */
|
|
14
14
|
command: text,
|
|
15
15
|
args: v.record(v.string(), v.unknown()),
|
|
16
|
+
/**
|
|
17
|
+
* The whole line to type, with the tool and the profile it ran with: `tg personal mcp config`. Only the CLI
|
|
18
|
+
* knows the profile, so it fills this; MCP answers leave it out.
|
|
19
|
+
*/
|
|
20
|
+
line: v.optional(text),
|
|
16
21
|
why: text,
|
|
17
22
|
/** True only when the target command is known to write nothing, here or at the provider. */
|
|
18
23
|
safe_to_auto_execute: v.boolean(),
|
package/docs/standards/output.md
CHANGED
|
@@ -102,9 +102,11 @@ JSON Schema 2020-12.
|
|
|
102
102
|
- **Example:** `next` holds the step to take, then one alternative. Each has `kind` (`command`, or `user_action` with
|
|
103
103
|
no command) and `safe_to_auto_execute`. A step that reads the service and writes only the local store (a sync) is
|
|
104
104
|
safe. A step that reads nothing remotely and writes locally (`store reindex`) is not: it waits to be asked. A step
|
|
105
|
-
is built from ids, counts and cursors the CLI holds, never from text a message, mail or document carried.
|
|
105
|
+
is built from ids, counts and cursors the CLI holds, never from text a message, mail or document carried. A CLI
|
|
106
|
+
answer's command step also has `line`, the whole command with the profile (`tg personal mcp config`), because
|
|
107
|
+
`command` is the bare path an MCP router takes and a copied path without the profile fails.
|
|
106
108
|
- **Exceptions:** none.
|
|
107
|
-
- **Applies to:** all CLIs. **Since:** cli-base 0.41.0. **Rulings:** none.
|
|
109
|
+
- **Applies to:** all CLIs. **Since:** cli-base 0.41.0 (`line`: next release). **Rulings:** none.
|
|
108
110
|
|
|
109
111
|
### WC-OUT-10 · Answer a write with what it did and its `operation_id`
|
|
110
112
|
|
|
@@ -24,7 +24,8 @@ writes", drive is a known gap.
|
|
|
24
24
|
WC-PERM-10 and WC-PERM-11 need cli-core 0.321.0, which tg, max and wa pin. WC-PERM-12 as written needs cli-core
|
|
25
25
|
0.337.0; before it, the lock let through some local writes that overwrite what the owner saved. A command other
|
|
26
26
|
than `serve` and `watch` saves incoming history only from cli-core 0.343.0, and only when the messenger's adapter has
|
|
27
|
-
`listen`. wa is the one messenger whose history lives in the store
|
|
27
|
+
`listen`. wa is the one messenger whose history lives in the store. Its main branch pins 0.343.0 and has `listen`
|
|
28
|
+
(whatsapp-cli#136), but no release carries it yet: the newest, wa 0.1.0, pins 0.326.0 and has no `listen`.
|
|
28
29
|
|
|
29
30
|
## Rules
|
|
30
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.1",
|
|
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",
|