export interface WorkspaceFileItem { name: string; path: string; isDirectory: boolean; size?: number; } export interface ListWorkspaceDirectoryResult { currentPath: string; workspacePath: string; items: WorkspaceFileItem[]; } export interface ReadWorkspaceFileResult { workspacePath: string; filePath: string; content: string; mtimeMs: number; } export interface WorkspaceDocumentPreviewResult { workspacePath: string; filePath: string; kind: 'html' | 'unsupported'; content: string; message?: string; size: number; mtimeMs: number; } export interface WorkspaceDownloadTarget { workspacePath: string; targetPath: string; resolvedTargetPath: string; fileName: string; contentType: string; isDirectory: boolean; size?: number; } export interface WorkspaceUploadFile { originalname: string; relativePath?: string; path: string; size: number; } export interface WorkspaceArchiveExtractResult { ok: true; workspacePath: string; archivePath: string; targetPath: string; extractedEntries: number; } interface WorkspacePathParams { workspacePath: string; targetPath?: string; } interface WorkspaceFileParams { workspacePath: string; filePath: string; } interface WriteWorkspaceFileParams extends WorkspaceFileParams { content: string; } interface CreateWorkspaceEntryParams extends WorkspacePathParams { entryName: string; isDirectory: boolean; } interface RenameWorkspaceEntryParams extends WorkspacePathParams { targetPath: string; newName: string; } interface MoveWorkspaceEntryParams extends WorkspacePathParams { targetPath: string; destinationPath: string; } interface DeleteWorkspaceEntryParams extends WorkspacePathParams { targetPath: string; } interface UploadWorkspaceFilesParams extends WorkspacePathParams { files: WorkspaceUploadFile[]; extractArchives?: boolean; } interface DownloadWorkspaceEntryParams extends WorkspacePathParams { targetPath: string; } interface ExtractWorkspaceArchiveParams extends WorkspacePathParams { archivePath: string; outputPath?: string; } interface ChmodWorkspaceEntryParams extends WorkspacePathParams { targetPath: string; mode: string; recursive?: boolean; } export interface SearchWorkspaceFilesParams { workspacePath: string; keyword: string; fileMask?: string; ignoreCase?: boolean; maxResults?: number; mode?: 'content' | 'filename'; } export interface SearchWorkspacePathsParams { workspacePath: string; rootPath?: string; keyword: string; ignoreCase?: boolean; maxResults?: number; maxDirectories?: number; } export interface WorkspacePathSearchItem { name: string; path: string; isDirectory: boolean; } export interface SearchWorkspacePathsResult { workspacePath: string; rootPath: string; keyword: string; items: WorkspacePathSearchItem[]; truncated: boolean; } export interface WorkspaceSearchMatch { filePath: string; lineNumber: number; lineContent: string; matchStart: number; matchEnd: number; } export interface SearchWorkspaceFilesResult { workspacePath: string; keyword: string; totalFiles: number; totalMatches: number; matches: WorkspaceSearchMatch[]; truncated: boolean; } export interface ReplaceWorkspaceFilesParams { workspacePath: string; keyword: string; replacement: string; fileMask?: string; ignoreCase?: boolean; filePath?: string; } export interface ReplaceWorkspaceFilesResult { workspacePath: string; keyword: string; replacement: string; changedFiles: number; changedMatches: number; } export interface WorkspaceImageProperties { format: 'png' | 'jpeg' | 'gif' | 'webp'; width: number; height: number; } export interface WorkspaceEntryPropertiesResult { workspacePath: string; targetPath: string; name: string; isDirectory: boolean; isFile: boolean; isSymbolicLink: boolean; size: number; mode: number; modeOctal: string; permissions: string; uid?: number; gid?: number; atimeMs: number; mtimeMs: number; ctimeMs: number; birthtimeMs: number; image?: WorkspaceImageProperties; } export interface ChmodWorkspaceEntryResult { ok: true; workspacePath: string; targetPath: string; mode: number; modeOctal: string; recursive: boolean; changedCount: number; } export declare function listWorkspaceDirectory(params: WorkspacePathParams): Promise; export declare function readWorkspaceFile(params: WorkspaceFileParams): Promise; export declare function getWorkspaceEntryProperties(params: DeleteWorkspaceEntryParams): Promise; export declare function chmodWorkspaceEntry(params: ChmodWorkspaceEntryParams): Promise; export declare function previewWorkspaceDocument(params: WorkspaceFileParams): Promise; export declare function writeWorkspaceFile(params: WriteWorkspaceFileParams): Promise<{ ok: true; workspacePath: string; filePath: string; mtimeMs: number; }>; export declare function createWorkspaceEntry(params: CreateWorkspaceEntryParams): Promise<{ ok: true; workspacePath: string; targetPath: string; isDirectory: boolean; }>; export declare function renameWorkspaceEntry(params: RenameWorkspaceEntryParams): Promise<{ ok: true; workspacePath: string; sourcePath: string; targetPath: string; }>; export declare function moveWorkspaceEntry(params: MoveWorkspaceEntryParams): Promise<{ ok: true; workspacePath: string; sourcePath: string; targetPath: string; destinationPath: string; }>; export declare function deleteWorkspaceEntry(params: DeleteWorkspaceEntryParams): Promise<{ ok: true; workspacePath: string; targetPath: string; }>; export declare function uploadWorkspaceFiles(params: UploadWorkspaceFilesParams): Promise<{ ok: true; workspacePath: string; targetPath: string; files: Array<{ fileName: string; targetPath: string; size: number; extracted?: WorkspaceArchiveExtractResult; }>; }>; export declare function resolveWorkspaceDownloadTarget(params: DownloadWorkspaceEntryParams): Promise; export declare function streamWorkspaceDirectoryZip(directoryPath: string, output: NodeJS.WritableStream): Promise; export declare function zipWorkspaceDirectoryToTemp(directoryPath: string, zipName: string, onProgress?: (zippedBytes: number) => void, shouldCancel?: () => boolean): Promise; export declare function extractWorkspaceArchive(params: ExtractWorkspaceArchiveParams): Promise; export declare function searchWorkspaceFiles(params: SearchWorkspaceFilesParams): Promise; export declare function searchWorkspacePaths(params: SearchWorkspacePathsParams): Promise; export declare function replaceWorkspaceFiles(params: ReplaceWorkspaceFilesParams): Promise; export {};