import type { ChangeRequest, ElementRef } from '../types/change-request-types';
import type { TerminalAgentRunResult } from './TerminalAgentRunner';
import { SessionBridgeService } from './SessionBridgeService';
type AgentRunner = {
    getDisplayName?: () => string;
    stopActiveRuns?: (signal?: string) => number;
    runChangeRequest: (params: {
        request: ChangeRequest;
        cwd: string;
        sessionId: string;
        resumeSession?: boolean;
        onFeedback: (message: string) => void;
    }) => Promise<TerminalAgentRunResult>;
};
type InlineVariantService = {
    processVariantRequest: (request: ChangeRequest) => Promise<TerminalAgentRunResult>;
};
type FileResolver = {
    findMatchingFiles: (projectPath: string, element: ElementRef) => Promise<string[]>;
};
type WorktreeProjectLocator = {
    getProjectCwdInWorktree: (worktreePath: string) => Promise<string>;
};
export type AgentSessionServiceOptions = {
    bridge: SessionBridgeService;
    projectPath: string;
    runner: AgentRunner;
    fileResolver?: FileResolver;
    inlineVariantService?: InlineVariantService;
    worktreeProjectLocator?: WorktreeProjectLocator;
    continuousSessionId?: string;
    createSessionId?: () => string;
};
export declare class AgentSessionService {
    private bridge;
    private projectPath;
    private runner;
    private fileResolver;
    private inlineVariantService?;
    private worktreeProjectLocator?;
    private continuousSessionId;
    private createSessionId;
    private hasContinuousSessionStarted;
    private isStopped;
    private loopPromise;
    constructor(options: AgentSessionServiceOptions);
    getContinuousSessionId(): string;
    /**
     * @effect Starts the bridge consumption loop for queued Rivet visual changes.
     */
    start(): void;
    /**
     * @effect Stops the bridge consumption loop after the current wait/run settles.
     */
    stop(): void;
    /**
     * @effect Requests cancellation of active terminal-agent child processes.
     */
    cancelActiveRun(): {
        stoppedCount: number;
    };
    /**
     * @effect Applies one queued change request by spawning the configured terminal agent and updating bridge status.
     */
    processChangeRequest(request: ChangeRequest): Promise<TerminalAgentRunResult>;
    /**
     * Resolves the project directory where a terminal agent should apply a queued request.
     */
    private resolveRunCwd;
    /**
     * @effect Resolves missing element file hints before handing the request to the agent.
     */
    private enrichRequestFileHints;
    /**
     * @effect Resolves file hints for every element-bearing change item in a request.
     */
    private enrichChangeFileHints;
    /**
     * @effect Searches source files when an element does not already carry file hints.
     */
    private enrichElementFileHints;
    private filterFilePathsForProject;
    private getChangeElements;
    private runLoop;
}
export {};
//# sourceMappingURL=AgentSessionService.d.ts.map