import { LisaError } from "../errors/index.js";
/** The only js-yaml surface Lisa consumes. */
export interface YamlApi {
    /**
     * Parse a single YAML document.
     * @param source - YAML text
     * @returns The parsed document
     */
    readonly load: (source: string) => unknown;
}
/** Human-readable statement of what Lisa can drive. */
export declare const SUPPORTED_JS_YAML_DESCRIPTION = "js-yaml 3.x, 4.x and 5.x (any build exposing a load() function)";
/**
 * Raised when the resolved js-yaml cannot be driven by Lisa.
 *
 * Carries the remediation inline: the operator reading this in a postinstall
 * warning has no other context to work from.
 */
export declare class IncompatibleYamlError extends LisaError {
    /**
     * Build the operator-facing incompatibility message.
     * @param shape - Short description of what the resolved module did expose
     */
    constructor(shape: string);
}
/**
 * Resolve Lisa's YAML surface from a js-yaml module namespace, tolerating both
 * the named-export shape (3.x/4.x/5.x ESM) and the CJS interop shape where the
 * whole module hangs off `default`.
 *
 * Exported so `lisa doctor` can probe compatibility without parsing anything,
 * and so the failure path is directly testable.
 * @param moduleNamespace - The resolved js-yaml module namespace
 * @returns The YAML surface Lisa uses
 * @throws IncompatibleYamlError when no callable `load` can be found
 */
export declare function resolveYamlApi(moduleNamespace: unknown): YamlApi;
/**
 * Parse a single YAML document using whichever js-yaml the install resolved.
 * @param source - YAML text
 * @returns The parsed document
 * @throws IncompatibleYamlError when the resolved js-yaml is unusable
 */
export declare function loadYaml(source: string): unknown;
/**
 * Probe the js-yaml this process actually resolved.
 *
 * Never throws: `lisa doctor` turns the result into a check line, and a doctor
 * that crashed on the very incompatibility it is meant to report would be the
 * silent-failure bug all over again.
 * @returns The incompatibility message, or null when the resolved js-yaml works
 */
export declare function probeYamlRuntime(): string | null;
//# sourceMappingURL=yaml.d.ts.map