Skip to content

Release v2.7.0

Latest

Choose a tag to compare

@rekhoff rekhoff released this 22 Jul 20:12

Breaking Changes

TypeScript: Generated table and view handles now use camelCase

Generated TypeScript client handles now follow TypeScript casing, such as conn.db.loggedOutPlayer rather than conn.db.logged_out_player. The former snake_case handles remain available as deprecated aliases, but code that enumerates generated handles may now see both names.

(#5286)

Svelte: ConnectionState.getConnection is no longer generic

In the Svelte binding, getConnection<MyConn>() is now getConnection(). It continues to return the active connection; only the removed type argument affects callers.

(#5375)

Features

.NET 10 NativeAOT-LLVM support for C# modules

C# modules can now target .NET 10 and use NativeAOT-LLVM automatically. Runtime packages include both .NET 8 and .NET 10 targets, while spacetime init --lang csharp --dotnet-version selects the generated project SDK version. Existing .NET 8 JIT and opt-in NativeAOT paths remain supported.

(#4915)

Add unique or primary-key constraints through schema migration

Adding a #[unique] or #[primary_key] constraint to an existing table is now a non-breaking migration when existing data satisfies the constraint. If duplicate data exists, the migration fails safely and identifies duplicate values.

(#4465)

Model Context Protocol server

Standalone databases now expose an authenticated MCP endpoint at POST /v1/database/:name_or_identity/mcp. It provides tools to check health, retrieve module schemas, run SQL, and invoke reducers.

(#5489)

Primary-key support for views in C++

C++ modules can now declare primary keys on procedural views.

(#5354)

Typed query builder for Unreal SDK

The Unreal SDK now supports a typed, generated query builder for client subscriptions in both C++ and Blueprint.

(#4810)

Primary-key view lookup for C# and Unreal clients

Generated C# and Unreal client bindings now support Find() on views with primary keys.

(#5494)

TypeScript schedule registration for split modules

TypeScript reducers and procedures now accept an onSchedule option. This enables schedule registration without importing reducer implementations from table definitions, which supports splitting modules across files. Existing table({ scheduled }) usage remains supported.

(#5435)

Svelte reconnect and token swap

Svelte applications can now reconnect programmatically with reconnect(builder), allowing an anonymous connection to be replaced after sign-in without a page reload. Svelte providers also gain automatic reconnect behavior.

(#5375)

Rust SDK capability traits and generic table accessors

The Rust SDK adds composable context capabilities, granular table traits, and generated TableAccessor marker types. These additions make it easier for downstream integrations to write generic code over table access and context capabilities.

(#5307, #4775, #5055)

Public RemoteTableName in the C# SDK

C# table bindings now expose RemoteTableName, enabling applications to build dynamic SQL without hard-coded table names.

(#4714)

spacetime sql --format json

The spacetime sql command now accepts --format json for raw API-response output. Text remains the default format.

(#5459)

CLI database locking

spacetime lock and spacetime unlock prevent accidental deletion of locked databases.

(#4888)

Performance, Reliability & Observability

Safer BSATN array decoding

BSATN decoding no longer blindly pre-allocates arrays based on their binary length prefix, preventing out-of-memory failures on adversarial or malformed inputs.

(#5343)

Improved view cleanup and view metrics

Expired materialized views are now cleared in bounded batches and cleanup runs more aggressively while a backlog exists. New metrics distinguish view work from reducer work and report view calls triggered by each reducer.

(#5503, #5553)

Expanded connection and memory metrics

New Prometheus metrics report outgoing-queue disconnects, WebSocket rejections and terminations by cause, WebSocket idle timeouts, more specific WebSocket receive failures, module-instance memory usage, and startup snapshot metrics.

(#5331, #5358, #5400, #5436, #5495, #5547)

Bug Fixes

View backing-table migration

Databases automatically migrate procedural-view backing tables created by earlier versions to the current schema.

(#5441)

TypeScript SDK fixes

  • Uuid values can be used as literals in query-builder .where() predicates.
  • Enum columns can be declared as primary keys or indexes without a runtime error.
  • One-column prefix scans on multi-column indexes now work in module filter and delete calls.
  • Random.fill correctly supports empty and 32-bit typed arrays.
  • Identity-like constructors tolerate numeric values originating from JSON and fail earlier for invalid values.

(#5075, #4389, #5428, #5115, #5041)

Unreal cache consistency

The Unreal SDK correctly merges overlapping table updates in one transaction, preventing cached unique-index Find() calls from returning stale results.

(#5426)

HTTP, proxy, and SQL fixes

  • WebSocket subscriptions behind a standard single-hop proxy now accept a single-IP X-Forwarded-For header.
  • SQL DML now resolves table accessor names as well as canonical table names.

(#4839, #5478)

spacetime start port-detection fallback

When spacetime start cannot check whether a port is available, such as in a restricted environment, it now continues rather than failing solely because the availability check was denied.

(#5564)

Improved CLI login errors

spacetime login now reports HTTP status failures from authentication endpoints before attempting to parse the response, replacing misleading JSON-decoding errors for invalid auth hosts.

(#5518)

What's Changed

  • Add .NET 10 NativeAOT-LLVM support for C# modules in #4915
  • Let spacetime start continue when port availability cannot be checked in #5564
  • Allow adding unique constraints to existing tables in #4465
  • Add primary keys for C++ procedural views in #5354
  • Add an Unreal SDK query builder in #4810
  • Add Find() for primary-key views in C# and Unreal SDKs in #5494
  • Add TypeScript schedule registration for split modules in #5435
  • Add programmatic Svelte reconnect and token swapping in #5375
  • Add the standalone MCP server endpoint in #5489
  • Add JSON output for spacetime sql in #5459
  • Fix TypeScript table-handle casing in #5286
  • Automatically migrate view backing tables in #5441
  • Improve expired-view cleanup in #5503
  • Add connection, view, and memory metrics in #5331, #5358, #5400, #5436, #5495, #5547

Full Changelog: v2.6.1-hotfix3...release/candidate/v2.7.0-hotfix3