MCPcopy
hub / github.com/TanStack/ai / SandboxHandle

Interface SandboxHandle

packages/ai-sandbox/src/contracts.ts:166–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164
165/** The uniform runtime surface a sandbox exposes. */
166export interface SandboxHandle {
167 /** Provider-assigned id used to reconnect to this sandbox. */
168 readonly id: string
169 /** Provider name (e.g. "docker", "cloudflare", "local-process"). */
170 readonly provider: string
171 /**
172 * Real filesystem path backing the virtual workspace root (`/workspace`).
173 * Harness CLIs and ACP `newSession` interpret cwd literally — use
174 * {@link resolveHarnessCwd} rather than the virtual path when the provider
175 * maps `/workspace` elsewhere (Daytona, Vercel, local-process).
176 */
177 readonly workspaceRoot?: string
178 /** What this sandbox can do. */
179 readonly capabilities: SandboxCapabilities
180 readonly fs: SandboxFs
181 readonly git: SandboxGit
182 readonly process: SandboxProcess
183 readonly ports: SandboxPorts
184 readonly env: SandboxEnv
185 /** Capability-gated: throws UnsupportedCapabilityError if `capabilities.snapshots` is false. */
186 snapshot?: (label?: string) => Promise<SnapshotRef>
187 /** Capability-gated: throws UnsupportedCapabilityError if `capabilities.fork` is false. */
188 fork?: () => Promise<SandboxHandle>
189 destroy: () => Promise<void>
190}
191
192/** Input passed to {@link SandboxProvider.create}. */
193export interface SandboxCreateInput {

Callers

nothing calls this directly

Implementers 6

CloudflareHandlepackages/ai-sandbox-cloudflare/src/han
LocalProcessHandlepackages/ai-sandbox-local-process/src/
SpritesHandlepackages/ai-sandbox-sprites/src/handle
VercelHandlepackages/ai-sandbox-vercel/src/handle.
DockerHandlepackages/ai-sandbox-docker/src/handle.
DaytonaHandlepackages/ai-sandbox-daytona/src/handle

Calls

no outgoing calls

Tested by

no test coverage detected