@rljson/rljson 0.0.87 → 0.0.89

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.
@@ -624,16 +624,21 @@ only when the corresponding `SyncConfig` flags are set.
624
624
 
625
625
  The payload transmitted on the wire between Connector and Server:
626
626
 
627
- | Field | Type | Concept | Purpose |
628
- | ------- | ----------------------- | ----------------- | ------------------------------------- |
629
- | `r` | `string` | existing | The ref being announced |
630
- | `o` | `string` | existing | Ephemeral origin for self-echo filter |
631
- | `c` | `ClientId` | Client identity | Stable client id across reconnections |
632
- | `t` | `number` | Client identity | Client-side wall-clock timestamp (ms) |
633
- | `seq` | `number` | Predecessor chain | Monotonic counter per (client, route) |
634
- | `p` | `InsertHistoryTimeId[]` | Predecessor chain | Causal predecessor timeIds |
635
- | `cksum` | `string` | Acknowledgment | Content checksum for ACK verification |
636
- | `stamp` | `RefStamp` | Hub order | Where a stamping hub placed the ref |
627
+ | Field | Type | Concept | Purpose |
628
+ | ------- | ----------------------- | ----------------- | -------------------------------------- |
629
+ | `r` | `string` | existing | The ref being announced |
630
+ | `o` | `string` | existing | Ephemeral origin for self-echo filter |
631
+ | `c` | `ClientId` | Client identity | Stable client id across reconnections |
632
+ | `t` | `number` | Client identity | Client-side wall-clock timestamp (ms) |
633
+ | `seq` | `number` | Predecessor chain | Monotonic counter per (client, route) |
634
+ | `p` | `InsertHistoryTimeId[]` | Predecessor chain | Causal predecessor timeIds |
635
+ | `cksum` | `string` | Acknowledgment | Content checksum for ACK verification |
636
+ | `stamp` | `RefStamp` | Hub order | Where a stamping hub placed the ref |
637
+ | `src` | `string` | Source node | Node to read the ref's data from first |
638
+
639
+ `src` is set by the relaying hub, never by the sender: the node id of the
640
+ client it received the ref from, or nothing when it does not know that node.
641
+ It is a hint for readers; the hub can always serve the data.
637
642
 
638
643
  ### AckPayload
639
644
 
package/README.blog.md CHANGED
@@ -1,3 +1,8 @@
1
1
  # Blog
2
2
 
3
3
  Add latest posts at the end.
4
+
5
+ ## 2026-11-02 — ConnectorPayload names its source
6
+
7
+ - `ConnectorPayload.src`: the node a relayed ref came from, set by the relaying hub
8
+ - Post: [doc/blog/2026/2026-11-02-connector-payload-names-its-source.md](doc/blog/2026/2026-11-02-connector-payload-names-its-source.md), German: [doc/de/blog/2026/2026-11-02-connector-payload-names-its-source.md](doc/de/blog/2026/2026-11-02-connector-payload-names-its-source.md)
package/README.public.md CHANGED
@@ -285,9 +285,14 @@ const enriched: ConnectorPayload = {
285
285
  p: ['prev-timeId'], // causal predecessors
286
286
  cksum: 'sha256:...', // content checksum
287
287
  stamp: { domain: 'office', epoch: 3, hub: 'node-7', n: 12 }, // hub order
288
+ src: 'node-3', // set by the relaying hub: the node it came from
288
289
  };
289
290
  ```
290
291
 
292
+ A hub sets `src` when it relays a ref: the node id of the client it received
293
+ the ref from. A receiver may read the ref's data from that node first; the
294
+ field is a hint, and the hub can still serve the data.
295
+
291
296
  ### AckPayload
292
297
 
293
298
  Server → Client acknowledgment that all (or some) receivers got a ref.
@@ -624,16 +624,21 @@ only when the corresponding `SyncConfig` flags are set.
624
624
 
625
625
  The payload transmitted on the wire between Connector and Server:
626
626
 
627
- | Field | Type | Concept | Purpose |
628
- | ------- | ----------------------- | ----------------- | ------------------------------------- |
629
- | `r` | `string` | existing | The ref being announced |
630
- | `o` | `string` | existing | Ephemeral origin for self-echo filter |
631
- | `c` | `ClientId` | Client identity | Stable client id across reconnections |
632
- | `t` | `number` | Client identity | Client-side wall-clock timestamp (ms) |
633
- | `seq` | `number` | Predecessor chain | Monotonic counter per (client, route) |
634
- | `p` | `InsertHistoryTimeId[]` | Predecessor chain | Causal predecessor timeIds |
635
- | `cksum` | `string` | Acknowledgment | Content checksum for ACK verification |
636
- | `stamp` | `RefStamp` | Hub order | Where a stamping hub placed the ref |
627
+ | Field | Type | Concept | Purpose |
628
+ | ------- | ----------------------- | ----------------- | -------------------------------------- |
629
+ | `r` | `string` | existing | The ref being announced |
630
+ | `o` | `string` | existing | Ephemeral origin for self-echo filter |
631
+ | `c` | `ClientId` | Client identity | Stable client id across reconnections |
632
+ | `t` | `number` | Client identity | Client-side wall-clock timestamp (ms) |
633
+ | `seq` | `number` | Predecessor chain | Monotonic counter per (client, route) |
634
+ | `p` | `InsertHistoryTimeId[]` | Predecessor chain | Causal predecessor timeIds |
635
+ | `cksum` | `string` | Acknowledgment | Content checksum for ACK verification |
636
+ | `stamp` | `RefStamp` | Hub order | Where a stamping hub placed the ref |
637
+ | `src` | `string` | Source node | Node to read the ref's data from first |
638
+
639
+ `src` is set by the relaying hub, never by the sender: the node id of the
640
+ client it received the ref from, or nothing when it does not know that node.
641
+ It is a hint for readers; the hub can always serve the data.
637
642
 
638
643
  ### AckPayload
639
644
 
@@ -1,3 +1,8 @@
1
1
  # Blog
2
2
 
3
3
  Add latest posts at the end.
4
+
5
+ ## 2026-11-02 — ConnectorPayload names its source
6
+
7
+ - `ConnectorPayload.src`: the node a relayed ref came from, set by the relaying hub
8
+ - Post: [doc/blog/2026/2026-11-02-connector-payload-names-its-source.md](doc/blog/2026/2026-11-02-connector-payload-names-its-source.md), German: [doc/de/blog/2026/2026-11-02-connector-payload-names-its-source.md](doc/de/blog/2026/2026-11-02-connector-payload-names-its-source.md)
@@ -285,9 +285,14 @@ const enriched: ConnectorPayload = {
285
285
  p: ['prev-timeId'], // causal predecessors
286
286
  cksum: 'sha256:...', // content checksum
287
287
  stamp: { domain: 'office', epoch: 3, hub: 'node-7', n: 12 }, // hub order
288
+ src: 'node-3', // set by the relaying hub: the node it came from
288
289
  };
289
290
  ```
