@ultrst-armada/kloks 1.2.1 → 1.3.0
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/chunk-BM4QMVPA.js +338 -0
- package/packages/backend/dist/{chunk-MN54ZIKZ.js → chunk-KX3OTBQ3.js} +309 -4
- package/packages/backend/dist/index.d.ts +144 -3
- package/packages/backend/dist/index.js +48 -17
- package/packages/backend/dist/krnl-services.js +2 -2
- package/packages/backend/dist/services/index.d.ts +168 -1
- package/packages/backend/dist/services/index.js +15 -3
- package/packages/backend/dist/srkl/index.d.ts +108 -1
- package/packages/backend/dist/srkl/index.js +15 -1
- package/packages/state-graph/dist/index.js +11 -11
- package/packages/backend/dist/chunk-P4HL4C6V.js +0 -149
- package/packages/backend/dist/{chunk-OYQKQAEF.js → chunk-CU7RZBMF.js} +4 -4
|
@@ -11,9 +11,9 @@ export { BackendContract, BackendRegistry, CallbackDefinition, ConcurrencyConfli
|
|
|
11
11
|
export { B as BackendClient, a as BackendClientOptions, b as BackendResolver, c as BackendResolverOptions, C as CallbackFn, d as CallbackRegistry, D as DomainProxy, E as ErrorHandler, e as EventBus, f as EventHandler, F as FrontendSession, g as FrontendSessionOptions, G as GapHandler, H as HTTPTransport, h as HTTPTransportOptions, I as ITransport, M as MessageHandler, S as SequenceCheckResult, i as SequenceTracker, W as WebSocketTransport, j as WebSocketTransportOptions, k as createBackendClient } from './WebSocketTransport-CxUzUfwl.js';
|
|
12
12
|
export { I as IdempotencyManager } from './IdempotencyManager-B5MjK871.js';
|
|
13
13
|
export { BackendClientInstance, BackendProvider, BackendProviderProps, useBackend, useBackendClient } from './client/index.js';
|
|
14
|
-
export { AdaptedStorageConnection, AppAccountManifest, AppServiceDeclaration, CANONICAL_SRKL_URL, EcosystemAccount, EcosystemAccountsRequest, EcosystemAccountsResponse, EcosystemServiceCategory, SrklClient, SrklClientOptions, SrklEcosystemQueryOptions, SrklEcosystemResponse, SrklServiceAccount, UseSrklServicesOptions, UseSrklServicesResult, createSrklClient, getPrimarySrklDeploymentUrl, getSrklAccounts, srklListBackblazeBuckets, useSrklServices } from './srkl/index.js';
|
|
14
|
+
export { AdaptedStorageConnection, AppAccountManifest, AppServiceDeclaration, CANONICAL_SRKL_URL, CredentialRegistryMap, EcosystemAccount, EcosystemAccountsRequest, EcosystemAccountsResponse, EcosystemServiceCategory, KeyMaterial, ServiceAccountEntry, SrklClient, SrklClientOptions, SrklCredentialRegistry, SrklEcosystemQueryOptions, SrklEcosystemResponse, SrklServiceAccount, SrklVaultAccessClient, SrklVaultAccessResponse, UseSrklServicesOptions, UseSrklServicesResult, VaultAccessClientOptions, createSrklClient, decryptVaultBufferInBrowser, getPrimarySrklDeploymentUrl, getSrklAccounts, globalCredentialRegistry, hexToBytes, srklListBackblazeBuckets, srklService, syncSrklAccounts, useSrklServices } from './srkl/index.js';
|
|
15
15
|
export { BackendCommand, DomainService, ExecutableBackendFacade, ExecutionContext, JobDependencyGraph, NormalizedResult, OperationComponent, ResultFlowBridge, ServiceDispatcher, StateUpdateEvent, WorkerExecutionBoundary, createOperationComponent } from './execution/index.js';
|
|
16
|
-
export { CompositeBackend, EndpointGenerator, GeneratedEndpointSummary, LocalService, RemoteServiceProxy, createBackend, createCompositeService, createLocalService, createRemoteService } from './services/index.js';
|
|
16
|
+
export { CompositeBackend, EndpointGenerator, GeneratedEndpointSummary, LOCAL_STORAGE_GRAPHS_PREFIX, LocalService, NodeGraphPersistenceService, NodeGraphValidationResult, RemoteServiceProxy, SaveGraphOptions, UniversalAppEntity, UniversalGraphEdge, UniversalGraphNode, UniversalNodeGraphDocument, UniversalStorageConnection, createBackend, createCompositeService, createLocalService, createRemoteService, exportGraphAsJsonFile, nodeGraphPersistence, parseGraphJsonFile, validateGraphDocument } from './services/index.js';
|
|
17
17
|
import { AssetDataType as AssetDataType$1, AssetChannelType as AssetChannelType$1, GraphFolderInfo as GraphFolderInfo$1, GraphAssetItem as GraphAssetItem$1, SpaceNode, NodeConnection, DawProject } from '@ultrst-armada/kloks/state-graph';
|
|
18
18
|
export { AuthServiceDefinition, AuthServiceFacade, ControlPlaneServiceDefinition, ControlPlaneServiceFacade, DatabaseServiceDefinition, DatabaseServiceFacade, ExecutionServiceDefinition, ExecutionServiceFacade, GeminiServiceDefinition, GeminiServiceFacade, StorageServiceDefinition, StorageServiceFacade, WorkspaceServiceDefinition, WorkspaceServiceFacade } from './krnl-services.js';
|
|
19
19
|
export { EndpointDescriptor, IService, ProtocolAdapter, ServiceDefinition } from '@ultrst-armada/krnl';
|
|
@@ -1109,7 +1109,44 @@ declare function saveWorkspaceGraph(workspaceIdOrSlug: string, graphIdOrName: st
|
|
|
1109
1109
|
declare function deleteWorkspaceGraph(workspaceIdOrSlug: string, graphIdOrName: string): Promise<boolean>;
|
|
1110
1110
|
|
|
1111
1111
|
type ProviderType = 'VERCEL' | 'CLOUDFLARE' | 'AWS' | 'GCP' | 'FASTLY' | 'BACKBLAZE_B2' | 'CLOUDFLARE_R2' | 'SUPABASE' | 'NEON' | 'POSTGRESQL';
|
|
1112
|
+
type NodeType = 'ECOSYSTEM' | 'ECOSYSTEM_HUB' | 'SYSTEM_DATABASE' | 'SYSTEM_BUCKET' | 'ADMIN_CREDENTIALS' | 'APP_GRAPH_NODE' | 'APP' | 'APP_NODE' | 'APP_COMPONENT' | 'DEPLOYMENT' | 'WEIGHT_USER' | 'WEIGHT_RESOURCE' | 'WEIGHT_ACCOUNT' | 'WEIGHT_MULTIPLY' | 'WEIGHT_MODIFIER' | 'URL_NODE' | 'VARIANTS';
|
|
1112
1113
|
type HealthState = 'HEALTHY' | 'DEGRADED' | 'UNHEALTHY';
|
|
1114
|
+
interface SystemDbConfig {
|
|
1115
|
+
databaseUrl?: string;
|
|
1116
|
+
provider?: string;
|
|
1117
|
+
dbName?: string;
|
|
1118
|
+
host?: string;
|
|
1119
|
+
port?: number;
|
|
1120
|
+
ssl?: boolean;
|
|
1121
|
+
selectedTable?: string;
|
|
1122
|
+
adminTable?: string;
|
|
1123
|
+
adminEmailColumn?: string;
|
|
1124
|
+
adminPasswordColumn?: string;
|
|
1125
|
+
adminUsernameColumn?: string;
|
|
1126
|
+
bucketTable?: string;
|
|
1127
|
+
connectionStatus?: 'CONNECTED' | 'DISCONNECTED' | 'ERROR' | 'CONNECTING';
|
|
1128
|
+
lastTestedAt?: string;
|
|
1129
|
+
latencyMs?: number;
|
|
1130
|
+
serverVersion?: string;
|
|
1131
|
+
discoveredTables?: string[];
|
|
1132
|
+
updatedAt?: string;
|
|
1133
|
+
}
|
|
1134
|
+
interface SystemBucketConfig {
|
|
1135
|
+
bucketName?: string;
|
|
1136
|
+
provider?: string;
|
|
1137
|
+
endpoint?: string;
|
|
1138
|
+
region?: string;
|
|
1139
|
+
publicAccess?: boolean;
|
|
1140
|
+
updatedAt?: string;
|
|
1141
|
+
}
|
|
1142
|
+
interface AdminCredentialsConfig {
|
|
1143
|
+
adminEmail?: string;
|
|
1144
|
+
adminSecretKey?: string;
|
|
1145
|
+
depmJwtSecret?: string;
|
|
1146
|
+
apiKey?: string;
|
|
1147
|
+
lastRotatedAt?: string;
|
|
1148
|
+
rotationHistoryCount?: number;
|
|
1149
|
+
}
|
|
1113
1150
|
type AccountTier = 'hobby' | 'pro' | 'enterprise' | 'free' | 'payg' | 'custom';
|
|
1114
1151
|
|
|
1115
1152
|
interface UnifiedResourceMetricItem<T = number> {
|
|
@@ -1371,6 +1408,77 @@ interface DeploymentEntity {
|
|
|
1371
1408
|
resourceRate: number;
|
|
1372
1409
|
createdAt: string;
|
|
1373
1410
|
}
|
|
1411
|
+
interface AggregatedUrlItem {
|
|
1412
|
+
url: string;
|
|
1413
|
+
sourceNodeId: string;
|
|
1414
|
+
sourceNodeName: string;
|
|
1415
|
+
sourceNodeType: NodeType;
|
|
1416
|
+
isDirect: boolean;
|
|
1417
|
+
distance: number;
|
|
1418
|
+
}
|
|
1419
|
+
interface GraphNode {
|
|
1420
|
+
id: string;
|
|
1421
|
+
type: NodeType;
|
|
1422
|
+
x: number;
|
|
1423
|
+
y: number;
|
|
1424
|
+
appId: string;
|
|
1425
|
+
icon?: string;
|
|
1426
|
+
name?: string;
|
|
1427
|
+
componentName?: string;
|
|
1428
|
+
publicLink?: string;
|
|
1429
|
+
urlValue?: string;
|
|
1430
|
+
urls?: string[];
|
|
1431
|
+
aggregatedUrls?: string[];
|
|
1432
|
+
aggregatedUrlItems?: AggregatedUrlItem[];
|
|
1433
|
+
directUrls?: string[];
|
|
1434
|
+
deploymentId?: string;
|
|
1435
|
+
accountId?: string;
|
|
1436
|
+
bubbleTargetType?: 'DOMAIN' | 'DEPLOYMENT';
|
|
1437
|
+
domainUrl?: string;
|
|
1438
|
+
deploymentUrl?: string;
|
|
1439
|
+
weightModifierType?: 'USAGE' | 'USER_DEFINED' | 'ACCOUNT';
|
|
1440
|
+
weightValue?: number;
|
|
1441
|
+
systemDbData?: SystemDbConfig;
|
|
1442
|
+
systemBucketData?: SystemBucketConfig;
|
|
1443
|
+
adminCredsData?: AdminCredentialsConfig;
|
|
1444
|
+
appData?: AppEntity;
|
|
1445
|
+
evolutionScore?: number;
|
|
1446
|
+
redundancyScore?: number;
|
|
1447
|
+
modularityScore?: number;
|
|
1448
|
+
variantsScore?: number;
|
|
1449
|
+
visibilityScore?: number;
|
|
1450
|
+
evolutionStage?: string;
|
|
1451
|
+
ecosystemData?: {
|
|
1452
|
+
connectedAppsCount?: number;
|
|
1453
|
+
health?: HealthState;
|
|
1454
|
+
status?: string;
|
|
1455
|
+
routingRate?: number;
|
|
1456
|
+
redundancyScore?: number;
|
|
1457
|
+
modularityScore?: number;
|
|
1458
|
+
variantsScore?: number;
|
|
1459
|
+
visibilityScore?: number;
|
|
1460
|
+
evolutionScore?: number;
|
|
1461
|
+
};
|
|
1462
|
+
}
|
|
1463
|
+
interface GraphEdge {
|
|
1464
|
+
id: string;
|
|
1465
|
+
appId: string;
|
|
1466
|
+
sourceId: string;
|
|
1467
|
+
targetId: string;
|
|
1468
|
+
sourceSocketId?: string;
|
|
1469
|
+
targetSocketId?: string;
|
|
1470
|
+
label?: string;
|
|
1471
|
+
}
|
|
1472
|
+
interface AppEntity {
|
|
1473
|
+
id: string;
|
|
1474
|
+
name: string;
|
|
1475
|
+
icon: string;
|
|
1476
|
+
description?: string;
|
|
1477
|
+
publicLink: string;
|
|
1478
|
+
folderName?: string;
|
|
1479
|
+
createdAt: string;
|
|
1480
|
+
updatedAt: string;
|
|
1481
|
+
}
|
|
1374
1482
|
|
|
1375
1483
|
declare abstract class BaseResourceFetcher {
|
|
1376
1484
|
abstract readonly provider: ProviderType;
|
|
@@ -1480,4 +1588,37 @@ declare class ResourceFetcherRegistry {
|
|
|
1480
1588
|
static calculateDetailedScore(account?: AccountEntity, deployment?: DeploymentEntity): ResourceCalculationResult;
|
|
1481
1589
|
}
|
|
1482
1590
|
|
|
1483
|
-
|
|
1591
|
+
/**
|
|
1592
|
+
* Calculates the score (0.0 - 1.0) for a weight modifier or source node.
|
|
1593
|
+
* WEIGHT_MULTIPLY itself is not a source score — its inputs are collected by traversal.
|
|
1594
|
+
*/
|
|
1595
|
+
declare function getWeightModifierScore(node: GraphNode, account?: AccountEntity, accounts?: AccountEntity[], nodes?: GraphNode[], edges?: GraphEdge[], deployments?: DeploymentEntity[]): number;
|
|
1596
|
+
/**
|
|
1597
|
+
* Traverses graph to find all terminal weight modifier source nodes reachable from
|
|
1598
|
+
* a deployment node, including traversing through WEIGHT_MULTIPLY aggregator nodes.
|
|
1599
|
+
*/
|
|
1600
|
+
declare function getConnectedWeightModifiers(deploymentNodeId: string, nodes: GraphNode[], edges: GraphEdge[]): GraphNode[];
|
|
1601
|
+
/**
|
|
1602
|
+
* Computes the final combined weight for a deployment node by multiplying all connected
|
|
1603
|
+
* weight modifier/source node scores together (traversing through WEIGHT_MULTIPLY nodes).
|
|
1604
|
+
*/
|
|
1605
|
+
declare function computeDeploymentFinalWeight(deploymentNodeId: string, nodes: GraphNode[], edges: GraphEdge[], accounts: AccountEntity[], deployments: DeploymentEntity[]): number;
|
|
1606
|
+
|
|
1607
|
+
/**
|
|
1608
|
+
* Calculates the score (0.0 - 1.0) for a WEIGHT_RESOURCE node based on real-time account usage metrics.
|
|
1609
|
+
* Dynamically resolves provider-specific fetchers (Vercel, Cloudflare, etc.) using OOP inheritance.
|
|
1610
|
+
* - Active CPU receives the most weight (50% / 0.50) across all services.
|
|
1611
|
+
* - Function Invocations: 15% (0.15).
|
|
1612
|
+
* - Compute Memory / Subrequests: 15% (0.15).
|
|
1613
|
+
* - Edge Requests: 10% (0.10).
|
|
1614
|
+
* - Fast Data Transfer / Bandwidth: 5% (0.05).
|
|
1615
|
+
* - Other compute / network metrics: 5% (0.05).
|
|
1616
|
+
* - Storage category parameters (Functions Storage, Deployment Storage, R2) are strictly EXCLUDED (0%).
|
|
1617
|
+
*/
|
|
1618
|
+
declare function computeUsageWeightScore(account?: AccountEntity, deployment?: DeploymentEntity): number;
|
|
1619
|
+
/**
|
|
1620
|
+
* Traverses from a weight modifier node to find its connected deployment node.
|
|
1621
|
+
*/
|
|
1622
|
+
declare function getConnectedDeploymentNode(weightNodeId: string, nodes: GraphNode[], edges: GraphEdge[]): GraphNode | undefined;
|
|
1623
|
+
|
|
1624
|
+
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, 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, updateCredential, updateWorkspace, upsertRoute, validateServiceDefinition, writeWorkspaceFile };
|
|
@@ -1,12 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CompositeBackend,
|
|
3
|
+
EndpointGenerator,
|
|
4
|
+
LOCAL_STORAGE_GRAPHS_PREFIX,
|
|
5
|
+
NodeGraphPersistenceService,
|
|
6
|
+
createBackend,
|
|
7
|
+
createCompositeService,
|
|
8
|
+
createLocalService,
|
|
9
|
+
createRemoteService,
|
|
10
|
+
exportGraphAsJsonFile,
|
|
11
|
+
nodeGraphPersistence,
|
|
12
|
+
parseGraphJsonFile,
|
|
13
|
+
validateGraphDocument
|
|
14
|
+
} from "./chunk-BM4QMVPA.js";
|
|
1
15
|
import {
|
|
2
16
|
CANONICAL_SRKL_URL,
|
|
3
17
|
SrklClient,
|
|
18
|
+
SrklCredentialRegistry,
|
|
19
|
+
SrklVaultAccessClient,
|
|
4
20
|
createSrklClient,
|
|
21
|
+
decryptVaultBufferInBrowser,
|
|
5
22
|
getPrimarySrklDeploymentUrl,
|
|
6
23
|
getSrklAccounts,
|
|
24
|
+
globalCredentialRegistry,
|
|
25
|
+
hexToBytes,
|
|
7
26
|
srklListBackblazeBuckets,
|
|
27
|
+
srklService,
|
|
28
|
+
syncSrklAccounts,
|
|
8
29
|
useSrklServices
|
|
9
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-KX3OTBQ3.js";
|
|
10
31
|
import "./chunk-LS3HWJBX.js";
|
|
11
32
|
import {
|
|
12
33
|
authorizeB2,
|
|
@@ -15,12 +36,6 @@ import {
|
|
|
15
36
|
b2ListFileNames,
|
|
16
37
|
b2UploadFile
|
|
17
38
|
} from "./chunk-4QEMALXF.js";
|
|
18
|
-
import {
|
|
19
|
-
BaseApiRoute,
|
|
20
|
-
createSSEResponse,
|
|
21
|
-
withAuth,
|
|
22
|
-
withCors
|
|
23
|
-
} from "./chunk-TWCEVES2.js";
|
|
24
39
|
import {
|
|
25
40
|
SyncEngine,
|
|
26
41
|
WorkspaceCloneSyncEngine,
|
|
@@ -41,7 +56,8 @@ import {
|
|
|
41
56
|
StorageServiceFacade,
|
|
42
57
|
WorkspaceServiceDefinition,
|
|
43
58
|
WorkspaceServiceFacade
|
|
44
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-CU7RZBMF.js";
|
|
60
|
+
import "./chunk-IPP4VURQ.js";
|
|
45
61
|
import {
|
|
46
62
|
BackblazeB2Adapter,
|
|
47
63
|
BaseStorageAdapter,
|
|
@@ -61,6 +77,12 @@ import {
|
|
|
61
77
|
formatCanonicalWorkspaceFolderName,
|
|
62
78
|
sanitizeWorkspaceName
|
|
63
79
|
} from "./chunk-FZKBTF34.js";
|
|
80
|
+
import {
|
|
81
|
+
BaseApiRoute,
|
|
82
|
+
createSSEResponse,
|
|
83
|
+
withAuth,
|
|
84
|
+
withCors
|
|
85
|
+
} from "./chunk-TWCEVES2.js";
|
|
64
86
|
import {
|
|
65
87
|
AdminGuard,
|
|
66
88
|
BaseAccountProvider,
|
|
@@ -124,15 +146,6 @@ import {
|
|
|
124
146
|
import {
|
|
125
147
|
IdempotencyManager
|
|
126
148
|
} from "./chunk-3EPY34R6.js";
|
|
127
|
-
import {
|
|
128
|
-
CompositeBackend,
|
|
129
|
-
EndpointGenerator,
|
|
130
|
-
createBackend,
|
|
131
|
-
createCompositeService,
|
|
132
|
-
createLocalService,
|
|
133
|
-
createRemoteService
|
|
134
|
-
} from "./chunk-P4HL4C6V.js";
|
|
135
|
-
import "./chunk-IPP4VURQ.js";
|
|
136
149
|
|
|
137
150
|
// src/data/BaseDataProvider.ts
|
|
138
151
|
import { SkipoBase } from "@ultrst-armada/kloks/functions";
|
|
@@ -5340,10 +5353,12 @@ export {
|
|
|
5340
5353
|
JobDependencyGraph,
|
|
5341
5354
|
JobScheduler,
|
|
5342
5355
|
LEGACY_PROJECTS_ROOT,
|
|
5356
|
+
LOCAL_STORAGE_GRAPHS_PREFIX,
|
|
5343
5357
|
LoadBalancer,
|
|
5344
5358
|
LocalAccountProvider,
|
|
5345
5359
|
LocalFSAdapter,
|
|
5346
5360
|
LockManager,
|
|
5361
|
+
NodeGraphPersistenceService,
|
|
5347
5362
|
PROJECTS_ROOT,
|
|
5348
5363
|
PasswordHasher,
|
|
5349
5364
|
RateLimiter,
|
|
@@ -5358,7 +5373,9 @@ export {
|
|
|
5358
5373
|
ServiceDispatcher,
|
|
5359
5374
|
SessionManager,
|
|
5360
5375
|
SrklClient,
|
|
5376
|
+
SrklCredentialRegistry,
|
|
5361
5377
|
SrklStorageService,
|
|
5378
|
+
SrklVaultAccessClient,
|
|
5362
5379
|
StorageAdapterFactory,
|
|
5363
5380
|
StorageServiceDefinition,
|
|
5364
5381
|
StorageServiceFacade,
|
|
@@ -5383,6 +5400,8 @@ export {
|
|
|
5383
5400
|
buildProjectObservability,
|
|
5384
5401
|
buildProjectsList,
|
|
5385
5402
|
cleanDbUrl,
|
|
5403
|
+
computeDeploymentFinalWeight,
|
|
5404
|
+
computeUsageWeightScore,
|
|
5386
5405
|
configureStarterProjectTemplate,
|
|
5387
5406
|
createAssetSubfolder,
|
|
5388
5407
|
createBackend,
|
|
@@ -5402,6 +5421,7 @@ export {
|
|
|
5402
5421
|
createWorkspace,
|
|
5403
5422
|
createWorkspaceGraph,
|
|
5404
5423
|
decryptSecretFromBlob,
|
|
5424
|
+
decryptVaultBufferInBrowser,
|
|
5405
5425
|
deleteAssetFromGraph,
|
|
5406
5426
|
deleteAssetFromPool,
|
|
5407
5427
|
deleteCredential,
|
|
@@ -5424,6 +5444,7 @@ export {
|
|
|
5424
5444
|
ensureS3DirectoryMarker,
|
|
5425
5445
|
ensureWorkspaceStructure,
|
|
5426
5446
|
exportEncryptedCredentials,
|
|
5447
|
+
exportGraphAsJsonFile,
|
|
5427
5448
|
fetchCloudflareData,
|
|
5428
5449
|
fetchVercelData,
|
|
5429
5450
|
findUserWorkspace,
|
|
@@ -5434,6 +5455,8 @@ export {
|
|
|
5434
5455
|
getAssetPoolLocationPath,
|
|
5435
5456
|
getAssetPoolPublicUrl,
|
|
5436
5457
|
getB2BucketId,
|
|
5458
|
+
getConnectedDeploymentNode,
|
|
5459
|
+
getConnectedWeightModifiers,
|
|
5437
5460
|
getCredential,
|
|
5438
5461
|
getDefaultWorkingWorkspaceDir,
|
|
5439
5462
|
getExecutions,
|
|
@@ -5450,6 +5473,7 @@ export {
|
|
|
5450
5473
|
getSystemDatabaseUrls,
|
|
5451
5474
|
getUnifiedDbUrl,
|
|
5452
5475
|
getUsers,
|
|
5476
|
+
getWeightModifierScore,
|
|
5453
5477
|
getWorkingWorkspaceConfig,
|
|
5454
5478
|
getWorkingWorkspaceDir,
|
|
5455
5479
|
getWorkspaceFolderKey,
|
|
@@ -5457,6 +5481,8 @@ export {
|
|
|
5457
5481
|
getWorkspaceGraph,
|
|
5458
5482
|
getWorkspaceStorageDetails,
|
|
5459
5483
|
getWorkspaces,
|
|
5484
|
+
globalCredentialRegistry,
|
|
5485
|
+
hexToBytes,
|
|
5460
5486
|
importEncryptedCredentials,
|
|
5461
5487
|
importGraphDependency,
|
|
5462
5488
|
initGlobalSamplesDirectory,
|
|
@@ -5476,7 +5502,9 @@ export {
|
|
|
5476
5502
|
loginUser,
|
|
5477
5503
|
matchGatewayIngress,
|
|
5478
5504
|
matchGatewayIngressAsync,
|
|
5505
|
+
nodeGraphPersistence,
|
|
5479
5506
|
normalizeBackblazeCredentials,
|
|
5507
|
+
parseGraphJsonFile,
|
|
5480
5508
|
permanentDeleteS3Folder,
|
|
5481
5509
|
permanentDeleteS3Object,
|
|
5482
5510
|
queryUnifiedDb,
|
|
@@ -5510,6 +5538,8 @@ export {
|
|
|
5510
5538
|
setWorkingWorkspaceConfig,
|
|
5511
5539
|
srklListBackblazeBuckets2 as srklCoreListBackblazeBuckets,
|
|
5512
5540
|
srklListBackblazeBuckets,
|
|
5541
|
+
srklService,
|
|
5542
|
+
syncSrklAccounts,
|
|
5513
5543
|
syncWorkspace,
|
|
5514
5544
|
syncWorkspaceCreateToBucket,
|
|
5515
5545
|
syncWorkspaceDataToBucket,
|
|
@@ -5520,6 +5550,7 @@ export {
|
|
|
5520
5550
|
useBackend,
|
|
5521
5551
|
useBackendClient,
|
|
5522
5552
|
useSrklServices,
|
|
5553
|
+
validateGraphDocument,
|
|
5523
5554
|
validateServiceDefinition,
|
|
5524
5555
|
withAuth,
|
|
5525
5556
|
withCors,
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
StorageServiceFacade,
|
|
14
14
|
WorkspaceServiceDefinition,
|
|
15
15
|
WorkspaceServiceFacade
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CU7RZBMF.js";
|
|
17
|
+
import "./chunk-IPP4VURQ.js";
|
|
17
18
|
import "./chunk-J2J24JVC.js";
|
|
18
19
|
import "./chunk-FZKBTF34.js";
|
|
19
20
|
import "./chunk-25Y7AVTP.js";
|
|
20
21
|
import "./chunk-QGHDJGYS.js";
|
|
21
22
|
import "./chunk-3EPY34R6.js";
|
|
22
|
-
import "./chunk-IPP4VURQ.js";
|
|
23
23
|
export {
|
|
24
24
|
AuthServiceDefinition,
|
|
25
25
|
AuthServiceFacade,
|
|
@@ -63,4 +63,171 @@ declare class EndpointGenerator {
|
|
|
63
63
|
declare function createBackend(name: string): CompositeBackend;
|
|
64
64
|
declare function createCompositeService(name: string): CompositeBackend;
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
/**
|
|
67
|
+
* @file types.ts
|
|
68
|
+
* @description Universal types for node graph document persistence, serialization, and storage sync.
|
|
69
|
+
*/
|
|
70
|
+
interface UniversalGraphNode {
|
|
71
|
+
id: string;
|
|
72
|
+
type?: string;
|
|
73
|
+
label?: string;
|
|
74
|
+
name?: string;
|
|
75
|
+
appId?: string;
|
|
76
|
+
deploymentId?: string;
|
|
77
|
+
position?: {
|
|
78
|
+
x: number;
|
|
79
|
+
y: number;
|
|
80
|
+
};
|
|
81
|
+
data?: Record<string, any>;
|
|
82
|
+
[key: string]: any;
|
|
83
|
+
}
|
|
84
|
+
interface UniversalGraphEdge {
|
|
85
|
+
id: string;
|
|
86
|
+
source: string;
|
|
87
|
+
target: string;
|
|
88
|
+
sourceSocket?: string;
|
|
89
|
+
targetSocket?: string;
|
|
90
|
+
appId?: string;
|
|
91
|
+
data?: Record<string, any>;
|
|
92
|
+
[key: string]: any;
|
|
93
|
+
}
|
|
94
|
+
interface UniversalAppEntity {
|
|
95
|
+
id: string;
|
|
96
|
+
name: string;
|
|
97
|
+
icon?: string;
|
|
98
|
+
description?: string;
|
|
99
|
+
publicLink?: string;
|
|
100
|
+
createdAt?: string;
|
|
101
|
+
updatedAt?: string;
|
|
102
|
+
[key: string]: any;
|
|
103
|
+
}
|
|
104
|
+
interface UniversalStorageConnection {
|
|
105
|
+
id: string;
|
|
106
|
+
provider: 'local_fs' | 'backblaze_b2' | 'cloudflare_r2' | 'aws_s3' | 'supabase' | string;
|
|
107
|
+
localFolderName?: string;
|
|
108
|
+
b2BucketName?: string;
|
|
109
|
+
s3BucketName?: string;
|
|
110
|
+
r2BucketName?: string;
|
|
111
|
+
supabaseBucketName?: string;
|
|
112
|
+
[key: string]: any;
|
|
113
|
+
}
|
|
114
|
+
interface UniversalNodeGraphDocument {
|
|
115
|
+
$schema?: string;
|
|
116
|
+
version: string;
|
|
117
|
+
appId: string;
|
|
118
|
+
appName: string;
|
|
119
|
+
appIcon?: string;
|
|
120
|
+
description?: string;
|
|
121
|
+
publicLink?: string;
|
|
122
|
+
createdAt: string;
|
|
123
|
+
updatedAt: string;
|
|
124
|
+
exportedAt: string;
|
|
125
|
+
author?: {
|
|
126
|
+
userId?: string;
|
|
127
|
+
username?: string;
|
|
128
|
+
email?: string;
|
|
129
|
+
name?: string;
|
|
130
|
+
role?: string;
|
|
131
|
+
};
|
|
132
|
+
viewport?: {
|
|
133
|
+
zoom: number;
|
|
134
|
+
pan: {
|
|
135
|
+
x: number;
|
|
136
|
+
y: number;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
graph: {
|
|
140
|
+
nodes: UniversalGraphNode[];
|
|
141
|
+
edges: UniversalGraphEdge[];
|
|
142
|
+
};
|
|
143
|
+
deployments?: any[];
|
|
144
|
+
storageMetadata?: {
|
|
145
|
+
provider: string;
|
|
146
|
+
targetName: string;
|
|
147
|
+
targetPath: string;
|
|
148
|
+
storageConnectionId?: string;
|
|
149
|
+
checksum?: string;
|
|
150
|
+
syncedAt?: string;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
interface NodeGraphValidationResult {
|
|
154
|
+
valid: boolean;
|
|
155
|
+
errors: string[];
|
|
156
|
+
document?: UniversalNodeGraphDocument;
|
|
157
|
+
}
|
|
158
|
+
interface SaveGraphOptions {
|
|
159
|
+
app: UniversalAppEntity;
|
|
160
|
+
nodes: UniversalGraphNode[];
|
|
161
|
+
edges: UniversalGraphEdge[];
|
|
162
|
+
deployments?: any[];
|
|
163
|
+
viewport?: {
|
|
164
|
+
zoom: number;
|
|
165
|
+
pan: {
|
|
166
|
+
x: number;
|
|
167
|
+
y: number;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
storageConnection?: UniversalStorageConnection;
|
|
171
|
+
}
|
|
172
|
+
declare const LOCAL_STORAGE_GRAPHS_PREFIX = "depm_graph_doc_";
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @file helpers.ts
|
|
176
|
+
* @description Helper functions for validating, exporting, and parsing universal node graph documents.
|
|
177
|
+
*/
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Validates a parsed JSON object to verify it matches the UniversalNodeGraphDocument schema.
|
|
181
|
+
*/
|
|
182
|
+
declare function validateGraphDocument(data: any): NodeGraphValidationResult;
|
|
183
|
+
/**
|
|
184
|
+
* Triggers a browser download of the node graph as a portable JSON file.
|
|
185
|
+
*/
|
|
186
|
+
declare function exportGraphAsJsonFile(graphDoc: UniversalNodeGraphDocument): void;
|
|
187
|
+
/**
|
|
188
|
+
* Reads and parses a graph JSON file from an input file element.
|
|
189
|
+
*/
|
|
190
|
+
declare function parseGraphJsonFile(file: File): Promise<NodeGraphValidationResult>;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @file nodeGraphPersistence.ts
|
|
194
|
+
* @description Universal Node Graph Persistence Service.
|
|
195
|
+
* Manages serialization, schema validation, browser localStorage caching,
|
|
196
|
+
* and direct persistence to file system or cloud storage adapters.
|
|
197
|
+
*/
|
|
198
|
+
|
|
199
|
+
declare class NodeGraphPersistenceService {
|
|
200
|
+
/**
|
|
201
|
+
* Generates a fully compliant v1.0.0 JSON document representing the app's complete node graph.
|
|
202
|
+
*/
|
|
203
|
+
createGraphDocument(options: SaveGraphOptions): UniversalNodeGraphDocument;
|
|
204
|
+
/**
|
|
205
|
+
* Validates a parsed JSON object to verify it matches the NodeGraphDocument schema.
|
|
206
|
+
*/
|
|
207
|
+
validateGraphDocument(data: any): NodeGraphValidationResult;
|
|
208
|
+
/**
|
|
209
|
+
* Saves the node graph to the selected user storage option (Local Folder or Cloud Bucket)
|
|
210
|
+
* and caches it in LocalStorage.
|
|
211
|
+
*/
|
|
212
|
+
saveGraphToStorage(options: SaveGraphOptions, customDirectoryHandle?: any): Promise<{
|
|
213
|
+
success: boolean;
|
|
214
|
+
document: UniversalNodeGraphDocument;
|
|
215
|
+
message: string;
|
|
216
|
+
targetPath: string;
|
|
217
|
+
}>;
|
|
218
|
+
/**
|
|
219
|
+
* Loads a cached or previously saved node graph document for an app.
|
|
220
|
+
*/
|
|
221
|
+
loadSavedGraph(appId: string): UniversalNodeGraphDocument | null;
|
|
222
|
+
/**
|
|
223
|
+
* Triggers a browser download of the node graph as a portable JSON file.
|
|
224
|
+
*/
|
|
225
|
+
exportGraphAsJsonFile(graphDoc: UniversalNodeGraphDocument): void;
|
|
226
|
+
/**
|
|
227
|
+
* Reads and parses a graph JSON file from an input file element.
|
|
228
|
+
*/
|
|
229
|
+
parseGraphJsonFile(file: File): Promise<NodeGraphValidationResult>;
|
|
230
|
+
}
|
|
231
|
+
declare const nodeGraphPersistence: NodeGraphPersistenceService;
|
|
232
|
+
|
|
233
|
+
export { CompositeBackend, EndpointGenerator, type GeneratedEndpointSummary, LOCAL_STORAGE_GRAPHS_PREFIX, type LocalService, NodeGraphPersistenceService, type NodeGraphValidationResult, type RemoteServiceProxy, type SaveGraphOptions, type UniversalAppEntity, type UniversalGraphEdge, type UniversalGraphNode, type UniversalNodeGraphDocument, type UniversalStorageConnection, createBackend, createCompositeService, createLocalService, createRemoteService, exportGraphAsJsonFile, nodeGraphPersistence, parseGraphJsonFile, validateGraphDocument };
|
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompositeBackend,
|
|
3
3
|
EndpointGenerator,
|
|
4
|
+
LOCAL_STORAGE_GRAPHS_PREFIX,
|
|
5
|
+
NodeGraphPersistenceService,
|
|
4
6
|
createBackend,
|
|
5
7
|
createCompositeService,
|
|
6
8
|
createLocalService,
|
|
7
|
-
createRemoteService
|
|
8
|
-
|
|
9
|
+
createRemoteService,
|
|
10
|
+
exportGraphAsJsonFile,
|
|
11
|
+
nodeGraphPersistence,
|
|
12
|
+
parseGraphJsonFile,
|
|
13
|
+
validateGraphDocument
|
|
14
|
+
} from "../chunk-BM4QMVPA.js";
|
|
9
15
|
import "../chunk-IPP4VURQ.js";
|
|
10
16
|
export {
|
|
11
17
|
CompositeBackend,
|
|
12
18
|
EndpointGenerator,
|
|
19
|
+
LOCAL_STORAGE_GRAPHS_PREFIX,
|
|
20
|
+
NodeGraphPersistenceService,
|
|
13
21
|
createBackend,
|
|
14
22
|
createCompositeService,
|
|
15
23
|
createLocalService,
|
|
16
|
-
createRemoteService
|
|
24
|
+
createRemoteService,
|
|
25
|
+
exportGraphAsJsonFile,
|
|
26
|
+
nodeGraphPersistence,
|
|
27
|
+
parseGraphJsonFile,
|
|
28
|
+
validateGraphDocument
|
|
17
29
|
};
|