import type { DirEntry, FileInfo, FileSystemAdapter, FileWatcher, ResolveFileOptions, SourceSnapshotFreshnessOptions, WatchOptions } from "../base.js"; import type { DirectoryEntry, FSAdapter } from "./veryfront/types.js"; export interface ExtendedFileSystemAdapter extends FileSystemAdapter { getUnderlyingAdapter(): FSAdapter; getAdapterType(): string; isVeryfrontAdapter(): boolean; isMultiProjectMode(): boolean; isContextualMode(): boolean; isFixedProjectMode(): boolean; setRequestToken(token: string): void; clearRequestToken(): void; setRequestBranch(branch: string | null): void; getRequestBranch(): string | null; clearRequestBranch(): void; setProductionMode(enabled: boolean, releaseId?: string | null): void; runWithContext(projectSlug: string, token: string, fn: () => Promise, projectId?: string, options?: { productionMode?: boolean; releaseId?: string | null; branch?: string | null; environmentName?: string | null; }): Promise; readFileBytes(path: string): Promise; readonly maxWholeFileReadBytes?: number; readonly readFileBytesBounded?: (path: string, byteLimit: number) => Promise; readonly readFileBytesWithinLimit?: (path: string, byteLimit: number) => Promise; readonly readFileSnapshotWithinLimit?: (path: string, containmentRoot: string, byteLimit: number) => Promise; readonly createFileBytesExclusive?: (path: string, content: Uint8Array) => Promise; readOptionalTextFile(path: string): Promise; readdir(path: string): Promise; shutdown(): Promise; } export declare function isExtendedFSAdapter(fs: FileSystemAdapter): fs is ExtendedFileSystemAdapter; /** * Check if the adapter is using a virtual filesystem (Veryfront API, GitHub, etc.) * Centralized predicate — use this instead of inline checks. */ export declare function isVirtualFilesystem(fs: FileSystemAdapter): boolean; export declare class NotSupportedError extends Error { constructor(operation: string, adapterType?: string); } export declare class FSAdapterWrapper implements ExtendedFileSystemAdapter { #private; private readonly _fsAdapter; private readonly _unboundedFileReader?; private readonly _wholeFileReader?; private readonly _fixedProjectMode; readonly symlinkSemantics: "none" | undefined; readonly projectContextSemantics: "fixed" | undefined; readonly maxWholeFileReadBytes?: number; readonly readFileBytesBounded?: (path: string, byteLimit: number) => Promise; readonly readFileBytesWithinLimit?: (path: string, byteLimit: number) => Promise; readonly readFileSnapshotWithinLimit?: (path: string, containmentRoot: string, byteLimit: number) => Promise; readonly createFileBytesExclusive?: (path: string, content: Uint8Array) => Promise; readonly refreshSourceSnapshot?: (reason?: string) => Promise; readonly ensureSourceSnapshotFresh?: (reason?: string, options?: SourceSnapshotFreshnessOptions) => Promise; readonly sourceSnapshotFreshnessOptionsVersion?: 1; readonly getSourceSnapshotVersion?: () => number | undefined | Promise; readonly getSourceSnapshotFingerprint?: () => string | undefined | Promise; readonly getSourceSnapshotIdentity?: () => string | undefined | Promise; constructor(fsAdapter: FSAdapter); getUnderlyingAdapter(): FSAdapter; getAdapterType(): string; isVeryfrontAdapter(): boolean; private get adapterType(); private get contextual(); private requireContextualMethod; setRequestToken(token: string): void; clearRequestToken(): void; setRequestBranch(branch: string | null): void; getRequestBranch(): string | null; clearRequestBranch(): void; setProductionMode(enabled: boolean, releaseId?: string | null): void; runWithContext(projectSlug: string, token: string, fn: () => Promise, projectId?: string, options?: { productionMode?: boolean; releaseId?: string | null; branch?: string | null; environmentName?: string | null; }): Promise; isMultiProjectMode(): boolean; isFixedProjectMode(): boolean; isContextualMode(): boolean; readFile(path: string): Promise; readOptionalTextFile(path: string): Promise; readFileBytes(path: string): Promise; writeFile(path: string, content: string): Promise; exists(path: string): Promise; private getDirEntries; readDir(path: string): AsyncIterable; readdir(path: string): Promise; stat(path: string): Promise; resolveFile(basePath: string, options?: ResolveFileOptions): Promise; mkdir(path: string, options?: { recursive?: boolean; }): Promise; remove(path: string, options?: { recursive?: boolean; }): Promise; makeTempDir(_prefix: string): Promise; watch(_paths: string | string[], _options?: WatchOptions): FileWatcher; shutdown(): Promise; } export declare function wrapFSAdapter(fsAdapter: FSAdapter): ExtendedFileSystemAdapter; //# sourceMappingURL=wrapper.d.ts.map