import { SlashCommand, CustomSlashCommand, AgentOptions } from "./types/index.js";
import type { Message, McpServerStatus, GatewayConfig, ModelConfig, Usage, PermissionMode, ForegroundTask } from "./types/index.js";
export declare class Agent {
    private messageManager;
    private aiManager;
    private bangManager;
    private backgroundTaskManager;
    private logger?;
    private toolManager;
    private mcpManager;
    private lspManager;
    private permissionManager;
    private planManager;
    private subagentManager;
    private forkedAgentManager;
    private slashCommandManager;
    private pluginManager;
    private skillManager;
    private cronManager;
    private hookManager;
    private reversionManager;
    private notificationQueue;
    private memoryRuleManager;
    private liveConfigManager;
    private taskManager;
    private foregroundTaskManager;
    private container;
    private configurationService;
    private workdir;
    private systemPrompt?;
    private stream;
    private options;
    private _projectMemoryContent;
    private _userMemoryContent;
    getGatewayConfig(): GatewayConfig;
    getModelConfig(): ModelConfig;
    getMaxInputTokens(): number;
    getLanguage(): string | undefined;
    /**
     * Set the active model for the agent session
     * @param model - The ID of the model to use
     */
    setModel(model: string): void;
    /**
     * Get all configured models from settings.json and defaults
     * @returns Array of model IDs
     */
    getConfiguredModels(): string[];
    /**
     * Agent constructor - handles configuration resolution and validation
     *
     * IMPORTANT: This constructor is private. Use Agent.create() instead for proper
     * async initialization. Keep this constructor's signature exactly the same as
     * Agent.create() to maintain API consistency.
     *
     * @param options - Configuration options for the Agent instance
     */
    private constructor();
    get sessionId(): string;
    get messages(): Message[];
    get usages(): Usage[];
    get sessionFilePath(): string;
    get latestTotalTokens(): number;
    /** Get working directory */
    get workingDirectory(): string;
    /** Get project memory content */
    get projectMemory(): string;
    /** Get user memory content */
    get userMemory(): string;
    /** Get combined memory content (project + user + modular rules) */
    getCombinedMemory(): Promise<string>;
    /** Get AI loading status */
    get isLoading(): boolean;
    /** Get message compression status */
    get isCompressing(): boolean;
    /** Get bash command execution status */
    get isCommandRunning(): boolean;
    /** Get background bash shell output */
    getBackgroundShellOutput(id: string, filter?: string): {
        stdout: string;
        stderr: string;
        status: string;
        outputPath?: string;
        type: string;
        exitCode?: number;
    } | null;
    /** Kill background bash shell */
    killBackgroundShell(id: string): boolean;
    /** Get background task output */
    getBackgroundTaskOutput(id: string, filter?: string): {
        stdout: string;
        stderr: string;
        status: string;
        outputPath?: string;
        type: string;
        exitCode?: number;
    } | null;
    /** Stop background task */
    stopBackgroundTask(id: string): boolean;
    /**
     * Static async factory method for creating Agent instances
     *
     * IMPORTANT: Keep this method's signature exactly the same as the constructor
     * to maintain consistency and avoid confusion for users of the API.
     *
     * @param options - Same AgentOptions interface used by constructor
     * @returns Promise<Agent> - Fully initialized Agent instance
     */
    /**
     * Create a new Agent instance with async initialization
     *
     * This is the recommended way to create Agent instances. The constructor is private
     * to ensure proper async initialization of all components.
     *
     * @param options - Configuration options for the Agent instance
     * @param options.apiKey - API key for the AI service (or set WAVE_API_KEY env var)
     * @param options.baseURL - Base URL for the AI service (or set WAVE_BASE_URL env var)
     * @param options.defaultHeaders - Optional HTTP headers to pass to the AI service
     * @param options.fetchOptions - Optional fetch options to pass to the AI service
     * @param options.fetch - Optional custom fetch implementation
     * @param options.callbacks - Optional callbacks for various Agent events
     * @param options.restoreSessionId - Optional session ID to restore from
     * @param options.continueLastSession - Whether to continue the last session automatically
     * @param options.logger - Optional custom logger implementation
     * @param options.messages - Optional initial messages for testing convenience
     * @param options.workdir - Working directory (defaults to process.cwd())
     * @param options.systemPrompt - Optional custom system prompt
     * @returns Promise that resolves to initialized Agent instance
     *
     * @example
     * ```typescript
     * // Basic usage
     * const agent = await Agent.create({
     *   apiKey: 'your-api-key',
     *   baseURL: 'https://api.example.com'
     * });
     * ```
     */
    static create(options: AgentOptions): Promise<Agent>;
    /**
     * Resolve and validate configuration from constructor args, environment variables,
     * and loaded settings.json.
     *
     * This is called during initialization after settings.json has been loaded.
     */
    private resolveAndValidateConfig;
    /** Private initialization method, handles async initialization logic */
    private initialize;
    /**
     * Restore a session by ID, switching to the target session without destroying the Agent instance
     * @param sessionId - The ID of the session to restore
     */
    restoreSession(sessionId: string): Promise<void>;
    abortAIMessage(): void;
    /**
     * Process pending background task notifications by injecting them as user messages
     * and triggering a new AI response cycle.
     */
    private processPendingNotifications;
    /** Execute bash command (bang command) */
    bang(command: string): Promise<void>;
    clearMessages(): Promise<void>;
    /** Unified interrupt method, interrupts both AI messages and command execution */
    abortMessage(): void;
    /** Interrupt bash command execution */
    abortBashCommand(): void;
    /** Interrupt slash command execution */
    abortSlashCommand(): void;
    /**
     * Register a foreground task that can be backgrounded
     */
    registerForegroundTask(task: ForegroundTask): void;
    /**
     * Unregister a foreground task
     */
    unregisterForegroundTask(id: string): void;
    /**
     * Background the current foreground task
     */
    backgroundCurrentTask(): Promise<void>;
    /** Destroy managers, clean up resources */
    destroy(): Promise<void>;
    /**
     * Trigger the rewind UI callback
     */
    triggerShowRewind(): void;
    /**
     * Ask a side question without tool use
     * @param question - The side question to ask
     * @returns Promise that resolves to the AI's answer
     */
    askBtw(question: string): Promise<string>;
    /**
     * Send a message to the AI agent with optional images
     *
     * @param content - The text content of the message to send
     * @param images - Optional array of images to include with the message
     * @param images[].path - File path to the image or base64 encoded image data
     * @param images[].mimeType - MIME type of the image (e.g., 'image/png', 'image/jpeg')
     * @returns Promise that resolves when the message has been processed
     *
     * @example
     * ```typescript
     * // Send a text message
     * await agent.sendMessage("Hello, how are you?");
     *
     * // Send a message with images using file paths
     * await agent.sendMessage("What do you see in these images?", [
     *   { path: "/path/to/image.png", mimeType: "image/png" },
     *   { path: "/path/to/photo.jpg", mimeType: "image/jpeg" }
     * ]);
     *
     * // Send a message with base64 encoded image
     * await agent.sendMessage("Analyze this image", [
     *   { path: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...", mimeType: "image/png" }
     * ]);
     * ```
     */
    sendMessage(content: string, images?: Array<{
        path: string;
        mimeType: string;
    }>): Promise<void>;
    /** Get all MCP server status */
    getMcpServers(): McpServerStatus[];
    /** Connect MCP server */
    connectMcpServer(serverName: string): Promise<boolean>;
    /** Disconnect MCP server */
    disconnectMcpServer(serverName: string): Promise<boolean>;
    /** Get all available slash commands */
    getSlashCommands(): SlashCommand[];
    /** Check if slash command exists */
    hasSlashCommand(commandId: string): boolean;
    /** Reload custom commands */
    reloadCustomCommands(): Promise<void>;
    /** Get custom command details */
    getCustomCommand(commandId: string): CustomSlashCommand | undefined;
    /** Get all custom commands */
    getCustomCommands(): CustomSlashCommand[];
    /**
     * Register a custom slash command
     */
    registerSlashCommand(command: SlashCommand): void;
    /**
     * Get the current permission mode
     */
    getPermissionMode(): PermissionMode;
    /**
     * Set the permission mode
     * @param mode - The new permission mode
     */
    setPermissionMode(mode: PermissionMode): void;
    /**
     * Truncate history to a specific index and revert file changes.
     * @param index - The index of the user message to truncate to.
     */
    truncateHistory(index: number): Promise<void>;
    /**
     * Get the full message thread including parent sessions
     */
    getFullMessageThread(): Promise<{
        messages: Message[];
        sessionIds: string[];
    }>;
    /**
     * Get the current plan file path (for testing and UI)
     */
    getPlanFilePath(): string | undefined;
    /**
     * Get all currently allowed rules (user-defined and default)
     */
    getAllowedRules(): string[];
    /**
     * Get only user-defined allowed rules
     */
    getUserAllowedRules(): string[];
    /**
     * Check permission for a tool call (for testing)
     */
    checkPermission(context: import("./types/permissions.js").ToolPermissionContext): Promise<import("./types/permissions.js").PermissionDecision>;
    /**
     * Add a persistent permission rule
     * @param rule - The rule to add (e.g., "Bash(ls)")
     */
    addPermissionRule(rule: string): Promise<void>;
    /**
     * Get subagent instance by ID
     * @param subagentId - The ID of the subagent instance
     * @returns The subagent instance or null if not found
     */
    getSubagentInstance(subagentId: string): import("./managers/subagentManager.js").SubagentInstance | null;
    /**
     * Get the current task list ID
     */
    get taskListId(): string;
}
//# sourceMappingURL=agent.d.ts.map