@kjanat/dreamcli 4.1.0 → 4.2.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.
Files changed (41) hide show
  1. package/dist/{adapter-YM5QGi3M.d.mts → adapter-DsmEc0WO.d.mts} +5 -1
  2. package/dist/{completion-CUMeOnAz.mjs → completion-BYhuYn2Q.mjs} +4 -4
  3. package/dist/completion.d.mts +1 -1
  4. package/dist/completion.mjs +1 -1
  5. package/dist/config-BgJZ-X4r.mjs +1 -0
  6. package/dist/config.d.mts +1 -1
  7. package/dist/config.mjs +1 -1
  8. package/dist/core-B4Twhd48.mjs +18 -0
  9. package/dist/index-B3_9MlHz.d.mts +131 -0
  10. package/dist/{index-BziI2aKc.d.mts → index-B6oD4_8b.d.mts} +74 -12
  11. package/dist/{index-DWsnGZlx.d.mts → index-B_1Dmsdq.d.mts} +12 -136
  12. package/dist/{index-3l8uj16E.d.mts → index-C5CYWtxn.d.mts} +9 -6
  13. package/dist/{index-Cap0MA2V.d.mts → index-CaRNJH2R.d.mts} +5 -1
  14. package/dist/{index-Cp9kt2t-.d.mts → index-Cj7kXwQH.d.mts} +1 -1
  15. package/dist/{index-BAj2y70U.d.mts → index-eF7SkQzQ.d.mts} +4 -4
  16. package/dist/index.d.mts +8 -7
  17. package/dist/index.mjs +1 -1
  18. package/dist/json-schema-DVyfq4bA.mjs +52 -0
  19. package/dist/json-schema.d.mts +1 -1
  20. package/dist/json-schema.mjs +1 -1
  21. package/dist/package-json-fYhxDdWD.mjs +3 -0
  22. package/dist/prompt.d.mts +36 -3
  23. package/dist/prompt.mjs +1 -1
  24. package/dist/runtime.d.mts +2 -2
  25. package/dist/runtime.mjs +1 -1
  26. package/dist/session-CQsnVijE.mjs +1 -0
  27. package/dist/terminal-cbye9mKF.mjs +7 -0
  28. package/dist/test-prompter-Ddkt9n5A.mjs +1 -0
  29. package/dist/testkit.d.mts +4 -4
  30. package/dist/testkit.mjs +1 -1
  31. package/dist/version.mjs +1 -1
  32. package/dreamcli.schema.json +15 -1
  33. package/package.json +20 -20
  34. package/skills/cli-creation/SKILL.md +1 -1
  35. package/skills/cli-creation/scripts/scaffold_cli.py +12 -4
  36. package/dist/config-CrlScpYX.mjs +0 -1
  37. package/dist/core-DvXUolc_.mjs +0 -17
  38. package/dist/json-schema-DRlrz_IV.mjs +0 -52
  39. package/dist/package-json-BgE9YjjQ.mjs +0 -3
  40. package/dist/terminal-C8KTXjv5.mjs +0 -6
  41. package/dist/test-prompter-v__jT2yG.mjs +0 -1
@@ -322,12 +322,13 @@ type NumberConstraintViolation = {
322
322
  * @module dreamcli/core/schema/prompt
323
323
  */
324
324
  /** All prompt kind discriminators as a runtime array. */
325
- declare const PROMPT_KINDS: readonly ["confirm", "input", "select", "multiselect"];
325
+ declare const PROMPT_KINDS: readonly ["confirm", "input", "password", "select", "multiselect"];
326
326
  /**
327
327
  * The kind of interactive prompt to present.
328
328
  *
329
329
  * - `'confirm'` — yes/no boolean question
330
330
  * - `'input'` — free-text string input
331
+ * - `'password'` — hidden text input, preserving whitespace
331
332
  * - `'select'` — single selection from a list
332
333
  * - `'multiselect'` — multiple selections from a list
333
334
  */
@@ -336,6 +337,8 @@ type PromptKind = (typeof PROMPT_KINDS)[number];
336
337
  interface PromptConfigBase {
337
338
  /** The question displayed to the user. */
338
339
  readonly message: string;
340
+ /** Suppress framework-controlled value hints and diagnostics. */
341
+ readonly sensitive?: boolean;
339
342
  }
340
343
  /** Yes/no confirmation prompt — maps to `boolean` flags. Part of {@link PromptConfig}. */
341
344
  interface ConfirmPromptConfig extends PromptConfigBase {
@@ -354,6 +357,10 @@ interface InputPromptConfig extends PromptConfigBase {
354
357
  readonly kind: 'input';
355
358
  /** Placeholder text shown before user types (informational only). */
356
359
  readonly placeholder?: string;
360
+ /** Trim surrounding whitespace. Defaults to `true` for compatibility. */
361
+ readonly trim?: boolean;
362
+ /** Empty submission policy. Defaults to `skip` (fall through to input defaults). */
363
+ readonly empty?: 'skip' | 'accept' | 'retry';
357
364
  /**
358
365
  * Value used when the user submits an empty line (presses Enter), shown in
359
366
  * the hint as `(default: <value>)`. When set, an empty submission resolves
@@ -367,7 +374,16 @@ interface InputPromptConfig extends PromptConfigBase {
367
374
  * Inline validation function. Return `true` if valid, or a string
368
375
  * error message if invalid. Called before coercion to flag kind.
369
376
  */
370
- readonly validate?: (value: string) => true | string;
377
+ readonly validate?: (value: string) => true | string | Promise<true | string>;
378
+ }
379
+ /** Hidden text entry. Whitespace is preserved and defaults are never displayed or accepted. */
380
+ interface PasswordPromptConfig extends PromptConfigBase {
381
+ /** Request terminal echo suppression; unsupported hosts must reject before reading. */
382
+ readonly kind: 'password';
383
+ /** Empty submission policy. Defaults to `retry`. */
384
+ readonly empty?: 'accept' | 'retry';
385
+ /** Validate the unchanged password; invalid answers may be corrected. */
386
+ readonly validate?: (value: string) => true | string | Promise<true | string>;
371
387
  }
372
388
  /** Single-selection prompt — maps to `enum` flags or any flag with {@link SelectChoice choices}. Part of {@link PromptConfig}. */
373
389
  interface SelectPromptConfig extends PromptConfigBase {
@@ -424,12 +440,12 @@ interface SelectChoice {
424
440
  * }
425
441
  * ```
426
442
  */
427
- type PromptConfig = ConfirmPromptConfig | InputPromptConfig | SelectPromptConfig | MultiselectPromptConfig;
443
+ type PromptConfig = ConfirmPromptConfig | InputPromptConfig | PasswordPromptConfig | SelectPromptConfig | MultiselectPromptConfig;
428
444
  /**
429
445
  * The raw result returned by a prompt engine for a single prompt.
430
446
  *
431
447
  * - `answered: true` — user provided a value
432
- * - `answered: false` — user cancelled/aborted (Ctrl+C, ESC, etc.)
448
+ * - `answered: false` — no answer; cancellation unless `reason: 'invalid'`
433
449
  *
434
450
  * Coercion to the flag's kind is the resolver's responsibility, not the
435
451
  * prompt engine's.
@@ -440,8 +456,10 @@ type PromptResult = {
440
456
  /** The raw value from the prompt engine (not yet coerced). */
441
457
  readonly value: unknown;
442
458
  } | {
443
- /** User cancelled or aborted (Ctrl+C, ESC, etc.). */
459
+ /** No answer was provided. */
444
460
  readonly answered: false;
461
+ /** Retry exhaustion; omitted for cancellation or EOF. */
462
+ readonly reason?: 'invalid';
445
463
  };
446
464
  //#endregion
447
465
  //#region src/core/schema/standard.d.ts
@@ -871,7 +889,7 @@ type InferFlags<T extends Record<string, FlagBuilder<FlagConfig>>> = { [K in key
871
889
  * - `'count'` / `'keyValue'` → `never` (not promptable)
872
890
  */
873
891
  type PromptConfigByFlagKind = {
874
- readonly string: InputPromptConfig | SelectPromptConfig;
892
+ readonly string: InputPromptConfig | PasswordPromptConfig | SelectPromptConfig;
875
893
  readonly number: InputPromptConfig;
876
894
  readonly boolean: ConfirmPromptConfig;
877
895
  readonly enum: SelectPromptConfig | InputPromptConfig;
@@ -2456,7 +2474,7 @@ type ArgDefaultValue<C extends ArgConfig> = C['argKind'] extends 'keyValue' ? C[
2456
2474
  * - `'keyValue'` → `never` (not promptable)
2457
2475
  */
2458
2476
  type PromptConfigByArgKind = {
2459
- readonly string: InputPromptConfig | SelectPromptConfig;
2477
+ readonly string: InputPromptConfig | PasswordPromptConfig | SelectPromptConfig;
2460
2478
  readonly number: InputPromptConfig;
2461
2479
  readonly boolean: ConfirmPromptConfig;
2462
2480
  readonly enum: SelectPromptConfig | InputPromptConfig;
@@ -3829,6 +3847,39 @@ declare const OUTPUT_VERBOSITY_LEVELS: readonly ["normal", "quiet"];
3829
3847
  /** Stable text verbosity labels. */
3830
3848
  type Verbosity = (typeof OUTPUT_VERBOSITY_LEVELS)[number];
3831
3849
  //#endregion
3850
+ //#region src/core/prompt/definitions.d.ts
3851
+ /** Infer an answer, preserving literal choice values. */
3852
+ type InferPrompt<C extends PromptConfig> = C extends ConfirmPromptConfig ? boolean : C extends {
3853
+ readonly kind: 'multiselect';
3854
+ readonly choices: readonly (infer Choice extends SelectChoice)[];
3855
+ } ? Choice['value'][] : C extends {
3856
+ readonly kind: 'select';
3857
+ readonly choices: readonly (infer Choice extends SelectChoice)[];
3858
+ } ? Choice['value'] : C extends MultiselectPromptConfig ? string[] : string;
3859
+ /** Standalone selections cannot inherit choices from a flag or argument schema. */
3860
+ type StandalonePromptConfig = InputPromptConfig | PasswordPromptConfig | ConfirmPromptConfig | ((SelectPromptConfig | MultiselectPromptConfig) & {
3861
+ readonly choices: readonly [SelectChoice, ...SelectChoice[]];
3862
+ });
3863
+ /** Ask one question with explicit, non-empty selection choices. Cancellation rejects with `PromptCancelledError`. */
3864
+ type Ask = <const C extends StandalonePromptConfig>(config: C) => Promise<InferPrompt<C>>;
3865
+ /** Build reusable definitions for schemas, handler-level `ask`, and standalone sessions. */
3866
+ declare const prompt: {
3867
+ /** Text input; empty answers retry unless an explicit policy/default is supplied. */
3868
+ input(options: Omit<InputPromptConfig, 'kind'>): InputPromptConfig;
3869
+ /** Hidden input, preserving all surrounding whitespace. */
3870
+ password(options: Omit<PasswordPromptConfig, 'kind'>): PasswordPromptConfig;
3871
+ /** Yes/no question. */
3872
+ confirm(options: Omit<ConfirmPromptConfig, 'kind'>): ConfirmPromptConfig;
3873
+ /** Select one typed string value. Standalone definitions require explicit choices. */
3874
+ select<const C extends Omit<SelectPromptConfig, 'kind'>>(options: C): C & {
3875
+ kind: 'select';
3876
+ };
3877
+ /** Select several typed string values. */
3878
+ multiselect<const C extends Omit<MultiselectPromptConfig, 'kind'>>(options: C): C & {
3879
+ kind: 'multiselect';
3880
+ };
3881
+ };
3882
+ //#endregion
3832
3883
  //#region src/core/schema/middleware.d.ts
3833
3884
  /**
3834
3885
  * Parameters received by a middleware function at runtime.
@@ -3854,6 +3905,8 @@ interface MiddlewareParams {
3854
3905
  readonly ctx: Readonly<Record<string, unknown>>;
3855
3906
  /** Output channel. */
3856
3907
  readonly out: Out;
3908
+ /** Invocation-scoped interactive questions. */
3909
+ readonly ask: Ask;
3857
3910
  /** CLI program metadata (name, bin, version, command). */
3858
3911
  readonly meta: CommandMeta;
3859
3912
  /**
@@ -3884,6 +3937,8 @@ type MiddlewareHandler<Output extends Record<string, unknown>> = (params: {
3884
3937
  readonly sources: ErasedInputSources;
3885
3938
  readonly ctx: Readonly<Record<string, unknown>>;
3886
3939
  readonly out: Out;
3940
+ /** Invocation-scoped interactive questions. */
3941
+ readonly ask: Ask;
3887
3942
  readonly meta: CommandMeta;
3888
3943
  /** Pass context additions downstream. Must include all `Output` properties. */
3889
3944
  readonly next: (additions: Output) => Promise<void>;
@@ -4367,6 +4422,8 @@ interface ActionParams<F extends Record<string, FlagBuilder<FlagConfig>>, A exte
4367
4422
  readonly ctx: Readonly<C>;
4368
4423
  /** Structured output channel for stdout, stderr, JSON, tables, and spinners. */
4369
4424
  readonly out: Out;
4425
+ /** Ask a typed question after selecting the operation or receiving a server challenge. */
4426
+ readonly ask: Ask;
4370
4427
  /** Runtime metadata about the CLI program and current command. */
4371
4428
  readonly meta: CommandMeta;
4372
4429
  }
@@ -4396,6 +4453,8 @@ type ErasedActionHandler = (params: {
4396
4453
  readonly sources: ErasedInputSources;
4397
4454
  readonly ctx: Readonly<Record<string, unknown>>;
4398
4455
  readonly out: Out;
4456
+ /** Ask a typed question after selecting the operation or receiving a server challenge. */
4457
+ readonly ask: Ask;
4399
4458
  readonly meta: CommandMeta;
4400
4459
  }) => void | Promise<void>;
4401
4460
  /**
@@ -4432,6 +4491,8 @@ type ErasedDeriveHandler = (params: {
4432
4491
  readonly sources: ErasedInputSources;
4433
4492
  readonly ctx: Readonly<Record<string, unknown>>;
4434
4493
  readonly out: Out;
4494
+ /** Ask a typed question after selecting the operation or receiving a server challenge. */
4495
+ readonly ask: Ask;
4435
4496
  readonly meta: CommandMeta;
4436
4497
  }) => undefined | Readonly<Record<string, unknown>> | Promise<undefined | Readonly<Record<string, unknown>>>;
4437
4498
  /**
@@ -5167,7 +5228,7 @@ declare function group(name: string): CommandBuilder;
5167
5228
  * The resolution chain populates choices from `FlagSchema.enumValues`
5168
5229
  * when the user's {@linkcode PromptConfig} omits them.
5169
5230
  */
5170
- interface ResolvedSelectPromptConfig {
5231
+ interface ResolvedSelectPromptConfig extends PromptConfigBase {
5171
5232
  /** Discriminant — single-choice selection prompt. */
5172
5233
  readonly kind: 'select';
5173
5234
  /** User-facing question text. */
@@ -5181,7 +5242,7 @@ interface ResolvedSelectPromptConfig {
5181
5242
  * Same guarantee as {@linkcode ResolvedSelectPromptConfig} — choices are always
5182
5243
  * present and non-empty.
5183
5244
  */
5184
- interface ResolvedMultiselectPromptConfig {
5245
+ interface ResolvedMultiselectPromptConfig extends PromptConfigBase {
5185
5246
  /** Discriminant — multiple-choice selection prompt. */
5186
5247
  readonly kind: 'multiselect';
5187
5248
  /** User-facing question text. */
@@ -5200,7 +5261,7 @@ interface ResolvedMultiselectPromptConfig {
5200
5261
  *
5201
5262
  * confirm and input configs pass through unchanged.
5202
5263
  */
5203
- type ResolvedPromptConfig = ConfirmPromptConfig | InputPromptConfig | ResolvedSelectPromptConfig | ResolvedMultiselectPromptConfig;
5264
+ type ResolvedPromptConfig = ConfirmPromptConfig | InputPromptConfig | PasswordPromptConfig | ResolvedSelectPromptConfig | ResolvedMultiselectPromptConfig;
5204
5265
  /**
5205
5266
  * Prompt engine interface.
5206
5267
  *
@@ -5228,7 +5289,8 @@ interface PromptEngine {
5228
5289
  *
5229
5290
  * @param config - The resolved prompt configuration (choices guaranteed
5230
5291
  * for select/multiselect).
5231
- * @returns The user's answer, or `{ answered: false }` if cancelled.
5292
+ * @returns The user's answer, `{ answered: false }` if cancelled, or
5293
+ * `{ answered: false, reason: 'invalid' }` when invalid attempts are exhausted.
5232
5294
  */
5233
5295
  promptOne(config: ResolvedPromptConfig): Promise<PromptResult>;
5234
5296
  }
@@ -5437,4 +5499,4 @@ interface CapturedOutput {
5437
5499
  */
5438
5500
  declare function createCaptureOutput(options?: Omit<OutputOptions, 'stdout' | 'stderr'>): [out: Out, captured: CapturedOutput];
5439
5501
  //#endregion
5440
- export { ArgParseFn as $, WithoutElementEligibility as $t, Out as A, PromptResult as An, DefaultValueOptions as At, MiddlewareHandler as B, ProgressHandle as Bn, FlagKind as Bt, ErasedActionHandler as C, StandardSchemaV1Types as Cn, SplitOptions as Ct, InteractiveParams as D, PromptConfig as Dn, BooleanFlagDefinition as Dt, ExecutionStep as E, MultiselectPromptConfig as En, ArrayFlagDefinition as Et, InputSources as F, HelpDescription as Fn, FlagDefinition as Ft, ArgConfig as G, TableFormat as Gn, InferFlag as Gt, middleware as H, SpinnerHandle as Hn, FlagParseFn as Ht, ResolutionProvenance as I, HelpTheme as In, FlagDefinitionBase as It, ArgDefinitionBase as J, schemaBrand as Jn, NumberFlagDefinition as Jt, ArgDefaultValue as K, TableOptions as Kn, InferFlags as Kt, SourcesOf as L, HelpThemeFactory as Ln, FlagDefinitionByKind as Lt, createCommandSchema as M, SelectPromptConfig as Mn, EnumFlagDefinition as Mt, group as N, NumberConstraintViolation as Nn, FlagBuilder as Nt, InteractiveResolver as O, PromptConfigBase as On, CountFlagDefinition as Ot, resolveExampleCommand as P, NumberConstraints as Pn, FlagConfig as Pt, ArgKind as Q, WithPresence as Qt, wasExplicit as R, ActivityEvent as Rn, FlagDefinitionOverrides as Rt, DeriveParams as S, StandardSchemaV1SuccessResult as Sn, SplitFormat as St, ExampleMeta as T, InputPromptConfig as Tn, SplitSetting as Tt, Verbosity as U, SpinnerOptions as Un, FlagPresence as Ut, MiddlewareParams as V, ProgressOptions as Vn, FlagNegation as Vt, ArgBuilder as W, TableColumn as Wn, FlagSchema as Wt, ArgDefinitionOverrides as X, StringElementConfig as Xt, ArgDefinitionByKind as Y, ResolvedValue as Yt, ArgFactory as Z, StringFlagDefinition as Zt, CommandDefinition as _, StandardSchemaV1Issue as _n, DUPLICATE_KEYS as _t, WriteFn as a, PathFlagOptions as an, InferArg as at, CommandSchema as b, StandardSchemaV1Props as bn, SourceSplitBinding as bt, ResolvedMultiselectPromptConfig as c, StringConstraints as cn, NumberArgDefinition as ct, resolvePromptConfig as d, StdinOptions as dn, StringArgElementConfig as dt, createFlagSchema as en, ArgPresence as et, ActionHandler as f, StdinWhen as fn, WithArgPresence as ft, CommandBuilder as g, StandardSchemaV1FailureResult as gn, createArgSchema as gt, CommandArgEntryDefinition as h, StandardSchemaV1 as hn, arg as ht, createOutput as i, PathChecks as in, EnumArgDefinition as it, command as j, SelectChoice as jn, DuplicatePolicy as jt, InteractiveResult as k, PromptKind as kn, CustomFlagDefinition as kt, ResolvedPromptConfig as l, StdinBinding as ln, ResolvedArgValue as lt, CommandArgEntry as m, InferStandardOutput as mn, WithoutArgElementEligibility as mt, OutputOptions as n, getFlagNegatedName as nn, BooleanArgDefinition as nt, PromptEngine as o, UrlFlagOptions as on, InferArgs as ot, ActionParams as p, InferStandardInput as pn, WithVariadic as pt, ArgDefinition as q, TableStream as qn, KeyValueFlagDefinition as qt, createCaptureOutput as r, DateFlagOptions as rn, CustomArgDefinition as rt, ReadFn as s, StringConstraintViolation as sn, KeyValueArgDefinition as st, CapturedOutput as t, flag as tn, ArgSchema as tt, ResolvedSelectPromptConfig as u, StdinConsume as un, StringArgDefinition as ut, CommandExample as v, StandardSchemaV1Options as vn, DuplicateKeys as vt, ExampleCommand as w, ConfirmPromptConfig as wn, SplitPolicy as wt, DeriveHandler as x, StandardSchemaV1Result as xn, SplitBinding as xt, CommandMeta as y, StandardSchemaV1PathSegment as yn, SPLIT_FORMATS as yt, Middleware as z, Fallback as zn, FlagFactory as zt };
5502
+ export { ArgDefinitionOverrides as $, StringElementConfig as $t, Out as A, PasswordPromptConfig as An, BooleanFlagDefinition as At, MiddlewareHandler as B, HelpTheme as Bn, FlagDefinitionByKind as Bt, ErasedActionHandler as C, StandardSchemaV1Props as Cn, SourceSplitBinding as Ct, InteractiveParams as D, ConfirmPromptConfig as Dn, SplitPolicy as Dt, ExecutionStep as E, StandardSchemaV1Types as En, SplitOptions as Et, InputSources as F, SelectChoice as Fn, EnumFlagDefinition as Ft, prompt as G, ProgressOptions as Gn, FlagParseFn as Gt, middleware as H, ActivityEvent as Hn, FlagFactory as Ht, ResolutionProvenance as I, SelectPromptConfig as In, FlagBuilder as It, ArgConfig as J, TableColumn as Jn, InferFlag as Jt, Verbosity as K, SpinnerHandle as Kn, FlagPresence as Kt, SourcesOf as L, NumberConstraintViolation as Ln, FlagConfig as Lt, createCommandSchema as M, PromptConfigBase as Mn, CustomFlagDefinition as Mt, group as N, PromptKind as Nn, DefaultValueOptions as Nt, InteractiveResolver as O, InputPromptConfig as On, SplitSetting as Ot, resolveExampleCommand as P, PromptResult as Pn, DuplicatePolicy as Pt, ArgDefinitionByKind as Q, schemaBrand as Qn, ResolvedValue as Qt, wasExplicit as R, NumberConstraints as Rn, FlagDefinition as Rt, DeriveParams as S, StandardSchemaV1PathSegment as Sn, SPLIT_FORMATS as St, ExampleMeta as T, StandardSchemaV1SuccessResult as Tn, SplitFormat as Tt, Ask as U, Fallback as Un, FlagKind as Ut, MiddlewareParams as V, HelpThemeFactory as Vn, FlagDefinitionOverrides as Vt, InferPrompt as W, ProgressHandle as Wn, FlagNegation as Wt, ArgDefinition as X, TableOptions as Xn, KeyValueFlagDefinition as Xt, ArgDefaultValue as Y, TableFormat as Yn, InferFlags as Yt, ArgDefinitionBase as Z, TableStream as Zn, NumberFlagDefinition as Zt, CommandDefinition as _, InferStandardOutput as _n, WithoutArgElementEligibility as _t, WriteFn as a, getFlagNegatedName as an, BooleanArgDefinition as at, CommandSchema as b, StandardSchemaV1Issue as bn, DUPLICATE_KEYS as bt, ResolvedMultiselectPromptConfig as c, PathFlagOptions as cn, InferArg as ct, resolvePromptConfig as d, StringConstraints as dn, NumberArgDefinition as dt, StringFlagDefinition as en, ArgFactory as et, ActionHandler as f, StdinBinding as fn, ResolvedArgValue as ft, CommandBuilder as g, InferStandardInput as gn, WithVariadic as gt, CommandArgEntryDefinition as h, StdinWhen as hn, WithArgPresence as ht, createOutput as i, flag as in, ArgSchema as it, command as j, PromptConfig as jn, CountFlagDefinition as jt, InteractiveResult as k, MultiselectPromptConfig as kn, ArrayFlagDefinition as kt, ResolvedPromptConfig as l, UrlFlagOptions as ln, InferArgs as lt, CommandArgEntry as m, StdinOptions as mn, StringArgElementConfig as mt, OutputOptions as n, WithoutElementEligibility as nn, ArgParseFn as nt, PromptEngine as o, DateFlagOptions as on, CustomArgDefinition as ot, ActionParams as p, StdinConsume as pn, StringArgDefinition as pt, ArgBuilder as q, SpinnerOptions as qn, FlagSchema as qt, createCaptureOutput as r, createFlagSchema as rn, ArgPresence as rt, ReadFn as s, PathChecks as sn, EnumArgDefinition as st, CapturedOutput as t, WithPresence as tn, ArgKind as tt, ResolvedSelectPromptConfig as u, StringConstraintViolation as un, KeyValueArgDefinition as ut, CommandExample as v, StandardSchemaV1 as vn, arg as vt, ExampleCommand as w, StandardSchemaV1Result as wn, SplitBinding as wt, DeriveHandler as x, StandardSchemaV1Options as xn, DuplicateKeys as xt, CommandMeta as y, StandardSchemaV1FailureResult as yn, createArgSchema as yt, Middleware as z, HelpDescription as zn, FlagDefinitionBase as zt };
@@ -1,4 +1,5 @@
1
- import { A as Out, I as ResolutionProvenance, Jn as schemaBrand, Ln as HelpThemeFactory, Rn as ActivityEvent, U as Verbosity, b as CommandSchema, o as PromptEngine, y as CommandMeta } from "./index-BziI2aKc.mjs";
1
+ import { A as Out, Hn as ActivityEvent, I as ResolutionProvenance, K as Verbosity, Qn as schemaBrand, Vn as HelpThemeFactory, b as CommandSchema, o as PromptEngine, y as CommandMeta } from "./index-B6oD4_8b.mjs";
2
+ import { t as CLIError } from "./index-B3_9MlHz.mjs";
2
3
  import { Colors } from "ansispeck";
3
4
  //#region src/core/cli/builtins.d.ts
4
5
  /** A built-in flag a consumer can take over. */
@@ -45,136 +46,6 @@ interface Builtins {
45
46
  readonly quiet: BuiltinMode;
46
47
  }
47
48
  //#endregion
48
- //#region src/core/errors/index.d.ts
49
- /**
50
- * Structured error types for DreamCLI.
51
- *
52
- * Base {@linkcode CLIError} carries stable code, exit code, suggestion, and structured
53
- * details. {@linkcode ParseError} and {@linkcode ValidationError} derive from it with
54
- * category-appropriate defaults.
55
- *
56
- * @module dreamcli/core/errors
57
- */
58
- /** Codes emitted during argv parsing. */
59
- type ParseErrorCode = 'UNKNOWN_FLAG' | 'UNKNOWN_COMMAND' | 'MISSING_VALUE' | 'INVALID_VALUE' | 'INVALID_SCHEMA' | 'DUPLICATE_FLAG' | 'UNEXPECTED_POSITIONAL';
60
- /** Codes emitted during post-parse validation / resolution. */
61
- type ValidationErrorCode = 'REQUIRED_FLAG' | 'REQUIRED_ARG' | 'MISSING_STDIN' | 'INVALID_ENUM' | 'TYPE_MISMATCH' | 'CONSTRAINT_VIOLATED';
62
- /** Any framework error code (extensible via `string & {}`). */
63
- type ErrorCode = ParseErrorCode | ValidationErrorCode | (string & {});
64
- /** Options accepted by the `CLIError` constructor. */
65
- interface CLIErrorOptions {
66
- /** Stable machine-readable identifier (e.g. `"UNKNOWN_FLAG"`). */
67
- readonly code: ErrorCode;
68
- /**
69
- * Process exit code.
70
- * @defaultValue `1`
71
- */
72
- readonly exitCode?: number;
73
- /** One-liner actionable hint shown to the user. */
74
- readonly suggest?: string;
75
- /** Arbitrary structured payload (serialised in `--json` mode). */
76
- readonly details?: Readonly<Record<string, unknown>>;
77
- /** Original error, if this wraps another. */
78
- readonly cause?: unknown;
79
- }
80
- /**
81
- * Base structured error for DreamCLI.
82
- *
83
- * Every error surfaced by the framework extends this class, ensuring a
84
- * consistent shape for rendering (TTY pretty-print, `--json`, test assertions).
85
- */
86
- declare class CLIError extends Error {
87
- /** Error class name, always `'CLIError'` for the base class. @override */
88
- readonly name: string;
89
- /** Stable machine-readable identifier. */
90
- readonly code: ErrorCode;
91
- /** Process exit code (defaults to `1`). */
92
- readonly exitCode: number;
93
- /** One-liner actionable hint. */
94
- readonly suggest: string | undefined;
95
- /** Structured payload for machine output. */
96
- readonly details: Readonly<Record<string, unknown>> | undefined;
97
- /** Create a structured CLI error from a human message and machine-readable options. */
98
- constructor(message: string, options: CLIErrorOptions);
99
- /**
100
- * Serialise to a plain object suitable for JSON output.
101
- *
102
- * `details` is projected onto JSON-representable values: bigints become
103
- * decimal digits and entries JSON cannot carry are omitted. The error
104
- * object itself keeps the runtime values.
105
- *
106
- * @sealed
107
- */
108
- toJSON(): CLIErrorJSON;
109
- }
110
- /** Shape returned by {@linkcode CLIError}.toJSON(). */
111
- interface CLIErrorJSON {
112
- /** Error class name (e.g. `'CLIError'`, `'ParseError'`). */
113
- readonly name: string;
114
- /** Stable machine-readable identifier for programmatic matching. */
115
- readonly code: ErrorCode;
116
- /** Human-readable description of what went wrong. */
117
- readonly message: string;
118
- /** Process exit code associated with this error. */
119
- readonly exitCode: number;
120
- /** Actionable hint shown to the user, when available. */
121
- readonly suggest?: string;
122
- /** Structured payload for machine consumers, when available. */
123
- readonly details?: Readonly<Record<string, unknown>>;
124
- }
125
- /** Options for {@linkcode ParseError}. Code is narrowed to parse-specific codes. */
126
- interface ParseErrorOptions extends Omit<CLIErrorOptions, 'code' | 'exitCode'> {
127
- /** Parse-category error code (e.g. `'UNKNOWN_FLAG'`, `'MISSING_VALUE'`). */
128
- readonly code: ParseErrorCode;
129
- /**
130
- * Process exit code for parse failures.
131
- * @defaultValue `2`
132
- */
133
- readonly exitCode?: number;
134
- }
135
- /**
136
- * Error thrown when argv tokenization / parsing fails.
137
- *
138
- * Exit code defaults to `2` (standard for CLI usage errors).
139
- */
140
- declare class ParseError extends CLIError {
141
- /** Always `'ParseError'`. @override */
142
- readonly name: "ParseError";
143
- /** Narrowed to parse-category codes. */
144
- readonly code: ParseErrorCode;
145
- /** Create a parse error with exit code defaulting to `2`. */
146
- constructor(message: string, options: ParseErrorOptions);
147
- }
148
- /** Options for {@linkcode ValidationError}. Code is narrowed to validation-specific codes. */
149
- interface ValidationErrorOptions extends Omit<CLIErrorOptions, 'code' | 'exitCode'> {
150
- /** Validation-category error code (e.g. `'REQUIRED_FLAG'`, `'INVALID_ENUM'`). */
151
- readonly code: ValidationErrorCode;
152
- /**
153
- * Process exit code for validation failures.
154
- * @defaultValue `2`
155
- */
156
- readonly exitCode?: number;
157
- }
158
- /**
159
- * Error thrown when resolved values fail validation constraints.
160
- *
161
- * Exit code defaults to `2` (standard for CLI usage errors).
162
- */
163
- declare class ValidationError extends CLIError {
164
- /** Always `'ValidationError'`. @override */
165
- readonly name: "ValidationError";
166
- /** Narrowed to validation-category codes. */
167
- readonly code: ValidationErrorCode;
168
- /** Create a validation error with exit code defaulting to `2`. */
169
- constructor(message: string, options: ValidationErrorOptions);
170
- }
171
- /** Narrows an unknown value to `CLIError`. */
172
- declare function isCLIError(value: unknown): value is CLIError;
173
- /** Narrows an unknown value to `ParseError`. */
174
- declare function isParseError(value: unknown): value is ParseError;
175
- /** Narrows an unknown value to `ValidationError`. */
176
- declare function isValidationError(value: unknown): value is ValidationError;
177
- //#endregion
178
49
  //#region src/core/parse/index.d.ts
179
50
  /**
180
51
  * Token discriminated union.
@@ -616,10 +487,10 @@ declare const PROMPT_CANCEL: unique symbol;
616
487
  /**
617
488
  * A queued answer consumed by {@link createTestPrompter}.
618
489
  *
619
- * The test prompter returns these values exactly as provided; it does not
620
- * coerce them. The one exception mirrors the terminal prompter: a string answer
621
- * to an `input` prompt is run through the prompt's `validate` function, and a
622
- * failing answer is rejected as a cancellation (see {@link createTestPrompter}).
490
+ * The test prompter leaves malformed non-string values intact for resolver
491
+ * error tests. Text answers use the same whitespace, empty-answer, default,
492
+ * and validation policy as the terminal prompter. Passwords retry invalid
493
+ * answers; ordinary input retains its cancellation fallback (see {@link createTestPrompter}).
623
494
  * The normal resolution pipeline performs any later type coercion, so tests can
624
495
  * supply values in the same shapes real prompts would yield:
625
496
  *
@@ -658,6 +529,11 @@ interface TestPrompterOptions {
658
529
  * is rejected as a cancellation (`{ answered: false }`) — mirroring the terminal
659
530
  * prompter exhausting its retries — so prompt validation is integration-testable
660
531
  * via {@linkcode runCommand} rather than silently accepted as the resolved value.
532
+ * Password prompts instead consume further queued answers on validation failure,
533
+ * and reject with `PROMPT_INVALID` after ten invalid attempts. Input prompts
534
+ * also retry empty answers when `empty: 'retry'`; ordinary validator failures
535
+ * retain their cancellation fallback. `PROMPT_CANCEL`
536
+ * remains a distinct user cancellation.
661
537
  *
662
538
  * @param answers - Ordered queue of answers. Use `PROMPT_CANCEL` for
663
539
  * cancellation.
@@ -828,4 +704,4 @@ interface RunResult {
828
704
  readonly error: CLIError | undefined;
829
705
  }
830
706
  //#endregion
831
- export { ErrorCode as A, BuiltinMode as B, includesBeforeSeparator as C, CLIError as D, tokenize as E, ValidationErrorCode as F, Builtins as H, ValidationErrorOptions as I, isCLIError as L, ParseErrorCode as M, ParseErrorOptions as N, CLIErrorJSON as O, ValidationError as P, isParseError as R, Token as S, stripBeforeSeparator as T, BuiltinsConfig as U, BuiltinName as V, ResolutionProvenanceRecord as _, TestPrompterOptions as a, ParseOptions as b, formatHelp as c, CLIPluginHooks as d, PluginCommandContext as f, DeprecationWarning as g, resolve as h, TestAnswer as i, ParseError as j, CLIErrorOptions as k, BeforeParseParams as l, plugin as m, RunResult as n, createTestPrompter as o, ResolvedCommandParams as p, PROMPT_CANCEL as r, HelpOptions as s, RunOptions as t, CLIPlugin as u, ResolveOptions as v, parse as w, ParseResult as x, ResolveResult as y, isValidationError as z };
707
+ export { BuiltinsConfig as A, includesBeforeSeparator as C, BuiltinMode as D, tokenize as E, BuiltinName as O, Token as S, stripBeforeSeparator as T, ResolutionProvenanceRecord as _, TestPrompterOptions as a, ParseOptions as b, formatHelp as c, CLIPluginHooks as d, PluginCommandContext as f, DeprecationWarning as g, resolve as h, TestAnswer as i, Builtins as k, BeforeParseParams as l, plugin as m, RunResult as n, createTestPrompter as o, ResolvedCommandParams as p, PROMPT_CANCEL as r, HelpOptions as s, RunOptions as t, CLIPlugin as u, ResolveOptions as v, parse as w, ParseResult as x, ResolveResult as y };
@@ -1,6 +1,6 @@
1
- import { Bt as FlagKind, Pn as NumberConstraints, Q as ArgKind, T as ExampleMeta, Ut as FlagPresence, b as CommandSchema, et as ArgPresence, jt as DuplicatePolicy, kn as PromptKind, vt as DuplicateKeys } from "./index-BziI2aKc.mjs";
2
- import "./index-DWsnGZlx.mjs";
3
- import { o as CLISchema } from "./index-BAj2y70U.mjs";
1
+ import { Kt as FlagPresence, Nn as PromptKind, Pt as DuplicatePolicy, Rn as NumberConstraints, T as ExampleMeta, Ut as FlagKind, b as CommandSchema, rt as ArgPresence, tt as ArgKind, xt as DuplicateKeys } from "./index-B6oD4_8b.mjs";
2
+ import "./index-B_1Dmsdq.mjs";
3
+ import { o as CLISchema } from "./index-eF7SkQzQ.mjs";
4
4
  //#region src/core/json-schema/constants.d.ts
5
5
  /**
6
6
  * Identifiers of the definition document format.
@@ -78,14 +78,17 @@ type PromptChoiceFragmentV1 = {
78
78
  * Validation callbacks are dropped. Only the serializable description of the
79
79
  * prompt survives.
80
80
  */
81
- type PromptDefinitionFragmentV1 = {
82
- readonly kind: PromptKind;
81
+ type PromptDefinitionFragmentV1 = { [K in PromptKind]: {
82
+ readonly kind: K;
83
83
  readonly message: string;
84
84
  readonly placeholder?: string;
85
+ readonly trim?: boolean;
86
+ readonly empty?: K extends 'password' ? 'accept' | 'retry' : 'skip' | 'accept' | 'retry';
87
+ readonly sensitive?: boolean;
85
88
  readonly choices?: readonly PromptChoiceFragmentV1[];
86
89
  readonly min?: number;
87
90
  readonly max?: number;
88
- };
91
+ }; }[PromptKind];
89
92
  /**
90
93
  * Stdin binding of a flag or arg fragment.
91
94
  *
@@ -1,4 +1,4 @@
1
- import { n as RuntimeAdapter } from "./adapter-YM5QGi3M.mjs";
1
+ import { n as RuntimeAdapter } from "./adapter-DsmEc0WO.mjs";
2
2
  //#region src/runtime/detect.d.ts
3
3
  /**
4
4
  * Auto-detects the current JavaScript runtime environment.
@@ -160,6 +160,8 @@ interface DenoNamespace {
160
160
  };
161
161
  /** Standard input — TTY detection and readable byte stream. */
162
162
  readonly stdin: {
163
+ /** Toggle raw terminal input; disabling restores the saved terminal configuration. */
164
+ setRaw?(mode: boolean): void;
163
165
  /** Whether stdin is connected to a TTY. */
164
166
  isTerminal(): boolean;
165
167
  /** Readable stream for stdin bytes. */
@@ -228,6 +230,8 @@ interface NodeProcess {
228
230
  /** Standard input stream with TTY detection and async iteration. */
229
231
  readonly stdin: {
230
232
  readonly isTTY?: boolean;
233
+ readonly isRaw?: boolean;
234
+ setRawMode?(mode: boolean): unknown;
231
235
  /** Async iterable for reading all of stdin (used by readStdin). */
232
236
  [Symbol.asyncIterator](): AsyncIterator<Uint8Array>;
233
237
  };
@@ -1,4 +1,4 @@
1
- import { n as RuntimeAdapter } from "./adapter-YM5QGi3M.mjs";
1
+ import { n as RuntimeAdapter } from "./adapter-DsmEc0WO.mjs";
2
2
  //#region src/core/config/package-json.d.ts
3
3
  /**
4
4
  * Object form of a manifest's `repository` field
@@ -1,7 +1,7 @@
1
- import { C as ErasedActionHandler, E as ExecutionStep, G as ArgConfig, Jn as schemaBrand, Ln as HelpThemeFactory, Nt as FlagBuilder, Pt as FlagConfig, U as Verbosity, W as ArgBuilder, _ as CommandDefinition, b as CommandSchema, g as CommandBuilder } from "./index-BziI2aKc.mjs";
2
- import { H as Builtins, U as BuiltinsConfig, b as ParseOptions, n as RunResult, t as RunOptions, u as CLIPlugin } from "./index-DWsnGZlx.mjs";
3
- import { n as RuntimeAdapter } from "./adapter-YM5QGi3M.mjs";
4
- import { h as PackageJsonData, s as FormatLoader } from "./index-Cp9kt2t-.mjs";
1
+ import { C as ErasedActionHandler, E as ExecutionStep, It as FlagBuilder, J as ArgConfig, K as Verbosity, Lt as FlagConfig, Qn as schemaBrand, Vn as HelpThemeFactory, _ as CommandDefinition, b as CommandSchema, g as CommandBuilder, q as ArgBuilder } from "./index-B6oD4_8b.mjs";
2
+ import { A as BuiltinsConfig, b as ParseOptions, k as Builtins, n as RunResult, t as RunOptions, u as CLIPlugin } from "./index-B_1Dmsdq.mjs";
3
+ import { n as RuntimeAdapter } from "./adapter-DsmEc0WO.mjs";
4
+ import { h as PackageJsonData, s as FormatLoader } from "./index-Cj7kXwQH.mjs";
5
5
  import { Colors } from "ansispeck";
6
6
  //#region src/core/completion/shells/shared.d.ts
7
7
  /**
package/dist/index.d.mts CHANGED
@@ -1,9 +1,10 @@
1
- import { $ as ArgParseFn, $t as WithoutElementEligibility, A as Out, An as PromptResult, At as DefaultValueOptions, B as MiddlewareHandler, Bn as ProgressHandle, Bt as FlagKind, Cn as StandardSchemaV1Types, Ct as SplitOptions, D as InteractiveParams, Dn as PromptConfig, Dt as BooleanFlagDefinition, En as MultiselectPromptConfig, Et as ArrayFlagDefinition, F as InputSources, Fn as HelpDescription, Ft as FlagDefinition, G as ArgConfig, Gn as TableFormat, Gt as InferFlag, H as middleware, Hn as SpinnerHandle, Ht as FlagParseFn, I as ResolutionProvenance, In as HelpTheme, It as FlagDefinitionBase, J as ArgDefinitionBase, Jt as NumberFlagDefinition, K as ArgDefaultValue, Kn as TableOptions, Kt as InferFlags, L as SourcesOf, Ln as HelpThemeFactory, Lt as FlagDefinitionByKind, M as createCommandSchema, Mn as SelectPromptConfig, Mt as EnumFlagDefinition, N as group, Nn as NumberConstraintViolation, Nt as FlagBuilder, O as InteractiveResolver, On as PromptConfigBase, Ot as CountFlagDefinition, P as resolveExampleCommand, Pn as NumberConstraints, Pt as FlagConfig, Q as ArgKind, Qt as WithPresence, R as wasExplicit, Rn as ActivityEvent, Rt as FlagDefinitionOverrides, S as DeriveParams, Sn as StandardSchemaV1SuccessResult, St as SplitFormat, T as ExampleMeta, Tn as InputPromptConfig, Tt as SplitSetting, U as Verbosity, Un as SpinnerOptions, Ut as FlagPresence, V as MiddlewareParams, Vn as ProgressOptions, Vt as FlagNegation, W as ArgBuilder, Wn as TableColumn, Wt as FlagSchema, X as ArgDefinitionOverrides, Xt as StringElementConfig, Y as ArgDefinitionByKind, Yt as ResolvedValue, Z as ArgFactory, Zt as StringFlagDefinition, _ as CommandDefinition, _n as StandardSchemaV1Issue, _t as DUPLICATE_KEYS, a as WriteFn, an as PathFlagOptions, at as InferArg, b as CommandSchema, bn as StandardSchemaV1Props, bt as SourceSplitBinding, c as ResolvedMultiselectPromptConfig, cn as StringConstraints, ct as NumberArgDefinition, d as resolvePromptConfig, dn as StdinOptions, dt as StringArgElementConfig, en as createFlagSchema, et as ArgPresence, f as ActionHandler, fn as StdinWhen, ft as WithArgPresence, g as CommandBuilder, gn as StandardSchemaV1FailureResult, gt as createArgSchema, h as CommandArgEntryDefinition, hn as StandardSchemaV1, ht as arg, i as createOutput, in as PathChecks, it as EnumArgDefinition, j as command, jn as SelectChoice, jt as DuplicatePolicy, k as InteractiveResult, kn as PromptKind, kt as CustomFlagDefinition, l as ResolvedPromptConfig, ln as StdinBinding, lt as ResolvedArgValue, m as CommandArgEntry, mn as InferStandardOutput, mt as WithoutArgElementEligibility, n as OutputOptions, nn as getFlagNegatedName, nt as BooleanArgDefinition, o as PromptEngine, on as UrlFlagOptions, ot as InferArgs, p as ActionParams, pn as InferStandardInput, pt as WithVariadic, q as ArgDefinition, qn as TableStream, qt as KeyValueFlagDefinition, rn as DateFlagOptions, rt as CustomArgDefinition, s as ReadFn, sn as StringConstraintViolation, st as KeyValueArgDefinition, tn as flag, tt as ArgSchema, u as ResolvedSelectPromptConfig, un as StdinConsume, ut as StringArgDefinition, v as CommandExample, vn as StandardSchemaV1Options, vt as DuplicateKeys, w as ExampleCommand, wn as ConfirmPromptConfig, wt as SplitPolicy, x as DeriveHandler, xn as StandardSchemaV1Result, xt as SplitBinding, y as CommandMeta, yn as StandardSchemaV1PathSegment, yt as SPLIT_FORMATS, z as Middleware, zn as Fallback, zt as FlagFactory } from "./index-BziI2aKc.mjs";
2
- import { A as ErrorCode, B as BuiltinMode, C as includesBeforeSeparator, D as CLIError, E as tokenize, F as ValidationErrorCode, H as Builtins, I as ValidationErrorOptions, L as isCLIError, M as ParseErrorCode, N as ParseErrorOptions, O as CLIErrorJSON, P as ValidationError, R as isParseError, S as Token, T as stripBeforeSeparator, U as BuiltinsConfig, V as BuiltinName, _ as ResolutionProvenanceRecord, b as ParseOptions, c as formatHelp, d as CLIPluginHooks, f as PluginCommandContext, g as DeprecationWarning, h as resolve, j as ParseError, k as CLIErrorOptions, l as BeforeParseParams, m as plugin, n as RunResult, p as ResolvedCommandParams, s as HelpOptions, u as CLIPlugin, v as ResolveOptions, w as parse, x as ParseResult, y as ResolveResult, z as isValidationError } from "./index-DWsnGZlx.mjs";
3
- import { C as SHELLS, S as HelpLinks, T as CompletionOptions, _ as ResolvedManifestSettings, a as CLIRunOptions, b as isMainModule, c as CompletionsFlagConfig, d as DefaultCommandOptions, f as HelpConfig, g as RenderContextOptions, h as RenderContext, i as CLIOptions, l as ConfigSettings, m as ManifestSettings, n as CLIDefinition, o as CLISchema, p as InferNameOption, r as CLIExecuteOptions, s as CompletionRegistrationOptions, t as CLIBuilder, u as ConfigSettingsDefinition, v as cli, w as Shell, x as resolveRenderContext, y as createCLISchema } from "./index-BAj2y70U.mjs";
4
- import { n as RuntimeAdapter } from "./adapter-YM5QGi3M.mjs";
5
- import { a as ConfigNotFound, d as PackageRepositoryUrlOptions, g as PackageRepository, h as PackageJsonData, i as ConfigFound, m as PackageJsonAdapter, n as ConfigDiscoveryOptions, o as ConfigSearchPathOptions, p as ManifestDiscoveryOptions, r as ConfigDiscoveryResult, s as FormatLoader, t as ConfigAdapter } from "./index-Cp9kt2t-.mjs";
6
- import { D as DEFINITION_SCHEMA_URL, O as DEFINITION_SCHEMA_VERSION, S as StdinBindingFragmentV1, _ as JsonSchemaOptions, a as CommandDefinitionFragmentV1, b as SourceSplitFragmentV1, c as ExampleDefinitionFragmentV1, d as FlagNegationFragmentV1, f as FlagPathChecksFragmentV1, g as InputSchemaProperty, h as InputSchemaDocument, i as CommandDefinitionDocumentV1, l as FlagDefinitionFragmentV1, m as InputSchemaBranch, n as ArgElementFragmentV1, o as DefinitionDocument, p as FlagStringConstraintsFragmentV1, r as CommandDefinitionDocument, s as DefinitionDocumentV1, t as ArgDefinitionFragmentV1, u as FlagElementFragmentV1, v as PromptChoiceFragmentV1, x as SplitPolicyFragmentV1, y as PromptDefinitionFragmentV1 } from "./index-3l8uj16E.mjs";
1
+ import { $ as ArgDefinitionOverrides, $t as StringElementConfig, A as Out, An as PasswordPromptConfig, At as BooleanFlagDefinition, B as MiddlewareHandler, Bn as HelpTheme, Bt as FlagDefinitionByKind, Cn as StandardSchemaV1Props, Ct as SourceSplitBinding, D as InteractiveParams, Dn as ConfirmPromptConfig, Dt as SplitPolicy, En as StandardSchemaV1Types, Et as SplitOptions, F as InputSources, Fn as SelectChoice, Ft as EnumFlagDefinition, Gn as ProgressOptions, Gt as FlagParseFn, H as middleware, Hn as ActivityEvent, Ht as FlagFactory, I as ResolutionProvenance, In as SelectPromptConfig, It as FlagBuilder, J as ArgConfig, Jn as TableColumn, Jt as InferFlag, K as Verbosity, Kn as SpinnerHandle, Kt as FlagPresence, L as SourcesOf, Ln as NumberConstraintViolation, Lt as FlagConfig, M as createCommandSchema, Mn as PromptConfigBase, Mt as CustomFlagDefinition, N as group, Nn as PromptKind, Nt as DefaultValueOptions, O as InteractiveResolver, On as InputPromptConfig, Ot as SplitSetting, P as resolveExampleCommand, Pn as PromptResult, Pt as DuplicatePolicy, Q as ArgDefinitionByKind, Qt as ResolvedValue, R as wasExplicit, Rn as NumberConstraints, Rt as FlagDefinition, S as DeriveParams, Sn as StandardSchemaV1PathSegment, St as SPLIT_FORMATS, T as ExampleMeta, Tn as StandardSchemaV1SuccessResult, Tt as SplitFormat, U as Ask, Un as Fallback, Ut as FlagKind, V as MiddlewareParams, Vn as HelpThemeFactory, Vt as FlagDefinitionOverrides, W as InferPrompt, Wn as ProgressHandle, Wt as FlagNegation, X as ArgDefinition, Xn as TableOptions, Xt as KeyValueFlagDefinition, Y as ArgDefaultValue, Yn as TableFormat, Yt as InferFlags, Z as ArgDefinitionBase, Zn as TableStream, Zt as NumberFlagDefinition, _ as CommandDefinition, _n as InferStandardOutput, _t as WithoutArgElementEligibility, a as WriteFn, an as getFlagNegatedName, at as BooleanArgDefinition, b as CommandSchema, bn as StandardSchemaV1Issue, bt as DUPLICATE_KEYS, c as ResolvedMultiselectPromptConfig, cn as PathFlagOptions, ct as InferArg, d as resolvePromptConfig, dn as StringConstraints, dt as NumberArgDefinition, en as StringFlagDefinition, et as ArgFactory, f as ActionHandler, fn as StdinBinding, ft as ResolvedArgValue, g as CommandBuilder, gn as InferStandardInput, gt as WithVariadic, h as CommandArgEntryDefinition, hn as StdinWhen, ht as WithArgPresence, i as createOutput, in as flag, it as ArgSchema, j as command, jn as PromptConfig, jt as CountFlagDefinition, k as InteractiveResult, kn as MultiselectPromptConfig, kt as ArrayFlagDefinition, l as ResolvedPromptConfig, ln as UrlFlagOptions, lt as InferArgs, m as CommandArgEntry, mn as StdinOptions, mt as StringArgElementConfig, n as OutputOptions, nn as WithoutElementEligibility, nt as ArgParseFn, o as PromptEngine, on as DateFlagOptions, ot as CustomArgDefinition, p as ActionParams, pn as StdinConsume, pt as StringArgDefinition, q as ArgBuilder, qn as SpinnerOptions, qt as FlagSchema, rn as createFlagSchema, rt as ArgPresence, s as ReadFn, sn as PathChecks, st as EnumArgDefinition, tn as WithPresence, tt as ArgKind, u as ResolvedSelectPromptConfig, un as StringConstraintViolation, ut as KeyValueArgDefinition, v as CommandExample, vn as StandardSchemaV1, vt as arg, w as ExampleCommand, wn as StandardSchemaV1Result, wt as SplitBinding, x as DeriveHandler, xn as StandardSchemaV1Options, xt as DuplicateKeys, y as CommandMeta, yn as StandardSchemaV1FailureResult, yt as createArgSchema, z as Middleware, zn as HelpDescription, zt as FlagDefinitionBase } from "./index-B6oD4_8b.mjs";
2
+ import { A as BuiltinsConfig, C as includesBeforeSeparator, D as BuiltinMode, E as tokenize, O as BuiltinName, S as Token, T as stripBeforeSeparator, _ as ResolutionProvenanceRecord, b as ParseOptions, c as formatHelp, d as CLIPluginHooks, f as PluginCommandContext, g as DeprecationWarning, h as resolve, k as Builtins, l as BeforeParseParams, m as plugin, n as RunResult, p as ResolvedCommandParams, s as HelpOptions, u as CLIPlugin, v as ResolveOptions, w as parse, x as ParseResult, y as ResolveResult } from "./index-B_1Dmsdq.mjs";
3
+ import { a as ParseError, c as ValidationError, d as isCLIError, f as isParseError, i as ErrorCode, l as ValidationErrorCode, n as CLIErrorJSON, o as ParseErrorCode, p as isValidationError, r as CLIErrorOptions, s as ParseErrorOptions, t as CLIError, u as ValidationErrorOptions } from "./index-B3_9MlHz.mjs";
4
+ import { C as SHELLS, S as HelpLinks, T as CompletionOptions, _ as ResolvedManifestSettings, a as CLIRunOptions, b as isMainModule, c as CompletionsFlagConfig, d as DefaultCommandOptions, f as HelpConfig, g as RenderContextOptions, h as RenderContext, i as CLIOptions, l as ConfigSettings, m as ManifestSettings, n as CLIDefinition, o as CLISchema, p as InferNameOption, r as CLIExecuteOptions, s as CompletionRegistrationOptions, t as CLIBuilder, u as ConfigSettingsDefinition, v as cli, w as Shell, x as resolveRenderContext, y as createCLISchema } from "./index-eF7SkQzQ.mjs";
5
+ import { n as RuntimeAdapter } from "./adapter-DsmEc0WO.mjs";
6
+ import { a as ConfigNotFound, d as PackageRepositoryUrlOptions, g as PackageRepository, h as PackageJsonData, i as ConfigFound, m as PackageJsonAdapter, n as ConfigDiscoveryOptions, o as ConfigSearchPathOptions, p as ManifestDiscoveryOptions, r as ConfigDiscoveryResult, s as FormatLoader, t as ConfigAdapter } from "./index-Cj7kXwQH.mjs";
7
+ import { D as DEFINITION_SCHEMA_URL, O as DEFINITION_SCHEMA_VERSION, S as StdinBindingFragmentV1, _ as JsonSchemaOptions, a as CommandDefinitionFragmentV1, b as SourceSplitFragmentV1, c as ExampleDefinitionFragmentV1, d as FlagNegationFragmentV1, f as FlagPathChecksFragmentV1, g as InputSchemaProperty, h as InputSchemaDocument, i as CommandDefinitionDocumentV1, l as FlagDefinitionFragmentV1, m as InputSchemaBranch, n as ArgElementFragmentV1, o as DefinitionDocument, p as FlagStringConstraintsFragmentV1, r as CommandDefinitionDocument, s as DefinitionDocumentV1, t as ArgDefinitionFragmentV1, u as FlagElementFragmentV1, v as PromptChoiceFragmentV1, x as SplitPolicyFragmentV1, y as PromptDefinitionFragmentV1 } from "./index-C5CYWtxn.mjs";
7
8
  import { Colors } from "ansispeck";
8
9
  //#region src/core/help/ansi.d.ts
9
10
  /**
@@ -188,4 +189,4 @@ interface ReadFlagsOptions<F extends FlagMap = FlagMap> extends ResolveOptions {
188
189
  */
189
190
  declare function readFlags<const F extends FlagMap>(definitions: F, options?: ReadFlagsOptions<F>): Promise<InferFlags<F>>;
190
191
  //#endregion
191
- export { type ActionHandler, type ActionParams, type ActivityEvent, ArgBuilder, type ArgConfig, type ArgDefaultValue, type ArgDefinition, type ArgDefinitionBase, type ArgDefinitionByKind, type ArgDefinitionFragmentV1, type ArgDefinitionOverrides, type ArgElementFragmentV1, type ArgFactory, type ArgKind, type ArgParseFn, type ArgPresence, type ArgSchema, type ArrayFlagDefinition, type BeforeParseParams, type BooleanArgDefinition, type BooleanFlagDefinition, type BuiltinMode, type BuiltinName, type Builtins, type BuiltinsConfig, CLIBuilder, type CLIDefinition, CLIError, type CLIErrorJSON, type CLIErrorOptions, type CLIExecuteOptions, type CLIOptions, type CLIPlugin, type CLIPluginHooks, type CLIRunOptions, type CLISchema, type Colors, type CommandArgEntry, type CommandArgEntryDefinition, CommandBuilder, type CommandDefinition, type CommandDefinitionDocument, type CommandDefinitionDocumentV1, type CommandDefinitionFragmentV1, type CommandExample, type CommandMeta, type CommandSchema, type CompletionOptions, type CompletionRegistrationOptions, type CompletionsFlagConfig, type ConfigAdapter, type ConfigDiscoveryOptions, type ConfigDiscoveryResult, type ConfigFound, type ConfigNotFound, type ConfigSearchPathOptions, type ConfigSettings, type ConfigSettingsDefinition, type ConfirmPromptConfig, type CountFlagDefinition, type CustomArgDefinition, type CustomFlagDefinition, DEFINITION_SCHEMA_URL, DEFINITION_SCHEMA_VERSION, DUPLICATE_KEYS, type DateFlagOptions, type DefaultCommandOptions, type DefaultValueOptions, type DefinitionDocument, type DefinitionDocumentV1, type DeprecationWarning, type DeriveHandler, type DeriveParams, type DuplicateKeys, type DuplicatePolicy, type EnumArgDefinition, type EnumFlagDefinition, type ErrorCode, type ExampleCommand, type ExampleDefinitionFragmentV1, type ExampleMeta, type Fallback, FlagBuilder, type FlagConfig, type FlagDefinition, type FlagDefinitionBase, type FlagDefinitionByKind, type FlagDefinitionFragmentV1, type FlagDefinitionOverrides, type FlagElementFragmentV1, type FlagFactory, type FlagKind, type FlagMap, type FlagNegation, type FlagNegationFragmentV1, type FlagParseFn, type FlagPathChecksFragmentV1, type FlagPresence, type FlagSchema, type FlagStringConstraintsFragmentV1, type FormatLoader, type HelpConfig, type HelpDescription, type HelpLinks, type HelpOptions, type HelpTheme, type HelpThemeFactory, type InferArg, type InferArgs, type InferFlag, type InferFlags, type InferNameOption, type InferStandardInput, type InferStandardOutput, type InputPromptConfig, type InputSchemaBranch, type InputSchemaDocument, type InputSchemaProperty, type InputSources, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type JsonSchemaOptions, type KeyValueArgDefinition, type KeyValueFlagDefinition, type ManifestDiscoveryOptions, type ManifestSettings, type Middleware, type MiddlewareHandler, type MiddlewareParams, type MultiselectPromptConfig, type NumberArgDefinition, type NumberConstraintViolation, type NumberConstraints, type NumberFlagDefinition, type Out, type OutputOptions, type PackageJsonAdapter, type PackageJsonData, type PackageRepository, type PackageRepositoryUrlOptions, ParseError, type ParseErrorCode, type ParseErrorOptions, type ParseOptions, type ParseResult, type PathChecks, type PathFlagOptions, type PluginCommandContext, type ProgressHandle, type ProgressOptions, type PromptChoiceFragmentV1, type PromptConfig, type PromptConfigBase, type PromptDefinitionFragmentV1, type PromptEngine, type PromptKind, type PromptResult, type ReadFlagsOptions, type ReadFn, type RenderContext, type RenderContextOptions, type ResolutionProvenance, type ResolutionProvenanceRecord, type ResolveOptions, type ResolveResult, type ResolvedArgValue, type ResolvedCommandParams, type ResolvedManifestSettings, type ResolvedMultiselectPromptConfig, type ResolvedPromptConfig, type ResolvedSelectPromptConfig, type ResolvedValue, type RunResult, SHELLS, SPLIT_FORMATS, type SelectChoice, type SelectPromptConfig, type Shell, type SourceSplitBinding, type SourceSplitFragmentV1, type SourcesOf, type SpinnerHandle, type SpinnerOptions, type SplitBinding, type SplitFormat, type SplitOptions, type SplitPolicy, type SplitPolicyFragmentV1, type SplitSetting, type StandardSchemaV1, type StandardSchemaV1FailureResult, type StandardSchemaV1Issue, type StandardSchemaV1Options, type StandardSchemaV1PathSegment, type StandardSchemaV1Props, type StandardSchemaV1Result, type StandardSchemaV1SuccessResult, type StandardSchemaV1Types, type StdinBinding, type StdinBindingFragmentV1, type StdinConsume, type StdinOptions, type StdinWhen, type StringArgDefinition, type StringArgElementConfig, type StringConstraintViolation, type StringConstraints, type StringElementConfig, type StringFlagDefinition, type TableColumn, type TableFormat, type TableOptions, type TableStream, type Token, type UrlFlagOptions, ValidationError, type ValidationErrorCode, type ValidationErrorOptions, type Verbosity, type WithArgPresence, type WithPresence, type WithVariadic, type WithoutArgElementEligibility, type WithoutElementEligibility, type WriteFn, arg, cli, command, createArgSchema, createCLISchema, createCommandSchema, createFlagSchema, createOutput, flag, formatHelp, getFlagNegatedName, group, includesBeforeSeparator, isCLIError, isMainModule, isParseError, isValidationError, middleware, osc8, parse, plugin, readFlags, resolve, resolveExampleCommand, resolvePromptConfig, resolveRenderContext, stripBeforeSeparator, tokenize, visibleWidth, wasExplicit };
192
+ export { type ActionHandler, type ActionParams, type ActivityEvent, ArgBuilder, type ArgConfig, type ArgDefaultValue, type ArgDefinition, type ArgDefinitionBase, type ArgDefinitionByKind, type ArgDefinitionFragmentV1, type ArgDefinitionOverrides, type ArgElementFragmentV1, type ArgFactory, type ArgKind, type ArgParseFn, type ArgPresence, type ArgSchema, type ArrayFlagDefinition, type Ask, type BeforeParseParams, type BooleanArgDefinition, type BooleanFlagDefinition, type BuiltinMode, type BuiltinName, type Builtins, type BuiltinsConfig, CLIBuilder, type CLIDefinition, CLIError, type CLIErrorJSON, type CLIErrorOptions, type CLIExecuteOptions, type CLIOptions, type CLIPlugin, type CLIPluginHooks, type CLIRunOptions, type CLISchema, type Colors, type CommandArgEntry, type CommandArgEntryDefinition, CommandBuilder, type CommandDefinition, type CommandDefinitionDocument, type CommandDefinitionDocumentV1, type CommandDefinitionFragmentV1, type CommandExample, type CommandMeta, type CommandSchema, type CompletionOptions, type CompletionRegistrationOptions, type CompletionsFlagConfig, type ConfigAdapter, type ConfigDiscoveryOptions, type ConfigDiscoveryResult, type ConfigFound, type ConfigNotFound, type ConfigSearchPathOptions, type ConfigSettings, type ConfigSettingsDefinition, type ConfirmPromptConfig, type CountFlagDefinition, type CustomArgDefinition, type CustomFlagDefinition, DEFINITION_SCHEMA_URL, DEFINITION_SCHEMA_VERSION, DUPLICATE_KEYS, type DateFlagOptions, type DefaultCommandOptions, type DefaultValueOptions, type DefinitionDocument, type DefinitionDocumentV1, type DeprecationWarning, type DeriveHandler, type DeriveParams, type DuplicateKeys, type DuplicatePolicy, type EnumArgDefinition, type EnumFlagDefinition, type ErrorCode, type ExampleCommand, type ExampleDefinitionFragmentV1, type ExampleMeta, type Fallback, FlagBuilder, type FlagConfig, type FlagDefinition, type FlagDefinitionBase, type FlagDefinitionByKind, type FlagDefinitionFragmentV1, type FlagDefinitionOverrides, type FlagElementFragmentV1, type FlagFactory, type FlagKind, type FlagMap, type FlagNegation, type FlagNegationFragmentV1, type FlagParseFn, type FlagPathChecksFragmentV1, type FlagPresence, type FlagSchema, type FlagStringConstraintsFragmentV1, type FormatLoader, type HelpConfig, type HelpDescription, type HelpLinks, type HelpOptions, type HelpTheme, type HelpThemeFactory, type InferArg, type InferArgs, type InferFlag, type InferFlags, type InferNameOption, type InferPrompt, type InferStandardInput, type InferStandardOutput, type InputPromptConfig, type InputSchemaBranch, type InputSchemaDocument, type InputSchemaProperty, type InputSources, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type JsonSchemaOptions, type KeyValueArgDefinition, type KeyValueFlagDefinition, type ManifestDiscoveryOptions, type ManifestSettings, type Middleware, type MiddlewareHandler, type MiddlewareParams, type MultiselectPromptConfig, type NumberArgDefinition, type NumberConstraintViolation, type NumberConstraints, type NumberFlagDefinition, type Out, type OutputOptions, type PackageJsonAdapter, type PackageJsonData, type PackageRepository, type PackageRepositoryUrlOptions, ParseError, type ParseErrorCode, type ParseErrorOptions, type ParseOptions, type ParseResult, type PasswordPromptConfig, type PathChecks, type PathFlagOptions, type PluginCommandContext, type ProgressHandle, type ProgressOptions, type PromptChoiceFragmentV1, type PromptConfig, type PromptConfigBase, type PromptDefinitionFragmentV1, type PromptEngine, type PromptKind, type PromptResult, type ReadFlagsOptions, type ReadFn, type RenderContext, type RenderContextOptions, type ResolutionProvenance, type ResolutionProvenanceRecord, type ResolveOptions, type ResolveResult, type ResolvedArgValue, type ResolvedCommandParams, type ResolvedManifestSettings, type ResolvedMultiselectPromptConfig, type ResolvedPromptConfig, type ResolvedSelectPromptConfig, type ResolvedValue, type RunResult, SHELLS, SPLIT_FORMATS, type SelectChoice, type SelectPromptConfig, type Shell, type SourceSplitBinding, type SourceSplitFragmentV1, type SourcesOf, type SpinnerHandle, type SpinnerOptions, type SplitBinding, type SplitFormat, type SplitOptions, type SplitPolicy, type SplitPolicyFragmentV1, type SplitSetting, type StandardSchemaV1, type StandardSchemaV1FailureResult, type StandardSchemaV1Issue, type StandardSchemaV1Options, type StandardSchemaV1PathSegment, type StandardSchemaV1Props, type StandardSchemaV1Result, type StandardSchemaV1SuccessResult, type StandardSchemaV1Types, type StdinBinding, type StdinBindingFragmentV1, type StdinConsume, type StdinOptions, type StdinWhen, type StringArgDefinition, type StringArgElementConfig, type StringConstraintViolation, type StringConstraints, type StringElementConfig, type StringFlagDefinition, type TableColumn, type TableFormat, type TableOptions, type TableStream, type Token, type UrlFlagOptions, ValidationError, type ValidationErrorCode, type ValidationErrorOptions, type Verbosity, type WithArgPresence, type WithPresence, type WithVariadic, type WithoutArgElementEligibility, type WithoutElementEligibility, type WriteFn, arg, cli, command, createArgSchema, createCLISchema, createCommandSchema, createFlagSchema, createOutput, flag, formatHelp, getFlagNegatedName, group, includesBeforeSeparator, isCLIError, isMainModule, isParseError, isValidationError, middleware, osc8, parse, plugin, readFlags, resolve, resolveExampleCommand, resolvePromptConfig, resolveRenderContext, stripBeforeSeparator, tokenize, visibleWidth, wasExplicit };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{$ as ParseError,B as resolveExampleCommand,D as tokenize,E as stripBeforeSeparator,F as visibleWidth,G as getFlagNegatedName,H as createFlagSchema,I as CommandBuilder,J as createArgSchema,K as ArgBuilder,L as command,M as formatHelp,O as wasExplicit,P as osc8,Q as CLIError,R as createCommandSchema,S as resolvePromptConfig,T as parse,U as flag,V as FlagBuilder,X as SPLIT_FORMATS,Y as DUPLICATE_KEYS,a as CLIBuilder,c as isMainModule,d as plugin,et as ValidationError,i as DEFINITION_SCHEMA_VERSION,it as SHELLS,j as createOutput,k as middleware,l as resolveRenderContext,n as readFlags,nt as isParseError,o as cli,q as arg,r as DEFINITION_SCHEMA_URL,rt as isValidationError,s as createCLISchema,tt as isCLIError,w as includesBeforeSeparator,x as resolve,z as group}from"./core-DvXUolc_.mjs";export{ArgBuilder,CLIBuilder,CLIError,CommandBuilder,DEFINITION_SCHEMA_URL,DEFINITION_SCHEMA_VERSION,DUPLICATE_KEYS,FlagBuilder,ParseError,SHELLS,SPLIT_FORMATS,ValidationError,arg,cli,command,createArgSchema,createCLISchema,createCommandSchema,createFlagSchema,createOutput,flag,formatHelp,getFlagNegatedName,group,includesBeforeSeparator,isCLIError,isMainModule,isParseError,isValidationError,middleware,osc8,parse,plugin,readFlags,resolve,resolveExampleCommand,resolvePromptConfig,resolveRenderContext,stripBeforeSeparator,tokenize,visibleWidth,wasExplicit};
1
+ export{Y as ArgBuilder,s as CLIBuilder,tt as CLIError,z as CommandBuilder,a as DEFINITION_SCHEMA_URL,o as DEFINITION_SCHEMA_VERSION,Q as DUPLICATE_KEYS,W as FlagBuilder,nt as ParseError,st as SHELLS,$ as SPLIT_FORMATS,rt as ValidationError,X as arg,c as cli,B as command,Z as createArgSchema,l as createCLISchema,V as createCommandSchema,G as createFlagSchema,P as createOutput,K as flag,F as formatHelp,J as getFlagNegatedName,H as group,D as includesBeforeSeparator,it as isCLIError,u as isMainModule,at as isParseError,ot as isValidationError,M as middleware,L as osc8,O as parse,p as plugin,i as readFlags,C as resolve,U as resolveExampleCommand,w as resolvePromptConfig,d as resolveRenderContext,k as stripBeforeSeparator,A as tokenize,R as visibleWidth,j as wasExplicit}from"./core-B4Twhd48.mjs";