Skip to content

feat(website): live sites, browser/v1 sign-in and WARC replay (FD-4683) - #447

Open
williamloo-scale wants to merge 8 commits into
wloo/website-authoring-clifrom
wloo/website-live-replay
Open

williamloo-scale wants to merge 8 commits into
wloo/website-authoring-clifrom
wloo/website-live-replay

Conversation

@williamloo-scale

@williamloo-scale williamloo-scale commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #446.

Live and replayed websites.

  • Live sites. @website(domains=[...], live=True, allow_hosts=[...]) declares a real site: its server serves only health, the data plane and the card (which advertises live and allow_hosts). @session returns the cookies a browser adds to start signed in; self.setting(name) reads a credential the deploy passes.
  • browser/v1 (urn:agentenv:browser/v1): cookies/set and cookies/clear, operations of the same extension main's WebsiteBrowserEnvironment (feat(computer): WebsiteBrowserEnvironment, the base class for website browsers #449) declares with its build, clock and window; sign_in_browser picks a browser that offers cookies/set, so a website browser joins once it serves them (M5.11). The Playwright MCP browser serves them, writing its storage state and, through DevTools, any running context. Answers and errors never repeat a cookie's value.
  • sign_in_browser step. Calls each live site's session and hands the cookies to the browser; reset_env signs in again. A deploy with a live site is marked reproducible=False with its live_websites, checked against the computer's allowlist.
  • Website env settings. A website env's settings are its container's environment variables. A secret-looking setting must be a secret:/env: reference, resolved only into the compose file. The gateway's own variables, the role key among them, can't be set.
  • Replay. python -m agentenv_protocol.website.replay capture URL... writes WARC 1.1; ReplayWebsite serves a capture for any host, with @api routes taking precedence. Example in examples/website/replay/.

Before merging

  • The browser image's protocol floor rises to 0.1.405, the first release with website.browser, so it needs that release.
  • website.session is now the decorator, which shadows the module.
  • No run against a real browser or a real live site yet.

Test

Unit suite: 12,870 passed (one GitHub-clone test from main, which hangs on the local machine on main too, deselected).

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; the wildcard cookie-clearing issue is fixed.

Summary

Adds live website declarations, browser sign-in, website settings, and WARC capture and replay.

  • Live sites can sign a browser in and mark runs as non-reproducible.
  • Website deployments can pass settings into the site container.
  • Captured websites can be served again with custom API routes.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Session["Live site's session"] --> SignIn["sign_in_browser"]
  SignIn --> Clear["Clear old cookies"]
  Clear --> Set["Set new cookies"]
  Set --> Saved["Saved browser state"]
  Set --> Running["Running browser"]
  WARC["WARC capture"] --> Replay["ReplayWebsite"]
  Replay --> Pages["Captured pages and assets"]
Loading

Reviews (18) · Last reviewed commit: "fix(website): a wildcard site domain cov..." · Reviewed by Greptile

@williamloo-scale williamloo-scale changed the title website: live sites, browser/v1 sign-in, WARC replay (FD-4683) feat(website): live sites, browser/v1 sign-in and WARC replay (FD-4683) Nov 3, 2026
@williamloo-scale
williamloo-scale marked this pull request as ready for review November 3, 2026 00:24
@williamloo-scale
williamloo-scale requested a review from a team as a code owner November 3, 2026 00:24
@williamloo-scale
williamloo-scale force-pushed the wloo/website-authoring-cli branch from f542d14 to 8cc706b Compare November 3, 2026 21:50
@williamloo-scale
williamloo-scale force-pushed the wloo/website-live-replay branch from cb672e5 to 306587d Compare November 3, 2026 21:50
@williamloo-scale
williamloo-scale force-pushed the wloo/website-authoring-cli branch from 8cc706b to 7e5b297 Compare November 3, 2026 22:52
@williamloo-scale
williamloo-scale force-pushed the wloo/website-live-replay branch from 306587d to 2b782e9 Compare November 3, 2026 22:52
@williamloo-scale
williamloo-scale force-pushed the wloo/website-authoring-cli branch from 7e5b297 to 9a073e2 Compare November 3, 2026 23:47
@williamloo-scale
williamloo-scale force-pushed the wloo/website-live-replay branch from 2b782e9 to 0d613b8 Compare November 3, 2026 23:51
williamloo-scale added a commit that referenced this pull request Nov 3, 2026
…(FD-4683)

