@onlyworlds/sdk 4.100.0 → 4.100.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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +12 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.100.1] - 2026-10-28
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **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.
|
|
13
|
+
|
|
8
14
|
## [4.100.0] - 2026-10-28
|
|
9
15
|
|
|
10
16
|
### 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?: {
|
|
@@ -5096,7 +5096,8 @@ interface OwLensReader {
|
|
|
5096
5096
|
/**
|
|
5097
5097
|
* `owner` (the whole world), `contributor` (the world less the hidden), `guest` (exactly the ids in
|
|
5098
5098
|
* `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
|
|
5099
|
+
* elements). A proposed element is in no reader's view, but below the public rung a served body keeps
|
|
5100
|
+
* a link to one the rung sees, and a lens's note keyed to it.
|
|
5100
5101
|
*/
|
|
5101
5102
|
rung: 'owner' | 'contributor' | 'guest' | 'public';
|
|
5102
5103
|
/** 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
|