Skip to content

feat(v4): add workspace download helpers - #229

Open
MagMueller wants to merge 2 commits into
browser-use:mainfrom
MagMueller:agency/v4-workspace-downloads
Open

MagMueller wants to merge 2 commits into
browser-use:mainfrom
MagMueller:agency/v4-workspace-downloads

Conversation

@MagMueller

@MagMueller MagMueller commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

What changed

V4 workspaces could list and upload files, but neither SDK exposed a high-level download helper.

  • Python: add sync and async download() and download_all().
  • TypeScript: add download() and downloadAll().
  • Add concise Python and TypeScript examples to the workspace guide.

Each transfer requests a fresh presigned URL immediately before downloading, streams to a sibling temporary file, and atomically replaces the destination. Failed transfers remove the temporary file and preserve an existing destination. Bulk downloads preserve nested paths and reject traversal.

Tests

  • TypeScript: 28 focused V4 tests passed; 148 full non-live tests passed; typecheck passed; ESM, CJS, and DTS build passed.
  • Python: 61 passed and 22 skipped; source-file Pyright passed; Ruff passed; compileall passed.
  • git diff --check passed.
  • Exact-range TruffleHog scan found 0 verified and 0 unverified secrets.

Summary by cubic

Adds high-level download helpers to the Python and TypeScript V4 workspace SDKs, so callers can pull workspace files to disk without managing presigned URLs manually.

New Features

  • Python adds sync and async download() and download_all(); TypeScript adds download() and downloadAll().
  • Each file requests a fresh presigned URL immediately before streaming and is written via a sibling temp file, then atomically replaces the destination.
  • Failed transfers delete the temp file and leave an existing destination in place.
  • Bulk downloads preserve nested paths and reject path traversal, including symlinked parents.
  • Workspace guide examples now show downloading a single file and a prefix.

Written for commit ea16657. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread browser-use-node/src/v4/resources/workspaces.ts
Comment thread browser-use-python/tests/test_v4.py
Comment thread browser-use-node/src/v4/resources/workspaces.ts Outdated

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant