@ultrst-armada/kloks 1.24.8 → 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.8",
5
- "sourceCommit": "0c38ca219c308720b6f3638f0ca01a4a9c15104e",
4
+ "version": "1.24.11",
5
+ "sourceCommit": "f0c857be5ede398ceeeefebc84e8487eb1b89dc6",
6
6
  "releaseWorkflow": "npm Release",
7
- "workflowRunId": "41838334372"
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.8",
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) {
@@ -1,10 +1,16 @@
1
1
  import {
2
2
  workspaceGraphService
3
- } from "./chunk-R6ZNF6FW.js";
3
+ } from "./chunk-IGZB4RYT.js";
4
4
  import {
5
5
  getSrklAccounts,
6
6
  srklListBackblazeBuckets
7
7
  } from "./chunk-XHADDA75.js";
8
+ import {
9
+ StorageAdapterFactory
10
+ } from "./chunk-SHZAQTIT.js";
11
+ import {
12
+ b2ListBuckets
13
+ } from "./chunk-4QEMALXF.js";
8
14
  import {
9
15
  formatCanonicalWorkspaceFolderName,
10
16
  sanitizeWorkspaceName
@@ -19,16 +25,10 @@ import {
19
25
  import {
20
26
  queryUnifiedDb
21
27
  } from "./chunk-JCMB7BIM.js";
22
- import {
23
- StorageAdapterFactory
24
- } from "./chunk-SHZAQTIT.js";
25
- import {
26
- b2ListBuckets
27
- } from "./chunk-4QEMALXF.js";
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
@@ -30,6 +30,9 @@ import {
30
30
  syncSrklAccounts,
31
31
  useSrklServices
32
32
  } from "./chunk-HF5SGQ5V.js";
33
+ import {
34
+ S3Adapter
35
+ } from "./chunk-RBQ4CW3T.js";
33
36
  import {
34
37
  RemoteWorkspaceService,
35
38
  SyncEngine,
@@ -46,9 +49,6 @@ import {
46
49
  syncWorkspace,
47
50
  workingWorkspaceService
48
51
  } from "./chunk-SVNL5IVN.js";
49
- import {
50
- S3Adapter
51
- } from "./chunk-RBQ4CW3T.js";
52
52
  import {
53
53
  validateToolInput
54
54
  } from "./chunk-6GQNYRD6.js";
@@ -157,15 +157,35 @@ import {
157
157
  krnlWorkspaceGraphServiceFacade,
158
158
  krnlWorkspaceServiceDefinition,
159
159
  krnlWorkspaceServiceFacade
160
- } from "./chunk-6D55GT3L.js";
160
+ } from "./chunk-UC25J7E4.js";
161
161
  import {
162
162
  workspaceGraphService
163
- } from "./chunk-R6ZNF6FW.js";
163
+ } from "./chunk-IGZB4RYT.js";
164
164
  import {
165
165
  getPrimarySrklDeploymentUrl,
166
166
  getSrklAccounts,
167
167
  srklListBackblazeBuckets
168
168
  } from "./chunk-XHADDA75.js";
169
+ import {
170
+ BackblazeB2Adapter,
171
+ LocalFSAdapter,
172
+ StorageAdapterFactory,
173
+ SupabaseStorageAdapter,
174
+ ensureS3DirectoryMarker,
175
+ isSecretMasked,
176
+ normalizeBackblazeCredentials,
177
+ permanentDeleteS3Folder,
178
+ permanentDeleteS3Object,
179
+ renameS3Folder,
180
+ resolveBackblazeEndpoint
181
+ } from "./chunk-SHZAQTIT.js";
182
+ import {
183
+ authorizeB2,
184
+ b2DownloadFile,
185
+ b2ListBuckets,
186
+ b2ListFileNames,
187
+ b2UploadFile
188
+ } from "./chunk-4QEMALXF.js";
169
189
  import {
170
190
  formatCanonicalWorkspaceFolderName,
171
191
  sanitizeWorkspaceName
@@ -200,26 +220,6 @@ import {
200
220
  getUnifiedDbUrl,
201
221
  queryUnifiedDb
202
222
  } from "./chunk-JCMB7BIM.js";
203
- import {
204
- BackblazeB2Adapter,
205
- LocalFSAdapter,
206
- StorageAdapterFactory,
207
- SupabaseStorageAdapter,
208
- ensureS3DirectoryMarker,
209
- isSecretMasked,
210
- normalizeBackblazeCredentials,
211
- permanentDeleteS3Folder,
212
- permanentDeleteS3Object,
213
- renameS3Folder,
214
- resolveBackblazeEndpoint
215
- } from "./chunk-SHZAQTIT.js";
216
- import {
217
- authorizeB2,
218
- b2DownloadFile,
219
- b2ListBuckets,
220
- b2ListFileNames,
221
- b2UploadFile
222
- } from "./chunk-4QEMALXF.js";
223
223
  import {
224
224
  BaseStorageAdapter,
225
225
  GoogleDriveAdapter,
@@ -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,16 +31,16 @@ import {
31
31
  krnlWorkspaceGraphServiceFacade,
32
32
  krnlWorkspaceServiceDefinition,
33
33
  krnlWorkspaceServiceFacade
34
- } from "./chunk-6D55GT3L.js";
35
- import "./chunk-R6ZNF6FW.js";
34
+ } from "./chunk-UC25J7E4.js";
35
+ import "./chunk-IGZB4RYT.js";
36
36
  import "./chunk-XHADDA75.js";
37
+ import "./chunk-SHZAQTIT.js";
38
+ import "./chunk-4QEMALXF.js";
37
39
  import "./chunk-FZKBTF34.js";
38
40
  import "./chunk-JGUWYVOL.js";
39
41
  import "./chunk-JCMB7BIM.js";
40
- import "./chunk-SHZAQTIT.js";
41
- import "./chunk-4QEMALXF.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,
@@ -14,10 +14,10 @@ import {
14
14
  } from "../chunk-JOTDEFRG.js";
15
15
  import {
16
16
  workspaceGraphService
17
- } from "../chunk-R6ZNF6FW.js";
17
+ } from "../chunk-IGZB4RYT.js";
18
+ import "../chunk-SHZAQTIT.js";
18
19
  import "../chunk-JGUWYVOL.js";
19
20
  import "../chunk-JCMB7BIM.js";
20
- import "../chunk-SHZAQTIT.js";
21
21
  import "../chunk-KKRWZDMN.js";
22
22
  import "../chunk-SXDYW3QA.js";
23
23
  export {
@@ -16,8 +16,8 @@ import {
16
16
  getSrklAccounts,
17
17
  srklListBackblazeBuckets
18
18
  } from "../chunk-XHADDA75.js";
19
- import "../chunk-JCMB7BIM.js";
20
19
  import "../chunk-4QEMALXF.js";
20
+ import "../chunk-JCMB7BIM.js";
21
21
  export {
22
22
  CANONICAL_SRKL_URL,
23
23
  SrklClient,
@@ -0,0 +1 @@
1
+ export { LuthAuthClient as CanonicalAuthClient, DEFAULT_LUTH_URL, DeploymentEnvironment, EmailSignInCredentials, EmailSignUpData, GoogleSignInOptions, LuthAuthClient, LuthAuthClientConfig, LuthAuthError, LuthAuthTokenStore, LuthSession, LuthSessionResult, LuthUser, RegisterApplicationResult, createLuthAuthClient as createCanonicalAuthClient, createLuthAuthClient, hydrateLuthTokenFromUrl, resolveClientEnvironment, resolveClientOrigin } from '@dinilmusick/gutts/auth';
@@ -0,0 +1,22 @@
1
+ import {
2
+ DEFAULT_LUTH_URL,
3
+ LuthAuthClient,
4
+ LuthAuthClient2,
5
+ LuthAuthError,
6
+ createLuthAuthClient,
7
+ createLuthAuthClient2,
8
+ hydrateLuthTokenFromUrl,
9
+ resolveClientEnvironment,
10
+ resolveClientOrigin
11
+ } from "./chunk-B4WOPCRZ.js";
12
+ export {
13
+ LuthAuthClient2 as CanonicalAuthClient,
14
+ DEFAULT_LUTH_URL,
15
+ LuthAuthClient,
16
+ LuthAuthError,
17
+ createLuthAuthClient2 as createCanonicalAuthClient,
18
+ createLuthAuthClient,
19
+ hydrateLuthTokenFromUrl,
20
+ resolveClientEnvironment,
21
+ resolveClientOrigin
22
+ };
@@ -0,0 +1,26 @@
1
+ // src/auth.ts
2
+ import {
3
+ LuthAuthClient,
4
+ createLuthAuthClient,
5
+ hydrateLuthTokenFromUrl,
6
+ resolveClientOrigin,
7
+ resolveClientEnvironment,
8
+ LuthAuthError,
9
+ DEFAULT_LUTH_URL
10
+ } from "@dinilmusick/gutts/auth";
11
+ import {
12
+ LuthAuthClient as LuthAuthClient2,
13
+ createLuthAuthClient as createLuthAuthClient2
14
+ } from "@dinilmusick/gutts/auth";
15
+
16
+ export {
17
+ LuthAuthClient,
18
+ createLuthAuthClient,
19
+ hydrateLuthTokenFromUrl,
20
+ resolveClientOrigin,
21
+ resolveClientEnvironment,
22
+ LuthAuthError,
23
+ DEFAULT_LUTH_URL,
24
+ LuthAuthClient2,
25
+ createLuthAuthClient2
26
+ };
@@ -1,3 +1,15 @@
1
+ import {
2
+ DEFAULT_LUTH_URL,
3
+ LuthAuthClient,
4
+ LuthAuthClient2,
5
+ LuthAuthError,
6
+ createLuthAuthClient,
7
+ createLuthAuthClient2,
8
+ hydrateLuthTokenFromUrl,
9
+ resolveClientEnvironment,
10
+ resolveClientOrigin
11
+ } from "./chunk-B4WOPCRZ.js";
12
+
1
13
  // src/browserExecutionClient.ts
2
14
  var BrowserExecutionClient = class {
3
15
  gatewayUrl;
@@ -170,37 +182,18 @@ var OPFSWorkspaceStorage = class {
170
182
  return result;
171
183
  }
172
184
  };
173
-
174
- // src/canonicalAuthClient.ts
175
- import {
176
- LuthAuthClient,
177
- createLuthAuthClient,
178
- resolveClientOrigin,
179
- resolveClientEnvironment
180
- } from "@dinilmusick/gutts/auth";
181
- import { LuthAuthError } from "@dinilmusick/gutts/auth";
182
- import { LuthAuthClient as LuthAuthClient2 } from "@dinilmusick/gutts/auth";
183
- import { createLuthAuthClient as createLuthAuthClient2 } from "@dinilmusick/gutts/auth";
184
-
185
- // src/auth.ts
186
- import {
187
- LuthAuthClient as LuthAuthClient3,
188
- createLuthAuthClient as createLuthAuthClient3,
189
- hydrateLuthTokenFromUrl,
190
- resolveClientOrigin as resolveClientOrigin2,
191
- resolveClientEnvironment as resolveClientEnvironment2,
192
- LuthAuthError as LuthAuthError2,
193
- DEFAULT_LUTH_URL
194
- } from "@dinilmusick/gutts/auth";
195
- import {
196
- LuthAuthClient as LuthAuthClient4,
197
- createLuthAuthClient as createLuthAuthClient4
198
- } from "@dinilmusick/gutts/auth";
199
185
  export {
200
186
  BrowserExecutionClient,
187
+ LuthAuthClient2 as CanonicalAuthClient,
201
188
  DEFAULT_LUTH_URL,
189
+ LuthAuthClient,
190
+ LuthAuthError,
202
191
  OPFSWorkspaceStorage,
203
192
  WorkspaceAutosaveController,
204
193
  createBrowserExecutionClient,
205
- hydrateLuthTokenFromUrl
194
+ createLuthAuthClient2 as createCanonicalAuthClient,
195
+ createLuthAuthClient,
196
+ hydrateLuthTokenFromUrl,
197
+ resolveClientEnvironment,
198
+ resolveClientOrigin
206
199
  };
@@ -17,10 +17,15 @@
17
17
  "import": "./dist/index.js",
18
18
  "types": "./dist/index.d.ts",
19
19
  "default": "./dist/index.js"
20
+ },
21
+ "./auth": {
22
+ "import": "./dist/auth.js",
23
+ "types": "./dist/auth.d.ts",
24
+ "default": "./dist/auth.js"
20
25
  }
21
26
  },
22
27
  "scripts": {
23
- "build": "tsup src/index.ts --format esm --dts --clean --external react --external zod",
28
+ "build": "tsup src/index.ts src/auth.ts --format esm --dts --clean --external react --external zod",
24
29
  "typecheck": "tsc --noEmit",
25
30
  "clean": "rm -rf dist"
26
31
  },
@@ -7,21 +7,6 @@ import {
7
7
  instantiateSubgraph
8
8
  } from "./chunk-S22PMERU.js";
9
9
  import "./chunk-RHRXPY2U.js";
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";
25
10
  import {
26
11
  LifecycleCycleError,
27
12
  LifecycleGraph,
@@ -45,6 +30,21 @@ import {
45
30
  CustomViewWindow,
46
31
  DEFAULT_GRAPH_SETTINGS
47
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";
48
48
  import {
49
49
  AutoSolidify,
50
50
  SpatialEngine,
@@ -1,9 +1,9 @@
1
- import {
2
- findUserWorkspace
3
- } from "./chunk-JGUWYVOL.js";
4
1
  import {
5
2
  StorageAdapterFactory
6
3
  } from "./chunk-SHZAQTIT.js";
4
+ import {
5
+ findUserWorkspace
6
+ } from "./chunk-JGUWYVOL.js";
7
7
 
8
8
  // src/services/workspaceGraphService.ts
9
9
  function slugify(name) {