Skip to content

@onlyworlds/sdk 4.57.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 12:14
· 561 commits to main since this release

Added

  • The conditional head poll (live 2026-10-22): changesHead() keeps the last head read's ETag per client and sends it back as If-None-Match on the next one, exactly as received (keel's 200 sends a weak W/"821:-"; nothing is quoted, parsed or compared). keel's tag is "<head>:<epoch>", so a view change moves it as a new change does. When nothing moved, keel answers 304 Not Modified with no body, and changesHead() returns the head, cursor and epoch of the last 200 with unchanged: true; every 200 says unchanged: false. keel refunds a 304 against the request budget, so a poll that mostly finds nothing costs little. A 409 resync_required from changesHead(), changes() or changesAll() clears the held tag, so the next head read is a full 200 with epoch_reason. A 304 while no tag is held is an OwApiError with status 304, never a made-up head. The client still never polls or sleeps on its own: the interval is the caller's.
  • The public page on OwWorldMeta (live 2026-10-22), both read-only: slug (string | null), the page's address, onlyworlds.com/w/, null while the page is off, and also a keyless ?world= value; public_page (the new OwWorldPublicPage), the page as its owner set it: on, palette (midnight, daylight, parchment, brass, dusk, or null for the house's), hero (one plain line), sections (the types shown in order, empty for all), pin (an element id or null) and index (always false for now), every key present with the page off. Both are set by the owner on the world page; patchWorld() strips them, so a body read from getWorld() stays writable.
  • request() gains two options: ifNoneMatch (a tag sent as If-None-Match as given) and onEtag(etag, status) (called with each response's ETag and status before the body is read; with it given, a 304 returns null instead of throwing). Every other path is unchanged.

Changed

  • changesHead()'s return type gains unchanged: boolean, beside head, cursor, epoch and the optional epoch_reason.