@onlyworlds/sdk 4.18.0 → 4.18.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.32.0-dist.20** (canonical 00.32.00).
3
+ **Current as of**: SDK **4.x** · schema-dist **v0.32.0-dist.23** (canonical 00.32.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
 
@@ -45,6 +45,10 @@ against live data). The v1 surface (`OnlyWorldsClient`, the `ElementType` enum)
45
45
  - Ask (since 4.13.0, account token): `buildAskContext(hits, index)` then
46
46
  `account.ask({ worldId, question, context })`; answers only from the context. 50 a day per
47
47
  account (`err.isQuotaExceeded`); `isAskUnavailable`, `isAskFailed` count nothing.
48
+ - Sort (since 4.18.0, account token): `account.sort({ worldId, notes, slice })` turns unsorted
49
+ notes (text, or a picture already uploaded into the world) into rows to review: `make`,
50
+ `add_to`, `link`, `ask`, plus `not_proposed` with reasons. Ids come only from your `slice`
51
+ (up to 100 elements your own lookup found); nothing is written. Counts as one ask.
48
52
  - Invite links (since 4.12.0): `previewJoin(code)` (no credential sent) shows who invites, to
49
53
  which world, in what role; `acceptJoin(code)` with an `ow_a_` account token joins. Bad code:
50
54
  `err.isNotFound`; `err.isAlreadyMember`, `err.isPinRequired` for the two 409s.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.18.1] — 2026-10-12
9
+
10
+ ### Changed
11
+ - **Schema repinned to schema-dist v0.32.0-dist.23** (same canonical 00.32.00). The one
12
+ generated change is the `id` doc comment: a UUID, new ids minted as uuidv7, earlier uuidv4
13
+ ids still valid. No type changes. The vendored dist gains `walk/lint_folder.py`.
14
+ - README and AGENTS.md describe `sort()`.
15
+
8
16
  ## [4.18.0] — 2026-10-12
9
17
 
10
18
  ### Added
package/README.md CHANGED
@@ -174,6 +174,14 @@ const reply = await account.ask({ worldId, question, context }); // account: a c
174
174
  reply.answer; // from those elements only, or "The world doesn't say."
175
175
  ```
176
176
 
177
+ 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. A sort counts as one question.
178
+
179
+ ```typescript
180
+ const slice = hits.slice(0, 100).map(({ element: e }) => ({ id: e.id, type: e.type, name: e.name }));
181
+ const { rows, not_proposed } = await account.sort({ worldId, notes: ['Mira moved to Ostvik.'], slice });
182
+ // rows: make (a new element), add_to (text for a field), link (one element to another), ask (which one?)
183
+ ```
184
+
177
185
  ## World files
178
186
 
179
187
  A world file is one `.zip` holding a whole world folder (`world.json` and `elements/<type>/*.json`, as Atlas keeps a world on disk), the way Atlas downloads and opens one. It needs no account and works in the browser and in Node.
package/SCHEMA.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OnlyWorlds Schema Reference
2
2
 
3
- **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.32.0-dist.20** — canonical schema **00.32.00**, published 2026-10-11.
3
+ **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.32.0-dist.23** — canonical schema **00.32.00**, published 2026-10-12.
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
@@ -6,7 +6,7 @@
6
6
  interface OwElementBase {
7
7
  /** Element type slug (server-managed, read-only). */
8
8
  type: string;
9
- /** Unique identifier for the element, uuidv7 format. */
9
+ /** Unique identifier for the element, a UUID. New ids are minted as uuidv7; ids minted earlier as uuidv4 remain valid. */
10
10
  id: string;
11
11
  /** Name of the element. */
12
12
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.18.0",
3
+ "version": "4.18.1",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {