feat(browse): drive SealSkin agent browsers with Playwright; no registry (v0.1.1-dev.10) #114

Merged
john merged 1 commit from feat/sealskin-playwright into main 2026-11-28 09:31:26 +00:00
Owner

John approved 2026-11-28: SealSkin key only, used to verify the user and find browsers that already support Playwright; on whenever the env var is set.

Depends on john/browse #19 (agent app + cdp-gateway) being released first.

  • On by env: CORN_BROWSE_GATEWAY (managed Compose: http://192.168.1.26:9870). No registry.
  • Corn → Browse: save your SealSkin application key; see your browsers (drivable or not) and sessions; launch/stop; watch link.
  • 12 MCP tools: browse_browsers, browse_sessions, browse_launch, browse_stop, browse_tabs, browse_snapshot, browse_navigate, browse_click, browse_type, browse_press, browse_screenshot, browse_close_tab.
  • Removed the read-only registry pilot.

Tests: 601 pass locally; Browse 20 incl. real Chromium driven through a copy of the real gateway.

John approved 2026-11-28: SealSkin key only, used to verify the user and find browsers that already support Playwright; on whenever the env var is set. Depends on **john/browse #19** (agent app + cdp-gateway) being released first. - **On by env**: `CORN_BROWSE_GATEWAY` (managed Compose: `http://192.168.1.26:9870`). No registry. - **Corn → Browse**: save your SealSkin application key; see your browsers (drivable or not) and sessions; launch/stop; watch link. - **12 MCP tools**: browse_browsers, browse_sessions, browse_launch, browse_stop, browse_tabs, browse_snapshot, browse_navigate, browse_click, browse_type, browse_press, browse_screenshot, browse_close_tab. - Removed the read-only registry pilot. Tests: 601 pass locally; Browse 20 incl. real Chromium driven through a copy of the real gateway.
feat(browse): drive SealSkin agent browsers with Playwright; no registry (v0.1.1-dev.10)
All checks were successful
Corn CI / release-check-1 (pull_request) Successful in 4s
Corn CI / release-check (pull_request) Successful in 0s
Corn CI / host (pull_request) Successful in 20s
Security / scan (pull_request) Successful in 23s
Security / security (pull_request) Successful in 0s
Corn CI / test (pull_request) Successful in 4m45s
Corn CI / release (pull_request) Has been skipped
Review / change impact (pull_request_target) Successful in 5m48s
b665768380
Browse is on whenever CORN_BROWSE_GATEWAY is set. Each user's own SealSkin
application key is the only credential: Corn sends it (and nothing else)
to john/browse's cdp-gateway, which asks SealSkin with it which apps and
sessions are the user's and which are Playwright-capable agent browsers.

- integrations/browse.py: Gateway client (fixed origin, no redirects/proxy
  env, bounded bodies, safe error codes), BrowseService (per-user key,
  per-session cross-replica lease), 12 MCP tools: browsers, sessions,
  launch, stop, tabs, snapshot, navigate, click, type, press, screenshot,
  close_tab. Refs come from Playwright's AI aria snapshot.
- browse_worker.cjs: one short-lived Node worker per call, connects over
  CDP through the gateway with the key as bearer, never follows redirects,
  never closes the browser, returns a fresh snapshot after each action.
- Web: Corn -> Browse page to save/replace/remove the key, list browsers
  (drivable or not), launch (optionally at a URL), see and stop sessions,
  link to watch them live in SealSkin.
- Removed: CORN_BROWSE_REGISTRY, the registry and grant table, the
  read-only pilot tools.
- Managed Compose sets CORN_BROWSE_GATEWAY=http://192.168.1.26:9870.

Tests: 20 Browse tests, two of which drive a real headless Chromium
through a copy of the real gateway (fake SealSkin + fake Docker running
the real relay): navigate, click, type, tabs, screenshot, stale ref and
tab errors, other users' and non-agent sessions refused. Full suite 601.

Change review · 66a01251d71d → b66576838068

Call paths changed by this PR

Caller → changed symbol → callee. Each edge labels the line in the caller. One detected entry path (up to 3 hops) is included when found. Static evidence, not a runtime stack trace.

After

flowchart LR
    n0["render - modified"]
    n1["main"]
    n2["caddyfile"]
    n3["Settings.from_env - modified"]
    n4["_csv"]
    n5["_env"]
    n6["_seconds"]
    n7["gateway_url - added"]
    n8["test_gateway_must_be_an_origin"]
    n9["Gateway.__init__ - added"]
    n10["Gateway.cdp - added"]
    n11["Gateway.call - added"]
    n1 -->|L188| n0
    n0 -->|L91| n2
    n3 -->|L418| n4
    n3 -->|L393| n5
    n3 -->|L421| n6
    n8 -->|L97| n7

Changed symbols:

  • modified render — scripts/managed_compose.py:87
  • modified Settings.from_env — src/corn/config.py:392
  • added gateway_url — src/corn/integrations/browse.py:63
  • added Gateway.__init__ — src/corn/integrations/browse.py:81
  • added Gateway.cdp — src/corn/integrations/browse.py:85
  • added Gateway.call — src/corn/integrations/browse.py:89
    Bounded view: 127 more changed symbols and 1 neighbour references omitted.

Before · removed

flowchart LR
    n0["Target.binding - removed"]
    n1["_endpoint - removed"]
    n2["load"]
    n3["load_targets - removed"]
    n4["_uuid - removed"]
    n5["_unique_json - removed"]
    n6["SealSkin.__init__ - removed"]
    n3 -->|L144| n1
    n3 -->|L145| n4
    n2 -->|L44| n3

Changed symbols:

  • removed Target.binding — src/corn/integrations/browse.py:77
  • removed _endpoint — src/corn/integrations/browse.py:84
  • removed _uuid — src/corn/integrations/browse.py:107
  • removed _unique_json — src/corn/integrations/browse.py:113
  • removed load_targets — src/corn/integrations/browse.py:122
  • removed SealSkin.__init__ — src/corn/integrations/browse.py:177
    Bounded view: 33 more changed symbols and 0 neighbour references omitted.

Removed call edges (base revision):

  • env → load at tests/test_browse.py:72
  • env → target at tests/test_browse.py:74
Overall architecture after this change

Source: b66576838068 · code-review 0.1.0-dev.1.

Generated from resolved static calls between reviewed code areas. Numbers are call sites, not request counts.
Framework registration, dynamic dispatch, and unresolved calls are not shown. This is not a deployment map.
Showing 7 of 7 inter-area edges. Edit the reviewed source instead of this generated page.

flowchart LR
    n1["Console"]
    n2["Identity"]
    n3["Linked MCP"]
    n4["NSW integrations"]
    n5["Persistence"]
    n6["REST handlers"]
    n7["Server composition"]
    n8["Shared contracts"]
    n9["Shopping"]
    n5 -->|"9"| n2
    n7 -->|"5"| n6
    n7 -->|"2"| n8
    n1 -->|"1"| n4
    n1 -->|"1"| n9
    n3 -->|"1"| n2
    n7 -->|"1"| n2

This diagram is for the linked commit. It refreshes after required checks pass for a new head.

<!-- john/release:architecture-review:v1 --> # Change review · `66a01251d71d` → [`b66576838068`](https://code.yawn.dev/john/corn/commit/b6657683806872759e8c0a79853f55824ce75b3a) ## Call paths changed by this PR Caller → changed symbol → callee. Each edge labels the line in the caller. One detected entry path (up to 3 hops) is included when found. Static evidence, not a runtime stack trace. ### After ```mermaid flowchart LR n0["render - modified"] n1["main"] n2["caddyfile"] n3["Settings.from_env - modified"] n4["_csv"] n5["_env"] n6["_seconds"] n7["gateway_url - added"] n8["test_gateway_must_be_an_origin"] n9["Gateway.__init__ - added"] n10["Gateway.cdp - added"] n11["Gateway.call - added"] n1 -->|L188| n0 n0 -->|L91| n2 n3 -->|L418| n4 n3 -->|L393| n5 n3 -->|L421| n6 n8 -->|L97| n7 ``` Changed symbols: - **modified** `render` — `scripts/managed_compose.py:87` - **modified** `Settings.from_env` — `src/corn/config.py:392` - **added** `gateway_url` — `src/corn/integrations/browse.py:63` - **added** `Gateway.__init__` — `src/corn/integrations/browse.py:81` - **added** `Gateway.cdp` — `src/corn/integrations/browse.py:85` - **added** `Gateway.call` — `src/corn/integrations/browse.py:89` Bounded view: 127 more changed symbols and 1 neighbour references omitted. ### Before · removed ```mermaid flowchart LR n0["Target.binding - removed"] n1["_endpoint - removed"] n2["load"] n3["load_targets - removed"] n4["_uuid - removed"] n5["_unique_json - removed"] n6["SealSkin.__init__ - removed"] n3 -->|L144| n1 n3 -->|L145| n4 n2 -->|L44| n3 ``` Changed symbols: - **removed** `Target.binding` — `src/corn/integrations/browse.py:77` - **removed** `_endpoint` — `src/corn/integrations/browse.py:84` - **removed** `_uuid` — `src/corn/integrations/browse.py:107` - **removed** `_unique_json` — `src/corn/integrations/browse.py:113` - **removed** `load_targets` — `src/corn/integrations/browse.py:122` - **removed** `SealSkin.__init__` — `src/corn/integrations/browse.py:177` Bounded view: 33 more changed symbols and 0 neighbour references omitted. Removed call edges (base revision): - `env` → `load` at `tests/test_browse.py:72` - `env` → `target` at `tests/test_browse.py:74` <details><summary>Overall architecture after this change</summary> Source: [b66576838068](https://code.yawn.dev/john/corn/commit/b6657683806872759e8c0a79853f55824ce75b3a) · `code-review 0.1.0-dev.1`. Generated from resolved static calls between reviewed code areas. Numbers are call sites, not request counts. Framework registration, dynamic dispatch, and unresolved calls are not shown. This is not a deployment map. Showing 7 of 7 inter-area edges. Edit the reviewed source instead of this generated page. ```mermaid flowchart LR n1["Console"] n2["Identity"] n3["Linked MCP"] n4["NSW integrations"] n5["Persistence"] n6["REST handlers"] n7["Server composition"] n8["Shared contracts"] n9["Shopping"] n5 -->|"9"| n2 n7 -->|"5"| n6 n7 -->|"2"| n8 n1 -->|"1"| n4 n1 -->|"1"| n9 n3 -->|"1"| n2 n7 -->|"1"| n2 ``` </details> This diagram is for the linked commit. It refreshes after required checks pass for a new head.
john merged commit e10c261bcd into main 2026-11-28 09:31:26 +00:00
john deleted branch feat/sealskin-playwright 2026-11-28 09:31:26 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
john/corn!114
No description provided.