import { type EndpointToolContent } from '@xopcai/endpoint-tools-protocol'; export declare const ENDPOINT_UPLOAD_MAX_BYTES: number; export interface EndpointUploadedFile { fileId: string; invocationId: string; name: string; mimeType: string; size: number; sha256: string; path: string; } export interface EndpointUploadGrant { path: string; token: string; maxBytes: number; maxFiles: number; expiresAt: number; } export declare class EndpointUploadError extends Error { readonly code: 'INVALID_UPLOAD_GRANT' | 'UPLOAD_TOO_LARGE' | 'INVALID_COMPUTER_FRAME' | 'UPLOAD_BUSY'; constructor(message: string, code?: 'INVALID_UPLOAD_GRANT' | 'UPLOAD_TOO_LARGE' | 'INVALID_COMPUTER_FRAME' | 'UPLOAD_BUSY'); } export declare class EndpointUploadService { private readonly rootDir; private readonly grants; private readonly files; private readonly frames; private readonly pruneTimer; private readonly validatingFrames; constructor(rootDir: string); createGrant(invocationId: string, endpointId: string, now?: number, profile?: 'durable' | 'computer-frame'): EndpointUploadGrant; upload(params: { invocationId: string; endpointId: string; token: string; name: string; mimeType: string; bytes: Uint8Array; now?: number; validatedFrame?: boolean; }): EndpointUploadedFile; validateAndClose(invocationId: string, content: EndpointToolContent[]): void; abort(invocationId: string): void; getFile(fileId: string): EndpointUploadedFile | undefined; readFile(fileId: string): Uint8Array | undefined; getGrantLimits(invocationId: string, endpointId: string, token: string): { maxBytes: number; profile: "durable" | "computer-frame"; }; uploadValidated(params: Parameters[0]): Promise; /** Single-consumer handoff, inaccessible through generic attachment routes. */ takeComputerFrame(fileId: string, invocationId: string): Uint8Array | undefined; private pruneFrames; close(): void; private deleteFile; }