@onlyworlds/sdk 4.127.0 → 4.128.0
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 +1 -1
- package/CHANGELOG.md +11 -0
- package/SCHEMA.md +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/index.js +6 -5
- package/package.json +1 -1
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.
|
|
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,17 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.128.0] - 2026-11-02
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **`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'`.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **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.
|
|
17
|
+
- **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.
|
|
18
|
+
|
|
8
19
|
## [4.127.0] - 2026-11-02
|
|
9
20
|
|
|
10
21
|
### 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.
|
|
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
|
@@ -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)
|
|
5628
|
-
* its
|
|
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
|
|
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
|
@@ -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) =>
|
|
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"
|
|
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;
|