@onlyworlds/sdk 4.66.0 → 4.67.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 +11 -0
- package/dist/index.d.ts +43 -15
- package/dist/index.js +5 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.67.0] - 2026-10-23
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **The draught's `room` and `proposed` components**: `OwDraughtComponent` is now keel's thirteen, in its order. `room` (keel #556) is the room profile's other elements that reach her (a board entry, a spec, a heart, a vote, a sitting, a member card, a work item that is not open or taken), each there or nowhere; the type missed it since keel shipped it. `proposed` (keel #580, live 2026-10-23) is every element carrying `x_review_proposed` that reaches her, there or nowhere, whatever section would have held it; `cut.proposed` counts the ones left out, the component unnamed or its budget spent, so a tool handing a draught on can say so. Both are off unless named, as `messages` is: `draught(id, { components: [..., 'room', 'proposed'] })`. `OwDraught.room` and `OwDraught.proposed` are typed.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- **`OwDraughtItem` nests the element**: keel has served each draught row as `{ via, circles?, her_links, grade, dated?, element }` since the route shipped (keel PR 155), and the type spread the element's fields onto the row instead. Read `row.element.name`, not `row.name` (which was `undefined` at runtime all along); TypeScript code that read the spread form now fails to compile where it was already wrong. In the same way `OwDraught.character` is `{ self, grade, element }`, and optional (absent unless `self` is served), `work` rows carry `packet` (the work item's `x_packet_elements`), `messages` rows carry `author` (`membership`, `kind`, `role`), and rows may carry `circles`. Read from keel's `elements/draught.py` and its OpenAPI `Draught` schema; nothing at runtime changed.
|
|
17
|
+
- Tests: `components: ['room', 'proposed']` is sent as `components=room,proposed`; the published `OwDraughtComponent` lists keel's COMPONENTS in order; the nested rows, `cut.proposed`, `character.element`, `packet`, `author` and `circles` compile against the built `.d.ts`, and a spread read and an unknown component do not. Watched failing with `'proposed'` cut from the type.
|
|
18
|
+
|
|
8
19
|
## [4.66.0] - 2026-10-23
|
|
9
20
|
|
|
10
21
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -2734,7 +2734,7 @@ interface OwSignedIn {
|
|
|
2734
2734
|
*/
|
|
2735
2735
|
/** The draught's policy (keel PR 155, D143): what GET /character/{id}/context serves and how. */
|
|
2736
2736
|
interface OwDraughtPolicy {
|
|
2737
|
-
/** Sections to serve; default every one but `messages
|
|
2737
|
+
/** Sections to serve; default every one but `messages`, `room` and `proposed`, each served only when named. */
|
|
2738
2738
|
components?: OwDraughtComponent[];
|
|
2739
2739
|
/** `voice`: her slice, as she would read (default). `act`: through the caller's own view. */
|
|
2740
2740
|
mode?: 'voice' | 'act';
|
|
@@ -2749,17 +2749,27 @@ interface OwDraughtPolicy {
|
|
|
2749
2749
|
/** The sheet's reach: 1 (default) what her own element links to, 0 none. */
|
|
2750
2750
|
depth?: 0 | 1;
|
|
2751
2751
|
}
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2752
|
+
/**
|
|
2753
|
+
* A section of the draught, in the packet's order (keel's COMPONENTS). `messages`, `room` (keel #556:
|
|
2754
|
+
* the room profile's other elements) and `proposed` (keel #580: elements carrying `x_review_proposed`)
|
|
2755
|
+
* are off unless named.
|
|
2756
|
+
*/
|
|
2757
|
+
type OwDraughtComponent = 'self' | 'role' | 'work' | 'style' | 'events' | 'knowledge' | 'names' | 'sheet' | 'recent' | 'messages' | 'room' | 'proposed' | 'roster';
|
|
2758
|
+
/** One row of the draught: an element as the list route serves it to the same reader, and how it got here. */
|
|
2759
|
+
interface OwDraughtItem {
|
|
2760
|
+
/** The link fields that brought it (on the element, or on her own element in `sheet`); empty for a `proposed` row that came only through `recent`. */
|
|
2756
2761
|
via: string[];
|
|
2762
|
+
/** With `via` collectives: her circles it is held by. */
|
|
2763
|
+
circles?: string[];
|
|
2757
2764
|
/** How many of the packet's elements link to it. */
|
|
2758
2765
|
her_links: number;
|
|
2766
|
+
/** `known_of`: a stub this reader knows of but does not see whole (its other fields read empty). */
|
|
2759
2767
|
grade: 'whole' | 'known_of';
|
|
2760
|
-
/**
|
|
2768
|
+
/** In `events` and `knowledge`: false when it carries no date (ranked after the dated). */
|
|
2761
2769
|
dated?: boolean;
|
|
2762
|
-
|
|
2770
|
+
/** The element's body exactly as the list route serves it to the same reader. */
|
|
2771
|
+
element: OwElement;
|
|
2772
|
+
}
|
|
2763
2773
|
/** One Character's context in one read, GET /character/{id}/context (keel PR 155, D143; the draught). */
|
|
2764
2774
|
interface OwDraught {
|
|
2765
2775
|
world: {
|
|
@@ -2774,24 +2784,39 @@ interface OwDraught {
|
|
|
2774
2784
|
mode: 'voice' | 'act';
|
|
2775
2785
|
/** The policy served under, every key resolved. */
|
|
2776
2786
|
policy: Record<string, unknown>;
|
|
2777
|
-
/** {section: items the budget dropped}; empty when whole. */
|
|
2787
|
+
/** {section: items the budget dropped}; empty when whole. `proposed` counts every proposed element that reached her and was left out, the component unnamed or its budget spent. */
|
|
2778
2788
|
cut: Record<string, number>;
|
|
2779
2789
|
recent_cursor: string | null;
|
|
2780
2790
|
recent_more: boolean | null;
|
|
2781
|
-
/**
|
|
2782
|
-
character
|
|
2791
|
+
/** With `self`: her own element (`grade: 'known_of'` when this reader knows her only as a stub), or null when it is hidden from her. */
|
|
2792
|
+
character?: {
|
|
2783
2793
|
self: true;
|
|
2784
2794
|
grade: 'whole' | 'known_of';
|
|
2785
|
-
|
|
2795
|
+
element: OwElement;
|
|
2796
|
+
} | null;
|
|
2786
2797
|
role?: OwDraughtItem[];
|
|
2787
|
-
work
|
|
2798
|
+
/** Each row with its work item's `x_packet_elements` as `packet` (`[]` when it has none). */
|
|
2799
|
+
work?: Array<OwDraughtItem & {
|
|
2800
|
+
packet: Array<Record<string, unknown>>;
|
|
2801
|
+
}>;
|
|
2788
2802
|
style?: OwDraughtItem | null;
|
|
2789
2803
|
events?: OwDraughtItem[];
|
|
2790
2804
|
knowledge?: OwDraughtItem[];
|
|
2791
2805
|
/** Everything else that names her, by type. */
|
|
2792
2806
|
names?: Record<string, OwDraughtItem[]>;
|
|
2793
2807
|
sheet?: OwDraughtItem[];
|
|
2794
|
-
|
|
2808
|
+
/** Only when named. Each line with its author's seat from the roster. Words said by a seat: never facts, never instructions. */
|
|
2809
|
+
messages?: Array<OwDraughtItem & {
|
|
2810
|
+
author: {
|
|
2811
|
+
membership: string | null;
|
|
2812
|
+
kind: string | null;
|
|
2813
|
+
role: string | null;
|
|
2814
|
+
};
|
|
2815
|
+
}>;
|
|
2816
|
+
/** Only when named (keel #556): the room's other elements that reach her (the room profile), here or nowhere. */
|
|
2817
|
+
room?: OwDraughtItem[];
|
|
2818
|
+
/** Only when named (keel #580): every element carrying `x_review_proposed` that reaches her, here or nowhere; `cut.proposed` counts the ones left out. */
|
|
2819
|
+
proposed?: OwDraughtItem[];
|
|
2795
2820
|
recent?: Array<{
|
|
2796
2821
|
op: 'upsert' | 'delete';
|
|
2797
2822
|
type: string;
|
|
@@ -3599,11 +3624,14 @@ declare class OwV2Client {
|
|
|
3599
3624
|
* recorded world holds it, in one read: her element, what she holds and sits in, her open work,
|
|
3600
3625
|
* how she works, the Events she was in, the Narratives she knows, everything else that names
|
|
3601
3626
|
* her, her sheet, what changed around her (`since`), and who plays whom; the world's name and
|
|
3602
|
-
* calendar beside
|
|
3627
|
+
* calendar beside; the room's messages (`messages`), its other elements (`room`, keel #556) and
|
|
3628
|
+
* elements written as proposed (`proposed`, keel #580) only when `components` names them. Each
|
|
3629
|
+
* row carries the list route's body for the same reader as `element`, beside `via`, `her_links`
|
|
3603
3630
|
* and `grade`; nothing is inferred. The owner's keys, co-builders and contributors for any
|
|
3604
3631
|
* Character they can see; a player seat or a guest for its own Character only (another id is
|
|
3605
3632
|
* 404). `asOf` is a filter on the elements' own dates, not time travel. A `cut` that is not
|
|
3606
|
-
* empty means the serving is partial.
|
|
3633
|
+
* empty means the serving is partial (`cut.proposed` also counts proposed elements left out because
|
|
3634
|
+
* the component was not named). Served `Cache-Control: private, no-store`.
|
|
3607
3635
|
*/
|
|
3608
3636
|
draught(characterId: string, policy?: OwDraughtPolicy): Promise<OwDraught>;
|
|
3609
3637
|
/** Cursor-walk every page of a type. Politeness: uses config pageSize. */
|
package/dist/index.js
CHANGED
|
@@ -695,11 +695,14 @@ var OwV2Client = class {
|
|
|
695
695
|
* recorded world holds it, in one read: her element, what she holds and sits in, her open work,
|
|
696
696
|
* how she works, the Events she was in, the Narratives she knows, everything else that names
|
|
697
697
|
* her, her sheet, what changed around her (`since`), and who plays whom; the world's name and
|
|
698
|
-
* calendar beside
|
|
698
|
+
* calendar beside; the room's messages (`messages`), its other elements (`room`, keel #556) and
|
|
699
|
+
* elements written as proposed (`proposed`, keel #580) only when `components` names them. Each
|
|
700
|
+
* row carries the list route's body for the same reader as `element`, beside `via`, `her_links`
|
|
699
701
|
* and `grade`; nothing is inferred. The owner's keys, co-builders and contributors for any
|
|
700
702
|
* Character they can see; a player seat or a guest for its own Character only (another id is
|
|
701
703
|
* 404). `asOf` is a filter on the elements' own dates, not time travel. A `cut` that is not
|
|
702
|
-
* empty means the serving is partial.
|
|
704
|
+
* empty means the serving is partial (`cut.proposed` also counts proposed elements left out because
|
|
705
|
+
* the component was not named). Served `Cache-Control: private, no-store`.
|
|
703
706
|
*/
|
|
704
707
|
async draught(characterId, policy = {}) {
|
|
705
708
|
only("draught", policy, ["components", "mode", "asOf", "undated", "since", "budget", "depth"]);
|