v2.6.1
deepseek-ai/DeepSeek-OCRv2.6.1Jul 1, 2026by rekhoff
AI Summary
SpacetimeDB v2.6.1 is a patch release introducing a small breaking change for TypeScript users regarding optional field syntax and fixes a regression affecting procedure contexts. It also includes a CLI improvement to display available templates and corrects an issue with `Identity` and `ConnectionId` propagation.
Key Highlights
- Breaking Change: TypeScript optional fields now use optional key syntax (`foo?: string | undefined`) instead of required keys with undefined values.
- Bug Fix: Resolved a regression where `ctx.sender` and `ctx.connection_id` were empty inside procedure contexts.
- CLI Improvement: `spacetime init --template` now lists available templates instead of failing silently.
Breaking Changes
- TypeScript: Generated optional fields now use optional key syntax (`foo?: string | undefined`) instead of required keys with `undefined` values.
New Features
- Added functionality to `spacetime init --template` to display a list of available templates.
Full Release Notes
v2.6.1 is a patch release with two bug fixes and a CLI improvement.
## Breaking Changes
### TypeScript: Generated optional fields now use optional key syntax
> **⚠️ Small breaking change for some TypeScript users.** Generated TypeScript types for `Option<T>` fields have changed from required keys with an `undefined` value to truly optional keys:
>
> ```ts
> // Before (v2.6.0 and earlier)
> { foo: string | undefined; }
>
> // After (v2.6.1)
> { foo?: string | undefined; }
> ```
>
> If your TypeScript code explicitly passes `undefined` for optional reducer or procedure arguments, or relies on `{ foo: T | undefined }` being a required key, you may need to update your call sites. This will require **no action from almost all TypeScript users** and it addresses a bug in the implementation of 2.0, so we've chosen to make this small breaking change.
([#4940](<https://github.com/clockworklabs/SpacetimeDB/pull/4940>))
## Bug Fixes
### Fix TypeScript optional row keys
Generated optional fields now use optional key syntax. See `Breaking Changes` above.
([#4940](<https://github.com/clockworklabs/SpacetimeDB/pull/4940>))
### Fix `Identity` and `ConnectionId` regression in Procedures
A regression introduced in 2.4 caused `ctx.sender` and `ctx.connection_id` to always be empty inside procedure contexts. This has been corrected — callers' identity and connection ID are now properly propagated again.
([#5323](<https://github.com/clockworklabs/SpacetimeDB/pull/5323>))
## CLI Improvements
### `spacetime init --template` now shows available templates
Running `spacetime init --template` without an argument now prints the list of available templates and a link to the website, rather than failing silently.
([#5264](<https://github.com/clockworklabs/SpacetimeDB/pull/5264>))
## What's Changed
- Fix TypeScript optional row keys by @clockwork-labs-bot in [#4940](<https://github.com/clockworklabs/SpacetimeDB/pull/4940>)
- spacetime init --template without arg prints template list and link to website by @clockwork-tien in [#5264](<https://github.com/clockworklabs/SpacetimeDB/pull/5264>)
- [Procedures] Fix `Identity` and `ConnectionId` Regression by @kistz in [#5323](<https://github.com/clockworklabs/SpacetimeDB/pull/5323>)
**Full Changelog**: [v2.6.0...v2.6.1](<https://github.com/clockworklabs/SpacetimeDB/compare/v2.6.0...v2.6.1>)