CLI Filesystem
Filesystem access proxied through the connected CLI process.
CLI Filesystem routes talk to the connected CLI process, not the server's own disk.
Use them when a plugin needs to inspect files on the host machine that owns the session. These routes use session-scoped authentication.
listSessionDirectory and readSessionFile accept viewer access. A viewer-only
caller also needs the host to grant file access; otherwise the request returns
403.
Writers and admins do not need that additional grant. Non-admin callers can only list and read within the host's sandbox root. Without a sandbox root, non-admin access is denied. Writing files, renaming them, and extracting archives still require write access.
streamSessionFile uses the same access rules and stages the result for browser
download.
If you call these endpoints directly over HTTP, the auth flow is challenge based:
GET /api/s/{session_id}/auth-challenge- sign the returned one-time challenge/nonce with the session secret
- send
X-Taiku-Session-NonceandX-Taiku-Session-Key
Send X-Taiku-Session-Auth, derived from the same challenge using the write or
admin secret, when proving elevated access. A viewer with the host's file-access
grant can list and read without it, including in a write-protected session.
Session sign-in and invitation requirements still apply.
The plugin SDK and host bridge handle this automatically, so you usually do not need to wire the challenge flow yourself.
Common responses to expect:
400for malformed challenge headers or a missing required file path401for missing or invalid session challenge proof, or when sign-in is required403when a viewer-only caller has no file access from the host, session access is refused, or a list/read request is denied by filesystem or sandbox rules; archive extraction also returns403for a viewer-only caller502when no connected CLI can accept the request or its conditional-read response is invalid504when the CLI does not answer before the timeout or its reply channel closes503when the server cannot queue or stage the CLI-backed request right away