import type { PromptMode, PromptSectionDefinition, PromptSectionSource, SectionRenderContext } from "./types.js";
export declare function resolveSectionSource(section: PromptSectionDefinition): PromptSectionSource;
/**
 * Collects prompt section definitions and assembles the final system prompt.
 *
 * Sections register themselves with the registry. At prompt-build time, the
 * registry resolves which sections apply (by mode and available tools), orders
 * them, and calls each render function to produce the final prompt string.
 */
export declare class PromptSectionRegistry {
    private sections;
    /** Register a section definition. Throws on duplicate id. */
    register(section: PromptSectionDefinition): void;
    /** Register multiple sections at once. */
    registerAll(sections: PromptSectionDefinition[]): void;
    /** Get a section by id, or undefined. */
    get(id: string): PromptSectionDefinition | undefined;
    /** Get all registered sections, sorted by order. */
    getAll(): PromptSectionDefinition[];
    /**
     * Resolve which sections apply for the given mode and available tools.
     * Returns sections sorted by order.
     *
     * A section is included if:
     * 1. Its modes array includes the given mode
     * 2. All requiredTools (if any) are in availableTools
     * 3. At least one anyOfTools (if any) is in availableTools
     *
     * Note: Complex conditions beyond mode/tools are handled in the render function
     * (which returns [] to self-exclude, per D-04).
     */
    resolve(mode: PromptMode, availableTools: Set<string>): PromptSectionDefinition[];
    /**
     * Assemble the final system prompt string from resolved sections.
     * Each section's render function is called; empty returns are skipped.
     * Lines are joined with "\n" and filtered for truthiness (matching
     * the existing `lines.filter(Boolean).join("\n")` pattern).
     */
    assemble(mode: PromptMode, ctx: SectionRenderContext): string;
    /**
     * Like assemble(), but also returns per-section char breakdown for traceability.
     * Each resolved section reports its id, layer, label, chars produced, and order.
     * Sections that render empty output are included with chars=0.
     */
    assembleWithSections(mode: PromptMode, ctx: SectionRenderContext): {
        prompt: string;
        sections: Array<{
            id: string;
            layer: string;
            label: string;
            chars: number;
            order: number;
            /** Phase D-0e: rendered text content for traceability viewers. */
            content: string;
            /** Phase D-0e/f: where this section's content originates. */
            source: PromptSectionSource;
        }>;
    };
    /**
     * Get metadata for all sections (id, layer, cacheable, header, order).
     * Used by prompt-cache.ts to determine cacheability without hardcoded headers.
     */
    getSectionMeta(): Array<{
        id: string;
        layer: string;
        cacheable: boolean;
        header: string | undefined;
        order: number;
    }>;
    /** Number of registered sections. */
    get size(): number;
}
