mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
9dcba490b4
Conflicts were all in files main also touched:
- packages/world-local/src/streamer.ts: kept main's `globalSingleton` ULID
factory alongside this branch's `StreamCursorPositionSchema` value import,
and kept the direct-index page loop (main's side was the `dataIndex` skip
loop this branch replaced).
- packages/world-vercel/src/streamer.ts: comment only; kept this branch's
text, which records that chunk snapshots now read v3.
- docs/content/worlds/v{4,5}/building-a-world.mdx: kept main's rewording and
re-applied this branch's cursor contract sentences.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@workflow/world-vercel
Production workflow backend for Vercel platform deployments.
Integrates with Vercel's infrastructure for storage, queuing, and authentication. Handles workflow persistence and scaling in production environments.
Used by default for deployments on Vercel. Authentication and API endpoints are configured automatically in Vercel deployments.
Custom dispatcher
HTTP requests (including the queue) default to a shared undici RetryAgent that handles connection pooling and retries. Pass a custom dispatcher to override it, for example, to tune undici on newer Node.js runtimes:
import { Agent } from 'undici';
import { createWorld } from '@workflow/world-vercel';
import { setWorld } from '@workflow/core/runtime';
setWorld(createWorld({ dispatcher: new Agent({ connections: 16 }) }));
Caller user agent
Pass a User-Agent header to append a caller-specific product token while
preserving the world-vercel token:
import { createWorld } from '@workflow/world-vercel';
const world = createWorld({
headers: { 'User-Agent': 'my-framework/1.2.3' },
});