import type { Request } from 'express';
import { type WorkspaceDescriptor } from '../../../core/runtime/workspaces/index.js';
export declare const CHAT_SESSION_IMAGE_UPLOAD_LIMITS: {
    readonly maxFiles: 10;
    readonly maxFileSizeBytes: number;
};
export type ChatSessionImageUpload = {
    id: string;
    path: string;
    originalName: string;
    mediaType: string;
    sizeBytes: number;
};
export type ChatSessionImageUploadResult = {
    uploads: ChatSessionImageUpload[];
};
type ChatSessionImageUploadServiceOptions = {
    workspaceRoot: string;
    stateRoot: string;
};
/**
 * Owns browser-uploaded session image storage for the local control plane.
 *
 * Images are persisted under the selected workspace state root so the runtime can
 * later inspect them through the existing filesystem-backed view_image tool.
 */
export declare class ChatSessionImageUploadService {
    private readonly options;
    constructor(options: ChatSessionImageUploadServiceOptions);
    resolveWorkspace(request: Request): WorkspaceDescriptor;
    resolveUploadDirectory(request: Request): Promise<string>;
    createStoredFilename(file: Pick<Express.Multer.File, 'mimetype' | 'originalname'>): string;
    acceptsImageFile(file: Pick<Express.Multer.File, 'mimetype' | 'originalname'>): boolean;
    completeUploads(request: Request): ChatSessionImageUploadResult;
    private requireSession;
    private projectUploadedFile;
    private readUploadedFiles;
    private resolveSupportedExtension;
    private readSessionId;
    private readWorkspaceId;
    private decodeOriginalFilename;
}
export declare class ChatSessionUploadError extends Error {
    readonly statusCode: number;
    constructor(statusCode: number, message: string);
}
export declare function isChatSessionUploadError(error: unknown): error is ChatSessionUploadError;
export {};
//# sourceMappingURL=chat-session-image-uploads.d.ts.map