@duyquangnvx/create-agent-cli 0.19.0 → 0.20.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 +11 -0
- package/dist/bin.js +9 -9
- package/package.json +2 -2
- package/template/skills/{{binName}}/SKILL.md +5 -13
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@ What changed in each release of `@duyquangnvx/agent-cli` (the Runtime) and `@duy
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## v0.20.0 (2026-10-28)
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **Breaking:** the hints of `OUTPUT_EXISTS` and `ALREADY_EXISTS` read `once the user agrees to replace it, run the Next step` (`them` for several, and `remove` for `skill install` removing an edited file), `NOT_CONFIRMED`'s reads `once the user approves the cost, run the Next step`, and those of `CONFIRMATION_REQUIRED` and `CONFIRMATION_MISMATCH` read `once the user confirms the target, run the Next step`, so an agent asks before adding `--force`, `--yes` or `--confirm` without a skill telling it to. The docs' example `bundle` gives `BUNDLE_EXISTS` the same kind of hint.
|
|
12
|
+
- **Breaking:** the scaffolded skill's Recovering from errors section tells the agent to do what the hint says, and keeps a row only for `LANGUAGE_UNSUPPORTED`, which now asks the user whether an English card will do before running the Next step. The rows for `OUTPUT_EXISTS`, `NOT_CONFIRMED` and every exit code are gone, since the hints and `--help` say the same.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- `--force` in help reads `replace a file the run writes that already exists; --dry-run lists every file it writes`, since `--dry-run` lists the files a run writes, not which of them exist.
|
|
17
|
+
|
|
7
18
|
## v0.19.0 (2026-10-28)
|
|
8
19
|
|
|
9
20
|
### Added
|
package/dist/bin.js
CHANGED
|
@@ -6471,7 +6471,7 @@ const YES_FLAG = standardFlag("--yes", {
|
|
|
6471
6471
|
schema: boolean()
|
|
6472
6472
|
});
|
|
6473
6473
|
const FORCE_FLAG = standardFlag("--force", {
|
|
6474
|
-
description: "replace
|
|
6474
|
+
description: "replace a file the run writes that already exists; --dry-run lists every file it writes",
|
|
6475
6475
|
takes: "nothing",
|
|
6476
6476
|
schema: boolean()
|
|
6477
6477
|
});
|
|
@@ -6764,9 +6764,9 @@ function toolRows(tools, commands) {
|
|
|
6764
6764
|
/** The bundler's stamp, absent when the CLI runs unbundled. Read per call, so a test can define it. */
|
|
6765
6765
|
function buildStamp() {
|
|
6766
6766
|
return {
|
|
6767
|
-
"sha": "
|
|
6767
|
+
"sha": "330940a",
|
|
6768
6768
|
"dirty": false,
|
|
6769
|
-
"builtAt": "2026-10-
|
|
6769
|
+
"builtAt": "2026-10-28T15:25:01.000Z"
|
|
6770
6770
|
};
|
|
6771
6771
|
}
|
|
6772
6772
|
/** The first line of `--version`: the version, and the commit and time of a stamped build. */
|
|
@@ -8022,7 +8022,7 @@ async function checkOutputs({ rerun, commandLine, force, files }, outputs) {
|
|
|
8022
8022
|
throw new CliError({
|
|
8023
8023
|
code: OUTPUT_EXISTS,
|
|
8024
8024
|
message: `\`${commandLine}\` would overwrite ${existing.join(", ")}`,
|
|
8025
|
-
hint: `to replace ${them}, run the Next step`,
|
|
8025
|
+
hint: `once the user agrees to replace ${them}, run the Next step`,
|
|
8026
8026
|
next: [rerun({ add: [FORCE_FLAG.flag] })]
|
|
8027
8027
|
});
|
|
8028
8028
|
}
|
|
@@ -8044,7 +8044,7 @@ function outputsGuard(files, cwd) {
|
|
|
8044
8044
|
throw new CliError({
|
|
8045
8045
|
code: ALREADY_EXISTS,
|
|
8046
8046
|
message: error.message,
|
|
8047
|
-
hint: "to replace it, run the Next step",
|
|
8047
|
+
hint: "once the user agrees to replace it, run the Next step",
|
|
8048
8048
|
next: [forceStep]
|
|
8049
8049
|
}, { cause: error });
|
|
8050
8050
|
}
|
|
@@ -8170,7 +8170,7 @@ function editedRemovals(plan, ctx) {
|
|
|
8170
8170
|
return new CliError({
|
|
8171
8171
|
code: OUTPUT_EXISTS,
|
|
8172
8172
|
message: `skill install would remove ${plan.remove.map((file) => join(plan.copy, file)).join(", ")}`,
|
|
8173
|
-
hint: `to remove ${them}, run the Next step`,
|
|
8173
|
+
hint: `once the user agrees to remove ${them}, run the Next step`,
|
|
8174
8174
|
next: [ctx.rerun({ add: [FORCE_FLAG.flag] })]
|
|
8175
8175
|
});
|
|
8176
8176
|
}
|
|
@@ -10706,7 +10706,7 @@ const CONFIRMATION_MISMATCH = "CONFIRMATION_MISMATCH";
|
|
|
10706
10706
|
function checkConfirmation({ rerun, commandLine, given }, expected) {
|
|
10707
10707
|
if (given === expected) return;
|
|
10708
10708
|
const advice = {
|
|
10709
|
-
hint: "
|
|
10709
|
+
hint: "once the user confirms the target, run the Next step",
|
|
10710
10710
|
next: [rerun({
|
|
10711
10711
|
remove: [CONFIRM_FLAG.flag],
|
|
10712
10712
|
add: [CONFIRM_FLAG.flag, expected]
|
|
@@ -10732,7 +10732,7 @@ function checkCost({ rerun, commandLine, yes }, cost) {
|
|
|
10732
10732
|
throw new CliError({
|
|
10733
10733
|
code: NOT_CONFIRMED,
|
|
10734
10734
|
message: `\`${commandLine}\` needs ${YES_FLAG.flag}: ${cost}`,
|
|
10735
|
-
hint: "
|
|
10735
|
+
hint: "once the user approves the cost, run the Next step",
|
|
10736
10736
|
next: [rerun({ add: [YES_FLAG.flag] })]
|
|
10737
10737
|
});
|
|
10738
10738
|
}
|
|
@@ -11290,7 +11290,7 @@ async function runProcess(cli) {
|
|
|
11290
11290
|
//#region package.json
|
|
11291
11291
|
var package_default = {
|
|
11292
11292
|
name: "@duyquangnvx/create-agent-cli",
|
|
11293
|
-
version: "0.
|
|
11293
|
+
version: "0.20.0",
|
|
11294
11294
|
description: "Creates a new Agent CLI repository wired to @duyquangnvx/agent-cli.",
|
|
11295
11295
|
type: "module",
|
|
11296
11296
|
engines: { "node": ">=22.12.0" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duyquangnvx/create-agent-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Creates a new Agent CLI repository wired to @duyquangnvx/agent-cli.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@duyquangnvx/agent-cli": "0.
|
|
24
|
+
"@duyquangnvx/agent-cli": "0.20.0",
|
|
25
25
|
"tsdown": "0.23.0",
|
|
26
26
|
"zod": "4.6.7"
|
|
27
27
|
},
|
|
@@ -47,18 +47,10 @@ Pass `--json` whenever you parse the output: stdout then holds only the data. A
|
|
|
47
47
|
|
|
48
48
|
## Recovering from errors
|
|
49
49
|
|
|
50
|
-
Errors go to stderr and end with a `hint:` line, then a `run:` line for each command to run next, in order. Under `--json`, every stderr line is one JSON object: `{"progress":"..."}` or `{"notice":"..."}` while it runs, then `{ errors: [{ code, message, hint, next }] }` as the last line, `next` holding those commands when there are any.
|
|
50
|
+
Errors go to stderr and end with a `hint:` line, then a `run:` line for each command to run next, in order. Under `--json`, every stderr line is one JSON object: `{"progress":"..."}` or `{"notice":"..."}` while it runs, then `{ errors: [{ code, message, hint, next }] }` as the last line, `next` holding those commands when there are any. Do what the hint says, except for a code below:
|
|
51
51
|
|
|
52
|
-
| Code
|
|
52
|
+
| Code | What to do |
|
|
53
53
|
|---|---|
|
|
54
|
-
| `
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
| exit 1 | You called it wrong. Fix what the message and hint point at, then run it again. |
|
|
58
|
-
| exit 2 | Something on this machine needs a person. Tell the user what the hint says and ask them to fix it. |
|
|
59
|
-
| exit 3 | The source it talks to is broken. Tell the user; running it again won't help. |
|
|
60
|
-
| exit 75 | Nobody needs to act. Wait, then run it again, as the hint says. |
|
|
61
|
-
| exit 70, `INTERNAL` | A bug in {{binName}}. Run it once more with `{{debugVariable}}=1` for the stack trace, then give the user stderr verbatim. |
|
|
62
|
-
| exit 130 or 143 | It was interrupted. Run it again only if the user still wants it. |
|
|
63
|
-
|
|
64
|
-
<!-- Add a row above the exit rows for each CliError code {{binName}} throws, saying what to do about it. -->
|
|
54
|
+
| `LANGUAGE_UNSUPPORTED` | The user asked for that language. Ask whether an English card will do before running the Next step. |
|
|
55
|
+
|
|
56
|
+
<!-- Add a row for each code {{binName}} throws whose right move goes beyond its hint. A guardrail on a flag goes in the workflow step that passes it instead. -->
|