@zhin.js/host-http 1.0.16 → 1.1.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/README.md CHANGED
@@ -17,6 +17,7 @@ until snapshot commit and retired routes stop matching immediately while their l
17
17
  - Path-scoped WebSocket upgrades (`ws(path)`)
18
18
  - HTTP `route(method, path, handler, meta?)` (exact + `/*` prefix)
19
19
  - Built-in `GET /pub/health` and `GET /pub/openapi.json`
20
+ - CLI-composed runtimes additionally expose `GET /pub/ready` and full-scope `GET /api/system/readiness`; see [production probes](../../../docs/operations/production.md).
20
21
  - CORS allowlist (always includes `https://console.zhin.dev`)
21
22
  - Optional Bearer auth for `/api/*` when `http.token` / `http.tokens` are set (ADR 0016 scopes)
22
23
  - WebSocket upgrade auth (Authorization or `?token=`); demo scope limited to `/sandbox`
@@ -59,6 +59,8 @@ export type RuntimeConsoleRpcContext = {
59
59
  agents: Readonly<Record<string, unknown>>;
60
60
  workrooms: Readonly<Record<string, unknown>>;
61
61
  revision: string;
62
+ /** Principal bound to the authenticated Console token, never caller supplied. */
63
+ principalId?: string;
62
64
  }>>;
63
65
  setWorkroomCatalog?(workrooms: unknown, expectedRevision: string): Promise<Readonly<{
64
66
  revision: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/host-http",
3
- "version": "1.0.16",
3
+ "version": "1.1.0",
4
4
  "description": "Minimal HTTP and WebSocket host for Plugin Runtime (no Koa)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -18,10 +18,10 @@
18
18
  ],
19
19
  "dependencies": {
20
20
  "ws": "^8.21.1",
21
- "@zhin.js/console-protocol": "1.1.4",
22
- "@zhin.js/host-http-contract": "1.0.1",
23
- "@zhin.js/logger": "1.0.77",
24
- "@zhin.js/plugin-runtime": "1.1.8"
21
+ "@zhin.js/console-protocol": "1.1.5",
22
+ "@zhin.js/host-http-contract": "1.1.0",
23
+ "@zhin.js/logger": "1.1.0",
24
+ "@zhin.js/plugin-runtime": "1.1.9"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^26.1.2",
@@ -91,6 +91,8 @@ export type RuntimeConsoleRpcContext = {
91
91
  agents: Readonly<Record<string, unknown>>;
92
92
  workrooms: Readonly<Record<string, unknown>>;
93
93
  revision: string;
94
+ /** Principal bound to the authenticated Console token, never caller supplied. */
95
+ principalId?: string;
94
96
  }>>;
95
97
  setWorkroomCatalog?(
96
98
  workrooms: unknown,