@wirecat/cli-template 0.1.4 → 0.1.6

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.
Files changed (51) hide show
  1. package/.github/workflows/ci.yml +2 -1
  2. package/.github/workflows/main.yml +2 -1
  3. package/.github/workflows/monthly.yml +1 -1
  4. package/AGENTS.md +2 -0
  5. package/CHANGELOG.md +77 -0
  6. package/README.md +34 -6
  7. package/bin/release +68 -6
  8. package/biome.json +23 -1
  9. package/config/parity-groups.json +6 -0
  10. package/contracts/help.snap +2 -2
  11. package/contracts/mcp-tools.json +2 -2
  12. package/contracts/plan.json +1 -1
  13. package/cspell.json +3 -7
  14. package/dist/commands/doctor.d.ts +25 -4
  15. package/dist/commands/doctor.d.ts.map +1 -1
  16. package/dist/commands/doctor.js +26 -19
  17. package/dist/commands/doctor.js.map +1 -1
  18. package/dist/mcp.d.ts.map +1 -1
  19. package/dist/mcp.js +6 -2
  20. package/dist/mcp.js.map +1 -1
  21. package/dist/version.d.ts +1 -1
  22. package/dist/version.js +1 -1
  23. package/docs/commands.md +6 -6
  24. package/docs/configuration.md +1 -1
  25. package/docs/dev/TESTING.md +2 -0
  26. package/docs/dev/reference-clis.md +6 -2
  27. package/docs/dev/skills/release/SKILL.md +1 -1
  28. package/docs/index.md +3 -3
  29. package/docs/installation.md +1 -1
  30. package/docs/security.md +1 -1
  31. package/docs/troubleshooting.md +2 -2
  32. package/docs/usage.md +1 -1
  33. package/kit/dist/main.js +1 -1
  34. package/kit/dist/manifest.js +18 -30
  35. package/kit/dist/new.js +9 -7
  36. package/kit/dist/rename.js +1 -0
  37. package/kit/dist/source.js +7 -4
  38. package/package.json +7 -7
  39. package/scripts/commands.ts +1 -1
  40. package/scripts/docs-rules.ts +15 -0
  41. package/scripts/smoke.ts +26 -7
  42. package/skills/clidev-cli/SKILL.md +3 -3
  43. package/src/commands/doctor.ts +36 -19
  44. package/src/mcp.test.ts +0 -1
  45. package/src/mcp.ts +7 -2
  46. package/src/program.test.ts +26 -5
  47. package/src/version.ts +1 -1
  48. package/vitest.config.ts +11 -3
  49. package/kit/README.md +0 -136
  50. package/kit/tsconfig.json +0 -17
  51. package/kit/tsconfig.test.json +0 -5
@@ -29,7 +29,8 @@ jobs:
29
29
  platform-run: |
30
30
  node dist/bin/clidev.js commands --json >/dev/null
31
31
  node dist/bin/clidev.js doctor --json >/dev/null
32
- # No version is on npm before the first release, so there is no earlier package to upgrade from.
32
+ # The skeleton has no store of its own; its config file and run records are cli-core's. A CLI that adds a store
33
+ # adds a contracts:upgrade script and removes this skip (WC-TEST-14).
33
34
  skip: |
34
35
  contracts:upgrade
35
36
  checks: |
@@ -5,9 +5,10 @@ on:
5
5
  push:
6
6
  branches: [main]
7
7
 
8
+ # Each merge keeps its own validation: cancelling it would leave that commit unchecked (WC-CI-7).
8
9
  concurrency:
9
10
  group: main-validation-${{ github.ref }}
10
- cancel-in-progress: true
11
+ cancel-in-progress: false
11
12
 
12
13
  permissions:
13
14
  contents: read
@@ -2,7 +2,7 @@ name: Monthly validation
2
2
 
3
3
  on:
4
4
  schedule:
5
- - cron: "41 3 1 * *"
5
+ - cron: "2 3 1 * *"
6
6
  workflow_dispatch:
7
7
 
8
8
  concurrency:
