Skip to content

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

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

williamloo-scale wants to merge 3 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, on main's website SDK and browser/v1 (no website.toml: a site's env.toml declares it, and its card says it is live).

  • Live sites. @website(domains=[...], live=True, allow_hosts=[...]) declares a real site: its server serves only the data plane and the card (which advertises live, allow_hosts and signs_in, and whose ready says whether its account works). @session returns the storage state a browser adds to start signed in, in browser/v1's cookies/set and local_storage/set shapes, a cookie without a url or domain given the site's first domain; self.setting(name) reads a credential the deploy passes. A synthetic site may override its signed session cookie the same way. A computer's site routing never routes a live site, which the browser reaches at its real domains.
  • sign_in_browser step. Calls each live site's website/v1 session and hands it to a browser child that serves browser/v1 cookies/set (main's WebsiteBrowserEnvironment does): the site's old cookies go through cookies/delete when served, then cookies/set, then local_storage/set (refused on a browser without it); with two browsers, browser must name one. 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. Records and errors never repeat a value.
  • Playwright MCP browser serves browser/v1 cookies/set and cookies/delete in the website browser's shapes, writing its storage state file and, through DevTools, any running context.
  • Website env settings. A website env's settings (env.toml or stored) are its container's environment variables. A secret-looking setting must be a secret:/env: reference, resolved only into the compose file, which is logged masked. The gateway's own variables 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, whose state the subclass keeps itself (add_site_data, reset_site_data, its own @get_data); a data/add WARC part replaces the capture until data/reset. Example in examples/website/replay/.

Before merging

  • The Playwright MCP recorder's protocol floor rises to 0.1.467, the first release with the website browser's cookie shapes, which it imports.
  • website.session is now the decorator, which shadows the module.
  • The replay example's Dockerfile installs this repo's protocol from the repo root, so its env.toml can't be built as a bundle folder until a protocol release has website.replay.
  • No run against a real browser or a real live site yet.

Test

CLI, config, bundle, env, task, task step, env provider and protocol suites: 8,110 passed. Two test_disk_recipe tests fail and the rubrics non-finite-scores module can't import hypothesis, as on main on this machine.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 4/5

Fix the live-only computer deployment failure before merging.

Fix All in CursorFindings

  1. P1 Live-only runs cannot start ▶
Fix with agent prompt
### Issue 1
src/agent_env/env/envs/computer/utils/sites.py:447-449
When a run deploys only live websites, this filter makes `deployed_sites()` return an empty list. `ComputerEnv.run_env_params()` treats that as no websites having been deployed and raises, so a computer using `site_routing=True` cannot deploy.

Allow a live-only result to proceed without synthetic routes, while still rejecting runs that deployed no websites.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

The latest changes keep live websites out of synthetic routing and move WARC parsing into a worker thread.

  • Live website environments can share real sites with a run.
  • Sign-in steps put a live site's session into its browser.
  • Captured websites can be replayed with their API routes on top.

Reviews (21) · Last reviewed commit: "fix(website): a computer never routes a ..." · 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 2 times, most recently from 04d3f23 to 956163f Compare November 4, 2026 05:10
@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).

williamloo-scale and others added 2 commits November 6, 2026 10:34
A live site, @website(domains=[...], live=True, allow_hosts=[...]), serves only the data plane and its card, and its
@session method's storage state comes back from website/v1's session in browser/v1's cookies/set and
local_storage/set shapes. sign_in_browser hands each live site's session to the browser (cookies/delete, cookies/set,
local_storage/set) and reset_env signs in again; a deploy with a live site is marked not reproducible. The Playwright
MCP browser serves browser/v1's cookies/set and cookies/delete. A website env's settings are its container's
environment variables, secrets as references. ReplayWebsite serves a WARC capture, with @api routes on top whose
state the site keeps itself.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…need one named, and a plain @session runs off the loop (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 a3eeb6d to e83a709 Compare November 6, 2026 18:35
… a loaded capture off the loop (FD-4683)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Comment on lines +447 to +449
if params.get("live") is True:
named.add(service)
continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Live-only runs cannot start

When a run deploys only live websites, this filter makes deployed_sites() return an empty list. ComputerEnv.run_env_params() treats that as no websites having been deployed and raises, so a computer using site_routing=True cannot deploy.

Allow a live-only result to proceed without synthetic routes, while still rejecting runs that deployed no websites.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agent_env/env/envs/computer/utils/sites.py
Line: 447-449

Comment:
**Live-only runs cannot start**

When a run deploys only live websites, this filter makes `deployed_sites()` return an empty list. `ComputerEnv.run_env_params()` treats that as no websites having been deployed and raises, so a computer using `site_routing=True` cannot deploy.

Allow a live-only result to proceed without synthetic routes, while still rejecting runs that deployed no websites.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Cursor Fix in Claude Code Fix in Codex

@earakely-scale

Copy link
Copy Markdown
Collaborator

Closing this PR. We're taking over the website stack, and this branch was written against main as it stood on Nov 3. Each part is now superseded, or planned elsewhere:

The branch stays for reference, at head 46566a5.

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