bounded, incarnation-fenced durable streams for cloudflare sql storage. the package owns stream persistence and conversation-store semantics; the examples provide the http wiring.
durable-cf-streams- core library with storage backends and utilities
each storage example tracks the full durable-streams conformance suite:
- SqliteStore - sqlite via durable object storage with bounded chunk rows
- D1Store - cloudflare d1 database with bounded chunk rows
pnpm install
pnpm run build
pnpm run testpnpm run lint # run biome
pnpm run lint:fix # fix lint issues
pnpm run check # typecheck
pnpm run build # build all packages
pnpm run test # run all testswhen the upstream protocol changes:
# 1. update conformance tests
# edit @durable-streams/server-conformance-tests in pnpm-workspace.yaml#catalog
pnpm install --lockfile-only --no-frozen-lockfile
# 2. build and test
pnpm run build
pnpm run test
# 3. fix any failures, repeatnote: protocol constants and utilities are implemented locally for cloudflare workers compatibility (no node.js dependencies).
when a conformance bump needs new behavior, keep the line clear:
- put protocol primitives in
durable-cf-streams: constants, validators, serializers, parsers, offset/cursor helpers, error types, and storage semantics that are framework-neutral and useful to consumers. - keep http wiring in examples: routing, request parsing, mapping errors to
Response, framework adapters, and small runtime coordination helpers needed by a particular storage backend or example. - if the same protocol detail appears in multiple examples and is easy to get subtly wrong, promote the pure part into the package before adding more example glue.
- keep examples and package code current-protocol only: no legacy aliases, compatibility shims, or consumer data migrations.
release-please automatically creates a package release PR when you merge releasable changes to main. the manifest starts from the current packages/durable-cf-streams version, writes the package changelog in packages/durable-cf-streams/CHANGELOG.md, and uses the bootstrap sha in release-please-config.json to bridge the old release history.
to override the version, edit the version in packages/durable-cf-streams/package.json directly in the release PR before merging.
when the release PR is merged, release-please creates the github release and the same workflow publishes packages/durable-cf-streams to npm with provenance.
mit