@kjanat/dreamcli 3.0.0-rc.1 → 3.0.0-rc.10

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 (194) hide show
  1. package/CHANGELOG.md +217 -1
  2. package/dist/core/cli/dispatch.d.mts +6 -5
  3. package/dist/core/cli/dispatch.mjs +205 -1
  4. package/dist/core/cli/help-links.d.mts +0 -1
  5. package/dist/core/cli/help-links.mjs +41 -1
  6. package/dist/core/cli/index.d.mts +81 -8
  7. package/dist/core/cli/index.mjs +945 -1
  8. package/dist/core/cli/planner.d.mts +5 -1
  9. package/dist/core/cli/planner.mjs +300 -1
  10. package/dist/core/cli/plugin.d.mts +1 -1
  11. package/dist/core/cli/plugin.mjs +41 -1
  12. package/dist/core/cli/propagate.d.mts +1 -1
  13. package/dist/core/cli/propagate.mjs +57 -1
  14. package/dist/core/cli/root-help.d.mts +2 -1
  15. package/dist/core/cli/root-help.mjs +226 -4
  16. package/dist/core/cli/root-surface.d.mts +12 -1
  17. package/dist/core/cli/root-surface.mjs +28 -1
  18. package/dist/core/cli/runtime-preflight.d.mts +14 -2
  19. package/dist/core/cli/runtime-preflight.mjs +169 -1
  20. package/dist/core/completion/index.d.mts +0 -1
  21. package/dist/core/completion/index.mjs +90 -1
  22. package/dist/core/completion/shells/bash.d.mts +0 -1
  23. package/dist/core/completion/shells/bash.mjs +308 -3
  24. package/dist/core/completion/shells/fish.d.mts +0 -1
  25. package/dist/core/completion/shells/fish.mjs +162 -2
  26. package/dist/core/completion/shells/powershell.d.mts +0 -1
  27. package/dist/core/completion/shells/powershell.mjs +358 -2
  28. package/dist/core/completion/shells/shared.d.mts +13 -2
  29. package/dist/core/completion/shells/shared.mjs +176 -1
  30. package/dist/core/completion/shells/zsh.d.mts +0 -1
  31. package/dist/core/completion/shells/zsh.mjs +251 -2
  32. package/dist/core/config/index.d.mts +2 -3
  33. package/dist/core/config/index.mjs +246 -1
  34. package/dist/core/config/package-json.d.mts +27 -4
  35. package/dist/core/config/package-json.mjs +386 -3
  36. package/dist/core/errors/index.d.mts +3 -3
  37. package/dist/core/errors/index.mjs +87 -1
  38. package/dist/core/execution/index.d.mts +0 -1
  39. package/dist/core/execution/index.mjs +201 -1
  40. package/dist/core/help/ansi.d.mts +11 -5
  41. package/dist/core/help/ansi.mjs +121 -2
  42. package/dist/core/help/index.d.mts +22 -3
  43. package/dist/core/help/index.mjs +341 -7
  44. package/dist/core/help/theme.d.mts +68 -0
  45. package/dist/core/help/theme.mjs +46 -0
  46. package/dist/core/json-schema/index.d.mts +15 -2
  47. package/dist/core/json-schema/index.mjs +536 -12
  48. package/dist/core/json-schema/meta-descriptions.generated.d.mts +55 -38
  49. package/dist/core/json-schema/meta-descriptions.generated.mjs +102 -28
  50. package/dist/core/output/activity.d.mts +0 -1
  51. package/dist/core/output/activity.mjs +452 -1
  52. package/dist/core/output/bind.mjs +56 -1
  53. package/dist/core/output/contracts.d.mts +4 -5
  54. package/dist/core/output/contracts.mjs +57 -1
  55. package/dist/core/output/display-value.mjs +32 -1
  56. package/dist/core/output/index.d.mts +21 -1
  57. package/dist/core/output/index.mjs +442 -2
  58. package/dist/core/output/renderers.d.mts +0 -1
  59. package/dist/core/output/renderers.mjs +46 -1
  60. package/dist/core/output/writer.mjs +12 -1
  61. package/dist/core/parse/index.d.mts +40 -7
  62. package/dist/core/parse/index.mjs +727 -1
  63. package/dist/core/prompt/index.d.mts +1 -1
  64. package/dist/core/prompt/index.mjs +348 -6
  65. package/dist/core/resolve/args.d.mts +1 -1
  66. package/dist/core/resolve/args.mjs +105 -1
  67. package/dist/core/resolve/coerce.d.mts +1 -1
  68. package/dist/core/resolve/coerce.mjs +336 -1
  69. package/dist/core/resolve/config.mjs +19 -1
  70. package/dist/core/resolve/contracts.d.mts +9 -4
  71. package/dist/core/resolve/errors.d.mts +0 -1
  72. package/dist/core/resolve/errors.mjs +140 -2
  73. package/dist/core/resolve/flags.d.mts +7 -2
  74. package/dist/core/resolve/flags.mjs +251 -1
  75. package/dist/core/resolve/index.d.mts +2 -2
  76. package/dist/core/resolve/index.mjs +85 -1
  77. package/dist/core/resolve/property.d.mts +4 -2
  78. package/dist/core/resolve/property.mjs +53 -1
  79. package/dist/core/schema/activity.d.mts +31 -11
  80. package/dist/core/schema/arg.d.mts +3 -4
  81. package/dist/core/schema/arg.mjs +463 -1
  82. package/dist/core/schema/command.d.mts +26 -6
  83. package/dist/core/schema/command.mjs +726 -1
  84. package/dist/core/schema/flag.d.mts +485 -19
  85. package/dist/core/schema/flag.mjs +705 -1
  86. package/dist/core/schema/index.d.mts +4 -2
  87. package/dist/core/schema/middleware.d.mts +4 -3
  88. package/dist/core/schema/middleware.mjs +41 -1
  89. package/dist/core/schema/number-constraints.mjs +60 -1
  90. package/dist/core/schema/prompt.d.mts +6 -3
  91. package/dist/core/schema/run.d.mts +20 -1
  92. package/dist/core/schema/string-constraints.d.mts +97 -0
  93. package/dist/core/schema/string-constraints.mjs +69 -0
  94. package/dist/core/schema/value-parsers.d.mts +78 -0
  95. package/dist/core/schema/value-parsers.mjs +142 -0
  96. package/dist/core/schema-dsl/runtime.mjs +271 -2
  97. package/dist/core/schema-dsl/to-json-schema.d.mts +0 -1
  98. package/dist/core/schema-dsl/to-json-schema.mjs +74 -1
  99. package/dist/core/testkit/index.d.mts +0 -31
  100. package/dist/core/testkit/index.mjs +83 -1
  101. package/dist/index.d.mts +11 -6
  102. package/dist/index.mjs +22 -1
  103. package/dist/runtime/adapter.d.mts +38 -2
  104. package/dist/runtime/adapter.mjs +87 -1
  105. package/dist/runtime/auto.d.mts +2 -3
  106. package/dist/runtime/auto.mjs +45 -1
  107. package/dist/runtime/deno.d.mts +24 -5
  108. package/dist/runtime/deno.mjs +262 -2
  109. package/dist/runtime/detect.mjs +45 -1
  110. package/dist/runtime/index.d.mts +3 -4
  111. package/dist/runtime/node.d.mts +8 -2
  112. package/dist/runtime/node.mjs +220 -2
  113. package/dist/runtime/paths.mjs +48 -1
  114. package/dist/runtime.d.mts +4 -4
  115. package/dist/runtime.mjs +6 -1
  116. package/dist/strings.mjs +22 -1
  117. package/dist/testkit.d.mts +1 -0
  118. package/dist/testkit.mjs +5 -1
  119. package/dist/version.d.mts +7 -3
  120. package/dist/version.mjs +7 -1
  121. package/dreamcli.schema.json +36 -7
  122. package/package.json +45 -42
  123. package/dist/runtime/bun.d.mts +0 -28
  124. package/dist/runtime/bun.mjs +0 -1
  125. package/src/core/cli/dispatch.ts +0 -355
  126. package/src/core/cli/help-links.ts +0 -82
  127. package/src/core/cli/index.ts +0 -1614
  128. package/src/core/cli/planner.ts +0 -656
  129. package/src/core/cli/plugin.ts +0 -117
  130. package/src/core/cli/propagate.ts +0 -97
  131. package/src/core/cli/root-help.ts +0 -342
  132. package/src/core/cli/root-surface.ts +0 -87
  133. package/src/core/cli/runtime-preflight.ts +0 -456
  134. package/src/core/completion/index.ts +0 -138
  135. package/src/core/completion/shells/bash.ts +0 -459
  136. package/src/core/completion/shells/fish.ts +0 -259
  137. package/src/core/completion/shells/powershell.ts +0 -439
  138. package/src/core/completion/shells/shared.ts +0 -310
  139. package/src/core/completion/shells/zsh.ts +0 -381
  140. package/src/core/config/index.ts +0 -417
  141. package/src/core/config/package-json.ts +0 -560
  142. package/src/core/errors/index.ts +0 -193
  143. package/src/core/execution/index.ts +0 -265
  144. package/src/core/help/ansi.ts +0 -144
  145. package/src/core/help/index.ts +0 -563
  146. package/src/core/json-schema/index.ts +0 -910
  147. package/src/core/json-schema/meta-descriptions.generated.ts +0 -202
  148. package/src/core/output/activity.ts +0 -575
  149. package/src/core/output/bind.ts +0 -59
  150. package/src/core/output/contracts.ts +0 -194
  151. package/src/core/output/display-value.ts +0 -48
  152. package/src/core/output/index.ts +0 -704
  153. package/src/core/output/renderers.ts +0 -125
  154. package/src/core/output/writer.ts +0 -46
  155. package/src/core/parse/index.ts +0 -742
  156. package/src/core/prompt/index.ts +0 -623
  157. package/src/core/resolve/args.ts +0 -144
  158. package/src/core/resolve/coerce.ts +0 -500
  159. package/src/core/resolve/config.ts +0 -26
  160. package/src/core/resolve/contracts.ts +0 -135
  161. package/src/core/resolve/errors.ts +0 -227
  162. package/src/core/resolve/flags.ts +0 -269
  163. package/src/core/resolve/index.ts +0 -108
  164. package/src/core/resolve/property.ts +0 -99
  165. package/src/core/schema/activity.ts +0 -240
  166. package/src/core/schema/arg.ts +0 -841
  167. package/src/core/schema/command.ts +0 -1500
  168. package/src/core/schema/flag.ts +0 -917
  169. package/src/core/schema/index.ts +0 -96
  170. package/src/core/schema/middleware.ts +0 -171
  171. package/src/core/schema/number-constraints.ts +0 -153
  172. package/src/core/schema/prompt.ts +0 -171
  173. package/src/core/schema/run.ts +0 -198
  174. package/src/core/schema-dsl/index.ts +0 -109
  175. package/src/core/schema-dsl/parse.ts +0 -262
  176. package/src/core/schema-dsl/runtime.ts +0 -609
  177. package/src/core/schema-dsl/to-json-schema.ts +0 -102
  178. package/src/core/testkit/index.ts +0 -147
  179. package/src/index.ts +0 -181
  180. package/src/runtime/adapter.ts +0 -303
  181. package/src/runtime/auto.ts +0 -86
  182. package/src/runtime/bun.ts +0 -48
  183. package/src/runtime/deno.ts +0 -367
  184. package/src/runtime/detect.ts +0 -105
  185. package/src/runtime/index.ts +0 -21
  186. package/src/runtime/node-builtins.d.ts +0 -27
  187. package/src/runtime/node.ts +0 -289
  188. package/src/runtime/paths.ts +0 -64
  189. package/src/runtime/support.ts +0 -77
  190. package/src/runtime.ts +0 -31
  191. package/src/schema.ts +0 -16
  192. package/src/strings.ts +0 -34
  193. package/src/testkit.ts +0 -25
  194. package/src/version.ts +0 -20
@@ -6,22 +6,22 @@
6
6
  */
7
7
  declare const definitionMetaSchemaDescriptions: {
8
8
  readonly root: {
9
- readonly description: 'Runtime descriptor for the CLI program.\n\nStores the program name, version, description, and registered commands.\\\nBuilt incrementally by CLIBuilder.';
9
+ readonly description: "Runtime descriptor for the CLI program.\n\nStores the program name, version, description, and registered commands.\\\nBuilt incrementally by CLIBuilder.";
10
10
  readonly properties: {
11
11
  readonly name: {
12
- readonly description: 'Program name (used in help text, usage lines, and completion scripts).';
12
+ readonly description: "Program name (used in help text, usage lines, and completion scripts).";
13
13
  };
14
14
  readonly version: {
15
- readonly description: 'Program version (shown by `--version`).';
15
+ readonly description: "Program version (shown by `--version`).";
16
16
  };
17
17
  readonly description: {
18
- readonly description: 'Program description (shown in root help).';
18
+ readonly description: "Program description (shown in root help).";
19
19
  };
20
20
  readonly defaultCommand: {
21
- readonly description: 'Default command dispatched when no subcommand matches.\n\nWhen set, the CLI root behaves like a hybrid command group: subcommands\ndispatch by name as usual, but empty argv or flags-only argv falls\nthrough to this command instead of showing root help.\n\nSet via the .default() builder method.';
21
+ readonly description: "Default command dispatched when no subcommand matches.\n\nWhen set, the CLI root behaves like a hybrid command group: subcommands\ndispatch by name as usual, but empty argv or flags-only argv falls\nthrough to this command instead of showing root help.\n\nSet via the .default() builder method.";
22
22
  };
23
23
  readonly commands: {
24
- readonly description: 'Registered commands (type-erased for heterogeneous storage).';
24
+ readonly description: "Registered commands (type-erased for heterogeneous storage).";
25
25
  };
26
26
  };
27
27
  };
@@ -33,25 +33,25 @@ declare const definitionMetaSchemaDescriptions: {
33
33
  readonly description: "The command name (used for dispatch, e.g. `'deploy'`).";
34
34
  };
35
35
  readonly description: {
36
- readonly description: 'Human-readable description for help text.';
36
+ readonly description: "Human-readable description for help text.";
37
37
  };
38
38
  readonly aliases: {
39
- readonly description: 'Alternative names for this command.';
39
+ readonly description: "Alternative names for this command.";
40
40
  };
41
41
  readonly hidden: {
42
- readonly description: 'Whether this command is hidden from help listings.';
42
+ readonly description: "Whether this command is hidden from help listings.";
43
43
  };
44
44
  readonly examples: {
45
- readonly description: 'Usage examples for help text.';
45
+ readonly description: "Usage examples for help text.";
46
46
  };
47
47
  readonly flags: {
48
- readonly description: 'Named flag schemas, keyed by flag name.';
48
+ readonly description: "Named flag schemas, keyed by flag name.";
49
49
  };
50
50
  readonly args: {
51
- readonly description: 'Ordered positional arg entries (name + schema).';
51
+ readonly description: "Ordered positional arg entries (name + schema).";
52
52
  };
53
53
  readonly commands: {
54
- readonly description: 'Nested subcommand schemas (for help rendering and completion).\n\nPure data — no execution closures. Populated by `.command()` on\n`CommandBuilder`. Empty for leaf commands.';
54
+ readonly description: "Nested subcommand schemas (for help rendering and completion).\n\nPure data — no execution closures. Populated by `.command()` on\n`CommandBuilder`. Empty for leaf commands.";
55
55
  };
56
56
  };
