@optique/core 1.3.0-dev.2454 → 1.3.0-dev.2463
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/package.json +2 -2
- package/skills/optique/SKILL.md +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optique/core",
|
|
3
|
-
"version": "1.3.0-dev.
|
|
3
|
+
"version": "1.3.0-dev.2463",
|
|
4
4
|
"description": "Type-safe combinatorial command-line interface parser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
},
|
|
222
222
|
"sideEffects": false,
|
|
223
223
|
"devDependencies": {
|
|
224
|
-
"@optique/env": "1.3.0-dev.
|
|
224
|
+
"@optique/env": "1.3.0-dev.2463+c163f96c",
|
|
225
225
|
"@types/node": "^24.0.0",
|
|
226
226
|
"fast-check": "^4.7.0",
|
|
227
227
|
"tsdown": "^0.13.0",
|
package/skills/optique/SKILL.md
CHANGED
|
@@ -65,6 +65,16 @@ Core rules
|
|
|
65
65
|
the wrapped parser separately when the CLI domain should change, and make
|
|
66
66
|
it a dependency source only if another consumer needs its answer. Keep
|
|
67
67
|
static prompt configs for everything else.
|
|
68
|
+
- For a custom adapter built with `createPromptAdapter()`, pass shared
|
|
69
|
+
validation options as the generated wrapper's third argument:
|
|
70
|
+
`{ validate, maxAttempts, signal }`. The validator receives the prompted
|
|
71
|
+
value and returns `undefined` to accept it or a structured `Message` to
|
|
72
|
+
retry; it may be synchronous or asynchronous. Attempt limits must be
|
|
73
|
+
positive integers and default to unlimited retries.
|
|
74
|
+
- Implement a custom adapter's `execute(config, context)` so retries can show
|
|
75
|
+
`context.previousValidationMessage`, and forward `context.signal` when the
|
|
76
|
+
prompt library supports aborting active work. Adapter-native validation
|
|
77
|
+
remains separate and completes inside one shared attempt.
|
|
68
78
|
- Build subcommands with `command()` combined by `or()`. Put a literal field
|
|
69
79
|
such as `command: constant("serve")` in each branch when you want a
|
|
70
80
|
discriminated union.
|