Skip to content

site: a REST API the agent builds on lex-web, replacing the zip demo - #196

Merged
alpibrupa merged 1 commit into
mainfrom
site/rest-api-demo
Sep 26, 2026
Merged

alpibrupa merged 1 commit into
mainfrom
site/rest-api-demo

Conversation

@alpibrupa

Copy link
Copy Markdown
Contributor

Summary

  • Replaces the pure-function zip demo in "Try it" (and the lex issue show block) with a real run where the agent builds a small REST API. Prompt is minimal — "check lex.toml before hand-rolling it"; no package is named. The agent found lex-web, read it, and built /health and /quote/:topic on its router.
  • Recording is a genuine, unedited run on a fresh clone with an empty store (~16 min of local qwen3.8, idle gaps capped at 2 s in playback). Tool calls stream live rather than being hidden in a log, and it ends with the code's imports/functions and the server answering four real curls.
  • Discloses an honest wrinkle on the page: the run command grants many effects because importing lex-web's router widens the runtime effect row beyond the declared [net] (follow-up filed separately).

Test plan

  • Fresh clone, empty store, lex issue verify → verified (attestation on head)
  • Ran the generated server on a free port: /health 200, /quote/courage 200 JSON, /quote/wisdom 200 JSON, /nope 404 JSON
  • Loaded the page locally: asciinema player parses the new cast, no console errors
  • Pages deploy after merge

Note: an earlier attempt "verified" in 18 s only because the working store still held ops from a previous killed run — discarded, not used.

🤖 Generated with Claude Code

The typed-issue demo was a pure function and the run was hidden in a
log file, so it played in two seconds with nothing to look at. The new
one is a real run on a fresh clone with an empty store: a one-line
"check lex.toml" nudge, no package named. The agent found lex-web,
read it, built /health and /quote/:topic on its router, closed the
issue, and the recording ends with the server answering real curls.
Tool calls stream live instead of going to a log.

Also states the wrinkle it exposed: importing lex-web's router widens
the runtime effect grant well past the declared [net].

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@alpibrupa
alpibrupa merged commit 4747caa into main Sep 26, 2026
1 check passed
@alpibrupa
alpibrupa deleted the site/rest-api-demo branch September 26, 2026 08:41
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