@kjanat/dreamcli 2.5.0 → 3.0.0-rc.2

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 (160) hide show
  1. package/CHANGELOG.md +153 -1
  2. package/README.md +9 -2
  3. package/dist/core/cli/dispatch.mjs +214 -1
  4. package/dist/core/cli/help-links.mjs +41 -1
  5. package/dist/core/cli/index.d.mts +109 -16
  6. package/dist/core/cli/index.mjs +901 -1
  7. package/dist/core/cli/planner.d.mts +27 -5
  8. package/dist/core/cli/planner.mjs +300 -1
  9. package/dist/core/cli/plugin.mjs +41 -1
  10. package/dist/core/cli/propagate.mjs +57 -1
  11. package/dist/core/cli/root-help.d.mts +16 -2
  12. package/dist/core/cli/root-help.mjs +208 -6
  13. package/dist/core/cli/root-surface.d.mts +18 -3
  14. package/dist/core/cli/root-surface.mjs +27 -1
  15. package/dist/core/cli/runtime-preflight.d.mts +16 -1
  16. package/dist/core/cli/runtime-preflight.mjs +168 -1
  17. package/dist/core/completion/index.d.mts +32 -1
  18. package/dist/core/completion/index.mjs +90 -1
  19. package/dist/core/completion/shells/bash.mjs +304 -3
  20. package/dist/core/completion/shells/fish.mjs +159 -2
  21. package/dist/core/completion/shells/powershell.mjs +353 -2
  22. package/dist/core/completion/shells/shared.d.mts +10 -0
  23. package/dist/core/completion/shells/shared.mjs +154 -1
  24. package/dist/core/completion/shells/zsh.mjs +244 -2
  25. package/dist/core/config/index.mjs +246 -1
  26. package/dist/core/config/package-json.mjs +385 -3
  27. package/dist/core/errors/index.mjs +87 -1
  28. package/dist/core/execution/index.mjs +189 -1
  29. package/dist/core/help/ansi.mjs +122 -2
  30. package/dist/core/help/index.d.mts +45 -1
  31. package/dist/core/help/index.mjs +329 -7
  32. package/dist/core/json-schema/index.mjs +487 -9
  33. package/dist/core/json-schema/meta-descriptions.generated.d.mts +38 -38
  34. package/dist/core/json-schema/meta-descriptions.generated.mjs +93 -28
  35. package/dist/core/output/activity.mjs +452 -1
  36. package/dist/core/output/bind.mjs +56 -1
  37. package/dist/core/output/contracts.mjs +57 -1
  38. package/dist/core/output/display-value.mjs +32 -1
  39. package/dist/core/output/index.d.mts +21 -0
  40. package/dist/core/output/index.mjs +442 -2
  41. package/dist/core/output/renderers.mjs +46 -1
  42. package/dist/core/output/writer.mjs +12 -1
  43. package/dist/core/parse/index.d.mts +15 -1
  44. package/dist/core/parse/index.mjs +555 -1
  45. package/dist/core/prompt/index.d.mts +11 -4
  46. package/dist/core/prompt/index.mjs +348 -6
  47. package/dist/core/resolve/args.mjs +105 -1
  48. package/dist/core/resolve/coerce.mjs +279 -1
  49. package/dist/core/resolve/config.mjs +19 -1
  50. package/dist/core/resolve/errors.mjs +140 -2
  51. package/dist/core/resolve/flags.mjs +196 -1
  52. package/dist/core/resolve/index.mjs +85 -1
  53. package/dist/core/resolve/property.d.mts +2 -1
  54. package/dist/core/resolve/property.mjs +45 -1
  55. package/dist/core/schema/arg.d.mts +90 -10
  56. package/dist/core/schema/arg.mjs +463 -1
  57. package/dist/core/schema/command.d.mts +21 -1
  58. package/dist/core/schema/command.mjs +712 -1
  59. package/dist/core/schema/flag.d.mts +92 -2
  60. package/dist/core/schema/flag.mjs +453 -1
  61. package/dist/core/schema/index.d.mts +2 -1
  62. package/dist/core/schema/middleware.mjs +41 -1
  63. package/dist/core/schema/number-constraints.d.mts +96 -0
  64. package/dist/core/schema/number-constraints.mjs +60 -0
  65. package/dist/core/schema/prompt.d.mts +15 -0
  66. package/dist/core/schema/run.d.mts +4 -4
  67. package/dist/core/schema-dsl/runtime.mjs +271 -2
  68. package/dist/core/schema-dsl/to-json-schema.mjs +74 -1
  69. package/dist/core/testkit/index.d.mts +9 -5
  70. package/dist/core/testkit/index.mjs +83 -1
  71. package/dist/index.d.mts +3 -1
  72. package/dist/index.mjs +22 -1
  73. package/dist/runtime/adapter.mjs +82 -1
  74. package/dist/runtime/auto.mjs +46 -1
  75. package/dist/runtime/bun.mjs +28 -1
  76. package/dist/runtime/deno.mjs +217 -2
  77. package/dist/runtime/detect.mjs +45 -1
  78. package/dist/runtime/node.mjs +169 -2
  79. package/dist/runtime/paths.mjs +48 -1
  80. package/dist/runtime.mjs +7 -1
  81. package/dist/strings.mjs +22 -1
  82. package/dist/testkit.mjs +5 -1
  83. package/dist/version.mjs +7 -1
  84. package/examples/basic.ts +5 -1
  85. package/examples/gh/package.json +2 -7
  86. package/examples/pwsh-demo/package.json +1 -7
  87. package/examples/pwsh-demo/src/main.test.ts +1 -4
  88. package/examples/pwsh-demo/src/main.ts +14 -4
  89. package/examples/transport-launcher.ts +85 -0
  90. package/package.json +23 -41
  91. package/dist/runtime/support.d.mts +0 -42
  92. package/dist/runtime/support.mjs +0 -1
  93. package/src/core/cli/dispatch.ts +0 -349
  94. package/src/core/cli/help-links.ts +0 -82
  95. package/src/core/cli/index.ts +0 -1413
  96. package/src/core/cli/planner.ts +0 -487
  97. package/src/core/cli/plugin.ts +0 -117
  98. package/src/core/cli/propagate.ts +0 -97
  99. package/src/core/cli/root-help.ts +0 -252
  100. package/src/core/cli/root-surface.ts +0 -74
  101. package/src/core/cli/runtime-preflight.ts +0 -438
  102. package/src/core/completion/index.ts +0 -88
  103. package/src/core/completion/shells/bash.ts +0 -459
  104. package/src/core/completion/shells/fish.ts +0 -259
  105. package/src/core/completion/shells/powershell.ts +0 -439
  106. package/src/core/completion/shells/shared.ts +0 -283
  107. package/src/core/completion/shells/zsh.ts +0 -381
  108. package/src/core/config/index.ts +0 -417
  109. package/src/core/config/package-json.ts +0 -560
  110. package/src/core/errors/index.ts +0 -193
  111. package/src/core/execution/index.ts +0 -268
  112. package/src/core/help/ansi.ts +0 -144
  113. package/src/core/help/index.ts +0 -516
  114. package/src/core/json-schema/index.ts +0 -891
  115. package/src/core/json-schema/meta-descriptions.generated.ts +0 -185
  116. package/src/core/output/activity.ts +0 -575
  117. package/src/core/output/bind.ts +0 -59
  118. package/src/core/output/contracts.ts +0 -194
  119. package/src/core/output/display-value.ts +0 -48
  120. package/src/core/output/index.ts +0 -704
  121. package/src/core/output/renderers.ts +0 -125
  122. package/src/core/output/writer.ts +0 -46
  123. package/src/core/parse/index.ts +0 -681
  124. package/src/core/prompt/index.ts +0 -583
  125. package/src/core/resolve/args.ts +0 -144
  126. package/src/core/resolve/coerce.ts +0 -432
  127. package/src/core/resolve/config.ts +0 -26
  128. package/src/core/resolve/contracts.ts +0 -135
  129. package/src/core/resolve/errors.ts +0 -227
  130. package/src/core/resolve/flags.ts +0 -255
  131. package/src/core/resolve/index.ts +0 -108
  132. package/src/core/resolve/property.ts +0 -99
  133. package/src/core/schema/activity.ts +0 -240
  134. package/src/core/schema/arg.ts +0 -719
  135. package/src/core/schema/command.ts +0 -1498
  136. package/src/core/schema/flag.ts +0 -801
  137. package/src/core/schema/index.ts +0 -91
  138. package/src/core/schema/middleware.ts +0 -171
  139. package/src/core/schema/prompt.ts +0 -156
  140. package/src/core/schema/run.ts +0 -198
  141. package/src/core/schema-dsl/index.ts +0 -109
  142. package/src/core/schema-dsl/parse.ts +0 -262
  143. package/src/core/schema-dsl/runtime.ts +0 -609
  144. package/src/core/schema-dsl/to-json-schema.ts +0 -102
  145. package/src/core/testkit/index.ts +0 -123
  146. package/src/index.ts +0 -179
  147. package/src/runtime/adapter.ts +0 -303
  148. package/src/runtime/auto.ts +0 -110
  149. package/src/runtime/bun.ts +0 -55
  150. package/src/runtime/deno.ts +0 -369
  151. package/src/runtime/detect.ts +0 -105
  152. package/src/runtime/index.ts +0 -21
  153. package/src/runtime/node-builtins.d.ts +0 -27
  154. package/src/runtime/node.ts +0 -300
  155. package/src/runtime/paths.ts +0 -64
  156. package/src/runtime/support.ts +0 -135
  157. package/src/runtime.ts +0 -31
  158. package/src/strings.ts +0 -34
  159. package/src/testkit.ts +0 -25
  160. package/src/version.ts +0 -20
@@ -1 +1,85 @@
1
- import{isValidationError as e}from"../errors/index.mjs";import{collectValidationErrors as t,isNonEmpty as n,throwAggregatedErrors as r}from"./errors.mjs";import{resolveArgs as i}from"./args.mjs";import{resolveFlags as a}from"./flags.mjs";async function o(o,s,c){let l=c?.stdinData,u=c?.env??{},d=c?.config??{},f=c?.prompter,p=[],m={},h={},g=[];try{m=await a(o.flags,s.flags,u,d,f,o.interactive,p)}catch(n){if(!e(n))throw n;g.push(...t(n))}try{h=i(o.args,s.args,l,u,p)}catch(n){if(!e(n))throw n;g.push(...t(n))}return n(g)&&r(g),{flags:m,args:h,deprecations:p}}export{o as resolve};
1
+ import { isValidationError } from "../errors/index.mjs";
2
+ import { collectValidationErrors, isNonEmpty, throwAggregatedErrors } from "./errors.mjs";
3
+ import { resolveArgs } from "./args.mjs";
4
+ import { resolveFlags } from "./flags.mjs";
5
+ //#region src/core/resolve/index.ts
6
+ /**
7
+ * Resolution chain: CLI -> env -> config -> prompt -> default.
8
+ *
9
+ * v0.1 implemented: **CLI parsed value -> default value**.
10
+ * v0.2 adds: **env variable resolution** and **config object resolution**
11
+ * between CLI and default.
12
+ * v0.3 adds: **prompt resolution** between config and default.
13
+ *
14
+ * The resolver takes raw {@linkcode ParseResult} (from the parser) and a
15
+ * {@linkcode CommandSchema}, applies the resolution chain, and validates
16
+ * that all required flags/args are present. On success it returns a
17
+ * {@linkcode ResolveResult} with fully resolved values; on failure it throws
18
+ * {@linkcode ValidationError}.
19
+ *
20
+ * @module dreamcli/core/resolve
21
+ */
22
+ /**
23
+ * Resolve parsed values against a command schema.
24
+ *
25
+ * Low-level API: most applications should rely on `cli().run()`, `.execute()`,
26
+ * or `runCommand()`, which already call {@linkcode resolve} at the right time.
27
+ * Reach for this function when testing precedence rules directly or building
28
+ * custom execution flows around {@linkcode CommandSchema}.
29
+ *
30
+ * Resolution order:
31
+ * 1. CLI parsed value (from {@linkcode ParseResult})
32
+ * 2. Env variable (from {@linkcode ResolveOptions.env}, if flag declares `envVar`)
33
+ * 3. Config value (from {@linkcode ResolveOptions.config}, if flag declares `configPath`)
34
+ * 4. Prompt (from {@linkcode ResolveOptions.prompter}, if flag declares `prompt`)
35
+ * 5. Default value (from schema)
36
+ *
37
+ * After resolution, validates that all required flags and args have
38
+ * a value. Collects **all** validation errors before throwing, so the
39
+ * user sees every missing field at once.
40
+ *
41
+ * @param schema - The command schema defining flags and args
42
+ * @param parsed - Raw parsed values from the parser
43
+ * @param options - External state for the resolution chain
44
+ * @returns Fully resolved flag and arg values
45
+ * @throws {@linkcode ValidationError} if any required flag or arg is missing,
46
+ * or if an env/config value fails coercion
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * const parsed = parse(deploy.schema, ['production']);
51
+ * const resolved = await resolve(deploy.schema, parsed, {
52
+ * env: { DEPLOY_REGION: 'eu' },
53
+ * });
54
+ * ```
55
+ */
56
+ async function resolve(schema, parsed, options) {
57
+ const stdinData = options?.stdinData;
58
+ const env = options?.env ?? {};
59
+ const config = options?.config ?? {};
60
+ const prompter = options?.prompter;
61
+ const deprecations = [];
62
+ let flags = {};
63
+ let args = {};
64
+ const errors = [];
65
+ try {
66
+ flags = await resolveFlags(schema.flags, parsed.flags, env, config, prompter, schema.interactive, deprecations);
67
+ } catch (error) {
68
+ if (!isValidationError(error)) throw error;
69
+ errors.push(...collectValidationErrors(error));
70
+ }
71
+ try {
72
+ args = resolveArgs(schema.args, parsed.args, stdinData, env, deprecations);
73
+ } catch (error) {
74
+ if (!isValidationError(error)) throw error;
75
+ errors.push(...collectValidationErrors(error));
76
+ }
77
+ if (isNonEmpty(errors)) throwAggregatedErrors(errors);
78
+ return {
79
+ flags,
80
+ args,
81
+ deprecations
82
+ };
83
+ }
84
+ //#endregion
85
+ export { resolve };
@@ -1,6 +1,6 @@
1
+ import { NumberConstraints } from "../schema/number-constraints.mjs";
1
2
  import { ArgSchema } from "../schema/arg.mjs";
2
3
  import { FlagSchema } from "../schema/flag.mjs";
3
-
4
4
  //#region src/core/resolve/property.d.ts
5
5
  /** Flag/arg kinds that share a common coercion path. */
6
6
  declare const SHARED_PROPERTY_MODEL_KINDS: readonly ['string', 'number', 'enum', 'custom'];
@@ -11,6 +11,7 @@ type SharedPropertySchema = {
11
11
  readonly kind: 'string';
12
12
  } | {
13
13
  readonly kind: 'number';
14
+ readonly numberConstraints: NumberConstraints | undefined;
14
15
  } | {
15
16
  readonly kind: 'enum';
16
17
  readonly enumValues: readonly string[] | undefined;
@@ -1 +1,45 @@
1
- function e(e){switch(e.kind){case`string`:return{kind:`string`};case`number`:return{kind:`number`};case`enum`:return{kind:`enum`,enumValues:e.enumValues};case`custom`:return e.parseFn===void 0?{kind:`custom`}:{kind:`custom`,parseFn:e.parseFn};case`boolean`:case`array`:return}}function t(e){switch(e.kind){case`string`:return{kind:`string`};case`number`:return{kind:`number`};case`enum`:return{kind:`enum`,enumValues:e.enumValues};case`custom`:{if(e.parseFn===void 0)return{kind:`custom`};let t=e.parseFn;return{kind:`custom`,parseFn:e=>t(typeof e==`string`?e:String(e))}}}}export{t as toSharedArgPropertySchema,e as toSharedFlagPropertySchema};
1
+ //#region src/core/resolve/property.ts
2
+ /** Extract the shared coercion slice from a flag schema, or `undefined` for boolean/array (handled separately). */
3
+ function toSharedFlagPropertySchema(schema) {
4
+ switch (schema.kind) {
5
+ case "string": return { kind: "string" };
6
+ case "number": return {
7
+ kind: "number",
8
+ numberConstraints: schema.numberConstraints
9
+ };
10
+ case "enum": return {
11
+ kind: "enum",
12
+ enumValues: schema.enumValues
13
+ };
14
+ case "custom": return schema.parseFn === void 0 ? { kind: "custom" } : {
15
+ kind: "custom",
16
+ parseFn: schema.parseFn
17
+ };
18
+ case "boolean":
19
+ case "array": return;
20
+ }
21
+ }
22
+ /** Extract the shared coercion slice from an arg schema (all arg kinds are shared). */
23
+ function toSharedArgPropertySchema(schema) {
24
+ switch (schema.kind) {
25
+ case "string": return { kind: "string" };
26
+ case "number": return {
27
+ kind: "number",
28
+ numberConstraints: schema.numberConstraints
29
+ };
30
+ case "enum": return {
31
+ kind: "enum",
32
+ enumValues: schema.enumValues
33
+ };
34
+ case "custom": {
35
+ if (schema.parseFn === void 0) return { kind: "custom" };
36
+ const parseFn = schema.parseFn;
37
+ return {
38
+ kind: "custom",
39
+ parseFn: (raw) => parseFn(typeof raw === "string" ? raw : String(raw))
40
+ };
41
+ }
42
+ }
43
+ }
44
+ //#endregion
45
+ export { toSharedArgPropertySchema, toSharedFlagPropertySchema };
@@ -1,13 +1,6 @@
1
+ import { NumberConstraints } from "./number-constraints.mjs";
2
+
1
3
  //#region src/core/schema/arg.d.ts
2
- /**
3
- * Positional argument schema builder with full type inference.
4
- *
5
- * Each factory (`arg.string()`, `arg.number()`, `arg.enum()`, `arg.custom()`) returns an
6
- * immutable {@linkcode ArgBuilder} whose generic parameter tracks the value type,
7
- * presence state, and variadic flag through the fluent chain.
8
- *
9
- * @module dreamcli/core/schema/arg
10
- */
11
4
  /** All arg presence states as a runtime array. */
12
5
  declare const ARG_PRESENCES: readonly ['required', 'optional', 'defaulted'];
13
6
  /**
@@ -29,6 +22,8 @@ interface ArgConfig {
29
22
  readonly presence: ArgPresence;
30
23
  /** Whether this arg consumes remaining positionals. */
31
24
  readonly variadic: boolean;
25
+ /** The runtime kind discriminator, mirroring {@link ArgKind}. */
26
+ readonly argKind: ArgKind;
32
27
  }
33
28
  /**
34
29
  * Advanced type helper used by {@linkcode ArgBuilder} modifiers to replace presence.
@@ -38,6 +33,7 @@ type WithArgPresence<C extends ArgConfig, P extends ArgPresence> = {
38
33
  readonly valueType: C['valueType'];
39
34
  readonly presence: P;
40
35
  readonly variadic: C['variadic'];
36
+ readonly argKind: C['argKind'];
41
37
  };
42
38
  /**
43
39
  * Advanced type helper used by {@linkcode ArgBuilder.variadic | ArgBuilder.variadic()}.
@@ -47,6 +43,7 @@ type WithVariadic<C extends ArgConfig> = {
47
43
  readonly valueType: C['valueType'];
48
44
  readonly presence: C['presence'];
49
45
  readonly variadic: true;
46
+ readonly argKind: C['argKind'];
50
47
  };
51
48
  /**
52
49
  * Compute the final value type from config — this is what handlers receive.
@@ -102,6 +99,13 @@ interface ArgSchema {
102
99
  readonly envVar: string | undefined;
103
100
  /** Allowed literal values when `kind === 'enum'`. */
104
101
  readonly enumValues: readonly string[] | undefined;
102
+ /**
103
+ * Numeric constraints when `kind === 'number'` (`undefined` otherwise).
104
+ *
105
+ * Enforced at the parse and resolution boundaries. `finite` defaults to
106
+ * `true`, so `Infinity` is rejected even when no constraints object is set.
107
+ */
108
+ readonly numberConstraints: NumberConstraints | undefined;
105
109
  /** Custom parse function (only when `kind === 'custom'`). */
106
110
  readonly parseFn: ArgParseFn<unknown> | undefined;
107
111
  /**
@@ -376,6 +380,71 @@ declare class ArgBuilder<C extends ArgConfig> {
376
380
  * ```
377
381
  */
378
382
  deprecated(message?: string): ArgBuilder<C>;
383
+ /**
384
+ * Require an integer value. Composes with other numeric constraints.
385
+ *
386
+ * @param value - Whether to require an integer.
387
+ * @defaultValue `true`
388
+ * @returns The builder (for chaining).
389
+ *
390
+ * @example
391
+ * ```ts
392
+ * arg.number().int() // rejects 3.7, accepts 3
393
+ * arg.number({ int: true }).int(false) // re-allows non-integers
394
+ * ```
395
+ */
396
+ int(this: ArgBuilder<C & {
397
+ readonly argKind: 'number';
398
+ }>, value?: boolean): ArgBuilder<C>;
399
+ /**
400
+ * Set an inclusive lower bound. Composes with other numeric constraints;
401
+ * a later call overrides an earlier `min` (including one from the options
402
+ * object).
403
+ *
404
+ * @param value - Inclusive minimum.
405
+ * @returns The builder (for chaining).
406
+ *
407
+ * @example
408
+ * ```ts
409
+ * arg.number().min(0) // rejects -1, accepts 0
410
+ * arg.number({ min: 0 }).min(5) // effective min is 5
411
+ * ```
412
+ */
413
+ min(this: ArgBuilder<C & {
414
+ readonly argKind: 'number';
415
+ }>, value: number): ArgBuilder<C>;
416
+ /**
417
+ * Set an inclusive upper bound. Composes with other numeric constraints;
418
+ * a later call overrides an earlier `max`.
419
+ *
420
+ * @param value - Inclusive maximum.
421
+ * @returns The builder (for chaining).
422
+ *
423
+ * @example
424
+ * ```ts
425
+ * arg.number().max(100) // rejects 101, accepts 100
426
+ * ```
427
+ */
428
+ max(this: ArgBuilder<C & {
429
+ readonly argKind: 'number';
430
+ }>, value: number): ArgBuilder<C>;
431
+ /**
432
+ * Require (or, with `false`, allow) a finite value. Finiteness is enforced
433
+ * by default, so this is mainly used as `.finite(false)` to re-allow
434
+ * `Infinity` / `-Infinity`.
435
+ *
436
+ * @param allow - Whether to require a finite value.
437
+ * @defaultValue `true`
438
+ * @returns The builder (for chaining).
439
+ *
440
+ * @example
441
+ * ```ts
442
+ * arg.number().finite(false) // accepts Infinity
443
+ * ```
444
+ */
445
+ finite(this: ArgBuilder<C & {
446
+ readonly argKind: 'number';
447
+ }>, allow?: boolean): ArgBuilder<C>;
379
448
  }
380
449
  /**
381
450
  * Arg factory functions — the public API for creating positional arguments.
@@ -439,6 +508,7 @@ interface ArgFactory {
439
508
  readonly valueType: string;
440
509
  readonly presence: 'required';
441
510
  readonly variadic: false;
511
+ readonly argKind: 'string';
442
512
  }>;
443
513
  /**
444
514
  * Number-valued positional argument. Required by default.
@@ -460,12 +530,20 @@ interface ArgFactory {
460
530
  * // $ mycli serve → 3000
461
531
  * ```
462
532
  *
533
+ * Constraints are enforced at the parse and resolution boundaries and also
534
+ * compose via chained methods (`.int()`, `.min()`, `.max()`, `.finite()`),
535
+ * which override values set here. The resolved value type stays `number`.
536
+ *
537
+ * @param constraints - Optional numeric constraints. `finite` defaults to
538
+ * `true`, so `Infinity` / `-Infinity` are rejected unless `finite: false`.
539
+ * @defaultValue `undefined` (finite-only, no bounds, non-integer allowed)
463
540
  * @returns A required number {@link ArgBuilder}.
464
541
  */
465
- number(): ArgBuilder<{
542
+ number(constraints?: NumberConstraints): ArgBuilder<{
466
543
  readonly valueType: number;
467
544
  readonly presence: 'required';
468
545
  readonly variadic: false;
546
+ readonly argKind: 'number';
469
547
  }>;
470
548
  /**
471
549
  * Enum-valued positional argument. Required by default.
@@ -494,6 +572,7 @@ interface ArgFactory {
494
572
  readonly valueType: T[number];
495
573
  readonly presence: 'required';
496
574
  readonly variadic: false;
575
+ readonly argKind: 'enum';
497
576
  }>;
498
577
  /**
499
578
  * Custom-parsed positional argument. Required by default.
@@ -524,6 +603,7 @@ interface ArgFactory {
524
603
  readonly valueType: T;
525
604
  readonly presence: 'required';
526
605
  readonly variadic: false;
606
+ readonly argKind: 'custom';
527
607
  }>;
528
608
  }
529
609
  /**