@duyquangnvx/create-agent-cli 0.13.1 → 0.15.0

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 CHANGED
@@ -4,6 +4,35 @@ What changed in each release of `@duyquangnvx/agent-cli` (the Runtime) and `@duy
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## v0.15.0 (2026-10-27)
8
+
9
+ ### Added
10
+
11
+ - A Packaged-skill CLI gives the `skill` row's problem as a Notice before every Command run from an install, Built-in Commands aside: a missing copy or one of another `metadata.version` (with ``run `<run-as> skill install` ``), or a personal copy under `~/.claude/skills`. A file it cannot read gives a Notice that the copy could not be checked, and the Command still runs.
12
+ - `doctor` of a Packaged-skill CLI has an advisory `agents` row: a project root `AGENTS.md` without the CLI's block, or with one `skill install` would rewrite, is a problem whose fix is `<run-as> skill install`; a `CLAUDE.md` without an `@AGENTS.md` line is one with no fix. The agent-cli skill says a CLI need not check either itself.
13
+ - An Error table entry can name a string key of its `details` in `print`, such as `print: "stack"`, which text mode prints between the message and the hint, so a CLI need not repeat it in the message. `--json` and help JSON are unchanged. The agent-cli skill covers it.
14
+
15
+ ### Upgrade from v0.14.0
16
+
17
+ - A Packaged-skill CLI that gives its own Notice of an outdated Skill copy, or has its own `doctor` row for its `AGENTS.md` block, deletes it: the Runtime now gives both.
18
+
19
+ ## v0.14.0 (2026-10-27)
20
+
21
+ ### Added
22
+
23
+ - `ctx.notice(text)` tells the caller something beside the data, such as that a copy is behind: a plain line on stderr, or one `{"notice":"..."}` JSON line under `--json`, written when called and in order with progress. It never changes stdout or the exit code.
24
+ - `ctx.spawnDetached(command, args, { cwd, env })` starts a child that outlives the run, such as a Daemon, and resolves with `{ pid }` once it has started. The child gets no stdio, is not stopped on an interrupt and, on POSIX, leaves the terminal's process group; one that cannot start fails with the same codes as `ctx.spawn` (`TOOL_MISSING`, `PERMISSION_DENIED`). `runCli` takes a fake as `spawnDetached`; given a fake `spawn` without one, a Command that starts a detached child fails as a bug rather than start a real one.
25
+ - A serve Command's ctx has `ctx.end()`, which ends the run with exit 0 and prints nothing more, so a Daemon that a newer one replaces can stop itself. Its type is the new `ServeContext`.
26
+ - `skill: { packaged: "<folder>" }` declares a Packaged skill, one shipped inside the CLI's package, beside `skill: { source }` for a Skill Hub. It earns a Built-in `skill install`, a write Command that copies the folder to `.claude/skills/<name>` at the package manager's project root (removing files the package no longer has), refreshing a copy of another `metadata.version` at once but asking for `--force` to replace or remove a file of a copy at the package's version, which someone edited, writes the CLI's `AGENTS.md` block between `<!-- BEGIN:<name> -->` and `<!-- END:<name> -->`, and names the `@AGENTS.md` line `CLAUDE.md` lacks without editing it. `doctor`'s `skill` row then finds the Skill copy from the project root, so from a workspace package too, and reports as an advisory problem a missing copy or one whose `metadata.version` differs from the package's (fix: `<run-as> skill install`) and a copy under `~/.claude/skills/<name>`, which Claude Code prefers; under `--json` the row carries `skill: { copy, copyVersion, packageVersion, home? }`. A one-Command CLI declaring a Packaged skill makes `defineCli` throw. `update` of a Global install with a Packaged skill gives the same `<name> skill install` under `next` when the copy differs from the installed package's. A Skill Hub CLI's row is unchanged.
27
+ - The Scaffolder's `--dependency` starts a per-project CLI: a Dependency install, `install: { mode: "dependency", package }`, with a Packaged skill, `skill: { packaged: "skills/<name>" }`, and `skills` in `package.json` `files`. Its examples, test assertions, skill, README and setup reference run it as `npx -q --no-install <name>`; the README adds it with `pnpm add -D <package>`, then copies the skill with `npx -q --no-install <name> skill install`. When npx reports the package missing, the setup reference runs the project's install line if a `package.json` lists it, else the add line. It refuses `--skill-hub` beside it. Without `--dependency` it starts a Global install, as before. The scaffolded skill reads `{"notice":"..."}` lines on stderr beside progress.
28
+ - The agent-cli skill covers the run-as of a Dependency install (start `examples` and hand-written hints with it), the two sources of a CLI's skill, `skill install` and the `AGENTS.md` block it writes, the `skill` row of a Packaged skill, `ctx.notice`, a Daemon started through `ctx.spawnDetached`, and a serve Command that ends itself with `ctx.end()`.
29
+ - `runAsOf(cli)` is exported, returning a CLI's run-as.
30
+
31
+ ### Changed
32
+
33
+ - The agent-cli skill's references point at the `skill` JSDoc of `defineCli` for how `skill install` and a Packaged skill's `doctor` row behave, instead of restating it.
34
+ - **Breaking:** every command line the Runtime gives a Dependency install's caller now starts with `npx -q --no-install <bin>` instead of the bare name, which a Coding agent's shell cannot run: hints, help, the Command names of help JSON (its root keeps the bare name beside the version, as the text header does), `ctx.commandLine()`, the next page of a List Command, `NEEDS_OPERATOR`'s `! <line>`, the `--force`, `--yes` and `doctor` reruns, and `INTERRUPTED`. A Global install and a CLI with no install keep the bare name. The `install` row's fix for another copy than the project's is now `<run-as> doctor`, which runs the project's copy, with every package manager, instead of `pnpm exec <bin>` or `npx <bin>`. A project that has not installed the package gets its install line (`pnpm install`, `npm install`) when a `package.json` from the working directory up to the lockfile's root lists it in `dependencies` or `devDependencies`, and the add line (`pnpm add -D <package>`, `npm install -D <package>`) only when none does, so no fix moves the pinned version; with yarn or bun the row gives no line.
35
+
7
36
  ## v0.13.1 (2026-10-23)
8
37
 
9
38
  ### Changed
package/README.md CHANGED
@@ -6,6 +6,6 @@ Creates a new Agent CLI repository already wired to [`@duyquangnvx/agent-cli`](h
6
6
  pnpm create @duyquangnvx/agent-cli <name> --description "One line saying what it does" --skill-hub https://github.com/<owner>/skills.git
7
7
  ```
