import { Manifest, type SandboxClient, type SandboxClientCreateArgs, type SandboxClientOptions, type SandboxArchiveLimits, type SandboxConcurrencyLimits, type ExposedPortEndpoint, type ExecCommandArgs, type Mount, type SandboxSessionLifecycleOptions, type SandboxSessionState, type TypedMount, type WriteStdinArgs } from '@openai/agents-core/sandbox'; import { RemoteSandboxSessionBase, type RemoteSandboxCommandOptions, type RemoteSandboxCommandResult, type ManifestMountMaterializationContext } from '../shared'; import { type BlaxelDriveApi } from './mounts'; export declare const DEFAULT_BLAXEL_WORKSPACE_ROOT = "/workspace"; type BlaxelCreateInternalOptions = { allowExistingNamedSandbox?: boolean; }; type BlaxelSandboxLike = { name?: string; metadata?: { name?: string; createdAt?: string; workspace?: string; createdBy?: string; }; status?: string; url?: string; sandbox?: { metadata?: { url?: string; }; }; process: { exec(params: Record): Promise; }; fs: { mkdir(path: string): Promise; write(path: string, content: string): Promise; writeBinary(path: string, content: Uint8Array): Promise; read(path: string): Promise; readBinary(path: string): Promise; rm(path: string, recursive?: boolean): Promise; }; previews?: BlaxelPreviewApi; drives?: BlaxelDriveApi; delete(): Promise; }; type BlaxelPreviewApi = { createIfNotExists(params: Record): Promise; }; type BlaxelProcessResult = { stdout?: string; stderr?: string; exitCode?: number | null; }; export interface BlaxelSandboxTimeouts { execTimeoutMs?: number; createTimeoutMs?: number; cleanupTimeoutMs?: number; fileUploadTimeoutMs?: number; fileDownloadTimeoutMs?: number; workspaceTarTimeoutMs?: number; fastOperationTimeoutMs?: number; } export interface BlaxelSandboxClientOptions extends SandboxClientOptions { image?: string; memory?: number; region?: string; ports?: Array>; exposedPortPublic?: boolean; exposedPortUrlTtlS?: number; timeoutMs?: number; createTimeoutMs?: number; timeouts?: BlaxelSandboxTimeouts; apiKey?: string; env?: Record; labels?: Record; ttl?: string; name?: string; pauseOnExit?: boolean; archiveLimits?: SandboxArchiveLimits | null; } export interface BlaxelSandboxSessionState extends SandboxSessionState { sandboxName: string; sandboxIdentity?: string; mountArtifactScope?: string; image?: string; memory?: number; region?: string; ports?: Array>; exposedPortPublic?: boolean; exposedPortUrlTtlS?: number; timeoutMs?: number; createTimeoutMs?: number; timeouts?: BlaxelSandboxTimeouts; sandboxUrl?: string; labels?: Record; ttl?: string; pauseOnExit: boolean; ownsSandbox: boolean; environment: Record; } export declare class BlaxelSandboxSession extends RemoteSandboxSessionBase { private readonly sandbox; private readonly apiKey?; private ownsSandbox; private closed; private readonly ptyProcesses; private readonly activeFuseMountPaths; private readonly activeDriveMountPaths; constructor(args: { state: BlaxelSandboxSessionState; sandbox: BlaxelSandboxLike; apiKey?: string; ownsSandbox?: boolean; concurrencyLimits?: SandboxConcurrencyLimits; archiveLimits?: SandboxArchiveLimits | null; }); supportsPty(): boolean; writeStdin(args: WriteStdinArgs): Promise; protected execPtyCommand(args: ExecCommandArgs): Promise; protected allowOnDemandExposedPorts(): boolean; protected useCachedExposedPortEndpoint(_port: number): boolean; protected exposedPortSource(): string; protected resolveRemoteExposedPort(requestedPort: number): Promise; prepareWorkspaceRoot(): Promise; close(): Promise; shutdown(_options?: SandboxSessionLifecycleOptions): Promise; delete(options?: SandboxSessionLifecycleOptions): Promise; private shouldPreserveOnCleanup; rehydrateActiveMountPathsFromManifest(): Promise; protected manifestMetadataSupport(): import("../shared").SandboxManifestMetadataSupport; protected manifestMaterializationOptions(): { materializeMount: (absolutePath: string, entry: Mount | TypedMount, context: ManifestMountMaterializationContext) => Promise; validateManifest: (manifest: Manifest) => void; }; private assertUnownedCloudBucketMountsAreCredentialless; protected forceTerminateAfterFailedPrivilegedManifestTransition(): Promise; protected assertExecRunAs(_runAs?: string): void; protected assertFilesystemRunAs(_runAs?: string): void; private materializeMountEntry; private unmountActiveMounts; private mountCommandRunner; private writeMountSecretFile; protected runRemoteCommand(command: string, options: RemoteSandboxCommandOptions): Promise; protected mkdirRemote(path: string): Promise; protected readRemoteText(path: string): Promise; protected readRemoteFile(path: string): Promise; protected writeRemoteFile(path: string, content: string | Uint8Array): Promise; private writeRemoteTempFile; protected deleteRemotePath(path: string): Promise; private ensureMountArtifactScope; private timeoutForCommand; } /** * @see {@link https://docs.blaxel.ai/Sandboxes/Overview | Sandboxes overview}. * @see {@link https://docs.blaxel.ai/Sandboxes/Filesystem | Filesystem operations}. * @see {@link https://docs.blaxel.ai/Sandboxes/Sessions | Client-side sessions}. */ export declare class BlaxelSandboxClient implements SandboxClient { readonly backendId = "blaxel"; private readonly options; constructor(options?: BlaxelSandboxClientOptions); create(args?: SandboxClientCreateArgs | Manifest, manifestOptions?: BlaxelSandboxClientOptions, internalOptions?: BlaxelCreateInternalOptions): Promise; serializeSessionState(state: BlaxelSandboxSessionState): Promise>; canPersistOwnedSessionState(state: BlaxelSandboxSessionState): boolean; deserializeSessionState(state: Record): Promise; resume(state: BlaxelSandboxSessionState): Promise; private recreateFromState; } export {};