@ultrst-armada/kloks 1.4.1 → 1.4.2
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.
- package/package.json +1 -1
- package/packages/backend/dist/index.d.ts +20 -1
- package/packages/backend/dist/index.js +17 -0
- package/packages/contracts/dist/index.d.ts +46 -1
- package/packages/services/dist/index.d.ts +37 -1
- package/packages/services/dist/index.js +236 -0
- package/packages/services/kloks.manifest.json +61 -0
- package/packages/services/package.json +2 -1
- package/packages/state-graph/dist/index.js +16 -16
package/package.json
CHANGED
|
@@ -1621,4 +1621,23 @@ declare function computeUsageWeightScore(account?: AccountEntity, deployment?: D
|
|
|
1621
1621
|
*/
|
|
1622
1622
|
declare function getConnectedDeploymentNode(weightNodeId: string, nodes: GraphNode[], edges: GraphEdge[]): GraphNode | undefined;
|
|
1623
1623
|
|
|
1624
|
-
|
|
1624
|
+
/**
|
|
1625
|
+
* @file systemDatabaseUrl.ts
|
|
1626
|
+
* @description Centralized SYSTEM_DATABASE_URL resolver adhering to SKIPO Invariant §16.
|
|
1627
|
+
* Precedence: SYSTEM_DATABASE_URL_1 (primary) > SYSTEM_DATABASE_URL_2 (fallback #1) > SYSTEM_DATABASE_URL_3 (fallback #2).
|
|
1628
|
+
* Strictly forbids fallback to generic DATABASE_URL.
|
|
1629
|
+
*/
|
|
1630
|
+
/**
|
|
1631
|
+
* Resolves the active system database URL following the strict 1 -> 2 -> 3 precedence.
|
|
1632
|
+
* Throws a deterministic descriptive error if no system database URL is configured.
|
|
1633
|
+
*
|
|
1634
|
+
* @param env - Environment record (defaults to process.env in Node runtime)
|
|
1635
|
+
* @returns Validated system database connection string
|
|
1636
|
+
*/
|
|
1637
|
+
declare function resolveSystemDatabaseUrl(env?: Record<string, string | undefined>): string;
|
|
1638
|
+
/**
|
|
1639
|
+
* Safe version that returns null instead of throwing if unconfigured.
|
|
1640
|
+
*/
|
|
1641
|
+
declare function tryResolveSystemDatabaseUrl(env?: Record<string, string | undefined>): string | null;
|
|
1642
|
+
|
|
1643
|
+
export { type AssetChannelType, type AssetDataType, type AssetFolderInfo, type AssetPoolItem, type AssetPoolScope, type B2AuthData, type BackendFacade, BaseDataProvider, BaseResourceFetcher, type CloudflareObservability, type CloudflareProjectItem, CloudflareResourceFetcher, type CloudflareUsageMetrics, type CredentialEntry, type CredentialManifest, type Deployment, type FunctionSet, FunctionalityTable, GRAPHS_ROOT, type IDataProvider, LEGACY_PROJECTS_ROOT, type OrchestrationFn, PROJECTS_ROOT, type ProjectMetadata, type PublicRouteRecord, type QueryFilter, ResourceFetcherRegistry, type Runtime, SAMPLES_GLOBAL_ROOT, SUPPORTED_AUDIO_EXTS, SUPPORTED_MIDI_EXTS, type ServerAudioSampleItem, type ServiceFacade, type ServiceRegistryRecord, type SortOrder, type SrklB2Account, SrklStorageService, type SyncFileResult, type UnifiedQueryResult, type UnifiedResourceMetricItem, type UnifiedResourceMetrics, VercelResourceFetcher, WORKSPACE_ASSETS_ROOT, WORKSPACE_ROOT, type WorkingWorkspaceConfig, type WorkspaceFolderResolution, type WorkspaceStorageConfig, b2DeleteFileVersion, b2DeleteFolder, buildProjectObservability, buildProjectsList, cleanDbUrl, computeDeploymentFinalWeight, computeUsageWeightScore, configureStarterProjectTemplate, createAssetSubfolder, createCredential, createGraphAssetFolder, createGraphAssetFolder as createGraphAssetSubfolder, createGraphPackage, createWavBuffer, createWorkspace, createWorkspaceGraph, decryptSecretFromBlob, deleteAssetFromGraph, deleteAssetFromPool, deleteCredential, deleteGlobalSample, deleteGraphPackage, deleteProject, deleteProjectSample, deleteRoute, deleteWorkspace, deleteWorkspaceFile, deleteWorkspaceFolder, deleteWorkspaceGraph, encryptSecretToBlob, ensureAssetPoolDirectories, ensureGlobalSamples, ensureGraphAssetDirectories, ensureProjectAssets, ensureProjectsRoot, ensureWorkspaceStructure, exportEncryptedCredentials, fetchCloudflareData, fetchVercelData, findUserWorkspace, findWorkspaceRecord, formatRelativeCreated, getAllRoutes, getAssetPoolLocationPath, getAssetPoolPublicUrl, getB2BucketId, getConnectedDeploymentNode, getConnectedWeightModifiers, getCredential, getDefaultWorkingWorkspaceDir, getExecutions, getGatewayConfig, getGraphPackageById, getPrimarySrklDeploymentUrl as getPrimarySrklCoreDeploymentUrl, getProjectById, getPublicRouteByPath, getPublicRoutes, getSrklAccounts as getSrklCoreAccounts, getSrklStatus, getUnifiedDbUrl, getUsers, getWeightModifierScore, getWorkingWorkspaceConfig, getWorkingWorkspaceDir, getWorkspaceFolderKey, getWorkspaceFolderPrefix, getWorkspaceGraph, getWorkspaceStorageDetails, getWorkspaces, importEncryptedCredentials, importGraphDependency, initGlobalSamplesDirectory, isB2Workspace, listAllGraphPackages, listAllProjects, listBackblazeBuckets, listCredentials, listGlobalSamples, listProjectSamples, listWorkspaceFiles, listWorkspaceGraphs, loadCredentialManifest, loadWorkspaceData, loginUser, matchGatewayIngress, matchGatewayIngressAsync, queryUnifiedDb, readWorkspaceFile, recordExecution, removeGraphDependency, renameAppInWorkspaceData, resolveDynamicRouteFromDb, resolveSystemDatabaseUrl, resolveWorkspaceConnection, resolveWorkspaceDir, saveAssetToGraph, saveAssetToPool, saveCredentialManifest, saveGlobalSample, saveGraphPackage, saveProject, saveProjectSample, saveWorkspaceData, saveWorkspaceGraph, scanAssetPool, scanGraphAssets, seedDefaultAssets, seedStarterGraphAssets, serverPublicRoutes, setServerPublicRoutes, setWorkingWorkspaceConfig, srklListBackblazeBuckets as srklCoreListBackblazeBuckets, syncWorkspace, syncWorkspaceCreateToBucket, syncWorkspaceDataToBucket, syncWorkspaceDeleteToBucket, tryResolveSystemDatabaseUrl, updateCredential, updateWorkspace, upsertRoute, validateServiceDefinition, writeWorkspaceFile };
|
|
@@ -4323,6 +4323,21 @@ async function deleteWorkspaceGraph(workspaceIdOrSlug, graphIdOrName) {
|
|
|
4323
4323
|
}
|
|
4324
4324
|
return false;
|
|
4325
4325
|
}
|
|
4326
|
+
|
|
4327
|
+
// src/resolver/systemDatabaseUrl.ts
|
|
4328
|
+
function resolveSystemDatabaseUrl(env = typeof process !== "undefined" ? process.env : {}) {
|
|
4329
|
+
const url = env["SYSTEM_DATABASE_URL_1"] && env["SYSTEM_DATABASE_URL_1"].trim() || env["SYSTEM_DATABASE_URL_2"] && env["SYSTEM_DATABASE_URL_2"].trim() || env["SYSTEM_DATABASE_URL_3"] && env["SYSTEM_DATABASE_URL_3"].trim();
|
|
4330
|
+
if (!url) {
|
|
4331
|
+
throw new Error(
|
|
4332
|
+
"[SKIPO DATABASE_INVARIANT] Missing system database configuration.\n Set SYSTEM_DATABASE_URL_1 (primary), SYSTEM_DATABASE_URL_2 (fallback #1),\n or SYSTEM_DATABASE_URL_3 (fallback #2).\n Generic DATABASE_URL is obsolete and strictly forbidden in this architecture."
|
|
4333
|
+
);
|
|
4334
|
+
}
|
|
4335
|
+
return url;
|
|
4336
|
+
}
|
|
4337
|
+
function tryResolveSystemDatabaseUrl(env = typeof process !== "undefined" ? process.env : {}) {
|
|
4338
|
+
const url = env["SYSTEM_DATABASE_URL_1"] && env["SYSTEM_DATABASE_URL_1"].trim() || env["SYSTEM_DATABASE_URL_2"] && env["SYSTEM_DATABASE_URL_2"].trim() || env["SYSTEM_DATABASE_URL_3"] && env["SYSTEM_DATABASE_URL_3"].trim();
|
|
4339
|
+
return url || null;
|
|
4340
|
+
}
|
|
4326
4341
|
export {
|
|
4327
4342
|
AdminGuard,
|
|
4328
4343
|
AuditLogger,
|
|
@@ -4533,6 +4548,7 @@ export {
|
|
|
4533
4548
|
resolveBackblazeEndpoint,
|
|
4534
4549
|
resolveDynamicRouteFromDb,
|
|
4535
4550
|
resolveSystemDatabaseClusterNodes,
|
|
4551
|
+
resolveSystemDatabaseUrl,
|
|
4536
4552
|
resolveUserFromToken,
|
|
4537
4553
|
resolveWorkspaceConnection,
|
|
4538
4554
|
resolveWorkspaceDir,
|
|
@@ -4561,6 +4577,7 @@ export {
|
|
|
4561
4577
|
syncWorkspaceCreateToBucket,
|
|
4562
4578
|
syncWorkspaceDataToBucket,
|
|
4563
4579
|
syncWorkspaceDeleteToBucket,
|
|
4580
|
+
tryResolveSystemDatabaseUrl,
|
|
4564
4581
|
updateCredential,
|
|
4565
4582
|
updateWorkspace,
|
|
4566
4583
|
upsertRoute,
|
|
@@ -530,6 +530,51 @@ declare function createKloksSnapshot(version?: string, surface?: ExportSymbolEnt
|
|
|
530
530
|
*/
|
|
531
531
|
declare function diffContractSnapshots(previous: ContractSnapshot, current: ContractSnapshot): ContractDiffResult;
|
|
532
532
|
|
|
533
|
+
/**
|
|
534
|
+
* @file serviceUiSchema.ts
|
|
535
|
+
* @description Formal typed and versioned Service UI Schema contracts for the SKIPO ecosystem.
|
|
536
|
+
* Defines canonical composition from Service -> UI -> Page -> Section -> Component -> AssetRef.
|
|
537
|
+
*/
|
|
538
|
+
type UIRequirementMode = 'required' | 'optional' | 'none';
|
|
539
|
+
interface AssetRef {
|
|
540
|
+
packageId: string;
|
|
541
|
+
packageVersion: string;
|
|
542
|
+
exportPath: string;
|
|
543
|
+
assetId: string;
|
|
544
|
+
assetVersion: string;
|
|
545
|
+
}
|
|
546
|
+
interface OperationBinding {
|
|
547
|
+
operationId: string;
|
|
548
|
+
uiPath: string;
|
|
549
|
+
}
|
|
550
|
+
interface ComponentDescriptor {
|
|
551
|
+
name: string;
|
|
552
|
+
assetRef: AssetRef;
|
|
553
|
+
description?: string;
|
|
554
|
+
}
|
|
555
|
+
interface SectionDescriptor {
|
|
556
|
+
name: string;
|
|
557
|
+
assetRef: AssetRef;
|
|
558
|
+
components: ComponentDescriptor[];
|
|
559
|
+
description?: string;
|
|
560
|
+
}
|
|
561
|
+
interface PageDescriptor {
|
|
562
|
+
name: string;
|
|
563
|
+
sections: SectionDescriptor[];
|
|
564
|
+
description?: string;
|
|
565
|
+
}
|
|
566
|
+
interface ServiceUISchema {
|
|
567
|
+
schemaId: string;
|
|
568
|
+
schemaVersion: string;
|
|
569
|
+
serviceId: string;
|
|
570
|
+
requirementMode: UIRequirementMode;
|
|
571
|
+
pages: PageDescriptor[];
|
|
572
|
+
sections: SectionDescriptor[];
|
|
573
|
+
components: ComponentDescriptor[];
|
|
574
|
+
assetRefs: AssetRef[];
|
|
575
|
+
operationBindings: OperationBinding[];
|
|
576
|
+
}
|
|
577
|
+
|
|
533
578
|
declare const KLOKS_CANONICAL_CONTRACT: {
|
|
534
579
|
package: string;
|
|
535
580
|
version: string;
|
|
@@ -549,4 +594,4 @@ declare const KLOKS_CANONICAL_CONTRACT: {
|
|
|
549
594
|
validateCompatibility: (consumerSymbols?: string[]) => CompatibilityCheckResult;
|
|
550
595
|
};
|
|
551
596
|
|
|
552
|
-
export { type AudioBusConfig, AudioBusConfigSchema, type AudioHardwareState, AudioHardwareStateSchema, type BackendOperation, BackendOperationSchema, type CompatibilityCheckResult, type ContractDiffResult, type ContractSnapshot, ContractSnapshotSchema, type ExportSymbolEntry, type GraphEntityMetadata, GraphEntityMetadataSchema, KLOKS_CANONICAL_CONTRACT, KLOKS_PUBLIC_SURFACE, type MidiCommandType, MidiCommandTypeSchema, type MidiEventPayload, MidiEventPayloadSchema, type NodeDimensions2D, NodeDimensions2DSchema, type NodeHeaderStyle, NodeHeaderStyleSchema, type NodeScreenRect2D, NodeScreenRect2DSchema, type PublicContractDefinition, PublicContractDefinitionSchema, QWNSR_REQUIRED_SURFACE, type SocketDirection, SocketDirectionSchema, type SocketGeometryConfig, SocketGeometryConfigSchema, type SocketPosition2D, SocketPosition2DSchema, type SocketStyleConfig, SocketStyleConfigSchema, type WireAnimationConfig, WireAnimationConfigSchema, type WireCurveStyle, WireCurveStyleSchema, type WireEndpoint2D, WireEndpoint2DSchema, type WireVisualConfig, WireVisualConfigSchema, createKloksSnapshot, diffContractSnapshots, validateConsumerSurfaceCompatibility };
|
|
597
|
+
export { type AssetRef, type AudioBusConfig, AudioBusConfigSchema, type AudioHardwareState, AudioHardwareStateSchema, type BackendOperation, BackendOperationSchema, type CompatibilityCheckResult, type ComponentDescriptor, type ContractDiffResult, type ContractSnapshot, ContractSnapshotSchema, type ExportSymbolEntry, type GraphEntityMetadata, GraphEntityMetadataSchema, KLOKS_CANONICAL_CONTRACT, KLOKS_PUBLIC_SURFACE, type MidiCommandType, MidiCommandTypeSchema, type MidiEventPayload, MidiEventPayloadSchema, type NodeDimensions2D, NodeDimensions2DSchema, type NodeHeaderStyle, NodeHeaderStyleSchema, type NodeScreenRect2D, NodeScreenRect2DSchema, type OperationBinding, type PageDescriptor, type PublicContractDefinition, PublicContractDefinitionSchema, QWNSR_REQUIRED_SURFACE, type SectionDescriptor, type ServiceUISchema, type SocketDirection, SocketDirectionSchema, type SocketGeometryConfig, SocketGeometryConfigSchema, type SocketPosition2D, SocketPosition2DSchema, type SocketStyleConfig, SocketStyleConfigSchema, type UIRequirementMode, type WireAnimationConfig, WireAnimationConfigSchema, type WireCurveStyle, WireCurveStyleSchema, type WireEndpoint2D, WireEndpoint2DSchema, type WireVisualConfig, WireVisualConfigSchema, createKloksSnapshot, diffContractSnapshots, validateConsumerSurfaceCompatibility };
|
|
@@ -2,6 +2,8 @@ import * as _ultrst_armada_krnl from '@ultrst-armada/krnl';
|
|
|
2
2
|
import { ServiceDefinition, IService, EndpointDescriptor, ProtocolAdapter } from '@ultrst-armada/krnl';
|
|
3
3
|
import { AdminDatabaseClusterConfig, DatabaseConnectionEntry, UserStorageConnection, AuthState, UserAccount, UserRole, UserWorkspaceRecord } from '@ultrst-armada/kloks/state-graph';
|
|
4
4
|
export { AuthState, UserAccount, UserRole, UserSession, UserStorageConnection, UserWorkspaceRecord } from '@ultrst-armada/kloks/state-graph';
|
|
5
|
+
import * as _kloks_contracts from '@ultrst-armada/kloks/contracts';
|
|
6
|
+
import { ServiceUISchema } from '@ultrst-armada/kloks/contracts';
|
|
5
7
|
|
|
6
8
|
interface SystemEnvironmentStatus {
|
|
7
9
|
databaseUrlConfigured: boolean;
|
|
@@ -20,7 +22,10 @@ interface SystemTelemetry {
|
|
|
20
22
|
nodeVersion?: string;
|
|
21
23
|
activeConnections: number;
|
|
22
24
|
}
|
|
25
|
+
|
|
23
26
|
declare class SystemDbService {
|
|
27
|
+
static readonly ui: ServiceUISchema;
|
|
28
|
+
readonly ui: ServiceUISchema;
|
|
24
29
|
private envStatus;
|
|
25
30
|
private telemetry;
|
|
26
31
|
private cluster;
|
|
@@ -59,6 +64,8 @@ declare const systemDbService: SystemDbService;
|
|
|
59
64
|
|
|
60
65
|
type StorageListener = () => void;
|
|
61
66
|
declare class StorageService {
|
|
67
|
+
static readonly ui: ServiceUISchema;
|
|
68
|
+
readonly ui: ServiceUISchema;
|
|
62
69
|
private connections;
|
|
63
70
|
private clusterConfig;
|
|
64
71
|
private listeners;
|
|
@@ -131,6 +138,8 @@ interface IAuthStore {
|
|
|
131
138
|
}
|
|
132
139
|
|
|
133
140
|
declare class AuthService {
|
|
141
|
+
static readonly ui: ServiceUISchema;
|
|
142
|
+
readonly ui: ServiceUISchema;
|
|
134
143
|
users: Map<string, UserAccount>;
|
|
135
144
|
currentUser: Omit<UserAccount, 'passwordHash'> | null;
|
|
136
145
|
token: string | null;
|
|
@@ -243,6 +252,30 @@ declare function updateWorkspace(store: any, workspaceId: string, updates: Parti
|
|
|
243
252
|
declare function deleteWorkspace(store: any, workspaceId: string): Promise<boolean>;
|
|
244
253
|
declare function setActiveWorkspace(store: any, workspaceId: string): void;
|
|
245
254
|
|
|
255
|
+
/**
|
|
256
|
+
* @file auth.ui.ts
|
|
257
|
+
* @description Typed and versioned Service UI Schema for AuthService.
|
|
258
|
+
* Declares REQUIRED UI mode, canonical FLOKS asset bindings, and operation mappings.
|
|
259
|
+
*/
|
|
260
|
+
|
|
261
|
+
declare const AuthServiceUISchema: ServiceUISchema;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* @file storage.ui.ts
|
|
265
|
+
* @description Typed and versioned Service UI Schema for StorageService.
|
|
266
|
+
* Declares OPTIONAL UI mode and canonical FLOKS WorkspaceTilesMenu asset bindings.
|
|
267
|
+
*/
|
|
268
|
+
|
|
269
|
+
declare const StorageServiceUISchema: ServiceUISchema;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* @file systemDb.ui.ts
|
|
273
|
+
* @description Typed and versioned Service UI Schema for SystemDbService.
|
|
274
|
+
* Declares NONE requirement mode — system database configuration has no required frontend UI component.
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
declare const SystemDbServiceUISchema: ServiceUISchema;
|
|
278
|
+
|
|
246
279
|
declare const AuthClientServiceDefinition: ServiceDefinition;
|
|
247
280
|
declare const AuthClientServiceFacade: {
|
|
248
281
|
id: string;
|
|
@@ -252,6 +285,7 @@ declare const AuthClientServiceFacade: {
|
|
|
252
285
|
deployment: "local";
|
|
253
286
|
definition: ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
|
|
254
287
|
service: AuthService;
|
|
288
|
+
ui: _kloks_contracts.ServiceUISchema;
|
|
255
289
|
createInstance: () => _ultrst_armada_krnl.ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
|
|
256
290
|
execute: <TIn = unknown, TOut = unknown>(op: string, input?: TIn) => Promise<TOut>;
|
|
257
291
|
};
|
|
@@ -264,6 +298,7 @@ declare const StorageClientServiceFacade: {
|
|
|
264
298
|
deployment: "local";
|
|
265
299
|
definition: ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
|
|
266
300
|
service: StorageService;
|
|
301
|
+
ui: _kloks_contracts.ServiceUISchema;
|
|
267
302
|
createInstance: () => _ultrst_armada_krnl.ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
|
|
268
303
|
execute: <TIn = unknown, TOut = unknown>(op: string, input?: TIn) => Promise<TOut>;
|
|
269
304
|
};
|
|
@@ -276,6 +311,7 @@ declare const SystemDbClientServiceFacade: {
|
|
|
276
311
|
deployment: "local";
|
|
277
312
|
definition: ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
|
|
278
313
|
service: SystemDbService;
|
|
314
|
+
ui: _kloks_contracts.ServiceUISchema;
|
|
279
315
|
createInstance: () => _ultrst_armada_krnl.ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
|
|
280
316
|
execute: <TIn = unknown, TOut = unknown>(op: string, input?: TIn) => Promise<TOut>;
|
|
281
317
|
};
|
|
@@ -331,4 +367,4 @@ interface ProtocolExposureHandle {
|
|
|
331
367
|
declare function exposeServiceD(adapter?: ProtocolAdapter, port?: number): Promise<ProtocolExposureHandle>;
|
|
332
368
|
declare const ServiceDFacade: ServiceFacade;
|
|
333
369
|
|
|
334
|
-
export { AuthClientServiceDefinition, AuthClientServiceFacade, type AuthListener, AuthService, CLEAN_DATABASE_CLUSTER, type CounterState, DEFAULT_CONNECTIONS, type IAuthStore, type MathInput, type ProtocolExposureHandle, STORAGE_KEY_CONNECTIONS, ServiceADefinition, ServiceAFacade, ServiceBDefinition, ServiceBFacade, ServiceCDefinition, ServiceCFacade, ServiceDDefinition, ServiceDFacade, type ServiceFacade, StorageClientServiceDefinition, StorageClientServiceFacade, StorageService, SystemDbClientServiceDefinition, SystemDbClientServiceFacade, SystemDbService, type SystemEnvironmentStatus, type SystemTelemetry, type TelemetryEvents, authService, clearSession, createServiceB, createServiceC, createWorkspace, deleteWorkspace, exposeServiceD, fetchWorkspaces, loadDatabase, loginAdmin, loginUser, persistDatabase, register, restoreSession, setActiveWorkspace, setSession, storageService, systemDbService, updateWorkspace, verifyPassword };
|
|
370
|
+
export { AuthClientServiceDefinition, AuthClientServiceFacade, type AuthListener, AuthService, AuthServiceUISchema, CLEAN_DATABASE_CLUSTER, type CounterState, DEFAULT_CONNECTIONS, type IAuthStore, type MathInput, type ProtocolExposureHandle, STORAGE_KEY_CONNECTIONS, ServiceADefinition, ServiceAFacade, ServiceBDefinition, ServiceBFacade, ServiceCDefinition, ServiceCFacade, ServiceDDefinition, ServiceDFacade, type ServiceFacade, StorageClientServiceDefinition, StorageClientServiceFacade, StorageService, StorageServiceUISchema, SystemDbClientServiceDefinition, SystemDbClientServiceFacade, SystemDbService, SystemDbServiceUISchema, type SystemEnvironmentStatus, type SystemTelemetry, type TelemetryEvents, authService, clearSession, createServiceB, createServiceC, createWorkspace, deleteWorkspace, exposeServiceD, fetchWorkspaces, loadDatabase, loginAdmin, loginUser, persistDatabase, register, restoreSession, setActiveWorkspace, setSession, storageService, systemDbService, updateWorkspace, verifyPassword };
|
|
@@ -744,9 +744,132 @@ function setActiveWorkspace(store, workspaceId) {
|
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
746
|
|
|
747
|
+
// src/client-services/authService/auth.ui.ts
|
|
748
|
+
var AuthServiceUISchema = {
|
|
749
|
+
schemaId: "kloks.service.auth.ui",
|
|
750
|
+
schemaVersion: "1.0.0",
|
|
751
|
+
serviceId: "kloks.service.auth",
|
|
752
|
+
requirementMode: "required",
|
|
753
|
+
pages: [
|
|
754
|
+
{
|
|
755
|
+
name: "Auth.ui",
|
|
756
|
+
description: "Canonical authentication page wrapper",
|
|
757
|
+
sections: [
|
|
758
|
+
{
|
|
759
|
+
name: "Auth.ui.LoginSection",
|
|
760
|
+
description: "Login and registration section backed by canonical FLOKS AuthPage",
|
|
761
|
+
assetRef: {
|
|
762
|
+
packageId: "@ultrst-armada/floks",
|
|
763
|
+
packageVersion: "^1.2.3",
|
|
764
|
+
exportPath: "ui",
|
|
765
|
+
assetId: "AuthPage",
|
|
766
|
+
assetVersion: "1.0.0"
|
|
767
|
+
},
|
|
768
|
+
components: [
|
|
769
|
+
{
|
|
770
|
+
name: "Auth.ui.LoginSection.AuthPage",
|
|
771
|
+
assetRef: {
|
|
772
|
+
packageId: "@ultrst-armada/floks",
|
|
773
|
+
packageVersion: "^1.2.3",
|
|
774
|
+
exportPath: "ui",
|
|
775
|
+
assetId: "AuthPage",
|
|
776
|
+
assetVersion: "1.0.0"
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
name: "Auth.ui.LoginSection.LoginModal",
|
|
781
|
+
assetRef: {
|
|
782
|
+
packageId: "@ultrst-armada/floks",
|
|
783
|
+
packageVersion: "^1.2.3",
|
|
784
|
+
exportPath: "ui",
|
|
785
|
+
assetId: "LoginModal",
|
|
786
|
+
assetVersion: "1.0.0"
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
]
|
|
790
|
+
}
|
|
791
|
+
]
|
|
792
|
+
}
|
|
793
|
+
],
|
|
794
|
+
sections: [
|
|
795
|
+
{
|
|
796
|
+
name: "Auth.ui.LoginSection",
|
|
797
|
+
assetRef: {
|
|
798
|
+
packageId: "@ultrst-armada/floks",
|
|
799
|
+
packageVersion: "^1.2.3",
|
|
800
|
+
exportPath: "ui",
|
|
801
|
+
assetId: "AuthPage",
|
|
802
|
+
assetVersion: "1.0.0"
|
|
803
|
+
},
|
|
804
|
+
components: [
|
|
805
|
+
{
|
|
806
|
+
name: "Auth.ui.LoginSection.AuthPage",
|
|
807
|
+
assetRef: {
|
|
808
|
+
packageId: "@ultrst-armada/floks",
|
|
809
|
+
packageVersion: "^1.2.3",
|
|
810
|
+
exportPath: "ui",
|
|
811
|
+
assetId: "AuthPage",
|
|
812
|
+
assetVersion: "1.0.0"
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
]
|
|
816
|
+
}
|
|
817
|
+
],
|
|
818
|
+
components: [
|
|
819
|
+
{
|
|
820
|
+
name: "AuthPage",
|
|
821
|
+
assetRef: {
|
|
822
|
+
packageId: "@ultrst-armada/floks",
|
|
823
|
+
packageVersion: "^1.2.3",
|
|
824
|
+
exportPath: "ui",
|
|
825
|
+
assetId: "AuthPage",
|
|
826
|
+
assetVersion: "1.0.0"
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
name: "LoginModal",
|
|
831
|
+
assetRef: {
|
|
832
|
+
packageId: "@ultrst-armada/floks",
|
|
833
|
+
packageVersion: "^1.2.3",
|
|
834
|
+
exportPath: "ui",
|
|
835
|
+
assetId: "LoginModal",
|
|
836
|
+
assetVersion: "1.0.0"
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
],
|
|
840
|
+
assetRefs: [
|
|
841
|
+
{
|
|
842
|
+
packageId: "@ultrst-armada/floks",
|
|
843
|
+
packageVersion: "^1.2.3",
|
|
844
|
+
exportPath: "ui",
|
|
845
|
+
assetId: "AuthPage",
|
|
846
|
+
assetVersion: "1.0.0"
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
packageId: "@ultrst-armada/floks",
|
|
850
|
+
packageVersion: "^1.2.3",
|
|
851
|
+
exportPath: "ui",
|
|
852
|
+
assetId: "LoginModal",
|
|
853
|
+
assetVersion: "1.0.0"
|
|
854
|
+
}
|
|
855
|
+
],
|
|
856
|
+
operationBindings: [
|
|
857
|
+
{
|
|
858
|
+
operationId: "AuthClientService.login",
|
|
859
|
+
uiPath: "Auth.ui.LoginSection"
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
operationId: "AuthClientService.register",
|
|
863
|
+
uiPath: "Auth.ui.LoginSection"
|
|
864
|
+
}
|
|
865
|
+
]
|
|
866
|
+
};
|
|
867
|
+
|
|
747
868
|
// src/client-services/authService/authService.ts
|
|
748
869
|
var STORAGE_KEY_USER2 = "docustack_user_account";
|
|
749
870
|
var AuthService = class {
|
|
871
|
+
static ui = AuthServiceUISchema;
|
|
872
|
+
ui = AuthServiceUISchema;
|
|
750
873
|
users = /* @__PURE__ */ new Map();
|
|
751
874
|
currentUser = null;
|
|
752
875
|
token = null;
|
|
@@ -880,8 +1003,23 @@ var AuthService = class {
|
|
|
880
1003
|
};
|
|
881
1004
|
var authService = new AuthService();
|
|
882
1005
|
|
|
1006
|
+
// src/client-services/systemDb.ui.ts
|
|
1007
|
+
var SystemDbServiceUISchema = {
|
|
1008
|
+
schemaId: "kloks.service.systemDb.ui",
|
|
1009
|
+
schemaVersion: "1.0.0",
|
|
1010
|
+
serviceId: "kloks.service.systemDb",
|
|
1011
|
+
requirementMode: "none",
|
|
1012
|
+
pages: [],
|
|
1013
|
+
sections: [],
|
|
1014
|
+
components: [],
|
|
1015
|
+
assetRefs: [],
|
|
1016
|
+
operationBindings: []
|
|
1017
|
+
};
|
|
1018
|
+
|
|
883
1019
|
// src/client-services/systemDbService.ts
|
|
884
1020
|
var SystemDbService = class {
|
|
1021
|
+
static ui = SystemDbServiceUISchema;
|
|
1022
|
+
ui = SystemDbServiceUISchema;
|
|
885
1023
|
envStatus = {
|
|
886
1024
|
databaseUrlConfigured: false,
|
|
887
1025
|
databaseUrlMasked: null,
|
|
@@ -1047,8 +1185,100 @@ var CLEAN_DATABASE_CLUSTER = {
|
|
|
1047
1185
|
};
|
|
1048
1186
|
var DEFAULT_CONNECTIONS = [];
|
|
1049
1187
|
|
|
1188
|
+
// src/client-services/storageService/storage.ui.ts
|
|
1189
|
+
var StorageServiceUISchema = {
|
|
1190
|
+
schemaId: "kloks.service.storage.ui",
|
|
1191
|
+
schemaVersion: "1.0.0",
|
|
1192
|
+
serviceId: "kloks.service.storage",
|
|
1193
|
+
requirementMode: "optional",
|
|
1194
|
+
pages: [
|
|
1195
|
+
{
|
|
1196
|
+
name: "Storage.ui",
|
|
1197
|
+
description: "Workspace and storage connection page",
|
|
1198
|
+
sections: [
|
|
1199
|
+
{
|
|
1200
|
+
name: "Storage.ui.TilesSection",
|
|
1201
|
+
description: "Workspace isolation and storage tiles menu",
|
|
1202
|
+
assetRef: {
|
|
1203
|
+
packageId: "@ultrst-armada/floks",
|
|
1204
|
+
packageVersion: "^1.2.3",
|
|
1205
|
+
exportPath: "ui",
|
|
1206
|
+
assetId: "WorkspaceTilesMenu",
|
|
1207
|
+
assetVersion: "1.0.0"
|
|
1208
|
+
},
|
|
1209
|
+
components: [
|
|
1210
|
+
{
|
|
1211
|
+
name: "Storage.ui.TilesSection.WorkspaceTilesMenu",
|
|
1212
|
+
assetRef: {
|
|
1213
|
+
packageId: "@ultrst-armada/floks",
|
|
1214
|
+
packageVersion: "^1.2.3",
|
|
1215
|
+
exportPath: "ui",
|
|
1216
|
+
assetId: "WorkspaceTilesMenu",
|
|
1217
|
+
assetVersion: "1.0.0"
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
]
|
|
1221
|
+
}
|
|
1222
|
+
]
|
|
1223
|
+
}
|
|
1224
|
+
],
|
|
1225
|
+
sections: [
|
|
1226
|
+
{
|
|
1227
|
+
name: "Storage.ui.TilesSection",
|
|
1228
|
+
assetRef: {
|
|
1229
|
+
packageId: "@ultrst-armada/floks",
|
|
1230
|
+
packageVersion: "^1.2.3",
|
|
1231
|
+
exportPath: "ui",
|
|
1232
|
+
assetId: "WorkspaceTilesMenu",
|
|
1233
|
+
assetVersion: "1.0.0"
|
|
1234
|
+
},
|
|
1235
|
+
components: [
|
|
1236
|
+
{
|
|
1237
|
+
name: "Storage.ui.TilesSection.WorkspaceTilesMenu",
|
|
1238
|
+
assetRef: {
|
|
1239
|
+
packageId: "@ultrst-armada/floks",
|
|
1240
|
+
packageVersion: "^1.2.3",
|
|
1241
|
+
exportPath: "ui",
|
|
1242
|
+
assetId: "WorkspaceTilesMenu",
|
|
1243
|
+
assetVersion: "1.0.0"
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
]
|
|
1247
|
+
}
|
|
1248
|
+
],
|
|
1249
|
+
components: [
|
|
1250
|
+
{
|
|
1251
|
+
name: "WorkspaceTilesMenu",
|
|
1252
|
+
assetRef: {
|
|
1253
|
+
packageId: "@ultrst-armada/floks",
|
|
1254
|
+
packageVersion: "^1.2.3",
|
|
1255
|
+
exportPath: "ui",
|
|
1256
|
+
assetId: "WorkspaceTilesMenu",
|
|
1257
|
+
assetVersion: "1.0.0"
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
],
|
|
1261
|
+
assetRefs: [
|
|
1262
|
+
{
|
|
1263
|
+
packageId: "@ultrst-armada/floks",
|
|
1264
|
+
packageVersion: "^1.2.3",
|
|
1265
|
+
exportPath: "ui",
|
|
1266
|
+
assetId: "WorkspaceTilesMenu",
|
|
1267
|
+
assetVersion: "1.0.0"
|
|
1268
|
+
}
|
|
1269
|
+
],
|
|
1270
|
+
operationBindings: [
|
|
1271
|
+
{
|
|
1272
|
+
operationId: "StorageClientService.getConnections",
|
|
1273
|
+
uiPath: "Storage.ui.TilesSection"
|
|
1274
|
+
}
|
|
1275
|
+
]
|
|
1276
|
+
};
|
|
1277
|
+
|
|
1050
1278
|
// src/client-services/storageService/storageService.ts
|
|
1051
1279
|
var StorageService = class {
|
|
1280
|
+
static ui = StorageServiceUISchema;
|
|
1281
|
+
ui = StorageServiceUISchema;
|
|
1052
1282
|
connections = [];
|
|
1053
1283
|
clusterConfig = CLEAN_DATABASE_CLUSTER;
|
|
1054
1284
|
listeners = /* @__PURE__ */ new Set();
|
|
@@ -1287,6 +1517,7 @@ var AuthClientServiceFacade = {
|
|
|
1287
1517
|
deployment: "local",
|
|
1288
1518
|
definition: AuthClientServiceDefinition,
|
|
1289
1519
|
service: authService,
|
|
1520
|
+
ui: AuthServiceUISchema,
|
|
1290
1521
|
createInstance: () => createService(AuthClientServiceDefinition),
|
|
1291
1522
|
execute: async (op, input) => {
|
|
1292
1523
|
await authClientInstance.start();
|
|
@@ -1314,6 +1545,7 @@ var StorageClientServiceFacade = {
|
|
|
1314
1545
|
deployment: "local",
|
|
1315
1546
|
definition: StorageClientServiceDefinition,
|
|
1316
1547
|
service: storageService,
|
|
1548
|
+
ui: StorageServiceUISchema,
|
|
1317
1549
|
createInstance: () => createService(StorageClientServiceDefinition),
|
|
1318
1550
|
execute: async (op, input) => {
|
|
1319
1551
|
await storageClientInstance.start();
|
|
@@ -1346,6 +1578,7 @@ var SystemDbClientServiceFacade = {
|
|
|
1346
1578
|
deployment: "local",
|
|
1347
1579
|
definition: SystemDbClientServiceDefinition,
|
|
1348
1580
|
service: systemDbService,
|
|
1581
|
+
ui: SystemDbServiceUISchema,
|
|
1349
1582
|
createInstance: () => createService(SystemDbClientServiceDefinition),
|
|
1350
1583
|
execute: async (op, input) => {
|
|
1351
1584
|
await systemDbClientInstance.start();
|
|
@@ -1556,6 +1789,7 @@ export {
|
|
|
1556
1789
|
AuthClientServiceDefinition,
|
|
1557
1790
|
AuthClientServiceFacade,
|
|
1558
1791
|
AuthService,
|
|
1792
|
+
AuthServiceUISchema,
|
|
1559
1793
|
CLEAN_DATABASE_CLUSTER,
|
|
1560
1794
|
DEFAULT_CONNECTIONS,
|
|
1561
1795
|
STORAGE_KEY_CONNECTIONS,
|
|
@@ -1570,9 +1804,11 @@ export {
|
|
|
1570
1804
|
StorageClientServiceDefinition,
|
|
1571
1805
|
StorageClientServiceFacade,
|
|
1572
1806
|
StorageService,
|
|
1807
|
+
StorageServiceUISchema,
|
|
1573
1808
|
SystemDbClientServiceDefinition,
|
|
1574
1809
|
SystemDbClientServiceFacade,
|
|
1575
1810
|
SystemDbService,
|
|
1811
|
+
SystemDbServiceUISchema,
|
|
1576
1812
|
authService,
|
|
1577
1813
|
clearSession,
|
|
1578
1814
|
createServiceB,
|
|
@@ -1,8 +1,69 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://skipo.dev/schemas/kloks-manifest.v1.json",
|
|
3
3
|
"package": "@kloks/services",
|
|
4
|
+
"packageType": "backend",
|
|
4
5
|
"version": "1.0.0",
|
|
5
6
|
"services": [
|
|
7
|
+
{
|
|
8
|
+
"id": "kloks.service.auth",
|
|
9
|
+
"name": "AuthClientService",
|
|
10
|
+
"version": "1.0.0",
|
|
11
|
+
"description": "Canonical user and workspace authentication service.",
|
|
12
|
+
"backend": {
|
|
13
|
+
"package": "@kloks/services",
|
|
14
|
+
"export": "AuthClientServiceFacade",
|
|
15
|
+
"facade": "AuthClientServiceFacade"
|
|
16
|
+
},
|
|
17
|
+
"ui": {
|
|
18
|
+
"requirementMode": "required",
|
|
19
|
+
"schema": "AuthServiceUISchema",
|
|
20
|
+
"page": "Auth.ui",
|
|
21
|
+
"section": "Auth.ui.LoginSection",
|
|
22
|
+
"component": "AuthPage",
|
|
23
|
+
"package": "@ultrst-armada/floks",
|
|
24
|
+
"export": "ui"
|
|
25
|
+
},
|
|
26
|
+
"modes": ["client", "backend"],
|
|
27
|
+
"targets": { "backend": ["BackendFacade.services"] }
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "kloks.service.storage",
|
|
31
|
+
"name": "StorageClientService",
|
|
32
|
+
"version": "1.0.0",
|
|
33
|
+
"description": "User storage connections and cluster persistence service.",
|
|
34
|
+
"backend": {
|
|
35
|
+
"package": "@kloks/services",
|
|
36
|
+
"export": "StorageClientServiceFacade",
|
|
37
|
+
"facade": "StorageClientServiceFacade"
|
|
38
|
+
},
|
|
39
|
+
"ui": {
|
|
40
|
+
"requirementMode": "optional",
|
|
41
|
+
"schema": "StorageServiceUISchema",
|
|
42
|
+
"page": "Storage.ui",
|
|
43
|
+
"section": "Storage.ui.TilesSection",
|
|
44
|
+
"component": "WorkspaceTilesMenu",
|
|
45
|
+
"package": "@ultrst-armada/floks",
|
|
46
|
+
"export": "ui"
|
|
47
|
+
},
|
|
48
|
+
"modes": ["client", "backend"],
|
|
49
|
+
"targets": { "backend": ["BackendFacade.services"] }
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "kloks.service.systemDb",
|
|
53
|
+
"name": "SystemDbClientService",
|
|
54
|
+
"version": "1.0.0",
|
|
55
|
+
"description": "System database environment and cluster health monitoring.",
|
|
56
|
+
"backend": {
|
|
57
|
+
"package": "@kloks/services",
|
|
58
|
+
"export": "SystemDbClientServiceFacade",
|
|
59
|
+
"facade": "SystemDbClientServiceFacade"
|
|
60
|
+
},
|
|
61
|
+
"ui": {
|
|
62
|
+
"requirementMode": "none"
|
|
63
|
+
},
|
|
64
|
+
"modes": ["client", "backend"],
|
|
65
|
+
"targets": { "backend": ["BackendFacade.services"] }
|
|
66
|
+
},
|
|
6
67
|
{
|
|
7
68
|
"id": "service-a",
|
|
8
69
|
"name": "Canonical Service A (Pure)",
|
|
@@ -20,11 +20,12 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
|
-
"build": "tsup src/index.ts --format esm --dts --clean --external @kloks/state-graph --external ws",
|
|
23
|
+
"build": "tsup src/index.ts --format esm --dts --clean --external @kloks/state-graph --external @kloks/contracts --external ws",
|
|
24
24
|
"typecheck": "tsc --noEmit",
|
|
25
25
|
"clean": "rm -rf dist"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
+
"@kloks/contracts": "workspace:*",
|
|
28
29
|
"@kloks/state-graph": "workspace:*"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
@@ -6,6 +6,22 @@ import {
|
|
|
6
6
|
ViewHandle,
|
|
7
7
|
instantiateSubgraph
|
|
8
8
|
} from "./chunk-S22PMERU.js";
|
|
9
|
+
import {
|
|
10
|
+
AttractionEngine,
|
|
11
|
+
GhostInferenceEngine,
|
|
12
|
+
GhostLayoutResolver,
|
|
13
|
+
GhostTracePathBuilder,
|
|
14
|
+
calculateSocketCoordinates,
|
|
15
|
+
getBeamPoints,
|
|
16
|
+
useMagneticTraces
|
|
17
|
+
} from "./chunk-JXDJZSFW.js";
|
|
18
|
+
import "./chunk-RHRXPY2U.js";
|
|
19
|
+
import {
|
|
20
|
+
ConnectionRuleStore,
|
|
21
|
+
HandleTypeRegistry,
|
|
22
|
+
WireTypeRegistry,
|
|
23
|
+
initializeDefaultGraphRules
|
|
24
|
+
} from "./chunk-TZOL3RN7.js";
|
|
9
25
|
import {
|
|
10
26
|
BullMQAdapter,
|
|
11
27
|
CommandBus,
|
|
@@ -23,22 +39,6 @@ import {
|
|
|
23
39
|
useSkipoBind,
|
|
24
40
|
useSkipoState
|
|
25
41
|
} from "./chunk-SHIBCPGQ.js";
|
|
26
|
-
import {
|
|
27
|
-
AttractionEngine,
|
|
28
|
-
GhostInferenceEngine,
|
|
29
|
-
GhostLayoutResolver,
|
|
30
|
-
GhostTracePathBuilder,
|
|
31
|
-
calculateSocketCoordinates,
|
|
32
|
-
getBeamPoints,
|
|
33
|
-
useMagneticTraces
|
|
34
|
-
} from "./chunk-JXDJZSFW.js";
|
|
35
|
-
import "./chunk-RHRXPY2U.js";
|
|
36
|
-
import {
|
|
37
|
-
ConnectionRuleStore,
|
|
38
|
-
HandleTypeRegistry,
|
|
39
|
-
WireTypeRegistry,
|
|
40
|
-
initializeDefaultGraphRules
|
|
41
|
-
} from "./chunk-TZOL3RN7.js";
|
|
42
42
|
import {
|
|
43
43
|
CommandApi,
|
|
44
44
|
GhostStore,
|