Skip to content

Add setup for web Claude Code#5362

Draft
backspace wants to merge 3 commits into
mainfrom
stack-on-claude-web-cs-10014
Draft

Add setup for web Claude Code#5362
backspace wants to merge 3 commits into
mainfrom
stack-on-claude-web-cs-10014

Conversation

@backspace

Copy link
Copy Markdown
Contributor

No description provided.

backspace and others added 3 commits June 29, 2026 12:49
Add .devcontainer/claude-web-setup.sh, a provisioning script to point the
claude.ai/code cloud environment's Setup Script at. The cloud VM runs the
whole stack on localhost via the standard `mise run dev` (no edge, no
proxy/URL-rewriting needed); the script installs the toolchain + deps,
builds the boxel-ui/icons addons (the host vite build needs the per-icon
modules), provisions the local dev cert, and clones the skills realm.
Catalog is skipped at runtime (SKIP_CATALOG=true mise run dev) to fit the
~16GB VM.

Make Synapse start on the cloud VM (a headless root host): pass UID/GID=0
so the image doesn't drop to uid 991 and fail to write the root-owned
config, and bind listeners to 0.0.0.0 when the kernel has no IPv6 (the
default "::" bind dies otherwise). Both are gated on the actual condition,
so normal dev hosts are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Build on the base setup: install mkcert (the dev-cert step requires it),
write a combined CA bundle (agent-proxy CAs + mkcert rootCA) so Node trusts
both the proxy for outbound HTTPS and the mkcert leaf over loopback, and add
a per-session start script. The start script runs `mise run dev-all` (the
headless VM has no second terminal for the host the prerender gates on),
starts the Docker daemon, points NODE_EXTRA_CA_CERTS at the combined bundle,
and registers Matrix users on the fresh Synapse before the stack boots so the
realm-server logs in cleanly. SKIP_CATALOG fits the memory budget and
SKIP_BOXEL_HOMEPAGE skips the realm whose content repo this VM can't clone.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add .devcontainer/claude-web-import-index.sh and wire it into the start
script so a cold stack restores the CI-built index instead of re-rendering
every card (the live prerender index takes minutes; the SQL restore takes
seconds).

CI's cache-index job already dumps boxel_index / realm_versions / realm_meta
and uploads the boxel-index-cache artifact. The existing
scripts/import-cached-index.sh relies on the gh CLI and is only wired into
environment mode; this cloud session has neither (raw api.github.com is
blocked — only the GitHub MCP integration can read Actions). So the new
importer reads from a local cache file (default
~/.local/share/boxel/index-cache/boxel-index-cache.sql.gz), with a gh
download fallback for devs who have it. It skips when the DB is already
warm, migrates the schema, truncates the three tables, and restores the
dump. No URL remap is needed: the cache stores https://localhost:4201 URLs,
which match the standard-dev origin.

When the import succeeds the start script boots dev-all with
REALM_SERVER_FULL_INDEX_ON_STARTUP=false so the realm-server trusts the
imported rows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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