@ultrst-armada/kloks 1.24.9 → 1.24.11

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,8 +1,8 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "packageName": "@ultrst-armada/kloks",
4
- "version": "1.24.9",
5
- "sourceCommit": "2c99e2a0cb282fdd6bfcb2c2be9e84f1f239ffe9",
4
+ "version": "1.24.11",
5
+ "sourceCommit": "f0c857be5ede398ceeeefebc84e8487eb1b89dc6",
6
6
  "releaseWorkflow": "npm Release",
7
- "workflowRunId": "41843163999"
7
+ "workflowRunId": "41890812661"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultrst-armada/kloks",
3
- "version": "1.24.9",
3
+ "version": "1.24.11",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -202,7 +202,7 @@
202
202
  "peerDependencies": {
203
203
  "@neondatabase/serverless": "^0.10.0 || ^1.0.0",
204
204
  "@supabase/supabase-js": "^2.45.0",
205
- "@ultrst-armada/krnl": "^1.0.9",
205
+ "@ultrst-armada/krnl": "^1.0.11",
206
206
  "react": "^18.0.0 || ^19.0.0"
207
207
  },
208
208
  "peerDependenciesMeta": {
@@ -226,7 +226,7 @@
226
226
  "@supabase/supabase-js": "^2.45.0",
227
227
  "@types/node": "^22.0.0",
228
228
  "@types/react": "^19.0.0",
229
- "@ultrst-armada/krnl": "^1.0.9",
229
+ "@ultrst-armada/krnl": "^1.0.11",
230
230
  "playwright": "^1.64.1",
231
231
  "react": "^19.0.1",
232
232
  "tsup": "^8.4.0",
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  loginSystemUser,
12
12
  resolveUserFromToken
13
- } from "../chunk-ED32WV3T.js";
13
+ } from "../chunk-SNKPYPDW.js";
14
14
  export {
15
15
  LuthAuthClient2 as CanonicalAuthClient,
16
16
  LuthAuthClient,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  LuthAuthClient,
4
4
  DEFAULT_LUTH_URL
5
- } from "@dinilmusick/gutts";
5
+ } from "@dinilmusick/gutts/auth";
6
6
  function tokenStore(initial = "") {
7
7
  let token = initial;
8
8
  return {
@@ -15,7 +15,7 @@ function tokenStore(initial = "") {
15
15
  }
16
16
  };
17
17
  }