8
8
 
9
- The new repository has an Error table, a port, two example Commands (one writing a file at a cost) and their test, a bundled build that stamps the commit and build time into `--version`, CI, a release script, a CHANGELOG, an `AGENTS.md`, and a skeleton skill for the new CLI whose setup reference installs, checks and updates it, so a user installs the skill first and lets their agent do the rest. `--skill-hub` names the Skill Hub each release commits that skill to and agents install it from. Pass `--dry-run` to see what it would write.
9
+ The new repository has an Error table, a port, two example Commands (one writing a file at a cost) and their test, a bundled build that stamps the commit and build time into `--version`, CI, a release script, a CHANGELOG, an `AGENTS.md`, and a skeleton skill for the new CLI whose setup reference installs, checks and updates it, so a user installs the skill first and lets their agent do the rest. `--skill-hub` names the Skill Hub each release commits that skill to and agents install it from; `--dependency` instead starts a CLI each project pins as a devDependency, run as `npx -q --no-install <name>`, whose skill ships inside the package for its `skill install` to copy into the project. Pass `--dry-run` to see what it would write.
10
10
 
11
11
  See the [repository](https://github.com/duyquangnvx/cli-for-agent) for an overview and the [agent-cli skill](https://github.com/duyquangnvx/cli-for-agent/blob/main/skills/agent-cli/SKILL.md) for how to build on it.