diff --git a/src/index.ts b/src/index.ts index 0019d6b..714a5b1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -106,6 +106,7 @@ Deploying content: - Two paths, pick by file size and type: - Use deploy_files for inline text/JSON/HTML you generated yourself, when total payload < ~1 MB. Bytes ship through the MCP server's JSON-RPC channel; subject to a ~6 MB hard ceiling. - Use deploy_create_upload + deploy_finalize for binaries (PDF, image, video, zip), files larger than ~1 MB, or any file you have available in your environment but not as inline text. The tools return per-part PUT URLs; bytes flow directly from your environment to the upload endpoint, never through the MCP server. The URL host is either a Hostsmith partition API host (\`us.api.hostsmith.net\` or \`eu.api.hostsmith.net\`) or a direct S3 endpoint - treat both identically (one HTTP PUT per URL, capture the \`ETag\` from each response). +- If a deploy_create_upload PUT fails with a network/DNS/sandbox/proxy error, do NOT fall back to deploy_files (payload exceeds its cap) and do NOT retry blindly. Stop and surface deploy_create_upload's allowlist-recovery instructions; retry only after the user confirms the egress rule. - Read or generate the content client-side (in your own environment) - the MCP server has no access to the user's local filesystem. - The site must exist first; call create_site if no siteId is available. @@ -490,7 +491,7 @@ The site must already exist - call \`create_site\` first if you do not have a \` If your host environment provides no HTTP-PUT capability (no bash/curl, no Python \`requests\`, no \`fetch\`), present the URL(s) to the user with instructions to upload the file manually (curl or browser), then call \`deploy_finalize\` after the user confirms. -If a PUT fails with a network/DNS error (connection refused, name resolution failure, timeout, sandbox-denied, proxy 403/407), the sandbox is blocking egress to the URL's host. Recovery flow: +If a PUT fails with a network/DNS error (connection refused, name resolution failure, timeout, sandbox-denied, proxy 403/407), the sandbox is blocking egress to the URL's host. **Do NOT fall back to \`deploy_files\`** - if you were using \`deploy_create_upload\`, the payload is by definition larger than what \`deploy_files\` accepts (>1 MB / binary), so the fallback will fail too. **Do NOT retry the PUT without changes** - a sandbox denial does not resolve on its own. **STOP and ask the user to add the egress allowlist rule below**, then retry the failed PUT only after the user confirms the rule is in place. Recovery flow: 1. Read the failing URL's hostname. It will be either \`us.api.hostsmith.net\`, \`eu.api.hostsmith.net\`, or an S3 endpoint (copy verbatim from the failing URL). 2. Infer the sandbox and give the user the exact configuration snippet: - **Cursor** (signal: cwd contains \`.cursor/\`, or \`CURSOR_*\` env vars) - edit \`~/.cursor/sandbox.json\` (user scope) or \`/.cursor/sandbox.json\` (repo scope):