import { type RequestContext } from '../../utils/internal/requestContext.js';
/**
 * Utility class for parsing YAML strings.
 *
 * Lazily loads `js-yaml` on first use (peer dependency — install with `bun add js-yaml`).
 * Handles optional `<think>...</think>` blocks that some LLMs prepend to structured output;
 * the block's content is logged at debug level and stripped before parsing.
 */
export declare class YamlParser {
    /**
     * Parses a YAML string into a typed JavaScript object.
     *
     * This method is async because `js-yaml` is loaded lazily on first call.
     * If the input begins with a `<think>...</think>` block, that block is stripped
     * and its content logged before parsing the remainder. Uses `js-yaml`'s
     * `YAML11_SCHEMA` (YAML 1.1 load semantics) for parsing.
     *
     * @template T - The expected type of the parsed result. Defaults to `unknown`.
     * @param yamlString - The YAML string to parse. May be prefixed with a `<think>` block.
     * @param context - Optional request context for correlated logging and error metadata.
     * @returns A promise resolving to the parsed object cast to `T`.
     * @throws {McpError} With code `ConfigurationError` if `js-yaml` is not installed.
     * @throws {McpError} With code `ValidationError` if the string is empty after stripping
     *   the `<think>` block, or if `js-yaml` fails to parse the content.
     * @example
     * ```typescript
     * import { yamlParser } from '../../utils/parsing/yamlParser.js';
     *
     * const result = await yamlParser.parse<{ key: string }>('key: value');
     * console.log(result.key); // 'value'
     *
     * // LLM output with a <think> preamble
     * const fromLlm = await yamlParser.parse('<think>reasoning</think>\nkey: value');
     * console.log(fromLlm); // { key: 'value' }
     * ```
     */
    parse<T = unknown>(yamlString: string, context?: RequestContext): Promise<T>;
}
/**
 * Singleton instance of {@link YamlParser}.
 *
 * Prefer this over constructing a new `YamlParser` directly. Lazily loads `js-yaml`
 * on first call, so there is no startup cost if YAML parsing is never used.
 *
 * @example
 * ```typescript
 * import { yamlParser } from '../../utils/parsing/yamlParser.js';
 *
 * // Basic parse
 * const result = await yamlParser.parse<{ name: string }>('name: Claude');
 * console.log(result.name); // 'Claude'
 *
 * // With request context for correlated logging
 * import { requestContextService } from '../../utils/internal/requestContext.js';
 * const ctx = requestContextService.createRequestContext({ operation: 'parseConfig' });
 * const config = await yamlParser.parse<AppConfig>(rawYaml, ctx);
 *
 * // Strips LLM <think> preamble automatically
 * const fromLlm = await yamlParser.parse('<think>let me think</think>\nkey: value');
 * console.log(fromLlm); // { key: 'value' }
 * ```
 */
export declare const yamlParser: YamlParser;
//# sourceMappingURL=yamlParser.d.ts.map