Managoat.Sandbox.Daytona.Toolbox (managoat_sandbox v0.2.0)

Copy Markdown View Source

Daytona toolbox client — the in-sandbox REST API, proxied per sandbox at its toolboxProxyUrl (same Bearer auth as the control plane).

Long-running commands are daemon-side sessions: a named session hosts async commands whose output is journaled server-side, streamable (and replayable from the start — the property reattach depends on) via the command's log endpoint. Stdin is a per-command FIFO that is line-oriented: the daemon appends a trailing newline when missing, which suits the NDJSON JSON-RPC the ACP path writes; suppressInputEcho keeps written input out of the output journal.

Summary

Functions

Start a command in the session asynchronously; returns its command id.

One-shot blocking exec with cwd/env/timeout. Returns output + exit code.

The command record; exitCode is nil while it is still running.

The command's full journal so far (no follow) — raw bytes with the same channel markers the websocket carries, or a JSON map on older daemons.

Write to the command's stdin FIFO (line-oriented; daemon adds a newline).

Functions

create_session(toolbox_url, session_id)

exec_async(toolbox_url, session_id, command)

Start a command in the session asynchronously; returns its command id.

execute(toolbox_url, command, opts)

One-shot blocking exec with cwd/env/timeout. Returns output + exit code.

get_command(toolbox_url, session_id, command_id)

The command record; exitCode is nil while it is still running.

get_logs(toolbox_url, session_id, command_id)

The command's full journal so far (no follow) — raw bytes with the same channel markers the websocket carries, or a JSON map on older daemons.

list_sessions(toolbox_url)

req(toolbox_url)

send_input(toolbox_url, session_id, command_id, data)

Write to the command's stdin FIFO (line-oriented; daemon adds a newline).

write_file(toolbox_url, path, data)