@onlyworlds/sdk 4.0.1 → 4.1.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/CHANGELOG.md +55 -0
- package/SCHEMA.md +7 -7
- package/dist/index.d.ts +20 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,61 @@
|
|
|
3
3
|
All notable changes to `@onlyworlds/sdk`. Maintained from 3.1.0 onward (Kael, Assembly);
|
|
4
4
|
earlier history lives in git log only.
|
|
5
5
|
|
|
6
|
+
## [4.1.0] — 2026-07-29
|
|
7
|
+
|
|
8
|
+
Public-surface hygiene. Nothing breaks; one member is now marked for removal, and one
|
|
9
|
+
piece of long-standing speculation is retired by measurement.
|
|
10
|
+
|
|
11
|
+
⚑ **4.0.2 was tagged in git and superseded before it reached npm.** Everything in it ships
|
|
12
|
+
here — the tag stays as a record rather than being moved or deleted.
|
|
13
|
+
|
|
14
|
+
### Deprecated
|
|
15
|
+
- **`FieldType.integer_max` and `FieldInfo.max`** — removal scheduled for **5.0.0**. No
|
|
16
|
+
`FIELD_SCHEMA` entry has ever carried either, in this repository's entire history. They
|
|
17
|
+
existed to surface the schema's `maximum:` constraint, and that constraint is **advisory**:
|
|
18
|
+
keel declares no `MaxValueValidator`, and a `charisma: 9999` write against a `maximum: 100`
|
|
19
|
+
field returns 201 and stores it verbatim. The canonical schema walk therefore stays silent
|
|
20
|
+
on bounds permanently. There is no source to wire them to and no promise they could keep —
|
|
21
|
+
and a public type member meaning "hint the wire ignores" is one consumers read as
|
|
22
|
+
validation. Deprecating now rather than at the major so the signal arrives early; the
|
|
23
|
+
`@deprecated` tags surface in editors via the shipped `.d.ts`.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- **`TokenResource` is confirmed staying.** RFC-001 §5 asked the platform owner whether the
|
|
27
|
+
token routes were carried long-term or deprecated wire-side, and the question was never
|
|
28
|
+
answered in writing — so this package's own barrel carried "wire fate under review; may be
|
|
29
|
+
removed in a later 4.x" for months, on nobody's authority. Probed against production:
|
|
30
|
+
`GET /api/v2/tokens/status/` and `/tokens/encryption-info/` both return **200**, with a 404
|
|
31
|
+
control on a nonexistent route proving the check meant something. The wire carries it. The
|
|
32
|
+
speculation is retired and the comment now records the evidence instead.
|
|
33
|
+
|
|
34
|
+
## [4.0.2] — 2026-07-29
|
|
35
|
+
|
|
36
|
+
Re-pinned to `v0.30.1-dist.13` (canonical **00.30.01**). No field shape changed and no
|
|
37
|
+
`FIELD_SCHEMA` entry changed — the schema walk is byte-identical between the two pins, so
|
|
38
|
+
nothing about decoding moved. Three things changed and nothing else.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
- **`construct.relations` and `event.languages` shipped with no description at all** — in
|
|
42
|
+
`types.generated.ts` and in `SCHEMA.md`. Their descriptions were nested one level too deep
|
|
43
|
+
inside `items:` in the canonical YAML, which made them invisible to every consumer that reads
|
|
44
|
+
field descriptions, this package included. `SCHEMA.md` is the package's AI-legibility artifact,
|
|
45
|
+
so the gap landed where it did the most harm.
|
|
46
|
+
- **Five description typos** corrected in published JSDoc and `SCHEMA.md`: `beapplied`,
|
|
47
|
+
`phyiscal`, `relating the`, `object grant`, `eventuated`. The rendered docs site had already
|
|
48
|
+
fixed all five by hand — the downstream copy was the correct one, and nobody noticed because
|
|
49
|
+
the fix went where it was visible rather than where it was true.
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
- `ONLYWORLDS_VERSION` `'00.30.00'` → `'00.30.01'`. It is a public `as const`, so its **literal
|
|
53
|
+
type** changes. Depending on that literal is pathological, but it is a type-level change and
|
|
54
|
+
should not be discovered rather than announced.
|
|
55
|
+
- The pin now carries canonical's numeric-bounds correction: the `maximum: 0` sentinel is gone
|
|
56
|
+
from 26 fields, 8 fields gained `minimum: 0`, and `rulings.yaml` carries the numeric-bounds
|
|
57
|
+
row. Nothing in this package consumes bounds — `maximum:` is **advisory** (keel does not
|
|
58
|
+
enforce it; a `charisma: 9999` write returns 201 and stores verbatim) and the walk stays
|
|
59
|
+
silent on bounds permanently. `integer_max` / `max` therefore remain declared no-ops here.
|
|
60
|
+
|
|
6
61
|
## [4.0.1] — 2026-07-29
|
|
7
62
|
|
|
8
63
|
**Metadata correction release.** No wire-path change: the client's reads and writes never
|
package/SCHEMA.md
CHANGED
|
@@ -149,7 +149,7 @@ Families (colour semantics; icon carries the type): agents · world · abstract
|
|
|
149
149
|
- `phenomena` (multi link → phenomenon) — Phenomena relevant to the construct
|
|
150
150
|
- `languages` (multi link → language) — Languages relevant to the construct
|
|
151
151
|
- `families` (multi link → family) — Families relevant to the construct
|
|
152
|
-
- `relations` (multi link → relation)
|
|
152
|
+
- `relations` (multi link → relation) — Relations relevant to the construct
|
|
153
153
|
- `titles` (multi link → title) — Titles relevant to the construct
|
|
154
154
|
- `constructs` (multi link → construct) — Other constructs relevant to the construct
|
|
155
155
|
- `events` (multi link → event) — Events relevant to the construct
|
|
@@ -200,7 +200,7 @@ Families (colour semantics; icon carries the type): agents · world · abstract
|
|
|
200
200
|
- `consequences` (text) — Outcomes and impacts resulting from the event
|
|
201
201
|
- `start_date` (integer) — Date on which the event began
|
|
202
202
|
- `end_date` (integer) — Date on which the event concluded
|
|
203
|
-
- `triggers` (multi link → event) — Events that
|
|
203
|
+
- `triggers` (multi link → event) — Events that precipitated this event
|
|
204
204
|
|
|
205
205
|
### Involves
|
|
206
206
|
|
|
@@ -215,7 +215,7 @@ Families (colour semantics; icon carries the type): agents · world · abstract
|
|
|
215
215
|
- `zones` (multi link → zone) — Zones relevant to the event
|
|
216
216
|
- `abilities` (multi link → ability) — Abilities relevant to the event
|
|
217
217
|
- `phenomena` (multi link → phenomenon) — Natural or supernatural phenomena relevant to the event
|
|
218
|
-
- `languages` (multi link → language)
|
|
218
|
+
- `languages` (multi link → language) — Languages relevant to the event
|
|
219
219
|
- `families` (multi link → family) — Families relevant to the event
|
|
220
220
|
- `relations` (multi link → relation) — Interpersonal or political relations relevant to the event
|
|
221
221
|
- `titles` (multi link → title) — Titles relevant to the event
|
|
@@ -294,7 +294,7 @@ Families (colour semantics; icon carries the type): agents · world · abstract
|
|
|
294
294
|
- `purpose` (text) — The intent, motivation, or justification for the law's creation
|
|
295
295
|
- `date` (integer) — Date the law was formally established, in world TIME units
|
|
296
296
|
- `parent_law` (single link → law) — A law that this law derives from, modifies, or enhances
|
|
297
|
-
- `penalties` (multi link → construct) — Consequences intended to
|
|
297
|
+
- `penalties` (multi link → construct) — Consequences intended to be applied when the law is contravened
|
|
298
298
|
|
|
299
299
|
### World
|
|
300
300
|
|
|
@@ -436,14 +436,14 @@ Families (colour semantics; icon carries the type): agents · world · abstract
|
|
|
436
436
|
- `weight` (integer) — Approximate or exact mass of the object, defined by world MASS units
|
|
437
437
|
- `amount` (integer) — The number of identical units in this object entry
|
|
438
438
|
- `parent_object` (single link → object) — Larger object that this one is part of or contained within
|
|
439
|
-
- `materials` (multi link → construct) — The
|
|
440
|
-
- `technology` (multi link → construct) — Mechanisms relating the object's design or operation
|
|
439
|
+
- `materials` (multi link → construct) — The physical matter that constitutes the object
|
|
440
|
+
- `technology` (multi link → construct) — Mechanisms relating to the object's design or operation
|
|
441
441
|
|
|
442
442
|
### Function
|
|
443
443
|
|
|
444
444
|
- `utility` (text) — Intended purpose or primary use of the object
|
|
445
445
|
- `effects` (multi link → phenomenon) — Phenomena potentially triggered or emitted on object use
|
|
446
|
-
- `abilities` (multi link → ability) — Abilities that the object
|
|
446
|
+
- `abilities` (multi link → ability) — Abilities that the object grants or enables
|
|
447
447
|
- `consumes` (multi link → construct) — What might be used or depleted on object use
|
|
448
448
|
|
|
449
449
|
### World
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/** Every element carries these. The extension index signature admits namespaced
|
|
2
|
-
* pass-through fields (atlas_* / shadow_* / x_*) returned verbatim by the server.
|
|
2
|
+
* pass-through fields (atlas_* / shadow_* / x_*) returned verbatim by the server.
|
|
3
|
+
* Derived from base_properties.yaml: `World` is dropped (the API rejects it in
|
|
4
|
+
* bodies -- the key determines the world) and the four server-managed fields are
|
|
5
|
+
* added, since they ride every wire body and appear in no element YAML. */
|
|
3
6
|
interface OwElementBase {
|
|
4
7
|
/** Element type slug (server-managed, read-only). */
|
|
5
8
|
type: string;
|
|
6
|
-
/** Unique identifier, uuidv7 format. */
|
|
9
|
+
/** Unique identifier for the element, uuidv7 format. */
|
|
7
10
|
id: string;
|
|
8
11
|
/** Name of the element. */
|
|
9
12
|
name: string;
|
|
@@ -28,7 +31,7 @@ type ElementType = 'ability' | 'character' | 'collective' | 'construct' | 'creat
|
|
|
28
31
|
declare const ELEMENT_TYPES: ElementType[];
|
|
29
32
|
/** Canonical OnlyWorlds schema version. Source: the `canonical:` value of the pinned
|
|
30
33
|
* distribution's VERSION file (see the provenance block at the top of this file). */
|
|
31
|
-
declare const ONLYWORLDS_VERSION: "00.30.
|
|
34
|
+
declare const ONLYWORLDS_VERSION: "00.30.01";
|
|
32
35
|
/** The four semantic families (colour carries the family; ELEMENT_ICONS carries the type). */
|
|
33
36
|
type ElementFamily = 'agents' | 'world' | 'abstract' | 'temporal';
|
|
34
37
|
/** Per-type semantic family. Source: the distribution's `presentation.json` sidecar
|
|
@@ -47,11 +50,24 @@ interface SectionInfo {
|
|
|
47
50
|
}
|
|
48
51
|
declare const ELEMENT_SECTIONS: Record<ElementType, SectionInfo[]>;
|
|
49
52
|
/** Field type definitions for OnlyWorlds elements. */
|
|
50
|
-
type FieldType = 'text' | 'integer'
|
|
53
|
+
type FieldType = 'text' | 'integer'
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated Emitted by nothing, and scheduled for removal in 5.0.0.
|
|
56
|
+
*
|
|
57
|
+
* No `FIELD_SCHEMA` entry has ever carried this type, in the entire history of
|
|
58
|
+
* this repository. It was meant to surface the schema's `maximum:` constraint,
|
|
59
|
+
* and that constraint is **advisory**: keel declares no `MaxValueValidator` and
|
|
60
|
+
* the wire stores `charisma: 9999` against a `maximum: 100` field (201, verbatim).
|
|
61
|
+
* The canonical schema walk therefore stays silent on bounds permanently, so
|
|
62
|
+
* there is no source to wire this to and no promise it could keep. A public type
|
|
63
|
+
* member meaning "hint the wire ignores" is one consumers read as validation.
|
|
64
|
+
*/
|
|
65
|
+
| 'integer_max' | 'single_link' | 'multi_link';
|
|
51
66
|
/** Field metadata structure. */
|
|
52
67
|
interface FieldInfo {
|
|
53
68
|
type: FieldType;
|
|
54
69
|
target?: string;
|
|
70
|
+
/** @deprecated Never populated; removed in 5.0.0. See `FieldType.integer_max`. */
|
|
55
71
|
max?: number;
|
|
56
72
|
required?: boolean;
|
|
57
73
|
}
|
package/dist/index.js
CHANGED
|
@@ -314,7 +314,7 @@ function buildQuery(params) {
|
|
|
314
314
|
|
|
315
315
|
// src/v2/types.generated.ts
|
|
316
316
|
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"];
|
|
317
|
-
var ONLYWORLDS_VERSION = "00.30.
|
|
317
|
+
var ONLYWORLDS_VERSION = "00.30.01";
|
|
318
318
|
var ELEMENT_FAMILIES = {
|
|
319
319
|
ability: "abstract",
|
|
320
320
|
character: "agents",
|