RunFilesystem belongs to a trial, analysis, or task check. Each exposes the same methods.
source to use the available source; pass live or capture to request one explicitly.
Task package files provide a smaller, read-only interface.
status
ReturnFilesystemStatus: state, live box, watcher type, root, work directory, and capture record.
Signature
Signature
live, capturing, captured, none. A null capture means no settled capture record. A capture can be incomplete: inspect left_out before assuming every file was retained. See filesystem result fields.
list
Read one directory page, sorted by name. ReturnsFilesystemListing.
Signature
Signature
path defaults to /; source selects live or capture; cursor continues the page; limit defaults to 500 (maximum 1,000).
Returns path, source, entries, next_cursor, and elapsed ms. Both languages use next_cursor here. An entry with captured: false has no retained bytes. Read left_out for an omitted or failed capture; otherwise it may be an untouched image file. A missing directory returns not_found.
read
Read raw bytes from an absolute sandbox path. ReturnsBuffer / bytes.
Signature
Signature
source chooses live or capture. For ranges, TypeScript uses { range: { start, end } }; Python uses start= and end=. End is inclusive. Use start alone through EOF or suffix alone for the last N bytes. An oversized whole-file read returns 413; read slices instead.
search
Search file contents. ReturnsFilesystemSearchResult, including hits and whether results were truncated.
Signature
Signature
q is text; regex: true / regex=True interprets it as a regular expression. Optional path defaults to /; limit defaults to 200 (maximum 1,000); source selects live or capture.
Returns hits[] with path, line, snippet; plus truncated, scope, source, ms, and optional image_files_excluded. A whole-box search can take seconds. Captured search cannot inspect untouched image files.
changes
Read created, modified, and removed paths by phase. Returns oneFilesystemChanges page.
Signature
Signature
phase: setup, agent, verifier, or all (default); source: live or capture; limit: default 500, maximum 1,000; cursor: next page. Returns source, whole-list total and changed_bytes, page items, and next_cursor. Live changes require a recorded initial listing; otherwise the server returns feature_unsupported. For captured changes, left_out explains missing retained bytes.
archive
Download a subtree as.tar.gz. The default path / requests the whole tree.
Signature
Signature
source selects live or capture. No to returns Buffer / bytes; to saves into a directory and returns the file path. TypeScript also accepts stream: true; Python does not expose streaming. A live subtree too large to read within provider limits returns feature_unsupported.
watch
Declare the folders currently open in your viewer. Replaces the watched set, with at most eight paths.Signature
Signature
paths: string[]. Returns watcher: "native" | "poll" and paths: string[]. Poll-based change detection uses this set. This method registers folders; events() reads their changes.
events
Iterate filesystem state and changes until the filesystem settles. Returns asyncFilesystemStreamEvent frames.
Signature
Signature
lastEventId / last_event_id resumes after a stored event id. TypeScript also accepts signal. A state frame after a resume request means relist the folder. Frames are state, fs, or ping; event fields define the payloads.
logs
Read one page of one sandbox log stream. ReturnsSandboxLogLines.
Signature
Signature
stream: agent, verifier, setup, system, or metrics. Optional cursor continues the stream; limit defaults to and is capped at 1,000. Returns stream, lines, next_cursor, and optional reason when no lines were retained. Each line has seq, nullable t, fd (out or err), and line.
logEvents
Python:log_events. Iterate all sandbox log streams together. Ends after the box is gone and stored lines are drained.
Signature
Signature
lastEventId / last_event_id is <stream>:<seq>. TypeScript also accepts signal. Returns SandboxLogEvent: line, state, or ping. A line payload adds stream to SandboxLogLine.
procs
Read the live sandbox’s process list. ReturnsSandboxProcs.
Signature
Signature
text is the process listing; ms is elapsed server time. Once the box is gone, this returns 409 filesystem_state; a captured filesystem cannot supply live processes.
Task package files
datasets().taskFiles(ref, taskName) / task_files(ref, task_name) returns TaskPackageFiles. Pin ref as name@version. This reads the retained task package, not a sandbox.
package.status
ReadTaskPackageFilesystemStatus, the normal filesystem status plus source: "package" and package_retained: boolean. Its state is always none.
Signature
Signature
package_retained means package bytes are unavailable; file reads return task_package_not_retained.
package.list
Read a page from the task directory. ReturnsFilesystemListing with source: "package".
Signature
Signature
path defaults to /; limit defaults to 500 (maximum 1,000); cursor continues the page. There is no source selector.
package.read
Read exact bytes from a retained task file. ReturnsBuffer / bytes.
Signature
Signature
RunFilesystem.read apply. This interface has no search, archive, watch, event, log, or process methods.
