@politty/zod 0.2.4 → 0.3.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 (48) hide show
  1. package/README.md +22 -1
  2. package/dist/{arg-registry-C-fvuAAg.d.ts → arg-registry-DdEs3jd0.d.ts} +8 -2
  3. package/dist/augment.d.ts +3 -2
  4. package/dist/cli-main-DXoFbgu3.js +1 -0
  5. package/dist/{cli-main-KajE103P.js → cli-main-q4kY1qaL.js} +2 -2
  6. package/dist/cli-run-HJaZHDXb.js +1 -0
  7. package/dist/cli.js +1 -1
  8. package/dist/compile-cache-6u9hgeWu.js +1 -0
  9. package/dist/compile-cache.d.ts +5 -6
  10. package/dist/compile-cache.js +1 -1
  11. package/dist/completion-CDwNvtfE.js +1 -0
  12. package/dist/{completion-BqYtsuso.js → completion-DwBjO-3Q.js} +5 -5
  13. package/dist/completion.d.ts +29 -18
  14. package/dist/completion.js +1 -1
  15. package/dist/docs.d.ts +46 -46
  16. package/dist/docs.js +5 -5
  17. package/dist/dynamic-BBr42fJH.js +1 -0
  18. package/dist/dynamic-BK6Tq_FR.js +6 -0
  19. package/dist/field-meta-D7G8a7IG.js +1 -0
  20. package/dist/index.d.ts +240 -52
  21. package/dist/index.js +1 -1
  22. package/dist/logger-CoeDrmRr.js +1 -0
  23. package/dist/prompt-clack.d.ts +3 -4
  24. package/dist/prompt-clack.js +1 -1
  25. package/dist/prompt-inquirer.d.ts +3 -4
  26. package/dist/prompt-inquirer.js +1 -1
  27. package/dist/prompt.d.ts +7 -7
  28. package/dist/prompt.js +1 -1
  29. package/dist/{register-C1WbbeYH.js → register-D0mDOOyc.js} +1 -1
  30. package/dist/runner-FI1rpYp3.js +1 -0
  31. package/dist/runner-bjKUtqk1.js +29 -0
  32. package/dist/{schema-extractor-DU0Vuhbd.js → schema-extractor-QpSHJvwI.js} +1 -1
  33. package/dist/{schema-BiUP_KyV.js → schema-ohwvrBGz.js} +1 -1
  34. package/dist/skill.d.ts +13 -13
  35. package/dist/skill.js +1 -1
  36. package/dist/{with-completion-command-DMPw58_x.d.ts → with-completion-command-Bi7v_Wlq.d.ts} +1 -1
  37. package/dist/{with-completion-command-DM6F5LyO.js → with-completion-command-CZ9qcezN.js} +2 -2
  38. package/package.json +2 -2
  39. package/dist/cli-main-B0jMuGGi.js +0 -1
  40. package/dist/cli-run-Bm3vsxIB.js +0 -1
  41. package/dist/compile-cache-VuUbFWIo.js +0 -1
  42. package/dist/completion-OEWfekOk.js +0 -1
  43. package/dist/dynamic-D7QInkeD.js +0 -6
  44. package/dist/dynamic-DPbDLfHB.js +0 -1
  45. package/dist/field-meta-COGya7xp.js +0 -1
  46. package/dist/logger-CJsyJ8sb.js +0 -1
  47. package/dist/runner-CPganzL6.js +0 -1
  48. package/dist/runner-DECNQyff.js +0 -29
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as toCamelCase, A as LogEntry, B as RunResultFailure, C as Command, D as GlobalCleanupContext, E as GlobalArgs, F as NonRunnableCommand, G as SubCommandsRecord, H as RunnableCommand, I as PromptResolver, J as isLazyCommand, K as UnknownSubcommandHandler, L as RunCommandOptions, M as LogStream, N as Logger, O as GlobalSetupContext, P as MainOptions, Q as UnknownKeysMode, R as RunInvocation, S as CollectedLogs, T as Example, U as SetupContext, V as RunResultSuccess, W as SubCommandValue, X as ExtractedFields, Y as lazy, Z as ResolvedFieldMeta, _ as DynamicCompletionResult, a as CustomCompletion, b as ArgsSchema$1, c as PromptType, d as ExpandCompletion, et as toKebabCase, f as ResolvedExpandCandidate, g as DynamicCompletionResolver, h as DynamicCompletionContext, i as CompletionType, j as LogLevel, k as IsEmpty, l as ValidateArgMeta, m as DynamicCompletionCandidate, n as ArgMeta, nt as SchemaLike, o as EffectContext, p as CompletionDirectiveMask, q as LazyCommand, r as CompletionMeta, s as PromptMeta, t as ArgFn, tt as InferSchemaOutput, u as ExpandCandidate, v as AnyCommand, w as CommandBase, x as CleanupContext, y as ArgSource, z as RunResult } from "./arg-registry-C-fvuAAg.js";
2
- import { _ as CompletionResult, g as CompletionOptions, i as GenerateBundledCompletionWorkerResult, n as withCompletionCommand, r as GenerateBundledCompletionWorkerOptions, t as WithCompletionOptions, x as InternalArgsSchema } from "./with-completion-command-DMPw58_x.js";
1
+ import { $ as toCamelCase, A as LogEntry, B as RunResultFailure, C as Command, D as GlobalCleanupContext, E as GlobalArgs, F as NonRunnableCommand, G as SubCommandsRecord, H as RunnableCommand, I as PromptResolver, J as isLazyCommand, K as UnknownSubcommandHandler, L as RunCommandOptions, M as LogStream, N as Logger, O as GlobalSetupContext, P as MainOptions, Q as UnknownKeysMode, R as RunInvocation, S as CollectedLogs, T as Example, U as SetupContext, V as RunResultSuccess, W as SubCommandValue, X as ExtractedFields, Y as lazy, Z as ResolvedFieldMeta, _ as DynamicCompletionResult, a as CustomCompletion, b as ArgsSchema$1, c as PromptType, d as ExpandCompletion, et as toKebabCase, f as ResolvedExpandCandidate, g as DynamicCompletionResolver, h as DynamicCompletionContext, i as CompletionType, j as LogLevel, k as IsEmpty, l as ValidateArgMeta, m as DynamicCompletionCandidate, n as ArgMeta, nt as SchemaLike, o as EffectContext, p as CompletionDirectiveMask, q as LazyCommand, r as CompletionMeta, s as PromptMeta, t as ArgFn, tt as InferSchemaOutput, u as ExpandCandidate, v as AnyCommand, w as CommandBase, x as CleanupContext, y as ArgSource, z as RunResult } from "./arg-registry-DdEs3jd0.js";
2
+ import { _ as CompletionResult, g as CompletionOptions, i as GenerateBundledCompletionWorkerResult, n as withCompletionCommand, r as GenerateBundledCompletionWorkerOptions, t as WithCompletionOptions, x as InternalArgsSchema } from "./with-completion-command-Bi7v_Wlq.js";
3
3
  import { z } from "zod";
