/** * Compatibility wrapper for the old `workspace-files` API. * * Storage now goes through the core Resources table so agent files live in the * same workspace the user manages in the Resources panel. Paths under * `scratch/` are hidden agent scratch; every other path is a normal visible * resource in the current personal or organization scope. */ /** Max content size per file (bytes) for direct workspaceWrite calls. */ export declare const MAX_FILE_BYTES: number; /** * Legacy export retained for API compatibility. The Resources store is the * canonical quota surface now, so the compatibility wrapper does not maintain a * separate per-scope total. */ export declare const MAX_SCOPE_BYTES: number; /** Max content size when saving via saveToFile from provider-api / fetch tool. */ export declare const SAVE_TO_FILE_MAX_BYTES: number; export interface WorkspaceFilesScope { scope: "user" | "org"; scopeId: string; } /** * Validate a workspace file path. * - Non-empty, no leading slash, no ".." components, no null bytes. */ export declare function validatePath(path: string): string | null; export interface WorkspaceFile { id: string; scope: string; scopeId: string; path: string; content: string; contentType: string; sizeBytes: number; createdAt: string; updatedAt: string; } export interface WorkspaceFileMeta { id: string; path: string; contentType: string; sizeBytes: number; createdAt: string; updatedAt: string; } /** * Write (create or overwrite) a workspace file. * Enforces per-file limits for the compatibility API; persistence is handled by * Resources. Use `scratch/...` for temporary hidden agent files. */ export declare function writeWorkspaceFile(scope: WorkspaceFilesScope, path: string, content: string, contentType?: string, opts?: { maxFileBytes?: number; }): Promise; /** * Append text to an existing workspace file, or create it if it doesn't exist. */ export declare function appendWorkspaceFile(scope: WorkspaceFilesScope, path: string, text: string, contentType?: string): Promise; /** * Read a workspace file's content (with optional offset and maxChars for paging). * Returns null if the file doesn't exist. */ export declare function readWorkspaceFile(scope: WorkspaceFilesScope, path: string, opts?: { offset?: number; maxChars?: number; }): Promise; /** * Get file metadata without loading content. */ export declare function getWorkspaceFileMeta(scope: WorkspaceFilesScope, path: string): Promise; /** * List workspace files, optionally filtered by path prefix. * Returns metadata only (no content). */ export declare function listWorkspaceFiles(scope: WorkspaceFilesScope, prefix?: string): Promise; /** * Delete a workspace file. Returns true if deleted, false if not found. */ export declare function deleteWorkspaceFile(scope: WorkspaceFilesScope, path: string): Promise; /** * Search file contents for a substring or regex pattern. * Returns matching lines with path context. */ export declare function grepWorkspaceFiles(scope: WorkspaceFilesScope, pattern: string, opts?: { pathPrefix?: string; useRegex?: boolean; maxMatchesPerFile?: number; maxFiles?: number; }): Promise>; //# sourceMappingURL=store.d.ts.map