DaytonaEnvironment class
A persistent remote workspace sandbox backed by Daytona.
Provides isolated remote shell execution and file CRUD operations in the cloud.
- Inheritance
-
- Object
- BaseEnvironment
- DaytonaEnvironment
Constructors
Properties
- apiKey → String?
-
Daytona API key. If null, resolved from
DAYTONA_API_KEYenv var.final - apiUrl → String?
-
Daytona API URL endpoint. Defaults to
https://app.daytona.io/api.final -
envVars
→ Map<
String, String> ? -
Environment variables configured inside the sandbox.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- image → String?
-
Sandbox image or template identifier.
final
- isInitialized ↔ bool
-
Whether this environment has been initialized and not yet closed.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sandboxId → String?
-
Active Daytona sandbox identifier, if initialized.
no setter
- scope → EnvironmentScope
-
Which agent runs share one resource of this environment.
no setterinherited
- timeout → Duration
-
Sandbox execution timeout.
final
- workingDir → Directory
-
Returns the sandbox working directory (
/workspacesby default).no setteroverride - workingDirectory → Object
-
Workspace root used by environment operations when known, falling back to
Directory.current.absolutefor backward compatibility.no setterinherited
Methods
-
close(
) → Future< void> -
Releases any resources retained by the environment.
override
-
execute(
String command, {Duration? timeout = const Duration(seconds: 30), Context? ctx}) → Future< ExecutionResult> -
Executes
commandwithin workingDirectory, optionally usingctx.override -
initialize(
{Context? ctx}) → Future< void> -
Performs any setup required before tool calls, optionally using
ctx.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readFile(
Object path, {Context? ctx}) → Future< Uint8List> -
Reads bytes from a file relative to workingDirectory, optionally using
ctx.override -
readFileStream(
Object path, {Context? ctx}) → Stream< List< int> > -
Streams raw byte chunks from a file relative to workingDirectory.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
writeFile(
Object path, covariant Object content, {Context? ctx}) → Future< void> -
Writes
content(StringorList<int>) to a file relative to workingDirectory.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited