createDaytonaSandboxProvider
Purpose and behavior
Section titled “Purpose and behavior”Create a remote provider on Daytona; the optional @daytona/sdk loads on acquire. Each acquire creates a sandbox and confirms any egress policy before preparing the workspace. The checkout is private; repositoryMode accepts only isolated, also the default. Release, or a failed setup, deletes the sandbox. With caches, acquisition restores download archives and release saves them through host-side transports before disposal; a cache failure still attempts disposal.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”optionsOptionalDaytonaOptions | undefinedDaytona client connection, sandbox creation, egress, workspace root, environment and output retention settings.options.cachesOptionalreadonly CloudDependencyCache[] | undefinedOpt-in download caches under /outpost/cache/<name>, restored on acquire and saved before deletion through each cache’s required transport. Identity includes the canonical host repository, Daytona image/snapshot, sandbox UID/GID, name and key. Non-root images must permit elevated cache-directory setup.options.repositoryModeOptional"isolated" | undefinedisolated (the default and only supported mode) keeps the checkout and Git directory private to the cloud sandbox. History and selected inputs upload; validated commits and file changes synchronize back without importing sandbox configuration, hooks or unrelated refs. Other modes fail with code configuration before allocation.options.egressOptionalEgressPolicy | undefinedPortable policy enforced by Daytona: deny-all, up to 100 domains or up to 10 IPv4 allowCidrs, not both, and no denyCidrs. Outpost confirms it before preparing the workspace; a refusal fails with code provider and deletes the sandbox (it needs a Tier 3 or 4 account with WRITE_SANDBOXES).options.connectionOptionalDaytonaConfig | undefinedSettings passed to the Daytona client constructor, such as the API key and URL.options.createOptionalCreateSandboxFromImageParams | CreateSandboxFromSnapshotParams | undefinedCreation parameters passed to the SDK, from an image or a snapshot. Its network fields conflict with egress and otherwise keep Daytona’s semantics without Outpost confirmation; code the image starts on its own can run before acquisition completes.options.variablesOptionalReadonly<Record<string, string>> | undefinedEnvironment variables set for every command in the sandbox, as literal values. A key the agent also declares fails with code configuration.options.rootOptionalstring | undefinedRepository directory inside the sandbox, default <home>/outpost.options.retainOptionalnumber | undefinedBytes of output tail kept per stream, default 65536.connectOptional((config?: DaytonaConfig) => Promise<Pick<Daytona, "create" | "delete">>) | undefinedReturns the client whose create() and delete() manage sandboxes, default new Daytona(connection) from @daytona/sdk.

