Read file content with server-side line-based pagination.
Runs a Python script on the sandbox via execute() that reads the
file, detects encoding, and applies offset/limit pagination for text
files. Only the requested page is returned over the wire, and text
output is capped to about 500 KiB to avoid backend stdout/log transport
failures. When that cap is exceeded, the returned content is truncated
with guidance to continue pagination using a different offset or
smaller limit.
Binary files (non-UTF-8) are returned base64-encoded without pagination.
read(
self,
file_path: str,
offset: int = 0,
limit: int = 2000
) -> ReadResult