import { RuntimeAgentService, type McpConfigResult } from './runtime-agent.service.abstract.js';
import { SessionCommandHelper } from '../session/index.js';
import { type RuntimeType } from '../../constants.js';
/**
 * Claude Code specific runtime service implementation.
 * Handles Claude Code CLI initialization, detection, and interaction patterns.
 */
export declare class ClaudeRuntimeService extends RuntimeAgentService {
    constructor(sessionHelper: SessionCommandHelper, projectRoot: string);
    protected getRuntimeType(): RuntimeType;
    /**
     * Claude Code specific detection using slash command
     */
    protected detectRuntimeSpecific(sessionName: string): Promise<boolean>;
    /**
     * Detect the Claude Code workspace trust prompt in terminal output.
     *
     * Claude Code shows "Is this a project you trust?" on first launch
     * for untrusted workspaces. This blocks agent initialization.
     *
     * @param output - Terminal output text
     * @returns True if trust prompt is detected
     * @see https://github.com/stevehuang0115/crewly/issues/144
     */
    private isClaudeTrustPrompt;
    /**
     * Override waitForRuntimeReady to auto-accept workspace trust prompt (#144).
     *
     * Claude Code shows an interactive trust gate on first launch for
     * untrusted workspaces. Without auto-acceptance, the agent hangs
     * and enters a crash-restart loop.
     */
    waitForRuntimeReady(sessionName: string, timeout: number, checkInterval?: number): Promise<boolean>;
    /**
     * Claude Code specific ready patterns
     */
    protected getRuntimeReadyPatterns(): string[];
    /**
     * Claude Code specific exit patterns for runtime exit detection.
     *
     * Includes both clean exit patterns (e.g. "Claude Code exited") and
     * fatal error patterns that indicate the CLI is stuck in an unrecoverable
     * state (e.g. thinking block corruption).
     *
     * @returns Array of RegExp patterns that match runtime exit or fatal output
     */
    protected getRuntimeExitPatterns(): RegExp[];
    /**
     * Claude Code specific error patterns
     */
    protected getRuntimeErrorPatterns(): string[];
    /**
     * Check if Claude Code CLI is installed on the system
     */
    checkClaudeInstallation(): Promise<{
        installed: boolean;
        version?: string;
        message: string;
    }>;
    /**
     * Initialize Claude in an existing session (legacy compatibility)
     */
    initializeClaudeInSession(sessionName: string): Promise<{
        success: boolean;
        message?: string;
        error?: string;
    }>;
    /**
     * Enhanced Claude detection using slash command with detailed analysis
     * This is the legacy method that provides more detailed detection than the base detectRuntimeSpecific
     */
    detectClaudeWithSlashCommand(sessionName: string, forceRefresh?: boolean): Promise<boolean>;
    /**
     * Execute Claude initialization script (legacy compatibility)
     */
    executeClaudeInitScript(sessionName: string, targetPath?: string): Promise<void>;
    /**
     * Post-initialization hook for Claude Code.
     * Ensures MCP server configuration (e.g., playwright) is present in the project directory.
     *
     * @param sessionName - PTY session name
     * @param targetProjectPath - Optional target project path for MCP config.
     *                            Falls back to this.projectRoot if not provided.
     */
    postInitialize(sessionName: string, targetProjectPath?: string, _additionalAllowlistPaths?: string[], browserAutomationOverride?: boolean): Promise<void>;
    /**
     * Ensure Claude Code MCP server configuration exists in the project directory.
     *
     * Creates or merges `.mcp.json` with required MCP servers.
     * Delegates to the shared `ensureMcpConfig` in the base class.
     *
     * @param projectPath - Project directory where `.mcp.json` will be created
     * @returns Result of the MCP config operation
     */
    ensureClaudeMcpConfig(projectPath: string, browserAutomationOverride?: boolean): Promise<McpConfigResult>;
}
//# sourceMappingURL=claude-runtime.service.d.ts.map