import type { RenameVersionResult, SqlClient, SqlParam } from "../../types.js"; import type { InternalEntryShape } from "../internals/entry-shapes.js"; export declare const filesystemOpsContext: unique symbol; export interface FilesystemOpsHost { [filesystemOpsContext](): FilesystemOpsContext; } export interface FilesystemTransactionOps { detach(): Promise; renameVersion(newLabel: string, opts?: { swap?: boolean; }): Promise; deleteVersion(version: string): Promise; } export interface FilesystemOpsContext { readonly workspaceId: string; readonly versionLabel: string; readonly maxFiles: number; readonly maxFileSize: number; readonly maxWorkspaceBytes: number | undefined; readonly historyRetention: "retain" | "discard"; guardRead(userPath: string): string; toInternalPath(userPath: string): string; toUserPath(internalPath: string): string; buildExcludeClause(pathExpr: string, nextParamIdx: number): { sql: string; params: SqlParam[]; }; buildMountClause(pathExpr: string, nextParamIdx: number): { sql: string; params: SqlParam[]; }; withWorkspace(fn: (tx: SqlClient) => Promise): Promise; withReadOnlyWorkspace(fn: (tx: SqlClient) => Promise): Promise; transaction(fn: (tx: TFs & FilesystemTransactionOps) => Promise): Promise; getVersionRootId(tx: SqlClient): Promise; getCurrentVersionId(tx: SqlClient): Promise; requireVersionIdByLabel(tx: SqlClient, label: string): Promise; lockVersions(tx: SqlClient, versionIds: number[]): Promise; findLCA(tx: SqlClient, idA: number, idB: number): Promise; globalVisibleCount(tx: SqlClient, versionId: number): Promise; fetchVisibleEntryMap(tx: SqlClient, versionId: number, scopeLtree: string): Promise>; writeEntryShape(tx: SqlClient, versionId: number, posixPath: string, shape: InternalEntryShape | null): Promise; writeEntryShapes(tx: SqlClient, versionId: number, writes: Array<{ internalPath: string; shape: InternalEntryShape | null; }>): Promise; createVersionedFilesystem(internalPath: string, version: string, versionRootId: number): TFs; createForkedFilesystem(newVersion: string): TFs; setVersionLabelAfterRename(label: string): void; } export declare function op(ctx: FilesystemOpsContext, ...args: never[]) => unknown>(operation: TOperation): TOperation; //# sourceMappingURL=context.d.ts.map