57
57
  };
@@ -59,25 +59,25 @@ declare const definitionMetaSchemaDescriptions: {
59
59
  readonly description: "The runtime descriptor stored inside every FlagBuilder. Consumers (parser,\nhelp generator, resolution chain) read this to understand the flag's shape\nwithout touching generics.";
60
60
  readonly properties: {
61
61
  readonly kind: {
62
- readonly description: 'What kind of value this flag accepts.';
62
+ readonly description: "What kind of value this flag accepts.";
63
63
  };
64
64
  readonly presence: {
65
65
  readonly description: "Presence describes whether a flag value is guaranteed to exist when the\naction handler runs:\n\n- `'optional'` — not required; unresolved value follows the kind-specific\n optional fallback (`undefined` for most flags, `[]` for arrays)\n- `'required'` — must be supplied; error if missing\n- `'defaulted'` — always present (falls back to default value)";
66
66
  };
67
67
  readonly defaultValue: {
68
- readonly description: 'Runtime default value (if any).';
68
+ readonly description: "Runtime default value (if any).";
69
69
  };
70
70
  readonly aliases: {
71
71
  readonly description: "Short/long aliases (e.g. `[{ name: 'f', hidden: false }]` for `--force`).";
72
72
  };
73
73
  readonly envVar: {
74
- readonly description: 'Environment variable name for v0.2+ resolution.';
74
+ readonly description: "Environment variable name for v0.2+ resolution.";
75
75
  };
76
76
  readonly configPath: {
77
77
  readonly description: "Dotted config path for v0.2+ resolution (e.g. `'deploy.region'`).";
78
78
  };
79
79
  readonly description: {
80
- readonly description: 'Human-readable description for help text.';
80
+ readonly description: "Human-readable description for help text.";
81
81
  };
82
82
  readonly enumValues: {
83
83
  readonly description: "Allowed literal values when `kind === 'enum'`.";
@@ -86,13 +86,30 @@ declare const definitionMetaSchemaDescriptions: {
86
86
  readonly description: "Element schema when `kind === 'array'`.";
87
87
  };
88
88
  readonly prompt: {
89
- readonly description: 'Interactive prompt configuration for v0.3+ resolution.';
89
+ readonly description: "Interactive prompt configuration for v0.3+ resolution.";
90
90
  };
91
91
  readonly deprecated: {
92
- readonly description: 'Deprecation marker.\n\n- `undefined` — not deprecated (default)\n- `true` — deprecated with no migration message\n- `string` — deprecated with a reason/migration message\n\nWhen a deprecated flag is used, a warning is emitted to stderr.\nHelp text shows `[deprecated]` or `[deprecated: <reason>]`.';
92
+ readonly description: "Deprecation marker.\n\n- `undefined` — not deprecated (default)\n- `true` — deprecated with no migration message\n- `string` — deprecated with a reason/migration message\n\nWhen a deprecated flag is used, a warning is emitted to stderr.\nHelp text shows `[deprecated]` or `[deprecated: <reason>]`.";
93
93
  };
94
94
  readonly propagate: {
95
- readonly description: 'Whether this flag propagates to subcommands in nested command trees.\n\nWhen `true`, the flag is automatically available to all descendant\ncommands. A child command that defines a flag with the same name\nshadows the propagated parent flag.';
95
+ readonly description: "Whether this flag propagates to subcommands in nested command trees.\n\nWhen `true`, the flag is automatically available to all descendant\ncommands. A child command that defines a flag with the same name\nshadows the propagated parent flag.\n\nDefault: `false`";
96
+ };
97
+ readonly negation: {
98
+ readonly description: "Negation settings when `kind === 'boolean'` and `.negatable()` was\ncalled (`undefined` otherwise). See FlagNegation.";
99
+ };
100
+ readonly duplicates: {
101
+ readonly description: "How repeated CLI occurrences of a singleton flag combine.\n\n- `'last'` — last occurrence wins (matches historic behavior)\n- `'first'` — first occurrence wins; later ones parse but are ignored\n- `'error'` — a second occurrence is a `ParseError` (`DUPLICATE_FLAG`)\n\nApplies to CLI token occurrences only — env/config/prompt/default\nresolution keeps its precedence semantics and never raises duplicates.\nOccurrences are counted per *logical* flag: aliases and the negated\nspelling all count toward the same flag.\n\nDefault: `'last'`";
102
+ };
103
+ };
104
+ };
105
+ readonly negation: {
106
+ readonly description: "Negation settings for a boolean flag (set by `.negatable()`).\n\nThe negated spelling and the positive form are two spellings of ONE\nlogical flag: they share duplicate policy, and the last CLI occurrence\nwins across both. The negated spelling is presence-only — `--no-foo=x`\nis rejected.";
107
+ readonly properties: {
108
+ readonly alias: {
109
+ readonly description: "Explicit negated spelling without the `--` prefix (e.g. `'no-sandbox'`).\n`undefined` synthesizes `no-<flagName>` wherever the flag name is known.";
110
+ };
111
+ readonly hidden: {
112
+ readonly description: "Hide the negated spelling from help, completions, and suggestions.";
96
113
  };
97
114
  };
98
115
  };
@@ -100,25 +117,25 @@ declare const definitionMetaSchemaDescriptions: {
100
117
  readonly description: "The runtime descriptor stored inside every ArgBuilder. Consumers (parser,\nhelp generator) read this to understand the arg's shape without touching\ngenerics.";
101
118
  readonly properties: {
102
119
  readonly name: {
103
- readonly description: 'A named positional argument entry in the command schema.\n\nPairs a user-facing arg name with its ArgSchema descriptor.\nThe array ordering in CommandSchema.args determines CLI position.';
120
+ readonly description: "A named positional argument entry in the command schema.\n\nPairs a user-facing arg name with its ArgSchema descriptor.\nThe array ordering in CommandSchema.args determines CLI position.";
104
121
  };
105
122
  readonly kind: {
106
- readonly description: 'What kind of value this arg accepts.';
123
+ readonly description: "What kind of value this arg accepts.";
107
124
  };
108
125
  readonly presence: {
109
126
  readonly description: "Presence describes whether a positional arg is guaranteed to exist when the\naction handler runs:\n\n- `'required'` — must be supplied; error if missing (default)\n- `'optional'` — may be `undefined` if not supplied\n- `'defaulted'` — always present (falls back to default value)";
110
127
  };
111
128
  readonly variadic: {
112
- readonly description: 'Whether this arg consumes all remaining positionals.';
129
+ readonly description: "Whether this arg consumes all remaining positionals.";
113
130
  };
114
131
  readonly stdinMode: {
115
- readonly description: 'Whether this arg may read from stdin during resolution.';
132
+ readonly description: "Whether this arg may read from stdin during resolution.\n\nDefault: `false`";
116
133
  };
117
134
  readonly defaultValue: {
118
- readonly description: 'Runtime default value (if any).';
135
+ readonly description: "Runtime default value (if any).";
119
136
  };
120
137
  readonly description: {
121
- readonly description: 'Human-readable description for help text.';
138
+ readonly description: "Human-readable description for help text.";
122
139
  };
123
140
  readonly envVar: {
124
141
  readonly description: "Environment variable name for env resolution.\n\nWhen set and the CLI value is absent, the resolver reads this env var\nand coerces the string to the arg's declared kind.";
@@ -127,7 +144,7 @@ declare const definitionMetaSchemaDescriptions: {
127
144
  readonly description: "Allowed literal values when `kind === 'enum'`.";
128
145
  };
129
146
  readonly deprecated: {
130
- readonly description: 'Deprecation marker.\n\n- `undefined` — not deprecated (default)\n- `true` — deprecated with no migration message\n- `string` — deprecated with a reason/migration message\n\nWhen a deprecated arg is used, a warning is emitted to stderr.\nHelp text shows `[deprecated]` or `[deprecated: <reason>]`.';
147
+ readonly description: "Deprecation marker.\n\n- `undefined` — not deprecated (default)\n- `true` — deprecated with no migration message\n- `string` — deprecated with a reason/migration message\n\nWhen a deprecated arg is used, a warning is emitted to stderr.\nHelp text shows `[deprecated]` or `[deprecated: <reason>]`.";
131
148
  };
132
149
  };
133
150
  };
@@ -138,44 +155,44 @@ declare const definitionMetaSchemaDescriptions: {
138
155
  readonly description: "The kind of interactive prompt to present.\n\n- `'confirm'` — yes/no boolean question\n- `'input'` — free-text string input\n- `'select'` — single selection from a list\n- `'multiselect'` — multiple selections from a list";
139
156
  };
140
157
  readonly message: {
141
- readonly description: 'The question displayed to the user.';
158
+ readonly description: "The question displayed to the user.";
142
159
  };
143
160
  readonly placeholder: {
144
- readonly description: 'Placeholder text shown before user types (informational only).';
161
+ readonly description: "Placeholder text shown before user types (informational only).";
145
162
  };
146
163
  readonly choices: {
147
- readonly description: 'Available choices. When omitted for `enum` flags, the enum values\nfrom the flag schema are used automatically.';
164
+ readonly description: "Available choices. When omitted for `enum` flags, the enum values\nfrom the flag schema are used automatically.";
148
165
  };
149
166
  readonly min: {
150
- readonly description: 'Minimum number of selections required.';
167
+ readonly description: "Minimum number of selections required.\n\nDefault: `0`";
151
168
  };
152
169
  readonly max: {
153
- readonly description: 'Maximum number of selections allowed.';
170
+ readonly description: "Maximum number of selections allowed.\n\nDefault: `Infinity`";
154
171
  };
155
172
  };
156
173
  };
