@onlyworlds/sdk 4.102.0 → 4.102.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 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.33.0-dist.86** (canonical 00.33.00).
3
+ **Current as of**: SDK **4.x** · schema-dist **v0.33.0-dist.87** (canonical 00.33.00).
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
 
@@ -56,7 +56,8 @@ against live data). The v1 surface (`OnlyWorldsClient`, the `ElementType` enum)
56
56
  account's daily token rating (`tokens_remaining`, `token_rating`; `remaining` counts answers of
57
57
  this size still in it); used up → `err.isQuotaExceeded`. `isAskUnavailable`, `isAskFailed`
58
58
  count nothing. Custom fields (`x_*`) are in the lookup and the context; `atlas_*` is not.
59
- Since 4.72.0 `buildAskContext` leaves proposed (`x_review_proposed` not absent or null), hidden
59
+ Since 4.72.0 `buildAskContext` leaves proposed (`x_review_proposed` present; since 4.102.1 an
60
+ empty mark, `""`, White_Space only, `[]` or `{}`, is settled), hidden
60
61
  (`hidden` not absent, null or false) and room elements out unless asked
61
62
  (`{ includeProposed, includeHidden, includeRoom }`), lists their ids in `leftOut.proposed`,
62
63
  `.hidden`, `.room` (hidden and proposed: under `hidden` only), and labels a proposed element it
package/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.102.1] - 2026-10-29
9
+
10
+ ### Changed
11
+
12
+ - **Schema repinned to schema-dist `v0.33.0-dist.87`** (from dist.86; the same canonical 00.33.00, so `ONLYWORLDS_VERSION` stays `'00.33.00'` and no type, field or constant moved).
13
+ - **An empty review mark is settled.** The review profile now reads `x_review_proposed` by presence, as the room and charter profiles read their marks, and for this mark an empty list or an empty object is absent too. Before, `handsOnAsProposed` answered true for any value but absent or null, so `""`, a string of white space only and `[]` were doubts and `{}` was a mark (`proposedMarkOf` gave `{ by: null, expires: null, lapsed: false }`). Now each of the four reads exactly as absent: `proposedMarkOf` gives `null`, `handsOnAsProposed` gives `false`, and every reader built on them follows, so `buildAskContext` sends such an element without the label and no longer lists it in `leftOut.proposed`, a lens or `worldGraph` keeps it as settled, and a Note carrying one counts as the newest own note. White space is the room profile's White_Space set, so a string of U+3000 is empty and a string of U+001C is a doubt. Any other present value is unchanged: `false`, `0`, a non-empty string and `[[]]` are doubts, and an object with any key, `{ x: null }` included, is a mark.
14
+ - The lens fixture's new graph case, one element of each of the 22 types with map space on, replays: each node carries its colour word and icon as `presentation.json` gives them. The fixture's 152 cases (38 of them graph cases) pass.
15
+
8
16
  ## [4.102.0] - 2026-10-29
9
17
 
10
18
  ### Added
package/README.md CHANGED
@@ -252,7 +252,7 @@ const reply = await account.ask({ worldId, question, context }); // account: a c
252
252
  reply.answer; // from those elements only, or "The world doesn't say."
