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. Release, or a failed setup, deletes the sandbox.
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.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.