import { DataSource, Repository } from '@n8n/typeorm'; import { AgentExecutionThread } from '../entities/agent-execution-thread.entity'; export interface AgentExecutionThreadMetadata { parentThreadId?: string; parentAgentId?: string; } export interface AgentExecutionThreadPage { threads: AgentExecutionThread[]; nextCursor: string | null; } export declare class AgentExecutionThreadRepository extends Repository { constructor(dataSource: DataSource); findOrCreate(threadId: string, agentId: string, agentName: string, projectId: string, metadata?: AgentExecutionThreadMetadata, taskId?: string | null, taskVersionId?: string | null): Promise<{ thread: AgentExecutionThread; created: boolean; }>; private findOrCreateInSerializableTransaction; findByProjectIdPaginated(projectId: string, limit: number, cursor?: string, agentId?: string): Promise; bumpUpdatedAt(threadId: string): Promise; incrementUsage(threadId: string, promptTokens: number, completionTokens: number, cost: number, duration: number): Promise; deleteByIdAndProjectId(threadId: string, projectId: string): Promise; }