import { ModuleRef } from '@nestjs/core';
import { LlmProvider } from '../llm-provider/llm-provider.interface';
import { EventsGateway } from '../events/events.gateway';
import { LlmResponsesService } from '../llm-responses/llm-responses.service';
import { ApplicationStateService } from '../application-state/application-state.service';
import { MessageBusService } from '../message-bus/message-bus.service';
import { SessionsService } from '../sessions/sessions.service';
import { SystemPromptsService } from '../system-prompts/system-prompts.service';
import { ToolSchemaService } from '../llm-orchestration/tool-schema.service';
import { HistoryCompressionService } from '../llm-orchestration/history-compression.service';
import { SubAgentsService } from '../sub-agents/sub-agents.service';
import { Repository } from 'typeorm';
import { SessionInput } from '../core-entities/session-input.entity';
import { AIAction } from '../core-entities/ai-action.entity';
export interface AgentRunResult {
    content: string;
    success: boolean;
    iterations: number;
    childSessionId: string;
}
export declare class ChatService {
    private readonly llmProvider;
    private readonly eventsGateway;
    private readonly llmResponsesService;
    private readonly applicationStateService;
    private readonly messageBusService;
    private readonly sessionsService;
    private readonly systemPromptsService;
    private readonly toolSchemaService;
    private readonly historyCompressionService;
    private readonly subAgentsService;
    private readonly moduleRef;
    private readonly handlerRegistry;
    private readonly sessionInputsRepository;
    private readonly aiActionsRepository;
    private readonly logger;
    private activeRequests;
    private syncPromises;
    constructor(llmProvider: LlmProvider, eventsGateway: EventsGateway, llmResponsesService: LlmResponsesService, applicationStateService: ApplicationStateService, messageBusService: MessageBusService, sessionsService: SessionsService, systemPromptsService: SystemPromptsService, toolSchemaService: ToolSchemaService, historyCompressionService: HistoryCompressionService, subAgentsService: SubAgentsService, moduleRef: ModuleRef, handlerRegistry: Map<string, any>, sessionInputsRepository: Repository<SessionInput>, aiActionsRepository: Repository<AIAction>);
    resolveSyncPromise(sessionId: string, result: AgentRunResult): void;
    rejectSyncPromise(sessionId: string, error: Error): void;
    getSyncPromise(sessionId: string): {
        resolve: (result: AgentRunResult) => void;
        reject: (error: Error) => void;
    } | undefined;
    runAgentSync(agentName: string, prompt: string, parentSessionId: string, options?: {
        sessionId?: string;
    }): Promise<AgentRunResult>;
    private callWithRetry;
    private getHistory;
    sendMessage(sessionId: string, message: string, existingInputId?: string): Promise<void>;
    cancelRequest(sessionId: string): boolean;
    abortStreaming(sessionId: string): boolean;
}
