/**
 * Cursor Executor Service
 *
 * Infrastructure implementation of IAgentExecutor for the Cursor agent.
 * Executes prompts via the `cursor-agent` CLI subprocess with JSON and stream-json
 * output formats.
 *
 * Uses constructor dependency injection for the spawn function
 * to enable testability without mocking node:child_process directly.
 */
import type { AgentType, AgentFeature } from '../../../../../domain/generated/output.js';
import type { IAgentExecutor, AgentExecutionOptions, AgentExecutionResult, AgentExecutionStreamEvent } from '../../../../../application/ports/output/agents/agent-executor.interface.js';
import type { SpawnFunction } from '../types.js';
/**
 * Executor service for Cursor agent.
 * Uses subprocess spawning to interact with the `cursor-agent` CLI.
 */
export declare class CursorExecutorService implements IAgentExecutor {
    private readonly spawn;
    readonly agentType: AgentType;
    /** When true, suppresses debug logging (set per-call via options.silent) */
    private silent;
    constructor(spawn: SpawnFunction);
    /** Debug logging — writes to stdout so it appears in the worker log file */
    private log;
    supportsFeature(feature: AgentFeature): boolean;
    execute(prompt: string, options?: AgentExecutionOptions): Promise<AgentExecutionResult>;
    executeStream(prompt: string, options?: AgentExecutionOptions): AsyncIterable<AgentExecutionStreamEvent>;
    /**
     * Log a stream-json line as a human-readable event in the worker log.
     */
    private logStreamEvent;
    private buildArgs;
    private buildStreamArgs;
    /**
     * Spawn the agent process, handling Windows specially via PowerShell.
     *
     * On Windows, cursor CLI ships as `cursor-agent.cmd` which requires `shell: true`,
     * but cmd.exe mangles long `-p` arguments (8191-char limit + special chars).
     * Solution: write prompt to a temp file, invoke cursor-agent via PowerShell which
     * reads the file and passes the content as `-p`. PowerShell handles long
     * strings natively (32K limit) and doesn't mangle arguments.
     *
     * On Linux/macOS, spawn `cursor-agent` directly — no shell needed.
     */
    private spawnAgent;
    private parseStreamLine;
}
//# sourceMappingURL=cursor-executor.service.d.ts.map