/**
 * Spec Parser
 *
 * Parses living docs to extract documented API endpoints and function signatures.
 *
 * @module core/discrepancy/spec-parser
 */
import { Logger } from '../../utils/logger.js';
/**
 * Type of specification (API route or function).
 */
export type SpecType = 'api' | 'function' | 'type';
/**
 * Represents a parsed specification from living docs.
 */
export interface ParsedSpec {
    type: SpecType;
    source: string;
    lineNumber: number;
    identifier: string;
    description: string;
    method?: string;
    params?: string[];
    returnType?: string;
    metadata?: Record<string, unknown>;
}
/**
 * Configuration for the spec parser.
 */
export interface SpecParserConfig {
    /** Base path for living docs */
    docsPath?: string;
}
/**
 * Result of spec parsing.
 */
export interface SpecParseResult {
    specs: ParsedSpec[];
    errors: string[];
}
/**
 * Parses living docs to extract documented behavior.
 */
export declare class SpecParser {
    private readonly logger;
    private readonly config;
    constructor(options?: {
        logger?: Logger;
        config?: SpecParserConfig;
    });
    /**
     * Parse all specs from the living docs directory.
     */
    parseAll(docsPath?: string): Promise<SpecParseResult>;
    /**
     * Parse a single markdown file for specs.
     */
    parseFile(filePath: string): Promise<SpecParseResult>;
    /**
     * Parse API specs from a docs path.
     */
    parseApiSpecs(docsPath: string): Promise<ParsedSpec[]>;
    /**
     * Parse function specs from a docs path.
     */
    parseFunctionSpecs(docsPath: string): Promise<ParsedSpec[]>;
    private parseApiLine;
    private parseFunctionLine;
    private parseTypeLine;
    private extractDescription;
    private extractRouteParams;
    private findMarkdownFiles;
}
//# sourceMappingURL=spec-parser.d.ts.map