UNPKG

n8n

Version:

n8n Workflow Automation Tool

28 lines (27 loc) 1.23 kB
import type { InstanceAiAgentNode } from '@n8n/api-types'; import type { AgentTreeSnapshot } from '@n8n/instance-ai'; import { InstanceAiRunSnapshotRepository } from '../repositories/instance-ai-run-snapshot.repository'; export interface SaveSnapshotOptions { messageGroupId?: string; runIds?: string[]; traceId?: string; spanId?: string; langsmithRunId?: string; langsmithTraceId?: string; } export declare class DbSnapshotStorage { private readonly repo; constructor(repo: InstanceAiRunSnapshotRepository); getLatest(threadId: string, options?: { messageGroupId?: string; runId?: string; }): Promise<AgentTreeSnapshot | undefined>; save(threadId: string, agentTree: InstanceAiAgentNode, runId: string, options?: SaveSnapshotOptions): Promise<void>; updateLast(threadId: string, agentTree: InstanceAiAgentNode, runId: string, options?: SaveSnapshotOptions): Promise<void>; markRunCancelled(threadId: string, runId: string): Promise<void>; getAll(threadId: string): Promise<AgentTreeSnapshot[]>; findLangsmithAnchor(threadId: string, responseId: string): Promise<{ langsmithRunId: string; langsmithTraceId: string; } | undefined>; }