@ultrst-armada/kloks 1.24.4 → 1.24.8

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.
Files changed (60) hide show
  1. package/.krusbl-release-attestation.json +3 -3
  2. package/README.md +11 -0
  3. package/package.json +15 -12
  4. package/packages/audio-midi/dist/index.js +16 -16
  5. package/packages/backend/dist/ai-inference/index.js +0 -1
  6. package/packages/backend/dist/ai-keys/index.js +0 -1
  7. package/packages/backend/dist/ai-models/index.js +0 -1
  8. package/packages/backend/dist/ai-provider/index.js +0 -1
  9. package/packages/backend/dist/ai-routing/index.js +0 -1
  10. package/packages/backend/dist/ai-tools/index.js +0 -1
  11. package/packages/backend/dist/api/index.js +0 -1
  12. package/packages/backend/dist/auth/index.d.ts +5 -74
  13. package/packages/backend/dist/auth/index.js +16 -19
  14. package/packages/backend/dist/{chunk-2OPIDIIB.js → chunk-3VWBZEMG.js} +26 -2
  15. package/packages/backend/dist/{chunk-AHJ2EWQW.js → chunk-6D55GT3L.js} +9 -28
  16. package/packages/backend/dist/chunk-ED32WV3T.js +75 -0
  17. package/packages/backend/dist/chunk-EO5VUYYU.js +20 -0
  18. package/packages/backend/dist/{chunk-B3VJ4HDV.js → chunk-JOTDEFRG.js} +1 -1
  19. package/packages/backend/dist/{chunk-OB65KZ2M.js → chunk-M45KQRPR.js} +1 -1
  20. package/packages/backend/dist/chunk-SXDYW3QA.js +579 -0
  21. package/packages/backend/dist/client/index.js +0 -1
  22. package/packages/backend/dist/connectivity/index.js +0 -1
  23. package/packages/backend/dist/control-plane/index.d.ts +3 -3
  24. package/packages/backend/dist/control-plane/index.js +0 -1
  25. package/packages/backend/dist/development/client.d.ts +20 -6
  26. package/packages/backend/dist/development/client.js +42 -28
  27. package/packages/backend/dist/development/index.d.ts +20 -6
  28. package/packages/backend/dist/development/index.js +652 -30
  29. package/packages/backend/dist/development/playwrightInspectionService.js +2 -3
  30. package/packages/backend/dist/development/playwrightInspectionTypes.d.ts +1 -0
  31. package/packages/backend/dist/index.d.ts +3 -57
  32. package/packages/backend/dist/index.js +44 -188
  33. package/packages/backend/dist/krnl-ai-services.js +2 -3
  34. package/packages/backend/dist/krnl-services.js +6 -7
  35. package/packages/backend/dist/services/index.js +4 -5
  36. package/packages/backend/dist/srkl/index.js +1 -2
  37. package/packages/backend/dist/storage/index.js +0 -1
  38. package/packages/backend/dist/workspace/index.js +0 -1
  39. package/packages/backend/package.json +3 -10
  40. package/packages/client/dist/index.d.ts +2 -0
  41. package/packages/client/dist/index.js +29 -1
  42. package/packages/client/package.json +2 -1
  43. package/packages/fod/dist/index.d.ts +11 -1
  44. package/packages/fod/dist/index.js +2 -0
  45. package/packages/fod/package.json +2 -3
  46. package/packages/functions/dist/index.js +16 -16
  47. package/packages/functions/package.json +2 -1
  48. package/packages/services/dist/index.d.ts +46 -1
  49. package/packages/services/dist/index.js +96 -18
  50. package/packages/services/kloks.manifest.json +19 -0
  51. package/packages/state-graph/dist/index.js +25 -25
  52. package/packages/backend/dist/BaseAccountProvider-DduKf5HG.d.ts +0 -66
  53. package/packages/backend/dist/chunk-2HCQ2SIR.js +0 -213
  54. package/packages/backend/dist/chunk-A3BE6ROS.js +0 -180
  55. package/packages/backend/dist/chunk-FJ5LZFBV.js +0 -667
  56. package/packages/backend/dist/chunk-MWSYNRNZ.js +0 -871
  57. package/packages/backend/dist/chunk-QGM4M3NI.js +0 -37
  58. package/packages/backend/dist/dist-XMSSRYDR.js +0 -899
  59. package/packages/backend/dist/transformers.node-HWHOAE4H.js +0 -43879
  60. package/packages/backend/dist/{chunk-IGZB4RYT.js → chunk-R6ZNF6FW.js} +3 -3
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "packageName": "@ultrst-armada/kloks",
4
- "version": "1.24.4",
5
- "sourceCommit": "12383c07ed6082051321de083038d23cb82bc1ef",
4
+ "version": "1.24.8",
5
+ "sourceCommit": "0c38ca219c308720b6f3638f0ca01a4a9c15104e",
6
6
  "releaseWorkflow": "npm Release",
