gateway-proxy-debug

โดย vercel

Gateway and proxy debugging for vercel-openclaw: /gateway routing, HTML injection, WebSocket rewrite, gateway-token handoff, waiting page, status heartbeat,…

npx skills add https://github.com/vercel-labs/vercel-openclaw --skill gateway-proxy-debug

Gateway Proxy Debug

Use this skill when the wrapper can reach a sandbox but /gateway, HTML injection, WebSockets, or token handoff is broken.

Evidence First

Collect:

  • Browser URL and failing request path.
  • GET /api/status.
  • GET /api/admin/sandbox-diag.
  • GET /api/admin/logs filtered for proxy., gateway., sandbox.port_, token..
  • Network trace for /gateway/*, WebSocket upgrade, and POST /api/status heartbeat.

Keep app auth, deployment protection bypass, gateway token, and AI Gateway auth separate. Do not paste gateway tokens in artifacts.

Path Diagram

browser -> wrapper auth -> /gateway route -> ensure sandbox running
  -> fresh gateway token -> sandbox port URL -> OpenClaw gateway
  -> HTML injection -> WebSocket rewrite -> heartbeat POST /api/status

Mark each edge unknown, verified-good, or verified-bad.

Common Failure Splits

  • Waiting page is correct because sandbox is not ready yet.
  • Proxy auth failed before any sandbox request.
  • Cached port URL is stale and needs invalidation.
  • Gateway token is stale or not injected.
  • HTML injection failed or produced a malformed script.
  • WebSocket URL rewrite points at the wrong origin/path.
  • Heartbeat is missing and sandbox times out.

Fix Boundaries

  • Primary: src/app/gateway/[[...path]]/route.ts.
  • Helpers: src/server/proxy/{proxy-route-utils,htmlInjection,waitingPage}.ts.
  • Lifecycle dependencies: src/server/sandbox/lifecycle.ts, src/server/public-url.ts.
  • Tests: proxy/html injection tests plus lifecycle tests for heartbeat interactions.
  • Docs: lat.md/sandbox-lifecycle.md, docs/architecture.md, docs/deployment-protection.md.

Verification

Run focused tests when available, then:

node scripts/verify.mjs --steps=test,typecheck
lat check

For UI/WebSocket fixes, verify in a browser or with a smoke check that HTML contains the injected script and WebSocket traffic reaches the sandbox.

Skills เพิ่มเติมจาก vercel

benchmark-sandbox
vercel
เรียกใช้สถานการณ์ประเมินผลของ vercel-plugin ใน Vercel Sandboxes แทนแผง WezTerm ในเครื่อง จัดเตรียม microVM ชั่วคราวที่ติดตั้ง Claude Code และปลั๊กอินไว้ล่วงหน้า…
official
emil-design-eng
vercel
ทักษะนี้เข้ารหัสปรัชญาของ Emil Kowalski เกี่ยวกับการตกแต่ง UI การออกแบบคอมโพเนนต์ การตัดสินใจเรื่องแอนิเมชัน และรายละเอียดที่มองไม่เห็นซึ่งทำให้ซอฟต์แวร์รู้สึกดี
official
vercel-react-best-practices
vercel
แนวทางปฏิบัติที่ดีที่สุดในการเพิ่มประสิทธิภาพ React และ Next.js จากทีมวิศวกรรมของ Vercel ควรใช้ทักษะนี้เมื่อเขียน ตรวจสอบ หรือปรับโครงสร้างโค้ด React/Next.js…
official
vercel-react-best-practices
vercel
แนวทางปฏิบัติที่ดีที่สุดในการเพิ่มประสิทธิภาพ React และ Next.js จากทีมวิศวกรรมของ Vercel ควรใช้ทักษะนี้เมื่อเขียน ตรวจสอบ หรือปรับโครงสร้าง React/Next.js…
official
write-guide
vercel
ผลิตคู่มือทางเทคนิคที่สอนกรณีการใช้งานในโลกจริงผ่านตัวอย่างแบบค่อยเป็นค่อยไป แนวคิดจะถูกนำเสนอเมื่อผู้อ่านต้องการเท่านั้น
official
release
vercel
ปลั๊กอิน Vercel สำหรับการปล่อย — รัน gates, เพิ่มเวอร์ชัน, สร้าง artifacts, คอมมิต และพุช ใช้เมื่อถูกขอให้ "release", "ship", "bump and push" หรือ "cut a release
official
deepsec
vercel
รัน DeepSec กับโปรเจกต์ Vercel ที่เช็คเอาท์จาก dev3000 ใช้สำหรับการตั้งค่า DeepSec แบบคลิกเดียว การบูตสแตรปบริบทโปรเจกต์ การประมวลผลรอบแรกแบบมีขอบเขต และ…
official
backport-pr
vercel
ย้อนกลับ pull request ของ Next.js ที่รวมแล้วจาก canary ไปยังสาขารุ่นก่อนหน้า เช่น next-16-2 ใช้เมื่อผู้ใช้ขอให้ย้อนกลับ, cherry-pick, หรือเปิด...
official