4
4
  //#region ../core/src/core/schema-extractor.d.ts
5
5
  /**
@@ -7,14 +7,14 @@ import { z } from "zod";
7
7
  * schema politty itself attaches to a command (including internal
8
8
  * descriptor-based commands), not just user-provided library schemas.
9
9
  */
10
- declare function getUnknownKeysMode(schema: ArgsSchema$1): UnknownKeysMode;
10
+ export declare function getUnknownKeysMode(schema: ArgsSchema$1): UnknownKeysMode;
11
11
  /**
12
12
  * Extract all fields from a schema
13
13
  *
14
14
  * @param schema - The args schema (ZodObject, ZodDiscriminatedUnion, etc.)
15
15
  * @returns Extracted field information
16
16
  */
17
- declare function extractFields(schema: ArgsSchema$1): ExtractedFields;
17
+ export declare function extractFields(schema: ArgsSchema$1): ExtractedFields;
18
18
  //#endregion
19
19
  //#region ../core/src/adapter/types.d.ts
20
20
  /**
@@ -55,7 +55,7 @@ type ValidationResult<T> = {
55
55
  *
56
56
  * Never returns: it exits the process, like `runMain`.
57
57
  */
58
- declare function runPolittyCli(ownerPackage: string): Promise<never>;
58
+ export declare function runPolittyCli(ownerPackage: string): Promise<never>;
59
59
  //#endregion
60
60
  //#region ../core/src/compile-cache-shim.d.ts
61
61
  /**
@@ -155,7 +155,7 @@ interface GenerateCompileCacheShimResult {
155
155
  * a `bin` path still pointing at the real CLI entry fails loudly instead of
156
156
  * clobbering the build output.
157
157
  */
158
- declare function createCompileCacheShimGenerator(ownerPackage: string): (options?: GenerateCompileCacheShimOptions) => GenerateCompileCacheShimResult[];
158
+ export declare function createCompileCacheShimGenerator(ownerPackage: string): (options?: GenerateCompileCacheShimOptions) => GenerateCompileCacheShimResult[];
159
159
  //#endregion
160
160
  //#region ../core/src/core/case-types.d.ts
161
161
  /**
@@ -223,7 +223,7 @@ type WithCaseVariants<T> = T extends unknown ? T & { [K in keyof T as CamelCase<
223
223
  * - `Object.keys()`, `JSON.stringify()`, and spread return only the original keys.
224
224
  * - The `in` operator detects both case variants.
225
225
  */
226
- declare function createDualCaseProxy<T extends Record<string, unknown>>(obj: T): WithCaseVariants<T>;
226
+ export declare function createDualCaseProxy<T extends Record<string, unknown>>(obj: T): WithCaseVariants<T>;
227
227
  //#endregion
228
228
  //#region ../core/src/core/command.d.ts
229
229
  /**
@@ -374,7 +374,7 @@ interface NonRunnableConfig<TArgsSchema extends ArgsSchema$1 | undefined, TGloba
374
374
  * expect(result.exitCode).toBe(0);
375
375
  * ```
376
376
  */
377
- declare function runCommand<TResult = unknown>(command: AnyCommand, argv: string[], options?: RunCommandOptions): Promise<RunResult<TResult>>;
377
+ export declare function runCommand<TResult = unknown>(command: AnyCommand, argv: string[], options?: RunCommandOptions): Promise<RunResult<TResult>>;
378
378
  /**
379
379
  * Run a CLI command as the main entry point
380
380
  *
@@ -403,7 +403,7 @@ declare function runCommand<TResult = unknown>(command: AnyCommand, argv: string
403
403
  * runMain(command, { version: "1.0.0" });
404
404
  * ```
405
405
  */
406
- declare function runMain(command: AnyCommand, options?: MainOptions): Promise<never>;
406
+ export declare function runMain(command: AnyCommand, options?: MainOptions): Promise<never>;
407
407
  //#endregion
408
408
  //#region ../core/src/output/help-generator.d.ts
409
409
  /**
@@ -414,6 +414,8 @@ interface BuiltinOptionDescriptions {
414
414
  help?: string;
415
415
  /** Description for --help-all option */
416
416
  helpAll?: string;
417
+ /** Description for --help-json option */
418
+ helpJson?: string;
417
419
  /** Description for --version option */
418
420
  version?: string;
419
421
  }
@@ -445,6 +447,166 @@ interface HelpOptions {
445
447
  /** Command hierarchy context */
446
448
  context?: CommandContext | undefined;
447
449
  }
