@onlyworlds/sdk 4.100.0 → 4.100.2
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 +12 -0
- package/dist/index.d.ts +13 -2
- package/dist/index.js +12 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.100.2] - 2026-10-28
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **`x_served_trimmed` on `OwMe` and `OwMember`**: `me()` and `members()` answers carry it, typed `'lenses'[]`, when `lenses` was served with a lens left out that this key cannot see. The API has served it since the lens routes; the types now say so, as `OwMemberLenses` already did. Saving the list you were shown keeps that lens where it stands.
|
|
13
|
+
|
|
14
|
+
## [4.100.1] - 2026-10-28
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **Lens rows below the public rung keep what the API serves about proposed elements, and no row carries a stored `x_served_trimmed`.** A proposed element (`x_review_proposed` anything but absent or null) is still in no reader's view: never a row, never hopped through. But a contributor or a guest that sees one is served the links to it, and a lens's note keyed to it, where `resolveLens` left both out; the public rung still drops them, unmarked. A body that carries `x_served_trimmed` as stored is served without it: the owner's rows lose it, and below the owner the mark names only what this reading trimmed (it was merged into the stored one). Eight more row cases hold these readings, 28 in all, the same file as the Python package's.
|
|
19
|
+
|
|
8
20
|
## [4.100.0] - 2026-10-28
|
|
9
21
|
|
|
10
22
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -2021,7 +2021,7 @@ interface OwWorldMeta {
|
|
|
2021
2021
|
*/
|
|
2022
2022
|
/**
|
|
2023
2023
|
* Read only: how many elements this reader may read, in all and per type, counted as it reads
|
|
2024
|
-
* them, for every key and token (
|
|
2024
|
+
* them, for every key and token (since 2026-10-27; before it, the keyless read alone).
|
|
2025
2025
|
* Never sent back: patchWorld strips it.
|
|
2026
2026
|
*/
|
|
2027
2027
|
counts?: {
|
|
@@ -2588,6 +2588,11 @@ interface OwMe {
|
|
|
2588
2588
|
lenses: string[];
|
|
2589
2589
|
/** Where `lenses` comes from: `chosen` (your own list, empty for none) or `titles` (you chose none, and your Character's Titles bring these). Saving a list makes it your choice. */
|
|
2590
2590
|
lenses_from: 'chosen' | 'titles';
|
|
2591
|
+
/**
|
|
2592
|
+
* Served only, never written: present only when `lenses` was served with a lens left out, one this
|
|
2593
|
+
* key cannot see; then it names `lenses`. Saving the list you were shown keeps that lens where it stands.
|
|
2594
|
+
*/
|
|
2595
|
+
x_served_trimmed?: 'lenses'[];
|
|
2591
2596
|
/** Agent seats only: the agent's name. */
|
|
2592
2597
|
name?: string;
|
|
2593
2598
|
/** Who you are here, who answers for you, and the house rules. */
|
|
@@ -2703,6 +2708,11 @@ interface OwMember {
|
|
|
2703
2708
|
lenses: string[];
|
|
2704
2709
|
/** Where `lenses` comes from: `chosen` (the row's own list, empty for none) or `titles` (it chose none, and its Character's Titles bring these). */
|
|
2705
2710
|
lenses_from: 'chosen' | 'titles';
|
|
2711
|
+
/**
|
|
2712
|
+
* Served only, never written: present only when `lenses` was served with a lens left out, one this
|
|
2713
|
+
* key cannot see; then it names `lenses`. Saving the list you were shown keeps that lens where it stands.
|
|
2714
|
+
*/
|
|
2715
|
+
x_served_trimmed?: 'lenses'[];
|
|
2706
2716
|
[k: string]: unknown;
|
|
2707
2717
|
}
|
|
2708
2718
|
/** GET /account/allowance: the account's token rating and what is left of it today (keel 872431f, 2026-10-14). */
|
|
@@ -5096,7 +5106,8 @@ interface OwLensReader {
|
|
|
5096
5106
|
/**
|
|
5097
5107
|
* `owner` (the whole world), `contributor` (the world less the hidden), `guest` (exactly the ids in
|
|
5098
5108
|
* `whole`, and those in `known_of` as stubs) or `public` (the world less the hidden and the room
|
|
5099
|
-
* elements). A proposed element is in no reader's view
|
|
5109
|
+
* elements). A proposed element is in no reader's view, but below the public rung a served body keeps
|
|
5110
|
+
* a link to one the rung sees, and a lens's note keyed to it.
|
|
5100
5111
|
*/
|
|
5101
5112
|
rung: 'owner' | 'contributor' | 'guest' | 'public';
|
|
5102
5113
|
/** The reader's Character, for the mail rule; null or absent: no Character, no mail. */
|
package/dist/index.js
CHANGED
|
@@ -4265,6 +4265,8 @@ var Reading = class {
|
|
|
4265
4265
|
this.hidden = /* @__PURE__ */ new Set();
|
|
4266
4266
|
/** The ids written as proposed, which no reader's view holds. */
|
|
4267
4267
|
this.proposed = /* @__PURE__ */ new Set();
|
|
4268
|
+
/** The ids a body this reader is served may link to: the view, and the proposed elements its rung sees (keel's `scoped` leaves them out for the public rung alone). */
|
|
4269
|
+
this.linkable = /* @__PURE__ */ new Set();
|
|
4268
4270
|
this.served = /* @__PURE__ */ new Map();
|
|
4269
4271
|
this.inView = /* @__PURE__ */ new Map();
|
|
4270
4272
|
this.inFull = /* @__PURE__ */ new Map();
|
|
@@ -4294,10 +4296,8 @@ var Reading = class {
|
|
|
4294
4296
|
const knownOf = listed(seen.known_of);
|
|
4295
4297
|
for (const id of this.order) {
|
|
4296
4298
|
const el = this.byId.get(id);
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
continue;
|
|
4300
|
-
}
|
|
4299
|
+
const proposed = handsOnAsProposed(el);
|
|
4300
|
+
if (proposed) this.proposed.add(id);
|
|
4301
4301
|
let sees;
|
|
4302
4302
|
switch (seen.rung) {
|
|
4303
4303
|
case "owner":
|
|
@@ -4307,13 +4307,14 @@ var Reading = class {
|
|
|
4307
4307
|
sees = !hidden.has(id);
|
|
4308
4308
|
break;
|
|
4309
4309
|
case "public":
|
|
4310
|
-
sees = !hidden.has(id) && !this.room.has(id);
|
|
4310
|
+
sees = !hidden.has(id) && !this.room.has(id) && !proposed;
|
|
4311
4311
|
break;
|
|
4312
4312
|
default:
|
|
4313
4313
|
sees = wholeIds.has(id) || knownOf.has(id);
|
|
4314
|
-
if (!wholeIds.has(id) && knownOf.has(id)) this.stubs.add(id);
|
|
4314
|
+
if (!proposed && !wholeIds.has(id) && knownOf.has(id)) this.stubs.add(id);
|
|
4315
4315
|
}
|
|
4316
|
-
if (sees) this.
|
|
4316
|
+
if (sees) this.linkable.add(id);
|
|
4317
|
+
if (sees && !proposed) this.view.add(id);
|
|
4317
4318
|
}
|
|
4318
4319
|
this.members = Array.isArray(world.members) ? world.members : null;
|
|
4319
4320
|
this.asOf = asOf;
|
|
@@ -4361,6 +4362,7 @@ var Reading = class {
|
|
|
4361
4362
|
b.known_of = true;
|
|
4362
4363
|
} else {
|
|
4363
4364
|
b = copy(el);
|
|
4365
|
+
delete b.x_served_trimmed;
|
|
4364
4366
|
if (!this.stored) this.trim(type, b);
|
|
4365
4367
|
}
|
|
4366
4368
|
this.served.set(id, b);
|
|
@@ -4376,7 +4378,7 @@ var Reading = class {
|
|
|
4376
4378
|
* or a guest, never the public rung.
|
|
4377
4379
|
*/
|
|
4378
4380
|
trim(type, b) {
|
|
4379
|
-
const sees = (t, target) => typeof t === "string" && this.
|
|
4381
|
+
const sees = (t, target) => typeof t === "string" && this.linkable.has(t) && (target === "any" || this.typeOf.get(t) === target);
|
|
4380
4382
|
const schema = FIELD_SCHEMA[type] ?? {};
|
|
4381
4383
|
const isLensBody = isLens(b);
|
|
4382
4384
|
const anchorsBefore = isLensBody ? new Set(ANCHOR_FIELDS.flatMap((f) => Array.isArray(b[f]) ? b[f] : [])) : null;
|
|
@@ -4407,17 +4409,14 @@ var Reading = class {
|
|
|
4407
4409
|
const served = new Set(ANCHOR_FIELDS.flatMap((f) => Array.isArray(b[f]) ? b[f] : []));
|
|
4408
4410
|
const kept = {};
|
|
4409
4411
|
for (const k of Object.keys(notes)) {
|
|
4410
|
-
if (served.has(k) || !anchorsBefore.has(k) && this.
|
|
4412
|
+
if (served.has(k) || !anchorsBefore.has(k) && this.linkable.has(k)) kept[k] = notes[k];
|
|
4411
4413
|
else if (anchorsBefore.has(k)) notesGone = true;
|
|
4412
4414
|
}
|
|
4413
4415
|
if (Object.keys(kept).length !== Object.keys(notes).length) b.x_lens = { ...b.x_lens, notes: kept };
|
|
4414
4416
|
}
|
|
4415
4417
|
if (this.seenRung === "public") return;
|
|
4416
4418
|
const named = isMessage(b) ? MESSAGE_ADDRESSING.filter((f) => trimmed.includes(f)) : isLensBody ? [...ANCHOR_FIELDS.filter((f) => trimmed.includes(f)), ...notesGone ? ["notes"] : []] : [];
|
|
4417
|
-
if (named.length
|
|
4418
|
-
const mark = Array.isArray(b.x_served_trimmed) ? b.x_served_trimmed.slice() : [];
|
|
4419
|
-
for (const f of named) if (!mark.includes(f)) mark.push(f);
|
|
4420
|
-
b.x_served_trimmed = mark;
|
|
4419
|
+
if (named.length > 0) b.x_served_trimmed = named;
|
|
4421
4420
|
}
|
|
4422
4421
|
/**
|
|
4423
4422
|
* One hop from each element of `from`, both ways, and on through each Relation it lands on to that Relation's
|