Skip to content

[Feature]: Mobile apps: read-only workspace file browser (browse, preview, share) #100705

Description

@steipete

Summary

Add a read-only workspace file browser to the iOS and Android apps: browse the agent's working directory tree, preview text and image files, and export a file through the platform share sheet.

Problem to solve

Operators using the mobile apps cannot inspect what an agent has produced or changed in its workspace. Today the gateway exposes only an allowlisted set of bootstrap files (agents.files.*) and a session-scoped browser (sessions.files.*) that can list the workspace tree but only returns content for transcript-touched text files — no arbitrary in-root reads, no binary/image support, and it is keyed by session rather than agent. The mobile apps expose none of this, so checking a generated file, a log, or an edited config from the phone requires shell access to the gateway host.

Proposed solution

  1. Gateway: one canonical read-only RPC pair, agent-scoped:
    • agents.workspace.list — bounded directory listing under the agent workspace root (deterministic ordering, pagination for large directories).
    • agents.workspace.read — bounded file read with byte-size caps and text/image type gating (UTF-8 text inline, images base64).
    • Root confinement via the existing fs-safe infrastructure: realpathed root, symlink/hardlink rejection, path-traversal rejection. Read scope only; no write operations.
    • Additive protocol schema + regenerated Swift models; traversal-attack negative tests.
  2. iOS: a Files section on the agent surface with directory drill-down, syntax-highlighted text preview (reusing the chat code renderer), image preview, and share-sheet export.
  3. Android: the same feature following existing navigation patterns, with preview and share-intent export.

Alternatives considered

Impact

Affected: operators running agents remotely (containers, VPS, always-on gateways) who use the mobile apps.
Severity: workflow gap — no mobile visibility into agent output files.
Frequency: whenever an agent produces or edits files the operator wants to verify away from a desktop.
Consequence: SSH/desktop round-trips for simple "what did the agent write" checks.

Evidence/examples

Additional information

Security is the crux: the read path must be confined to the agent workspace root (realpath + reject escapes), size-capped, and type-gated. V1 is strictly read-only; write/delete/upload remain with #61368.

Metadata

Metadata

Assignees

Labels

P2Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.enhancementNew feature or requestimpact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.maintainerMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions