Skip to content

feat(compact): expose upload_file - #2678

Open
alectimison-maker wants to merge 1 commit into
webbrain-one:mainfrom
alectimison-maker:codex/compact-upload-file
Open

feat(compact): expose upload_file#2678
alectimison-maker wants to merge 1 commit into
webbrain-one:mainfrom
alectimison-maker:codex/compact-upload-file

Conversation

@alectimison-maker

Copy link
Copy Markdown
Contributor

Summary

  • expose upload_file to Compact Act in both Chrome and Firefox
  • give Compact a narrow, platform-accurate upload schema without advertising unavailable download tools
  • add direct-upload, exact-selector, and guarded lazy-widget guidance with cross-browser boundary tests

Closes #413.

Design notes

Compact gains only upload_file; Ask and the rest of the Compact tool boundary stay unchanged. Chrome accepts a current user attachmentId or an absolute filePath explicitly supplied by the user. Firefox accepts a current attachmentId or falls back to WebBrain's existing picker. Neither Compact schema exposes downloadId or points the model toward download_files/list_downloads.

The Compact prompts direct the model to use an existing file input first, avoid generic selectors when multiple inputs exist, allow one guarded initializer click for a lazy widget, and verify the page attachment before submitting.

Testing

  • node --check src/chrome/src/agent/tools.js
  • node --check src/firefox/src/agent/tools.js
  • node --check test/run.js
  • node test/run.js — 1450 passed; the sole unrelated failure is the existing package.json 26.0.10 vs newest CHANGELOG 26.0.0 mismatch
  • npm run test:security — 60/60 checks passed

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

@alectimison-maker is attempting to deploy a commit to the esokullu's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI 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.

Pull request overview

Exposes a platform-specific upload_file workflow to Compact Act mode across Chrome and Firefox.

Changes:

  • Adds narrow Compact upload schemas and prompt guidance.
  • Preserves Ask mode and excludes download workflows.
  • Adds cross-browser tool-boundary and guidance tests.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/chrome/src/agent/tools.js Adds Chrome Compact upload support.
src/firefox/src/agent/tools.js Adds Firefox Compact upload and picker support.
test/run.js Tests Compact upload schemas, prompts, and boundaries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

'click', 'type_text', 'press_keys',
'navigate', 'new_tab', 'wait_for_element',
'fetch_url',
'upload_file',
'click', 'type_text', 'press_keys',
'navigate', 'new_tab', 'wait_for_element',
'fetch_url',
'upload_file',
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.

Expose upload_file in Compact mode

2 participants