@hadoku/service-kernel 0.1.90 → 0.1.92

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.
@@ -21,10 +21,11 @@ import type { NextFunction, Request, Response } from 'express';
21
21
  /**
22
22
  * The platform tier ladder, complete. `wife` sits above `service` and below
23
23
  * `admin` deliberately: full reach across the apps, none of the
24
- * credential-management surface. `member` is a self-signed-up account: a
25
- * passkey and a name, no key anyone handed out.
24
+ * credential-management surface. `guest` is an account a visitor made
25
+ * themselves (or the edge made on arrival): a passkey and a name, no key
26
+ * anyone handed out. `member` is a guest the operator has verified.
26
27
  */
27
- export declare const TIER_ORDER: readonly ["public", "member", "friend", "service", "wife", "admin"];
28
+ export declare const TIER_ORDER: readonly ["public", "guest", "member", "friend", "service", "wife", "admin"];
28
29
  export type Tier = (typeof TIER_ORDER)[number];
29
30
  export interface AssertFloorOptions {
30
31
  /** Named in the refusal message, e.g. `CARDTABLE` for `CARDTABLE_MIN_TIER=…`. */
@@ -80,7 +81,8 @@ export declare function createEdgeAuth(config: EdgeAuthConfig): EdgeAuth;
80
81
  * The caller's tier as the app's headers carry it, except that a verified
81
82
  * member IS a friend here: an app that admits members alongside the tiers it
82
83
  * hands out may choose to treat its own verification the same as a vouch.
83
- * Never above friend: admin stays admin's. Pure — only `sanitizeHeaders`
84
+ * Never above friend: admin stays admin's, and a guest is never promoted, flag
85
+ * or not (only a `member` with the flag is). Pure — only `sanitizeHeaders`
84
86
  * decides whether a header is trustworthy in the first place.
85
87
  */
86
88
  export declare function tierOf(req: Request): string;
@@ -19,10 +19,11 @@
19
19
  /**
20
20
  * The platform tier ladder, complete. `wife` sits above `service` and below
21
21
  * `admin` deliberately: full reach across the apps, none of the
22
- * credential-management surface. `member` is a self-signed-up account: a
23
- * passkey and a name, no key anyone handed out.
22
+ * credential-management surface. `guest` is an account a visitor made
23
+ * themselves (or the edge made on arrival): a passkey and a name, no key
24
+ * anyone handed out. `member` is a guest the operator has verified.
24
25
  */
25
- export const TIER_ORDER = ['public', 'member', 'friend', 'service', 'wife', 'admin'];
26
+ export const TIER_ORDER = ['public', 'guest', 'member', 'friend', 'service', 'wife', 'admin'];
26
27
  /**
27
28
  * The floor must be a tier this build knows. An unknown name ranks as public
28
29
  * in {@link rankOf}, so a floor this build has not heard of would silently
@@ -121,7 +122,8 @@ export function createEdgeAuth(config) {
121
122
  * The caller's tier as the app's headers carry it, except that a verified
122
123
  * member IS a friend here: an app that admits members alongside the tiers it
123
124
  * hands out may choose to treat its own verification the same as a vouch.
124
- * Never above friend: admin stays admin's. Pure — only `sanitizeHeaders`
125
+ * Never above friend: admin stays admin's, and a guest is never promoted, flag
126
+ * or not (only a `member` with the flag is). Pure — only `sanitizeHeaders`
125
127
  * decides whether a header is trustworthy in the first place.
126
128
  */
127
129
  export function tierOf(req) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hadoku/service-kernel",
3
- "version": "0.1.90",
4
- "gitHead": "0166283dfda9b0764316999e9c07fb00acce23e9",
3
+ "version": "0.1.92",
4
+ "gitHead": "07d65472edbda130769e4eb22c105b7c2d806bb6",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "description": "The server parts any game keeps: edge auth and the tier gate, base path and bundle check, health and the busy probe, lifecycle, the JSON logger, the state directory, telemetry and capacity, per-caller limits, the browser relays, the erase registry, and createGameServer, which boots a game from its config and plugins. Knows no game; the app binds its service id, prefix and env names. MIT; imports only node built-ins, express, socket.io and @wolffm/*.",
@@ -56,8 +56,8 @@
56
56
  }
57
57
  },
58
58
  "dependencies": {
59
- "@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.116",
60
- "@wolffm/rooms-server": "npm:@hadoku/rooms-server@^0.45.116",
59
+ "@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.117",
60
+ "@wolffm/rooms-server": "npm:@hadoku/rooms-server@^0.45.117",
61
61
  "express": "^5.1.0",
62
62
  "socket.io": "^4.8.3"
63
63
  },