/**
 * Copilot CLI Executor Service
 *
 * Infrastructure implementation of IAgentExecutor for the GitHub Copilot CLI agent.
 * Executes prompts via the `copilot` CLI subprocess with JSONL output format.
 *
 * Key differences from other executors:
 * - Prompt is delivered via the -p flag (not stdin piping)
 * - Large prompts use temp-file indirection to avoid Windows ENAMETOOLONG spawn failures
 * - Auth is GitHub OAuth only — no API key injection is possible or supported
 * - --resume=<sessionId> format (with equals sign) for session resume
 *
 * Uses constructor dependency injection for the spawn function
 * to enable testability without mocking node:child_process directly.
 */
import type { AgentType, AgentFeature, AgentConfig } 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 GitHub Copilot CLI agent.
 * Uses subprocess spawning to interact with the `copilot` CLI.
 */
export declare class CopilotCliExecutorService implements IAgentExecutor {
    private readonly spawn;
    private readonly authConfig?;
    readonly agentType: AgentType;
    /** When true, suppresses debug logging (set per-call via options.silent) */
    private silent;
    constructor(spawn: SpawnFunction, authConfig?: AgentConfig | undefined);
    /** 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>;
    /**
     * Build CLI args for the copilot invocation.
     * Prompt is passed via -p flag (not stdin).
     */
    private buildArgs;
    /**
     * Normalize legacy model names to the canonical Copilot CLI form.
     */
    private normalizeModel;
    /**
     * Prepare prompt delivery for Copilot CLI.
     * Uses temporary file indirection for large prompts to avoid ENAMETOOLONG.
     */
    private shouldUsePromptFile;
    private prepareDirectPrompt;
    private preparePromptFileIndirection;
    private buildSpawnOptions;
    /**
     * Extract token usage from the Copilot CLI result event usage object.
     * Returns undefined if usage data is absent (does not throw).
     */
    private extractUsage;
    /**
     * Detect authentication-related errors in stderr and return a user-friendly message.
     * Returns null if no auth error is detected.
     */
    private detectAuthError;
}
//# sourceMappingURL=copilot-cli-executor.service.d.ts.map