This PR's change, rebased as one commit onto #447.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
williamloo-scale added a commit that referenced this pull request Nov 4, 2026
…(FD-4683)

This PR's change, rebased as one commit onto #447.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@williamloo-scale
williamloo-scale force-pushed the wloo/website-live-replay branch from 0d613b8 to 9495ed2 Compare November 4, 2026 00:32
@williamloo-scale
williamloo-scale force-pushed the wloo/website-authoring-cli branch from 9a073e2 to 543d2b2 Compare November 4, 2026 00:32
@williamloo-scale
williamloo-scale force-pushed the wloo/website-authoring-cli branch from 543d2b2 to c6770ea Compare November 4, 2026 01:06
@williamloo-scale
williamloo-scale force-pushed the wloo/website-live-replay branch from 9495ed2 to 25dcf9a Compare November 4, 2026 01:06
@williamloo-scale
williamloo-scale force-pushed the wloo/website-live-replay branch from c2bd2fb to f7c679d Compare November 4, 2026 03:37
@williamloo-scale
williamloo-scale force-pushed the wloo/website-authoring-cli branch from c6770ea to 9c3251f Compare November 4, 2026 03:37
@williamloo-scale
williamloo-scale force-pushed the wloo/website-authoring-cli branch from 9c3251f to 8ce884c Compare November 4, 2026 03:56
@williamloo-scale
williamloo-scale force-pushed the wloo/website-live-replay branch from f7c679d to 571c04b Compare November 4, 2026 03:56
@williamloo-scale
williamloo-scale force-pushed the wloo/website-authoring-cli branch 2 times, most recently from 687d166 to 6f3fcdb Compare November 4, 2026 05:07
@williamloo-scale
williamloo-scale force-pushed the wloo/website-live-replay branch from 571c04b to 04d3f23 Compare November 4, 2026 05:07
williamloo-scale and others added 7 commits November 3, 2026 21:09
This PR's change, rebased as one commit onto #446.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…pressed and inline-styled captures (FD-4683)

- sign_in skips cookies/clear on a browser that serves only cookies/set, and names its error-record limit.
- An imported WARC's gzip or deflate answers are read decoded, so their pages' and stylesheets' links are rewritten.
- A capture loads what a page's style values, style elements and video posters name.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…d signs in again after a reset with its own timeout (FD-4683)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…'s Path under it (FD-4683)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ture and sign-in name their defaults (FD-4683)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…no state; data/get alone (FD-4683)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e reads sign-ups through data/get (FD-4683)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@williamloo-scale
williamloo-scale force-pushed the wloo/website-live-replay branch from 04d3f23 to 956163f Compare November 4, 2026 05:10
…s cookies are cleared (FD-4683)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@earakely-scale

Copy link
Copy Markdown
Collaborator

Website settings: suggest following the computer-app model

This PR makes a website env's settings bare environment variables of its container: self.setting(name) reads one, a setting whose name looks like a secret's must be a secret: / env: reference, and RESERVED_SETTINGS keeps them off the provider's own variables.

Computer apps already have a settings model for the same job (agentenv_protocol/computer/app.py):

  • the class declares class Settings(BaseModel), and a SecretStr field is a secret;
  • its JSON schema is stored with the env (AppDeclaration.settings), and put checks values against it;
  • the server receives every value in one JSON variable keyed by environment_name (AGENTENV_APP_SETTINGS), validated into self.settings as it starts.

Suggest websites do the same, implemented in the website package (no imports from computer/):

For the rebase: #428 now validates @website(domains=...) with host_problem (moved down from this PR), drops health= in favour of ready with @website(ready_timeout_s=...), and answers session with {cookies, local_storage}, each cookie with max_age (see the resolved thread on #428).

This branch has not been deployed

No deployments
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.

2 participants