@onlyworlds/sdk 4.127.0 → 4.128.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/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # For AI agents using @onlyworlds/sdk
2
2
 
3
- **Current as of**: SDK **4.x** · schema-dist **v0.34.0-dist.103** (canonical 00.34.00).
3
+ **Current as of**: SDK **4.x** · schema-dist **v0.34.0-dist.104** (canonical 00.34.00).
4
4
  This line is asserted by `codegen:check` in CI — if the pin moves and this file is not
5
5
  re-read against it, the check fails rather than letting this document rot quietly.
6
6
 
package/CHANGELOG.md CHANGED
@@ -5,6 +5,23 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.128.1] - 2026-11-02
9
+
10
+ ### Fixed
11
+
12
+ - **`draught(id)` without `compact` answers the fixed `OwDraught` shape again.** The server now serves the compact packet by default; the client sends `compact=false` when the caller leaves it out, so every section its type promises is there (since 4.47.0 a left-out `compact` was sent as nothing). `compact: true` still asks for the short form, typed `OwDraughtCompact`.
13
+
14
+ ## [4.128.0] - 2026-11-02
15
+
16
+ ### Added
17
+
18
+ - **`worldGraph(world, reader, { readingAids: true })` brings the reading aids back into an unlensed graph** (schema-dist `profiles/lens.md`, serial 104). The reading aids are a world's charter, its guide and its domains, each recognised by its pair and the mark `x_charter_of` (the pair without the mark is lore and a node like any other). They are out of an unlensed graph by default and counted `reading_aid`; with the flag they are nodes, each marked `reading_aid` (last in `marks`), and a link to one is an edge. The flag is a boolean, false by default (null reads as false). Any signed reader may ask it; a public reader asking it is refused by name before anything is read, and of several refused flags `readingAids` is named last, after `hidden`, `proposed`, `rooms` and `mapSpace`. A flag never widens a lens: with a lens the flag adds nothing, and a lens that names the pair (`law/charter`) keeps the charter whatever the flag says. `OwGraphMark` gains `'reading_aid'`.
19
+
20
+ ### Changed
21
+
22
+ - **A reading aid a lens keeps carries the mark `reading_aid`**, as a room element a lens keeps carries `room`; before, it carried no mark.
23
+ - **Schema repinned to schema-dist `v0.34.0-dist.104`** (from dist.103); the standard stays canonical **00.34.00** and no schema field moved. Serial 104 adds the graph's `reading_aids` flag to the lens profile, with five graph cases in the lens fixture (201 cases in all), and two readings to the landing profile, with three cases (33 in all): `orphan` and `near_orphan` are degree 0 and degree 1 by the landing page's own degree, so a node whose only link is to itself is a near-orphan and a list naming one target twice counts degree 2; and a `heads` too large for the reader reads as the largest it holds, so `heads: 1e30` is taken, never refused, and every linked Character is a head. `landingOf` answers all three as it stood.
24
+
8
25
  ## [4.127.0] - 2026-11-02
9
26
 
10
27
  ### Added
package/SCHEMA.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OnlyWorlds Schema Reference
2
2
 
3
- **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.34.0-dist.103** — canonical schema **00.34.00**, published 2026-11-02.
3
+ **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.34.0-dist.104** — canonical schema **00.34.00**, published 2026-11-02.
4
4
 
5
5
  GENERATED from the canonical schema YAML — do not hand-edit (regenerate: `python codegen/generate_types.py`).
6
6
  Written for both humans and AI agents reading this package locally.
package/dist/index.d.ts CHANGED
@@ -4459,7 +4459,7 @@ declare class OwV2Client {
4459
4459
  * empty means the serving is partial (`cut.proposed` also counts proposed elements left out because
4460
4460
  * the component was not named). `compact: true` leaves out every empty section and an empty `cut`,
4461
4461
  * the frame and every null kept, and leaves out each element body's empty fields (`null`, `""`,
4462
- * `[]`, `{}`; `id`, `type` and `name` always stay), answered as `OwDraughtCompact`. A Message
4462
+ * `[]`, `{}`; `id`, `type` and `name` always stay), answered as `OwDraughtCompact`; left out, `compact=false` is sent, so the answer is the fixed `OwDraught` shape whatever the server's own default (keel serves the compact packet by default since 2026-11-02). A Message
4463
4463
  * without the room mark is placed as any Narrative unless `messages` is named, when it is there
4464
4464
  * and in no other section; a room-marked Message is in `messages` or nowhere. `lens` (a lens id)
4465
4465
  * adds `lenses`, one frame with that lens read for this key's own view (beside `depth` or `budget`
@@ -5570,9 +5570,11 @@ interface OwGraphOptions {
5570
5570
  proposed?: boolean | null;
5571
5571
  /** Bring back map space: Maps, Pins and Markers (a Zone is a node by default). Refused for a public reader. */
5572
5572
  mapSpace?: boolean | null;
5573
+ /** Bring back the reading aids: the charter, its guide and its domains, each by its pair and the mark `x_charter_of`. Refused for a public reader. */
5574
+ readingAids?: boolean | null;
5573
5575
  }
5574
5576
  /** Why a node that is out by default is in. */
5575
- type OwGraphMark = 'room' | 'hidden' | 'proposed';
5577
+ type OwGraphMark = 'room' | 'hidden' | 'proposed' | 'reading_aid';
5576
5578
  /**
5577
5579
  * Why an element is not a node, or an edge was left out: the lens's closed list, then the graph's own, in
5578
5580
  * this order: `room`, `hidden`, `proposed`, `map_space`, `reading_aid`, `outside_lens`. `outside_lens` (a link
@@ -5592,7 +5594,7 @@ interface OwGraphNode {
5592
5594
  family: ElementGroup;
5593
5595
  /** The type's icon name, from the distribution's presentation defaults. */
5594
5596
  icon: string;
5595
- /** The out-by-default kinds the element belongs to, in this order: `room`, `hidden`, `proposed`; absent when none. */
5597
+ /** The out-by-default kinds the element belongs to, in this order: `room`, `hidden`, `proposed`, `reading_aid`; absent when none. */
5596
5598
  marks?: OwGraphMark[];
5597
5599
  /** True on a guest's known-of element, a stub that has no edges out; absent otherwise. */
5598
5600
  known_of?: true;
@@ -5624,8 +5626,8 @@ interface OwWorldGraph {
5624
5626
  *
5625
5627
  * `world` and `reader` are what `resolveLens` takes. Without `options.lens` the nodes are every element
5626
5628
  * the reader sees less what is out by default: room elements, hidden ones, proposed ones and map space
5627
- * (Map, Pin, Marker; a Zone is content and a node like any other), each brought back by its flag and then marked, and the reading aids (the charter,
5628
- * its guide, its domains: `isCharterElement`), counted `reading_aid`, which no flag brings back. With a lens the nodes are
5629
+ * (Map, Pin, Marker; a Zone is content and a node like any other) and the reading aids (the charter, its guide,
5630
+ * its domains: `isCharterElement`), each brought back by its flag and then marked (map space carries no mark). With a lens the nodes are
5629
5631
  * exactly the lens's `kept`, its cut rides along unchanged, and a flag adds nothing. A lens whose `x_lens`
5630
5632
  * cannot be read gives an empty graph with `unreadable` naming the key, as `resolveLens` does.
5631
5633
  *
@@ -5641,7 +5643,8 @@ interface OwWorldGraph {
5641
5643
  * reader does not see. A link to an id that is not in the world is left out and not counted.
5642
5644
  *
5643
5645
  * `hidden` or `proposed` from a reader that is not the owner, or any flag from a public reader, is refused
5644
- * by name before anything is read. An owner reading `as` another reader is judged by that reader's rung.
5646
+ * by name before anything is read; of several, the first in the order `hidden`, `proposed`, `rooms`, `mapSpace`,
5647
+ * `readingAids`. An owner reading `as` another reader is judged by that reader's rung.
5645
5648
  */
5646
5649
  declare function worldGraph(world: OwLensWorld, reader: OwLensReader, options?: OwGraphOptions): OwWorldGraph;
5647
5650
  /**
package/dist/index.js CHANGED
@@ -878,7 +878,7 @@ var OwV2Client = class {
878
878
  since: policy.since,
879
879
  budget: policy.budget,
880
880
  depth: policy.depth,
881
- compact: policy.compact,
881
+ compact: policy.compact ?? false,
882
882
  lens: policy.lens
883
883
  });
884
884
  return this.request("GET", `/character/${seg("characterId", characterId)}/context`, { query, worldRead: true });
@@ -3596,7 +3596,7 @@ function recordsOf(characterId, elements) {
3596
3596
  }
3597
3597
 
3598
3598
  // src/graph.ts
3599
- var GRAPH_OPTION_KEYS = ["lens", "asOf", "clock", "rooms", "hidden", "proposed", "mapSpace"];
3599
+ var GRAPH_OPTION_KEYS = ["lens", "asOf", "clock", "rooms", "hidden", "proposed", "mapSpace", "readingAids"];
3600
3600
  var DECLARED_LINKS = ["x_lens_leads_to", "x_spine_depends_on"];
3601
3601
  var GRAPH_REASONS = [...CUT_REASONS, "room", "hidden", "proposed", "map_space", "reading_aid", "outside_lens"];
3602
3602
  var GRAPH_OWNER_ONLY = /* @__PURE__ */ new Set([...OWNER_ONLY, "hidden", "proposed"]);
@@ -3619,14 +3619,15 @@ function worldGraph(world, reader, options) {
3619
3619
  room: flag(opts, "rooms"),
3620
3620
  hidden: flag(opts, "hidden"),
3621
3621
  proposed: flag(opts, "proposed"),
3622
- map_space: flag(opts, "mapSpace")
3622
+ map_space: flag(opts, "mapSpace"),
3623
+ reading_aid: flag(opts, "readingAids")
3623
3624
  };
3624
3625
  const seenRung = reader.rung === "owner" && reader.as != null ? reader.as.rung : reader.rung;
3625
3626
  for (const [kind, key] of [["hidden", "hidden"], ["proposed", "proposed"]]) {
3626
3627
  if (flags[kind] && seenRung !== "owner") throw new TypeError(`worldGraph: ${key} is the owner's alone; a ${seenRung} reader may not ask it.`);
3627
3628
  }
3628
3629
  if (seenRung === "public") {
3629
- for (const [kind, key] of [["room", "rooms"], ["map_space", "mapSpace"]]) {
3630
+ for (const [kind, key] of [["room", "rooms"], ["map_space", "mapSpace"], ["reading_aid", "readingAids"]]) {
3630
3631
  if (flags[kind]) throw new TypeError(`worldGraph: a public reader takes no flag; it asked ${key}.`);
3631
3632
  }
3632
3633
  }
@@ -3644,7 +3645,7 @@ function worldGraph(world, reader, options) {
3644
3645
  if (r.aid.has(id)) out.push("reading_aid");
3645
3646
  return out;
3646
3647
  };
3647
- const brought = (k) => k !== "reading_aid" && flags[k];
3648
+ const brought = (k) => flags[k];
3648
3649
  const candidate = (id) => r.view.has(id) || seenOwner && r.proposed.has(id);
3649
3650
  const nodeIds = /* @__PURE__ */ new Set();
3650
3651
  let cut2;
@@ -3679,7 +3680,7 @@ function worldGraph(world, reader, options) {
3679
3680
  family: ELEMENT_GROUPS[type],
3680
3681
  icon: ELEMENT_ICONS[type]
3681
3682
  };
3682
- const marks2 = kinds(id).filter((k) => k !== "map_space" && k !== "reading_aid");
3683
+ const marks2 = kinds(id).filter((k) => k !== "map_space");
3683
3684
  if (marks2.length > 0) node.marks = marks2;
3684
3685
  if (r.stubs.has(id)) node.known_of = true;
3685
3686
  return node;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.127.0",
3
+ "version": "4.128.1",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {