SSE event streams for a sandbox.
GET /sandboxes/:id/events— stream/3GET /sandboxes/:id/files/watch?path=…— watch_dir/4
Summary
Functions
Stream live sandbox events via SSE (GET /sandboxes/:sandbox_id/events).
Watch a directory for filesystem changes via SSE
(GET /sandboxes/:sandbox_id/files/watch?path=…).
Functions
@spec stream(Miosa.Client.t(), String.t(), function()) :: :ok | {:error, Miosa.Error.t()}
Stream live sandbox events via SSE (GET /sandboxes/:sandbox_id/events).
callback is called for each event map with keys type and data.
Returns :ok when the stream closes or {:error, reason} on failure.
@spec watch_dir(Miosa.Client.t(), String.t(), String.t(), function(), keyword()) :: :ok | {:error, Miosa.Error.t()}
Watch a directory for filesystem changes via SSE
(GET /sandboxes/:sandbox_id/files/watch?path=…).
callback is called for each event map with keys type and data.
Returns :ok when the stream closes or {:error, reason} on failure.
Options
:recursive— Whentrue, watch the directory tree recursively. Defaults tofalse.