@wirecat/cli-template 0.1.3 → 0.1.4
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 +19 -0
- package/README.md +1 -0
- package/contracts/mcp-tools.json +2 -2
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +1 -0
- package/dist/identity.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +2 -1
- package/dist/program.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/commands.md +68 -7
- package/docs/dev/reference-clis.md +4 -0
- package/docs/dev/test-matrix.md +7 -1
- package/kit/dist/new.js +3 -1
- package/package.json +2 -2
- package/src/identity.ts +1 -0
- package/src/program.test.ts +19 -1
- package/src/program.ts +2 -0
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
Notable changes to `@wirecat/cli-template`. One section per version, newest first; versions follow
|
|
4
4
|
[semantic versioning](https://semver.org), so before `1.0.0` the skeleton may still change.
|
|
5
5
|
|
|
6
|
+
## 0.1.4 — 25.10.2026
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- **The run log can be read: `runs list`, `runs show` and `runs path`** (WC-LIFE-15). A failed command was already
|
|
11
|
+
kept as a run by cli-core's `run`, but nothing in the CLI could show it. `src/program.ts` now registers cli-core's
|
|
12
|
+
`runsCommand`. A CLI started from an older template adds the same line; cli-base's `missing-run-log` lint rule
|
|
13
|
+
reports the CLIs that have not.
|
|
14
|
+
- **`new --category messenger` writes `messenger: true` into the CLI's identity.** Every other category keeps the
|
|
15
|
+
template's `messenger: false`. The Reference CLIs page says which to set.
|
|
16
|
+
|
|
17
|
+
### Changed — may break callers
|
|
18
|
+
|
|
19
|
+
- **The skeleton runs on cli-core 0.422.0 and says `messenger: false` in `src/identity.ts`.** The shared help,
|
|
20
|
+
`commands`, `config` and the MCP tools no longer speak of chats and messages: `--help-all`'s profile example is
|
|
21
|
+
`clidev personal doctor`, `--brief` and `--full` describe found items and their author, and `config set` and
|
|
22
|
+
`unset` no longer list `sender_colors`. cli-base stays on 0.53, because cli-core 0.422.0 accepts only cli-base 0.53.
|
|
23
|
+
A CLI that upgrades sets the field in its own `src/identity.ts` and refreshes its contract snapshots once.
|
|
24
|
+
|
|
6
25
|
## 0.1.3 — 25.10.2026
|
|
7
26
|
|
|
8
27
|
### Added
|
package/README.md
CHANGED
|
@@ -34,6 +34,7 @@ none is ever assumed. `CLIDEV_PROFILE=personal` does the same for a whole shell
|
|
|
34
34
|
| `clidev personal config show` | Shows each setting and where it came from |
|
|
35
35
|
| `clidev skill install` | Installs the agent skill for Claude Code, Codex and Gemini CLI |
|
|
36
36
|
| `clidev personal mcp` | Serves the profile's commands to an AI agent over MCP |
|
|
37
|
+
| `clidev runs list` | Lists recorded runs, newest first: every command that failed is kept |
|
|
37
38
|
| `clidev upgrade --check` | Says whether a newer version is on npm |
|
|
38
39
|
|
|
39
40
|
## For AI agents
|
package/contracts/mcp-tools.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"type": "object"
|
|
19
19
|
},
|
|
20
20
|
"command": {
|
|
21
|
-
"description": "a command clidev_tools_search returned: \"
|
|
21
|
+
"description": "a command clidev_tools_search returned: \"commands\"",
|
|
22
22
|
"minLength": 1,
|
|
23
23
|
"type": "string"
|
|
24
24
|
}
|
|
@@ -492,7 +492,7 @@
|
|
|
492
492
|
"type": "object"
|
|
493
493
|
},
|
|
494
494
|
"command": {
|
|
495
|
-
"description": "a command clidev_tools_search returned: \"
|
|
495
|
+
"description": "a command clidev_tools_search returned: \"commands\"",
|
|
496
496
|
"minLength": 1,
|
|
497
497
|
"type": "string"
|
|
498
498
|
}
|
package/dist/identity.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,eAAO,MAAM,OAAO,wBAAwB,CAAA;AAE5C,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,eAAO,MAAM,OAAO,wBAAwB,CAAA;AAE5C,eAAO,MAAM,QAAQ,EAAE,WAQtB,CAAA;AAED,eAAO,MAAM,KAAK,mBAA4D,CAAA"}
|
package/dist/identity.js
CHANGED
|
@@ -7,6 +7,7 @@ export const IDENTITY = {
|
|
|
7
7
|
description: "a new WireCat CLI, started from cli-template",
|
|
8
8
|
version: VERSION,
|
|
9
9
|
issues: "https://github.com/WireCatLabs/clidev-cli/issues/new",
|
|
10
|
+
messenger: false,
|
|
10
11
|
};
|
|
11
12
|
export const SKILL = new URL("../skills/clidev-cli/SKILL.md", import.meta.url);
|
|
12
13
|
//# sourceMappingURL=identity.js.map
|
package/dist/identity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,CAAC,MAAM,OAAO,GAAG,qBAAqB,CAAA;AAE5C,MAAM,CAAC,MAAM,QAAQ,GAAgB;IACnC,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,YAAY;IACrB,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,8CAA8C;IAC3D,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,sDAAsD;
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,CAAC,MAAM,OAAO,GAAG,qBAAqB,CAAA;AAE5C,MAAM,CAAC,MAAM,QAAQ,GAAgB;IACnC,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,YAAY;IACrB,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,8CAA8C;IAC3D,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,sDAAsD;IAC9D,SAAS,EAAE,KAAK;CACjB,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,+BAA+B,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAA"}
|
package/dist/program.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,UAAU,EAKhB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAiBxC,eAAO,MAAM,UAAU,QAAO,iBAiB5B,CAAA;AAEF,eAAO,MAAM,aAAa,aAAc,cAAc,KAAG,OAAqD,CAAA;AAE9G,eAAO,MAAM,GAAG,SAAU,MAAM,EAAE,YAAY,UAAU,KAAG,OAAO,CAAC,MAAM,CAA2C,CAAA"}
|
package/dist/program.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import { resolvePaths } from "@wirecat/cli-base";
|
|
3
|
-
import { commandsCommand, configCommand, createProgram as createSharedProgram, outputFor, run as runShared, skillCommand, upgradeCommand, } from "@wirecat/cli-core/cli";
|
|
3
|
+
import { commandsCommand, configCommand, createProgram as createSharedProgram, outputFor, run as runShared, runsCommand, skillCommand, upgradeCommand, } from "@wirecat/cli-core/cli";
|
|
4
4
|
import { appUpdate } from "@wirecat/cli-core/update";
|
|
5
5
|
import { doctorCommand } from "./commands/doctor.js";
|
|
6
6
|
import { mcpCommand } from "./commands/mcp.js";
|
|
@@ -30,6 +30,7 @@ export const definition = () => ({
|
|
|
30
30
|
install: (argv) => update.runUpdate(argv, {}),
|
|
31
31
|
})),
|
|
32
32
|
configCommand(IDENTITY, configuration),
|
|
33
|
+
runsCommand(IDENTITY),
|
|
33
34
|
],
|
|
34
35
|
});
|
|
35
36
|
export const createProgram = (options) => createSharedProgram(definition(), options);
|
package/dist/program.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EACL,eAAe,EACf,aAAa,EACb,aAAa,IAAI,mBAAmB,EACpC,SAAS,EAIT,GAAG,IAAI,SAAS,EAChB,YAAY,EACZ,cAAc,GACf,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAExD,MAAM,MAAM,GAAG,SAAS,CAAC;IACvB,WAAW,EAAE,OAAO;IACpB,OAAO,EAAE,QAAQ,CAAC,OAAO;IACzB,OAAO,EAAE,QAAQ,CAAC,OAAO;IACzB,KAAK,EAAE,OAAO,IAAI,CAAC,GAAG;IACtB,SAAS,EAAE,CAAC,GAAG,E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AAE;IACjE,QAAQ,EAAE,GAAG,EAAE,CAAC;QACd,eAAe,CAAC,QAAQ,CAAC;QACzB,aAAa,EAAE;QACf,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC;QAC7B,UAAU,EAAE;QACZ,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAC9C,GAAG,SAAS,CAAC,OAAO,CAAC;YACrB,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;YACrC,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/B,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC;SAC9C,CAAC,CAAC;QACH,aAAa,CAAC,QAAQ,EAAE,aAAa,CAAC;QACtC,WAAW,CAAC,QAAQ,CAAC;KACtB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAwB,EAAW,EAAE,CAAC,mBAAmB,CAAC,UAAU,EAAE,EAAE,OAAO,CAAC,CAAA;AAE9G,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,IAAc,EAAE,OAAoB,EAAmB,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,OAAO,CAAC,CAAA"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.
|
|
1
|
+
export declare const VERSION = "0.1.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "0.1.
|
|
1
|
+
export const VERSION = "0.1.4";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/docs/commands.md
CHANGED
|
@@ -18,18 +18,18 @@ lists the profiles on this computer.
|
|
|
18
18
|
| `--json` | machine-readable output: one JSON value on stdout; --json=id,text keeps only those fields. |
|
|
19
19
|
| `--jsonl` | machine-readable output: one JSON object per line, for streaming and jq. |
|
|
20
20
|
| `--quiet` | diagnostics off; a failure is still said. |
|
|
21
|
-
| `--trace` | the connection's own log lines on stderr — never
|
|
21
|
+
| `--trace` | the connection's own log lines on stderr — never content. |
|
|
22
22
|
| `--debug` | on a failure, its whole record — cause and stack — in place of the short line. |
|
|
23
23
|
| `--timeout <duration>` | give up on the whole command after this — 30s, 2m, 500ms. |
|
|
24
24
|
| `--offline` | answer from what was recorded and never connect; fails if nothing was. |
|
|
25
25
|
| `--no-input` | never prompt or open interactive login; piped input remains available. |
|
|
26
26
|
| `--max-input-bytes <bytes>` | maximum buffered input bytes (default: 16777216). |
|
|
27
27
|
| `--max-output-bytes <bytes>` | maximum machine output bytes (default: 4194304; 0 disables). |
|
|
28
|
-
| `--brief` | found
|
|
29
|
-
| `--full` | found
|
|
28
|
+
| `--brief` | found items as reference, title, time, author and excerpt only. |
|
|
29
|
+
| `--full` | found items with their whole text and every provider field. |
|
|
30
30
|
| `--dry-run` | preview parsed arguments and permissions before running the action. |
|
|
31
31
|
| `--yes` | go ahead without the question an ask level puts before a write. |
|
|
32
|
-
| `--record` | keep this run — ids and timings, never
|
|
32
|
+
| `--record` | keep this run — ids and timings, never content. |
|
|
33
33
|
| `--no-record` | do not keep it, whatever the configuration says. |
|
|
34
34
|
|
|
35
35
|
## `clidev commands`
|
|
@@ -50,7 +50,7 @@ clidev commands info [path]
|
|
|
50
50
|
|
|
51
51
|
**Returns:** one command contract, or all schemas, error reasons and explicit overrides
|
|
52
52
|
|
|
53
|
-
**Example:** `clidev commands info
|
|
53
|
+
**Example:** `clidev commands info commands`
|
|
54
54
|
|
|
55
55
|
## `clidev doctor`
|
|
56
56
|
|
|
@@ -166,7 +166,7 @@ clidev config set <setting> <value> [options]
|
|
|
166
166
|
|
|
167
167
|
| Argument | | What it is |
|
|
168
168
|
|---|---|---|
|
|
169
|
-
| `setting` | required | one of: limit, timeout_ms, color,
|
|
169
|
+
| `setting` | required | one of: limit, timeout_ms, color, record, keep_runs_for_days, permissions, sends_per_hour, requests_per_minute, transcribe_with, speech_model, search_catch_up, picture_search, embedding_provider, embedding_model, embedding_base_url, embedding_dims, analysis_provider, analysis_model, analysis_base_url, models, read_other_bots, update_check, skill_hint, search_stemmers.cyrillic, search_stemmers.latin, phone_countries, task_categories.<name>, task_agent_close, task_agent_close_min, task_first_pass_per_chat, account_groups.<name>. |
|
|
170
170
|
| `value` | required | a number, true or false; for a group tg:work,max:Alice,email:me@x. |
|
|
171
171
|
|
|
172
172
|
| Option | What it does |
|
|
@@ -191,7 +191,7 @@ clidev config unset <setting> [options]
|
|
|
191
191
|
|
|
192
192
|
| Argument | | What it is |
|
|
193
193
|
|---|---|---|
|
|
194
|
-
| `setting` | required | one of: limit, timeout_ms, color,
|
|
194
|
+
| `setting` | required | one of: limit, timeout_ms, color, record, keep_runs_for_days, permissions, sends_per_hour, requests_per_minute, transcribe_with, speech_model, search_catch_up, picture_search, embedding_provider, embedding_model, embedding_base_url, embedding_dims, analysis_provider, analysis_model, analysis_base_url, models, read_other_bots, update_check, skill_hint, default_profile, search_stemmers.cyrillic, search_stemmers.latin, phone_countries, task_categories.<name>, task_agent_close, task_agent_close_min, task_first_pass_per_chat, account_groups.<name>. |
|
|
195
195
|
|
|
196
196
|
| Option | What it does |
|
|
197
197
|
|---|---|
|
|
@@ -203,6 +203,67 @@ clidev config unset <setting> [options]
|
|
|
203
203
|
|
|
204
204
|
**Example:** `clidev personal config unset limit`
|
|
205
205
|
|
|
206
|
+
## `clidev runs`
|
|
207
|
+
|
|
208
|
+
recorded runs — what this tool did, and when
|
|
209
|
+
|
|
210
|
+
### `clidev runs list`
|
|
211
|
+
|
|
212
|
+
recorded runs, newest first
|
|
213
|
+
|
|
214
|
+
```sh
|
|
215
|
+
clidev runs list [query] [options]
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
| Argument | | What it is |
|
|
219
|
+
|---|---|---|
|
|
220
|
+
| `query` | optional | field:value terms that narrow the list — the fields are below. |
|
|
221
|
+
|
|
222
|
+
| Option | What it does |
|
|
223
|
+
|---|---|
|
|
224
|
+
| `--limit <n>` | how many to show. Default: `20`. |
|
|
225
|
+
| `--page <n>` | which page, starting at 1. Default: `1`. |
|
|
226
|
+
|
|
227
|
+
**Returns:** run — run_id, command, profile, started_at, status, cli_version, completed_at, requests, and 15 more; every field: clidev commands info runs list
|
|
228
|
+
|
|
229
|
+
**Example:** `clidev personal runs list --limit 10`
|
|
230
|
+
|
|
231
|
+
### `clidev runs show`
|
|
232
|
+
|
|
233
|
+
one run: what it was, how it ended, and every event it logged
|
|
234
|
+
|
|
235
|
+
```sh
|
|
236
|
+
clidev runs show <run-id> [options]
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
| Argument | | What it is |
|
|
240
|
+
|---|---|---|
|
|
241
|
+
| `run-id` | required | an id from `clidev runs list`. |
|
|
242
|
+
|
|
243
|
+
| Option | What it does |
|
|
244
|
+
|---|---|
|
|
245
|
+
| `--problems` | only failed responses, warnings and crashes. |
|
|
246
|
+
|
|
247
|
+
**Returns:** run details — run_id, command, profile, started_at, status, cli_version, directory, event_count, and 14 more; every field: clidev commands info runs show
|
|
248
|
+
|
|
249
|
+
**Example:** `clidev personal runs show run-101`
|
|
250
|
+
|
|
251
|
+
### `clidev runs path`
|
|
252
|
+
|
|
253
|
+
the directory holding one run
|
|
254
|
+
|
|
255
|
+
```sh
|
|
256
|
+
clidev runs path <run-id>
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
| Argument | | What it is |
|
|
260
|
+
|---|---|---|
|
|
261
|
+
| `run-id` | required | an id from `clidev runs list`. |
|
|
262
|
+
|
|
263
|
+
**Returns:** run location — path; every field: clidev commands info runs path
|
|
264
|
+
|
|
265
|
+
**Example:** `clidev personal runs path run-101`
|
|
266
|
+
|
|
206
267
|
## Exit codes
|
|
207
268
|
|
|
208
269
|
Branch on the code, not on the text: the text can change, the code does not.
|
|
@@ -11,5 +11,9 @@ the first question of the [design interview](skills/design-interview/SKILL.md):
|
|
|
11
11
|
| notes | [cli-memo](https://github.com/WireCatLabs/cli-memo) |
|
|
12
12
|
| mail, calendar, other | none yet: pick the nearest one with the owner |
|
|
13
13
|
|
|
14
|
+
A messenger CLI sets `messenger: true` in `src/identity.ts`, and `new --category messenger` writes it. Every other
|
|
15
|
+
category keeps the template's `messenger: false`, so the shared help, `commands` and `config` do not speak of chats,
|
|
16
|
+
messages and senders.
|
|
17
|
+
|
|
14
18
|
Until cli-core has a provider registry, a CLI made from this template is not listed as a provider of its own, and
|
|
15
19
|
`search` finds its records as messages.
|
package/docs/dev/test-matrix.md
CHANGED
|
@@ -7,7 +7,7 @@ ran it · ⛔ not tested offline, with the reason and where it is checked instea
|
|
|
7
7
|
Measured from the test run (`coverage/argv.jsonl`), not searched for — see
|
|
8
8
|
[TESTING.md](TESTING.md) for how, and for the states and failures that cut across commands.
|
|
9
9
|
|
|
10
|
-
**
|
|
10
|
+
**43 ✅ · 2 ⛔ · 0 ❌** — 14 commands, 31 options.
|
|
11
11
|
|
|
12
12
|
| Command | Option | | Note |
|
|
13
13
|
|---|---|---|---|
|
|
@@ -30,6 +30,12 @@ Measured from the test run (`coverage/argv.jsonl`), not searched for — see
|
|
|
30
30
|
| `config unset` | `--defaults` | ✅ | |
|
|
31
31
|
| `config unset` | `--personal` | ✅ | |
|
|
32
32
|
| `config unset` | `--bot` | ✅ | |
|
|
33
|
+
| `runs list` | | ✅ | |
|
|
34
|
+
| `runs list` | `--limit` | ✅ | |
|
|
35
|
+
| `runs list` | `--page` | ✅ | |
|
|
36
|
+
| `runs show` | | ✅ | |
|
|
37
|
+
| `runs show` | `--problems` | ✅ | |
|
|
38
|
+
| `runs path` | | ✅ | |
|
|
33
39
|
| `help` | | ✅ | |
|
|
34
40
|
| *global* | `--version` | ⛔ | Commander answers before any command runs, so the trace never sees it; `pnpm version:check` checks it |
|
|
35
41
|
| *global* | `--verbose` | ✅ | |
|
package/kit/dist/new.js
CHANGED
|
@@ -167,6 +167,8 @@ export const withContentLanguages = (text, languages) => {
|
|
|
167
167
|
const line = ` contentLanguages: [${languages.map((code) => JSON.stringify(code)).join(", ")}],\n`;
|
|
168
168
|
return text.slice(0, end) + line + text.slice(end);
|
|
169
169
|
};
|
|
170
|
+
// cli-core treats an unset or true `messenger` as a messenger and speaks of chats; the template says false.
|
|
171
|
+
export const withMessenger = (text, category) => category === "messenger" ? text.replace(/^ {2}messenger: false,$/m, " messenger: true,") : text;
|
|
170
172
|
export const cliReadme = (names) => [
|
|
171
173
|
`# ${names.command}`,
|
|
172
174
|
"",
|
|
@@ -227,7 +229,7 @@ export const runNew = async (cwd, source, args, io) => {
|
|
|
227
229
|
"README.md": () => cliReadme(names),
|
|
228
230
|
"CHANGELOG.md": () => cliChangelog(names, source),
|
|
229
231
|
[VERSION_FILE]: (text) => text.replace(/VERSION = "[^"]*"/, 'VERSION = "0.0.0"'),
|
|
230
|
-
[IDENTITY_FILE]: (text) => withContentLanguages(text, answers.contentLang ?? []),
|
|
232
|
+
[IDENTITY_FILE]: (text) => withMessenger(withContentLanguages(text, answers.contentLang ?? []), category),
|
|
231
233
|
"AGENTS.md": (text) => withReference(text, category),
|
|
232
234
|
};
|
|
233
235
|
const hashes = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-template",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Start a new WireCat CLI: a working skeleton on cli-base and cli-core, copied by new and kept current by upgrade",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@modelcontextprotocol/server": "2.3.0",
|
|
86
86
|
"@wirecat/cli-base": "0.53.0",
|
|
87
|
-
"@wirecat/cli-core": "0.
|
|
87
|
+
"@wirecat/cli-core": "0.422.0",
|
|
88
88
|
"commander": "15.0.0"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
package/src/identity.ts
CHANGED
|
@@ -10,6 +10,7 @@ export const IDENTITY: AppIdentity = {
|
|
|
10
10
|
description: "a new WireCat CLI, started from cli-template",
|
|
11
11
|
version: VERSION,
|
|
12
12
|
issues: "https://github.com/WireCatLabs/clidev-cli/issues/new",
|
|
13
|
+
messenger: false,
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export const SKILL = new URL("../skills/clidev-cli/SKILL.md", import.meta.url)
|
package/src/program.test.ts
CHANGED
|
@@ -19,7 +19,7 @@ it("lists the required root commands and config", async () => {
|
|
|
19
19
|
const { code, out } = await ran(["commands", "--json"])
|
|
20
20
|
expect(code).toBe(0)
|
|
21
21
|
const names = (JSON.parse(out) as { commands: { name: string }[] }).commands.map((command) => command.name)
|
|
22
|
-
expect(names).toEqual(expect.arrayContaining(["commands", "doctor", "skill", "mcp", "upgrade", "config"]))
|
|
22
|
+
expect(names).toEqual(expect.arrayContaining(["commands", "doctor", "skill", "mcp", "upgrade", "config", "runs"]))
|
|
23
23
|
})
|
|
24
24
|
|
|
25
25
|
it("doctor answers without a config file", async () => {
|
|
@@ -64,3 +64,21 @@ it("upgrade --check installs nothing when npm cannot be reached", async () => {
|
|
|
64
64
|
expect(code).toBe(0)
|
|
65
65
|
expect(json(out).item).toMatchObject({ current: IDENTITY.version, latest: null, updated: false })
|
|
66
66
|
})
|
|
67
|
+
|
|
68
|
+
it("keeps a failed command as a run, and runs list, show and path read it back (WC-LIFE-15)", async () => {
|
|
69
|
+
expect((await ran(["--no-such-flag"])).code).toBe(2)
|
|
70
|
+
const listed = await ran(["runs", "list", "--limit", "5", "--page", "1", "--json"])
|
|
71
|
+
expect(listed.code).toBe(0)
|
|
72
|
+
const failed = (JSON.parse(listed.out) as { items: { run_id: string; status: string }[] }).items.find(
|
|
73
|
+
(run) => run.status === "failed",
|
|
74
|
+
)
|
|
75
|
+
expect(failed).toBeDefined()
|
|
76
|
+
const id = failed?.run_id ?? ""
|
|
77
|
+
const shown = await ran(["runs", "show", id, "--json"])
|
|
78
|
+
expect(shown.code).toBe(0)
|
|
79
|
+
expect(shown.out).toContain(id)
|
|
80
|
+
expect((await ran(["runs", "show", id, "--problems", "--json"])).code).toBe(0)
|
|
81
|
+
const path = await ran(["runs", "path", id])
|
|
82
|
+
expect(path.code).toBe(0)
|
|
83
|
+
expect(path.out).toContain(id)
|
|
84
|
+
})
|
package/src/program.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
type ProgramOptions,
|
|
10
10
|
type RunOptions,
|
|
11
11
|
run as runShared,
|
|
12
|
+
runsCommand,
|
|
12
13
|
skillCommand,
|
|
13
14
|
upgradeCommand,
|
|
14
15
|
} from "@wirecat/cli-core/cli"
|
|
@@ -45,6 +46,7 @@ export const definition = (): ProgramDefinition => ({
|
|
|
45
46
|
install: (argv) => update.runUpdate(argv, {}),
|
|
46
47
|
})),
|
|
47
48
|
configCommand(IDENTITY, configuration),
|
|
49
|
+
runsCommand(IDENTITY),
|
|
48
50
|
],
|
|
49
51
|
})
|
|
50
52
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.1.
|
|
1
|
+
export const VERSION = "0.1.4"
|