import { PromptModule, ModuleConfig, ModuleBuildResult, AssemblyReport, TruncatedModuleInfo } from './prompt-module.interface.js';
/**
 * Service that orchestrates the assembly of prompt modules into a complete agent prompt.
 *
 * Responsibilities:
 * - Registers and manages prompt modules
 * - Assembles modules in priority order
 * - Enforces per-module and total token budgets with 2-stage truncation:
 *   1. First pass: build all Trusted Zone (non-compactable) + Flexible Zone modules
 *   2. If over budget: trim lowest-priority compactable modules to 50% of maxTokens
 *   3. If still over budget: remove lowest-priority compactable modules entirely
 * - Returns AssemblyReport with token breakdown and truncation details
 *
 * @example
 * ```typescript
 * const assembler = new PromptAssemblyService();
 * const { prompt, report } = await assembler.assemble({
 *   sessionName: 'crewly-dev-001',
 *   memberId: 'uuid-123',
 *   role: 'developer',
 *   projectPath: '/path/to/project',
 *   agentSkillsPath: '/path/to/skills/agent',
 *   tlSkillsPath: '/path/to/skills/team-leader',
 *   projectRoot: '/path/to/project',
 * });
 * ```
 */
export declare class PromptAssemblyService {
    private logger;
    private modules;
    private totalTokenBudget;
    constructor(tokenBudget?: number);
    /**
     * Register the default set of prompt modules.
     * Called automatically in constructor. Additional modules
     * can be added via addModule().
     */
    private registerDefaultModules;
    /**
     * Add a custom prompt module to the assembly pipeline.
     *
     * @param module - Module to add
     */
    addModule(module: PromptModule): void;
    /**
     * Remove a module by name.
     *
     * @param name - Name of the module to remove
     */
    removeModule(name: string): void;
    /**
     * Get all registered modules (for inspection/testing).
     *
     * @returns Array of registered prompt modules
     */
    getModules(): PromptModule[];
    /**
     * Get or set the total token budget.
     *
     * @param budget - Optional new budget to set
     * @returns Current token budget
     */
    tokenBudget(budget?: number): number;
    /**
     * Assemble all applicable prompt modules into a single prompt string.
     *
     * Uses 2-stage truncation for compactable modules when over budget:
     * 1. Trim lowest-priority compactable modules to 50% of their content
     * 2. Remove lowest-priority compactable modules entirely
     *
     * Trusted Zone (non-compactable) modules are never truncated or removed.
     *
     * @param config - Configuration with all context needed by modules
     * @returns Object with assembled prompt string and budget report
     */
    assemble(config: ModuleConfig): Promise<{
        prompt: string;
        report: AssemblyReport;
    }>;
    /**
     * Assemble modules and return detailed results with per-module metadata.
     * Convenience wrapper that returns just the report (same as assemble().report).
     *
     * @param config - Configuration with all context needed by modules
     * @returns Assembly details with prompt, modules, and total tokens
     */
    assembleWithDetails(config: ModuleConfig): Promise<{
        prompt: string;
        modules: ModuleBuildResult[];
        totalTokens: number;
        truncated: TruncatedModuleInfo[];
    }>;
    /**
     * Trim content to a target fraction of its original length.
     * Trims at line boundaries to avoid cutting mid-sentence.
     *
     * @param content - Original content string
     * @param fraction - Target fraction (e.g., 0.5 for 50%)
     * @returns Trimmed content
     */
    private trimContent;
}
//# sourceMappingURL=prompt-assembly.service.d.ts.map