Skip to content

feat(browser): add site-tool discovery and execution #26

Closed

Description

@trmosala

Problem

WebMCP/site-tool discovery is not implemented.

Implementation order

Browser backlog item 22 of 29. Phase: Settings and developer features. This is ordered planning, not a claim that Codex implements every item. Items 24–29 are optional additions.

Acceptance criteria

  • Verify the supported site-tool protocol, then expose origin-bound tool discovery.
  • Display requested actions and enforce permission before execution.
  • Test malicious metadata, navigation, tool changes, cancellation and revoked access.

Dependencies

Engineering and validation

Reuse existing Chromium/Electron/OS facilities where available. Preserve main-process ownership and permission enforcement, add no placeholder controls, use existing i18n patterns, and test behavior with synthetic fixtures. Document platform limitations. Baseline: browser-tabs at 47fef3e; see packages/cm-browser/README.md and password-security.md.

Activity

  1. trmosala commented on Sep 18, 2026

    @trmosala
    OwnerAuthor

    Implemented and pushed on browser-tabs.

    Commits:

    • 945c2f120 — chore(desktop): upgrade Electron runtime
    • 2d10f66b4 — feat(browser): add WebMCP site tools

    Behavior:

    • Upgrades to Electron 44.3.0 / Chromium 152 and enables Chromium's WebMCP Blink feature without exposing general CDP access.
    • Adds bounded top-document browser_list_site_tools discovery. Cross-origin child tools, frame IDs, DOM IDs, and registration stack traces are excluded; metadata is labelled untrusted.
    • Adds browser_execute_site_tool with read gating, named per-origin Ask approval, and fresh default-cancel native consent showing task, tab, source, tool, and exact JSON arguments.
    • Binds tool ref/revision, argument hash, source URL/origin, access, owner, task, allowlist, deadline, and final sidecar delivery. Navigation, registration changes, revocation, cancellation, and stale refs fail closed.
    • Caps arguments at 8 KiB, the aggregate discovery inventory at 48 KiB, and returned untrusted content at 16 KiB. Cancellation calls Chromium WebMCP.cancelInvocation.
    • Documents the experimental-runtime and platform limits in packages/cm-browser/README.md.

    Verification:

    • cm-browser: 86 tests / 3,428 expectations, typecheck, build — PASS
    • desktop browser suite: 183 tests — PASS; provider config: 15 tests / 87 expectations — PASS
    • WPP bridge suite: 197 tests / 501 expectations — PASS
    • app native i18n: 10 tests / 459 expectations and app typecheck — PASS
    • desktop/cm-browser typechecks — PASS
    • focused real Chromium --site-tools: discovery, execution, cancellation, navigation invalidation, removal — PASS
    • one full isolated native browser smoke — PASS on Chromium 152.0.7977.78
    • scoped oxlint: 169 warnings, 0 errors; whitespace check — PASS
    • push hook: 31/31 workspace typechecks — PASS

    The native fixtures use a temporary origin-isolated loopback site and synthetic consent seams. They do not establish packaged/macOS/Linux behavior, physical-dialog accessibility, authenticated third-party compatibility, or external security assurance; those remain tracked separately, especially #34.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions