Secure, Fast, and Extensible Sandbox runtime for AI agents.
// Copyright 2026 The OpenSandbox Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
export {
InvalidArgumentException,
SandboxApiException,
SandboxError,
SandboxException,
SandboxInternalException,
SandboxReadyTimeoutException,
SandboxUnhealthyException,
SandboxWakeTimeoutException,
PoolAcquireFailedException,
PoolEmptyException,
PoolNotRunningException,
PoolStateStoreUnavailableException,
PoolDestroyedException,
PoolDestroyIncompleteException,
} from "./core/exceptions.js";
// Factory pattern (stable public interface; does NOT expose OpenAPI generated models).
export type { AdapterFactory } from "./factory/adapterFactory.js";
export type { DiagnosticContext, DiagnosticContent } from "./models/diagnostics.js";
export type { Diagnostics } from "./services/diagnostics.js";
export { DefaultAdapterFactory, createDefaultAdapterFactory } from "./factory/defaultAdapterFactory.js";
export { ConnectionConfig } from "./config/connection.js";
export type { ConnectionConfigOptions, ConnectionProtocol } from "./config/connection.js";
export type {
AllocationSummary,
Credential,
CredentialAuth,
CredentialAuthMetadata,
CredentialBinding,
CredentialBindingListResponse,
CredentialBindingMetadata,
CredentialBindingMutationSet,
CredentialListResponse,
CredentialMatch,
CredentialMatchScheme,
CredentialMetadata,
CredentialMutationSet,
CredentialProxyConfig,
CredentialSubstitution,
CredentialSubstitutionSurface,
CredentialVaultCreateRequest,
CredentialVaultPatchRequest,
CredentialVaultState,
CreateSnapshotRequest,
CreateSandboxFromTemplateRequest,
CreateSandboxRequest,
CreateSandboxResponse,
CustomHeaderEntry,
Endpoint,
Host,
ActivityProbe,
IdlePolicy,
RenewalPolicy,
ExchangeCredentialSource,
InlineCredentialSource,
LifecycleHook,
ListSnapshotsParams,
ListSnapshotsResponse,
ListSandboxesParams,
ListSandboxesResponse,
NetworkPolicy,
NetworkRule,
NetworkRuleAction,
OSSFS,
PeriodicLifecycleHook,
PlatformSpec,
PVC,
RenewSandboxExpirationRequest,
RenewSandboxExpirationResponse,
SnapshotInfo,
SnapshotState,
SnapshotStatus,
SandboxId,
SandboxInfo,
SandboxLifecycle,
SandboxMetadataPatch,
Volume,
} from "./models/sandboxes.js";
export { SandboxOrigin } from "./models/sandboxes.js";
export type {
CreateTemplateRequest,
ListTemplatesParams,
ListTemplatesResponse,
TemplateFormat,
TemplateInfo,
TemplatePhase,
TemplateReadiness,
TemplateStatus,
} from "./models/templates.js";
export type { Sandboxes } from "./services/sandboxes.js";
export type { CredentialVault, Egress } from "./services/egress.js";
export { SandboxManager } from "./manager.js";
export type { SandboxFilter, SandboxManagerOptions } from "./manager.js";
export type { ExecdHealth } from "./services/execdHealth.js";
export type { ExecdMetrics } from "./services/execdMetrics.js";
export type {
ByteRange,
FileEntryType,
FileInfo,
FileMetadata,
Permission,
RenameFileItem,
ReplaceFileContentItem,
ReadBytesResponse,
ReadBytesStream,
SearchFilesResponse,
FilesInfoResponse,
} from "./models/filesystem.js";
export type {
CommandExecution,
CommandLogs,
CommandStatus,
RunCommandOpts,
ServerStreamEvent,
CodeContextRequest,
SupportedLanguage,
Metrics,
SandboxMetrics,
PingResponse,
} from "./models/execd.js";
export type { ExecdCommands } from "./services/execdCommands.js";
export type {
Execution,
ExecutionComplete,
ExecutionError,
ExecutionHandlers,
ExecutionInit,
ExecutionResult,
OutputMessage,
} from "./models/execution.js";
export { ExecutionEventDispatcher } from "./models/executionEventDispatcher.js";
export {
DEFAULT_ENTRYPOINT,
DEFAULT_EGRESS_PORT,
DEFAULT_EXECD_PORT,
DEFAULT_RESOURCE_LIMITS,
DEFAULT_TIMEOUT_SECONDS,
DEFAULT_READY_TIMEOUT_SECONDS,
DEFAULT_HEALTH_CHECK_POLLING_INTERVAL_MILLIS,
DEFAULT_REQUEST_TIMEOUT_SECONDS,
} from "./core/constants.js";
export type {
SandboxConnectOptions,
SandboxCreateFromTemplateOptions,
SandboxCreateOptions,
} from "./sandbox.js";
export { Sandbox } from "./sandbox.js";
export { SandboxPool } from "./pool.js";
export { SandboxPoolManager } from "./poolManager.js";
export type { SandboxPoolManagerOptions } from "./poolManager.js";
export { InMemoryPoolStateStore } from "./poolStore.js";
export {
AcquirePolicy,
PoolDestroyState,
PoolDestroyStrategy,
PoolLifecycleState,
PoolState,
PooledSandboxCreateReason,
} from "./poolTypes.js";
export type {
IdleEntry,
PoolCreationSpec,
PoolDestroyOptions,
PoolDestroyResult,
PoolHealthCheck,
PoolLogger,
PoolSandboxPreparer,
PoolSnapshot,
PoolStateStore,
PooledSandboxCreateContext,
PooledSandboxCreator,
ReapResult,
SandboxAcquireOptions,
SandboxPoolOptions,
StoreCounters,
TakeIdleResult,
} from "./poolTypes.js";
export type {
ContentReplaceEntry,
ContentReplaceResult,
DirectoryListEntry,
MoveEntry,
SearchEntry,
SetPermissionEntry,
WriteEntry,
} from "./models/filesystem.js";
export type { SandboxFiles } from "./services/filesystem.js";
export type { IsolationService, IsolationSession, RunOnceOpts } from "./services/isolatedSessions.js";
export type {
CreateIsolatedSessionRequest,
IsolatedWorkspaceSpec,
IsolatedOverlaySpec,
EnvPassthroughSpec,
BindMount,
IsolatedSessionInfo,
IsolatedSessionState,
IsolatedRunOpts,
IsolatedBackgroundRun,
IsolatedRunStatus,
IsolatedRunLogs,
IsolatedCapabilities,
IsolatedSessionSummary,
ListIsolatedSessionsResponse,
} from "./models/isolated.js";