@onlyworlds/sdk 4.142.1 → 4.144.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.110** (canonical 00.34.00).
3
+ **Current as of**: SDK **4.x** · schema-dist **v0.34.0-dist.111** (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,30 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.144.0] - 2026-11-10
9
+
10
+ ### Added
11
+
12
+ - `OwAiUse.can_pay`: true when a call by this account would be paid now, by the same check the call runs (`on`, the server's daily cap, today's token rating against `rating_need`, or a saved AI key that runs the use). Offer a use only when it is true. The server's fifth use, `lens` (a lens proposed from a sentence, served switched off), is called through `ai('lens', { world_id, sentence })` and answers as served; it is not typed yet.
13
+
14
+ ### Changed
15
+
16
+ - Schema repinned to schema-dist v0.34.0-dist.111 (canonical 00.34.00 unchanged, no schema file moved): the map-space fixture gains four layout cases, 21 in all: an id above U+FFFF beside one in U+E000..U+FFFF, a repeated Pin id where the last row wins, a Pin row without a string id, and a Map row without a string id; the page says reading H holds for the Map row too. `layoutOf` already answered all four.
17
+
18
+ ### Tests
19
+
20
+ - The layout cases are replayed by their `map` id, or, for a Map row with no string id, at each position the case's `map_index` lists, the answer the case's `want` for each; a case with neither fails by name. The count is held at 21.
21
+
22
+ ## [4.143.0] - 2026-11-10
23
+
24
+ ### Changed
25
+
26
+ - `TRAIL_TIERS`, `trailByPlace`'s default floors: each default tier is named by its own kinds: `location, object, zone` at 0, `character, collective, creature, species` at 240, `event` at 480, and the other eleven kinds at 720. The heights and the kinds are unchanged, so every point is the same; what moves is the text a tier's name reaches, each hanging Pin's `by` (`tier event; 3 of 7 on the spiral round it`) and the recipe's `settings.tiers`. The old names were group names for sets of kinds that no source holds. A caller that passes its own `tiers` sees no change.
27
+
28
+ ### Tests
29
+
30
+ - The shared trail fixture moves with it (the same bytes in both packages, its sha held in each); its main input passes these tiers, and the hero case runs on the default.
31
+
8
32
  ## [4.142.1] - 2026-11-10
9
33
 
10
34
  ### Fixed
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.110** — canonical schema **00.34.00**, published 2026-11-10.
3
+ **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.34.0-dist.111** — canonical schema **00.34.00**, published 2026-11-10.
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
@@ -3166,6 +3166,10 @@ interface OwAiUse {
3166
3166
  /** False while the use is switched off or has spent its own budget for today (its calls answer 503
3167
3167
  * `ask_unavailable` with param `use`). */
3168
3168
  on: boolean;
3169
+ /** True when a call by this account would be paid now, by the same check the call runs: `on`, the server's daily
3170
+ * cap not reached, and today's token rating holding `rating_need` (or, with the rating spent, a saved AI key that
3171
+ * runs this use). Offer the use only when this is true. Served since 2026-11-10. */
3172
+ can_pay: boolean;
3169
3173
  [k: string]: unknown;
3170
3174
  }
3171
3175
  /** What every answer of an AI use adds to the use's own answer. */
@@ -6217,7 +6221,7 @@ interface OwTrailLayout {
6217
6221
  nudged: number;
6218
6222
  clamped: number;
6219
6223
  }
6220
- /** The default floors: places and things on the ground, the living above, what happened higher, what is told highest. */
6224
+ /** The default floors, each named by its own kinds: location, object and zone on the ground; character, collective, creature and species at 240; event at 480; the other eleven kinds at 720. */
6221
6225
  declare const TRAIL_TIERS: readonly OwTrailTier[];
6222
6226
  /** Round half to even on the number's exact value (the rounding both packages use, so they agree to the pixel). */
6223
6227
  declare function roundHalfEven(v: number): number;
package/dist/index.js CHANGED
@@ -4214,10 +4214,10 @@ function layoutOf(map, maps, pins) {
4214
4214
  // src/layout-trail.ts
4215
4215
  var tier = (name, z, kinds) => /* @__PURE__ */ Object.freeze({ name, z, kinds: /* @__PURE__ */ Object.freeze(kinds) });
4216
4216
  var TRAIL_TIERS = /* @__PURE__ */ Object.freeze([
4217
- /* @__PURE__ */ tier("ground: places and things", 0, ["location", "object", "zone"]),
4218
- /* @__PURE__ */ tier("people and the living", 240, ["character", "collective", "creature", "species"]),
4219
- /* @__PURE__ */ tier("what happened", 480, ["event"]),
4220
- /* @__PURE__ */ tier("told or abstract", 720, ["ability", "construct", "family", "institution", "language", "law", "narrative", "phenomenon", "relation", "title", "trait"])
4217
+ /* @__PURE__ */ tier("location, object, zone", 0, ["location", "object", "zone"]),
4218
+ /* @__PURE__ */ tier("character, collective, creature, species", 240, ["character", "collective", "creature", "species"]),
4219
+ /* @__PURE__ */ tier("event", 480, ["event"]),
4220
+ /* @__PURE__ */ tier("ability, construct, family, institution, language, law, narrative, phenomenon, relation, title, trait", 720, ["ability", "construct", "family", "institution", "language", "law", "narrative", "phenomenon", "relation", "title", "trait"])
4221
4221
  ]);
4222
4222
  var DEFAULT_SPIRAL = { r0: 140, c: 20, angle: 2.399963 };
4223
4223
  var DEFAULT_PARENT_RING = 140;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.142.1",
3
+ "version": "4.144.0",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {