@onlyworlds/sdk 4.142.0 → 4.143.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/CHANGELOG.md +20 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.143.0] - 2026-11-10
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- `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.
|
|
13
|
+
|
|
14
|
+
### Tests
|
|
15
|
+
|
|
16
|
+
- 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.
|
|
17
|
+
|
|
18
|
+
## [4.142.1] - 2026-11-10
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- `mintAiToken`'s `name` (at most 255) and `ai`'s `idempotencyKey` (1 to 200) are counted in code points, as the server counts them, not in UTF-16 units. A name of 255 characters outside the Basic Multilingual Plane (an emoji, say) was refused before sending, though the server takes it.
|
|
23
|
+
|
|
24
|
+
### Tests
|
|
25
|
+
|
|
26
|
+
- Both caps are held at their edge with characters above U+FFFF: 255 pass and 256 are refused for the name, 201 are refused for the key.
|
|
27
|
+
|
|
8
28
|
## [4.142.0] - 2026-11-10
|
|
9
29
|
|
|
10
30
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -6217,7 +6217,7 @@ interface OwTrailLayout {
|
|
|
6217
6217
|
nudged: number;
|
|
6218
6218
|
clamped: number;
|
|
6219
6219
|
}
|
|
6220
|
-
/** The default floors:
|
|
6220
|
+
/** 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
6221
|
declare const TRAIL_TIERS: readonly OwTrailTier[];
|
|
6222
6222
|
/** Round half to even on the number's exact value (the rounding both packages use, so they agree to the pixel). */
|
|
6223
6223
|
declare function roundHalfEven(v: number): number;
|
package/dist/index.js
CHANGED
|
@@ -2152,7 +2152,7 @@ var OwV2Client = class {
|
|
|
2152
2152
|
}
|
|
2153
2153
|
const body = aiTokenParams("mintAiToken", uses ?? null, opts.lifetimeMinutes);
|
|
2154
2154
|
if (opts.name !== void 0) {
|
|
2155
|
-
if (typeof opts.name !== "string" || opts.name.length > 255) {
|
|
2155
|
+
if (typeof opts.name !== "string" || [...opts.name].length > 255) {
|
|
2156
2156
|
throw new TypeError(`mintAiToken: name is a string of at most 255 characters, got ${JSON.stringify(opts.name)}. Nothing was sent.`);
|
|
2157
2157
|
}
|
|
2158
2158
|
body.name = opts.name;
|
|
@@ -2283,7 +2283,7 @@ var OwV2Client = class {
|
|
|
2283
2283
|
if (body === null || typeof body !== "object" || Array.isArray(body)) {
|
|
2284
2284
|
throw new TypeError(`ai: the body is the use's own object, got ${body === null ? "null" : Array.isArray(body) ? "an array" : typeof body}. Nothing was sent.`);
|
|
2285
2285
|
}
|
|
2286
|
-
if (opts.idempotencyKey !== void 0 && (typeof opts.idempotencyKey !== "string" || opts.idempotencyKey === "" || opts.idempotencyKey.length > 200)) {
|
|
2286
|
+
if (opts.idempotencyKey !== void 0 && (typeof opts.idempotencyKey !== "string" || opts.idempotencyKey === "" || [...opts.idempotencyKey].length > 200)) {
|
|
2287
2287
|
throw new TypeError(`ai: idempotencyKey is a string of 1 to 200 characters, got ${JSON.stringify(opts.idempotencyKey)}. Nothing was sent.`);
|
|
2288
2288
|
}
|
|
2289
2289
|
return this.request("POST", path, {
|
|
@@ -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("
|
|
4218
|
-
/* @__PURE__ */ tier("
|
|
4219
|
-
/* @__PURE__ */ tier("
|
|
4220
|
-
/* @__PURE__ */ tier("
|
|
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;
|