@onlyworlds/sdk 4.15.0 → 4.16.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 +12 -0
- package/dist/index.d.ts +11 -2
- package/dist/index.js +5 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.16.0] — 2026-10-12
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **`epoch` on the feed** (keel 979eb0c). `OwChangesPage.epoch` and `changesHead()`'s
|
|
12
|
+
`epoch`: a guest's view epoch (an integer), `null` for every other key. It moves when what a
|
|
13
|
+
guest may see changes, even with `head` unchanged, so a poll walks when either `head` or
|
|
14
|
+
`epoch` moved; nothing needs to read inside the cursor. `changesHead()` answers
|
|
15
|
+
`epoch: null` from a keel without the field. Checked live on Moppetopia (the head read and a
|
|
16
|
+
page both carry `epoch: null`). The wire gate now holds `OwChangesPage` and `OwBulkResponse`
|
|
17
|
+
to keel's `ChangesPage` and `BulkResult` (keel #108), and failed on 4.15.0 for the missing
|
|
18
|
+
`epoch` before this release.
|
|
19
|
+
|
|
8
20
|
## [4.15.0] — 2026-10-12
|
|
9
21
|
|
|
10
22
|
### 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,12 +2375,15 @@ 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
|
package/dist/index.js
CHANGED
|
@@ -335,12 +335,14 @@ 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
|