import { CommandSpec } from './types.ts';
export declare function specOf(name: string): CommandSpec;
export declare const BUILTIN_SPECS: Readonly<Record<string, CommandSpec>>;
/**
 * The spec plus whichever of --help / --version it does not declare.
 *
 * Mirrors GNU coreutils: every command accepts both, so both have to parse
 * before a handler can short-circuit them. A command declaring either keeps
 * its own. `help_spec` in builtin_specs/__init__.py is the twin.
 */
export declare function helpSpec(spec: CommandSpec): CommandSpec;
export declare const BUILTIN_HELP_SPECS: Readonly<Record<string, CommandSpec>>;
/**
 * The spec the registry parses for this command.
 *
 * `helpSpec`, except that a builtin gets the one shared copy rather than a
 * fresh one per registration, so `isBuiltinGrammar` can answer with a pointer
 * compare. `registered_spec` in builtin_specs/__init__.py is the twin.
 */
export declare function registeredSpec(name: string, spec: CommandSpec): CommandSpec;
/**
 * Whether `spec` is the builtin `name`'s own grammar.
 *
 * The measured per-program rules (NO_LONG_OPTIONS,
 * SOLE_ARGUMENT_LONG_OPTIONS, DIGIT_OPTIONS, LONG_SYNONYMS, IN_ORDER_OPERANDS,
 * LETTER_OPTIONS) describe one real program, so a mount that
 * registers its own command under a builtin's name must not inherit them:
 * nothing refuses that registration, and `expr` is the sharp case, where the
 * rule turns a declared `--mode=x` into an operand its handler then never
 * sees.
 *
 * A name is not an identity, and neither is the declared spec on its own:
 * the registry parses an enriched COPY (config.ts appends the two standard
 * options), so both forms count and both are compared by object.
 * `is_builtin_grammar` in builtin_specs/__init__.py is the twin.
 */
export declare function isBuiltinGrammar(name: string, spec: CommandSpec | null): boolean;
//# sourceMappingURL=builtins.d.ts.map