450
+ /**
451
+ * Serializable representation of a single argument (positional or option),
452
+ * whitelisted from {@link ResolvedFieldMeta} down to JSON-safe fields.
453
+ * `schema`, `completion`, `prompt`, and `effect` are intentionally omitted:
454
+ * they carry library-specific schema objects and callbacks that cannot
455
+ * round-trip through JSON, and text help never surfaces them either.
456
+ */
457
+ interface HelpFieldData {
458
+ /** Field name (camelCase, as defined in the schema) */
459
+ name: string;
460
+ /** CLI option name (kebab-case) */
461
+ cliName: string;
462
+ /** Whether this is a positional argument */
463
+ positional: boolean;
464
+ /** Whether this argument is required */
465
+ required: boolean;
466
+ /** Detected type from schema */
467
+ type: "string" | "number" | "boolean" | "array" | "unknown";
468
+ /** Aliases for this option (short: 1 char, long: multi-char) */
469
+ alias?: string[] | undefined;
470
+ /** Argument description */
471
+ description?: string | undefined;
472
+ /** Placeholder shown in help */
473
+ placeholder?: string | undefined;
474
+ /** Environment variable name(s) to read value from */
475
+ env?: string | string[] | undefined;
476
+ /** Default value, if any */
477
+ defaultValue?: unknown;
478
+ /** Enum values, if detected from schema */
479
+ enumValues?: string[] | undefined;
480
+ /** Negation configuration (see {@link ResolvedFieldMeta.negation}) */
481
+ negation?: string | boolean | undefined;
482
+ /** Derived negation flag name (no `--` prefix), or undefined when hidden */
483
+ negationDisplay?: string | undefined;
484
+ /** Description shown for the negation option */
485
+ negationDescription?: string | undefined;
486
+ }
487
+ /**
488
+ * A named group of fields sharing a discriminated-union variant or a plain
489
+ * union option (see {@link ExtractedFields.variants} / `.unionOptions`).
490
+ */
491
+ interface HelpVariantData {
492
+ /** Discriminator value this variant matches (discriminated unions only) */
493
+ discriminatorValue?: string | undefined;
494
+ /** Variant/option description */
495
+ description?: string | undefined;
496
+ /**
497
+ * Fields unique to this variant/option (common fields are not repeated
498
+ * here). Positional fields unique to this variant/option are included too,
499
+ * duplicated from the flat top-level {@link HelpData.positionals}, so JSON
500
+ * consumers can attribute a positional to the variant/option it belongs to.
501
+ */
502
+ fields: HelpFieldData[];
503
+ }
504
+ /**
505
+ * Structured usage information, equivalent in content to {@link renderUsageLine}
506
+ * but free of ANSI styling and rendering order decisions, so JSON consumers
507
+ * can format it however they like.
508
+ */
509
+ interface HelpUsageData {
510
+ /** Command name as shown in usage (includes root name for subcommands) */
511
+ commandName: string;
512
+ /** Whether global options are defined */
513
+ hasGlobalOptions: boolean;
514
+ /** Whether this command defines any (non-positional) options */
515
+ hasOptions: boolean;
516
+ /**
517
+ * Whether a subcommand token is expected: "required" when the command has
518
+ * no `run` of its own, "optional" when it does. Undefined when the
519
+ * command has no (visible) subcommands.
520
+ */
521
+ subcommand?: "required" | "optional" | undefined;
522
+ /** Positional arguments in order */
523
+ positionals: Array<{
524
+ name: string;
525
+ required: boolean;
526
+ }>;
527
+ }
528
+ /**
529
+ * A subcommand entry in {@link HelpData.subcommands}.
530
+ */
531
+ interface HelpSubcommandData {
532
+ /** Subcommand name (key under `subCommands`) */
533
+ name: string;
534
+ /** Subcommand aliases */
535
+ aliases?: string[] | undefined;
536
+ /**
537
+ * Set when this subcommand is a legacy async factory (`() => Promise<Command>`)
538
+ * registered without {@link lazy}, so no synchronous metadata is available
539
+ * and `data` cannot be produced. `lazy()` subcommands are always resolved
540
+ * (their `meta` is synchronous) and never hit this case.
541
+ */
542
+ unresolved?: true | undefined;
543
+ /** Full structured help for this subcommand, recursively. Absent when `unresolved` is true. */
544
+ data?: HelpData | undefined;
545
+ }
546
+ /**
547
+ * Structured, JSON-serializable representation of a command's help.
548
+ * Produced by {@link generateHelpData}; the machine-readable counterpart of
549
+ * {@link generateHelp}'s formatted text.
550
+ */
551
+ interface HelpData {
552
+ /** Command name (command.name) */
553
+ name: string;
554
+ /**
555
+ * Full path from the root command. Empty at the true root; also empty
556
+ * when generateHelpData is called directly on a non-root command without
557
+ * a context.commandPath (there is no root to compute the path from).
558
+ */
559
+ commandPath: string[];
560
+ /**
561
+ * Root command name. Always set when produced through `runMain`/`runCommand`
562
+ * (equal to `name` itself at the root); `undefined` whenever
563
+ * `context.rootName` is not supplied to `generateHelpData` -- whether
564
+ * because no `context` was given at all, or because the given `context`
565
+ * simply omits `rootName`.
566
+ */
567
+ rootName?: string | undefined;
568
+ /** Root command version, when provided to runMain/runCommand */
569
+ version?: string | undefined;
570
+ /** Canonical subcommand name, set only when this command was reached via an alias */
571
+ aliasFor?: string | undefined;
572
+ /** Command description */
573
+ description?: string | undefined;
574
+ /** Command aliases (as a subcommand) */
575
+ aliases?: string[] | undefined;
576
+ /** Structured usage line */
577
+ usage: HelpUsageData;
578
+ /** Descriptions of the built-in --help/--help-all/--help-json/--version options */
579
+ builtinOptions: {
580
+ help: string;
581
+ helpAll: string;
582
+ helpJson: string;
583
+ version?: string | undefined;
584
+ };
585
+ /** Args schema shape: a plain object, or a union/discriminated-union of variants */
586
+ schemaType?: "object" | "discriminatedUnion" | "union" | "xor" | "intersection" | undefined;
587
+ /** Positional arguments */
588
+ positionals: HelpFieldData[];
589
+ /**
590
+ * Non-positional options. For `discriminatedUnion`/`union`/`xor` schemas,
591
+ * this holds only the fields common to every variant/option; the rest are
592
+ * under `variants`/`unionOptions`.
593
+ */
594
+ options: HelpFieldData[];
595
+ /** Discriminator field name (discriminatedUnion schemas only) */
596
+ discriminator?: string | undefined;
597
+ /** Per-variant fields (discriminatedUnion schemas only) */
598
+ variants?: HelpVariantData[] | undefined;
599
+ /** Per-option fields (union/xor schemas only) */
600
+ unionOptions?: HelpVariantData[] | undefined;
601
+ /** Global options shared across all commands, when a global args schema is defined */
602
+ globalOptions?: HelpFieldData[] | undefined;
603
+ /** Subcommands, recursively resolved */
604
+ subcommands?: HelpSubcommandData[] | undefined;
605
+ /** Example usages */
606
+ examples?: Example[] | undefined;
607
+ /** Additional notes (raw Markdown, unrendered) */
608
+ notes?: string | undefined;
609
+ }
448
610
  /**
449
611
  * Generate help text for a command
450
612
  *
@@ -452,21 +614,43 @@ interface HelpOptions {
452
614
  * @param options - Help generation options
453
615
  * @returns Formatted help text
454
616
  */
455
- declare function generateHelp(command: AnyCommand, options: HelpOptions): string;
617
+ export declare function generateHelp(command: AnyCommand, options: HelpOptions): string;
618
+ /**
619
+ * Options for {@link generateHelpData}
620
+ */
621
+ interface HelpDataOptions {
622
+ /** Custom descriptions for the --help/--help-all/--help-json/--version built-in options */
623
+ descriptions?: BuiltinOptionDescriptions | undefined;
624
+ /** Command hierarchy context */
625
+ context?: CommandContext | undefined;
626
+ }
627
+ /**
628
+ * Generate a structured, JSON-serializable representation of a command's help.
629
+ *
630
+ * The machine-readable counterpart of {@link generateHelp}: same underlying
631
+ * field metadata, but as plain data (no ANSI styling, no fixed layout) and
632
+ * always including the full recursive subcommand tree (there is no
633
+ * `--help`/`--help-all` depth distinction here).
634
+ *
635
+ * @param command - The command to generate help data for
636
+ * @param options - Help data generation options
637
+ * @returns Structured help data
638
+ */
639
+ export declare function generateHelpData(command: AnyCommand, options?: HelpDataOptions): HelpData;
456
640
  //#endregion
457
641
  //#region ../core/src/output/logger.d.ts
458
642
  /**
459
643
  * Enable or disable color output programmatically
460
644
  */
461
- declare function setColorEnabled(enabled: boolean): void;
645
+ export declare function setColorEnabled(enabled: boolean): void;
462
646
  /**
463
647
  * Check if color output is currently enabled
464
648
  */
465
- declare function isColorEnabled(): boolean;
649
+ export declare function isColorEnabled(): boolean;
466
650
  /**
467
651
  * Semantic style functions for inline text styling
468
652
  */
469
- declare const styles: {
653
+ export declare const styles: {
470
654
  success: (text: string) => string;
471
655
  error: (text: string) => string;
472
656
  warning: (text: string) => string;
@@ -497,7 +681,7 @@ declare const styles: {
497
681
  /**
498
682
  * Standardized symbols for CLI output
499
683
  */
500
- declare const symbols: {
684
+ export declare const symbols: {
501
685
  success: string;
502
686
  error: string;
503
687
  warning: string;
@@ -508,7 +692,7 @@ declare const symbols: {
508
692
  /**
509
693
  * Logger for CLI output
510
694
  */
511
- declare const logger: {
695
+ export declare const logger: {
512
696
  /**
513
697
  * Log informational message
514
698
  */
@@ -557,7 +741,7 @@ declare const logger: {
557
741
  * 3. Italic (*text* or _text_)
558
742
  * 4. Links [text](url)
559
743
  */
560
- declare function renderInline(text: string): string;
744
+ export declare function renderInline(text: string): string;
561
745
  /**
562
746
  * Render a Markdown string to styled terminal output.
563
747
  *
@@ -566,7 +750,7 @@ declare function renderInline(text: string): string;
566
750
  * - Detects headings, horizontal rules, blockquotes, lists, code blocks, and paragraphs
567
751
  * - Applies inline formatting within each block
568
752
  */
569
- declare function renderMarkdown(markdown: string): string;
753
+ export declare function renderMarkdown(markdown: string): string;
570
754
  //#endregion
571
755
  //#region ../core/src/parser/argv-parser.d.ts
572
756
  /**
@@ -631,43 +815,43 @@ interface ParserOptions {
631
815
  * @param options - Parser options
632
816
  * @returns Parsed arguments
633
817
  */
634
- declare function parseArgv(argv: string[], options?: ParserOptions): ParsedArgv;
818
+ export declare function parseArgv(argv: string[], options?: ParserOptions): ParsedArgv;
635
819
  //#endregion
636
820
  //#region ../core/src/validator/args-validator.d.ts
637
821
  /**
638
822
  * Format validation errors for display
639
823
  */
640
- declare function formatValidationErrors(errors: ValidationError[]): string;
824
+ export declare function formatValidationErrors(errors: ValidationError[]): string;
641
825
  //#endregion
642
826
  //#region ../core/src/validator/validation-errors.d.ts
643
827
  /**
644
828
  * Error thrown when positional argument configuration is invalid
645
829
  */
646
- declare class PositionalConfigError extends Error {
830
+ export declare class PositionalConfigError extends Error {
647
831
  constructor(message: string);
648
832
  }
649
833
  /**
650
834
  * Error thrown when a reserved alias is used
651
835
  */
652
- declare class ReservedAliasError extends Error {
836
+ export declare class ReservedAliasError extends Error {
653
837
  constructor(message: string);
654
838
  }
655
839
  /**
656
840
  * Error thrown when duplicate field names are detected
657
841
  */
658
- declare class DuplicateFieldError extends Error {
842
+ export declare class DuplicateFieldError extends Error {
659
843
  constructor(message: string);
660
844
  }
661
845
  /**
662
846
  * Error thrown when duplicate aliases are detected
663
847
  */
664
- declare class DuplicateAliasError extends Error {
848
+ export declare class DuplicateAliasError extends Error {
665
849
  constructor(message: string);
666
850
  }
667
851
  /**
668
852
  * Error thrown when fields are case variants of each other (e.g. "my-option" and "myOption")
669
853
  */
670
- declare class CaseVariantCollisionError extends Error {
854
+ export declare class CaseVariantCollisionError extends Error {
671
855
  constructor(message: string);
672
856
  }
673
857
  /**
@@ -675,14 +859,14 @@ declare class CaseVariantCollisionError extends Error {
675
859
  * field's name, cliName, alias, or another field's negation (including
676
860
  * derived camelCase variants).
677
861
  */
678
- declare class DuplicateNegationError extends Error {
862
+ export declare class DuplicateNegationError extends Error {
679
863
  constructor(message: string);
680
864
  }
681
865
  /**
682
866
  * Error thrown when a field name collides with a reserved, framework-injected
683
867
  * key on the final args object (e.g. `$source`).
684
868
  */
685
- declare class ReservedFieldNameError extends Error {
869
+ export declare class ReservedFieldNameError extends Error {
686
870
  constructor(message: string);
687
871
  }
688
872
  /**
@@ -690,7 +874,7 @@ declare class ReservedFieldNameError extends Error {
690
874
  * together with `run`, or pointing at a name that isn't a registered
691
875
  * `subCommands` key.
692
876
  */
693
- declare class DefaultSubCommandError extends Error {
877
+ export declare class DefaultSubCommandError extends Error {
694
878
  constructor(message: string);
695
879
  }
696
880
  /**
@@ -701,7 +885,7 @@ declare class DefaultSubCommandError extends Error {
701
885
  * is rejected at validation time rather than risking a value from one
702
886
  * schema silently flowing into the other.
703
887
  */
704
- declare class FieldTypeConflictError extends Error {
888
+ export declare class FieldTypeConflictError extends Error {
705
889
  constructor(message: string);
706
890
  }
707
891
  //#endregion
@@ -749,7 +933,7 @@ interface ValidateCommandOptions {
749
933
  * @param extracted - Extracted fields from schema
750
934
  * @throws {DuplicateFieldError} If duplicate field names are found
751
935
  */
752
- declare function validateDuplicateFields(extracted: ExtractedFields): void;
936
+ export declare function validateDuplicateFields(extracted: ExtractedFields): void;
753
937
  /**
754
938
  * Validate that no duplicate aliases exist
755
939
  *
@@ -758,7 +942,7 @@ declare function validateDuplicateFields(extracted: ExtractedFields): void;
758
942
  * @param extracted - Extracted fields from schema
759
943
  * @throws {DuplicateAliasError} If duplicate aliases are found or alias conflicts with field name
760
944
  */
761
- declare function validateDuplicateAliases(extracted: ExtractedFields): void;
945
+ export declare function validateDuplicateAliases(extracted: ExtractedFields): void;
762
946
  /**
763
947
  * Validate positional argument configuration
764
948
  *
@@ -771,21 +955,25 @@ declare function validateDuplicateAliases(extracted: ExtractedFields): void;
771
955
  * @param extracted - Extracted fields from schema
772
956
  * @throws {PositionalConfigError} If configuration is invalid
773
957
  */
774
- declare function validatePositionalConfig(extracted: ExtractedFields): void;
958
+ export declare function validatePositionalConfig(extracted: ExtractedFields): void;
775
959
  /**
776
- * Validate that no reserved aliases are used without explicit override
777
- *
778
- * Reserved aliases:
779
- * - 'h' is reserved for --help
780
- * - 'H' is reserved for --help-all
960
+ * Validate that no reserved names are used without explicit override
781
961
  *
782
- * Users can override these by setting overrideBuiltinAlias: true
962
+ * Reserved names:
963
+ * - 'h' is reserved for --help, 'H' for --help-all (short aliases). Users
964
+ * can override this by setting overrideBuiltinAlias: true on the field.
965
+ * - a field's `cliName` or any long alias matching `help`, `help-all`,
966
+ * `help-json`, or `version` collides with the matching built-in long
967
+ * flag. This has no override: `overrideBuiltinAlias: true` does not
968
+ * suppress it (see {@link checkReservedAliases}).
783
969
  *
784
970
  * @param extracted - Extracted fields from schema
785
971
  * @param _hasSubCommands - Whether the command has subcommands (reserved for future use)
786
- * @throws {ReservedAliasError} If a reserved alias is used without override flag
972
+ * @throws {ReservedAliasError} If `h`/`H` is used without `overrideBuiltinAlias: true`,
973
+ * or if a field's `cliName`/long alias collides with `help`/`help-all`/`help-json`/`version`
974
+ * (this second case is never suppressed by `overrideBuiltinAlias`)
787
975
  */
788
- declare function validateReservedAliases(extracted: ExtractedFields, _hasSubCommands: boolean): void;
976
+ export declare function validateReservedAliases(extracted: ExtractedFields, _hasSubCommands: boolean): void;
789
977
  /**
790
978
  * Validate that no field name starts with `$`
791
979
  *
@@ -801,21 +989,21 @@ declare function validateReservedAliases(extracted: ExtractedFields, _hasSubComm
801
989
  * @param extracted - Extracted fields from schema
802
990
  * @throws {ReservedFieldNameError} If a field name starts with "$"
803
991
  */
804
- declare function validateReservedFieldNames(extracted: ExtractedFields): void;
992
+ export declare function validateReservedFieldNames(extracted: ExtractedFields): void;
805
993
  /**
806
994
  * Validate that custom boolean negation names do not collide with anything
807
995
  *
808
996
  * @param extracted - Extracted fields from schema
809
997
  * @throws {DuplicateNegationError} If a colliding negation is found
810
998
  */
811
- declare function validateDuplicateNegations(extracted: ExtractedFields): void;
999
+ export declare function validateDuplicateNegations(extracted: ExtractedFields): void;
812
1000
  /**
813
1001
  * Validate that no case-variant collisions exist
814
1002
  *
815
1003
  * @param extracted - Extracted fields from schema
816
1004
  * @throws {CaseVariantCollisionError} If case-variant collisions are found
817
1005
  */
818
- declare function validateCaseVariantCollisions(extracted: ExtractedFields): void;
1006
+ export declare function validateCaseVariantCollisions(extracted: ExtractedFields): void;
819
1007
  /**
820
1008
  * Validate that no cross-schema collisions exist between two schemas
821
1009
  * (e.g., global args and command args): neither a case-variant collision
@@ -828,7 +1016,7 @@ declare function validateCaseVariantCollisions(extracted: ExtractedFields): void
828
1016
  * @throws {CaseVariantCollisionError} If cross-schema case-variant collisions are found
829
1017
  * @throws {FieldTypeConflictError} If a same-named field has a different definition on each schema
830
1018
  */
831
- declare function validateCrossSchemaCollisions(extractedA: ExtractedFields, extractedB: ExtractedFields): void;
1019
+ export declare function validateCrossSchemaCollisions(extractedA: ExtractedFields, extractedB: ExtractedFields): void;
832
1020
  /**
833
1021
  * Validate that a command's `defaultSubCommand` (if set) is not combined
834
1022
  * with `run` and points at a registered `subCommands` key.
@@ -836,7 +1024,7 @@ declare function validateCrossSchemaCollisions(extractedA: ExtractedFields, extr
836
1024
  * @param command - The command to validate
837
1025
  * @throws {DefaultSubCommandError} If the configuration is invalid
838
1026
  */
839
- declare function validateDefaultSubCommand(command: AnyCommand): void;
1027
+ export declare function validateDefaultSubCommand(command: AnyCommand): void;
840
1028
  /**
841
1029
  * Validate a command and all its subcommands recursively
842
1030
  *
@@ -855,14 +1043,14 @@ declare function validateDefaultSubCommand(command: AnyCommand): void;
855
1043
  * }
856
1044
  * ```
857
1045
  */
858
- declare function validateCommand(command: AnyCommand, options?: ValidateCommandOptions): Promise<CommandValidationResult>;
1046
+ export declare function validateCommand(command: AnyCommand, options?: ValidateCommandOptions): Promise<CommandValidationResult>;
859
1047
  /**
860
1048
  * Format command validation errors for display
861
1049
  *
862
1050
  * @param errors - Array of validation errors
863
1051
  * @returns Formatted error message
864
1052
  */
865
- declare function formatCommandValidationErrors(errors: CommandValidationError[]): string;
1053
+ export declare function formatCommandValidationErrors(errors: CommandValidationError[]): string;
866
1054
  //#endregion
867
1055
  //#region src/index.d.ts
868
1056
  /**
@@ -873,15 +1061,15 @@ declare function formatCommandValidationErrors(errors: CommandValidationError[])
873
1061
  * the caller's `package.json`: reaching this function means `@politty/zod` is
874
1062
  * installed, so the shim it writes into your package can resolve it.
875
1063
  */
876
- declare const generateCompileCacheShim: (options?: GenerateCompileCacheShimOptions) => GenerateCompileCacheShimResult[];
1064
+ export declare const generateCompileCacheShim: (options?: GenerateCompileCacheShimOptions) => GenerateCompileCacheShimResult[];
877
1065
  /**
878
1066
  * Supported schema types for args in this package: zod schemas whose
879
1067
  * output is an object. Narrows `@politty/core`'s Standard-Schema-based
880
1068
  * `ArgsSchema` back to politty's historical zod-typed public surface.
881
1069
  */
882
- type ArgsSchema = z.ZodType<Record<string, any>>;
883
- declare const defineCommand: DefineCommandFn<ArgsSchema>;
884
- declare const createDefineCommand: CreateDefineCommandFn<ArgsSchema>;
885
- declare const arg: ArgFn<z.ZodType>;
1070
+ export type ArgsSchema = z.ZodType<Record<string, any>>;
1071
+ export declare const defineCommand: DefineCommandFn<ArgsSchema>;
1072
+ export declare const createDefineCommand: CreateDefineCommandFn<ArgsSchema>;
1073
+ export declare const arg: ArgFn<z.ZodType>;
886
1074
  //#endregion
887
- export { type AnyCommand, type ArgFn, type ArgMeta, type ArgSource, ArgsSchema, type BoundDefineCommandFn, type BuiltinOptionDescriptions, type CamelCase, CaseVariantCollisionError, type CleanupContext, type CollectedLogs, type Command, type CommandBase, type CommandContext, type CommandValidationError, type CommandValidationResult, type CompletionDirectiveMask, type CompletionMeta, type CompletionOptions, type CompletionResult, type CompletionType, type CreateDefineCommandFn, type CustomCompletion, DefaultSubCommandError, type DefineCommandFn, DuplicateAliasError, DuplicateFieldError, DuplicateNegationError, type DynamicCompletionCandidate, type DynamicCompletionContext, type DynamicCompletionResolver, type DynamicCompletionResult, type EffectContext, type Example, type ExpandCandidate, type ExpandCompletion, type ExtractedFields, FieldTypeConflictError, type GenerateBundledCompletionWorkerOptions, type GenerateBundledCompletionWorkerResult, type GenerateCompileCacheShimOptions, type GenerateCompileCacheShimResult, type GlobalArgs, type GlobalCleanupContext, type GlobalSetupContext, type HelpOptions, type InferSchemaOutput, type KebabCase, type LazyCommand, type LogEntry, type LogLevel, type LogStream, type Logger, type MainOptions, type MergedArgs, type NonRunnableCommand, type ParsedArgv, type ParserOptions, PositionalConfigError, type PromptMeta, type PromptResolver, type PromptType, ReservedAliasError, ReservedFieldNameError, type ResolvedExpandCandidate, type ResolvedFieldMeta, type RunCommandOptions, type RunInvocation, type RunResult, type RunResultFailure, type RunResultSuccess, type RunnableCommand, type SchemaLike, type SetupContext, type SubCommandValue, type SubCommandsRecord, type UnknownKeysMode, type UnknownSubcommandHandler, type ValidateArgMeta, type ValidationError, type ValidationResult, type WithCaseVariants, type WithCompletionOptions, arg, createCompileCacheShimGenerator, createDefineCommand, createDualCaseProxy, defineCommand, extractFields, formatCommandValidationErrors, formatValidationErrors, generateCompileCacheShim, generateHelp, getUnknownKeysMode, isColorEnabled, isLazyCommand, lazy, logger, parseArgv, renderInline, renderMarkdown, runCommand, runMain, runPolittyCli, setColorEnabled, styles, symbols, toCamelCase, toKebabCase, validateCaseVariantCollisions, validateCommand, validateCrossSchemaCollisions, validateDefaultSubCommand, validateDuplicateAliases, validateDuplicateFields, validateDuplicateNegations, validatePositionalConfig, validateReservedAliases, validateReservedFieldNames, withCompletionCommand };
1075
+ export { type AnyCommand, type ArgFn, type ArgMeta, type ArgSource, type BoundDefineCommandFn, type BuiltinOptionDescriptions, type CamelCase, type CleanupContext, type CollectedLogs, type Command, type CommandBase, type CommandContext, type CommandValidationError, type CommandValidationResult, type CompletionDirectiveMask, type CompletionMeta, type CompletionOptions, type CompletionResult, type CompletionType, type CreateDefineCommandFn, type CustomCompletion, type DefineCommandFn, type DynamicCompletionCandidate, type DynamicCompletionContext, type DynamicCompletionResolver, type DynamicCompletionResult, type EffectContext, type Example, type ExpandCandidate, type ExpandCompletion, type ExtractedFields, type GenerateBundledCompletionWorkerOptions, type GenerateBundledCompletionWorkerResult, type GenerateCompileCacheShimOptions, type GenerateCompileCacheShimResult, type GlobalArgs, type GlobalCleanupContext, type GlobalSetupContext, type HelpData, type HelpDataOptions, type HelpFieldData, type HelpOptions, type HelpSubcommandData, type HelpUsageData, type HelpVariantData, type InferSchemaOutput, type KebabCase, type LazyCommand, type LogEntry, type LogLevel, type LogStream, type Logger, type MainOptions, type MergedArgs, type NonRunnableCommand, type ParsedArgv, type ParserOptions, type PromptMeta, type PromptResolver, type PromptType, type ResolvedExpandCandidate, type ResolvedFieldMeta, type RunCommandOptions, type RunInvocation, type RunResult, type RunResultFailure, type RunResultSuccess, type RunnableCommand, type SchemaLike, type SetupContext, type SubCommandValue, type SubCommandsRecord, type UnknownKeysMode, type UnknownSubcommandHandler, type ValidateArgMeta, type ValidationError, type ValidationResult, type WithCaseVariants, type WithCompletionOptions, isLazyCommand, lazy, toCamelCase, toKebabCase, withCompletionCommand };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{i as e,r as t}from"./field-meta-COGya7xp.js";import{t as n}from"./register-C1WbbeYH.js";import{r,t as i}from"./schema-extractor-DU0Vuhbd.js";import{n as a,t as o}from"./cli-main-KajE103P.js";import{n as s,t as c}from"./command-tLHaJHe6.js";import{C as l,D as u,E as d,O as f,S as p,T as m,_ as h,a as g,b as _,c as v,d as y,f as b,g as x,h as S,i as C,l as w,m as T,n as E,o as D,p as O,r as k,s as A,t as j,u as M,v as N,w as P,x as F,y as I}from"./runner-DECNQyff.js";import{o as L,s as R}from"./subcommand-router-D8GTMXYL.js";import{a as z,i as B,n as V,r as H,t as U}from"./logger-CJsyJ8sb.js";import{t as W}from"./with-completion-command-DM6F5LyO.js";const G=a(`@politty/zod`),K=s,q=c,J=n;export{h as CaseVariantCollisionError,N as DefaultSubCommandError,I as DuplicateAliasError,_ as DuplicateFieldError,F as DuplicateNegationError,p as FieldTypeConflictError,l as PositionalConfigError,P as ReservedAliasError,m as ReservedFieldNameError,J as arg,a as createCompileCacheShimGenerator,q as createDefineCommand,k as createDualCaseProxy,K as defineCommand,i as extractFields,D as formatCommandValidationErrors,C as formatValidationErrors,G as generateCompileCacheShim,d as generateHelp,r as getUnknownKeysMode,U as isColorEnabled,L as isLazyCommand,R as lazy,V as logger,g as parseArgv,u as renderInline,f as renderMarkdown,j as runCommand,E as runMain,o as runPolittyCli,H as setColorEnabled,B as styles,z as symbols,t as toCamelCase,e as toKebabCase,A as validateCaseVariantCollisions,v as validateCommand,w as validateCrossSchemaCollisions,M as validateDefaultSubCommand,y as validateDuplicateAliases,b as validateDuplicateFields,O as validateDuplicateNegations,T as validatePositionalConfig,S as validateReservedAliases,x as validateReservedFieldNames,W as withCompletionCommand};
1
+ import{a as e,i as t}from"./field-meta-D7G8a7IG.js";import{t as n}from"./register-D0mDOOyc.js";import{r,t as i}from"./schema-extractor-QpSHJvwI.js";import{n as a,t as o}from"./cli-main-q4kY1qaL.js";import{n as s,t as c}from"./command-tLHaJHe6.js";import{C as l,D as u,E as d,O as f,S as p,T as m,_ as h,a as g,b as _,c as v,d as y,f as b,g as x,h as S,i as C,k as w,l as T,m as E,n as D,o as O,p as k,r as A,s as j,t as M,u as N,v as P,w as F,x as I,y as L}from"./runner-bjKUtqk1.js";import{o as R,s as z}from"./subcommand-router-D8GTMXYL.js";import{a as B,i as V,n as H,r as U,t as W}from"./logger-CoeDrmRr.js";import{t as G}from"./with-completion-command-CZ9qcezN.js";const K=a(`@politty/zod`),q=s,J=c,Y=n;export{h as CaseVariantCollisionError,P as DefaultSubCommandError,L as DuplicateAliasError,_ as DuplicateFieldError,I as DuplicateNegationError,p as FieldTypeConflictError,l as PositionalConfigError,F as ReservedAliasError,m as ReservedFieldNameError,Y as arg,a as createCompileCacheShimGenerator,J as createDefineCommand,A as createDualCaseProxy,q as defineCommand,i as extractFields,O as formatCommandValidationErrors,C as formatValidationErrors,K as generateCompileCacheShim,d as generateHelp,u as generateHelpData,r as getUnknownKeysMode,W as isColorEnabled,R as isLazyCommand,z as lazy,H as logger,g as parseArgv,f as renderInline,w as renderMarkdown,M as runCommand,D as runMain,o as runPolittyCli,U as setColorEnabled,V as styles,B as symbols,t as toCamelCase,e as toKebabCase,j as validateCaseVariantCollisions,v as validateCommand,T as validateCrossSchemaCollisions,N as validateDefaultSubCommand,y as validateDuplicateAliases,b as validateDuplicateFields,k as validateDuplicateNegations,E as validatePositionalConfig,S as validateReservedAliases,x as validateReservedFieldNames,G as withCompletionCommand};
@@ -0,0 +1 @@
1
+ import{styleText as e}from"node:util";function t(){return process.env.NO_COLOR!==void 0||process.env.FORCE_COLOR===`0`||!process.env.FORCE_COLOR&&!(!process.env.CI&&process.stdout.isTTY)}let n=t();function r(e){n=!e}function i(){return!n}function a(...t){return r=>{if(n)return r;let i=r;for(let n of t)i=e(n,i);return i}}const o={success:a(`green`),error:a(`red`),warning:a(`yellow`),info:a(`cyan`),bold:a(`bold`),dim:a(`dim`),italic:a(`italic`),underline:a(`underline`),red:a(`red`),green:a(`green`),yellow:a(`yellow`),blue:a(`blue`),magenta:a(`magenta`),cyan:a(`cyan`),white:a(`white`),gray:a(`gray`),command:a(`bold`),commandName:a(`bold`,`underline`,`cyan`),option:a(`cyan`),optionName:a(`bold`),placeholder:a(`dim`),defaultValue:a(`dim`),required:a(`yellow`),description:e=>e,sectionHeader:a(`bold`,`underline`),version:a(`dim`)},s={success:o.green(`✓`),error:o.red(`✖`),warning:o.yellow(`⚠`),info:o.cyan(`ℹ`),bullet:o.gray(`•`),arrow:o.gray(`→`)},c={info(e){console.log(e)},success(e){console.log(`${s.success} ${o.success(e)}`)},warn(e){console.warn(`${s.warning} ${o.warning(e)}`)},error(e){console.error(`${s.error} ${o.error(e)}`)},log(e){console.log(e)},newline(){console.log(``)},debug(e){console.log(o.dim(e))}};export{s as a,o as i,c as n,r,i as t};
@@ -1,4 +1,4 @@
1
- import { I as PromptResolver } from "./arg-registry-C-fvuAAg.js";
1
+ import { I as PromptResolver } from "./arg-registry-DdEs3jd0.js";
2
2
  //#region ../core/src/prompt/clack/index.d.ts
3
3
  /**
4
4
  * Prompt resolver backed by @clack/prompts.
@@ -11,6 +11,5 @@ import { I as PromptResolver } from "./arg-registry-C-fvuAAg.js";
11
11
  * runMain(cmd, { version: "1.0.0", prompt });
12
12
  * ```
13
13
  */
14
- declare const prompt: PromptResolver;
15
- //#endregion
16
- export { prompt };
14
+ export declare const prompt: PromptResolver;
15
+ //#endregion
@@ -1 +1 @@
1
- import"./register-C1WbbeYH.js";import{t as e}from"./prompt-CqmGq1_N.js";import{confirm as t,isCancel as n,password as r,select as i,text as a}from"@clack/prompts";function o(){return{text:e=>a({message:e.message,...e.placeholder!==void 0&&{placeholder:e.placeholder}}),password:e=>r(e),confirm:e=>t(e),select:e=>i(e),isCancelled:n}}const s=(t,n)=>e(t,n,{adapter:o()});export{s as prompt};
1
+ import"./register-D0mDOOyc.js";import{t as e}from"./prompt-CqmGq1_N.js";import{confirm as t,isCancel as n,password as r,select as i,text as a}from"@clack/prompts";function o(){return{text:e=>a({message:e.message,...e.placeholder!==void 0&&{placeholder:e.placeholder}}),password:e=>r(e),confirm:e=>t(e),select:e=>i(e),isCancelled:n}}const s=(t,n)=>e(t,n,{adapter:o()});export{s as prompt};
@@ -1,4 +1,4 @@
1
- import { I as PromptResolver } from "./arg-registry-C-fvuAAg.js";
1
+ import { I as PromptResolver } from "./arg-registry-DdEs3jd0.js";
2
2
  //#region ../core/src/prompt/inquirer/index.d.ts
3
3
  /**
4
4
  * Prompt resolver backed by @inquirer/prompts.
@@ -11,6 +11,5 @@ import { I as PromptResolver } from "./arg-registry-C-fvuAAg.js";
11
11
  * runMain(cmd, { version: "1.0.0", prompt });
12
12
  * ```
13
13
  */
14
- declare const prompt: PromptResolver;
15
- //#endregion
16
- export { prompt };
14
+ export declare const prompt: PromptResolver;
15
+ //#endregion
@@ -1 +1 @@
1
- import"./register-C1WbbeYH.js";import{t as e}from"./prompt-CqmGq1_N.js";import{confirm as t,input as n,password as r,select as i}from"@inquirer/prompts";const a=Symbol(`inquirer-cancel`);async function o(e){try{return await e()}catch(e){if(e instanceof Error&&e.name===`ExitPromptError`)return a;throw e}}function s(){return{text:e=>o(()=>n({message:e.message,...e.placeholder!==void 0&&{default:e.placeholder}})),password:e=>o(()=>r({message:e.message})),confirm:e=>o(()=>t({message:e.message})),select:e=>o(()=>i({message:e.message,choices:e.options.map(e=>({name:e.label,value:e.value}))})),isCancelled:e=>e===a}}const c=(t,n)=>e(t,n,{adapter:s()});export{c as prompt};
1
+ import"./register-D0mDOOyc.js";import{t as e}from"./prompt-CqmGq1_N.js";import{confirm as t,input as n,password as r,select as i}from"@inquirer/prompts";const a=Symbol(`inquirer-cancel`);async function o(e){try{return await e()}catch(e){if(e instanceof Error&&e.name===`ExitPromptError`)return a;throw e}}function s(){return{text:e=>o(()=>n({message:e.message,...e.placeholder!==void 0&&{default:e.placeholder}})),password:e=>o(()=>r({message:e.message})),confirm:e=>o(()=>t({message:e.message})),select:e=>o(()=>i({message:e.message,choices:e.options.map(e=>({name:e.label,value:e.value}))})),isCancelled:e=>e===a}}const c=(t,n)=>e(t,n,{adapter:s()});export{c as prompt};
package/dist/prompt.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { X as ExtractedFields, Z as ResolvedFieldMeta } from "./arg-registry-C-fvuAAg.js";
1
+ import { X as ExtractedFields, Z as ResolvedFieldMeta } from "./arg-registry-DdEs3jd0.js";
2
2
  //#region ../core/src/prompt/types.d.ts
3
3
  /**
4
4
  * Resolved prompt configuration for a single field
@@ -61,7 +61,7 @@ interface PromptAdapter {
61
61
  *
62
62
  * Returns null if the field has no prompt metadata or prompting is disabled.
63
63
  */
64
- declare function resolvePromptConfig(field: ResolvedFieldMeta): ResolvedPromptConfig | null;
64
+ export declare function resolvePromptConfig(field: ResolvedFieldMeta): ResolvedPromptConfig | null;
65
65
  /**
66
66
  * Filter fields that need prompting (missing value + prompt configured).
67
67
  *
@@ -75,20 +75,20 @@ declare function resolvePromptConfig(field: ResolvedFieldMeta): ResolvedPromptCo
75
75
  * explicit opt-in to interactive input. Omit prompt metadata to let the
76
76
  * default apply silently.
77
77
  */
78
- declare function getFieldsToPrompt(fields: ResolvedFieldMeta[], rawArgs: Record<string, unknown>): ResolvedPromptConfig[];
78
+ export declare function getFieldsToPrompt(fields: ResolvedFieldMeta[], rawArgs: Record<string, unknown>): ResolvedPromptConfig[];
79
79
  //#endregion
80
80
  //#region ../core/src/prompt/tty-detector.d.ts
81
81
  /**
82
82
  * Detect whether the current environment supports interactive prompts.
83
83
  * Returns false in CI, piped input, or non-TTY environments.
84
84
  */
85
- declare function isInteractive(): boolean;
85
+ export declare function isInteractive(): boolean;
86
86
  //#endregion
87
87
  //#region ../core/src/prompt/index.d.ts
88
88
  /**
89
89
  * Options for promptMissingArgs behavior
90
90
  */
91
- interface PromptOptions {
91
+ export interface PromptOptions {
92
92
  /** Prompt adapter to use for rendering prompts */
93
93
  adapter: PromptAdapter;
94
94
  /** Override interactive detection (force enable/disable prompts) */
@@ -101,6 +101,6 @@ interface PromptOptions {
101
101
  * whose values are still undefined after CLI and env resolution.
102
102
  * Returns rawArgs unchanged in non-interactive environments.
103
103
  */
104
- declare function promptMissingArgs(rawArgs: Record<string, unknown>, extracted: ExtractedFields, options: PromptOptions): Promise<Record<string, unknown>>;
104
+ export declare function promptMissingArgs(rawArgs: Record<string, unknown>, extracted: ExtractedFields, options: PromptOptions): Promise<Record<string, unknown>>;
105
105
  //#endregion
106
- export { type PromptAdapter, PromptOptions, type ResolvedPromptConfig, getFieldsToPrompt, isInteractive, promptMissingArgs, resolvePromptConfig };
106
+ export type { PromptAdapter, ResolvedPromptConfig };