package/AGENTS.md CHANGED
@@ -16,6 +16,8 @@ This CLI was made from [cli-template](https://github.com/WireCatLabs/cli-templat
16
16
  template has no sample code on purpose.
17
17
  3. Ask the further questions in the interview that the reference CLI does not answer. Build only after the owner
18
18
  has read `DESIGN.md`.
19
+ 4. When the first command reaches the service, rewrite `README.md`, `docs/index.md` and the description in
20
+ `skills/clidev-cli/SKILL.md` to say what the tool does and who it is for.
19
21
 
20
22
  <!-- cli-template:reference-cli:start -->
21
23
  The reference CLI is not chosen yet; see [Reference CLIs](docs/dev/reference-clis.md).
package/CHANGELOG.md CHANGED
@@ -3,6 +3,83 @@
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.6 — 25.10.2026
7
+
8
+ ### Changed — may break callers
9
+
10
+ - **The skeleton runs on cli-core 0.426.0.** A `--dry-run` preview says `effects.service_contacted: false` and no
11
+ longer has `effects.messenger_contacted`. MCP no longer offers a command group that only prints its help, such as
12
+ `config`; `config show`, `set` and `unset` stay. The example in the MCP read and write tools is `runs list`, a
13
+ command that runs as written. The first screen says zm and drive are searchable with your other WireCat data.
14
+ - **`doctor` takes no profile.** Its usage line and examples are `clidev doctor` and `clidev doctor --json`; a profile
15
+ typed before it still works. A CLI started from an older template copies `src/commands/doctor.ts` and
16
+ `src/mcp.ts`.
17
+
18
+ ### Added
19
+
20
+ - **`bin/release --local` reads the npm token from the keyring** (`secret-tool`, service `npm`, account `leemour`), as
21
+ the other WireCat CLIs do, when `NPM_TOKEN` is not exported. Without either it uses your `npm login`. The token is
22
+ never printed. A CLI made from the template gets this with `upgrade`.
23
+
24
+ ### Fixed
25
+
26
+ - **A merge to `main` no longer cancels the validation of the merge before it.** Each merged commit is now checked in
27
+ turn. A CLI made from the template gets this with `upgrade`.
28
+
29
+ ## 0.1.5 — 25.10.2026
30
+
31
+ ### Changed — may break callers
32
+
33
+ - **The skeleton runs on cli-core 0.424.0.** When no profile exists on the computer, the error shows the command
34
+ that was typed with a profile added, such as `clidev personal mcp`. It used to suggest a `setup` command, which the
35
+ skeleton does not have. A run made without a profile is now recorded with no profile instead of as `default`, so
36
+ `runs list` and `runs show` leave `profile` out for such a run.
37
+ - **`doctor --json` reports the config file's problems as `config: { path, found, issues }`, the shape the shared
38
+ messenger doctor has (cli-core 0.423.0).** `config.exists` and `config.error` are gone. Each issue has a `kind`
39
+ (`invalid_json`, `unknown_setting`, `invalid_value`, …), the `file`, the `key`, `line` and `column` for invalid JSON,
40
+ a sentence that says what the value has to be, and `fix`, the `config unset` command that removes it. A profile lock
41
+ or an environment variable the settings refuse is reported in `settings.error`. A CLI started from an older template
42
+ copies `src/commands/doctor.ts`.
43
+ - **The skeleton runs on cli-core 0.423.0.** `config set` and `unset` no longer list `default_profile`,
44
+ `analysis_provider`, `analysis_model` or `analysis_base_url`; analysis is set with `models.analysis.*`. A file that
45
+ still has one of them is refused with the `config unset` that removes it.
46
+ - **`pnpm docs:check` checks the user pages for internal ids, correction marks and struck-out text.** It now loads
47
+ `scripts/docs-rules.ts`, which names `README.md`, `SECURITY.md` and `docs/*.md` as user pages. A page that carries
48
+ a journal id fails the check until the id is removed.
49
+ - **The spell check covers `SECURITY.md` and imports only the shared word list.** `cspell.json` no longer imports the
50
+ British English and Russian dictionaries again, and skips the generated `docs/commands.md` as tg and max do.
51
+ - **The coverage floor holds for each file too: every file in `src/` keeps at least half of its lines covered.**
52
+ Each excluded file now says why it is excluded.
53
+ - **Only `src/mcp.ts` may import the MCP SDK.** `biome.json` refuses `@modelcontextprotocol/*` anywhere else in
54
+ `src/`, so commands and services do not learn the protocol.
55
+ - **`bin/release` takes the next free version when npm already has the one in `package.json`, or a higher one.** It
56
+ used to stop and ask for a new pull request. Now it raises the number (after `x.y.0` the next minor, else the next
57
+ patch), lands that through its own pull request once the checks pass, and publishes it, as tg, max and memo do. A
58
+ pre-release version is still chosen by hand. A CLI made from the template gets this with `upgrade`.
59
+
60
+ ### Fixed
61
+
62
+ - **`<profile> mcp` stops when the stop comes before its server is up.** A stop that arrived while the server was
63
+ still loading was lost, and the command served until it was killed. A command result that is not an object, such
64
+ as a list, now reaches the agent as `{ "result": … }`, because MCP accepts only an object as a tool's structured
65
+ result. A CLI made from an older template takes both from `src/mcp.ts`.
66
+ - **The missing-profile contract tests the missing profile.** It ran `mcp --json`, which is refused for `--json`
67
+ before the profile is read. It now runs `mcp`. A CLI made from an older template changes the case's `args` in
68
+ `contracts/plan.json` the same way.
69
+ - **The package no longer ships `kit/README.md` and the kit's `tsconfig` files.** npm reads a name in `files` with no
70
+ leading slash as a match in every folder; the three root files are now anchored with `/`. `pnpm package:check`
71
+ fails when `npm pack` would ship a path that `files` does not name.
72
+ - **The monthly run starts at 03:02 UTC, inside the window the handbook gives.** The last step `new` prints asks for
73
+ a free minute in that window; it spoke of a day and of a placeholder CI rejects, and no check rejects one.
74
+ - **The 0.1.4 notes cite a handbook rule and a lint rule that no published cli-base has.** The run-log rule and
75
+ cli-base's `missing-run-log` lint rule are only on cli-base's main branch. They are in no release up to 0.55.1, so
76
+ nothing reports a CLI without `runs` until a cli-base release ships them. The 0.1.4 section stays as it was released.
77
+ - **The README introduces the skeleton in full:** profiles, settings and permissions, limits, security, and what to do
78
+ when it does not work.
79
+ - **The Reference CLIs page says how a new CLI's records join search.** A CLI with a provider of its own registers it
80
+ with cli-core's `registerProvider`; until it does, search lists its accounts as skipped. The page said that cli-core
81
+ had no provider registry, and that search would read such records as messages.
82
+
6
83
  ## 0.1.4 — 25.10.2026
7
84
 
8
85
  ### Added
package/README.md CHANGED
@@ -19,17 +19,17 @@ npx @wirecat/cli-template new cal-cli --command cal --package @wirecat/cal-cli -
19
19
  ```sh
20
20
  pnpm install
21
21
  pnpm build
22
- node dist/bin/clidev.js personal doctor
22
+ node dist/bin/clidev.js doctor
23
23
  ```
24
24
 
25
- `personal` is the profile: a name you choose for one account. Every command that uses an account starts with it, and
26
- none is ever assumed. `CLIDEV_PROFILE=personal` does the same for a whole shell session.
25
+ `doctor` needs no profile. Every command that uses an account starts with one, a name you choose for that account,
26
+ such as `personal` in `clidev personal config show`; none is ever assumed. `CLIDEV_PROFILE=personal` does the same for a whole shell session.
27
27
 
28
28
  ## What you can do
29
29
 
30
30
  | Command | What it does |
31
31
  | --- | --- |
32
- | `clidev personal doctor` | Checks this installation: version, paths, settings and profiles, without the network |
32
+ | `clidev doctor` | Checks this installation: version, paths, settings and profiles, without the network |
33
33
  | `clidev commands --json` | Prints every command as JSON, for agents and scripts |
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 |
@@ -42,6 +42,32 @@ none is ever assumed. `CLIDEV_PROFILE=personal` does the same for a whole shell
42
42
  `clidev skill show` prints the rules an agent follows with this tool. `clidev personal mcp` serves every command to an
43
43
  agent, writes included: the profile's permissions decide what runs. See [MCP and permissions](docs/usage.md#agents).
44
44
 
45
+ ## Profiles
46
+
47
+ A profile is a name you choose for one account, such as `personal` or `work`. It is the first word of every command
48
+ that uses an account. No profile is ever assumed: a command without one stops and lists the profiles on this
49
+ computer. The skeleton has no sign-in yet; the CLI built from it adds one.
50
+
51
+ ## Settings and permissions
52
+
53
+ `clidev personal config show` lists each setting and where it came from. A profile's `permissions` say what a command
54
+ may do: `allow`, `ask`, `readonly` or `deny`. `CLIDEV_READ_ONLY=1` refuses every write. See
55
+ [Settings](docs/configuration.md).
56
+
57
+ ## Limits
58
+
59
+ The skeleton connects to no service, keeps no messages and has no commands of its own beyond the shared ones above.
60
+
61
+ ## Security
62
+
63
+ `clidev` keeps its settings and state on this computer and sends nothing to any service yet. See
64
+ [Security](docs/security.md), and report a vulnerability privately as [SECURITY.md](SECURITY.md) says.
65
+
66
+ ## When it does not work
67
+
68
+ Run `clidev doctor` first: it checks the installation without the network.
69
+ [When something goes wrong](docs/troubleshooting.md) lists the usual symptoms.
70
+
45
71
  ## Documentation
46
72
 
47
73
  - [Install](docs/installation.md)
@@ -53,5 +79,7 @@ agent, writes included: the profile's permissions decide what runs. See [MCP and
53
79
 
54
80
  ## Development
55
81
 
56
- The working rules for people and agents are in [AGENTS.md](AGENTS.md). `pnpm release:check` runs every check the
57
- standards ask for. The changes are in [CHANGELOG.md](CHANGELOG.md).
82
+ The working rules for people and agents are in [AGENTS.md](AGENTS.md). `pnpm release:check` runs the checks
83
+ before a release; its command audit installs the published WireCat CLIs from npm to compare with them.
84
+ `pnpm package:check` installs the packed package and checks what it ships, and
85
+ `pnpm security:no-leak` checks that nothing private reaches the output. The changes are in [CHANGELOG.md](CHANGELOG.md).
package/bin/release CHANGED
@@ -1,9 +1,10 @@
1
1
  #!/usr/bin/env sh
2
2
  # Publishes the version in package.json and tags it. Run on a clean `main` that matches origin/main; the owner runs
3
- # it, never an agent. Nothing is published until `pnpm release:check` passes.
3
+ # it, never an agent. When npm already has that version, or a higher one, it raises it to the next free one through a
4
+ # pull request and publishes that (WC-REL-5). Nothing is published until `pnpm release:check` passes.
4
5
  #
5
6
  # bin/release # publishes from GitHub Actions (.github/workflows/release.yml, npm trusted publishing)
6
- # bin/release --local # publishes from this computer: NPM_TOKEN if exported, else your own `npm login`
7
+ # bin/release --local # publishes from this computer: NPM_TOKEN if exported, else the keyring, else `npm login`
7
8
  #
8
9
  # A package that is not on npm yet is published the same way; its first version needs --local until npm trusts
9
10
  # release.yml. The npm token is never printed and never written to a file (WC-REL-14).
@@ -23,7 +24,8 @@ done
23
24
 
24
25
  cd "$(dirname "$0")/.."
25
26
  self=$(git hash-object bin/release)
26
- # The fold fast-forwards main, and sh reads this file as it goes: a newer bin/release would run half old, half new.
27
+ # The fold and land() fast-forward main, and sh reads this file as it goes: a newer bin/release would run half old,
28
+ # half new.
27
29
  rerun_if_changed() {
28
30
  [ "$(git hash-object bin/release)" != "$self" ] || return 0
29
31
  [ -z "${WIRECAT_RELEASE_RERUN:-}" ] || { echo "bin/release changed again while releasing — run it again" >&2; exit 1; }
@@ -50,19 +52,70 @@ published() {
50
52
  npm view "$package@$version" version --prefer-online >/dev/null 2>&1
51
53
  }
52
54
 
55
+ # main takes changes only through a pull request (the repository's ruleset).
56
+ land() {
57
+ branch=$1 title=$2 body=$3
58
+ git switch -q -c "$branch"
59
+ git commit -q -am "$title" -m "$body"
60
+ git push -q -u origin "$branch"
61
+ git switch -q main
62
+ pr=$(gh pr create --base main --head "$branch" --title "$title" --body "$body")
63
+ # Checks register a few seconds after the pull request; --watch with none exits at once.
64
+ for _ in $(seq 30); do
65
+ [ "$(gh pr checks "$pr" --json name --jq length 2>/dev/null || echo 0)" -gt 0 ] && break
66
+ sleep 2
67
+ done
68
+ gh pr checks "$pr" --watch --fail-fast >/dev/null ||
69
+ { echo "checks failed on $pr — nothing is published" >&2; exit 1; }
70
+ git fetch -q origin
71
+ [ "$(git rev-parse HEAD)" = "$(git rev-parse origin/main)" ] ||
72
+ { echo "main advanced while $pr was being prepared — stop and review the current version before merging" >&2; exit 1; }
73
+ gh pr merge "$pr" --squash --delete-branch --subject "$title (#${pr##*/})"
74
+ git fetch -q origin
75
+ git merge -q --ff-only origin/main
76
+ [ "$(git rev-parse HEAD)" = "$(git rev-parse origin/main)" ] ||
77
+ { echo "main is not origin/main after $pr" >&2; exit 1; }
78
+ }
79
+
53
80
  # A merge after the version was dated, but before it was published, adds Unreleased above it; --land folds it on a
54
81
  # fresh main through its own pull request.
55
82
  folded=""
56
83
  published || folded=$(pnpm exec cli-dev changelog fold --land --version "$version")
57
84
  [ -z "$folded" ] || echo "$folded"
58
85
  rerun_if_changed "$@"
86
+
87
+ # Two sessions preparing the same number is normal; the second takes the next free one.
88
+ latest=$(npm view "$package" version --prefer-online 2>/dev/null || true)
89
+ versions=$(npm view "$package" versions --json --prefer-online 2>/dev/null || true)
90
+ next=$(pnpm exec cli-dev next-version "$version" "$latest" "$versions")
91
+ if [ "$next" != "$version" ]; then
92
+ taken=""
93
+ if published; then taken=1; why="$version is already on npm"; else why="$version is not above npm's latest $latest"; fi
94
+ echo "$why — publishing $next instead"
95
+ # A version npm already has keeps its changelog section; the unreleased one becomes the new version.
96
+ node -e 'const fs = require("fs"); const [o, n, taken] = process.argv.slice(1)
97
+ const swap = (file, from, to) => {
98
+ const text = fs.readFileSync(file, "utf8")
99
+ if (!text.includes(from)) throw new Error(`${file} has no ${JSON.stringify(from.trim())} to raise ${o} to ${n}`)
100
+ fs.writeFileSync(file, text.replace(from, to))
101
+ }
102
+ swap("package.json", `"version": "${o}"`, `"version": "${n}"`)
103
+ swap("src/version.ts", `VERSION = "${o}"`, `VERSION = "${n}"`)
104
+ const today = new Date().toLocaleDateString("en-GB").replaceAll("/", ".")
105
+ if (taken) swap("CHANGELOG.md", "\n## Unreleased\n", `\n## ${n} — ${today}\n`)
106
+ else swap("CHANGELOG.md", `\n## ${o} — `, `\n## ${n} — `)' "$version" "$next" "$taken"
107
+ body="bin/release: $why. Only the number changes: package.json, src/version.ts, the CHANGELOG heading."
108
+ land "release/$next" "chore(release): $next" "$body"
109
+ rerun_if_changed "$@"
110
+ version=$next
111
+ fi
59
112
  top=$(sed -n '/^## /{p;q;}' CHANGELOG.md)
60
113
  case "$top" in
61
114
  "## $version — "[0-9][0-9].[0-9][0-9].[0-9][0-9][0-9][0-9]) ;;
62
115
  *) echo "date the top changelog section as \"## $version — DD.MM.YYYY\" in a pull request before releasing" >&2; exit 1 ;;
63
116
  esac
64
117
  if published; then
65
- echo "$package@$version is already on npm; raise the version in a pull request" >&2
118
+ echo "$package@$version is already on npm — raise the version first" >&2
66
119
  exit 1
67
120
  fi
68
121
 
@@ -94,8 +147,13 @@ if [ "$mode" = ci ]; then
94
147
  exit 0
95
148
  fi
96
149
 
150
+ # The same keyring entry as the other WireCat CLIs. Without NPM_TOKEN or the entry, npm reads your own login from
151
+ # ~/.npmrc as usual.
152
+ if [ -z "$publish_token" ] && command -v secret-tool >/dev/null 2>&1; then
153
+ publish_token=$(secret-tool lookup service npm account leemour 2>/dev/null) || publish_token=""
154
+ fi
155
+
97
156
  # Our own npm config names the variable, not the value, so the token stays in the publish process's environment.
98
- # Without NPM_TOKEN, npm reads your own login from ~/.npmrc as usual.
99
157
  config=$(mktemp)
100
158
  trap 'rm -f "$config"' EXIT
101
159
  if [ -n "$publish_token" ]; then
@@ -103,7 +161,11 @@ if [ -n "$publish_token" ]; then
103
161
  printf '//registry.npmjs.org/:_authToken=${NPM_TOKEN}\n' > "$config"
104
162
  set -- --userconfig "$config"
105
163
  else
106
- npm whoami >/dev/null 2>&1 || { echo "not logged in to npm: run npm login, or export NPM_TOKEN" >&2; exit 1; }
164
+ npm whoami >/dev/null 2>&1 || {
165
+ echo "no npm token: export NPM_TOKEN, store one with: secret-tool store --label=npm service npm account leemour," >&2
166
+ echo "or run npm login" >&2
167
+ exit 1
168
+ }
107
169
  set --
108
170
  fi
109
171
 
package/biome.json CHANGED
@@ -2,5 +2,27 @@
2
2
  "files": {
3
3
  "includes": ["**", "!**/node_modules", "!**/dist", "!.worktrees", "!pnpm-lock.yaml", "!config/wirecat"]
4
4
  },
5
- "extends": ["./config/wirecat/biome.base.json"]
5
+ "extends": ["./config/wirecat/biome.base.json"],
6
+ "overrides": [
7
+ {
8
+ "includes": ["src/**", "!src/mcp.ts", "!**/*.test.ts"],
9
+ "linter": {
10
+ "rules": {
11
+ "style": {
12
+ "noRestrictedImports": {
13
+ "level": "error",
14
+ "options": {
15
+ "patterns": [
16
+ {
17
+ "group": ["@modelcontextprotocol/**"],
18
+ "message": "only src/mcp.ts serves MCP; commands and services do not know the protocol"
19
+ }
20
+ ]
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
26
+ }
27
+ ]
6
28
  }
@@ -16,5 +16,11 @@
16
16
  "members": ["clidev", "tg", "max", "memo", "zm", "wa"],
17
17
  "covers": ["skill"],
18
18
  "differences": []
19
+ },
20
+ {
21
+ "name": "template-runs",
22
+ "members": ["clidev", "tg", "max", "wa", "memo", "drive", "zm"],
23
+ "covers": ["runs"],
24
+ "differences": []
19
25
  }
20
26
  ]
@@ -7,8 +7,8 @@ Works with:
7
7
  tg Telegram in the same local store: search, review and tasks offline
8
8
  max MAX in the same local store: search, review and tasks offline
9
9
  wa WhatsApp in the same local store: search, review and tasks offline
10
- zm Zoom meetings: transcripts and summaries, searchable with your messages
11
- drive Google Drive and Docs as local text, searchable with your messages
10
+ zm Zoom meetings: transcripts and summaries, searchable with your other WireCat data
11
+ drive Google Drive and Docs as local text, searchable with your other WireCat data
12
12
  memo context <person> one person across messengers, mail, notes and meetings
13
13
 
14
14
  Next: clidev commands every command, by section
@@ -18,7 +18,7 @@
18
18
  "type": "object"
19
19
  },
20
20
  "command": {
21
- "description": "a command clidev_tools_search returned: \"commands\"",
21
+ "description": "a command clidev_tools_search returned: \"runs list\"",
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: \"commands\"",
495
+ "description": "a command clidev_tools_search returned: \"runs list\"",
496
496
  "minLength": 1,
497
497
  "type": "string"
498
498
  }
@@ -36,7 +36,7 @@
36
36
  },