290
291
 
292
+ A hub sets `src` when it relays a ref: the node id of the client it received
293
+ the ref from. A receiver may read the ref's data from that node first; the
294
+ field is a hint, and the hub can still serve the data.
295
+
291
296
  ### AckPayload
292
297
 
293
298
  Server → Client acknowledgment that all (or some) receivers got a ref.
package/dist/rljson.js CHANGED
@@ -1965,7 +1965,8 @@ var connectorPayloadFullExample = () => ({
1965
1965
  epoch: 1,
1966
1966
  hub: "hub_ExAmPlE",
1967
1967
  n: 1
1968
- }
1968
+ },
1969
+ src: "node_ExAmPlE"
1969
1970
  });
1970
1971
  // src/sync/gap-fill.ts
1971
1972
  // @license
@@ -1,2 +1,2 @@
1
1
  /** The version of the `@rljson/rljson` package. */
2
- export declare const rljsonVersion = "0.0.87";
2
+ export declare const rljsonVersion = "0.0.89";
@@ -19,6 +19,7 @@ import { RefStamp } from './ref-stamp.ts';
19
19
  * | `p` | Predecessor chain | Causal predecessor timeIds |
20
20
  * | `cksum` | Acknowledgment | Content checksum for ACK verification |
21
21
  * | `stamp` | Hub order | Where a stamping hub placed the ref |
22
+ * | `src` | Source node | Node to read the ref's data from first |
22
23
  */
23
24
  export type ConnectorPayload = {
24
25
  /** The ref (InsertHistoryTimeId) being announced. */
@@ -42,6 +43,16 @@ export type ConnectorPayload = {
42
43
  * already carrying a stamp forwards it unchanged.
43
44
  */
44
45
  stamp?: RefStamp;
46
+ /**
47
+ * The node the relaying hub received the ref from, by its node id.
48
+ *
49
+ * Set by the hub when it relays the ref, never by the sender: a hub
50
+ * overwrites what arrives, and leaves the field out when it does not know
51
+ * the sending node. A receiver may read the ref's data from that node
52
+ * directly before it asks the hub. It is a hint, not a promise: the node
53
+ * may be gone or unreachable, and the hub can still serve the data.
54
+ */
55
+ src?: string;
45
56
  };
46
57
  /**
47
58
  * Returns a minimal example ConnectorPayload (backward-compatible format).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rljson/rljson",
3
- "version": "0.0.87",
3
+ "version": "0.0.89",
4
4
  "description": "The RLJSON data format specification",
5
5
  "homepage": "https://github.com/rljson/rljson",
6
6
  "bugs": "https://github.com/rljson/rljson/issues",
@@ -20,17 +20,17 @@
20
20
  ],
21
21
  "type": "module",
22
22
  "devDependencies": {
23
- "@rljson/dna-rljson": "^0.3.1",
23
+ "@rljson/dna-rljson": "^0.3.2",
24
24
  "@tssuite/helix-js": "^0.5.1",
25
25
  "@types/node": "^26.6.6",
26
26
  "@typescript-eslint/eslint-plugin": "^8.72.1",
27
27
  "@typescript-eslint/parser": "^8.72.1",
28
28
  "@vitest/coverage-v8": "^5.0.5",
29
29
  "cross-env": "^10.1.0",
30
- "eslint": "^10.13.0",
30
+ "eslint": "^10.14.0",
31
31
  "eslint-plugin-jsdoc": "^65.4.2",
32
32
  "eslint-plugin-tsdoc": "^0.5.4",
33
- "globals": "^17.13.0",
33
+ "globals": "^17.14.0",
34
34
  "jsdoc": "^4.0.5",
35
35
  "read-pkg": "^10.1.0",
36
36
  "typescript": "~6.0.3",
@@ -43,7 +43,7 @@
43
43
  "vitest-dom": "^0.1.1"
44
44
  },
45
45
  "dependencies": {
46
- "@rljson/hash": "0.0.20",
46
+ "@rljson/hash": "0.0.21",
47
47
  "@rljson/json": "0.0.23",
48
48
  "nanoid": "^6.0.2"
49
49
  },