Add setup for web Claude Code#5362
Draft
backspace wants to merge 3 commits into
Draft
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.