@onlyworlds/sdk 4.96.0 → 4.96.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.96.1] - 2026-10-27
9
+
10
+ ### Fixed
11
+
12
+ - **The lens and graph readers read the world's now as the API serves it.** `GET /world` names the world's now `time_range_current`, and a world folder names it `time_current`; `resolveLens` and `worldGraph` read only `now` and `time_current`, so a World body passed straight from the API had no now: no fence, and a `window` that cut nothing. They now read `now`, else `time_current`, else `time_range_current`, and `OwLensWorld` types the third. A shared edge case holds it in both packages; the Python package's `resolve_lens` and `world_graph` read the same.
13
+
8
14
  ## [4.96.0] - 2026-10-27
9
15
 
10
16
  ### Added
package/dist/index.d.ts CHANGED
@@ -5052,12 +5052,14 @@ interface OwLensWorld {
5052
5052
  members?: readonly OwMessageMember[] | null;
5053
5053
  /** The world's now, in its own time unit: the default `as_of`. */
5054
5054
  now?: number | null;
5055
- /** The World's own now (its `time_current`), read when `now` is not given. */
5055
+ /** The World's own now as a world folder spells it (`time_current`), read when `now` is not given. */
5056
5056
  time_current?: number | null;
5057
+ /** The World's own now as the API serves it (`GET /world`'s `time_range_current`), read when neither `now` nor `time_current` is given. */
5058
+ time_range_current?: number | null;
5057
5059
  }
5058
5060
  /** `resolveLens`'s options. */
5059
5061
  interface OwLensOptions {
5060
- /** The reading's date, a whole number in the world's time unit; absent: the world's now (`now`, else `time_current`); none at all: no fence, and the window cuts nothing. */
5062
+ /** The reading's date, a whole number in the world's time unit; absent: the world's now (`now`, else `time_current`, else `time_range_current`); none at all: no fence, and the window cuts nothing. */
5061
5063
  asOf?: number | null;
5062
5064
  /** The reading's wall-clock time for the mail rule's thirty days, a date-time; absent: the machine's time. Never the world's now. */
5063
5065
  clock?: string | null;
package/dist/index.js CHANGED
@@ -4546,7 +4546,7 @@ function readingDate(fn, world, opts) {
4546
4546
  if (asOfV !== null && whole(asOfV) === null) throw new TypeError(`${fn}: asOf is a whole number; got ${JSON.stringify(asOfV)}.`);
4547
4547
  const clockV = valueOf(opts, "clock");
4548
4548
  if (clockV !== null && timeKey(clockV) === null) throw new TypeError(`${fn}: clock is a date-time; got ${JSON.stringify(clockV)}.`);
4549
- const asOf = asOfV !== null ? asOfV : whole(world.now) ?? whole(world.time_current);
4549
+ const asOf = asOfV !== null ? asOfV : whole(world.now) ?? whole(world.time_current) ?? whole(world.time_range_current);
4550
4550
  return { asOf, clock: clockV };
4551
4551
  }
4552
4552
  function lensReading(r, lens, clockV) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.96.0",
3
+ "version": "4.96.1",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {