@onlyworlds/sdk 4.152.0 → 4.154.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/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.34.0-dist.114** (canonical 00.34.00).
3
+ **Current as of**: SDK **4.x** · schema-dist **v0.34.0-dist.115** (canonical 00.34.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
 
package/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.154.0] - 2026-11-11
9
+
10
+ ### Added
11
+
12
+ - **`OwFileAddedBy.owner`**: true when the world's current owner added the file, through any door (the site, the API, or an agent with the owner's own keys; a seat the owner sponsors is the seat's, false); false for everyone else, on every file of a world with no owner, and on a past owner's files once the world has another owner. onlyworlds.com serves it on every row of `listFiles` and `worldFiles`. `membership` is null both for the owner's files and for a file whose membership no longer exists, and `owner` tells the two apart: a null `membership` with `owner` false is a former member, and such a file's `name` is "a former member" (it was an empty string for a member whose account was deleted).
13
+
14
+ ## [4.153.0] - 2026-11-11
15
+
16
+ ### Changed
17
+
18
+ - **A lens's `first_line` row carries the first line that holds something**: the description is split at every carriage return and every line feed, and its first line with something left after trimming White_Space is the row's `description`, carried as stored with its own spaces. A description with no such line (empty, blank lines, White_Space alone) gets no `description` key. 4.152.0 cut at the first line break, so a description opening with a blank line gave an empty `description`, and one of White_Space alone was carried as it stood.
19
+ - **Schema repinned to schema-dist v0.34.0-dist.115** (from dist.114; same canonical 00.34.00, no schema file moved): the lens fixture at 220 cases (ten new, all first-line rows), the charter fixture at 31 (four new), `views.json` version 3 and its 45 cases, all replayed.
20
+ - **`VIEWS.version` is `3`**, the version of `views.json` baked at this release; codegen reads version 3 only, so a build on a version 2 file stops rather than drawing a Pin by the old rule.
21
+ - **`viewOf`'s `order` draws a Pin's `element`**: a generic link is one field of the order, under its schema name and at its place (a Pin's Details: `map`, `element`, `x`, `y`, `z`), read as the two keys a served Pin carries (`element_type`, `element_id`, from the walk); it is drawn only when both are strings with something left after trimming. 4.151.0 never drew it, since no key `element` is served.
22
+
8
23
  ## [4.152.0] - 2026-11-11
9
24
 
10
25
  ### Added
package/SCHEMA.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OnlyWorlds Schema Reference
2
2
 
3
- **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.34.0-dist.114** — canonical schema **00.34.00**, published 2026-11-10.
3
+ **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.34.0-dist.115** — canonical schema **00.34.00**, published 2026-11-11.
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.
@@ -337,7 +337,7 @@ var CHARTER_PAIRS = [
337
337
  { type: "construct", supertype: "Domain", aid: "domain" }
338
338
  ];
339
339
  var VIEWS_TABLE = {
340
- "version": 2,
340
+ "version": 3,
341
341
  "banners": [
342
342
  {
343
343
  "mark": "known_of",
@@ -361,7 +361,7 @@ var VIEWS_TABLE = {
361
361
  }
362
362
  ],
363
363
  "layouts": {
364
- "document": "the fields in the row's order, each drawn once: lead open, then the rest, then fold; a field the row names in both lead and fold is drawn in the lead. The rest are the type's section fields in the schema's own order (schema/<type>.yaml: its sections as listed, and each section's fields as listed) that the row puts in neither lead nor fold. A field that holds nothing (absent, null, a string with nothing left after trimming, a list with no items, an object with no keys; a list of blank strings holds something here, whatever a banner reads of one) is not drawn: an empty lead field is skipped, and a fold whose field holds nothing draws no fold. A tool that draws empty fields to be filled draws them at their own place in this order; it never moves a field. The base fields outside every section (name, description, supertype, subtype, image_url) are the page's head, unless the row names one in lead or fold, where it is drawn, and only there. A row names only the type's base and section fields, never an extension key, and extension keys and a world's own fields are not in the order. A kind with no row is a document.",
364
+ "document": "the fields in the row's order, each drawn once: lead open, then the rest, then fold; a field the row names in both lead and fold is drawn in the lead. The rest are the type's section fields in the schema's own order (schema/<type>.yaml: its sections as listed, and each section's fields as listed) that the row puts in neither lead nor fold. A generic link (a Pin's `element`) is one field of the order, under its schema name and at its place, never its two keys as two entries: it is read as the two keys schema.json gives it (`type_key`, `id_key`), and it holds something only when both are strings with something left after trimming; one alone, or both empty, holds nothing. A field that holds nothing (absent, null, a string with nothing left after trimming, a list with no items, an object with no keys; a list of blank strings holds something here, whatever a banner reads of one) is not drawn: an empty lead field is skipped, and a fold whose field holds nothing draws no fold. A tool that draws empty fields to be filled draws them at their own place in this order; it never moves a field. The base fields outside every section (name, description, supertype, subtype, image_url) are the page's head, unless the row names one in lead or fold, where it is drawn, and only there. A row names only the type's base and section fields, never an extension key, and extension keys and a world's own fields are not in the order. A kind with no row is a document.",
365
365
  "conversation": "the element within its chain by the named link, oldest first by created_at, stopping at an id already visited; each line's own fields drawn as a document draws them"
366
366
  },
367
367
  "rows": [
@@ -450,6 +450,7 @@ var VIEWS_TABLE = {
450
450
  }
451
451
  ]
452
452
  };
453
+ var GENERIC_LINKS = { "pin": { "element": ["element_type", "element_id"] } };
453
454
  var REVIEW_PROPOSED_LABEL = "proposed, not yet reviewed";
454
455
  var MESSAGE_PAIR = { type: "narrative", supertype: "Message" };
455
456
  var MESSAGE_READ_MARK = {
@@ -1683,6 +1684,7 @@ export {
1683
1684
  ROOM_PAIRS,
1684
1685
  CHARTER_PAIRS,
1685
1686
  VIEWS_TABLE,
1687
+ GENERIC_LINKS,
1686
1688
  REVIEW_PROPOSED_LABEL,
1687
1689
  MESSAGE_PAIR,
1688
1690
  MESSAGE_READ_MARK,
package/dist/index.d.ts CHANGED
@@ -162,7 +162,7 @@ interface OwViewRow {
162
162
  }
163
163
  /** views.json without its `_meta`: the banners every page shows, the layouts, the rows. */
164
164
  interface OwViewsTable {
165
- readonly version: 2;
165
+ readonly version: 3;
166
166
  readonly banners: readonly {
167
167
  readonly mark: string;
168
168
  readonly defined_by: string;
@@ -3930,14 +3930,23 @@ interface OwUploadedImage {
3930
3930
  * picture (that is `image_url`).
3931
3931
  */
3932
3932
  type OwFileKind = 'pdf' | 'txt' | 'md' | 'json' | 'csv' | 'yaml' | 'toml' | 'zip' | 'png' | 'jpg' | 'webp' | 'avif';
3933
- /** Who added a file. */
3933
+ /**
3934
+ * Who added a file. A removed member's file keeps its membership id and name; a file whose member's account was
3935
+ * deleted keeps its membership id and is named "a former member".
3936
+ */
3934
3937
  interface OwFileAddedBy {
3935
- /** A member's or a seat's name; the owner's username for the owner's keys. */
3938
+ /** A member's or a seat's name; the owner's username for the owner's keys; "a former member" where no one is left to name. */
3936
3939
  name: string;
3937
- /** Their membership id; null for the owner's keys. */
3940
+ /** Their membership id; null for the owner's files and for a file whose membership no longer exists (`owner` tells the two apart). */
3938
3941
  membership: string | null;
3939
3942
  /** True when an agent added it: an agent seat, the MCP surface, or a key that declared an agent. */
3940
3943
  agent: boolean;
3944
+ /**
3945
+ * True when the world's current owner added the file, through any door (the site, the API, or an agent with the
3946
+ * owner's own keys; a seat the owner sponsors is the seat's, false). False for everyone else, on every file of a world
3947
+ * with no owner, and on a past owner's files once the world has another owner. Since 4.154.0.
3948
+ */
3949
+ owner: boolean;
3941
3950
  }
3942
3951
  /** One file on an element, as listFiles returns it. */
3943
3952
  interface OwFileRow {
@@ -5063,8 +5072,8 @@ declare class OwV2Client {
5063
5072
  }): Promise<OwRemovedImage>;
5064
5073
  /**
5065
5074
  * GET /{type}/{id}/files -- the element's files, newest first: each with its name, kind,
5066
- * size in bytes, label (or null), who added it (`added_by.agent` is true when an agent did)
5067
- * and when. Any key that may read the element; a file is seen by whoever may see its
5075
+ * size in bytes, label (or null), who added it (`added_by.agent` is true when an agent did,
5076
+ * `added_by.owner` when the world's current owner did) and when. Any key that may read the element; a file is seen by whoever may see its
5068
5077
  * element, and an element the key cannot see answers 404 `not_found`. Returns the rows
5069
5078
  * (keel sends them as `{ data }`, with no paging). Files never ride on the element: they
5070
5079
  * are not in its body, its `change_seq` or /changes.
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ import {
7
7
  ELEMENT_SECTIONS,
8
8
  ELEMENT_TYPES,
9
9
  FIELD_SCHEMA,
10
+ GENERIC_LINKS,
10
11
  GROUP_COLORS,
11
12
  GROUP_ORDER,
12
13
  MAP_SPACE,
@@ -44,7 +45,7 @@ import {
44
45
  trimWhiteSpace,
45
46
  typeWord,
46
47
  unknownKey
47
- } from "./chunk-TFS5P63Z.js";
48
+ } from "./chunk-YWFXL4Z6.js";
48
49
 
49
50
  // src/v2/keyed-id.ts
50
51
  var KEYED_IDS = "0199b6a0-6f0e-7c2a-9d1e-3b5c7a8e4f21";
@@ -1381,8 +1382,8 @@ var OwV2Client = class {
1381
1382
  // -- Files on elements ---------------------------------------------
1382
1383
  /**
1383
1384
  * GET /{type}/{id}/files -- the element's files, newest first: each with its name, kind,
1384
- * size in bytes, label (or null), who added it (`added_by.agent` is true when an agent did)
1385
- * and when. Any key that may read the element; a file is seen by whoever may see its
1385
+ * size in bytes, label (or null), who added it (`added_by.agent` is true when an agent did,
1386
+ * `added_by.owner` when the world's current owner did) and when. Any key that may read the element; a file is seen by whoever may see its
1386
1387
  * element, and an element the key cannot see answers 404 `not_found`. Returns the rows
1387
1388
  * (keel sends them as `{ data }`, with no paging). Files never ride on the element: they
1388
1389
  * are not in its body, its `change_seq` or /changes.
@@ -3465,8 +3466,8 @@ var Reading = class {
3465
3466
  if (typeof v === "string" && trimWhiteSpace(v) !== "") row[k] = v;
3466
3467
  }
3467
3468
  if (show === "first_line" && typeof b.description === "string") {
3468
- const cut2 = b.description.search(/[\r\n]/);
3469
- row.description = cut2 < 0 ? b.description : b.description.slice(0, cut2);
3469
+ const line = b.description.split(/[\r\n]/).find((l) => trimWhiteSpace(l) !== "");
3470
+ if (line !== void 0) row.description = line;
3470
3471
  }
3471
3472
  }
3472
3473
  if (notes !== null && own(notes, id)) row.note = notes[id];
@@ -4538,8 +4539,16 @@ function drawOrder(row, el) {
4538
4539
  const lead = row?.lead ?? [];
4539
4540
  const folds = (row?.fold ?? []).map((f) => f.field);
4540
4541
  const drawn = [];
4542
+ const generic = Object.prototype.hasOwnProperty.call(GENERIC_LINKS, slug) ? GENERIC_LINKS[slug] : {};
4543
+ const fieldHolds = (f) => {
4544
+ if (!Object.prototype.hasOwnProperty.call(generic, f)) return holds(own2(el, f));
4545
+ return generic[f].every((k) => {
4546
+ const v = own2(el, k);
4547
+ return typeof v === "string" && trimWhiteSpace(v) !== "";
4548
+ });
4549
+ };
4541
4550
  const draw = (f) => {
4542
- if (!drawn.includes(f) && holds(own2(el, f))) drawn.push(f);
4551
+ if (!drawn.includes(f) && fieldHolds(f)) drawn.push(f);
4543
4552
  };
4544
4553
  lead.forEach(draw);
4545
4554
  sections.filter((f) => !lead.includes(f) && !folds.includes(f)).forEach(draw);
package/dist/waymark.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  openersFor,
7
7
  refuseUnknownOptions,
8
8
  typeWord
9
- } from "./chunk-TFS5P63Z.js";
9
+ } from "./chunk-YWFXL4Z6.js";
10
10
 
11
11
  // src/waymark/glyphs.ts
12
12
  var MARK_PATH = "M48.8 0.0 43.8 0.4 39.0 1.2 36.0 2.0 33.2 2.9 29.3 4.5 24.8 6.8 20.6 9.5 17.0 12.4 13.6 15.7 10.4 19.4 7.8 23.1 5.8 26.6 4.5 29.3 3.3 32.1 1.8 36.8 0.8 41.2 0.1 46.3 0.0 51.1 0.4 56.2 1.2 61.0 2.0 63.9 2.9 66.8 4.5 70.7 6.8 75.2 9.5 79.4 12.4 82.9 15.7 86.3 19.4 89.5 23.1 92.1 26.6 94.2 29.3 95.5 32.1 96.7 36.8 98.2 41.2 99.2 46.3 99.8 51.1 100.0 56.2 99.6 61.0 98.8 63.9 98.0 66.8 97.1 70.7 95.5 75.2 93.2 79.4 90.4 82.9 87.6 86.3 84.3 89.5 80.5 92.1 76.9 94.2 73.4 95.5 70.7 96.7 67.9 98.2 63.2 99.2 58.7 99.8 53.7 100.0 48.8 99.6 43.8 98.6 38.4 97.1 33.2 95.5 29.3 93.2 24.8 90.4 20.6 87.6 17.0 84.3 13.6 80.5 10.4 76.9 7.8 73.4 5.8 70.7 4.5 67.9 3.3 63.2 1.8 58.7 0.8 53.7 0.1ZM77.5 80.7 74.1 83.4 70.7 85.7 67.0 87.5 64.5 88.6 64.1 88.7 65.7 86.3 67.1 83.9 68.7 80.7 69.9 77.6 72.7 78.5 73.0 78.4ZM22.5 80.7 25.6 79.0 27.3 78.3 30.0 77.6 31.3 80.7 32.8 83.9 34.2 86.3 35.9 88.7 32.9 87.5 29.3 85.7 25.8 83.4ZM51.2 74.5 55.1 74.7 59.9 75.2 64.2 76.0 67.5 76.9 66.0 80.5 64.2 84.0 62.0 87.4 59.6 90.1 55.1 90.9 52.2 91.2 51.2 91.1ZM48.7 74.5 48.8 91.1 47.7 91.2 44.9 90.9 40.3 90.1 38.2 87.8 36.3 85.0 34.2 81.2 32.5 77.0 35.8 76.0 40.5 75.2 44.5 74.7ZM91.1 51.2 91.1 52.9 90.8 56.3 90.1 59.7 89.3 62.5 88.5 64.8 87.2 67.7 85.7 70.7 83.9 73.4 82.0 75.9 79.4 78.9 76.3 77.2 73.8 76.1 76.2 68.8 77.8 62.7 78.7 56.8 79.0 51.2ZM55.8 51.2 67.7 51.2 67.6 55.1 67.2 59.0 66.7 61.5 65.7 65.0 61.0 64.2 55.7 63.6ZM32.5 51.2 44.5 51.2 44.4 63.6 39.7 64.1 34.5 65.0 33.5 61.3 32.9 58.1 32.5 54.2ZM8.8 51.2 21.0 51.2 21.0 53.3 21.4 56.6 22.7 64.0 23.8 68.4 25.0 72.1 26.6 75.9 23.7 77.2 20.6 78.9 18.5 76.7 16.5 74.1 14.8 71.5 13.4 69.1 12.1 66.3 11.0 63.6 10.1 60.5 9.4 57.3 8.9 53.5 8.8 51.3ZM36.2 27.0 39.5 27.5 44.5 28.2 44.4 48.8 32.4 48.7 32.8 44.5 33.6 39.1 35.0 32.0ZM63.9 26.9 65.2 32.1 66.6 39.2 67.4 44.8 67.7 48.7 55.8 48.8 55.7 28.1 60.5 27.5ZM74.8 23.4 76.9 22.5 79.4 21.1 82.0 24.0 84.8 27.8 86.2 30.3 87.5 32.9 88.6 35.4 89.5 38.1 90.3 41.2 90.8 44.0 91.1 47.0 91.1 48.8 79.0 48.7 78.7 44.6 78.0 39.3 76.5 31.2 74.7 23.5ZM25.5 23.5 25.5 23.7 24.5 26.8 23.7 30.2 22.4 36.6 21.5 42.5 21.1 48.7 8.8 48.8 8.8 47.0 9.2 43.7 9.8 40.8 10.5 38.1 11.5 35.2 12.4 32.9 13.8 30.2 15.2 27.8 17.9 24.0 20.6 21.1 23.1 22.5ZM64.1 11.3 67.0 12.4 70.7 14.3 74.1 16.5 77.5 19.3 75.6 20.3 73.2 21.5 70.0 22.6 68.7 19.2 67.1 16.1 65.7 13.6ZM35.9 11.3 34.2 13.6 32.8 16.1 31.3 19.2 30.0 22.5 27.9 21.9 26.4 21.3 22.5 19.3 25.8 16.5 29.3 14.3 32.9 12.4 35.4 11.4ZM51.2 8.8 52.2 8.8 55.1 9.0 59.6 9.9 61.7 12.2 64.2 16.0 66.0 19.5 67.6 23.3 64.3 24.3 59.4 25.2 56.2 25.6 51.2 25.5ZM48.8 8.8 48.7 25.5 44.2 25.6 40.6 25.2 36.4 24.5 32.4 23.2 33.9 19.5 35.7 16.0 38.2 12.2 40.3 9.9 44.9 9.0 47.7 8.8Z";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.152.0",
3
+ "version": "4.154.0",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {