import type { AgAiInputContent } from '../../api/ai/agAiMessage'; import type { AgAiArtifactState, AgAiConversationState, AgAiProfileState, AgAiThreadState, AgAiToolCallMetadataState } from '../../api/state/agAiAssistantState'; import { BeanStub } from '../core/beanStub'; import { AiConversation } from './aiConversation'; import type { PlanData } from './artifacts/plan/planArtifactDefinition'; import type { AiArtifact, AiArtifactRef, AiArtifactStore } from './artifacts/types'; import type { AiMessageModel } from './messages/aiMessageModel'; import type { ExchangeOptions } from './types'; export declare class AiThread extends BeanStub implements AiArtifactStore { readonly id: string; private _name; readonly profileType: AgAiProfileState['type']; readonly profileParams?: Record; conversation: AiConversation; private _resolvedProfile; private readonly artifacts; private plan; constructor(id: string, name: string, profileType?: AgAiProfileState['type'], profileParams?: Record); postConstruct(): void; private getResolvedProfile; private getTools; registerArtifact(artifact: Omit): string; getArtifact(id: string): AiArtifact | undefined; updateArtifact(id: string, data: unknown): boolean; getArtifactOrThrow(id: string): AiArtifact; getArtifactRef(): AiArtifactRef[]; resolveArtifacts(refs: AiArtifactRef[]): AiArtifact[]; getPlan(): PlanData | null; setPlan(plan: PlanData): void; clearPlan(): void; getArtifactsByIds(ids: string[]): AiArtifact[]; getArtifactsState(): Record; getToolCallMetadataState(): Record; private collectToolCallMetadata; get name(): string; getConversation(): AiConversation; get isStreaming(): boolean; get messages(): readonly AiMessageModel[]; sendMessage(message: AgAiInputContent[], options?: ExchangeOptions): Promise; cancelCurrentStream(): void; private notifyStateChanged; getState(): AgAiThreadState; getConversationState(): AgAiConversationState; getAllConversationStates(): AgAiConversationState[]; private collectDelegateConversationStates; rename(newName: string): void; setState(threadState: AgAiThreadState): void; /** * Link delegate conversations to their tool call models after state restoration. * Extracts delegate info from toolCallMetadata and creates sub-conversations. */ private restoreDelegateConversations; /** Build tools for a delegate profile during state restoration. */ private buildDelegateTools; destroy(): void; }