@onlyworlds/sdk 4.15.0 → 4.17.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 +23 -0
- package/dist/index.d.ts +14 -3
- package/dist/index.js +8 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,29 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.17.0] — 2026-10-12
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **`changesAll` returns `epoch`** beside `cursor` and `head`: the last page's, so a full walk
|
|
12
|
+
says which view epoch it ran under (a guest's integer; `null` for other keys or a keel
|
|
13
|
+
without the field) and the first poll after it needs no extra walk to learn it. Live on
|
|
14
|
+
Moppetopia: a full walk of 465 changes returns `{ cursor, head: 818, epoch: null }`. The first
|
|
15
|
+
tests of `changesAll`'s return value (Temper, h29 #3534).
|
|
16
|
+
|
|
17
|
+
## [4.16.0] — 2026-10-12
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- **`epoch` on the feed** (keel 979eb0c). `OwChangesPage.epoch` and `changesHead()`'s
|
|
21
|
+
`epoch`: a guest's view epoch (an integer), `null` for every other key. It moves when what a
|
|
22
|
+
guest may see changes, even with `head` unchanged, so a poll walks when either `head` or
|
|
23
|
+
`epoch` moved; nothing needs to read inside the cursor. `changesHead()` answers
|
|
24
|
+
`epoch: null` from a keel without the field. Checked live on Moppetopia (the head read and a
|
|
25
|
+
page both carry `epoch: null`). The wire gate now holds `OwChangesPage` and `OwBulkResponse`
|
|
26
|
+
to keel's `ChangesPage` and `BulkResult` (keel #108), and failed on 4.15.0 for the missing
|
|
27
|
+
`epoch` before this release.
|
|
28
|
+
Published from tag `v4.16.0`; the workflow's read-back gave up before npm showed the
|
|
29
|
+
version, so the tarball (shasum `d08de22b`) was read back by hand against a build of the tag.
|
|
30
|
+
|
|
8
31
|
## [4.15.0] — 2026-10-12
|
|
9
32
|
|
|
10
33
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -1901,6 +1901,12 @@ interface OwChangesPage {
|
|
|
1901
1901
|
* instead of assuming caught-up.
|
|
1902
1902
|
*/
|
|
1903
1903
|
head: number;
|
|
1904
|
+
/**
|
|
1905
|
+
* A guest's view epoch (an integer), null for every other key. It moves when what the
|
|
1906
|
+
* guest may see changes, even with `head` unchanged (a Character given or taken, a role):
|
|
1907
|
+
* walk again on either move. Compare it, never read it out of the cursor (keel, 2026-10-12).
|
|
1908
|
+
*/
|
|
1909
|
+
epoch: number | null;
|
|
1904
1910
|
}
|
|
1905
1911
|
interface OwBulkItem {
|
|
1906
1912
|
type: ElementType | string;
|
|
@@ -2369,21 +2375,26 @@ declare class OwV2Client {
|
|
|
2369
2375
|
* re-sends nothing at the head (a guest's carries its view's epoch). The cheap "anything
|
|
2370
2376
|
* new?" for a poll: compare `head` with the head you last APPLIED (not the previous
|
|
2371
2377
|
* poll's, so a missed tick never drops a change) and walk changesAll only when it moved;
|
|
2372
|
-
* a head below yours means the server rewound: walk again from zero.
|
|
2373
|
-
*
|
|
2378
|
+
* a head below yours means the server rewound: walk again from zero. `epoch` is a
|
|
2379
|
+
* guest's view epoch (null for other keys): it can move with `head` unchanged, so walk on
|
|
2380
|
+
* either move. keel returns the owner's cursor as a number; it is handed back as a
|
|
2381
|
+
* string, like every cursor here.
|
|
2374
2382
|
*/
|
|
2375
2383
|
changesHead(): Promise<{
|
|
2376
2384
|
head: number;
|
|
2377
2385
|
cursor: string;
|
|
2386
|
+
epoch: number | null;
|
|
2378
2387
|
}>;
|
|
2379
2388
|
/**
|
|
2380
2389
|
* Walk the feed from `since` (or from zero = full export) to the current
|
|
2381
2390
|
* tail, yielding ops in order. Returns the final cursor via the generator's
|
|
2382
|
-
* return value; persist it for the next incremental pull
|
|
2391
|
+
* return value; persist it for the next incremental pull (with the last page's
|
|
2392
|
+
* `head` and `epoch`: the view epoch the walk ran under, for a guest).
|
|
2383
2393
|
*/
|
|
2384
2394
|
changesAll(since?: string): AsyncGenerator<OwChange, {
|
|
2385
2395
|
cursor: string;
|
|
2386
2396
|
head: number;
|
|
2397
|
+
epoch: number | null;
|
|
2387
2398
|
}>;
|
|
2388
2399
|
/**
|
|
2389
2400
|
* POST /media/ticket -- permission to upload ONE image into this world (a write
|
package/dist/index.js
CHANGED
|
@@ -335,17 +335,20 @@ var OwV2Client = class {
|
|
|
335
335
|
* re-sends nothing at the head (a guest's carries its view's epoch). The cheap "anything
|
|
336
336
|
* new?" for a poll: compare `head` with the head you last APPLIED (not the previous
|
|
337
337
|
* poll's, so a missed tick never drops a change) and walk changesAll only when it moved;
|
|
338
|
-
* a head below yours means the server rewound: walk again from zero.
|
|
339
|
-
*
|
|
338
|
+
* a head below yours means the server rewound: walk again from zero. `epoch` is a
|
|
339
|
+
* guest's view epoch (null for other keys): it can move with `head` unchanged, so walk on
|
|
340
|
+
* either move. keel returns the owner's cursor as a number; it is handed back as a
|
|
341
|
+
* string, like every cursor here.
|
|
340
342
|
*/
|
|
341
343
|
async changesHead() {
|
|
342
344
|
const page = await this.request("GET", "/changes/", { query: buildQuery({ head: "true" }) });
|
|
343
|
-
return { head: page.head, cursor: String(page.cursor) };
|
|
345
|
+
return { head: page.head, cursor: String(page.cursor), epoch: page.epoch ?? null };
|
|
344
346
|
}
|
|
345
347
|
/**
|
|
346
348
|
* Walk the feed from `since` (or from zero = full export) to the current
|
|
347
349
|
* tail, yielding ops in order. Returns the final cursor via the generator's
|
|
348
|
-
* return value; persist it for the next incremental pull
|
|
350
|
+
* return value; persist it for the next incremental pull (with the last page's
|
|
351
|
+
* `head` and `epoch`: the view epoch the walk ran under, for a guest).
|
|
349
352
|
*/
|
|
350
353
|
async *changesAll(since) {
|
|
351
354
|
let cursor = since;
|
|
@@ -355,7 +358,7 @@ var OwV2Client = class {
|
|
|
355
358
|
for (const op of page.changes) yield op;
|
|
356
359
|
cursor = page.cursor;
|
|
357
360
|
} while (page.has_more);
|
|
358
|
-
return { cursor: page.cursor, head: page.head };
|
|
361
|
+
return { cursor: page.cursor, head: page.head, epoch: page.epoch ?? null };
|
|
359
362
|
}
|
|
360
363
|
// -- Images ---------------------------------------------------------------
|
|
361
364
|
/**
|