@xemahq/ui-kernel 0.1.8 → 0.1.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"create-biome-orval-config.d.ts","sourceRoot":"","sources":["../../../src/lib/biome-host/create-biome-orval-config.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQhD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9C,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,6BAA6B;IAE5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAMzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAeD,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,6BAA6B,GAClC,gBAAgB,CAiBlB"}
1
+ {"version":3,"file":"create-biome-orval-config.d.ts","sourceRoot":"","sources":["../../../src/lib/biome-host/create-biome-orval-config.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQhD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9C,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,6BAA6B;IAE5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAMzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAoBD,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,6BAA6B,GAClC,gBAAgB,CAkBlB"}
@@ -12,7 +12,7 @@ function createBiomeOrvalConfig(bridge, opts) {
12
12
  };
13
13
  const orgId = bridge.auth.getOrgId();
14
14
  if (orgId) {
15
- headers['X-Org-Id'] = orgId;
15
+ headers['X-Xema-Org-Id'] = orgId;
16
16
  }
17
17
  return headers;
18
18
  },
@@ -1 +1 @@
1
- {"version":3,"file":"create-biome-orval-config.js","sourceRoot":"","sources":["../../../src/lib/biome-host/create-biome-orval-config.ts"],"names":[],"mappings":";;AAuDA,wDAoBC;AApBD,SAAgB,sBAAsB,CACpC,MAAkB,EAClB,IAAmC;IAEnC,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,CAAC;QAChC,YAAY,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE;QAClD,UAAU,EAAE,KAAK,IAAI,EAAE;YACrB,MAAM,OAAO,GAA2B;gBACtC,kBAAkB,EAAE,MAAM,CAAC,UAAU,EAAE;aACxC,CAAC;YACF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,IAAI,KAAK,EAAE,CAAC;gBACV,OAAO,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;YAC9B,CAAC;YACD,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,cAAc,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE;KACnD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"create-biome-orval-config.js","sourceRoot":"","sources":["../../../src/lib/biome-host/create-biome-orval-config.ts"],"names":[],"mappings":";;AA4DA,wDAqBC;AArBD,SAAgB,sBAAsB,CACpC,MAAkB,EAClB,IAAmC;IAEnC,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,CAAC;QAChC,YAAY,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE;QAClD,UAAU,EAAE,KAAK,IAAI,EAAE;YACrB,MAAM,OAAO,GAA2B;gBACtC,kBAAkB,EAAE,MAAM,CAAC,UAAU,EAAE;aACxC,CAAC;YACF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,IAAI,KAAK,EAAE,CAAC;gBAEV,OAAO,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;YACnC,CAAC;YACD,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,cAAc,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE;KACnD,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xemahq/ui-kernel",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Host-framework-agnostic UI kernel for the Xema OS. Defines the SystemBus orchestration contract (capability.invoke, cross-biome intents, command palette, xema:// deeplinks, window manager) AND the biome-host contract surface (FrontendBiome/FrontendBiomeFactory, HostBridge, the singleton biomeRegistry, session contributions) that every frontend biome composes against. No Vite, Next.js, or React-Router — React itself IS allowed as the shared component model (the contracts traffic in ReactNode/ComponentType and a React context). Concrete host adapters (router/auth/toast wiring) live in separate packages that consume this kernel. The SystemBus is pure orchestration: it never authorizes, the backend capability-router enforces all policy.",
5
5
  "keywords": [
6
6
  "xema",
@@ -44,9 +44,14 @@ export interface CreateBiomeOrvalConfigOptions {
44
44
  * Build an Orval client config from a `HostBridge`. Wires:
45
45
  * - `getAuthToken` → `bridge.auth.ensureFreshToken()` (proactive refresh;
46
46
  * the host owns the refresh + login-redirect single-flight).
47
- * - `getHeaders` → a fresh `X-Correlation-Id` per call, plus `X-Org-Id` when
48
- * an org is selected. Per-call headers set by the caller still win in the
49
- * client's own header merge.
47
+ * - `getHeaders` → a fresh `X-Correlation-Id` per call, plus `X-Xema-Org-Id`
48
+ * (the canonical Xema-platform tenant header every platform service reads
49
+ * via `RequestContext`) when an org is selected. Biome web clients only ever
50
+ * call Xema-platform biome-apis, so this is the single correct tenant
51
+ * header; the previously-sent legacy `X-Org-Id` was dead (the central
52
+ * read-side was decommissioned) and left context-derived reads without an
53
+ * org. Per-call headers set by the caller still win in the client's own
54
+ * header merge.
50
55
  * - `onUnauthorized` → `bridge.auth.onUnauthorized()` (host force-refresh +
51
56
  * redirect-on-failure).
52
57
  *
@@ -67,7 +72,8 @@ export function createBiomeOrvalConfig(
67
72
  };
68
73
  const orgId = bridge.auth.getOrgId();
69
74
  if (orgId) {
70
- headers['X-Org-Id'] = orgId;
75
+ // Canonical header read by every Xema-platform service's RequestContext.
76
+ headers['X-Xema-Org-Id'] = orgId;
71
77
  }
72
78
  return headers;
73
79
  },