import { $ as ServiceVisibility, A as SandboxRunOptions, At as CommandProcessStatus, B as ResourceOptions, Bt as Milliseconds, C as SandboxInfo, Ct as DataPlaneOptions, D as SandboxResourceSpec, Dt as CommandInputWriter, E as SandboxObjectStorageAccess, Et as CommandInputData, F as StopOptions, Ft as ShellOptions, G as EndpointAuth, H as ResourceSpec, Ht as Seconds, I as WaitOptions, It as StartCommandOptions, J as HttpsEndpointStatus, K as EndpointKind, L as WaitTargetStatus, Lt as StartCommandOptionsWithStdin, M as SandboxTag, Mt as ExecOptions, N as ScratchVolumeOptions, Nt as ProcessResult, O as SandboxRunFromFileOptions, Ot as CommandOutputStream, P as StartSandboxResult, Pt as SandboxCommands, Q as ServiceUrl, R as SecretInput, Rt as TerminalResult, S as SandboxId, St as DataPlaneMode, T as SandboxMetadata, Tt as CommandInput, U as EgressRule, V as ResourceRequestsAndLimits, Vt as RequestOptions, W as Endpoint, X as Service, Y as NetworkOptions, Z as ServiceProtocol, _ as Sandbox, _t as FileWrites, a as DeleteSnapshotOptions, at as LogRawStream, b as SandboxFileContents, bt as MountedFiles, c as FileSystemSnapshotResult, ct as LogStream, d as FromIdOptions, dt as SandboxLogs, et as TlsPassthroughEndpoint, f as GetSandboxResult, ft as FileChunkSource, g as ObjectStoragePermission, gt as FileWrite, h as ListSnapshotsOptions, ht as FileTextReadResult, i as DeleteOptions, it as LogRawChunk, j as SandboxStatus, jt as CommandProcessWithStdin, k as SandboxRunFromTemplateOptions, kt as CommandProcess, l as FileSystemSnapshotState, lt as LogStreamMode, m as ListSandboxesResult, mt as FileReadResult, n as WithSandboxCallback, nt as LogEntry, o as EnvironmentVariables, ot as LogReadOptions, p as ListSandboxesOptions, pt as FileContent, q as HttpsEndpoint, r as SandboxList, rt as LogEntryStream, s as FileSystemSnapshotOptions, st as LogResumeCursor, t as SandboxClient, tt as TlsPassthroughEndpointStatus, u as FileSystemSnapshotTrigger, ut as LogStreamOptions, v as SandboxAnnotations, vt as MountedFile, w as SandboxListOptions, wt as Command, x as SandboxFileType, xt as SandboxFiles, y as SandboxExposedPort, yt as MountedFileContent, z as Secrets, zt as TerminalSession } from "./client-DpqdEOsC.js";
import { i as DEFAULT_SNAPSHOT_TIMEOUT_MS, n as DEFAULT_KEEP_ALIVE_COMMAND, r as DEFAULT_LIST_ALL_TIMEOUT_MS, t as DEFAULT_GRACEFUL_SHUTDOWN_SECONDS } from "./defaults-DJSH7MC2.js";
//#region src/errors.d.ts
type CWSandboxErrorCode = "authentication_error" | "configuration_error" | "execution_error" | "not_found" | "not_implemented" | "resource_exhausted" | "sandbox_failed" | "sandbox_terminated" | "terminal_state_unavailable" | "timeout_error" | "transport_error" | "unavailable" | "validation_error";
type CWSandboxTransportKind = "fetch" | "grpc" | "http";
interface CWSandboxTransportErrorOptions extends ErrorOptions {
  /**
   * AIP-193 `ErrorInfo.domain` when present on the transport failure.
   */
  readonly domain?: string;
  /**
   * Path involved in a file operation. Caller-supplied values win over
   * `metadata.filepath` when constructing `CWSandboxFileError`.
   */
  readonly filepath?: string;
  /**
   * AIP-193 `ErrorInfo.metadata` map. Always treated as a string map; omit or
   * pass `{}` when no ErrorInfo metadata was present.
   */
  readonly metadata?: Readonly<Record<string, string>>;
  readonly operation?: string;
  /**
   * AIP-193 `ErrorInfo.reason` when present (e.g. `CWSANDBOX_SANDBOX_NOT_FOUND`).
   */
  readonly reason?: string;
  /**
   * Suggested client retry delay from `google.rpc.RetryInfo`, in milliseconds.
   */
  readonly retryDelayMs?: number;
  readonly sandboxId?: string;
  readonly transport?: CWSandboxTransportKind;
  readonly transportCode?: number | string;
}
export declare class CWSandboxError extends Error {
  readonly code: CWSandboxErrorCode;
  constructor(message: string, code: CWSandboxErrorCode, options?: ErrorOptions);
}
export declare function isCWSandboxError(error: unknown): error is CWSandboxError;
export declare class CWSandboxConfigurationError extends CWSandboxError {
  constructor(message: string, options?: ErrorOptions);
}
export declare class CWSandboxNotImplementedError extends CWSandboxError {
  readonly domain: string | undefined;
  /**
   * AIP-193 `ErrorInfo.metadata` map. Always present; empty when the failure
   * carried no ErrorInfo metadata.
   */
  readonly metadata: Readonly<Record<string, string>>;
  readonly operation: string | undefined;
  readonly reason: string | undefined;
  readonly retryDelayMs: number | undefined;
  readonly sandboxId: string | undefined;
  readonly transport: CWSandboxTransportKind | undefined;
  readonly transportCode: number | string | undefined;
  constructor(message: string, options?: CWSandboxTransportErrorOptions);
}
/**
 * Command or stream execution failure (Python `SandboxExecutionError` peer).
 *
 * Command `check: true` failures construct with a `ProcessResult`. Stream-channel
 * subclasses may omit `result` (Python `exec_result` is often `None`).
 */
export declare class CWSandboxExecutionError extends CWSandboxError {
  readonly result: ProcessResult | undefined;
  constructor(result: ProcessResult, options?: ErrorOptions);
  constructor(message: string, options?: ErrorOptions);
}
/**
 * Stream ended early because the consumer did not keep up (Python
 * `SandboxStreamBackpressureError` peer). Subclasses `CWSandboxExecutionError`
 * so `instanceof CWSandboxExecutionError` matches Python's hierarchy.
 * `streamCode` is an ExecStreamError channel code (typically
 * `STREAM_BACKPRESSURE`), not an AIP-193 `reason`.
 */
export declare class CWSandboxStreamBackpressureError extends CWSandboxExecutionError {
  readonly streamCode: string;
  constructor(message: string, options?: ErrorOptions & {
    readonly streamCode?: string;
  });
}
/**
 * Command completed but some output was lost in transit (Python
 * `SandboxStreamTruncatedError` peer). `streamCode` is typically
 * `STREAM_TRUNCATED`, not an AIP-193 `reason`.
 */
export declare class CWSandboxStreamTruncatedError extends CWSandboxExecutionError {
  readonly streamCode: string;
  constructor(message: string, options?: ErrorOptions & {
    readonly streamCode?: string;
  });
}
export declare class CWSandboxTransportError extends CWSandboxError {
  readonly domain: string | undefined;
  /**
   * AIP-193 `ErrorInfo.metadata` map. Always present; empty when the failure
   * carried no ErrorInfo metadata.
   */
  readonly metadata: Readonly<Record<string, string>>;
  readonly operation: string | undefined;
  readonly reason: string | undefined;
  readonly retryDelayMs: number | undefined;
  readonly sandboxId: string | undefined;
  readonly transport: CWSandboxTransportKind | undefined;
  readonly transportCode: number | string | undefined;
  constructor(message: string, options?: CWSandboxTransportErrorOptions, code?: CWSandboxErrorCode);
}
export declare class CWSandboxAuthenticationError extends CWSandboxTransportError {
  constructor(message: string, options?: CWSandboxTransportErrorOptions);
}
export declare class CWSandboxNotFoundError extends CWSandboxTransportError {
  constructor(message: string, options?: CWSandboxTransportErrorOptions);
}
/**
 * Stop (or observe-after-stop) succeeded from the client's point of view, but
 * the backend never reported a terminal sandbox status within the retry budget.
 */
export declare class CWSandboxTerminalStateUnavailableError extends CWSandboxTransportError {
  constructor(message: string, options?: CWSandboxTransportErrorOptions);
}
export declare class CWSandboxTimeoutError extends CWSandboxTransportError {
  constructor(message: string, options?: CWSandboxTransportErrorOptions);
}
/**
 * The sandbox service is transiently unavailable (gRPC `UNAVAILABLE` or an
 * unavailable AIP-193 reason).
 *
 * `delete()`, Gateway `files.read()`, and each of `stop()`'s status check and
 * Stop RPC already retry it (up to 3 calls each) when the server sent gRPC
 * `UNAVAILABLE` with a `RetryInfo` delay of at most 10s; when thrown from
 * those, it is the last call's error. Wait polling and snapshot operations
 * have their own retry. Other operations add no retry for it.
 */
export declare class CWSandboxUnavailableError extends CWSandboxTransportError {
  constructor(message: string, options?: CWSandboxTransportErrorOptions);
}
export declare class CWSandboxResourceExhaustedError extends CWSandboxTransportError {
  constructor(message: string, options?: CWSandboxTransportErrorOptions);
}
/**
 * File operation failure in the sandbox (Python `SandboxFileError` parity).
 * Prefer switching on `reason` for AIP-193 file reasons.
 */
export declare class CWSandboxFileError extends CWSandboxTransportError {
  readonly filepath: string | undefined;
  constructor(message: string, options?: CWSandboxTransportErrorOptions);
}
/**
 * Requested scratch mount size exceeds the allowed maximum.
 * Emitted for trusted `CWSANDBOX_FSS_SIZE_EXCEEDED`.
 */
export declare class CWSandboxSnapshotSizeExceededError extends CWSandboxTransportError {
  constructor(message: string, options?: CWSandboxTransportErrorOptions);
}
/**
 * Organization snapshot quota (count or storage) is exhausted.
 * Emitted for trusted `CWSANDBOX_FSS_QUOTA_EXCEEDED`. Fatal; not resource-exhausted.
 */
export declare class CWSandboxSnapshotQuotaExceededError extends CWSandboxTransportError {
  constructor(message: string, options?: CWSandboxTransportErrorOptions);
}
/**
 * Snapshot object bucket differs from the org's current FSS bucket.
 * Emitted for trusted `CWSANDBOX_FSS_BUCKET_MISMATCH`.
 */
export declare class CWSandboxSnapshotBucketMismatchError extends CWSandboxTransportError {
  constructor(message: string, options?: CWSandboxTransportErrorOptions);
}
export declare class CWSandboxValidationError extends CWSandboxError {
  constructor(message: string, options?: ErrorOptions);
}
/**
 * Sandbox failed to start or reached a fatal failed status during wait-until-running
 * (Python `SandboxFailedError` peer).
 */
export declare class CWSandboxFailedError extends CWSandboxError {
  readonly operation: string | undefined;
  readonly sandboxId: string | undefined;
  constructor(message: string, options?: {
    readonly operation?: string;
    readonly sandboxId?: string;
  } & ErrorOptions);
}
/**
 * Sandbox was terminated during wait-until-running (Python `SandboxTerminatedError` peer).
 */
export declare class CWSandboxTerminatedError extends CWSandboxError {
  readonly operation: string | undefined;
  readonly sandboxId: string | undefined;
  constructor(message: string, options?: {
    readonly operation?: string;
    readonly sandboxId?: string;
  } & ErrorOptions);
}
//#endregion
//#region src/internal/error-info.d.ts
/** Domain value used by the CoreWeave backend when emitting ErrorInfo. */
export declare const CWSANDBOX_ERROR_DOMAIN = "cwsandbox.com";
export declare const CWSANDBOX_FILE_NOT_FOUND = "CWSANDBOX_FILE_NOT_FOUND";
export declare const CWSANDBOX_FILE_IS_DIRECTORY = "CWSANDBOX_FILE_IS_DIRECTORY";
export declare const CWSANDBOX_FILE_IO_FAILED = "CWSANDBOX_FILE_IO_FAILED";
export declare const CWSANDBOX_FILE_PERMISSION_DENIED = "CWSANDBOX_FILE_PERMISSION_DENIED";
/** Size-policy refusal for unary file ops; prefer StreamExec / streaming APIs. */
export declare const CWSANDBOX_FILE_TOO_LARGE = "CWSANDBOX_FILE_TOO_LARGE";
export declare const CWSANDBOX_FILE_TRUNCATED = "CWSANDBOX_FILE_TRUNCATED";
/**
 * Terminal `ExecStreamError.code` when the consumer falls behind. This is a
 * streaming-channel code, not an AIP-193 ErrorInfo `reason`.
 */
export declare const STREAM_BACKPRESSURE = "STREAM_BACKPRESSURE";
/**
 * Terminal `ExecStreamError.code` when the command finished but some output
 * was lost in transit. Streaming-channel code, not an AIP-193 `reason`.
 */
export declare const STREAM_TRUNCATED = "STREAM_TRUNCATED";
export declare const CWSANDBOX_SANDBOX_NOT_FOUND = "CWSANDBOX_SANDBOX_NOT_FOUND";
export declare const CWSANDBOX_FSS_NOT_FOUND = "CWSANDBOX_FSS_NOT_FOUND";
export declare const CWSANDBOX_FSS_NOT_SUPPORTED = "CWSANDBOX_FSS_NOT_SUPPORTED";
export declare const CWSANDBOX_FSS_NOT_READY = "CWSANDBOX_FSS_NOT_READY";
export declare const CWSANDBOX_FSS_BACKEND_THROTTLED = "CWSANDBOX_FSS_BACKEND_THROTTLED";
export declare const CWSANDBOX_FSS_INFLIGHT_LIMIT = "CWSANDBOX_FSS_INFLIGHT_LIMIT";
export declare const CWSANDBOX_FSS_BUCKET_PROVISIONING = "CWSANDBOX_FSS_BUCKET_PROVISIONING";
export declare const CWSANDBOX_FSS_SIZE_EXCEEDED = "CWSANDBOX_FSS_SIZE_EXCEEDED";
export declare const CWSANDBOX_FSS_QUOTA_EXCEEDED = "CWSANDBOX_FSS_QUOTA_EXCEEDED";
export declare const CWSANDBOX_FSS_BUCKET_MISMATCH = "CWSANDBOX_FSS_BUCKET_MISMATCH";
export declare const CWSANDBOX_COMMAND_TIMEOUT = "CWSANDBOX_COMMAND_TIMEOUT";
export declare const CWSANDBOX_RUNNER_UNAVAILABLE = "CWSANDBOX_RUNNER_UNAVAILABLE";
export declare const CWSANDBOX_BACKEND_UNAVAILABLE = "CWSANDBOX_BACKEND_UNAVAILABLE";
//#endregion
export { type CWSandboxErrorCode, type CWSandboxTransportErrorOptions, type CWSandboxTransportKind, type Command, type CommandInput, type CommandInputData, type CommandInputWriter, type CommandOutputStream, type CommandProcess, type CommandProcessStatus, type CommandProcessWithStdin, DEFAULT_GRACEFUL_SHUTDOWN_SECONDS, DEFAULT_KEEP_ALIVE_COMMAND, DEFAULT_LIST_ALL_TIMEOUT_MS, DEFAULT_SNAPSHOT_TIMEOUT_MS, type DataPlaneMode, type DataPlaneOptions, type DeleteOptions, type DeleteSnapshotOptions, type EgressRule, type Endpoint, type EndpointAuth, type EndpointKind, type EnvironmentVariables, type ExecOptions, type FileChunkSource, type FileContent, type FileReadResult, type FileSystemSnapshotOptions, type FileSystemSnapshotResult, type FileSystemSnapshotState, type FileSystemSnapshotTrigger, type FileTextReadResult, type FileWrite, type FileWrites, type FromIdOptions, type GetSandboxResult, type HttpsEndpoint, type HttpsEndpointStatus, type ListSandboxesOptions, type ListSandboxesResult, type ListSnapshotsOptions, type LogEntry, type LogEntryStream, type LogRawChunk, type LogRawStream, type LogReadOptions, type LogResumeCursor, type LogStream, type LogStreamMode, type LogStreamOptions, type Milliseconds, type MountedFile, type MountedFileContent, type MountedFiles, type NetworkOptions, type ObjectStoragePermission, type ProcessResult, type RequestOptions, type ResourceOptions, type ResourceRequestsAndLimits, type ResourceSpec, type Sandbox, type SandboxAnnotations, type SandboxClient, type SandboxCommands, type SandboxExposedPort, type SandboxFileContents, type SandboxFileType, type SandboxFiles, type SandboxId, type SandboxInfo, SandboxList, type SandboxListOptions, type SandboxLogs, type SandboxMetadata, type SandboxObjectStorageAccess, type SandboxResourceSpec, type SandboxRunFromFileOptions, type SandboxRunFromTemplateOptions, type SandboxRunOptions, type SandboxStatus, type SandboxTag, type ScratchVolumeOptions, type Seconds, type SecretInput, type Secrets, type Service, type ServiceProtocol, type ServiceUrl, type ServiceVisibility, type ShellOptions, type StartCommandOptions, type StartCommandOptionsWithStdin, type StartSandboxResult, type StopOptions, type TerminalResult, type TerminalSession, type TlsPassthroughEndpoint, type TlsPassthroughEndpointStatus, type WaitOptions, type WaitTargetStatus, type WithSandboxCallback };
//# sourceMappingURL=index.d.ts.map