import type { B2CInstance } from '../instance/index.js'; import type { Scaffold, ScaffoldParameter, ScaffoldChoice } from './types.js'; /** * Options for resolving scaffold parameters. */ export interface ResolveParametersOptions { /** Pre-provided variables (from flags, env, etc.) */ providedVariables?: Record; /** Project root for resolving local sources */ projectRoot?: string; /** B2C instance for resolving remote sources (sites) */ b2cInstance?: B2CInstance; /** Use defaults for missing values instead of erroring */ useDefaults?: boolean; } /** * Error encountered during parameter validation. */ export interface ParameterResolutionError { /** Parameter name */ parameter: string; /** Error message */ message: string; /** The invalid value, if applicable */ value?: unknown; /** Available choices, if applicable */ availableChoices?: string[]; } /** * Result of resolving scaffold parameters. */ export interface ResolvedParameters { /** All resolved variable values */ variables: Record; /** Parameters still missing values (need prompting) */ missingParameters: ScaffoldParameter[]; /** Validation errors encountered */ errors: ParameterResolutionError[]; } /** * Schema for a resolved parameter with source choices populated. */ export interface ResolvedParameterSchema { /** Parameter definition */ parameter: ScaffoldParameter; /** Resolved choices from dynamic source */ resolvedChoices?: ScaffoldChoice[]; /** Path map for cartridges (name -> absolute path) */ pathMap?: Map; /** Warning message if source resolution failed */ warning?: string; } /** * Resolve scaffold parameters by: * 1. Validating provided variables against sources * 2. Setting companion path variables for cartridges * 3. Applying defaults where appropriate * 4. Filtering by condition (`when` field) * 5. Collecting missing required parameters * * @param scaffold - The scaffold to resolve parameters for * @param options - Resolution options * @returns Resolved parameters, missing parameters, and any errors */ export declare function resolveScaffoldParameters(scaffold: Scaffold, options?: ResolveParametersOptions): Promise; /** * Parse key=value option strings into variables object. * Handles boolean values and array values for multi-choice params. * * @param options - Array of "key=value" strings * @param scaffold - Optional scaffold for multi-choice detection * @returns Variables object */ export declare function parseParameterOptions(options: string[], scaffold?: Scaffold): Record; /** * Get parameter metadata with resolved source choices. * Useful for MCP/other consumers to build input schemas. * * @param scaffold - The scaffold to get parameter schemas for * @param options - Options for resolving sources * @returns Array of resolved parameter schemas */ export declare function getParameterSchemas(scaffold: Scaffold, options?: { projectRoot?: string; b2cInstance?: B2CInstance; }): Promise;