253
253
  ```
254
254
 
255
- `buildAskContext` hands world elements to an AI, so it leaves three kinds out unless you ask (since 4.72.0): elements marked proposed (`x_review_proposed` anything but absent or null), elements marked hidden (`hidden` anything but absent, null or false) and room elements (`isRoomElement`). Their ids come back in `leftOut.proposed`, `leftOut.hidden` and `leftOut.room`, so you can say how many were held back; an element both hidden and proposed is listed under `hidden` only. Pass `{ includeProposed: true }`, `{ includeHidden: true }` or `{ includeRoom: true }` to send them; a proposed element sent carries `[proposed, not yet reviewed]` (`REVIEW_PROPOSED_LABEL`) on its first line. A sent element's link to one left out reads as not present, never by its name. `dropped` stays the proxy's limits: past the 8th, or past the 12,000 characters, counted over what remains.
255
+ `buildAskContext` hands world elements to an AI, so it leaves three kinds out unless you ask (since 4.72.0): elements marked proposed (`x_review_proposed` present: an empty mark, `""`, white space only, `[]` or `{}`, reads as settled since 4.102.1), elements marked hidden (`hidden` anything but absent, null or false) and room elements (`isRoomElement`). Their ids come back in `leftOut.proposed`, `leftOut.hidden` and `leftOut.room`, so you can say how many were held back; an element both hidden and proposed is listed under `hidden` only. Pass `{ includeProposed: true }`, `{ includeHidden: true }` or `{ includeRoom: true }` to send them; a proposed element sent carries `[proposed, not yet reviewed]` (`REVIEW_PROPOSED_LABEL`) on its first line. A sent element's link to one left out reads as not present, never by its name. `dropped` stays the proxy's limits: past the 8th, or past the 12,000 characters, counted over what remains.
256
256
 
257
257
  The same proxy sorts loose notes into changes for the user to review. Send the elements your own lookup found for them as the `slice`; every id in a row comes from it, and nothing is written until your app applies what the user accepts.
258
258
 
package/SCHEMA.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OnlyWorlds Schema Reference
2
2
 
3
- **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.33.0-dist.86** — canonical schema **00.33.00**, published 2026-10-28.
3
+ **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.33.0-dist.87** — canonical schema **00.33.00**, published 2026-10-29.
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.
package/dist/index.d.ts CHANGED
@@ -128,7 +128,7 @@ declare const CHARTER_PAIRS: ReadonlyArray<{
128
128
  }>;
129
129
  /** The review profile's label (schema-dist `profiles/review.md`, rule 1): the words a reader that
130
130
  * hands a world on (a context for an AI, a pack, a share) puts on each proposed element it keeps,
131
- * one whose `x_review_proposed` is anything but absent or null (a doubt, rule 4, included).
131
+ * one whose `x_review_proposed` is present (a doubt, rule 4, included; an empty mark is settled).
132
132
  * buildAskContext writes it on the element's first line. Source: rule 1's own sentence, read at
133
133
  * codegen. */
134
134
  declare const REVIEW_PROPOSED_LABEL: "proposed, not yet reviewed";
@@ -5297,11 +5297,13 @@ declare function domainsOf(world: OwCharterWorld, reader: OwLensReader): OwReadi
5297
5297
  * whose keeper reviews them) and is not canon until a keeper settles it: accept writes the mark
5298
5298
  * null, decline deletes the element.
5299
5299
  *
5300
- * Two readings, as the profile's rule 1 and rule 4 give them. A reader that shows a world to its
5301
- * people shows the mark when it is an object (`proposedMarkOf`); any other value is not a mark and
5302
- * is reported by a lint, never repaired. A reader that hands a world on leaves out every element
5303
- * whose `x_review_proposed` is anything but absent or null (`handsOnAsProposed`), so a doubt never
5304
- * reaches an AI as canon.
5300
+ * The mark is read by presence (rule 1, serial 87), as the room and charter profiles read theirs:
5301
+ * absent or null is settled, a string counts only when something is left after the White_Space trim,
5302
+ * and for this mark an empty list or an empty object is absent too, so an empty mark is settled,
5303
+ * never a doubt. Two readings of a present mark, as rule 1 and rule 4 give them. A reader that shows
5304
+ * a world to its people shows the mark when it is an object (`proposedMarkOf`); any other value is
5305
+ * not a mark and is reported by a lint, never repaired. A reader that hands a world on leaves out
5306
+ * every element whose mark is present (`handsOnAsProposed`), so a doubt never reaches an AI as canon.
5305
5307
  */
5306
5308
  /** The review profile's proposed mark, an extension key. */
5307
5309
  declare const PROPOSED_MARK = "x_review_proposed";
@@ -5316,15 +5318,16 @@ interface OwProposedMark {
5316
5318
  }
5317
5319
  /**
5318
5320
  * The proposed mark of an element as a reader that shows a world shows it, or null for a settled
5319
- * element: `x_review_proposed` absent, null, or a value that is not an object (an array included).
5320
- * `today` is a day as the profile writes one (YYYY-MM-DD), by default today in UTC; anything else
5321
- * is a TypeError.
5321
+ * element: `x_review_proposed` absent, null, empty (`""`, White_Space only, `[]`, `{}`), or a value
5322
+ * that is not an object (an array included). `today` is a day as the profile writes one
5323
+ * (YYYY-MM-DD), by default today in UTC; anything else is a TypeError.
5322
5324
  */
5323
5325
  declare function proposedMarkOf(element: unknown, today?: string): OwProposedMark | null;
5324
5326
  /**
5325
5327
  * Whether a reader that hands a world on (a pack, a context packet, an AI's context) leaves this
5326
- * element out as proposed: `x_review_proposed` with any value but absent or null, a value that is
5327
- * not a proper mark included (a doubt, counted with the proposed).
5328
+ * element out as proposed: `x_review_proposed` present, a value that is not a proper mark included
5329
+ * (a doubt, counted with the proposed). An empty mark (`""`, White_Space only, `[]`, `{}`) is
5330
+ * settled, as absent and null are.
5328
5331
  */
5329
5332
  declare function handsOnAsProposed(element: unknown): boolean;
5330
5333
 
@@ -5828,8 +5831,8 @@ declare function renderElement<T extends OwLookupElement>(element: T, index: OwW
5828
5831
  * const reply = await account.ask({ worldId, question, context });
5829
5832
  *
5830
5833
  * It is a reader that hands a world on, so three published rules hold here, not only in
5831
- * the caller: an element marked proposed (the review profile, rules 1 and 4: any
5832
- * `x_review_proposed` but absent or null, a doubt included), one marked hidden (folder
5834
+ * the caller: an element marked proposed (the review profile, rules 1 and 4: an
5835
+ * `x_review_proposed` read as present, `handsOnAsProposed`, a doubt included), one marked hidden (folder
5833
5836
  * format §4.8: a `hidden` but absent, null or false) and a room element (the room
5834
5837
  * profile, rules 1 and 4: `isRoomElement`) are left out unless asked for, and listed in
5835
5838
  * `leftOut`. A kept proposed element carries REVIEW_PROPOSED_LABEL on its first line. A
@@ -5849,9 +5852,10 @@ declare const ASK_LIMITS: {
5849
5852
  };
5850
5853
  interface OwAskContextOptions {
5851
5854
  /**
5852
- * Send proposed elements: those whose `x_review_proposed` is anything but absent or null
5853
- * (the review profile; a value that is not a proper mark is a doubt, rule 4, and counts as
5854
- * proposed). Each one sent carries REVIEW_PROPOSED_LABEL on its first line. Default false:
5855
+ * Send proposed elements: those whose `x_review_proposed` is present (the review profile;
5856
+ * absent, null and an empty mark, `""`, White_Space only, `[]` or `{}`, are settled; a present
5857
+ * value that is not a proper mark is a doubt, rule 4, and counts as proposed). Each one sent
5858
+ * carries REVIEW_PROPOSED_LABEL on its first line. Default false:
5855
5859
  * left out and listed in `leftOut.proposed`.
5856
5860
  */
5857
5861
  includeProposed?: boolean;
package/dist/index.js CHANGED
@@ -3879,13 +3879,20 @@ var DAY = /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/;
3879
3879
  function todayDay() {
3880
3880
  return (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
3881
3881
  }
3882
+ function isPresent(v) {
3883
+ if (v === void 0 || v === null) return false;
3884
+ if (typeof v === "string") return trimWhiteSpace(v) !== "";
3885
+ if (Array.isArray(v)) return v.length > 0;
3886
+ if (typeof v === "object") return Object.keys(v).length > 0;
3887
+ return true;
3888
+ }
3882
3889
  function proposedMarkOf(element, today) {
3883
3890
  if (today !== void 0 && (typeof today !== "string" || !DAY.test(today))) {
3884
3891
  throw new TypeError(`proposedMarkOf: today is a day as YYYY-MM-DD; got ${JSON.stringify(today) ?? String(today)}.`);
3885
3892
  }
3886
3893
  if (!element || typeof element !== "object") return null;
3887
3894
  const v = element[PROPOSED_MARK];
3888
- if (!v || typeof v !== "object" || Array.isArray(v)) return null;
3895
+ if (!isPresent(v) || typeof v !== "object" || Array.isArray(v)) return null;
3889
3896
  const m = v;
3890
3897
  const by = typeof m.by === "string" && trimWhiteSpace(m.by) ? trimWhiteSpace(m.by) : null;
3891
3898
  const expires = typeof m.expires === "string" && DAY.test(trimWhiteSpace(m.expires)) ? trimWhiteSpace(m.expires) : null;
@@ -3893,8 +3900,7 @@ function proposedMarkOf(element, today) {
3893
3900
  }
3894
3901
  function handsOnAsProposed(element) {
3895
3902
  if (!element || typeof element !== "object") return false;
3896
- const v = element[PROPOSED_MARK];
3897
- return v !== void 0 && v !== null;
3903
+ return isPresent(element[PROPOSED_MARK]);
3898
3904
  }
3899
3905
 
3900
3906
  // src/message.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.102.0",
3
+ "version": "4.102.1",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {