import { type Command } from 'commander'; import type { MEMOConfig, ToolchainConfig } from '../model/config.js'; import type { ProviderRegistry, ToolchainSchemaLeaf } from './registry.js'; /** `toolchain.syside.executable` — the option name and the settings path. */ export declare function toolchainOptionName(leaf: ToolchainSchemaLeaf): string; /** The flag string commander is given, e.g. `--toolchain.syside.executable `. */ export declare function toolchainOptionFlag(leaf: ToolchainSchemaLeaf): string; /** * Add every generated option to a command. * * Commander stores an option whose name contains dots under that exact key — * it only camel-cases across dashes — so `opts()['toolchain.syside.executable']` * is what comes back, and the settings path is recoverable without a lookup * table that could drift from the schema. */ export declare function applyToolchainCliOptions(command: Command, registry: ProviderRegistry): Command; export declare class ToolchainOptionError extends Error { } /** Turn parsed CLI options into a partial `toolchain` block. */ export declare function toolchainOverridesFromCliOptions(options: Record, registry: ProviderRegistry): ToolchainConfig; /** * Apply overrides on top of loaded settings. * * A flag beats the settings file leaf by leaf, so `--toolchain.syside.diagnose` * does not discard a configured `--toolchain.syside.executable`. */ export declare function applyToolchainOverrides(config: MEMOConfig, overrides: ToolchainConfig): MEMOConfig; /** Convenience for a command: read its options, merge, hand back settings. */ export declare function withToolchainOverrides(config: MEMOConfig, options: Record, registry: ProviderRegistry): MEMOConfig; //# sourceMappingURL=schema.d.ts.map