import type { GatewayConfig, ModelConfig, Usage } from "../types/index.js";
import { Container } from "../utils/container.js";
export interface AIManagerCallbacks {
    onCompressionStateChange?: (isCompressing: boolean) => void;
    onUsageAdded?: (usage: Usage) => void;
}
export interface AIManagerOptions {
    callbacks?: AIManagerCallbacks;
    workdir: string;
    systemPrompt?: string;
    subagentType?: string;
    /**Whether to use streaming mode for AI responses - defaults to true */
    stream?: boolean;
    /**Optional model override (e.g. for subagents) */
    modelOverride?: string;
}
export declare class AIManager {
    private container;
    isLoading: boolean;
    private abortController;
    private toolAbortController;
    private workdir;
    private systemPrompt?;
    private subagentType?;
    private stream;
    private modelOverride?;
    constructor(container: Container, options: AIManagerOptions);
    private get toolManager();
    private get messageManager();
    private get memoryService();
    private get taskManager();
    private get backgroundTaskManager();
    private get hookManager();
    private get reversionManager();
    private get permissionManager();
    private get configurationService();
    getGatewayConfig(): GatewayConfig;
    getModelConfig(): ModelConfig;
    getMaxInputTokens(): number;
    getLanguage(): string | undefined;
    getAutoMemoryEnabled(): boolean;
    private isCompressing;
    private callbacks;
    /**
     * Get filtered tool configuration based on tools list
     */
    private getFilteredToolsConfig;
    setIsLoading(isLoading: boolean): void;
    abortAIMessage(): void;
    private generateCompactParams;
    private handleTokenUsageAndCompression;
    getIsCompressing(): boolean;
    setIsCompressing(isCompressing: boolean): void;
    private get subagentManager();
    private get skillManager();
    sendAIMessage(options?: {
        recursionDepth?: number;
        model?: string;
        /** Rules for automatic tool approval (e.g., "Bash(git status*)") */
        allowedRules?: string[];
        maxTokens?: number;
    }): Promise<void>;
    /**
     * Execute Stop or SubagentStop hooks when AI response cycle completes
     * Uses "SubagentStop" hook name when triggered by a subagent, otherwise uses "Stop"
     * @returns Promise<boolean> - true if should continue conversation, false if should stop
     */
    private executeStopHooks;
    /**
     * Execute PreToolUse hooks before tool execution
     * Returns true if hooks allow tool execution, false if blocked
     */
    private executePreToolUseHooks;
    /**
     * Execute PostToolUse hooks after tool completion
     */
    private executePostToolUseHooks;
}
//# sourceMappingURL=aiManager.d.ts.map