Skip to content

feat(website): the browser client, env website new and env website dev (FD-4683) - #446

Open
williamloo-scale wants to merge 3 commits into
wloo/website-specfrom
wloo/website-authoring-cli
Open

williamloo-scale wants to merge 3 commits into
wloo/website-specfrom
wloo/website-authoring-cli

Conversation

@williamloo-scale

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

Copy link
Copy Markdown
Contributor

Stacked on #445.

Authoring tools for SDK sites.

  • site-client.js (with .d.ts), shipped in the protocol package: api(), universeNow() from X-Universe-Now, followUniverseClock(), which re-reads it from the health path so an idle page follows a stopped or faster clock, session(), signIn(), signOut(), errors as ApiError. Notes uses a copy, which a test keeps identical.
  • agent-env env website new NAME scaffolds a site like Notes: site.py, seed, a Vite web/ with the client, Dockerfile, env.toml, README. --from-mcp reads an MCP server's tools from its source (AST, without running it) and --from-tools-json from a tools/list answer; each tool becomes a stub route answering 501.
  • agent-env env website dev runs a site locally without Docker: vite build --watch, uvicorn reload, and a local clock with the gateway's /clock routes. Each reload is synced to the clock and seeded, and conformance runs once.

A scaffolded image installs the protocol from PyPI, so it needs a protocol release with these changes.

Test

Unit suite: 12,814 passed (one GitHub-clone test from main, which hangs on the local machine on main too, deselected). Generated sites pass the conformance check in the tests.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge; no new actionable issue remains.

Summary

Adds a shared browser client and commands to create and run website environments locally.

  • Website pages share a client for API calls, sign-in, and universe time.
  • The website command creates a starter project with editable routes and a web app.
  • The website dev command runs a site with reload and a local clock.
  • Website registration uses the site's readiness declaration by default.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  New["env website new"] --> Files["Site, seed, browser client and Dockerfile"]
  Dev["env website dev"] --> Build["Build and watch web"]
  Dev --> Server["Run server with reload"]
  Dev --> Clock["Start local clock"]
  Server --> Supervisor["Detect each new boot"]
  Clock --> Supervisor
  Supervisor --> Prime["Sync clock and load seed"]
  Prime --> Check["Run conformance once"]
  Check --> Restore["Restore local clock and seed"]
Loading

Reviews (13) · Last reviewed commit: "fix(website): a new site's page reloads ..." · Reviewed by Greptile

@williamloo-scale williamloo-scale changed the title website: browser client, env website new and env website dev (FD-4683) feat(website): the browser client, env website new and env website dev (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
Comment thread src/agent_env/cli/env/website_dev.py Resolved
Comment thread src/agent_env/cli/env/website_dev.py Resolved
Comment thread src/agent_env/cli/env/website_dev.py Resolved
Comment thread src/agent_env/cli/env/website_dev.py Resolved
Comment thread src/agent_env/cli/env/website_dev.py Resolved
Comment thread src/agent_env/cli/env/website_dev.py Resolved
Comment thread src/agent_env/cli/env/website_dev.py Resolved
@williamloo-scale
williamloo-scale force-pushed the wloo/website-authoring-cli branch 2 times, most recently from 8cc706b to 7e5b297 Compare November 3, 2026 22:52
Comment thread src/agent_env/cli/env/website.py Resolved
@williamloo-scale
williamloo-scale force-pushed the wloo/website-authoring-cli branch from 7e5b297 to 9a073e2 Compare November 3, 2026 23:47
williamloo-scale added a commit that referenced this pull request Nov 3, 2026
This PR's change, rebased as one commit onto #446.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@williamloo-scale
williamloo-scale force-pushed the wloo/website-authoring-cli branch from 9a073e2 to 543d2b2 Compare November 4, 2026 00:32
williamloo-scale and others added 3 commits November 3, 2026 16:44
…v (FD-4683)

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

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…mes its timeouts (FD-4683)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…dress, as Notes does (FD-4683)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@williamloo-scale
williamloo-scale force-pushed the wloo/website-authoring-cli branch from 543d2b2 to c6770ea Compare November 4, 2026 01:06

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.

1 participant