feat(browser): add agent download actions#74411
Conversation
Greptile SummaryThis PR adds Confidence Score: 5/5This PR is safe to merge; it exposes existing server-side download endpoints with correct timeout layering and good test coverage. No logic, correctness, or security issues found. The timeout chain (browser-wait → client-HTTP → proxy → gateway) is implemented consistently and verified by dedicated unit tests for both explicit and default waits. Required-param validation, both export paths, and the schema extension are all correct. No files require special attention. Reviews (1): Last reviewed commit: "feat(browser): add agent download action..." | Re-trigger Greptile |
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Keep open: current main and the latest release still lack the explicit agent-facing Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. Do we have a high-confidence way to reproduce the issue? Yes, source-level reproduction is high-confidence: current main and Is this the best way to solve the issue? Unclear. Explicit download actions are a plausible owner-boundary fix because the managed routes already exist, but maintainers still need to choose this API shape against the open Security review: Security review cleared: No concrete supply-chain defect was found, but the diff is security-sensitive because it exposes managed browser download endpoints to agents and relies on existing path/profile checks. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 5361e5a0b455. |
|
Codex review: needs maintainer review before merge. What this changes: The PR adds Maintainer follow-up before merge: This is an open implementation PR for a real current-main gap; the remaining action is maintainer review plus CI/security validation of the new agent capability, not an automated repair lane. Review detailsBest possible solution: Land this PR, or a narrow replacement, after confirming the new agent actions route only through the existing managed download API, preserve download-path restrictions, keep existing-session profiles unsupported, and document the agent action surface alongside the CLI/control API. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 8cf724a381a3. |
ca534ee to
96c1f7e
Compare
96c1f7e to
f64bac3
Compare
|
@clawsweeper re-review |
|
This pull request has been automatically marked as stale due to inactivity. |
|
@GRD-Chang Hello, I'm experiencing the same issue and noticed that your PR is addressing it. Could you please update and merge it? I hope to see this fix in a new release. Thank you! |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Landed the improved current-main version in #101369 as Thank you @GRD-Chang for the original explicit download-action design. Your authorship is preserved in the landed commit with I recreated the branch as a maintainer PR because the stale fork branch could not accept the current-main rewrite through the verified GitHub branch-update path without serializing the repository-wide base gap. The replacement keeps the useful functionality and adds typed host/node dispatch, bounded 120/125/130-second wait layers, current-tab navigation enforcement, guarded node path rewriting, docs, and regression coverage. Verification on the landed patch:
Closing this superseded branch; future contributor PRs are easier to update when the fork stays close to current |
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.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
download/waitfordownload. During implementation, the new action routing also needed to align outer transport timeouts with browser-side download waits instead of keeping the older fixed 20s HTTP/proxy timeout.Regression Test Plan (if applicable)
extensions/browser/src/browser-tool.test.ts,extensions/browser/src/browser/client-actions-core.downloads.test.tsbrowseractions routedownloadandwaitfordownloadthrough the host client or node proxy, preserve request bodies, require explicitref/pathwhere needed, and give long download waits enough outer transport timeout.User-visible / Behavior Changes
Agents can now call the built-in
browsertool withaction="download"to click a snapshot ref and save the resulting file, oraction="waitfordownload"to wait for the next managed download. Results include the saved download path returned by the existing browser control API.Diagram (if applicable)
Security Impact (required)
Yes/No) YesYes/No) NoYes/No) YesYes/No) YesYes/No) YesYes, explain risk + mitigation: this exposes existing managed browser download endpoints through the agent tool. It keeps the existing browser server/profile capability checks, keeps existing-session download interception managed-only, and constrains saved paths to the browser download path handling already used by the control API.Repro + Verification
Environment
Steps
action="download"with a snapshotrefand outputpath, or executeaction="waitfordownload"with an optional outputpath.browser.proxyand preserve both body timeout and outer transport timeout.Expected
/downloador/wait/downloadand returns the browser download payload, including the saved file path.Actual
Evidence
Verification run locally:
Note:
pnpm check:changedpassed conflict-marker checks, changelog attribution checks, extension production typecheck, and extension test typecheck, then local broadlint:extensionswas terminated bytsgolintwith SIGTERM on an 8 GB host. I used the targeted repo lint wrapper above to avoid exceeding the host memory limit.Human Verification (required)
What you personally verified (not just CI), and how:
ref/pathvalidation; docs/format/lint/typecheck coverage listed above.timeoutMsuses the browser-side default download wait plus transport slack; explicittimeoutMsscales both proxy and gateway waits; existing-session managed-only scope is documented and unchanged.Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations