start_preview
Launch a live preview of a web app by running a task's dev server or prototype directory in a locked-down Docker container, published only on 127.0.0.1; returns the preview URL and page check.
Instructions
Preview a web app live: run a heads-down task's dev server (execution_id and task_id) or a duel prototype directory (prototype) in a locked-down Docker container, published on 127.0.0.1 only (no tunnel, never 0.0.0.0). It runs the package's dev, start or preview script (script picks one) as npm run <script>; the server must listen on 0.0.0.0 and honour PORT. When the source has no installed packages the dependencies are installed inside the container, through a proxy that allows only the npm registry, with lifecycle scripts off. Returns the preview id and its http://127.0.0.1: url, and the page check. The dashboard task page, the duel room and the serve index embed it. Idle previews stop after 30 minutes; at most 3 run at once.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "start_preview"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | The port the dev server listens on in the container (default: the usual port of the package's dev server, else 3000). | |
| script | No | The package script to run (default: the first of dev, start, preview that exists). | |
| task_id | No | The task whose worktree to preview. | |
| prototype | No | Instead of a task: an absolute prototype directory under the prototype root (a duel team's version). | |
| execution_id | No | The heads-down run (exe-…); goes with task_id. |