Skip to content

feat(browser): add acting, dialog, confined upload/drop, network body, and profiling RPC executors - #386

Merged
Hona merged 5 commits into
devfrom
browser-tools/pr3-rpc-act-files-profile
Nov 21, 2026
Merged

Hona merged 5 commits into
devfrom
browser-tools/pr3-rpc-act-files-profile

Conversation

@Hona

@Hona Hona commented Nov 21, 2026

Copy link
Copy Markdown
Member

Summary

Adds the remaining acting, JavaScript dialog, confined upload/drop, network response body, and profiling executors for experimental.browser v4, ported from official anomalyco/opencode at db2d889c0e24daf7b34c8dede641fb01fcd02c00.

Also updates docs/upstream-sync/ledger.json: marks UP-095-PROMPT-GATE as "have it" (merged in #325 d31feca9) and refreshes UP-095-TOOLS.

Ported operations (official db2d889c)

  • Acting & forms (apps/desktop/src/surfaces/browser/rpc/exec/input.rs): click, hover, drag, fill (text + structured date/time/month/week/datetime-local), fill_form, select, check (checkbox + radio + post-click state check), press (clipboard/native-menu shortcuts refused), and scroll (packages/plugin-browser/src/rpc.ts:379-441, packages/gui-plugins/src/browser/chromium.ts). All CDP calls go through send_typed_cdp / send_typed_cdp_in_frame carrying #350's frame_id, so #350's engine frame authority keeps Input.* refused on any tab with extension frames.
  • JavaScript dialogs (exec/dialog.rs): dialog (get / accept / dismiss + promptText) using #268's DialogGate (BrowserHost::answer_dialog) with legacy CDP fallback (rpc.ts:498-506, chromium.ts).
  • Confined uploads & drops (exec/files.rs, apps/browser-engine/src/agent.rs, wire.rs, protocol.rs, find.rs): files.upload and files.drop stage server-transferred bytes under marker-guarded <profile>/opencode-page-uploads/<tab>/ (<= 8 files, <= 5 MiB total, symlink-free canonical check in engine), refuse extension surfaces (classify_surface != Clean) and Guard 1a inherited-permission sites, and clean up on tab close / engine shutdown (rpc.ts:507-518, chromium.ts).
  • Live diagnostics (exec/capture.rs, session.rs): ensure_tab_cdp enables Log.enable and Network.enable; network.get fetches response bodies asynchronously via Network.getResponseBody while redacting Authorization / Cookie / Set-Cookie (rpc.ts:543-573).
  • Profiling & analyzers (exec/profile.rs, crates/browser-pane/src/tools/profiling.rs): trace.start, trace.stop, trace.analyze, cpu.start, cpu.stop, cpu.analyze, heap.snapshot, heap.summary, heap.query, heap.object, heap.compare (dual-file authorization target in exec/read.rs), and truthful unsupported for lighthouse (rpc.ts:574-664, packages/gui-plugins/src/browser/profiling.ts, analysis.ts). Trace/heap buffers are bounded (250k events / 64 MiB raw, 5 MiB gzip transfer).

Recorded difference (notes/upstream-sync/ours.md)

  • Profiling operations (heap.snapshot, cpu.*, trace.*) are refused by #350's engine ledger whenever browser extensions are active (extensions_active == true), stricter than official (profiling.ts).

Engine revision

  • Touches apps/browser-engine/ and the wire (UploadFiles, DropFiles, Ready.agent_files), and opencode-browser-engine built locally with 0 warnings.
  • ENGINE_REVISION is NOT bumped: published stable.json is at 156.0.26-2 (rev 2) and dev is already ahead at ENGINE_REVISION = 3.

Checks

  • cargo check -p opencode-desktop --locked: pass (0 warnings).
  • cargo build --manifest-path apps/browser-engine/Cargo.toml --bin opencode-browser-engine: pass (0 warnings).
  • scripts/guardrails.ps1: 5/5 passed.
  • Live proof script ready at proof/browser-tools/pr3/run-pr3-proof.ts (will run asynchronously after merge per TEMPO 2).

Hona added 5 commits November 20, 2026 23:43
…act-files-profile

# Conflicts:
#	apps/browser-engine/src/engine.rs
#	apps/browser-engine/src/main.rs
#	apps/browser-engine/src/wire.rs
#	apps/desktop/src/surfaces/browser/rpc/exec/capture.rs
#	apps/desktop/src/surfaces/browser/rpc/exec/mod.rs
#	apps/desktop/src/surfaces/browser/rpc/exec/nav.rs
#	apps/desktop/src/surfaces/browser/rpc/mod.rs
#	apps/desktop/src/surfaces/browser/rpc/session.rs
#	crates/browser-pane/src/client.rs
#	crates/browser-pane/src/find.rs
#	crates/browser-pane/src/machine.rs
#	crates/browser-pane/src/protocol.rs
…act-files-profile

# Conflicts:
#	apps/browser-engine/src/engine.rs
#	apps/browser-engine/src/wire.rs
#	crates/browser-pane/src/client.rs
#	crates/browser-pane/src/machine.rs
#	crates/browser-pane/src/protocol.rs
…act-files-profile

# Conflicts:
#	apps/browser-engine/src/cef_runtime.rs
#	apps/browser-engine/src/downloads.rs
#	apps/browser-engine/src/engine.rs
#	apps/browser-engine/src/wire.rs
#	apps/desktop/src/surfaces/browser/rpc/session.rs
#	crates/browser-pane/src/machine.rs
#	crates/browser-pane/src/protocol.rs
#	docs/upstream-sync/ledger.json
…act-files-profile

# Conflicts:
#	crates/browser-pane/src/client.rs
#	docs/upstream-sync/ledger.json
@Hona
Hona merged commit 1622012 into dev Nov 21, 2026
@Hona
Hona deleted the browser-tools/pr3-rpc-act-files-profile branch November 21, 2026 04:18
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

PR test build retired — merged into dev. Install or auto-update OpenCode (Rune) from https://anoma.ly/release/opencode/desktop-rune/dev/macos-arm64-dmg.

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