import { type EndpointToolContent } from '@xopcai/endpoint-tools-protocol'; export declare const ENDPOINT_UPLOAD_MAX_BYTES: number; export interface EndpointInvocationScope { conversationId: string; transcriptId: string; actorPrincipalId: string; } interface ArtifactDestination { scope: EndpointInvocationScope; endpointId: string; connectionId: string; toolName: string; providerDigest: string; } export interface EndpointUploadedFile { fileId: string; invocationId: string; endpointId: string; principalId?: 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; private readonly invocationScopes; private readonly transfers; private readonly downloads; constructor(rootDir: string); createGrant(invocationId: string, endpointId: string, now?: number, profile?: 'durable' | 'computer-frame' | 'private', principalId?: string, scope?: EndpointInvocationScope): 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; issueTransfer(fileId: string, destination: ArtifactDestination, stillAuthorized: () => boolean): { transferId: `${string}-${string}-${string}-${string}-${string}`; expiresAt: number; sourceEndpointId: string; name: string; size: number; } | undefined; listTransferFiles(conversationId: string, transcriptId: string, destinationId: string): Pick[]; bindTransfer(transferId: unknown, destination: ArtifactDestination, invocationId: string, deadlineAt: number): { token: `${string}-${string}-${string}-${string}-${string}`; size: number; sha256: string; } | undefined; takeTransfer(invocationId: string, endpointId: string, connectionId: string, token: string, isActorActive: (scope: EndpointInvocationScope) => boolean): Uint8Array | undefined; revokeTransfer(transferId: string): void; closeTransfer(invocationId: string): void; private sameScope; abort(invocationId: string): void; getFile(fileId: string): EndpointUploadedFile | undefined; readFile(fileId: string): Uint8Array | undefined; getGrantLimits(invocationId: string, endpointId: string, token: string): { maxBytes: number; profile: "private" | "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; } export {};