PURISTA API / @purista/sandbox / AppleContainerSandboxDriver
Class: AppleContainerSandboxDriver
Defined in: sandbox-service/src/driver/AppleContainerSandboxDriver/AppleContainerSandboxDriver.ts:21
AppleContainerSandboxDriver - macOS-focused local container driver.
It reuses Docker-compatible CLI semantics and is therefore suitable for OrbStack/Colima-based development without changing sandbox command contracts.
Implements
Constructors
Constructor
new AppleContainerSandboxDriver(
config):AppleContainerSandboxDriver
Defined in: sandbox-service/src/driver/AppleContainerSandboxDriver/AppleContainerSandboxDriver.ts:25
Parameters
config
Returns
AppleContainerSandboxDriver
Properties
name
name:
string='AppleContainerSandboxDriver'
Defined in: sandbox-service/src/driver/AppleContainerSandboxDriver/AppleContainerSandboxDriver.ts:22
The unique name of the driver implementation
Implementation of
Methods
createSandbox()
createSandbox(
params):Promise<{containerName:string;sandboxId:string; }>
Defined in: sandbox-service/src/driver/AppleContainerSandboxDriver/AppleContainerSandboxDriver.ts:29
Provisions and starts a new sandbox environment.
Parameters
params
Configuration for the new sandbox
gitConfig?
{ email: string; token?: string; username: string; }
gitConfig.email
string
gitConfig.token?
string
gitConfig.username
string
organizationId
string
projectId
string
sandboxId
string
userId
string
Returns
Promise<{ containerName: string; sandboxId: string; }>
The sandbox ID and underlying container name
Implementation of
destroySandbox()
destroySandbox(
params):Promise<void>
Defined in: sandbox-service/src/driver/AppleContainerSandboxDriver/AppleContainerSandboxDriver.ts:43
Permanently removes a sandbox and its resources.
Parameters
params
Reference to the sandbox to destroy
sandboxId
string
Returns
Promise<void>
Implementation of
executeBash()
executeBash(
params):Promise<{exitCode:number;stderr:string;stdout:string; }>
Defined in: sandbox-service/src/driver/AppleContainerSandboxDriver/AppleContainerSandboxDriver.ts:47
Executes a bash command within the specified sandbox.
Parameters
params
Command and execution context
command
string
cwd?
string
sandboxId
string
Returns
Promise<{ exitCode: number; stderr: string; stdout: string; }>
The result of the command execution
Implementation of
readFile()
readFile(
params):Promise<string>
Defined in: sandbox-service/src/driver/AppleContainerSandboxDriver/AppleContainerSandboxDriver.ts:55
Reads the content of a file from the sandbox.
Parameters
params
Path to the file
path
string
sandboxId
string
Returns
Promise<string>
Implementation of
scanRunningSandboxes()
scanRunningSandboxes():
Promise<object[]>
Defined in: sandbox-service/src/driver/AppleContainerSandboxDriver/AppleContainerSandboxDriver.ts:63
Scans the underlying system for running sandboxes and recovers their metadata. This is used for self-healing and service restarts.
Returns
Promise<object[]>
Implementation of
SandboxDriver.scanRunningSandboxes
writeFiles()
writeFiles(
params):Promise<void>
Defined in: sandbox-service/src/driver/AppleContainerSandboxDriver/AppleContainerSandboxDriver.ts:59
Writes one or more files to the sandbox workspace.
Parameters
params
Map of file paths to their contents
files
Record<string, string>
sandboxId
string
Returns
Promise<void>
