@ultrst-armada/kloks 2.2.8 → 2.2.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,8 +1,8 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "packageName": "@ultrst-armada/kloks",
4
- "version": "2.2.8",
5
- "sourceCommit": "5c29834311d8c525ec703ef51b34de2c50f54987",
4
+ "version": "2.2.9",
5
+ "sourceCommit": "8fd058dee8dda59fe3cee4cf60b1d68803f52867",
6
6
  "releaseWorkflow": "npm Release",
7
- "workflowRunId": "44742095336"
7
+ "workflowRunId": "44814035725"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultrst-armada/kloks",
3
- "version": "2.2.8",
3
+ "version": "2.2.9",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -361,7 +361,7 @@
361
361
  "verify:package-exports": "node scripts/verify-package-exports.mjs"
362
362
  },
363
363
  "dependencies": {
364
- "@dinilmusick/gutts": "2.2.3",
364
+ "@dinilmusick/gutts": "2.2.4",
365
365
  "@jitl/quickjs-wasmfile-release-sync": "0.32.0",
366
366
  "@webcontainer/api": "^1.6.4",
367
367
  "quickjs-emscripten-core": "0.32.0",
@@ -0,0 +1,55 @@
1
+ /** Structural invocation type only. The actual wire validator lives in GutTS. */
2
+ type UniversalRuntimeKind = 'browser' | 'cloudflare-worker' | 'serverless' | 'server' | 'desktop' | 'android' | 'ios' | 'headless';
3
+ type UniversalAuthReadiness = 'discovery' | 'unauthenticated' | 'authenticating' | 'authenticated' | 'configuring' | 'ready' | 'denied' | 'unavailable';
4
+ interface UniversalDiscoveryV1 {
5
+ application: {
6
+ appId: string;
7
+ ecosystemId: string;
8
+ name: string;
9
+ };
10
+ issuer: string;
11
+ configurationUrl: string;
12
+ }
13
+ interface UniversalConfigurationV1 {
14
+ application: {
15
+ appId: string;
16
+ ecosystemId: string;
17
+ name: string;
18
+ };
19
+ principal: {
20
+ userId: string;
21
+ };
22
+ settings: {
23
+ supportedServices: string[];
24
+ };
25
+ }
26
+ /**
27
+ * Canonical Kloks service for public discovery and least-privilege user
28
+ * configuration. All schema validation, issuer pinning and retries live in
29
+ * GutTS; this runtime adapter does not recreate the identity protocol.
30
+ *
31
+ * This is NOT a way to fetch OAuth client secrets, BFF encryption keys, or
32
+ * database credentials. The existing OIDC BFF keeps its protected bootstrap
33
+ * until authenticated confidential workload provisioning is implemented.
34
+ */
35
+ export interface UniversalLuthRuntimeAdapter {
36
+ runtime: UniversalRuntimeKind;
37
+ appId: string;
38
+ /** Existing Luth issuer origin; pinned before accepting discovery URLs. */
39
+ issuerOrigin: string;
40
+ /** Adapter may supply verified session cookies or OAuth bearer transport. */
41
+ authorizationHeaders?: () => Promise<HeadersInit>;
42
+ /** Injectable URL for local and integration fixtures only. */
43
+ discoveryUrl?: string;
44
+ fetcher?: typeof fetch;
45
+ onStateChange?: (state: UniversalAuthReadiness) => void;
46
+ }
47
+ export interface UniversalLuthRuntimeService {
48
+ discover(): Promise<UniversalDiscoveryV1>;
49
+ getConfiguration(): Promise<UniversalConfigurationV1>;
50
+ invalidate(): void;
51
+ readonly readiness: UniversalAuthReadiness;
52
+ }
53
+ /** Runtime privilege is never inferred from app ID or APP_URL. */
54
+ export declare function createUniversalLuthRuntimeService(adapter: UniversalLuthRuntimeAdapter): UniversalLuthRuntimeService;
55
+ export {};
@@ -2,3 +2,4 @@ export * from './CanonicalAuthClient.js';
2
2
  export * from './UnifiedAuthCore.js';
3
3
  export * from './OidcBff.js';
4
4
  export * from './OidcBffEnv.js';
5
+ export * from './UniversalLuthInitialization.js';
@@ -1,16 +1,17 @@
1
1
  import {
2
2
  createCanonicalApplicationOAuthBff,
3
3
  createOAuthBff
4
- } from "../chunk-NR7OXPB3.js";
4
+ } from "../chunk-AKVBFHHD.js";
5
5
  import {
6
6
  LuthAuthClient,
7
7
  LuthAuthClient2,
8
8
  LuthAuthError,
9
9
  createLuthAuthClient,
10
10
  createLuthAuthClient2,
11
+ createUniversalLuthRuntimeService,
11
12
  resolveClientEnvironment,
12
13
  resolveClientOrigin
13
- } from "../chunk-Y7ZE6D5H.js";
14
+ } from "../chunk-MDTLU7H4.js";
14
15
  import {
15
16
  loginSystemUser,
16
17
  resolveUserFromToken
@@ -23,6 +24,7 @@ export {
23
24
  createLuthAuthClient2 as createCanonicalAuthClient,
24
25
  createLuthAuthClient,
25
26
  createOAuthBff,
27
+ createUniversalLuthRuntimeService,
26
28
  loginSystemUser,
27
29
  resolveClientEnvironment,
28
30
  resolveClientOrigin,
@@ -0,0 +1,58 @@
1
+ // src/auth/CanonicalAuthClient.ts
2
+ import {
3
+ LuthAuthClient,
4
+ createLuthAuthClient,
5
+ resolveClientOrigin,
6
+ resolveClientEnvironment
7
+ } from "@dinilmusick/gutts/auth";
8
+ import { LuthAuthError } from "@dinilmusick/gutts/auth";
9
+ import { LuthAuthClient as LuthAuthClient2 } from "@dinilmusick/gutts/auth";
10
+ import { createLuthAuthClient as createLuthAuthClient2 } from "@dinilmusick/gutts/auth";
11
+
12
+ // src/auth/UniversalLuthInitialization.ts
13
+ import * as PortableLuthAuth from "@dinilmusick/gutts/auth";
14
+ function requiredGutTSFactory() {
15
+ const source = PortableLuthAuth;
16
+ const factory = source.createUniversalInitializationClient;
17
+ if (typeof factory !== "function") {
18
+ throw new Error("UNIVERSAL_INITIALIZATION_CONTRACT_UNAVAILABLE");
19
+ }
20
+ return factory;
21
+ }
22
+ function createUniversalLuthRuntimeService(adapter) {
23
+ if (adapter.runtime === "headless") {
24
+ throw new Error("VERIFIED_WORKLOAD_AUTHENTICATION_REQUIRED");
25
+ }
26
+ const client = requiredGutTSFactory()(
27
+ {
28
+ appId: adapter.appId,
29
+ runtime: adapter.runtime,
30
+ ...adapter.discoveryUrl ? { discoveryUrl: adapter.discoveryUrl } : {}
31
+ },
32
+ {
33
+ expectedIssuerOrigin: adapter.issuerOrigin,
34
+ ...adapter.authorizationHeaders ? { authorize: adapter.authorizationHeaders } : {},
35
+ ...adapter.fetcher ? { fetcher: adapter.fetcher } : {},
36
+ ...adapter.onStateChange ? { onStateChange: adapter.onStateChange } : {}
37
+ }
38
+ );
39
+ return {
40
+ discover: () => client.discover(),
41
+ getConfiguration: () => client.configuration(),
42
+ invalidate: () => client.invalidate(),
43
+ get readiness() {
44
+ return client.readiness;
45
+ }
46
+ };
47
+ }
48
+
49
+ export {
50
+ LuthAuthClient,
51
+ createLuthAuthClient,
52
+ resolveClientOrigin,
53
+ resolveClientEnvironment,
54
+ LuthAuthError,
55
+ LuthAuthClient2,
56
+ createLuthAuthClient2,
57
+ createUniversalLuthRuntimeService
58
+ };
@@ -8,3 +8,4 @@ export * from './services/index.js';
8
8
  export * from './resolver/index.js';
9
9
  export type { Runtime, Deployment, FunctionSet, ServiceFacade, OrchestrationFn, BackendFacade, ServiceRegistryRecord, } from './architecture/types.js';
10
10
  export * from './provider-services/index.js';
11
+ export * from './auth/UniversalLuthInitialization.js';
@@ -105,9 +105,10 @@ import {
105
105
  LuthAuthError,
106
106
  createLuthAuthClient,
107
107
  createLuthAuthClient2,
108
+ createUniversalLuthRuntimeService,
108
109
  resolveClientEnvironment,
109
110
  resolveClientOrigin
110
- } from "./chunk-Y7ZE6D5H.js";
111
+ } from "./chunk-MDTLU7H4.js";
111
112
  import {
112
113
  BackendRegistry,
113
114
  ConcurrencyConflictError,
@@ -203,6 +204,7 @@ export {
203
204
  createLuthAuthClient,
204
205
  createProviderClient,
205
206
  createSSEResponse,
207
+ createUniversalLuthRuntimeService,
206
208
  b2DownloadFile as downloadBackblazeB2File,
207
209
  fetchCloudflareCapacity,
208
210
  fetchVercelCapacity,
@@ -93,7 +93,7 @@ import {
93
93
  import {
94
94
  createCanonicalApplicationOAuthBff,
95
95
  createOAuthBff
96
- } from "./chunk-NR7OXPB3.js";
96
+ } from "./chunk-AKVBFHHD.js";
97
97
  import {
98
98
  BackendProvider,
99
99
  useBackend,
@@ -138,9 +138,10 @@ import {
138
138
  LuthAuthError,
139
139
  createLuthAuthClient,
140
140
  createLuthAuthClient2,
141
+ createUniversalLuthRuntimeService,
141
142
  resolveClientEnvironment,
142
143
  resolveClientOrigin
143
- } from "./chunk-Y7ZE6D5H.js";
144
+ } from "./chunk-MDTLU7H4.js";
144
145
  import {
145
146
  BackendRegistry,
146
147
  ConcurrencyConflictError,
@@ -4750,6 +4751,7 @@ export {
4750
4751
  createRemoteService,
4751
4752
  createSSEResponse,
4752
4753
  createSrklClient,
4754
+ createUniversalLuthRuntimeService,
4753
4755
  createWavBuffer,
4754
4756
  createWorkspace,
4755
4757
  createWorkspaceGraph,
@@ -225,7 +225,7 @@
225
225
  "clean": "rm -rf dist"
226
226
  },
227
227
  "dependencies": {
228
- "@dinilmusick/gutts": "2.2.3",
228
+ "@dinilmusick/gutts": "2.2.4",
229
229
  "@kloks/functions": "workspace:*",
230
230
  "@kloks/state-graph": "workspace:*",
231
231
  "@webcontainer/api": "^1.6.4",
@@ -1,4 +1,5 @@
1
1
  import { DeploymentEnvironment } from '@dinilmusick/gutts/auth';
2
+ export * from '@dinilmusick/gutts/auth';
2
3
  export { ApplicationAuthClient, ApplicationAuthClientConfig, LuthAuthClient as CanonicalAuthClient, DEFAULT_LUTH_URL, DeploymentEnvironment, EmailSignInCredentials, EmailSignUpData, GoogleSignInOptions, LuthAuthClient, LuthAuthClientConfig, LuthAuthError, LuthAuthTokenStore, LuthSession, LuthSessionResult, LuthUser, RegisterApplicationResult, createApplicationAuthClient, createLuthAuthClient as createCanonicalAuthClient, createLuthAuthClient, hydrateLuthTokenFromUrl, resolveClientEnvironment, resolveClientOrigin } from '@dinilmusick/gutts/auth';
3
4
 
4
5
  interface LuthPrincipal {
@@ -15,7 +15,7 @@ import {
15
15
  resolveClientEnvironment,
16
16
  resolveClientOrigin,
17
17
  verifyLuthRequest
18
- } from "./chunk-WYC7RG32.js";
18
+ } from "./chunk-4HR374IB.js";
19
19
  export {
20
20
  ApplicationAuthClient,
21
21
  CANONICAL_PUBLIC_ROUTES,
@@ -103,6 +103,7 @@ async function verifyLuthRequest(request, options) {
103
103
  }
104
104
 
105
105
  // src/auth.ts
106
+ export * from "@dinilmusick/gutts/auth";
106
107
  function createUniversalAuthFetch(authClient) {
107
108
  return async function universalAuthFetch(input, init = {}) {
108
109
  const headers = new Headers();
@@ -1,4 +1,5 @@
1
1
  export { CANONICAL_PUBLIC_ROUTES, LuthDeploymentRecord, LuthPrincipal, createUniversalAuthFetch, extractLuthToken, isPublicRoute, verifyLuthRequest } from './auth.js';
2
+ export * from '@dinilmusick/gutts/auth';
2
3
  export { ApplicationAuthClient, ApplicationAuthClientConfig, LuthAuthClient as CanonicalAuthClient, DEFAULT_LUTH_URL, DeploymentEnvironment, EmailSignInCredentials, EmailSignUpData, GoogleSignInOptions, LuthAuthClient, LuthAuthClientConfig, LuthAuthError, LuthAuthTokenStore, LuthSession, LuthSessionResult, LuthUser, RegisterApplicationResult, createApplicationAuthClient, createLuthAuthClient as createCanonicalAuthClient, createLuthAuthClient, hydrateLuthTokenFromUrl, resolveClientEnvironment, resolveClientOrigin } from '@dinilmusick/gutts/auth';
3
4
 
4
5
  /**
@@ -15,7 +15,7 @@ import {
15
15
  resolveClientEnvironment,
16
16
  resolveClientOrigin,
17
17
  verifyLuthRequest
18
- } from "./chunk-WYC7RG32.js";
18
+ } from "./chunk-4HR374IB.js";
19
19
 
20
20
  // src/browserExecutionClient.ts
21
21
  var BrowserExecutionClient = class {
@@ -30,7 +30,7 @@
30
30
  "clean": "rm -rf dist"
31
31
  },
32
32
  "dependencies": {
33
- "@dinilmusick/gutts": "2.2.3",
33
+ "@dinilmusick/gutts": "2.2.4",
34
34
  "zod": "^3.24.1"
35
35
  },
36
36
  "peerDependencies": {
@@ -252,7 +252,7 @@ import {
252
252
  validateProjectGraph,
253
253
  validateUniversalConnection,
254
254
  zoomAtPoint
255
- } from "./chunk-7N2LLBUW.js";
255
+ } from "./chunk-UKTICGGV.js";
256
256
  import {
257
257
  BaseHandle,
258
258
  DataHandle,
@@ -261,6 +261,7 @@ import {
261
261
  ViewHandle,
262
262
  instantiateSubgraph
263
263
  } from "./chunk-OXUDG6HE.js";
264
+ import "./chunk-RHRXPY2U.js";
264
265
  import {
265
266
  LifecycleCycleError,
266
267
  LifecycleGraph,
@@ -284,7 +285,6 @@ import {
284
285
  CustomViewWindow,
285
286
  DEFAULT_GRAPH_SETTINGS
286
287
  } from "./chunk-5KP74NMF.js";
287
- import "./chunk-RHRXPY2U.js";
288
288
  import {
289
289
  AttractionEngine,
290
290
  GhostInferenceEngine,
@@ -294,6 +294,12 @@ import {
294
294
  getBeamPoints,
295
295
  useMagneticTraces
296
296
  } from "./chunk-JXDJZSFW.js";
297
+ import {
298
+ ConnectionRuleStore,
299
+ HandleTypeRegistry,
300
+ WireTypeRegistry,
301
+ initializeDefaultGraphRules
302
+ } from "./chunk-TZOL3RN7.js";
297
303
  import {
298
304
  AutoSolidify,
299
305
  SpatialEngine,
@@ -304,12 +310,6 @@ import {
304
310
  SolidConnection,
305
311
  ViewLink
306
312
  } from "./chunk-OYN4ZEZC.js";
307
- import {
308
- ConnectionRuleStore,
309
- HandleTypeRegistry,
310
- WireTypeRegistry,
311
- initializeDefaultGraphRules
312
- } from "./chunk-TZOL3RN7.js";
313
313
  import {
314
314
  CompatibilityMatrix
315
315
  } from "./chunk-ISFNY7EZ.js";
@@ -252,7 +252,7 @@ import {
252
252
  validateProjectGraph,
253
253
  validateUniversalConnection,
254
254
  zoomAtPoint
255
- } from "./chunk-7N2LLBUW.js";
255
+ } from "./chunk-UKTICGGV.js";
256
256
  import {
257
257
  BaseHandle,
258
258
  DataHandle,
@@ -261,6 +261,7 @@ import {
261
261
  ViewHandle,
262
262
  instantiateSubgraph
263
263
  } from "./chunk-OXUDG6HE.js";
264
+ import "./chunk-RHRXPY2U.js";
264
265
  import {
265
266
  LifecycleCycleError,
266
267
  LifecycleGraph,
@@ -284,7 +285,6 @@ import {
284
285
  CustomViewWindow,
285
286
  DEFAULT_GRAPH_SETTINGS
286
287
  } from "./chunk-5KP74NMF.js";
287
- import "./chunk-RHRXPY2U.js";
288
288
  import {
289
289
  AttractionEngine,
290
290
  GhostInferenceEngine,
@@ -294,6 +294,12 @@ import {
294
294
  getBeamPoints,
295
295
  useMagneticTraces
296
296
  } from "./chunk-JXDJZSFW.js";
297
+ import {
298
+ ConnectionRuleStore,
299
+ HandleTypeRegistry,
300
+ WireTypeRegistry,
301
+ initializeDefaultGraphRules
302
+ } from "./chunk-TZOL3RN7.js";
297
303
  import {
298
304
  AutoSolidify,
299
305
  SpatialEngine,
@@ -304,12 +310,6 @@ import {
304
310
  SolidConnection,
305
311
  ViewLink
306
312
  } from "./chunk-OYN4ZEZC.js";
307
- import {
308
- ConnectionRuleStore,
309
- HandleTypeRegistry,
310
- WireTypeRegistry,
311
- initializeDefaultGraphRules
312
- } from "./chunk-TZOL3RN7.js";
313
313
  import {
314
314
  CompatibilityMatrix
315
315
  } from "./chunk-ISFNY7EZ.js";
@@ -7,13 +7,13 @@ import {
7
7
  getBeamPoints,
8
8
  useMagneticTraces
9
9
  } from "../chunk-JXDJZSFW.js";
10
+ import "../chunk-TZOL3RN7.js";
10
11
  import {
11
12
  AutoSolidify,
12
13
  SpatialEngine,
13
14
  TraceEngine
14
15
  } from "../chunk-OV4JVTNY.js";
15
16
  import "../chunk-OYN4ZEZC.js";
16
- import "../chunk-TZOL3RN7.js";
17
17
  import "../chunk-ISFNY7EZ.js";
18
18
  export {
19
19
  AttractionEngine,
@@ -1,20 +0,0 @@
1
- // src/auth/CanonicalAuthClient.ts
2
- import {
3
- LuthAuthClient,
4
- createLuthAuthClient,
5
- resolveClientOrigin,
6
- resolveClientEnvironment
7
- } from "@dinilmusick/gutts/auth";
8
- import { LuthAuthError } from "@dinilmusick/gutts/auth";
9
- import { LuthAuthClient as LuthAuthClient2 } from "@dinilmusick/gutts/auth";
10
- import { createLuthAuthClient as createLuthAuthClient2 } from "@dinilmusick/gutts/auth";
11
-
12
- export {
13
- LuthAuthClient,
14
- createLuthAuthClient,
15
- resolveClientOrigin,
16
- resolveClientEnvironment,
17
- LuthAuthError,
18
- LuthAuthClient2,
19
- createLuthAuthClient2
20
- };
@@ -7,6 +7,10 @@ import {
7
7
  import {
8
8
  AttractionEngine
9
9
  } from "./chunk-JXDJZSFW.js";
10
+ import {
11
+ HandleTypeRegistry,
12
+ WireTypeRegistry
13
+ } from "./chunk-TZOL3RN7.js";
10
14
  import {
11
15
  AutoSolidify,
12
16
  TraceEngine
@@ -14,10 +18,6 @@ import {
14
18
  import {
15
19
  SolidConnection
16
20
  } from "./chunk-OYN4ZEZC.js";
17
- import {
18
- HandleTypeRegistry,
19
- WireTypeRegistry
20
- } from "./chunk-TZOL3RN7.js";
21
21
  import {
22
22
  CompatibilityMatrix
23
23
  } from "./chunk-ISFNY7EZ.js";