@onlyworlds/sdk 4.41.0 → 4.42.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 +1 -1
- package/CHANGELOG.md +16 -0
- package/SCHEMA.md +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -6
- 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.32.
|
|
3
|
+
**Current as of**: SDK **4.x** · schema-dist **v0.32.2-dist.29** (canonical 00.32.02).
|
|
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,22 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.42.1] - 2026-10-20
|
|
9
|
+
|
|
10
|
+
The calendar reader refuses what the `atlas_calendar` profile refuses (schema-dist `profiles/calendar.md`; Quillon's Unity read, OW Council h58 #8917).
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **`readCalendarValue` / `readCalendarConfig` no longer throw on a falsy `eras` or `intercalary`** (`false`, `0`, `""`): it threw a `TypeError` where the profile says a reader refuses and shows bare numbers. It now returns `null`.
|
|
14
|
+
- **A step is an integer, so the reader now refuses** an era whose `start` or `end` is not a whole number, a `year_base` other than `0` or `1` (a string `"1"` printed as `"01"` before), and month or weekday names that are not strings. Atlas writes none of these; the Unity SDK refuses them the same way.
|
|
15
|
+
|
|
16
|
+
## [4.42.0] - 2026-10-20
|
|
17
|
+
|
|
18
|
+
Schema 00.32.02 (Skeld, OW Council h58 #8811): repinned to schema-dist v0.32.2-dist.29.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- **A Narrative's `start_date`** reads "Date when the narrative is first told or recorded, measured in world TIME units; the span it recounts lives on its events" (it read "Date when the narrative begins"), and **its `end_date`** reads "Date when the narrative stops being told, measured in world TIME units; empty while it is still told" (it read "Date when the narrative ends"), in the generated doc comments and `SCHEMA.md`. No field, type or link changed.
|
|
22
|
+
- **`ONLYWORLDS_VERSION`** is `'00.32.02'`. It is an `as const` export, so its literal type moves too, which is why this is a minor and not a patch.
|
|
23
|
+
|
|
8
24
|
## [4.41.0] - 2026-10-20
|
|
9
25
|
|
|
10
26
|
A known-of stub's public fields (keel PR 117, keel #448), live in production, and schema-dist v0.32.1-dist.28, which publishes them.
|
package/SCHEMA.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OnlyWorlds Schema Reference
|
|
2
2
|
|
|
3
|
-
**Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.32.
|
|
3
|
+
**Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.32.2-dist.29** — canonical schema **00.32.02**, published 2026-10-20.
|
|
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.
|
|
@@ -400,8 +400,8 @@ Families (colour semantics; icon carries the type): agents · world · abstract
|
|
|
400
400
|
|
|
401
401
|
- `story` (text) — Content of the narrative, as told or remembered
|
|
402
402
|
- `consequences` (text) — Outcomes or legacy of the narrative
|
|
403
|
-
- `start_date` (integer) — Date when the narrative
|
|
404
|
-
- `end_date` (integer) — Date when the narrative
|
|
403
|
+
- `start_date` (integer) — Date when the narrative is first told or recorded, measured in world TIME units; the span it recounts lives on its events
|
|
404
|
+
- `end_date` (integer) — Date when the narrative stops being told, measured in world TIME units; empty while it is still told
|
|
405
405
|
- `order` (integer) — Position of this narrative within a parent narrative's sequence
|
|
406
406
|
- `parent_narrative` (single link → narrative) — Larger narrative that this narrative takes place in
|
|
407
407
|
- `protagonist` (single link → character) — Primary character of the narrative
|
package/dist/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ type ElementType = 'ability' | 'character' | 'collective' | 'construct' | 'creat
|
|
|
40
40
|
declare const ELEMENT_TYPES: ElementType[];
|
|
41
41
|
/** Canonical OnlyWorlds schema version. Source: the `canonical:` value of the pinned
|
|
42
42
|
* distribution's VERSION file (see the provenance block at the top of this file). */
|
|
43
|
-
declare const ONLYWORLDS_VERSION: "00.32.
|
|
43
|
+
declare const ONLYWORLDS_VERSION: "00.32.02";
|
|
44
44
|
/** The four semantic families (colour carries the family; ELEMENT_ICONS carries the type). */
|
|
45
45
|
type ElementFamily = 'agents' | 'world' | 'abstract' | 'temporal';
|
|
46
46
|
/** Per-type semantic family. Source: the distribution's `presentation.json` sidecar
|
package/dist/index.js
CHANGED
|
@@ -1347,7 +1347,7 @@ function buildQuery(params) {
|
|
|
1347
1347
|
|
|
1348
1348
|
// src/v2/types.generated.ts
|
|
1349
1349
|
var ELEMENT_TYPES = ["ability", "character", "collective", "construct", "creature", "event", "family", "institution", "language", "law", "location", "map", "marker", "narrative", "object", "phenomenon", "pin", "relation", "species", "title", "trait", "zone"];
|
|
1350
|
-
var ONLYWORLDS_VERSION = "00.32.
|
|
1350
|
+
var ONLYWORLDS_VERSION = "00.32.02";
|
|
1351
1351
|
var ELEMENT_FAMILIES = {
|
|
1352
1352
|
ability: "abstract",
|
|
1353
1353
|
character: "agents",
|
|
@@ -3001,18 +3001,21 @@ function readCalendarConfig(value) {
|
|
|
3001
3001
|
const cfg = value;
|
|
3002
3002
|
if (cfg.version !== 1 || typeof cfg.grain !== "string") return null;
|
|
3003
3003
|
const months = cfg.bundles?.months;
|
|
3004
|
-
if (months && (!Array.isArray(months.names) || !Array.isArray(months.lengths) || months.names.length !== months.lengths.length || months.names.length === 0)) return null;
|
|
3005
|
-
if (cfg.eras && !Array.isArray(cfg.eras)) return null;
|
|
3006
|
-
if (cfg.eras?.some((e) => typeof e?.name !== "string" || !Number.
|
|
3007
|
-
if (cfg.intercalary && (!Array.isArray(cfg.intercalary) || cfg.intercalary.some((i) => typeof i?.name !== "string" || !Number.isInteger(i?.after_month)))) return null;
|
|
3004
|
+
if (months && (!Array.isArray(months.names) || !Array.isArray(months.lengths) || months.names.length !== months.lengths.length || months.names.length === 0 || !months.names.every(isString))) return null;
|
|
3005
|
+
if (cfg.eras != null && !Array.isArray(cfg.eras)) return null;
|
|
3006
|
+
if (cfg.eras?.some((e) => typeof e?.name !== "string" || !Number.isSafeInteger(e?.start) || e.end != null && !Number.isSafeInteger(e.end) || e.year_base != null && e.year_base !== 0 && e.year_base !== 1)) return null;
|
|
3007
|
+
if (cfg.intercalary != null && (!Array.isArray(cfg.intercalary) || cfg.intercalary.some((i) => typeof i?.name !== "string" || !Number.isInteger(i?.after_month)))) return null;
|
|
3008
3008
|
if (months && !months.lengths.every(isPositiveInt)) return null;
|
|
3009
3009
|
const year = cfg.bundles?.year;
|
|
3010
3010
|
if (year != null && !isPositiveInt(year.steps)) return null;
|
|
3011
3011
|
const week = cfg.bundles?.week;
|
|
3012
|
-
if (week != null && (!isPositiveInt(week.length) || !Array.isArray(week.names))) return null;
|
|
3012
|
+
if (week != null && (!isPositiveInt(week.length) || !Array.isArray(week.names) || !week.names.every(isString))) return null;
|
|
3013
3013
|
if (cfg.intercalary?.some((i) => i.every_years != null && !isPositiveInt(i.every_years))) return null;
|
|
3014
3014
|
return cfg;
|
|
3015
3015
|
}
|
|
3016
|
+
function isString(s) {
|
|
3017
|
+
return typeof s === "string";
|
|
3018
|
+
}
|
|
3016
3019
|
function isPositiveInt(n) {
|
|
3017
3020
|
return Number.isSafeInteger(n) && n >= 1;
|
|
3018
3021
|
}
|