From 4ac2b38b40ceddd9056e9d3771eeaee315bbfdb0 Mon Sep 17 00:00:00 2001 From: clockwork-labs-bot Date: Thu, 10 Sep 2026 08:10:14 -0400 Subject: [PATCH 1/4] docs: note scheduled function dispatch ordering --- .../00200-core-concepts/00300-tables/00500-schedule-tables.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/00200-core-concepts/00300-tables/00500-schedule-tables.md b/docs/docs/00200-core-concepts/00300-tables/00500-schedule-tables.md index 7c2178cfaf1..1b22efce2c4 100644 --- a/docs/docs/00200-core-concepts/00300-tables/00500-schedule-tables.md +++ b/docs/docs/00200-core-concepts/00300-tables/00500-schedule-tables.md @@ -409,6 +409,8 @@ ctx.db[reminder].insert(Reminder{ For interval schedules, the current implementation calculates the next run from the previous intended run time. Missed interval ticks are skipped, so a delayed scheduled reducer or procedure resumes on the next future interval boundary. +When multiple schedule rows have already expired by the time SpacetimeDB observes them, their dispatch order is not guaranteed to match `scheduled_at` order. If application behavior depends on ordering, store an explicit sequence or timestamp in the scheduled row and handle ordering in your module logic. + ### Row Lifecycle SpacetimeDB passes the schedule row to the scheduled reducer or procedure as an argument. One-shot schedule rows are removed at different times depending on the kind of function being called: From 8095803fa16b6a3a2c5c1c3fcda56062585c1ab6 Mon Sep 17 00:00:00 2001 From: clockwork-labs-bot Date: Fri, 11 Sep 2026 08:10:46 -0400 Subject: [PATCH 2/4] docs: document C# client compression option --- .../00600-clients/00600-csharp-reference.md | 14 ++++++++++++++ skills/csharp-client/SKILL.md | 3 +++ 2 files changed, 17 insertions(+) diff --git a/docs/docs/00200-core-concepts/00600-clients/00600-csharp-reference.md b/docs/docs/00200-core-concepts/00600-clients/00600-csharp-reference.md index e6de19c91d7..d49069285e6 100644 --- a/docs/docs/00200-core-concepts/00600-clients/00600-csharp-reference.md +++ b/docs/docs/00200-core-concepts/00600-clients/00600-csharp-reference.md @@ -106,6 +106,7 @@ Construct a `DbConnection` by calling `DbConnection.Builder()`, chaining configu | [WithUri method](#method-withuri) | Set the URI of the SpacetimeDB instance hosting the remote database. | | [WithDatabaseName method](#method-withdatabasename) | Set the name or identity of the remote database. | | [WithConfirmedReads method](#method-withconfirmedreads) | Enable or disable confirmed reads. | +| [WithCompression method](#method-withcompression) | Set the compression method for WebSocket messages. | | [OnConnect callback](#callback-onconnect) | Register a callback to run when the connection is successfully established. | | [OnConnectError callback](#callback-onconnecterror) | Register a callback to run if the connection is rejected or the host is unreachable. | | [OnDisconnect callback](#callback-ondisconnect) | Register a callback to run when the connection ends. | @@ -149,6 +150,19 @@ When enabled, the server will send query results only after they are confirmed t If this method is not called, the server chooses the default. +#### Method `WithCompression` + +```csharp +class DbConnectionBuilder +{ + public DbConnectionBuilder WithCompression(Compression compression); +} +``` + +Configure compression for WebSocket messages. Available options are `Compression.Brotli`, `Compression.Gzip`, and `Compression.None`. + +If this method is not called, the SDK uses `Compression.Brotli`. Use `Compression.None` only when you need to debug raw message sizes or avoid compression overhead for very small local test payloads. + #### Callback `OnConnect` ```csharp diff --git a/skills/csharp-client/SKILL.md b/skills/csharp-client/SKILL.md index b1e7a0bc3a0..4c1283e815b 100644 --- a/skills/csharp-client/SKILL.md +++ b/skills/csharp-client/SKILL.md @@ -27,6 +27,7 @@ var conn = DbConnection.Builder() .WithUri("http://localhost:3000") .WithDatabaseName("my-database") .WithToken(savedToken) + .WithCompression(Compression.Brotli) // optional; this is the default .OnConnect((conn, identity, token) => { Console.WriteLine($"Connected as: {identity}"); @@ -45,6 +46,8 @@ var conn = DbConnection.Builder() .Build(); ``` +Compression options are `Compression.Brotli`, `Compression.Gzip`, and `Compression.None`. The SDK uses Brotli when `WithCompression` is omitted. + ## Event Loop (Critical) **`FrameTick()` must be called in your main loop.** The SDK queues all network messages and only processes them when you call `FrameTick()`. Without it, no callbacks fire. From 39eb10eb61a7004df4887484de7262e7c9c55d89 Mon Sep 17 00:00:00 2001 From: clockwork-labs-bot Date: Sat, 12 Sep 2026 08:09:59 -0400 Subject: [PATCH 3/4] docs: document config-aware MCP and server commands --- .../00100-cli-reference/00300-spacetime-json.md | 4 ++-- docs/docs/00300-resources/00200-reference/00150-mcp.md | 1 + skills/cli/SKILL.md | 1 + skills/mcp/SKILL.md | 8 ++++++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/docs/00300-resources/00200-reference/00100-cli-reference/00300-spacetime-json.md b/docs/docs/00300-resources/00200-reference/00100-cli-reference/00300-spacetime-json.md index 0e90d315c80..717f0b1c901 100644 --- a/docs/docs/00300-resources/00200-reference/00100-cli-reference/00300-spacetime-json.md +++ b/docs/docs/00300-resources/00200-reference/00100-cli-reference/00300-spacetime-json.md @@ -7,7 +7,7 @@ slug: /cli-reference/spacetime-json The `spacetime.json` file defines project-level configuration for the SpacetimeDB CLI. It eliminates repetitive CLI flags and enables multi-target workflows such as publishing multiple databases or generating bindings for multiple languages from a single project. -Commands that read `spacetime.json` include [`spacetime publish`](/cli-reference#spacetime-publish), [`spacetime generate`](/cli-reference#spacetime-generate), and [`spacetime dev`](/cli-reference#spacetime-dev). +Commands that read `spacetime.json` include [`spacetime publish`](/cli-reference#spacetime-publish), [`spacetime generate`](/cli-reference#spacetime-generate), and [`spacetime dev`](/cli-reference#spacetime-dev). Commands that operate on an already-published database, such as [`spacetime call`](/cli-reference#spacetime-call), [`spacetime sql`](/cli-reference#spacetime-sql), and [`spacetime logs`](/cli-reference#spacetime-logs), can resolve their database and server from matching config targets. Commands that operate on a server rather than a named config database, such as [`spacetime list`](/cli-reference#spacetime-list), [`spacetime rename`](/cli-reference#spacetime-rename), and [`spacetime mcp`](/cli-reference#spacetime-mcp), can also use the configured server when the config has a single unambiguous server. ## Config structure @@ -236,7 +236,7 @@ These produce an error if the selected database has multiple generate entries: ## `--no-config` -The `--no-config` flag causes the CLI to ignore `spacetime.json` entirely, behaving as if no config file exists. This is useful for one-off operations or scripting. +The `--no-config` flag causes the CLI to ignore `spacetime.json` entirely, behaving as if no config file exists. This is useful for one-off operations, scripting, or commands such as `spacetime list` when you want the default server instead of the server configured for the current project. ```bash spacetime publish my-db --module-path ./module --no-config diff --git a/docs/docs/00300-resources/00200-reference/00150-mcp.md b/docs/docs/00300-resources/00200-reference/00150-mcp.md index 9b8f89bbcaa..9d4f6fc75e0 100644 --- a/docs/docs/00300-resources/00200-reference/00150-mcp.md +++ b/docs/docs/00300-resources/00200-reference/00150-mcp.md @@ -22,6 +22,7 @@ spacetime mcp my-database --server local When you omit the database argument, the MCP server is host-wide. When you pass a database name or identity, the MCP server is scoped to that database. The database argument can also come from the `SPACETIMEDB_DB_NAME` environment variable. +When you run `spacetime mcp` from a project with a `spacetime.json` that names a single unambiguous `server`, the command uses that server unless you pass `--server` or `--no-config`. It does not infer a database from the config; omitting the database argument still starts a host-wide MCP server. The command uses your saved SpacetimeDB identity unless you pass `--anonymous`. diff --git a/skills/cli/SKILL.md b/skills/cli/SKILL.md index 534ad7ee4ec..d66ee69e330 100644 --- a/skills/cli/SKILL.md +++ b/skills/cli/SKILL.md @@ -153,6 +153,7 @@ spacetime logout | `--yes` | `-y` | Non-interactive mode (skip confirmations) | | `--anonymous` | | Use anonymous identity | | `--module-path` | `-p` | Path to module project | +| `--no-config` | | Ignore `spacetime.json` project configuration | ## Troubleshooting diff --git a/skills/mcp/SKILL.md b/skills/mcp/SKILL.md index 74b4024bddc..5f7be166d9e 100644 --- a/skills/mcp/SKILL.md +++ b/skills/mcp/SKILL.md @@ -72,6 +72,10 @@ database, so there is no `database` argument and no `list_databases`: { "name": "sql", "arguments": { "sql": "SELECT * FROM message" } } ``` +When `spacetime mcp` runs inside a project with a `spacetime.json` that has a single unambiguous +`server`, it uses that server unless `--server` or `--no-config` is passed. It does not infer a +database from the config; omitting the database argument still means host-wide mode. + ## Rules that do not change The tools run with your identity, exactly as the HTTP API does. The model is the same as everywhere @@ -108,7 +112,7 @@ Pass `"confirmed": true` to `sql` to wait for a durably confirmed read. | `no such table: x` | The table is private, or you are querying the wrong database | | No `spacetimedb` tools at all | No MCP server is connected. Use the CLI instead (`cli` skill) | -`spacetime mcp` is UNSTABLE and may not be in a released CLI yet, so a client that cannot start it -falls back to the CLI commands in the `cli` skill. +`spacetime mcp` is UNSTABLE and subject to breaking changes. If a client cannot start it, fall back +to the CLI commands in the `cli` skill. Reference: https://spacetimedb.com/docs From cd8d75375c34dc65b7587d069a5cebb03c31d25e Mon Sep 17 00:00:00 2001 From: clockwork-labs-bot Date: Sat, 12 Sep 2026 09:53:04 -0400 Subject: [PATCH 4/4] docs: sync codex plugin skills --- codex-plugin/plugins/spacetimedb/skills/cli/SKILL.md | 1 + .../plugins/spacetimedb/skills/csharp-client/SKILL.md | 3 +++ codex-plugin/plugins/spacetimedb/skills/mcp/SKILL.md | 8 ++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/codex-plugin/plugins/spacetimedb/skills/cli/SKILL.md b/codex-plugin/plugins/spacetimedb/skills/cli/SKILL.md index 534ad7ee4ec..d66ee69e330 100644 --- a/codex-plugin/plugins/spacetimedb/skills/cli/SKILL.md +++ b/codex-plugin/plugins/spacetimedb/skills/cli/SKILL.md @@ -153,6 +153,7 @@ spacetime logout | `--yes` | `-y` | Non-interactive mode (skip confirmations) | | `--anonymous` | | Use anonymous identity | | `--module-path` | `-p` | Path to module project | +| `--no-config` | | Ignore `spacetime.json` project configuration | ## Troubleshooting diff --git a/codex-plugin/plugins/spacetimedb/skills/csharp-client/SKILL.md b/codex-plugin/plugins/spacetimedb/skills/csharp-client/SKILL.md index b1e7a0bc3a0..4c1283e815b 100644 --- a/codex-plugin/plugins/spacetimedb/skills/csharp-client/SKILL.md +++ b/codex-plugin/plugins/spacetimedb/skills/csharp-client/SKILL.md @@ -27,6 +27,7 @@ var conn = DbConnection.Builder() .WithUri("http://localhost:3000") .WithDatabaseName("my-database") .WithToken(savedToken) + .WithCompression(Compression.Brotli) // optional; this is the default .OnConnect((conn, identity, token) => { Console.WriteLine($"Connected as: {identity}"); @@ -45,6 +46,8 @@ var conn = DbConnection.Builder() .Build(); ``` +Compression options are `Compression.Brotli`, `Compression.Gzip`, and `Compression.None`. The SDK uses Brotli when `WithCompression` is omitted. + ## Event Loop (Critical) **`FrameTick()` must be called in your main loop.** The SDK queues all network messages and only processes them when you call `FrameTick()`. Without it, no callbacks fire. diff --git a/codex-plugin/plugins/spacetimedb/skills/mcp/SKILL.md b/codex-plugin/plugins/spacetimedb/skills/mcp/SKILL.md index 74b4024bddc..5f7be166d9e 100644 --- a/codex-plugin/plugins/spacetimedb/skills/mcp/SKILL.md +++ b/codex-plugin/plugins/spacetimedb/skills/mcp/SKILL.md @@ -72,6 +72,10 @@ database, so there is no `database` argument and no `list_databases`: { "name": "sql", "arguments": { "sql": "SELECT * FROM message" } } ``` +When `spacetime mcp` runs inside a project with a `spacetime.json` that has a single unambiguous +`server`, it uses that server unless `--server` or `--no-config` is passed. It does not infer a +database from the config; omitting the database argument still means host-wide mode. + ## Rules that do not change The tools run with your identity, exactly as the HTTP API does. The model is the same as everywhere @@ -108,7 +112,7 @@ Pass `"confirmed": true` to `sql` to wait for a durably confirmed read. | `no such table: x` | The table is private, or you are querying the wrong database | | No `spacetimedb` tools at all | No MCP server is connected. Use the CLI instead (`cli` skill) | -`spacetime mcp` is UNSTABLE and may not be in a released CLI yet, so a client that cannot start it -falls back to the CLI commands in the `cli` skill. +`spacetime mcp` is UNSTABLE and subject to breaking changes. If a client cannot start it, fall back +to the CLI commands in the `cli` skill. Reference: https://spacetimedb.com/docs