@optique/core 1.4.0-dev.2728 → 1.4.0-dev.2731
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 +14 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optique/core",
|
|
3
|
-
"version": "1.4.0-dev.
|
|
3
|
+
"version": "1.4.0-dev.2731",
|
|
4
4
|
"description": "Type-safe combinatorial command-line interface parser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
},
|
|
246
246
|
"sideEffects": false,
|
|
247
247
|
"devDependencies": {
|
|
248
|
-
"@optique/env": "1.4.0-dev.
|
|
248
|
+
"@optique/env": "1.4.0-dev.2731+078a644e",
|
|
249
249
|
"@types/node": "^24.0.0",
|
|
250
250
|
"fast-check": "^4.7.0",
|
|
251
251
|
"tsdown": "^0.13.0",
|
package/skills/optique/SKILL.md
CHANGED
|
@@ -57,19 +57,20 @@ Core rules
|
|
|
57
57
|
`dependency(source.deriveSync(...))`. Optique resolves such chains by
|
|
58
58
|
dependency order, independently of object/tuple field order.
|
|
59
59
|
- Use `derivePromptConfig(source, resolver)` from *@optique/prompt* or its
|
|
60
|
-
|
|
61
|
-
Async resolvers run at
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
`
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
60
|
+
adapters for choices/messages depending on parsed values; use
|
|
61
|
+
`[sourceA, sourceB]` for several sources. Async resolvers run at fallback
|
|
62
|
+
after sources resolve. Match the prompt kind to the parser's value type;
|
|
63
|
+
derive the CLI parser separately. A lone resolver fetches choices lazily;
|
|
64
|
+
forward its `signal`. Clack `pendingMessage` enables a resolver spinner.
|
|
65
|
+
- Pass `{ validate, maxAttempts, signal }` as `prompt()`'s third argument.
|
|
66
|
+
Return `undefined` to accept or a structured `Message` to retry, sync/async.
|
|
67
|
+
Attempt limits are positive integers; retries default to unlimited.
|
|
68
|
+
Clack `autocomplete` also has sync native validation; Inquirer `search`
|
|
69
|
+
has sync/async native validation. Multi selections use shared validation.
|
|
70
|
+
- Clack `autocomplete` filters one selection; `autocomplete-multiselect`
|
|
71
|
+
returns `readonly string[]`. Both take array `options`. Inquirer `search`
|
|
72
|
+
calls `source(term, { signal })` per query; forward the signal to requests.
|
|
73
|
+
Empty search input gives `undefined`.
|
|
73
74
|
- Implement a custom adapter's `execute(config, context)` so retries can show
|
|
74
75
|
`context.previousValidationMessage`, and forward `context.signal` when the
|
|
75
76
|
prompt library supports aborting active work. Adapter-native validation
|