cloudflare/partykit partyserver@0.5.1
cloudflare/partykit
Captured source
source ↗published Apr 24, 2026seen Jun 26captured 4whttp 200method plain
partyserver@0.5.1
Repository: cloudflare/partykit
Tag: partyserver@0.5.1
Published: 2026-04-24T20:56:32Z
Prerelease: no
Release notes:
Patch Changes
- #381 `0274658` Thanks @threepointone! - Fix: restore legacy
__ps_namestorage fallback for framework bootstrap patterns.
0.5.0 moved the legacy storage hydrate into alarm() only, breaking Cloudflare Agents facets and any other framework that writes __ps_name directly before calling __unsafe_ensureInitialized(). Facet DOs are spawned via ctx.facets.get(...) rather than idFromName() and therefore have ctx.id.name === undefined; they relied on PartyServer reading the storage record back to populate this.name before onStart().
Changes:
- Move the legacy
__ps_namehydrate fromalarm()into#ensureInitialized(), still gated on!ctx.id.name && !#_nameso it costs nothing on the happy path (normalidFromName()/getByName()DOs skip the storage read entirely). Server.fetch()now delegates to#ensureInitialized()for the hydrate instead of doing its own. Thex-partykit-roomheader fallback remains as a last resort when neitherctx.id.namenor a legacy storage record is available.Server.alarm()is simplified — it no longer needs its own hydrate call since#ensureInitialized()handles it.setName()'s@deprecateddocblock is softened to clarify that it remains appropriate for framework-level bootstrap of non-idFromNameDOs (e.g. Agents facets), not just a deprecated compatibility shim.