157
174
  readonly choice: {
158
- readonly description: 'A selectable option for SelectPromptConfig and MultiselectPromptConfig prompts.';
175
+ readonly description: "A selectable option for SelectPromptConfig and MultiselectPromptConfig prompts.";
159
176
  readonly properties: {
160
177
  readonly value: {
161
- readonly description: 'The value returned when this choice is selected.';
178
+ readonly description: "The value returned when this choice is selected.";
162
179
  };
163
180
  readonly label: {
164
- readonly description: 'Display label shown to the user.';
181
+ readonly description: "Display label shown to the user.\n\nDefault: value";
165
182
  };
166
183
  readonly description: {
167
- readonly description: 'Optional description shown alongside the choice.';
184
+ readonly description: "Optional description shown alongside the choice.";
168
185
  };
169
186
  };
170
187
  };
171
188
  readonly example: {
172
- readonly description: 'A single usage example shown in help text.';
189
+ readonly description: "A single usage example shown in help text.";
173
190
  readonly properties: {
174
191
  readonly command: {
175
192
  readonly description: "The command invocation (e.g. `'deploy production --force'`).";
176
193
  };
177
194
  readonly description: {
178
- readonly description: 'Optional description of what this example does.';
195
+ readonly description: "Optional description of what this example does.";
179
196
  };
180
197
  };
181
198
  };
