@wirecat/cli-template 0.1.2 → 0.1.3
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 +31 -0
- package/config/parity-groups.json +20 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/commands.md +1 -1
- package/docs/dev/skills/release/SKILL.md +5 -2
- package/docs/dev/skills/release/fresh-audit.md +17 -0
- package/kit/README.md +8 -3
- package/kit/dist/new.js +15 -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/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,37 @@
|
|
|
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.3 — 25.10.2026
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- **`new` writes the content languages into the CLI's identity.** The `--content-lang` codes go into
|
|
11
|
+
`contentLanguages` in `src/identity.ts`, so the CLI's first run ticks them in advance in the search-language question.
|
|
12
|
+
`docs/dev/DESIGN.md` still records them with the speech-model order.
|
|
13
|
+
- **`scripts/audit.sh` reads `config/parity-groups.json` when the repository has one.** That file replaces
|
|
14
|
+
cli-base's parity groups for the audit. The template uses it to compare itself with the published CLIs.
|
|
15
|
+
- **The release skill ends with a fresh-agent audit.** Before the version is raised, a new subagent audits the
|
|
16
|
+
repository against the handbook alone, with the prompt in `docs/dev/skills/release/fresh-audit.md`, and its report
|
|
17
|
+
goes into the release pull request.
|
|
18
|
+
|
|
19
|
+
### Changed — may break callers
|
|
20
|
+
|
|
21
|
+
- **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,
|
|
22
|
+
including the `contentLanguages` field on its identity. cli-base stays on 0.53, because cli-core 0.421.0 accepts
|
|
23
|
+
only cli-base 0.53.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- **`new`'s next steps run in Windows PowerShell 5.1.** It printed `cd <name> && pnpm install && pnpm ci:quick`, and
|
|
28
|
+
PowerShell 5.1 has no `&&`. Each step is now on its own line.
|
|
29
|
+
- **A CLI's files keep LF line endings on Windows.** A new template-owned `.gitattributes` (`* text=auto eol=lf`)
|
|
30
|
+
stops git from checking files out with CRLF, which Biome's format check rejects.
|
|
31
|
+
|
|
32
|
+
### Security
|
|
33
|
+
|
|
34
|
+
- **markdownlint-cli2's markdown-it, katex and smol-toml move past their advisories.** `pnpm-workspace.yaml` raises
|
|
35
|
+
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.
|
|
36
|
+
|
|
6
37
|
## 0.1.2 — 25.10.2026
|
|
7
38
|
|
|
8
39
|
### Changed — may break callers
|
|
@@ -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/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.
|
|
1
|
+
export declare const VERSION = "0.1.3";
|
|
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.3";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/docs/commands.md
CHANGED
|
@@ -167,7 +167,7 @@ clidev config set <setting> <value> [options]
|
|
|
167
167
|
| Argument | | What it is |
|
|
168
168
|
|---|---|---|
|
|
169
169
|
| `setting` | required | one of: limit, timeout_ms, color, sender_colors, 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
|
|
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
|
|---|---|
|
|
@@ -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/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,15 @@ 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
|
+
};
|
|
161
170
|
export const cliReadme = (names) => [
|
|
162
171
|
`# ${names.command}`,
|
|
163
172
|
"",
|
|
@@ -218,6 +227,7 @@ export const runNew = async (cwd, source, args, io) => {
|
|
|
218
227
|
"README.md": () => cliReadme(names),
|
|
219
228
|
"CHANGELOG.md": () => cliChangelog(names, source),
|
|
220
229
|
[VERSION_FILE]: (text) => text.replace(/VERSION = "[^"]*"/, 'VERSION = "0.0.0"'),
|
|
230
|
+
[IDENTITY_FILE]: (text) => withContentLanguages(text, answers.contentLang ?? []),
|
|
221
231
|
"AGENTS.md": (text) => withReference(text, category),
|
|
222
232
|
};
|
|
223
233
|
const hashes = {};
|
|
@@ -247,8 +257,11 @@ export const runNew = async (cwd, source, args, io) => {
|
|
|
247
257
|
...(warnings.length ? ["", "Content languages:", ...warnings.map((warning) => ` ${warning}`)] : []),
|
|
248
258
|
"",
|
|
249
259
|
"Next:",
|
|
250
|
-
` cd ${names.name}
|
|
251
|
-
|
|
260
|
+
` cd ${names.name}`,
|
|
261
|
+
" pnpm install",
|
|
262
|
+
" pnpm ci:quick",
|
|
263
|
+
" git add -A",
|
|
264
|
+
' git commit -m "chore: start from @wirecat/cli-template"',
|
|
252
265
|
` then give the agent docs/dev/DESIGN.md; every example passes a profile, e.g. ${names.command} personal doctor`,
|
|
253
266
|
"",
|
|
254
267
|
"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.3",
|
|
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.421.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/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.1.
|
|
1
|
+
export const VERSION = "0.1.3"
|