Commit 0672e20
committed
fix(cloud): back the MCP session Durable Object with SQLite
The MCP session DO now extends the Cloudflare Agents `McpAgent` base, which
stores its state in SQLite. apps/cloud still had the original `McpSessionDO`
class on the key-value backend (`new_classes`), and Cloudflare cannot convert a
live class to SQLite in place, so every session 500'd with
"This Durable Object is not backed by SQLite storage".
Session state is ephemeral, so delete the old KV class and create a new
SQLite-backed class (`McpSessionDOSqlite`) in migration v2, repointing the
`MCP_SESSION` binding. The DO is addressed by binding + idFromName, so the
rename is transparent at runtime. host-cloudflare was already on
`new_sqlite_classes`, so only cloud was affected.1 parent 5d3648d commit 0672e20
2 files changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
30 | 37 | | |
31 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
32 | 44 | | |
33 | 45 | | |
34 | 46 | | |
| |||
0 commit comments