Skip to content

feat(home): landing-page agent + plain clone URL support#3361

Open
rafavalls wants to merge 2 commits into
mainfrom
rafavalls/lp-agent
Open

feat(home): landing-page agent + plain clone URL support#3361
rafavalls wants to merge 2 commits into
mainfrom
rafavalls/lp-agent

Conversation

@rafavalls
Copy link
Copy Markdown
Collaborator

@rafavalls rafavalls commented May 14, 2026

What is this contribution about?

Adds a "Build landing page" tile on the home page that creates a vMCP pre-wired to the Next.js + shadcn template and eagerly fires VM_START so the preview is ready by the time the user arrives. Generalises repo-backed vMCPs to also accept a plain cloneUrl (no GitHub OAuth required) with unauthenticated runtime detection for public github.com URLs, and threads the new source through preview-tab gating, branch resolution, and stream-core VM keying. Also includes sandbox host-runner stability fixes — PTY-to-pipe spawn fallback with env merge, retry on posix_spawn errors during clone, child_process.spawn for setup steps — plus dynamic ingress port autoselection and a credentials-file refresher for the s3-sync daemon so subshells share STS creds.

How to Test

  1. From the home page, click "Build landing page" — confirm the agent opens with the preview tab active and the dev server boots without manual interaction.
  2. On a vMCP whose metadata has cloneUrl set (and no githubRepo), confirm the preview tab and per-branch VM keying still work, and that the displayed clone URL has any embedded user:token@ credentials stripped.
  3. Run multiple parallel Conductor workspaces with the host runner — confirm each picks a distinct sandbox-ingress port instead of failing on EADDRINUSE.

Review Checklist

  • PR title is clear and descriptive
  • Changes are tested and working
  • Documentation is updated (if needed)
  • No breaking changes

Summary by cubic

Adds a “Build landing page” tile that spins up a Next.js + shadcn template with an eager VM_START, and adds plain cloneUrl support so repo-backed agents work without GitHub OAuth. Also hardens the sandbox runner and auto-picks a free local ingress port to keep preview reliable.

  • New Features

    • New home tile: creates a vMCP pre-wired to the shadcn Next.js template, opens with Preview, and starts the dev server automatically.
    • Repo via cloneUrl: supports public GitHub URLs without auth, detects package manager and dev port via unauthenticated API, strips any user:token@ from display, and updates branch resolution + VM keying to treat cloneUrl like githubRepo.
    • Preview UI: Preview tab appears when the agent has any repo source (GitHub link or cloneUrl).
  • Stability

    • Host runner: falls back from PTY to pipe spawn with env merge on spawn errors, runs setup steps with child_process.spawn, and retries clone on posix_spawn failures.
    • Ingress: finds a free local port and sets SANDBOX_INGRESS_PORT to avoid EADDRINUSE when multiple workspaces run.
    • S3 sync: shares STS creds via a file with a background refresher; cleans up on shutdown.

Written for commit b839c24. Summary will update on new commits.

rafavalls and others added 2 commits May 13, 2026 19:45
Adds a "Build landing page" tile that creates a vMCP pre-wired to the
Next.js + shadcn template, with eager VM_START so the preview is ready
when the user arrives. Generalises repo-backed vMCPs to also accept a
plain cloneUrl (no GitHub OAuth needed), with unauthenticated runtime
detection on github.com URLs. Also includes stability fixes for the
sandbox host runner (PTY-to-pipe spawn fallback with env merge, retry
on posix_spawn errors during clone, child_process.spawn for setup
steps), dynamic ingress port autoselection, and a credentials-file
refresher for the s3-sync daemon so subshells share STS creds.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

@github-actions
Copy link
Copy Markdown
Contributor

Release Options

Suggested: Minor (2.325.0) — based on feat: prefix

React with an emoji to override the release type:

Reaction Type Next Version
👍 Prerelease 2.324.2-alpha.1
🎉 Patch 2.324.2
❤️ Minor 2.325.0
🚀 Major 3.0.0

Current version: 2.324.1

Note: If multiple reactions exist, the smallest bump wins. If no reactions, the suggested bump is used (default: patch).

rafavalls added a commit that referenced this pull request May 20, 2026
…awnp

The clone failure surfaced as "[orchestrator] clone failed:
posix_spawnp failed." on macOS — node-pty's forkpty can fail
deterministically on bun + libuv before the wrapped command (git
ls-remote, git clone, etc.) ever runs. Setup commands don't need a
TTY, so swap them to `node:child_process.spawn` instead.

We use Node's spawn (not Bun.spawn) because we need `uid`/`gid` for
the privilege drop path; Bun.spawn doesn't expose those. stdout and
stderr both pipe into the existing onChunk stream so callers see the
same log shape.

Also adds `posix_spawnp failed` / `Resource temporarily unavailable`
to the clone's TRANSIENT_ERRORS list and wraps `runStep` in a
try/catch so spawn-level throws are treated as transient and retried,
instead of hard-failing the orchestrator's clone step.

Ports the relevant subset of #3361's stability fixes — minimum needed
to make the Web app tile usable on macOS dev machines.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
rafavalls added a commit that referenced this pull request May 20, 2026
Proposal for adding bundle-based persistence so vibecoded sandboxes
(cloneUrl-backed vMCPs from #3361) survive idle/restart without GitHub.

Covers a small VibecodeStore abstraction (local FS + S3 IRSA), daemon
snapshot routes that produce/consume a `git bundle`, a mesh-side idle
poller, and a restore pre-step in VM_START. The restore path feeds the
bundle file path as cloneUrl so the existing setup orchestrator handles
clone/install/start unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
rafavalls added a commit that referenced this pull request May 20, 2026
…awnp

The clone failure surfaced as "[orchestrator] clone failed:
posix_spawnp failed." on macOS — node-pty's forkpty can fail
deterministically on bun + libuv before the wrapped command (git
ls-remote, git clone, etc.) ever runs. Setup commands don't need a
TTY, so swap them to `node:child_process.spawn` instead.

We use Node's spawn (not Bun.spawn) because we need `uid`/`gid` for
the privilege drop path; Bun.spawn doesn't expose those. stdout and
stderr both pipe into the existing onChunk stream so callers see the
same log shape.

Also adds `posix_spawnp failed` / `Resource temporarily unavailable`
to the clone's TRANSIENT_ERRORS list and wraps `runStep` in a
try/catch so spawn-level throws are treated as transient and retried,
instead of hard-failing the orchestrator's clone step.

Ports the relevant subset of #3361's stability fixes — minimum needed
to make the Web app tile usable on macOS dev machines.

Co-Authored-By: Claude Opus 4.7 (1M context) <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.

1 participant