@wirecat/cli-template 0.1.2 → 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/.gitattributes +1 -0
- package/.github/workflows/changelog-guard.yml +1 -1
- package/.github/workflows/ci.yml +1 -1
- package/.github/workflows/monthly.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/CHANGELOG.md +50 -0
- package/README.md +1 -0
- package/config/parity-groups.json +20 -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 +69 -8
- package/docs/dev/reference-clis.md +4 -0
- package/docs/dev/skills/release/SKILL.md +5 -2
- package/docs/dev/skills/release/fresh-audit.md +17 -0
- package/docs/dev/test-matrix.md +7 -1
- package/kit/README.md +8 -3
- package/kit/dist/new.js +17 -2
- package/kit/dist/source.js +4 -3
- package/package.json +5 -4
- package/pnpm-workspace.yaml +5 -0
- package/scripts/audit.sh +2 -0
- 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/template.json +1 -0
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
|
@@ -9,4 +9,4 @@ permissions:
|
|
|
9
9
|
|
|
10
10
|
jobs:
|
|
11
11
|
changelog:
|
|
12
|
-
uses: WireCatLabs/cli-base/.github/workflows/changelog-guard.yml@
|
|
12
|
+
uses: WireCatLabs/cli-base/.github/workflows/changelog-guard.yml@b2d2418af0e23ecc816f3117ae2b0c627917fca5 # v0.55.0
|
package/.github/workflows/ci.yml
CHANGED
|
@@ -19,7 +19,7 @@ permissions:
|
|
|
19
19
|
|
|
20
20
|
jobs:
|
|
21
21
|
ci:
|
|
22
|
-
uses: WireCatLabs/cli-base/.github/workflows/node-ci.yml@
|
|
22
|
+
uses: WireCatLabs/cli-base/.github/workflows/node-ci.yml@b2d2418af0e23ecc816f3117ae2b0c627917fca5 # v0.55.0
|
|
23
23
|
with:
|
|
24
24
|
pack: ${{ inputs.pack || false }}
|
|
25
25
|
bun-run: pnpm build && pnpm smoke:bun
|
|
@@ -22,7 +22,7 @@ jobs:
|
|
|
22
22
|
contents: read
|
|
23
23
|
actions: read
|
|
24
24
|
security-events: write
|
|
25
|
-
uses: WireCatLabs/cli-base/.github/workflows/release-checks.yml@
|
|
25
|
+
uses: WireCatLabs/cli-base/.github/workflows/release-checks.yml@b2d2418af0e23ecc816f3117ae2b0c627917fca5 # v0.55.0
|
|
26
26
|
with:
|
|
27
27
|
dependencies: true
|
|
28
28
|
languages: '["actions","javascript-typescript"]'
|
|
@@ -56,7 +56,7 @@ jobs:
|
|
|
56
56
|
contents: read
|
|
57
57
|
actions: read
|
|
58
58
|
security-events: write
|
|
59
|
-
uses: WireCatLabs/cli-base/.github/workflows/release-checks.yml@
|
|
59
|
+
uses: WireCatLabs/cli-base/.github/workflows/release-checks.yml@b2d2418af0e23ecc816f3117ae2b0c627917fca5 # v0.55.0
|
|
60
60
|
|
|
61
61
|
build:
|
|
62
62
|
needs: [checks, validation]
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,56 @@
|
|
|
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
|
+
|
|
25
|
+
## 0.1.3 — 25.10.2026
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- **`new` writes the content languages into the CLI's identity.** The `--content-lang` codes go into
|
|
30
|
+
`contentLanguages` in `src/identity.ts`, so the CLI's first run ticks them in advance in the search-language question.
|
|
31
|
+
`docs/dev/DESIGN.md` still records them with the speech-model order.
|
|
32
|
+
- **`scripts/audit.sh` reads `config/parity-groups.json` when the repository has one.** That file replaces
|
|
33
|
+
cli-base's parity groups for the audit. The template uses it to compare itself with the published CLIs.
|
|
34
|
+
- **The release skill ends with a fresh-agent audit.** Before the version is raised, a new subagent audits the
|
|
35
|
+
repository against the handbook alone, with the prompt in `docs/dev/skills/release/fresh-audit.md`, and its report
|
|
36
|
+
goes into the release pull request.
|
|
37
|
+
|
|
38
|
+
### Changed — may break callers
|
|
39
|
+
|
|
40
|
+
- **The skeleton runs on cli-core 0.421.0 and cli-base 0.53.0.** A new CLI gets cli-core's changes since 0.412.0,
|
|
41
|
+
including the `contentLanguages` field on its identity. cli-base stays on 0.53, because cli-core 0.421.0 accepts
|
|
42
|
+
only cli-base 0.53.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- **`new`'s next steps run in Windows PowerShell 5.1.** It printed `cd <name> && pnpm install && pnpm ci:quick`, and
|
|
47
|
+
PowerShell 5.1 has no `&&`. Each step is now on its own line.
|
|
48
|
+
- **A CLI's files keep LF line endings on Windows.** A new template-owned `.gitattributes` (`* text=auto eol=lf`)
|
|
49
|
+
stops git from checking files out with CRLF, which Biome's format check rejects.
|
|
50
|
+
|
|
51
|
+
### Security
|
|
52
|
+
|
|
53
|
+
- **markdownlint-cli2's markdown-it, katex and smol-toml move past their advisories.** `pnpm-workspace.yaml` raises
|
|
54
|
+
them to markdown-it 15.0.3, katex 0.18.2 and smol-toml 1.9.1 while markdownlint-cli2 stays at the shared version.
|
|
55
|
+
|
|
6
56
|
## 0.1.2 — 25.10.2026
|
|
7
57
|
|
|
8
58
|
### Changed — may break callers
|
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
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "template",
|
|
4
|
+
"members": ["clidev", "tg", "max", "memo", "drive", "zm", "wa"],
|
|
5
|
+
"covers": ["commands", "upgrade"],
|
|
6
|
+
"differences": []
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "template-config",
|
|
10
|
+
"members": ["clidev", "tg", "max", "wa"],
|
|
11
|
+
"covers": ["config"],
|
|
12
|
+
"differences": []
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "template-skill",
|
|
16
|
+
"members": ["clidev", "tg", "max", "memo", "zm", "wa"],
|
|
17
|
+
"covers": ["skill"],
|
|
18
|
+
"differences": []
|
|
19
|
+
}
|
|
20
|
+
]
|
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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AS,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,8 +166,8 @@ 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,
|
|
170
|
-
| `value` | required | a number, true or false
|
|
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
|
+
| `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 |
|
|
173
173
|
|---|---|
|
|
@@ -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.
|
|
@@ -17,8 +17,11 @@ and runs `bin/release`.
|
|
|
17
17
|
`Changed — may break callers`, `Fixed`, `Security`, `Removed` (`WC-DOC-14` to `WC-DOC-18`). No internal ids.
|
|
18
18
|
4. **The docs.** `README.md`, `docs/*.md` and `skills/clidev-cli/SKILL.md` state what the code does now (`WC-DOC-3`).
|
|
19
19
|
`pnpm generate` and `pnpm test:matrix` rewrite the generated pages (`WC-DOC-4`).
|
|
20
|
-
5. **The
|
|
20
|
+
5. **The fresh audit.** Start a new subagent that has none of your context, and give it the prompt in
|
|
21
|
+
[fresh-audit.md](fresh-audit.md) as written. Put its report in the release pull request. Fix each gap in this
|
|
22
|
+
repository there, or list it as a follow-up; take a gap in the handbook to cli-base.
|
|
23
|
+
6. **The version.** `npm view @wirecat/clidev-cli version` is what is published. Set the next version in
|
|
21
24
|
`package.json`, run `pnpm version:sync`, date the section as `## <version> — DD.MM.YYYY`, run
|
|
22
25
|
`pnpm release:check` again, and open the pull request `chore(release): <version>`.
|
|
23
|
-
|
|
26
|
+
7. **The owner** merges it and runs `bin/release` on a clean `main`. `bin/release --local` publishes from this
|
|
24
27
|
computer when GitHub Actions cannot, with the owner's own npm login or `NPM_TOKEN`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Fresh-agent audit
|
|
2
|
+
|
|
3
|
+
Step 5 of the [release skill](SKILL.md) gives the prompt below to a new subagent that has none of the releasing
|
|
4
|
+
agent's context. Give it as written.
|
|
5
|
+
|
|
6
|
+
## Prompt
|
|
7
|
+
|
|
8
|
+
You audit a WireCat CLI repository, in the current folder. Use only two sources: the handbook, starting at
|
|
9
|
+
`node_modules/@wirecat/cli-base/docs/standards/README.md`, and the repository itself. Do not read plans, journals
|
|
10
|
+
or earlier reviews. Run `pnpm install` first if `node_modules` is missing.
|
|
11
|
+
|
|
12
|
+
Check the repository against every handbook page that applies to it: the code, the docs, the configs and the
|
|
13
|
+
workflows. You may run the package scripts. Change nothing.
|
|
14
|
+
|
|
15
|
+
Report each gap on one line: the rule id or handbook page, the file, what is wrong, and where the fix belongs: in
|
|
16
|
+
this repository, or in the handbook, when a rule is unclear, missing or contradicts another. End with the number
|
|
17
|
+
of gaps of each kind. If you find none, say so.
|
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/README.md
CHANGED
|
@@ -35,9 +35,10 @@ choices. Nothing is guessed.
|
|
|
35
35
|
|
|
36
36
|
Every question except the names and `--content-lang` also takes `other:<your answer>`.
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
or
|
|
38
|
+
`new` writes the content languages into `contentLanguages` in `src/identity.ts`; on the first run, cli-core ticks them
|
|
39
|
+
in advance in the search-language question, and the person confirms. `DESIGN.md` records them too, with the
|
|
40
|
+
speech-model order a messenger definition should use and the warnings for languages that have no stemmer or speech
|
|
41
|
+
model in cli-core. `new` writes no search or model setting.
|
|
41
42
|
|
|
42
43
|
## `upgrade`
|
|
43
44
|
|
|
@@ -78,6 +79,10 @@ A conflict leaves git markers, and `template.json` keeps the new state under `pe
|
|
|
78
79
|
`cspell.json`, `tsconfig*.json` and `.markdownlint-cli2.jsonc`. Do not add a kit-only workflow: `.github/` is
|
|
79
80
|
template-owned and would carry it into every new CLI.
|
|
80
81
|
- `README.md` and `CHANGELOG.md` describe the template, so `new` writes short ones for the new CLI.
|
|
82
|
+
- `config/parity-groups.json` puts the template in parity groups with the published CLIs, so `scripts/audit.sh`
|
|
83
|
+
compares its `commands`, `upgrade`, `config` and `skill` paths with theirs. It is in neither list, so a new CLI does
|
|
84
|
+
not get it: the file replaces cli-base's `PARITY_GROUPS`, and a new CLI joins those groups instead (step 4 of
|
|
85
|
+
`new`'s output).
|
|
81
86
|
- `docs/dev/DESIGN.md` is always a seed: it holds the CLI's interview answers.
|
|
82
87
|
- `package.json` is always a seed. `new` rewrites it: `name` becomes `--package`, `version` becomes `0.0.0`, and
|
|
83
88
|
`repository`, `homepage` and `bugs` point at `<owner>/<name>`. It also drops every `bin`, `files` entry and script
|
package/kit/dist/new.js
CHANGED
|
@@ -158,6 +158,17 @@ export const cliPackageJson = (text, names) => {
|
|
|
158
158
|
return `${JSON.stringify(next, null, 2)}\n`;
|
|
159
159
|
};
|
|
160
160
|
const VERSION_FILE = "src/version.ts";
|
|
161
|
+
const IDENTITY_FILE = "src/identity.ts";
|
|
162
|
+
export const withContentLanguages = (text, languages) => {
|
|
163
|
+
const match = /export const IDENTITY: AppIdentity = \{\n[\s\S]*?\n\}/.exec(text);
|
|
164
|
+
if (!match)
|
|
165
|
+
throw new Error(`${IDENTITY_FILE}: no IDENTITY object to add contentLanguages to`);
|
|
166
|
+
const end = match.index + match[0].length - 1;
|
|
167
|
+
const line = ` contentLanguages: [${languages.map((code) => JSON.stringify(code)).join(", ")}],\n`;
|
|
168
|
+
return text.slice(0, end) + line + text.slice(end);
|
|
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;
|
|
161
172
|
export const cliReadme = (names) => [
|
|
162
173
|
`# ${names.command}`,
|
|
163
174
|
"",
|
|
@@ -218,6 +229,7 @@ export const runNew = async (cwd, source, args, io) => {
|
|
|
218
229
|
"README.md": () => cliReadme(names),
|
|
219
230
|
"CHANGELOG.md": () => cliChangelog(names, source),
|
|
220
231
|
[VERSION_FILE]: (text) => text.replace(/VERSION = "[^"]*"/, 'VERSION = "0.0.0"'),
|
|
232
|
+
[IDENTITY_FILE]: (text) => withMessenger(withContentLanguages(text, answers.contentLang ?? []), category),
|
|
221
233
|
"AGENTS.md": (text) => withReference(text, category),
|
|
222
234
|
};
|
|
223
235
|
const hashes = {};
|
|
@@ -247,8 +259,11 @@ export const runNew = async (cwd, source, args, io) => {
|
|
|
247
259
|
...(warnings.length ? ["", "Content languages:", ...warnings.map((warning) => ` ${warning}`)] : []),
|
|
248
260
|
"",
|
|
249
261
|
"Next:",
|
|
250
|
-
` cd ${names.name}
|
|
251
|
-
|
|
262
|
+
` cd ${names.name}`,
|
|
263
|
+
" pnpm install",
|
|
264
|
+
" pnpm ci:quick",
|
|
265
|
+
" git add -A",
|
|
266
|
+
' git commit -m "chore: start from @wirecat/cli-template"',
|
|
252
267
|
` then give the agent docs/dev/DESIGN.md; every example passes a profile, e.g. ${names.command} personal doctor`,
|
|
253
268
|
"",
|
|
254
269
|
"Four steps need a person:",
|
package/kit/dist/source.js
CHANGED
|
@@ -79,10 +79,10 @@ export const npmCommand = (args) => {
|
|
|
79
79
|
].find((path) => existsSync(path));
|
|
80
80
|
return cli ? [process.execPath, [cli, ...args]] : ["npm", args];
|
|
81
81
|
};
|
|
82
|
-
export const
|
|
82
|
+
export const fetchPacked = async (spec) => {
|
|
83
83
|
const dir = await mkdtemp(join(tmpdir(), "cli-template-"));
|
|
84
|
-
const { stdout } = await run(...npmCommand(["pack",
|
|
85
|
-
throw new Error(`could not download ${
|
|
84
|
+
const { stdout } = await run(...npmCommand(["pack", spec, "--silent", "--pack-destination", dir])).catch((error) => {
|
|
85
|
+
throw new Error(`could not download ${spec} from npm, which upgrade needs as the merge base: ${error.message}`);
|
|
86
86
|
});
|
|
87
87
|
const tarball = stdout.trim().split("\n").pop() ?? "";
|
|
88
88
|
const dispose = () => rm(dir, { recursive: true, force: true });
|
|
@@ -96,3 +96,4 @@ export const fetchPublished = async (name, version) => {
|
|
|
96
96
|
throw error;
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
+
export const fetchPublished = (name, version) => fetchPacked(`${name}@${version}`);
|
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",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"LICENSE",
|
|
35
35
|
"README.md",
|
|
36
36
|
"SECURITY.md",
|
|
37
|
+
".gitattributes",
|
|
37
38
|
".gitleaks.toml",
|
|
38
39
|
".markdownlint-cli2.jsonc",
|
|
39
40
|
".vale.ini",
|
|
@@ -82,8 +83,8 @@
|
|
|
82
83
|
},
|
|
83
84
|
"dependencies": {
|
|
84
85
|
"@modelcontextprotocol/server": "2.3.0",
|
|
85
|
-
"@wirecat/cli-base": "0.
|
|
86
|
-
"@wirecat/cli-core": "0.
|
|
86
|
+
"@wirecat/cli-base": "0.53.0",
|
|
87
|
+
"@wirecat/cli-core": "0.422.0",
|
|
87
88
|
"commander": "15.0.0"
|
|
88
89
|
},
|
|
89
90
|
"devDependencies": {
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
"@cspell/dict-en-gb": "5.0.34",
|
|
92
93
|
"@cspell/dict-es-es": "3.0.9",
|
|
93
94
|
"@cspell/dict-ru_ru": "2.3.3",
|
|
94
|
-
"@modelcontextprotocol/client": "2.
|
|
95
|
+
"@modelcontextprotocol/client": "2.4.0",
|
|
95
96
|
"@types/node": "22.20.5",
|
|
96
97
|
"@vitest/coverage-v8": "5.0.5",
|
|
97
98
|
"@wirecat/cli-testing": "0.5.3",
|
package/pnpm-workspace.yaml
CHANGED
package/scripts/audit.sh
CHANGED
|
@@ -14,6 +14,8 @@ npm install -g --prefix "$scratch/prefix" --ignore-scripts --no-audit --no-fund
|
|
|
14
14
|
@wirecat/tg-cli @wirecat/max-cli @wirecat/whatsapp-cli @wirecat/cli-memo @wirecat/drive-cli @wirecat/zoom-cli
|
|
15
15
|
bin="$scratch/prefix/bin"
|
|
16
16
|
others=()
|
|
17
|
+
# A groups file replaces cli-base's PARITY_GROUPS. The template keeps one because it is in no group of cli-base's.
|
|
18
|
+
[ -f "$root/config/parity-groups.json" ] && others+=(--groups "$root/config/parity-groups.json")
|
|
17
19
|
for cli in tg max wa memo drive zm; do
|
|
18
20
|
[ "$cli" = "$command" ] || others+=(--cli "$bin/$cli")
|
|
19
21
|
done
|
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"
|