37
37
  {
38
38
  "id": "missing-explicit-profile",
39
- "args": ["mcp", "--json"],
39
+ "args": ["mcp"],
40
40
  "exit": 2,
41
41
  "stream": "stderr",
42
42
  "kind": "json",
package/cspell.json CHANGED
@@ -1,10 +1,6 @@
1
1
  {
2
2
  "version": "0.2",
3
- "import": [
4
- "./config/wirecat/cspell.json",
5
- "@cspell/dict-en-gb/cspell-ext.json",
6
- "@cspell/dict-ru_ru/cspell-ext.json"
7
- ],
8
- "ignorePaths": ["docs/dev/**", "CHANGELOG.md"],
9
- "words": ["clidev", "cyrillic", "latin", "wirecat"]
3
+ "import": ["./config/wirecat/cspell.json"],
4
+ "ignorePaths": ["docs/commands.md", "docs/dev/**", "CHANGELOG.md"],
5
+ "words": ["clidev"]
10
6
  }
@@ -1,5 +1,5 @@
1
1
  import { Command } from "commander";
2
- /** It is run when everything else is broken, so an unreadable config is a field in the answer, never a throw. */
2
+ /** It is run when everything else is broken, so a problem in the config file is a field in the answer, never a throw. */
3
3
  export declare const doctorReport: (env: NodeJS.ProcessEnv) => {
4
4
  version: string;
5
5
  runtime: {
@@ -13,10 +13,31 @@ export declare const doctorReport: (env: NodeJS.ProcessEnv) => {
13
13
  };
14
14
  config: {
15
15
  path: string;
16
- exists: boolean;
17
- error?: string;
16
+ found: boolean;
17
+ issues: import("@wirecat/cli-core/cli").ConfigIssue[];
18
18
  };
19
- profiles: string[] | null;
19
+ profiles: string[];
20
+ read_only: string | null;
21
+ } | {
22
+ version: string;
23
+ runtime: {
24
+ node: string;
25
+ platform: NodeJS.Platform;
26
+ };
27
+ paths: {
28
+ config: string;
29
+ state: string;
30
+ cache: string;
31
+ };
32
+ config: {
33
+ path: string;
34
+ found: boolean;
35
+ issues: never[];
36
+ };
37
+ settings: {
38
+ error: string;
39
+ };
40
+ profiles: null;
20
41
  read_only: string | null;
21
42
  };
22
43
  export declare const doctorCommand: () => Command;
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AASnC,iHAAiH;AACjH,eAAO,MAAM,YAAY,QAAS,MAAM,CAAC,UAAU;;;QAapC,IAAI;QAAyB,QAAQ;;;QACvC,MAAM;QAAgB,KAAK;QAAe,KAAK;;;cAXtC,MAAM;gBAAU,OAAO;gBAAU,MAAM;;;;CAgB5D,CAAA;AAED,eAAO,MAAM,aAAa,QAAO,OAS3B,CAAA"}
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AASnC,yHAAyH;AACzH,eAAO,MAAM,YAAY,QAAS,MAAM,CAAC,UAAU;;;QAIpC,IAAI;QAAyB,QAAQ;;;QACvC,MAAM;QAAgB,KAAK;QAAe,KAAK;;;QAO5C,IAAI;QAAuB,KAAK;QAAwB,MAAM;;;;;;;QAR/D,IAAI;QAAyB,QAAQ;;;QACvC,MAAM;QAAgB,KAAK;QAAe,KAAK;;;QAe5C,IAAI;QAAQ,KAAK;QAAoB,MAAM;;;QACzC,KAAK;;;;CAKtB,CAAA;AAED,eAAO,MAAM,aAAa,QAAO,OAW3B,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { existsSync } from "node:fs";
2
2
  import { CliError, configFilePath, resolvePaths } from "@wirecat/cli-base";
3
3
  import { annotate } from "@wirecat/cli-base/commands";
4
- import { environmentOf, itemOf, LOCAL_READ, outputFor, readOnlyLockOf, renderAnswer } from "@wirecat/cli-core/cli";
4
+ import { environmentOf, itemOf, LOCAL_READ, outputFor, profileFree, readOnlyLockOf, renderAnswer, } from "@wirecat/cli-core/cli";
5
5
  import { Command } from "commander";
6
6
  import { configuration } from "../config.js";
7
7
  import { IDENTITY } from "../identity.js";
@@ -10,32 +10,39 @@ const failure = (error) => {
10
10
  return error.message;
11
11
  throw error;
12
12
  };
13
- /** It is run when everything else is broken, so an unreadable config is a field in the answer, never a throw. */
13
+ /** It is run when everything else is broken, so a problem in the config file is a field in the answer, never a throw. */
14
14
  export const doctorReport = (env) => {
15
15
  const paths = resolvePaths({ appName: IDENTITY.appName, prefix: IDENTITY.envPrefix, env });
16
- const file = configFilePath(paths.config);
17
- let config;
18
- let profiles = null;
19
- try {
20
- profiles = configuration.configuredProfiles({ env, readOnly: true });
21
- config = { path: file, exists: existsSync(file) };
22
- }
23
- catch (error) {
24
- config = { path: file, exists: existsSync(file), error: failure(error) };
25
- }
26
- return {
16
+ const common = {
27
17
  version: IDENTITY.version,
28
18
  runtime: { node: process.versions.node, platform: process.platform },
29
19
  paths: { config: paths.config, state: paths.state, cache: paths.cache },
30
- config,
31
- profiles,
32
- read_only: readOnlyLockOf(IDENTITY, env) ?? null,
33
20
  };
21
+ const readOnly = readOnlyLockOf(IDENTITY, env) ?? null;
22
+ try {
23
+ const settings = configuration.resolveSettings({}, { env, readOnly: true, needsProfile: false, withIssues: true });
24
+ return {
25
+ ...common,
26
+ config: { path: settings.configPath, found: settings.configFound, issues: settings.configIssues ?? [] },
27
+ profiles: settings.configuredProfiles,
28
+ read_only: readOnly,
29
+ };
30
+ }
31
+ catch (error) {
32
+ const file = configFilePath(paths.config);
33
+ return {
34
+ ...common,
35
+ config: { path: file, found: existsSync(file), issues: [] },
36
+ settings: { error: failure(error) },
37
+ profiles: null,
38
+ read_only: readOnly,
39
+ };
40
+ }
34
41
  };
35
- export const doctorCommand = () => annotate(new Command("doctor"), {
42
+ export const doctorCommand = () => profileFree(annotate(new Command("doctor"), {
36
43
  effects: LOCAL_READ,
37
- examples: [`${IDENTITY.command} doctor`, `${IDENTITY.command} personal doctor --json`],
38
- })
44
+ examples: [`${IDENTITY.command} doctor`, `${IDENTITY.command} doctor --json`],
45
+ }))
39
46
  .description("check this installation: version, paths, config, profiles; no keyring or network")
40
47
  .action(function () {
41
48
  const env = environmentOf(this).env ?? process.env;
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAClH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,MAAM,OAAO,GAAG,CAAC,KAAc,EAAE,EAAE;IACjC,IAAI,KAAK,YAAY,QAAQ;QAAE,OAAO,KAAK,CAAC,OAAO,CAAA;IACnD,MAAM,KAAK,CAAA;AACb,CAAC,CAAA;AAED,iHAAiH;AACjH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAsB,EAAE,EAAE;IACrD,MAAM,KAAK,GAAG,YAAY,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,CAAA;IAC1F,MAAM,IAAI,GAAG,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACzC,IAAI,MAAyD,CAAA;IAC7D,IAAI,QAAQ,GAAoB,IAAI,CAAA;I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E;AAC/E,eAAO,MAAM,QAAQ,YAAmB,UAAU,KAAG,OAAO,CAAC,IAAI,CAgBhE,CAAA"}
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAGxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAGpD,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAA;IAChC,gGAAgG;IAChG,MAAM,EAAE,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;IAC7C,SAAS,EAAE,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAA;IAC/C,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,UAAU,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IACjE,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,SAAS,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;CAChD;AAOD,6GAA6G;AAC7G,eAAO,MAAM,eAAe,YAAa,UAAU,KAAG,SAuCrD,CAAA;AAED,+EAA+E;AAC/E,eAAO,MAAM,QAAQ,YAAmB,UAAU,KAAG,OAAO,CAAC,IAAI,CAkBhE,CAAA"}
package/dist/mcp.js CHANGED
@@ -4,6 +4,7 @@ import { mcpErrorResult } from "@wirecat/cli-base";
4
4
  import { registerCommands, runCommandForAgent, toolsFromCommands } from "@wirecat/cli-core/mcp";
5
5
  import { IDENTITY } from "./identity.js";
6
6
  const EXCLUDED = [["mcp"]];
7
+ const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
7
8
  /** The shared three tools — search, read, write — over every command, writes included; the levels decide. */
8
9
  export const createMcpServer = (options) => {
9
10
  const server = new McpServer({ name: IDENTITY.command, version: IDENTITY.version }, {
@@ -32,12 +33,12 @@ export const createMcpServer = (options) => {
32
33
  const answer = await runCommandForAgent(program, tool.path, input, context);
33
34
  if ("error" in answer)
34
35
  return mcpErrorResult(answer.error);
35
- const value = (answer.result ?? {});
36
+ const value = isObject(answer.result) ? answer.result : { result: answer.result };
36
37
  return { content: [{ type: "text", text: JSON.stringify(value) }], structuredContent: value };
37
38
  },
38
39
  },
39
40
  ]));
40
- registerCommands(server, IDENTITY.command, commands);
41
+ registerCommands(server, IDENTITY.command, commands, undefined, undefined, IDENTITY.messenger);
41
42
  return server;
42
43
  };
43
44
  /** Serves until the client closes the connection or the command is stopped. */
@@ -51,6 +52,9 @@ export const serveMcp = async (options) => {
51
52
  void server.close().then(resolve, reject);
52
53
  };
53
54
  options.signal?.addEventListener("abort", stop, { once: true });
55
+ // A stop that came while the server module was loading has already fired, and the listener never will.
56
+ if (options.signal?.aborted)
57
+ stop();
54
58
  void server.connect(options.transport ?? new StdioServerTransport()).catch(reject);
55
59
  });
56
60
  }
package/dist/mcp.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.js","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAA;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAGlD,OAAO,EAAmB,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAEhH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAaxC,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,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AAC,MAAM,EAAE,OAAO;gBAAE,IAAI,EAAE,CAAA;YACnC,KAAK,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,IAAI,IAAI,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;QACpF,CAAC,CAAC,CAAA;IACJ,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QAClD,MAAM,MAAM,CAAC,KAAK,EAAE,CAAA;IACtB,CAAC;AACH,CAAC,CAAA"}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.4";
1
+ export declare const VERSION = "0.1.6";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = "0.1.4";
1
+ export const VERSION = "0.1.6";
2
2
  //# sourceMappingURL=version.js.map