Compatibility: Pactmark 0.1.x. Local adapter evidence exists — build, route, security and
accessibility contracts, plus streamed events. No live Pactmark Vercel deployment has been
verified. Live deployment remains unsupported until the readiness record contains URL, log,
database-resume, rollback and teardown evidence.
The adapter is deliberately thin
app/api/agent/[...pactmark]/route.ts
src/host.ts
createVercelRouteHandler wraps createAgentFetchHandler and supplies the request-time environment,
the abort signal, an optional waitUntil, and the runtime’s capabilities. That is the entire
adapter — everything else is the portable kernel.
Use the Node.js runtime. Fluid Compute gives you full Node APIs, streaming and longer durations, so
there is no reason to reach for an edge runtime and lose executor and store options.
Authentication comes first
Durability lives outside the invocation
This is the part that most deployments get wrong.What the function does
Accept an authenticated command, append events, stream progress, return. It is a transport, not a
lifecycle owner.
What the function must not own
Run state, continuation, background progress, or the assumption that it will still be alive when
a human approves something.
1
A hostname-verified TLS Postgres store
sslmode=verify-full, least-privilege role, ordered migrations applied out of band.2
A separately operated worker
Vercel functions are not a place to run a durable wake-up loop. Run the worker where a long-lived
process belongs — a container, a VM, a scheduled job with proper leasing.
3
Real background scheduling
waitUntil is for non-critical work such as flushing configured telemetry. It is not a durable
wake-up mechanism and must not be used as one.Streaming on Vercel
SSE works on the Node.js runtime with no special configuration. Setdynamic = "force-dynamic" and
fetchCache = "force-no-store" so nothing is cached, and make sure your client reconnects with
afterSequence — see Streaming and clients.
Preview deployments
The reference fixture supports an explicit preview profile withallowAnonymousDevelopment and a
fixed anonymous authority — clearly separated from the production path, which requires a real
authentication hook. Keep that separation in your own host; do not let a preview flag be readable in
production configuration.
Environment variables
readEnvironment. Do not capture
them at module scope where they can be serialized into a build artefact.
What is actually evidenced today
Historical Vercel evidence was test-only Preview work and its resources were removed.
Deployment overview
How this target compares with Node and Cloudflare.
Readiness checklist
What has to be true before this becomes a production system.