donobu
Version:
Create browser automations with an LLM agent and replay them as Playwright scripts.
43 lines • 2.25 kB
TypeScript
import { FlowMetadata } from '../models/FlowMetadata';
import { ToolCall } from '../models/ToolCall';
import { VideoSegment } from '../models/VideoSegment';
import { FlowsPersistence, PaginatedFlowsResult } from './FlowsPersistence';
import { BrowserStorageState } from '../models/BrowserStorageState';
import { FlowsQuery } from '../models/FlowsQuery';
/**
* A persistence implementation that uses the filesystem.
*/
export declare class FlowsPersistenceFilesystem implements FlowsPersistence {
readonly flowsDirectory: string;
private static readonly METADATA_FILENAME;
private static readonly BROWSER_STATE_FILENAME;
private static readonly SCREENSHOT_FILENAME_SUFFIX;
private static readonly TOOL_CALL_FILENAME_SUFFIX;
private static readonly VIDEO_FILENAME;
private constructor();
static create(storageDirectory: string): Promise<FlowsPersistenceFilesystem>;
saveMetadata(flowMetadata: FlowMetadata): Promise<void>;
getMetadataByFlowId(flowId: string): Promise<FlowMetadata>;
/**
* Get flow metadata by name using pagination for efficiency
*/
getMetadataByFlowName(flowName: string): Promise<FlowMetadata>;
savePngScreenShot(flowId: string, bytes: Buffer): Promise<string>;
getPngScreenShot(flowId: string, screenShotId: string): Promise<Buffer | null>;
saveToolCall(flowId: string, toolCall: ToolCall): Promise<void>;
getToolCalls(flowId: string): Promise<ToolCall[]>;
/**
* Get flows with pagination and filtering from filesystem storage
*/
getFlows(query: FlowsQuery): Promise<PaginatedFlowsResult>;
setVideo(flowId: string, bytes: Buffer): Promise<void>;
getVideoSegment(flowId: string, startOffset: number, length: number): Promise<VideoSegment | null>;
getFlowFile(flowId: string, fileId: string): Promise<Buffer | null>;
setFlowFile(flowId: string, fileId: string, fileBytes: Buffer): Promise<void>;
setBrowserState(flowId: string, browserState: BrowserStorageState): Promise<void>;
getBrowserState(flowId: string): Promise<BrowserStorageState | null>;
deleteFlow(flowId: string): Promise<void>;
private getFlowDirectory;
private getAllFlowDirectories;
}
//# sourceMappingURL=FlowsPersistenceFilesystem.d.ts.map