7
- "workflowRunId": "41538037349"
7
+ "workflowRunId": "41838334372"
8
8
  }
package/README.md CHANGED
@@ -1,3 +1,14 @@
1
1
  # Kloks
2
2
 
3
3
  Kloks stands for KrnlTS BLOcKS. It is the reusable library layer for services built on KrnlTS, including service definitions, functionalities, functionality orchestrations, and concept libraries. These assets make assembling KrnlTS services similar to building with modular blocks.
4
+
5
+
6
+ <!-- Canonical auth dependency baseline: GutTS 1.4.3 -->
7
+
8
+ <!-- GutTS 1.4.3 registry propagation check 2026-11-04 -->
9
+
10
+ <!-- auth consolidation retry 1793797410196 -->
11
+
12
+ <!-- canonical auth build retry -->
13
+
14
+ <!-- canonical auth test contract -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultrst-armada/kloks",
3
- "version": "1.24.4",
3
+ "version": "1.24.8",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -176,6 +176,11 @@
176
176
  "types": "./packages/backend/dist/development/client.d.ts",
177
177
  "import": "./packages/backend/dist/development/client.js",
178
178
  "default": "./packages/backend/dist/development/client.js"
179
+ },
180
+ "./auth": {
181
+ "types": "./packages/client/dist/auth.d.ts",
182
+ "import": "./packages/client/dist/auth.js",
183
+ "default": "./packages/client/dist/auth.js"
179
184
  }
180
185
  },
181
186
  "scripts": {
@@ -187,9 +192,9 @@
187
192
  "clean": "pnpm -r run clean"
188
193
  },