18
- function createClient(env, token = "") {
18
+ function createClient(_env, token = "") {
19
19
  return new LuthAuthClient({
20
20
  ecosystemId: "ultrst-armada",
21
21
  applicationId: "kloks-backend",
@@ -34,6 +34,7 @@ function toSystemUser(user) {
34
34
  }
35
35
  async function loginSystemUser(email, rawPass, isAdmin, _queryDb, env) {
36
36
  if (!email?.trim() || !rawPass) return { success: false, status: 400, error: "Email and password are required" };
37
+ if (isAdmin) return { success: false, status: 403, error: "Administrative authentication is not provided by canonical Luth user login." };
37
38
  try {
38
39
  const client = createClient(env);
39
40
  await client.signInWithEmail({ email: email.trim(), password: rawPass });
@@ -42,17 +43,18 @@ async function loginSystemUser(email, rawPass, isAdmin, _queryDb, env) {
42
43
  return { success: false, status: 401, error: "Canonical authentication service did not establish a session." };
43
44
  }
44
45
  const user = toSystemUser(session.user);
45
- if (isAdmin) {
46
- return { success: false, status: 403, error: "Administrative authentication is not provided by canonical Luth user login." };
47
- }
46
+ const authorization = client.getAuthHeaders().Authorization || "";
47
+ const token = authorization.replace(/^Bearer\s+/i, "").trim();
48
+ if (!token) return { success: false, status: 502, error: "Luth did not return a usable bearer session token." };
48
49
  return {
49
50
  success: true,
50
51
  status: 200,
51
52
  user,
52
- token: session.session.token
53
+ token
53
54
  };
54
55
  } catch (error) {
55
- return { success: false, status: 503, error: error instanceof Error ? error.message : "Canonical authentication service unavailable" };
56
+ const status = error && typeof error === "object" && "status" in error && typeof error.status === "number" ? error.status : 503;
57
+ return { success: false, status, error: error instanceof Error ? error.message : "Canonical authentication service unavailable" };
56
58
  }
57
59
  }
58
60
  async function resolveUserFromToken(tokenOrUserId, _queryDb, env) {
@@ -28,7 +28,7 @@ import {
28
28
  import {
29
29
  loginSystemUser,
30
30
  resolveUserFromToken
31
- } from "./chunk-ED32WV3T.js";
31
+ } from "./chunk-SNKPYPDW.js";
32
32
  import {
33
33
  createService,
34
34
  createServiceDefinition
@@ -157,7 +157,7 @@ import {
157
157
  krnlWorkspaceGraphServiceFacade,
158
158
  krnlWorkspaceServiceDefinition,
159
159
  krnlWorkspaceServiceFacade
160
- } from "./chunk-Q7ZJSEII.js";
160
+ } from "./chunk-UC25J7E4.js";
161
161
  import {
162
162
  workspaceGraphService
163
163
  } from "./chunk-IGZB4RYT.js";
@@ -230,7 +230,7 @@ import {
230
230
  import {
231
231
  loginSystemUser,
232
232
  resolveUserFromToken
233
- } from "./chunk-ED32WV3T.js";
233
+ } from "./chunk-SNKPYPDW.js";
234
234
  import "./chunk-SXDYW3QA.js";
235
235
  import {
236
236
  DeterministicEndpointExecutor,
@@ -31,7 +31,7 @@ import {
31
31
  krnlWorkspaceGraphServiceFacade,
32
32
  krnlWorkspaceServiceDefinition,
33
33
  krnlWorkspaceServiceFacade
34
- } from "./chunk-Q7ZJSEII.js";
34
+ } from "./chunk-UC25J7E4.js";
35
35
  import "./chunk-IGZB4RYT.js";
36
36
  import "./chunk-XHADDA75.js";
37
37
  import "./chunk-SHZAQTIT.js";
@@ -40,7 +40,7 @@ import "./chunk-FZKBTF34.js";
40
40
  import "./chunk-JGUWYVOL.js";
41
41
  import "./chunk-JCMB7BIM.js";
42
42
  import "./chunk-KKRWZDMN.js";
43
- import "./chunk-ED32WV3T.js";
43
+ import "./chunk-SNKPYPDW.js";
44
44
  import "./chunk-SXDYW3QA.js";
45
45
  export {
46
46
  AuthServiceDefinition,
@@ -1,6 +1,13 @@
1
1
  import {
2
2
  DEFAULT_LUTH_URL,
3
- hydrateLuthTokenFromUrl
3
+ LuthAuthClient,
4
+ LuthAuthClient2,
5
+ LuthAuthError,
6
+ createLuthAuthClient,
7
+ createLuthAuthClient2,
8
+ hydrateLuthTokenFromUrl,
9
+ resolveClientEnvironment,
10
+ resolveClientOrigin
4
11
  } from "./chunk-B4WOPCRZ.js";
5
12
 
6
13
  // src/browserExecutionClient.ts
@@ -175,22 +182,18 @@ var OPFSWorkspaceStorage = class {
175
182
  return result;
176
183
  }
177
184
  };
178
-
179
- // src/canonicalAuthClient.ts
180
- import {
181
- LuthAuthClient,
182
- createLuthAuthClient,
183
- resolveClientOrigin,
184
- resolveClientEnvironment
185
- } from "@dinilmusick/gutts/auth";
186
- import { LuthAuthError } from "@dinilmusick/gutts/auth";
187
- import { LuthAuthClient as LuthAuthClient2 } from "@dinilmusick/gutts/auth";
188
- import { createLuthAuthClient as createLuthAuthClient2 } from "@dinilmusick/gutts/auth";
189
185
  export {
190
186
  BrowserExecutionClient,
187
+ LuthAuthClient2 as CanonicalAuthClient,
191
188
  DEFAULT_LUTH_URL,
189
+ LuthAuthClient,
190
+ LuthAuthError,
192
191
  OPFSWorkspaceStorage,
193
192
  WorkspaceAutosaveController,
194
193
  createBrowserExecutionClient,
195
- hydrateLuthTokenFromUrl
194
+ createLuthAuthClient2 as createCanonicalAuthClient,
195
+ createLuthAuthClient,
196
+ hydrateLuthTokenFromUrl,
197
+ resolveClientEnvironment,
198
+ resolveClientOrigin
196
199
  };
@@ -8,20 +8,14 @@ import {
8
8
  } from "./chunk-S22PMERU.js";
9
9
  import "./chunk-RHRXPY2U.js";
10
10
  import {
11
- AttractionEngine,
12
- GhostInferenceEngine,
13
- GhostLayoutResolver,
14
- GhostTracePathBuilder,
15
- calculateSocketCoordinates,
16
- getBeamPoints,
17
- useMagneticTraces
18
- } from "./chunk-JXDJZSFW.js";
19
- import {
20
- ConnectionRuleStore,
21
- HandleTypeRegistry,
22
- WireTypeRegistry,
23
- initializeDefaultGraphRules
24
- } from "./chunk-TZOL3RN7.js";
11
+ LifecycleCycleError,
12
+ LifecycleGraph,
13
+ SKIPO_STATE,
14
+ SkipoStateEngine,
15
+ useLifecycleScope,
16
+ useSkipoBind,
17
+ useSkipoState
18
+ } from "./chunk-EW4ACSZB.js";
25
19
  import {
26
20
  CommandApi,
27
21
  GhostStore,
@@ -36,6 +30,21 @@ import {
36
30
  CustomViewWindow,
37
31
  DEFAULT_GRAPH_SETTINGS
38
32
  } from "./chunk-KG6QYS26.js";
33
+ import {
34
+ AttractionEngine,
35
+ GhostInferenceEngine,
36
+ GhostLayoutResolver,
37
+ GhostTracePathBuilder,
38
+ calculateSocketCoordinates,
39
+ getBeamPoints,
40
+ useMagneticTraces
41
+ } from "./chunk-JXDJZSFW.js";
42
+ import {
43
+ ConnectionRuleStore,
44
+ HandleTypeRegistry,
45
+ WireTypeRegistry,
46
+ initializeDefaultGraphRules
47
+ } from "./chunk-TZOL3RN7.js";
39
48
  import {
40
49
  AutoSolidify,
41
50
  SpatialEngine,
@@ -49,15 +58,6 @@ import {
49
58
  import {
50
59
  CompatibilityMatrix
51
60
  } from "./chunk-ISFNY7EZ.js";
52
- import {
53
- LifecycleCycleError,
54
- LifecycleGraph,
55
- SKIPO_STATE,
56
- SkipoStateEngine,
57
- useLifecycleScope,
58
- useSkipoBind,
59
- useSkipoState
60
- } from "./chunk-EW4ACSZB.js";
61
61
  import "./chunk-QGM4M3NI.js";
62
62
 
63
63
  // ../../node_modules/.pnpm/@ultrst-armada+krnl@1.0.9_@types+node@22.20.5/node_modules/@ultrst-armada/krnl/packages/core/dist/index.js