fix(browser): expose managed download actions in agent browser tool#93859
fix(browser): expose managed download actions in agent browser tool#93859LeonidasLux wants to merge 1 commit into
Conversation
Add download and waitfordownload actions to the agent-facing browser tool schema, routing, and client helpers so agents can capture downloaded file paths after clicking a snapshot ref or waiting for a pending download. The underlying browser control API already supports /download and /wait/download; this change wires them into the agent tool surface. - Add download/waitfordownload to BROWSER_TOOL_ACTIONS enum in schema - Add path field to BrowserToolSchema for output path control - Add browserDownload/browserWaitForDownload client action helpers - Add download proxy timeout resolution with transport slack - Route both actions through host client and node browser proxy - Update tool description in browser-tool.ts and plugin-registration.ts - Document agent-facing download actions in browser-control.md - Add regression coverage for host and node proxy download routing Fixes openclaw#93250
|
Codex review: needs real behavior proof before merge. Reviewed June 19, 2026, 9:23 PM ET / 01:23 UTC. Summary PR surface: Source +163, Tests +283, Docs +6. Total +452 across 11 files. Reproducibility: yes. at source level: current main has managed Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land one canonical browser-plugin fix after redacted live Gateway/browser proof shows both new actions save files under the managed downloads root and return paths while preserving profile restrictions. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main has managed Is this the best way to solve the issue? Likely yes at the code boundary: reusing the existing managed download endpoints is cleaner than sampling click side effects after AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e0ec42e0e0e2. Label changesLabel justifications:
Evidence reviewedPR surface: Source +163, Tests +283, Docs +6. Total +452 across 11 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Summary
browsertool did not expose the managed browser download helpers even though the CLI/control API already supported/downloadand/wait/download.downloadandwaitfordownloadactions to the browser tool schema/routing, export the existing runtime helpers, document the actions, and add regression coverage for host and node proxy routing.Fixes #93250
Linked context
Real behavior proof
Behavior addressed: Agent-facing browser tool now exposes
downloadandwaitfordownloadactions that reach the existing managed browser download endpoints.Real setup tested: Local OpenClaw built from source
Exact steps or command run after fix:
After-fix evidence:
Test run:
Format check:
All matched files use the correct format.Lint check:
0 warnings, 0 errorsObserved result after the fix: The agent-facing browser tool
actionenum now includesdownloadandwaitfordownload. The CLI exposes both commands. Tests pass for host client routing, node proxy routing, timeout propagation, and parameter validation.What was not tested: A live Chromium download in a real browser session. This PR relies on the existing browser-side download implementation (which has its own test coverage) and adds the missing agent tool contract/routing coverage. The existing lower-level download routes (
POST /download,POST /wait/download) are unchanged.Proof limitations or environment constraints: No real browser instance was available in the test environment. The CLI verification was done with
OPENCLAW_STATE_DIRpointed at an empty temp directory with no browser profiles configured, but the CLI command registration and tool schema validation do not require an active browser.Tests and validation
Coverage scenarios:
Risk checklist
Did user-visible behavior change? (
Yes— agents can now useaction="download"andaction="waitfordownload"in the browser tool)Did config, environment, or migration behavior change? (
No)Did security, auth, secrets, network, or tool execution behavior change? (
Yes— exposes existing managed browser download endpoints through the agent tool)What is the highest-risk area?
How is that risk mitigated?
Current review state
What is the next action?
What is still waiting on author, maintainer, CI, or external proof?
Which bot or reviewer comments were addressed?