You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(browser): add download/wait-for-download actions so agents get notified on file download
Browser click already downloads to /tmp/openclaw/downloads but the agent has no
way to know the download completed — it keeps retrying. This adds:
- action=download: click element via ref + wait for download, returns file path
- action=wait-for-download: wait for a pending download without a new click
- param path: optional download destination path
Server-side routes (POST /download, POST /wait/download) already existed in
agent.act.download.ts; only the agent tool routing was missing.
Closes#93250
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@@ -477,6 +486,7 @@ export function createBrowserTool(opts?: {
477
486
'For profile="user" or other existing-session profiles, omit timeoutMs on act:type, evaluate, hover, scrollIntoView, drag, select, and fill; that driver rejects per-call timeout overrides for those actions.',
478
487
'When a node-hosted browser proxy is available, the tool may auto-route to it. Pin a node with node=<id|name> or target="node".',
479
488
"When using refs from snapshot (e.g. e12), keep the same tab: prefer passing targetId from the snapshot response into subsequent actions (act/click/type/etc). For tab operations, targetId also accepts tabId handles (t1) and labels from action=tabs.",
489
+
"For download actions, use action=download (click an element and wait for download) or action=wait-for-download (wait for a pending download). Both return the file path in the configured downloads directory.",
480
490
"For multi-step browser work, login checks, stale refs, duplicate tabs, or Google Meet flows, use the bundled browser-automation skill when it is available.",
481
491
'For stable, self-resolving refs across calls, use snapshot with refs="aria" (Playwright aria-ref ids). Default refs="role" are role+name-based.',
482
492
"Use snapshot+act for UI automation. Avoid act:wait by default; use only in exceptional cases when no reliable UI state exists.",
@@ -990,6 +1000,67 @@ export function createBrowserTool(opts?: {
0 commit comments