@rindle/affinity 0.7.8 → 0.7.10
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/README.md +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +3 -3
package/README.md
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
The TypeScript twin of the `rindle-affinity` Rust crate: mint and verify the **follower-affinity
|
|
4
4
|
ticket** — the HMAC-signed placement token that pins a browser session to one follower machine so
|
|
5
5
|
its live-query ws stream and its api-server-issued lease co-locate. Used by the local dev-edge and
|
|
6
|
-
any JS-side verify;
|
|
6
|
+
any JS-side verify; the native fleet edge mints and verifies in production.
|
|
7
7
|
|
|
8
8
|
A ticket is `aff.<base64url(payload)>.<base64url(hmac_sha256(base64url(payload), key))>`. `mint` here
|
|
9
9
|
is **byte-for-byte identical** to the crate for the same input (pinned by a shared frozen test
|
|
10
10
|
vector), so a Rust-minted ticket verifies here and vice-versa. It is **placement, not
|
|
11
11
|
authorization**: a forged ticket only aims a connection at a machine, granting no data access.
|
|
12
12
|
|
|
13
|
-
Full docs — regional followers and
|
|
13
|
+
Full docs — regional followers and fleet-edge routing:
|
|
14
14
|
**[rindle.sh/docs/cloud-scaling](https://rindle.sh/docs/cloud-scaling)** · for agents:
|
|
15
15
|
[llms.txt](https://rindle.sh/llms.txt)
|
|
16
16
|
|
package/dist/index.d.ts
CHANGED
|
@@ -9,11 +9,11 @@ export declare const HEADER_NAME = "Rindle-Affinity";
|
|
|
9
9
|
* JSON that gets base64url-encoded and signed, so it must match the Rust `Payload` struct order.
|
|
10
10
|
*/
|
|
11
11
|
export interface Payload {
|
|
12
|
-
/**
|
|
12
|
+
/** App id the ticket is scoped to. */
|
|
13
13
|
app: string;
|
|
14
|
-
/**
|
|
14
|
+
/** Placement target id. */
|
|
15
15
|
mid: string;
|
|
16
|
-
/**
|
|
16
|
+
/** Region code of `mid`. */
|
|
17
17
|
region: string;
|
|
18
18
|
/** Subject: the connection identity (clientInstanceId). */
|
|
19
19
|
sub: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkBA,0EAA0E;AAC1E,eAAO,MAAM,aAAa,QAAQ,CAAC;AAEnC,qGAAqG;AACrG,eAAO,MAAM,cAAc,cAAc,CAAC;AAE1C,sGAAsG;AACtG,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkBA,0EAA0E;AAC1E,eAAO,MAAM,aAAa,QAAQ,CAAC;AAEnC,qGAAqG;AACrG,eAAO,MAAM,cAAc,cAAc,CAAC;AAE1C,sGAAsG;AACtG,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC;IACZ,+CAA+C;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,+DAA+D;IAC/D,GAAG,EAAE,MAAM,CAAC;IACZ,uEAAuE;IACvE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,4EAA4E;AAC5E,MAAM,WAAW,MAAM;IACrB,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ,gEAAgE;IAChE,GAAG,EAAE,MAAM,CAAC;IACZ,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,oGAAoG;AACpG,MAAM,MAAM,WAAW,GACnB,WAAW,GACX,eAAe,GACf,WAAW,GACX,SAAS,GACT,kBAAkB,CAAC;AAEvB,uEAAuE;AACvE,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAChD;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAA;CAAE,CAAC;AAExD,KAAK,GAAG,GAAG,MAAM,GAAG,UAAU,CAAC;AAY/B;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,MAAM,CAavD;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAoBxF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMjE;AAED,sGAAsG;AACtG,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,+FAA+F;AAC/F,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGzD"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -30,11 +30,11 @@ export const HEADER_NAME = "Rindle-Affinity";
|
|
|
30
30
|
* JSON that gets base64url-encoded and signed, so it must match the Rust `Payload` struct order.
|
|
31
31
|
*/
|
|
32
32
|
export interface Payload {
|
|
33
|
-
/**
|
|
33
|
+
/** App id the ticket is scoped to. */
|
|
34
34
|
app: string;
|
|
35
|
-
/**
|
|
35
|
+
/** Placement target id. */
|
|
36
36
|
mid: string;
|
|
37
|
-
/**
|
|
37
|
+
/** Region code of `mid`. */
|
|
38
38
|
region: string;
|
|
39
39
|
/** Subject: the connection identity (clientInstanceId). */
|
|
40
40
|
sub: string;
|