import { AgentCore } from "./AgentCore"; import { ClassificationTypeConfig } from "./IClassifier"; import { Message } from "./Message"; import { InferClassificationUnion } from "./TypeInference"; import { ToolOutput } from "./Tool"; import { SessionContext } from './SessionContext'; export declare class Session { core: AgentCore; owner: string; sessionId: string; context: SessionContext | null; description: string; parentSessionId?: string; subtasks?: Session[]; private eventHandlers; private toolResultHandlers; private conversationHandlers; private exceptionHandlers; private routingHandlers; constructor(core: AgentCore, owner: string, sessionId: string, description: string, parentSessionId?: string); createMessage(message: string): Message; createMessage(message: string, sender?: string): Message; createMessage(message: string, sender?: string, context?: Record): Message; chat(message: string): Promise; chat(message: string, sender?: string): Promise; chat(message: string, sender?: string, context?: Record): Promise; setContext(context: SessionContext): void; getContext(): SessionContext | null; onEvent, ToolOutputType extends ToolOutput, T extends readonly ClassificationTypeConfig[]>(handler: (result: ToolOutputType | InstructionType, session: Session) => void): void; onToolResult(handler: (result: TOutput, session: Session) => void): void; onConversation(handler: (obj: any, session: Session) => void): void; onException(handler: (obj: any, session: Session) => void): void; onRouting(handler: (message: any, session: Session) => void): void; triggerEventHandlers, TOutput extends ToolOutput, T extends readonly ClassificationTypeConfig[]>(obj: TInput): Promise; triggerToolCallsHandlers, TOutput extends ToolOutput, T extends readonly ClassificationTypeConfig[]>(obj: TInput): Promise; triggerConversationHandlers(obj: any): Promise; triggerExceptionHandlers(obj: any): Promise; triggerRoutingHandlers(message: any): Promise; }