189
194
  "dependencies": {
195
+ "@dinilmusick/gutts": "^1.4.3",
190
196
  "@aws-sdk/client-s3": "^3.600.0",
191
197
  "@webcontainer/api": "^1.6.4",
192
- "bcryptjs": "^2.4.3",
193
198
  "ws": "^8.18.0",
194
199
  "zod": "^3.24.1",
195
200
  "zustand": "^5.0.15"
@@ -197,9 +202,8 @@
197
202
  "peerDependencies": {
198
203
  "@neondatabase/serverless": "^0.10.0 || ^1.0.0",
199
204
  "@supabase/supabase-js": "^2.45.0",
200
- "better-sqlite3": "^11.0.0",
201
- "react": "^18.0.0 || ^19.0.0",
202
- "@ultrst-armada/krnl": "^1.0.9"
205
+ "@ultrst-armada/krnl": "^1.0.9",
206
+ "react": "^18.0.0 || ^19.0.0"
203
207
  },
204
208
  "peerDependenciesMeta": {
205
209
  "@neondatabase/serverless": {
@@ -208,9 +212,6 @@
208
212
  "@supabase/supabase-js": {
209
213
  "optional": true
210
214
  },
211
- "better-sqlite3": {
212
- "optional": true
213
- },
214
215
  "react": {
215
216
  "optional": true
216
217
  },
@@ -223,13 +224,10 @@
223
224
  "@aws-sdk/lib-storage": "^3.600.0",
224
225
  "@neondatabase/serverless": "^0.10.0",
225
226
  "@supabase/supabase-js": "^2.45.0",
226
- "@types/bcryptjs": "^2.4.0",
227
- "@types/better-sqlite3": "^7.6.0",
228
227
  "@types/node": "^22.0.0",
229
228
  "@types/react": "^19.0.0",
230
229
  "@ultrst-armada/krnl": "^1.0.9",
231
- "bcryptjs": "^2.4.3",
232
- "better-sqlite3": "^11.0.0",
230
+ "playwright": "^1.64.1",
233
231
  "react": "^19.0.1",
234
232
  "tsup": "^8.4.0",
235
233
  "typescript": "^5.7.3",
@@ -239,5 +237,10 @@
239
237
  "repository": {
240
238
  "type": "git",
241
239
  "url": "git+https://github.com/dinilmusick/Kloks.git"
240
+ },
241
+ "pnpm": {
242
+ "onlyBuiltDependencies": [
243
+ "@dinilmusick/gutts"
244
+ ]
242
245
  }
243
246
  }
@@ -41,7 +41,7 @@ import "./chunk-QGM4M3NI.js";
41
41
  // ../../node_modules/.pnpm/@ultrst-armada+krnl@1.0.9_@types+node@22.20.5/node_modules/@ultrst-armada/krnl/packages/core/dist/index.js
42
42
  import { randomUUID } from "crypto";
43
43
 
44
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/define-api.js
44
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/define-api.js
45
45
  function defineApi(definition) {
46
46
  const properties = Object.fromEntries(definition.parameters.map((parameter) => [
47
47
  parameter.name,
@@ -62,7 +62,7 @@ function defineApi(definition) {
62
62
  });
63
63
  }
64
64
 
65
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/array-apis.js
65
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/array-apis.js
66
66
  var array = { type: "array" };
67
67
  var integer = { type: "integer" };
68
68
  var arrayApis = [
@@ -73,7 +73,7 @@ var arrayApis = [
73
73
  defineApi({ id: "gutts.arrays.last", name: "last", category: "arrays", description: "Returns the final element of an array, or undefined when the array is empty.", parameters: [{ name: "values", description: "The array whose final element should be returned.", required: true, schema: array }], output: { description: "The final array element, or undefined for an empty array." }, semantics: { deterministic: true, pure: true, sideEffects: false } })
74
74
  ];
75
75
 
76
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/json-apis.js
76
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/json-apis.js
77
77
  var json = { type: "object", description: "A JSON-compatible value." };
78
78
  var jsonApis = [
79
79
  defineApi({ id: "gutts.json.isJsonValue", name: "isJsonValue", category: "json", description: "Checks whether an unknown value can be represented as a finite JSON value.", parameters: [{ name: "value", description: "The value to validate as JSON-compatible data.", required: true, schema: {} }], output: { type: "boolean", description: "True when the value is a valid JSON value." }, semantics: { deterministic: true, pure: true, sideEffects: false } }),
@@ -82,7 +82,7 @@ var jsonApis = [
82
82
  defineApi({ id: "gutts.json.stringifyJson", name: "stringifyJson", category: "json", description: "Serializes a JSON-compatible value into JSON text, optionally using indentation.", parameters: [{ name: "value", description: "The JSON-compatible value to serialize.", required: true, schema: {} }, { name: "space", description: "Optional number of indentation spaces to use in the serialized output.", required: false, schema: { type: "number" } }], output: { type: "string", description: "The serialized JSON text." }, semantics: { deterministic: true, pure: true, sideEffects: false }, errors: ["Throws TypeError when the value cannot be serialized as JSON."] })
83
83
  ];
84
84
 
85
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/number-apis.js
85
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/number-apis.js
86
86
  var numberApis = [
87
87
  defineApi({ id: "gutts.numbers.clamp", name: "clamp", category: "numbers", description: "Restricts a numeric value to an inclusive minimum and maximum range.", parameters: [{ name: "value", description: "The numeric value to constrain.", required: true, schema: { type: "number" } }, { name: "min", description: "The inclusive lower bound.", required: true, schema: { type: "number" } }, { name: "max", description: "The inclusive upper bound.", required: true, schema: { type: "number" } }], output: { type: "number", description: "The value constrained to the inclusive range." }, semantics: { deterministic: true, pure: true, sideEffects: false }, errors: ["Throws RangeError when min exceeds max."] }),
88
88
  defineApi({ id: "gutts.numbers.inRange", name: "inRange", category: "numbers", description: "Checks whether a numeric value falls within the configured range.", parameters: [{ name: "value", description: "The numeric value to test.", required: true, schema: { type: "number" } }, { name: "min", description: "The lower range boundary.", required: true, schema: { type: "number" } }, { name: "max", description: "The upper range boundary.", required: true, schema: { type: "number" } }], output: { type: "boolean", description: "Whether the value is inside the range." }, semantics: { deterministic: true, pure: true, sideEffects: false }, errors: ["Throws RangeError when min exceeds max."] }),
@@ -91,7 +91,7 @@ var numberApis = [
91
91
  defineApi({ id: "gutts.numbers.sum", name: "sum", category: "numbers", description: "Adds all numbers in an array and returns their total.", parameters: [{ name: "values", description: "The numeric values to add.", required: true, schema: { type: "array", items: { type: "number" } } }], output: { type: "number", description: "The sum of all input numbers." }, semantics: { deterministic: true, pure: true, sideEffects: false } })
92
92
  ];
93
93
 
94
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/object-apis.js
94
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/object-apis.js
95
95
  var objectApis = [
96
96
  defineApi({ id: "gutts.objects.hasOwn", name: "hasOwn", category: "objects", description: "Checks whether an object contains a requested property.", parameters: [{ name: "value", description: "The object to inspect.", required: true, schema: { type: "object" } }, { name: "key", description: "The property key to look for.", required: true, schema: { type: "string" } }], output: { type: "boolean" }, semantics: { deterministic: true, pure: true, sideEffects: false } }),
97
97
  defineApi({ id: "gutts.objects.pick", name: "pick", category: "objects", description: "Creates an object containing only requested properties.", parameters: [{ name: "value", description: "The source object.", required: true, schema: { type: "object" } }, { name: "keys", description: "The property keys to retain.", required: true, schema: { type: "array", items: { type: "string" } } }], output: { type: "object" }, semantics: { deterministic: true, pure: true, sideEffects: false } }),
@@ -99,7 +99,7 @@ var objectApis = [
99
99
  defineApi({ id: "gutts.objects.isPlainObject", name: "isPlainObject", category: "objects", description: "Checks whether a value is a plain JavaScript object.", parameters: [{ name: "value", description: "The value to classify.", required: true, schema: {} }], output: { type: "boolean" }, semantics: { deterministic: true, pure: true, sideEffects: false } })
100
100
  ];
101
101
 
102
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/string-apis.js
102
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/string-apis.js
103
103
  var string = { type: "string" };
104
104
  var stringApis = [
105
105
  defineApi({ id: "gutts.strings.isBlank", name: "isBlank", category: "strings", description: "Checks whether a string contains no non-whitespace characters.", parameters: [{ name: "value", description: "The string to inspect.", required: true, schema: string }], output: { type: "boolean" }, semantics: { deterministic: true, pure: true, sideEffects: false } }),
@@ -115,7 +115,7 @@ var stringApis = [
115
115
  defineApi({ id: "gutts.strings.truncateWords", name: "truncateWords", category: "strings", description: "Shortens a string to a maximum number of words and appends a suffix when truncation is required.", parameters: [{ name: "value", description: "The string to shorten.", required: true, schema: string }, { name: "maxWords", description: "The non-negative maximum number of words.", required: true, schema: { type: "number" } }, { name: "suffix", description: "The suffix used when truncation occurs.", required: false, schema: string }], output: { type: "string" }, semantics: { deterministic: true, pure: true, sideEffects: false }, errors: ["Throws RangeError when maxWords is negative."] })
116
116
  ];
117
117
 
118
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/url-apis.js
118
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/url-apis.js
119
119
  var string2 = { type: "string" };
120
120
  var urlApis = [
121
121
  defineApi({ id: "gutts.urls.isUrl", name: "isUrl", category: "urls", description: "Checks whether a string can be parsed as a URL by the standard URL constructor.", parameters: [{ name: "value", description: "The string to validate.", required: true, schema: string2 }], output: { type: "boolean" }, semantics: { deterministic: true, pure: true, sideEffects: false } }),
@@ -124,7 +124,7 @@ var urlApis = [
124
124
  defineApi({ id: "gutts.urls.setQueryParam", name: "setQueryParam", category: "urls", description: "Returns a URL with one query-string parameter set to the supplied value.", parameters: [{ name: "url", description: "The URL to modify.", required: true, schema: string2 }, { name: "key", description: "The query parameter name.", required: true, schema: string2 }, { name: "value", description: "The query parameter value.", required: true, schema: string2 }], output: { type: "string" }, semantics: { deterministic: true, pure: true, sideEffects: false }, errors: ["Throws when url cannot be parsed as a URL."] })
125
125
  ];
126
126
 
127
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/models/needle3/index.js
127
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/models/needle3/index.js
128
128
  var needle3Metadata = {
129
129
  id: "model.cactus-needle3",
130
130
  name: "Needle 3",
@@ -155,12 +155,12 @@ var needle3CompleteApi = defineApi({
155
155
  semantics: { deterministic: false, pure: false, sideEffects: false }
156
156
  });
157
157
 
158
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/models/runtimes/ettin-head.js
158
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/models/runtimes/ettin-head.js
159
159
  import fs from "fs";
160
160
  import path from "path";
161
161
  import os from "os";
162
162
 
163
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/models/smollm2/index.js
163
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/models/smollm2/index.js
164
164
  var smolLM2Metadata = {
165
165
  id: "model.smollm2-135m-instruct",
166
166
  name: "SmolLM2-135M-Instruct",
@@ -192,7 +192,7 @@ var smolLM2GenerateApi = defineApi({
192
192
  errors: ["Model load failure", "Inference failure"]
193
193
  });
194
194
 
195
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/models/whistle/index.js
195
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/models/whistle/index.js
196
196
  var whistleMetadata = {
197
197
  id: "model.cactus-whistle",
198
198
  name: "Whistle",
@@ -222,7 +222,7 @@ var whistleTranscribeApi = defineApi({
222
222
  semantics: { deterministic: true, pure: false, sideEffects: false }
223
223
  });
224
224
 
225
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/models/ettin/index.js
225
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/models/ettin/index.js
226
226
  var defineEttin = (id2, name, parameters, description) => ({
227
227
  id: id2,
228
228
  name,
@@ -257,7 +257,7 @@ var ettinRerankApi = defineApi({
257
257
  semantics: { deterministic: true, pure: false, sideEffects: false }
258
258
  });
259
259
 
260
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/models/minilm/index.js
260
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/models/minilm/index.js
261
261
  var miniLML6Metadata = {
262
262
  id: "model.minilm-l6-v2",
263
263
  name: "MiniLM-L6-v2",
@@ -288,7 +288,7 @@ var miniLMSimilarityApi = defineApi({
288
288
  semantics: { deterministic: true, pure: false, sideEffects: false }
289
289
  });
290
290
 
291
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/api-registry.js
291
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/api-registry.js
292
292
  var guttsApiDefinitions = Object.freeze([
293
293
  ...arrayApis,
294
294
  ...jsonApis,
@@ -304,7 +304,7 @@ var guttsApiDefinitions = Object.freeze([
304
304
  ]);
305
305
  var guttsApiById = Object.freeze(Object.fromEntries(guttsApiDefinitions.map((api) => [api.id, api])));
306
306
 
307
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/fod-node-provider.js
307
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/api/fod-node-provider.js
308
308
  var schemaType = (schema) => String(schema?.type ?? "any");
309
309
  function guttsApiToFodNode(api) {
310
310
  return {
@@ -320,7 +320,7 @@ function guttsApiToFodNode(api) {
320
320
  }
321
321
  var guttsFodNodeDefinitions = Object.freeze(guttsApiDefinitions.map(guttsApiToFodNode));
322
322
 
323
- // ../../node_modules/.pnpm/@dinilmusick+gutts@1.1.0_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/models/model-registry.js
323
+ // ../../node_modules/.pnpm/@dinilmusick+gutts@1.4.3_@types+node@22.20.5/node_modules/@dinilmusick/gutts/dist/models/model-registry.js
324
324
  var guttsModelDefinitions = Object.freeze([
325
325
  smolLM2Metadata,
326
326
  needle3Metadata,
@@ -10,7 +10,6 @@ import {
10
10
  performInference
11
11
  } from "../chunk-GCTQY24J.js";
12
12
  import "../chunk-MAMK4GDH.js";
13
- import "../chunk-QGM4M3NI.js";
14
13
  export {
15
14
  DeterministicEndpointExecutor,
16
15
  InferenceExecutorService,
@@ -7,7 +7,6 @@ import {
7
7
  validateApiKey
8
8
  } from "../chunk-P7H6TIEA.js";
9
9
  import "../chunk-JSQZAFBU.js";
10
- import "../chunk-QGM4M3NI.js";
11
10
  export {
12
11
  KeyStoreService,
13
12
  KeysStorage,
@@ -11,7 +11,6 @@ import {
11
11
  import "../chunk-P7H6TIEA.js";
12
12
  import "../chunk-MAMK4GDH.js";
13
13
  import "../chunk-JSQZAFBU.js";
14
- import "../chunk-QGM4M3NI.js";
15
14
  export {
16
15
  EndpointRefresher,
17
16
  ModelCatalogService,
@@ -12,7 +12,6 @@ import {
12
12
  getProviderMeta,
13
13
  listProviders
14
14
  } from "../chunk-JSQZAFBU.js";
15
- import "../chunk-QGM4M3NI.js";
16
15
  export {
17
16
  AIProviderService,
18
17
  AITransportClient,
@@ -12,7 +12,6 @@ import "../chunk-P7H6TIEA.js";
12
12
  import "../chunk-SLR6SIEU.js";
13
13
  import "../chunk-MAMK4GDH.js";
14
14
  import "../chunk-JSQZAFBU.js";
15
- import "../chunk-QGM4M3NI.js";
16
15
  export {
17
16
  FailoverExecutionEngine,
18
17
  HealthCheckService,
@@ -7,7 +7,6 @@ import {
7
7
  mcpEngine,
8
8
  toolManagerService
9
9
  } from "../chunk-U4HUGPRH.js";
10
- import "../chunk-QGM4M3NI.js";
11
10
  export {
12
11
  MCPEngine,
13
12
  ToolManagerService,
@@ -4,7 +4,6 @@ import {
4
4
  withAuth,
5
5
  withCors
6
6
  } from "../chunk-TWCEVES2.js";
7
- import "../chunk-QGM4M3NI.js";
8
7
  export {
9
8
  BaseApiRoute,
10
9
  createSSEResponse,
@@ -1,85 +1,16 @@
1
- import { B as BaseAccountProvider, U as User, C as CreateUserData, a as AuthSession } from '../BaseAccountProvider-DduKf5HG.js';
2
- export { A as AuthCredentials, R as RateLimiter, S as SessionManager, b as SignupInput, c as UserRole } from '../BaseAccountProvider-DduKf5HG.js';
3
- import { SkipoBase } from '@ultrst-armada/kloks/functions';
1
+ export { LuthAuthClient as CanonicalAuthClient, LuthSession as CanonicalAuthSession, LuthUser as CanonicalAuthUser, DeploymentEnvironment, EmailSignInCredentials, EmailSignUpData, GoogleSignInOptions, LuthAuthClient, LuthAuthClientConfig, LuthAuthError, LuthAuthTokenStore, LuthSession, LuthSessionResult, LuthUser, RegisterApplicationResult, createLuthAuthClient as createCanonicalAuthClient, createLuthAuthClient, resolveClientEnvironment, resolveClientOrigin } from '@dinilmusick/gutts';
4
2
 
5
- declare class PasswordHasher {
6
- static hash(password: string, saltRounds?: number): Promise<string>;
7
- static verify(password: string, hash: string): Promise<boolean>;
8
- }
9
-
10
- declare class LocalAccountProvider extends BaseAccountProvider {
11
- private filePath;
12
- private users;
13
- private isLoaded;
14
- constructor(filePath?: string);
15
- private load;
16
- private persist;
17
- findUserByEmail(email: string): Promise<User | null>;
18
- findUserById(id: string): Promise<User | null>;
19
- createUser(data: CreateUserData): Promise<User>;
20
- updateUser(id: string, data: Partial<User>): Promise<User>;
21
- listUsers(): Promise<User[]>;
22
- }
23
-
24
- declare class AdminGuard extends SkipoBase {
25
- static verify(authHeaderOrToken: string | null | undefined, provider: BaseAccountProvider): Promise<AuthSession>;
26
- static verifyUser(authHeaderOrToken: string | null | undefined, provider: BaseAccountProvider): Promise<AuthSession>;
27
- }
28
-
29
- interface CanonicalAuthUser {
3
+ interface SystemUser {
30
4
  id: string;
31
5
  email: string;
32
6
  name: string;
33
- username?: string;
34
- role?: string;
35
- status?: string;
36
- appProfiles?: Record<string, unknown>;
37
- emailVerified?: boolean;
38
- }
39
- interface CanonicalAuthSession {
40
- session: Record<string, unknown>;
41
- user: CanonicalAuthUser;
42
- }
43
- interface CanonicalAuthClientOptions {
44
- baseUrl: string;
45
- fetcher?: typeof fetch;
46
- credentials?: RequestCredentials;
47
- }
48
- interface AuthResult {
49
- success: boolean;
50
- status: number;
51
- user?: CanonicalAuthUser;
52
- session?: Record<string, unknown>;
53
- error?: string;
54
- redirectUrl?: string;
55
- token?: string;
56
- }
57
- declare class CanonicalAuthClient {
58
- private readonly baseUrl;
59
- private readonly fetcher;
60
- private readonly credentials;
61
- constructor(options: CanonicalAuthClientOptions);
62
- private request;
63
- signInEmail(email: string, password: string): Promise<AuthResult>;
64
- signUpEmail(email: string, password: string, name: string): Promise<AuthResult>;
65
- signInGoogle(callbackURL: string): Promise<AuthResult>;
66
- requestGoogleDriveAccess(callbackURL?: string): Promise<AuthResult>;
67
- getSession(cookie?: string): Promise<CanonicalAuthSession | null>;
68
- getSessionWithToken(token: string): Promise<CanonicalAuthSession | null>;
69
- signOut(): Promise<boolean>;
70
- }
71
- declare function createCanonicalAuthClient(baseUrl: string, fetcher?: typeof fetch): CanonicalAuthClient;
72
-
73
- interface SystemUser extends CanonicalAuthUser {
74
7
  username: string;
75
8
  role: string;
76
9
  status: string;
77
10
  appProfiles?: Record<string, unknown>;
11
+ emailVerified?: boolean;
78
12
  }
79
- interface AuthEnvironment {
80
- SRKL_AUTH_BASE_URL?: string;
81
- [key: string]: unknown;
82
- }
13
+ type AuthEnvironment = Record<string, unknown>;
83
14
  declare function loginSystemUser(email: string, rawPass: string, isAdmin: boolean, _queryDb: (sql: string, params?: unknown[]) => Promise<{
84
15
  rows: any[];
85
16
  }>, env?: AuthEnvironment): Promise<{
@@ -93,4 +24,4 @@ declare function resolveUserFromToken(tokenOrUserId: string, _queryDb: (sql: str
93
24
  rows: any[];
94
25
  }>, env?: AuthEnvironment): Promise<SystemUser | null>;
95
26
 
96
- export { AdminGuard, type AuthEnvironment, type AuthResult, AuthSession, BaseAccountProvider, CanonicalAuthClient, type CanonicalAuthClientOptions, type CanonicalAuthSession, type CanonicalAuthUser, CreateUserData, LocalAccountProvider, PasswordHasher, type SystemUser, User, createCanonicalAuthClient, loginSystemUser, resolveUserFromToken };
27
+ export { type AuthEnvironment, type SystemUser, loginSystemUser, resolveUserFromToken };
@@ -1,27 +1,24 @@
1
1
  import {
2
- AdminGuard,
3
- BaseAccountProvider,
4
- LocalAccountProvider,
5
- PasswordHasher
6
- } from "../chunk-A3BE6ROS.js";
2
+ LuthAuthClient,
3
+ LuthAuthClient2,
4
+ LuthAuthError,
5
+ createLuthAuthClient,
6
+ createLuthAuthClient2,
7
+ resolveClientEnvironment,
8
+ resolveClientOrigin
9
+ } from "../chunk-EO5VUYYU.js";
7
10
  import {
8
- CanonicalAuthClient,
9
- RateLimiter,
10
- SessionManager,
11
- createCanonicalAuthClient,
12
11
  loginSystemUser,
13
12
  resolveUserFromToken
14
- } from "../chunk-2HCQ2SIR.js";
15
- import "../chunk-QGM4M3NI.js";
13
+ } from "../chunk-ED32WV3T.js";
16
14
  export {
17
- AdminGuard,
18
- BaseAccountProvider,
19
- CanonicalAuthClient,
20
- LocalAccountProvider,
21
- PasswordHasher,
22
- RateLimiter,
23
- SessionManager,
24
- createCanonicalAuthClient,
15
+ LuthAuthClient2 as CanonicalAuthClient,
16
+ LuthAuthClient,
17
+ LuthAuthError,
18
+ createLuthAuthClient2 as createCanonicalAuthClient,
19
+ createLuthAuthClient,
25
20
  loginSystemUser,
21
+ resolveClientEnvironment,
22
+ resolveClientOrigin,
26
23
  resolveUserFromToken
27
24
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createService,
3
3
  createServiceDefinition
4
- } from "./chunk-MWSYNRNZ.js";
4
+ } from "./chunk-SXDYW3QA.js";
5
5
 
6
6
  // src/development/playwrightInspectionService.ts
7
7
  import { randomUUID } from "crypto";
@@ -10,7 +10,27 @@ import { dirname, join } from "path";
10
10
 
11
11
  // src/development/playwrightInspectionSupport.ts
12
12
  import { createRequire } from "module";
13
+ import { existsSync } from "fs";
13
14
  var require2 = createRequire(import.meta.url);
15
+ function findSystemChromiumExecutable() {
16
+ if (process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH && existsSync(process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH)) {
17
+ return process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH;
18
+ }
19
+ const candidates = [
20
+ "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
21
+ "/Applications/Chromium.app/Contents/MacOS/Chromium",
22
+ "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser",
23
+ "/Applications/Arc.app/Contents/MacOS/Arc",
24
+ "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",
25
+ "/usr/bin/google-chrome",
26
+ "/usr/bin/chromium-browser",
27
+ "/usr/bin/chromium"
28
+ ];
29
+ for (const c of candidates) {
30
+ if (existsSync(c)) return c;
31
+ }
32
+ return void 0;
33
+ }
14
34
  function loadPlaywright() {
15
35
  try {
16
36
  return require2("playwright");
@@ -48,7 +68,11 @@ var PlaywrightInspectionRuntime = class {
48
68
  const timeout = request.timeoutMs ?? 15e3;
49
69
  let browser;
50
70
  try {
51
- browser = await loadPlaywright().chromium.launch({ headless: true });
71
+ const executablePath = request.executablePath ?? findSystemChromiumExecutable();
72
+ browser = await loadPlaywright().chromium.launch({
73
+ headless: true,
74
+ ...executablePath ? { executablePath } : {}
75
+ });
52
76
  } catch (cause) {
53
77
  recordInspectionError(errors, "browser", cause instanceof Error ? cause.message : String(cause), request.url);
54
78
  const result2 = {
@@ -1,16 +1,10 @@
1
1
  import {
2
2
  workspaceGraphService
3
- } from "./chunk-IGZB4RYT.js";
3
+ } from "./chunk-R6ZNF6FW.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";
14
8
  import {
15
9
  formatCanonicalWorkspaceFolderName,
16
10
  sanitizeWorkspaceName
@@ -26,15 +20,19 @@ import {
26
20
  queryUnifiedDb
27
21
  } from "./chunk-JCMB7BIM.js";
28
22
  import {
29
- RateLimiter,
30
- SessionManager,
23
+ StorageAdapterFactory
24
+ } from "./chunk-SHZAQTIT.js";
25
+ import {
26
+ b2ListBuckets
27
+ } from "./chunk-4QEMALXF.js";
28
+ import {
31
29
  loginSystemUser,
32
30
  resolveUserFromToken
33
- } from "./chunk-2HCQ2SIR.js";
31
+ } from "./chunk-ED32WV3T.js";
34
32
  import {
35
33
  createService,
36
34
  createServiceDefinition
37
- } from "./chunk-MWSYNRNZ.js";
35
+ } from "./chunk-SXDYW3QA.js";
38
36
 
39
37
  // src/krnl-services.ts
40
38
  var AuthServiceDefinition = createServiceDefinition({
@@ -45,14 +43,6 @@ var AuthServiceDefinition = createServiceDefinition({
45
43
  initial: { activeSessions: 0 }
46
44
  },
47
45
  operations: {
48
- createSession: {
49
- id: "AuthService.createSession",
50
- name: "createSession",
51
- handler: async (input) => {
52
- const sm = new SessionManager();
53
- return sm.createSession(input.userId, input.role ?? "user");
54
- }
55
- },
56
46
  login: {
57
47
  id: "AuthService.login",
58
48
  name: "login",
@@ -62,15 +52,6 @@ var AuthServiceDefinition = createServiceDefinition({
62
52
  id: "AuthService.resolveUser",
63
53
  name: "resolveUser",
64
54
  handler: async (input) => resolveUserFromToken(input.tokenOrUserId, (sql, params) => queryUnifiedDb(sql, params, input.env), input.env)
65
- },
66
- checkRateLimit: {
67
- id: "AuthService.checkRateLimit",
68
- name: "checkRateLimit",
69
- handler: async (input) => {
70
- const limiter = new RateLimiter(input.windowMs ?? 6e4, input.maxRequests ?? 60);
71
- limiter.check(input.key);
72
- return { allowed: true, key: input.key };
73
- }
74
55
  }
75
56
  }
76
57
  });
@@ -0,0 +1,75 @@
1
+ // src/auth/UnifiedAuthCore.ts
2
+ import {
3
+ LuthAuthClient,
4
+ DEFAULT_LUTH_URL
5
+ } from "@dinilmusick/gutts";
6
+ function tokenStore(initial = "") {
7
+ let token = initial;
8
+ return {
9
+ get: () => token,
10
+ set: (value) => {
11
+ token = value;
12
+ },
13
+ clear: () => {
14
+ token = "";
15
+ }
16
+ };
17
+ }
18
+ function createClient(env, token = "") {
19
+ return new LuthAuthClient({
20
+ ecosystemId: "ultrst-armada",
21
+ applicationId: "kloks-backend",
22
+ luthUrl: DEFAULT_LUTH_URL,
23
+ autoRegister: false,
24
+ tokenStore: tokenStore(token)
25
+ });
26
+ }
27
+ function toSystemUser(user) {
28
+ return {
29
+ ...user,
30
+ username: user.email.split("@")[0],
31
+ role: "user",
32
+ status: "ACTIVE"
33
+ };
34
+ }
35
+ async function loginSystemUser(email, rawPass, isAdmin, _queryDb, env) {
36
+ if (!email?.trim() || !rawPass) return { success: false, status: 400, error: "Email and password are required" };
37
+ try {
38
+ const client = createClient(env);
39
+ await client.signInWithEmail({ email: email.trim(), password: rawPass });
40
+ const session = await client.getSession();
41
+ if (!session.authenticated || !session.user || !session.session) {
42
+ return { success: false, status: 401, error: "Canonical authentication service did not establish a session." };
43
+ }
44
+ 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
+ }
48
+ return {
49
+ success: true,
50
+ status: 200,
51
+ user,
52
+ token: session.session.token
53
+ };
54
+ } catch (error) {
55
+ return { success: false, status: 503, error: error instanceof Error ? error.message : "Canonical authentication service unavailable" };
56
+ }
57
+ }
58
+ async function resolveUserFromToken(tokenOrUserId, _queryDb, env) {
59
+ if (!tokenOrUserId) return null;
60
+ try {
61
+ const credential = tokenOrUserId.trim().replace(/^Bearer[ \t]+/i, "").trim();
62
+ if (!credential) return null;
63
+ const client = createClient(env, credential);
64
+ const session = await client.getSession();
65
+ if (!session.authenticated || !session.user) return null;
66
+ return toSystemUser(session.user);
67
+ } catch {
68
+ return null;
69
+ }
70
+ }
71
+
72
+ export {
73
+ loginSystemUser,
74
+ resolveUserFromToken
75
+ };