@@ -1,28 +1,102 @@
1
- const e={root:{description:`Runtime descriptor for the CLI program.
2
-
3
- Stores the program name, version, description, and registered commands.\\
4
- Built incrementally by CLIBuilder.`,properties:{name:{description:`Program name (used in help text, usage lines, and completion scripts).`},version:{description:"Program version (shown by `--version`)."},description:{description:`Program description (shown in root help).`},defaultCommand:{description:`Default command dispatched when no subcommand matches.
5
-
6
- When set, the CLI root behaves like a hybrid command group: subcommands
7
- dispatch by name as usual, but empty argv or flags-only argv falls
8
- through to this command instead of showing root help.
9
-
10
- Set via the .default() builder method.`},commands:{description:`Registered commands (type-erased for heterogeneous storage).`}}},defs:{command:{description:`Runtime descriptor produced by CommandBuilder.
11
-
12
- Consumers (parser, help generator, CLI dispatcher) read this to
13
- understand the command's shape — flags, args, aliases, subcommands,
14
- middleware, and interactive resolver.`,properties:{name:{description:"The command name (used for dispatch, e.g. `'deploy'`)."},description:{description:`Human-readable description for help text.`},aliases:{description:`Alternative names for this command.`},hidden:{description:`Whether this command is hidden from help listings.`},examples:{description:`Usage examples for help text.`},flags:{description:`Named flag schemas, keyed by flag name.`},args:{description:`Ordered positional arg entries (name + schema).`},commands:{description:"Nested subcommand schemas (for help rendering and completion).\n\nPure data — no execution closures. Populated by `.command()` on\n`CommandBuilder`. Empty for leaf commands."}}},flag:{description:`The runtime descriptor stored inside every FlagBuilder. Consumers (parser,
15
- help generator, resolution chain) read this to understand the flag's shape
16
- without touching generics.`,properties:{kind:{description:`What kind of value this flag accepts.`},presence:{description:"Presence describes whether a flag value is guaranteed to exist when the\naction handler runs:\n\n- `'optional'` — not required; unresolved value follows the kind-specific\n optional fallback (`undefined` for most flags, `[]` for arrays)\n- `'required'` — must be supplied; error if missing\n- `'defaulted'` — always present (falls back to default value)"},defaultValue:{description:`Runtime default value (if any).`},aliases:{description:"Short/long aliases (e.g. `[{ name: 'f', hidden: false }]` for `--force`)."},envVar:{description:`Environment variable name for v0.2+ resolution.`},configPath:{description:"Dotted config path for v0.2+ resolution (e.g. `'deploy.region'`)."},description:{description:`Human-readable description for help text.`},enumValues:{description:"Allowed literal values when `kind === 'enum'`."},elementSchema:{description:"Element schema when `kind === 'array'`."},prompt:{description:`Interactive prompt configuration for v0.3+ resolution.`},deprecated:{description:"Deprecation marker.\n\n- `undefined` — not deprecated (default)\n- `true` — deprecated with no migration message\n- `string` — deprecated with a reason/migration message\n\nWhen a deprecated flag is used, a warning is emitted to stderr.\nHelp text shows `[deprecated]` or `[deprecated: <reason>]`."},propagate:{description:`Whether this flag propagates to subcommands in nested command trees.
17
-
18
- When \`true\`, the flag is automatically available to all descendant
19
- commands. A child command that defines a flag with the same name
20
- shadows the propagated parent flag.`}}},arg:{description:`The runtime descriptor stored inside every ArgBuilder. Consumers (parser,
21
- help generator) read this to understand the arg's shape without touching
22
- generics.`,properties:{name:{description:`A named positional argument entry in the command schema.
23
-
24
- Pairs a user-facing arg name with its ArgSchema descriptor.
25
- The array ordering in CommandSchema.args determines CLI position.`},kind:{description:`What kind of value this arg accepts.`},presence:{description:"Presence describes whether a positional arg is guaranteed to exist when the\naction handler runs:\n\n- `'required'` — must be supplied; error if missing (default)\n- `'optional'` — may be `undefined` if not supplied\n- `'defaulted'` — always present (falls back to default value)"},variadic:{description:`Whether this arg consumes all remaining positionals.`},stdinMode:{description:`Whether this arg may read from stdin during resolution.`},defaultValue:{description:`Runtime default value (if any).`},description:{description:`Human-readable description for help text.`},envVar:{description:`Environment variable name for env resolution.
26
-
27
- When set and the CLI value is absent, the resolver reads this env var
28
- and coerces the string to the arg's declared kind.`},enumValues:{description:"Allowed literal values when `kind === 'enum'`."},deprecated:{description:"Deprecation marker.\n\n- `undefined` — not deprecated (default)\n- `true` — deprecated with no migration message\n- `string` — deprecated with a reason/migration message\n\nWhen a deprecated arg is used, a warning is emitted to stderr.\nHelp text shows `[deprecated]` or `[deprecated: <reason>]`."}}},prompt:{description:"Discriminated union of all prompt configurations.\n\nUse the `kind` field to narrow:\n```ts\nif (config.kind === 'select') {\n config.choices // readonly SelectChoice[] | undefined\n}\n```",properties:{kind:{description:"The kind of interactive prompt to present.\n\n- `'confirm'` — yes/no boolean question\n- `'input'` — free-text string input\n- `'select'` — single selection from a list\n- `'multiselect'` — multiple selections from a list"},message:{description:`The question displayed to the user.`},placeholder:{description:`Placeholder text shown before user types (informational only).`},choices:{description:"Available choices. When omitted for `enum` flags, the enum values\nfrom the flag schema are used automatically."},min:{description:`Minimum number of selections required.`},max:{description:`Maximum number of selections allowed.`}}},choice:{description:`A selectable option for SelectPromptConfig and MultiselectPromptConfig prompts.`,properties:{value:{description:`The value returned when this choice is selected.`},label:{description:`Display label shown to the user.`},description:{description:`Optional description shown alongside the choice.`}}},example:{description:`A single usage example shown in help text.`,properties:{command:{description:"The command invocation (e.g. `'deploy production --force'`)."},description:{description:`Optional description of what this example does.`}}}}};export{e as definitionMetaSchemaDescriptions};
1
+ //#region src/core/json-schema/meta-descriptions.generated.ts
2
+ /**
3
+ * Generated definition meta-schema descriptions from normalized TypeDoc output.
4
+ *
5
+ * @module
6
+ */
7
+ const definitionMetaSchemaDescriptions = {
8
+ root: {
9
+ description: "Runtime descriptor for the CLI program.\n\nStores the program name, version, description, and registered commands.\\\nBuilt incrementally by CLIBuilder.",
10
+ properties: {
11
+ name: { description: "Program name (used in help text, usage lines, and completion scripts)." },
12
+ version: { description: "Program version (shown by `--version`)." },
13
+ description: { description: "Program description (shown in root help)." },
14
+ defaultCommand: { description: "Default command dispatched when no subcommand matches.\n\nWhen set, the CLI root behaves like a hybrid command group: subcommands\ndispatch by name as usual, but empty argv or flags-only argv falls\nthrough to this command instead of showing root help.\n\nSet via the .default() builder method." },
15
+ commands: { description: "Registered commands (type-erased for heterogeneous storage)." }
16
+ }
17
+ },
18
+ defs: {
19
+ command: {
20
+ description: "Runtime descriptor produced by CommandBuilder.\n\nConsumers (parser, help generator, CLI dispatcher) read this to\nunderstand the command's shape — flags, args, aliases, subcommands,\nmiddleware, and interactive resolver.",
21
+ properties: {
22
+ name: { description: "The command name (used for dispatch, e.g. `'deploy'`)." },
23
+ description: { description: "Human-readable description for help text." },
24
+ aliases: { description: "Alternative names for this command." },
25
+ hidden: { description: "Whether this command is hidden from help listings." },
26
+ examples: { description: "Usage examples for help text." },
27
+ flags: { description: "Named flag schemas, keyed by flag name." },
28
+ args: { description: "Ordered positional arg entries (name + schema)." },
29
+ commands: { description: "Nested subcommand schemas (for help rendering and completion).\n\nPure data — no execution closures. Populated by `.command()` on\n`CommandBuilder`. Empty for leaf commands." }
30
+ }
31
+ },
32
+ flag: {
33
+ description: "The runtime descriptor stored inside every FlagBuilder. Consumers (parser,\nhelp generator, resolution chain) read this to understand the flag's shape\nwithout touching generics.",
34
+ properties: {
35
+ kind: { description: "What kind of value this flag accepts." },
36
+ presence: { description: "Presence describes whether a flag value is guaranteed to exist when the\naction handler runs:\n\n- `'optional'` — not required; unresolved value follows the kind-specific\n optional fallback (`undefined` for most flags, `[]` for arrays)\n- `'required'` — must be supplied; error if missing\n- `'defaulted'` — always present (falls back to default value)" },
37
+ defaultValue: { description: "Runtime default value (if any)." },
38
+ aliases: { description: "Short/long aliases (e.g. `[{ name: 'f', hidden: false }]` for `--force`)." },
39
+ envVar: { description: "Environment variable name for v0.2+ resolution." },
40
+ configPath: { description: "Dotted config path for v0.2+ resolution (e.g. `'deploy.region'`)." },
41
+ description: { description: "Human-readable description for help text." },
42
+ enumValues: { description: "Allowed literal values when `kind === 'enum'`." },
43
+ elementSchema: { description: "Element schema when `kind === 'array'`." },
44
+ prompt: { description: "Interactive prompt configuration for v0.3+ resolution." },
45
+ deprecated: { description: "Deprecation marker.\n\n- `undefined` — not deprecated (default)\n- `true` — deprecated with no migration message\n- `string` — deprecated with a reason/migration message\n\nWhen a deprecated flag is used, a warning is emitted to stderr.\nHelp text shows `[deprecated]` or `[deprecated: <reason>]`." },
46
+ propagate: { description: "Whether this flag propagates to subcommands in nested command trees.\n\nWhen `true`, the flag is automatically available to all descendant\ncommands. A child command that defines a flag with the same name\nshadows the propagated parent flag.\n\nDefault: `false`" },
47
+ negation: { description: "Negation settings when `kind === 'boolean'` and `.negatable()` was\ncalled (`undefined` otherwise). See FlagNegation." },
48
+ duplicates: { description: "How repeated CLI occurrences of a singleton flag combine.\n\n- `'last'` — last occurrence wins (matches historic behavior)\n- `'first'` — first occurrence wins; later ones parse but are ignored\n- `'error'` — a second occurrence is a `ParseError` (`DUPLICATE_FLAG`)\n\nApplies to CLI token occurrences only — env/config/prompt/default\nresolution keeps its precedence semantics and never raises duplicates.\nOccurrences are counted per *logical* flag: aliases and the negated\nspelling all count toward the same flag.\n\nDefault: `'last'`" }
49
+ }
50
+ },
51
+ negation: {
52
+ description: "Negation settings for a boolean flag (set by `.negatable()`).\n\nThe negated spelling and the positive form are two spellings of ONE\nlogical flag: they share duplicate policy, and the last CLI occurrence\nwins across both. The negated spelling is presence-only — `--no-foo=x`\nis rejected.",
53
+ properties: {
54
+ alias: { description: "Explicit negated spelling without the `--` prefix (e.g. `'no-sandbox'`).\n`undefined` synthesizes `no-<flagName>` wherever the flag name is known." },
55
+ hidden: { description: "Hide the negated spelling from help, completions, and suggestions." }
56
+ }
57
+ },
58
+ arg: {
59
+ description: "The runtime descriptor stored inside every ArgBuilder. Consumers (parser,\nhelp generator) read this to understand the arg's shape without touching\ngenerics.",
60
+ properties: {
61
+ name: { description: "A named positional argument entry in the command schema.\n\nPairs a user-facing arg name with its ArgSchema descriptor.\nThe array ordering in CommandSchema.args determines CLI position." },
62
+ kind: { description: "What kind of value this arg accepts." },
63
+ presence: { description: "Presence describes whether a positional arg is guaranteed to exist when the\naction handler runs:\n\n- `'required'` — must be supplied; error if missing (default)\n- `'optional'` — may be `undefined` if not supplied\n- `'defaulted'` — always present (falls back to default value)" },
64
+ variadic: { description: "Whether this arg consumes all remaining positionals." },
65
+ stdinMode: { description: "Whether this arg may read from stdin during resolution.\n\nDefault: `false`" },
66
+ defaultValue: { description: "Runtime default value (if any)." },
67
+ description: { description: "Human-readable description for help text." },
68
+ envVar: { description: "Environment variable name for env resolution.\n\nWhen set and the CLI value is absent, the resolver reads this env var\nand coerces the string to the arg's declared kind." },
69
+ enumValues: { description: "Allowed literal values when `kind === 'enum'`." },
70
+ deprecated: { description: "Deprecation marker.\n\n- `undefined` — not deprecated (default)\n- `true` — deprecated with no migration message\n- `string` — deprecated with a reason/migration message\n\nWhen a deprecated arg is used, a warning is emitted to stderr.\nHelp text shows `[deprecated]` or `[deprecated: <reason>]`." }
71
+ }
72
+ },
73
+ prompt: {
74
+ description: "Discriminated union of all prompt configurations.\n\nUse the `kind` field to narrow:\n```ts\nif (config.kind === 'select') {\n config.choices // readonly SelectChoice[] | undefined\n}\n```",
75
+ properties: {
76
+ kind: { description: "The kind of interactive prompt to present.\n\n- `'confirm'` — yes/no boolean question\n- `'input'` — free-text string input\n- `'select'` — single selection from a list\n- `'multiselect'` — multiple selections from a list" },
77
+ message: { description: "The question displayed to the user." },
78
+ placeholder: { description: "Placeholder text shown before user types (informational only)." },
79
+ choices: { description: "Available choices. When omitted for `enum` flags, the enum values\nfrom the flag schema are used automatically." },
80
+ min: { description: "Minimum number of selections required.\n\nDefault: `0`" },
81
+ max: { description: "Maximum number of selections allowed.\n\nDefault: `Infinity`" }
82
+ }
83
+ },
84
+ choice: {
85
+ description: "A selectable option for SelectPromptConfig and MultiselectPromptConfig prompts.",
86
+ properties: {
87
+ value: { description: "The value returned when this choice is selected." },
88
+ label: { description: "Display label shown to the user.\n\nDefault: value" },
89
+ description: { description: "Optional description shown alongside the choice." }
90
+ }
91
+ },
92
+ example: {
93
+ description: "A single usage example shown in help text.",
94
+ properties: {
95
+ command: { description: "The command invocation (e.g. `'deploy production --force'`)." },
96
+ description: { description: "Optional description of what this example does." }
97
+ }
98
+ }
99
+ }
100
+ };
101
+ //#endregion
102
+ export { definitionMetaSchemaDescriptions };
@@ -1,6 +1,5 @@
1
1
  import { ActivityEvent, ProgressHandle, ProgressOptions, SpinnerHandle } from "../schema/activity.mjs";
2
2
  import { WriteFn } from "./writer.mjs";
3
-
4
3
  //#region src/core/output/activity.d.ts
5
4
  /**
6
5
  * Noop spinner handle singleton.