@kb-labs/core-runtime 1.0.0 → 1.2.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/dist/index.cjs +17 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -8
- package/dist/index.d.ts +40 -8
- package/dist/index.js +18 -28
- package/dist/index.js.map +1 -1
- package/package.json +20 -20
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CreateEnvironmentRequest, EnvironmentDescriptor, EnvironmentStatusResult, EnvironmentLease, MaterializeWorkspaceRequest, WorkspaceDescriptor, AttachWorkspaceRequest, WorkspaceAttachment, WorkspaceStatusResult, WorkspaceProviderCapabilities, CaptureSnapshotRequest, SnapshotDescriptor, RestoreSnapshotRequest, RestoreSnapshotResult, SnapshotStatusResult, SnapshotGarbageCollectRequest, SnapshotGarbageCollectResult, SnapshotProviderCapabilities,
|
|
1
|
+
import { CreateEnvironmentRequest, EnvironmentDescriptor, EnvironmentStatusResult, EnvironmentLease, MaterializeWorkspaceRequest, WorkspaceDescriptor, AttachWorkspaceRequest, WorkspaceAttachment, WorkspaceStatusResult, WorkspaceProviderCapabilities, CaptureSnapshotRequest, SnapshotDescriptor, RestoreSnapshotRequest, RestoreSnapshotResult, SnapshotStatusResult, SnapshotGarbageCollectRequest, SnapshotGarbageCollectResult, SnapshotProviderCapabilities, CreateRunRequest, RunRecord, IAnalytics, IVectorStore, ILLM, IEmbeddings, ICache, IConfig, IStorage, ILogger, IEventBus, IInvoke, ILogReader, IWorkflowEngine, IJobScheduler, ICronManager, IResourceManager, TenantQuotas, ResourceType, ResourceSlot, ResourceAvailability, JobDefinition, JobHandle, CronExpression, JobFilter, CronHandler, CronJob, WorkflowOptions, WorkflowRun, WorkflowFilter, VectorFilter, VectorSearchResult, VectorRecord, LLMOptions, LLMResponse, LLMProtocolCapabilities, LLMMessage, LLMToolCallOptions, LLMToolCallResponse } from '@kb-labs/core-platform';
|
|
2
|
+
import { IExecutionBackend, ExecutionRequest, ExecutionResult } from '@kb-labs/core-contracts';
|
|
3
|
+
import { ISQLDatabase, IDocumentDatabase, AnalyticsContext, IStorage as IStorage$1, StorageMetadata, SQLQueryResult, SQLTransaction, BaseDocument, DocumentFilter, FindOptions, DocumentUpdate } from '@kb-labs/core-platform/adapters';
|
|
2
4
|
import { IResourceBroker, RateLimitConfig, RateLimitPreset } from '@kb-labs/core-resource-broker';
|
|
3
|
-
import { AnalyticsContext, IStorage as IStorage$1, StorageMetadata, ISQLDatabase, SQLQueryResult, SQLTransaction, IDocumentDatabase, BaseDocument, DocumentFilter, FindOptions, DocumentUpdate } from '@kb-labs/core-platform/adapters';
|
|
4
5
|
export { BulkTransfer, BulkTransferHelper, BulkTransferOptions, CircuitOpenError, IPCServer, IPCTransport, ITransport, OPERATION_TIMEOUTS, PendingRequest, TimeoutError, TransportConfig, TransportError, UnixSocketConfig, UnixSocketServer, UnixSocketServerConfig, UnixSocketTransport, createIPCServer, createIPCTransport, createUnixSocketTransport, getOperationTimeout, isRetryableError, selectTimeout } from '@kb-labs/core-ipc';
|
|
5
6
|
import { AdapterCall, AdapterResponse, AdapterType, AdapterCallContext } from '@kb-labs/core-platform/serializable';
|
|
6
7
|
export { createNoOpPlatform } from '@kb-labs/core-platform/noop';
|
|
@@ -236,8 +237,24 @@ interface CoreAdapterTypes {
|
|
|
236
237
|
logger: ILogger;
|
|
237
238
|
eventBus: IEventBus;
|
|
238
239
|
invoke: IInvoke;
|
|
239
|
-
|
|
240
|
+
sqlDatabase: ISQLDatabase;
|
|
241
|
+
documentDatabase: IDocumentDatabase;
|
|
240
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* Names of all core adapters.
|
|
245
|
+
* Use this type instead of raw strings when referencing adapters —
|
|
246
|
+
* it stays in sync with CoreAdapterTypes automatically.
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* ```typescript
|
|
250
|
+
* import type { CoreAdapterName } from '@kb-labs/core-runtime';
|
|
251
|
+
*
|
|
252
|
+
* function requiresLLM(name: CoreAdapterName) { ... }
|
|
253
|
+
* requiresLLM('llm'); // ✅
|
|
254
|
+
* requiresLLM('unknown'); // ❌ compile error
|
|
255
|
+
* ```
|
|
256
|
+
*/
|
|
257
|
+
type CoreAdapterName = keyof CoreAdapterTypes;
|
|
241
258
|
/**
|
|
242
259
|
* All adapter types (core + extensions).
|
|
243
260
|
* Extensions can be any type, not known at compile time.
|
|
@@ -361,9 +378,22 @@ declare class PlatformContainer {
|
|
|
361
378
|
emitLifecycleError(error: unknown, phase: PlatformLifecyclePhase, context?: Omit<PlatformLifecycleContext, 'phase'>): Promise<void>;
|
|
362
379
|
/**
|
|
363
380
|
* Check if a service is explicitly configured (not using fallback).
|
|
364
|
-
*
|
|
365
|
-
* @
|
|
381
|
+
*
|
|
382
|
+
* @example
|
|
383
|
+
* ```typescript
|
|
384
|
+
* // Core adapter — type-safe, autocomplete works
|
|
385
|
+
* platform.isConfigured('llm'); // ✅
|
|
386
|
+
* platform.isConfigured('vectorStore'); // ✅
|
|
387
|
+
* platform.isConfigured('unknown'); // ❌ compile error
|
|
388
|
+
*
|
|
389
|
+
* // Extension adapter — generic string
|
|
390
|
+
* platform.isConfigured('myCustomAdapter'); // ✅ string overload
|
|
391
|
+
* ```
|
|
392
|
+
*
|
|
393
|
+
* @param service - Adapter/service name
|
|
394
|
+
* @returns true if explicitly configured, false if using NoOp/fallback
|
|
366
395
|
*/
|
|
396
|
+
isConfigured<K extends CoreAdapterName>(service: K): boolean;
|
|
367
397
|
isConfigured(service: string): boolean;
|
|
368
398
|
/**
|
|
369
399
|
* Get list of all configured services (adapters + core features).
|
|
@@ -390,8 +420,10 @@ declare class PlatformContainer {
|
|
|
390
420
|
get eventBus(): IEventBus;
|
|
391
421
|
/** Inter-plugin invocation adapter (fallback: NoOpInvoke) */
|
|
392
422
|
get invoke(): IInvoke;
|
|
393
|
-
/**
|
|
394
|
-
get
|
|
423
|
+
/** SQL database adapter (fallback: NoOpSQLDatabase — throws on use) */
|
|
424
|
+
get sqlDatabase(): ISQLDatabase;
|
|
425
|
+
/** Document database adapter (fallback: NoOpDocumentDatabase — throws on use) */
|
|
426
|
+
get documentDatabase(): IDocumentDatabase;
|
|
395
427
|
private _logQueryService?;
|
|
396
428
|
/**
|
|
397
429
|
* Unified log query service.
|
|
@@ -2264,4 +2296,4 @@ declare function getDegradedStatus(options?: DegradedOptions): Promise<DegradedS
|
|
|
2264
2296
|
*/
|
|
2265
2297
|
declare function startFullCycle(platform: Pick<PlatformContainer, 'runOrchestrator'>, request: StartFullCycleRequest): Promise<RunRecord>;
|
|
2266
2298
|
|
|
2267
|
-
export { type AdapterTypes, type AdaptersConfig, CacheProxy, type CoreAdapterTypes, type CoreFeaturesConfig, type CreateProxyPlatformOptions, CronManager, type DegradedLevel, type DegradedOptions, type DegradedStatus, type DiscoveredAdapter, DocumentDatabaseProxy, EmbeddingsProxy, EnvironmentManager, type ExecutionConfig, type JobHandler, JobScheduler, type JobSchedulerConfig, type JobsConfig, LLMProxy, type MonitoringOptions, type MonitoringSnapshot, type PlatformConfig, PlatformContainer, type PlatformLifecycleContext, type PlatformLifecycleHooks, type PlatformLifecyclePhase, RemoteAdapter, type ResourceBrokerConfig, ResourceManager, type ResourceManagerConfig, type ResourcesConfig, RunExecutor, RunOrchestrator, type RunStepExecutionRequest, SQLDatabaseProxy, SnapshotManager, type StartFullCycleRequest, StorageProxy, VectorStoreProxy, type WorkflowDefinition, WorkflowEngine, type WorkflowEngineConfig, type WorkflowStepContext, type WorkflowStepDefinition, type WorkflowsConfig, WorkspaceManager, closeProxyPlatform, createAnalyticsContext, createCacheProxy, createDocumentDatabaseProxy, createProxyPlatform, createSQLDatabaseProxy, createStorageProxy, createVectorStoreProxy, discoverAdapters, getDegradedStatus, getMonitoringSnapshot, initPlatform, platform, resetPlatform, resolveAdapter, startFullCycle };
|
|
2299
|
+
export { type AdapterTypes, type AdaptersConfig, CacheProxy, type CoreAdapterName, type CoreAdapterTypes, type CoreFeaturesConfig, type CreateProxyPlatformOptions, CronManager, type DegradedLevel, type DegradedOptions, type DegradedStatus, type DiscoveredAdapter, DocumentDatabaseProxy, EmbeddingsProxy, EnvironmentManager, type ExecutionConfig, type JobHandler, JobScheduler, type JobSchedulerConfig, type JobsConfig, LLMProxy, type MonitoringOptions, type MonitoringSnapshot, type PlatformConfig, PlatformContainer, type PlatformLifecycleContext, type PlatformLifecycleHooks, type PlatformLifecyclePhase, RemoteAdapter, type ResourceBrokerConfig, ResourceManager, type ResourceManagerConfig, type ResourcesConfig, RunExecutor, RunOrchestrator, type RunStepExecutionRequest, SQLDatabaseProxy, SnapshotManager, type StartFullCycleRequest, StorageProxy, VectorStoreProxy, type WorkflowDefinition, WorkflowEngine, type WorkflowEngineConfig, type WorkflowStepContext, type WorkflowStepDefinition, type WorkflowsConfig, WorkspaceManager, closeProxyPlatform, createAnalyticsContext, createCacheProxy, createDocumentDatabaseProxy, createProxyPlatform, createSQLDatabaseProxy, createStorageProxy, createVectorStoreProxy, discoverAdapters, getDegradedStatus, getMonitoringSnapshot, initPlatform, platform, resetPlatform, resolveAdapter, startFullCycle };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CreateEnvironmentRequest, EnvironmentDescriptor, EnvironmentStatusResult, EnvironmentLease, MaterializeWorkspaceRequest, WorkspaceDescriptor, AttachWorkspaceRequest, WorkspaceAttachment, WorkspaceStatusResult, WorkspaceProviderCapabilities, CaptureSnapshotRequest, SnapshotDescriptor, RestoreSnapshotRequest, RestoreSnapshotResult, SnapshotStatusResult, SnapshotGarbageCollectRequest, SnapshotGarbageCollectResult, SnapshotProviderCapabilities,
|
|
1
|
+
import { CreateEnvironmentRequest, EnvironmentDescriptor, EnvironmentStatusResult, EnvironmentLease, MaterializeWorkspaceRequest, WorkspaceDescriptor, AttachWorkspaceRequest, WorkspaceAttachment, WorkspaceStatusResult, WorkspaceProviderCapabilities, CaptureSnapshotRequest, SnapshotDescriptor, RestoreSnapshotRequest, RestoreSnapshotResult, SnapshotStatusResult, SnapshotGarbageCollectRequest, SnapshotGarbageCollectResult, SnapshotProviderCapabilities, CreateRunRequest, RunRecord, IAnalytics, IVectorStore, ILLM, IEmbeddings, ICache, IConfig, IStorage, ILogger, IEventBus, IInvoke, ILogReader, IWorkflowEngine, IJobScheduler, ICronManager, IResourceManager, TenantQuotas, ResourceType, ResourceSlot, ResourceAvailability, JobDefinition, JobHandle, CronExpression, JobFilter, CronHandler, CronJob, WorkflowOptions, WorkflowRun, WorkflowFilter, VectorFilter, VectorSearchResult, VectorRecord, LLMOptions, LLMResponse, LLMProtocolCapabilities, LLMMessage, LLMToolCallOptions, LLMToolCallResponse } from '@kb-labs/core-platform';
|
|
2
|
+
import { IExecutionBackend, ExecutionRequest, ExecutionResult } from '@kb-labs/core-contracts';
|
|
3
|
+
import { ISQLDatabase, IDocumentDatabase, AnalyticsContext, IStorage as IStorage$1, StorageMetadata, SQLQueryResult, SQLTransaction, BaseDocument, DocumentFilter, FindOptions, DocumentUpdate } from '@kb-labs/core-platform/adapters';
|
|
2
4
|
import { IResourceBroker, RateLimitConfig, RateLimitPreset } from '@kb-labs/core-resource-broker';
|
|
3
|
-
import { AnalyticsContext, IStorage as IStorage$1, StorageMetadata, ISQLDatabase, SQLQueryResult, SQLTransaction, IDocumentDatabase, BaseDocument, DocumentFilter, FindOptions, DocumentUpdate } from '@kb-labs/core-platform/adapters';
|
|
4
5
|
export { BulkTransfer, BulkTransferHelper, BulkTransferOptions, CircuitOpenError, IPCServer, IPCTransport, ITransport, OPERATION_TIMEOUTS, PendingRequest, TimeoutError, TransportConfig, TransportError, UnixSocketConfig, UnixSocketServer, UnixSocketServerConfig, UnixSocketTransport, createIPCServer, createIPCTransport, createUnixSocketTransport, getOperationTimeout, isRetryableError, selectTimeout } from '@kb-labs/core-ipc';
|
|
5
6
|
import { AdapterCall, AdapterResponse, AdapterType, AdapterCallContext } from '@kb-labs/core-platform/serializable';
|
|
6
7
|
export { createNoOpPlatform } from '@kb-labs/core-platform/noop';
|
|
@@ -236,8 +237,24 @@ interface CoreAdapterTypes {
|
|
|
236
237
|
logger: ILogger;
|
|
237
238
|
eventBus: IEventBus;
|
|
238
239
|
invoke: IInvoke;
|
|
239
|
-
|
|
240
|
+
sqlDatabase: ISQLDatabase;
|
|
241
|
+
documentDatabase: IDocumentDatabase;
|
|
240
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* Names of all core adapters.
|
|
245
|
+
* Use this type instead of raw strings when referencing adapters —
|
|
246
|
+
* it stays in sync with CoreAdapterTypes automatically.
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* ```typescript
|
|
250
|
+
* import type { CoreAdapterName } from '@kb-labs/core-runtime';
|
|
251
|
+
*
|
|
252
|
+
* function requiresLLM(name: CoreAdapterName) { ... }
|
|
253
|
+
* requiresLLM('llm'); // ✅
|
|
254
|
+
* requiresLLM('unknown'); // ❌ compile error
|
|
255
|
+
* ```
|
|
256
|
+
*/
|
|
257
|
+
type CoreAdapterName = keyof CoreAdapterTypes;
|
|
241
258
|
/**
|
|
242
259
|
* All adapter types (core + extensions).
|
|
243
260
|
* Extensions can be any type, not known at compile time.
|
|
@@ -361,9 +378,22 @@ declare class PlatformContainer {
|
|
|
361
378
|
emitLifecycleError(error: unknown, phase: PlatformLifecyclePhase, context?: Omit<PlatformLifecycleContext, 'phase'>): Promise<void>;
|
|
362
379
|
/**
|
|
363
380
|
* Check if a service is explicitly configured (not using fallback).
|
|
364
|
-
*
|
|
365
|
-
* @
|
|
381
|
+
*
|
|
382
|
+
* @example
|
|
383
|
+
* ```typescript
|
|
384
|
+
* // Core adapter — type-safe, autocomplete works
|
|
385
|
+
* platform.isConfigured('llm'); // ✅
|
|
386
|
+
* platform.isConfigured('vectorStore'); // ✅
|
|
387
|
+
* platform.isConfigured('unknown'); // ❌ compile error
|
|
388
|
+
*
|
|
389
|
+
* // Extension adapter — generic string
|
|
390
|
+
* platform.isConfigured('myCustomAdapter'); // ✅ string overload
|
|
391
|
+
* ```
|
|
392
|
+
*
|
|
393
|
+
* @param service - Adapter/service name
|
|
394
|
+
* @returns true if explicitly configured, false if using NoOp/fallback
|
|
366
395
|
*/
|
|
396
|
+
isConfigured<K extends CoreAdapterName>(service: K): boolean;
|
|
367
397
|
isConfigured(service: string): boolean;
|
|
368
398
|
/**
|
|
369
399
|
* Get list of all configured services (adapters + core features).
|
|
@@ -390,8 +420,10 @@ declare class PlatformContainer {
|
|
|
390
420
|
get eventBus(): IEventBus;
|
|
391
421
|
/** Inter-plugin invocation adapter (fallback: NoOpInvoke) */
|
|
392
422
|
get invoke(): IInvoke;
|
|
393
|
-
/**
|
|
394
|
-
get
|
|
423
|
+
/** SQL database adapter (fallback: NoOpSQLDatabase — throws on use) */
|
|
424
|
+
get sqlDatabase(): ISQLDatabase;
|
|
425
|
+
/** Document database adapter (fallback: NoOpDocumentDatabase — throws on use) */
|
|
426
|
+
get documentDatabase(): IDocumentDatabase;
|
|
395
427
|
private _logQueryService?;
|
|
396
428
|
/**
|
|
397
429
|
* Unified log query service.
|
|
@@ -2264,4 +2296,4 @@ declare function getDegradedStatus(options?: DegradedOptions): Promise<DegradedS
|
|
|
2264
2296
|
*/
|
|
2265
2297
|
declare function startFullCycle(platform: Pick<PlatformContainer, 'runOrchestrator'>, request: StartFullCycleRequest): Promise<RunRecord>;
|
|
2266
2298
|
|
|
2267
|
-
export { type AdapterTypes, type AdaptersConfig, CacheProxy, type CoreAdapterTypes, type CoreFeaturesConfig, type CreateProxyPlatformOptions, CronManager, type DegradedLevel, type DegradedOptions, type DegradedStatus, type DiscoveredAdapter, DocumentDatabaseProxy, EmbeddingsProxy, EnvironmentManager, type ExecutionConfig, type JobHandler, JobScheduler, type JobSchedulerConfig, type JobsConfig, LLMProxy, type MonitoringOptions, type MonitoringSnapshot, type PlatformConfig, PlatformContainer, type PlatformLifecycleContext, type PlatformLifecycleHooks, type PlatformLifecyclePhase, RemoteAdapter, type ResourceBrokerConfig, ResourceManager, type ResourceManagerConfig, type ResourcesConfig, RunExecutor, RunOrchestrator, type RunStepExecutionRequest, SQLDatabaseProxy, SnapshotManager, type StartFullCycleRequest, StorageProxy, VectorStoreProxy, type WorkflowDefinition, WorkflowEngine, type WorkflowEngineConfig, type WorkflowStepContext, type WorkflowStepDefinition, type WorkflowsConfig, WorkspaceManager, closeProxyPlatform, createAnalyticsContext, createCacheProxy, createDocumentDatabaseProxy, createProxyPlatform, createSQLDatabaseProxy, createStorageProxy, createVectorStoreProxy, discoverAdapters, getDegradedStatus, getMonitoringSnapshot, initPlatform, platform, resetPlatform, resolveAdapter, startFullCycle };
|
|
2299
|
+
export { type AdapterTypes, type AdaptersConfig, CacheProxy, type CoreAdapterName, type CoreAdapterTypes, type CoreFeaturesConfig, type CreateProxyPlatformOptions, CronManager, type DegradedLevel, type DegradedOptions, type DegradedStatus, type DiscoveredAdapter, DocumentDatabaseProxy, EmbeddingsProxy, EnvironmentManager, type ExecutionConfig, type JobHandler, JobScheduler, type JobSchedulerConfig, type JobsConfig, LLMProxy, type MonitoringOptions, type MonitoringSnapshot, type PlatformConfig, PlatformContainer, type PlatformLifecycleContext, type PlatformLifecycleHooks, type PlatformLifecyclePhase, RemoteAdapter, type ResourceBrokerConfig, ResourceManager, type ResourceManagerConfig, type ResourcesConfig, RunExecutor, RunOrchestrator, type RunStepExecutionRequest, SQLDatabaseProxy, SnapshotManager, type StartFullCycleRequest, StorageProxy, VectorStoreProxy, type WorkflowDefinition, WorkflowEngine, type WorkflowEngineConfig, type WorkflowStepContext, type WorkflowStepDefinition, type WorkflowsConfig, WorkspaceManager, closeProxyPlatform, createAnalyticsContext, createCacheProxy, createDocumentDatabaseProxy, createProxyPlatform, createSQLDatabaseProxy, createStorageProxy, createVectorStoreProxy, discoverAdapters, getDegradedStatus, getMonitoringSnapshot, initPlatform, platform, resetPlatform, resolveAdapter, startFullCycle };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NoOpAnalytics, MemoryVectorStore, MockLLM, MockEmbeddings, MemoryCache, NoOpConfig, MemoryStorage, ConsoleLogger, MemoryEventBus, NoOpInvoke,
|
|
1
|
+
import { NoOpAnalytics, MemoryVectorStore, MockLLM, MockEmbeddings, MemoryCache, NoOpConfig, MemoryStorage, ConsoleLogger, MemoryEventBus, NoOpInvoke, NoOpSQLDatabase, NoOpDocumentDatabase, NoOpWorkflowEngine, NoOpJobScheduler, NoOpCronManager, NoOpResourceManager } from '@kb-labs/core-platform/noop';
|
|
2
2
|
export { createNoOpPlatform } from '@kb-labs/core-platform/noop';
|
|
3
3
|
import * as fs2 from 'fs';
|
|
4
4
|
import { unlinkSync, promises } from 'fs';
|
|
@@ -342,11 +342,6 @@ var init_container = __esm({
|
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
|
-
/**
|
|
346
|
-
* Check if a service is explicitly configured (not using fallback).
|
|
347
|
-
* @param service - Service name (e.g., 'llm', 'vectorStore', 'workflows')
|
|
348
|
-
* @returns true if service is configured, false if using NoOp/fallback
|
|
349
|
-
*/
|
|
350
345
|
isConfigured(service) {
|
|
351
346
|
if (this.adapters.has(service)) {
|
|
352
347
|
return true;
|
|
@@ -434,9 +429,13 @@ var init_container = __esm({
|
|
|
434
429
|
get invoke() {
|
|
435
430
|
return this.adapters.get("invoke") ?? new NoOpInvoke();
|
|
436
431
|
}
|
|
437
|
-
/**
|
|
438
|
-
get
|
|
439
|
-
return this.adapters.get("
|
|
432
|
+
/** SQL database adapter (fallback: NoOpSQLDatabase — throws on use) */
|
|
433
|
+
get sqlDatabase() {
|
|
434
|
+
return this.adapters.get("sqlDatabase") ?? new NoOpSQLDatabase();
|
|
435
|
+
}
|
|
436
|
+
/** Document database adapter (fallback: NoOpDocumentDatabase — throws on use) */
|
|
437
|
+
get documentDatabase() {
|
|
438
|
+
return this.adapters.get("documentDatabase") ?? new NoOpDocumentDatabase();
|
|
440
439
|
}
|
|
441
440
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
442
441
|
// SERVICES (derived from adapters, lazy-initialized)
|
|
@@ -2204,11 +2203,9 @@ var init_unix_socket_server = __esm({
|
|
|
2204
2203
|
return this.platform.eventBus;
|
|
2205
2204
|
case "invoke":
|
|
2206
2205
|
return this.platform.invoke;
|
|
2207
|
-
case "artifacts":
|
|
2208
|
-
return this.platform.artifacts;
|
|
2209
2206
|
default:
|
|
2210
2207
|
throw new Error(
|
|
2211
|
-
`Unknown adapter: '${name}'. Valid adapters: vectorStore, cache, config, llm, embeddings, storage, logger, analytics, eventBus, invoke
|
|
2208
|
+
`Unknown adapter: '${name}'. Valid adapters: vectorStore, cache, config, llm, embeddings, storage, logger, analytics, eventBus, invoke`
|
|
2212
2209
|
);
|
|
2213
2210
|
}
|
|
2214
2211
|
}
|
|
@@ -2776,7 +2773,7 @@ var EnvironmentLeaseStore = class {
|
|
|
2776
2773
|
var EnvironmentManager = class {
|
|
2777
2774
|
constructor(platform2, options = {}) {
|
|
2778
2775
|
this.platform = platform2;
|
|
2779
|
-
const db = this.platform.getAdapter("
|
|
2776
|
+
const db = this.platform.getAdapter("sqlDatabase");
|
|
2780
2777
|
if (db) {
|
|
2781
2778
|
this.store = new EnvironmentLeaseStore(db);
|
|
2782
2779
|
}
|
|
@@ -3163,20 +3160,6 @@ var RunExecutor = class {
|
|
|
3163
3160
|
*/
|
|
3164
3161
|
async executeStep(request) {
|
|
3165
3162
|
const { runId, stepId, environmentId, execution } = request;
|
|
3166
|
-
const descriptor = execution.descriptor && typeof execution.descriptor === "object" ? {
|
|
3167
|
-
...execution.descriptor,
|
|
3168
|
-
run: {
|
|
3169
|
-
runId,
|
|
3170
|
-
stepId,
|
|
3171
|
-
environmentId
|
|
3172
|
-
}
|
|
3173
|
-
} : {
|
|
3174
|
-
run: {
|
|
3175
|
-
runId,
|
|
3176
|
-
stepId,
|
|
3177
|
-
environmentId
|
|
3178
|
-
}
|
|
3179
|
-
};
|
|
3180
3163
|
this.logger.debug("RunExecutor: executing step", {
|
|
3181
3164
|
runId,
|
|
3182
3165
|
stepId,
|
|
@@ -3187,7 +3170,14 @@ var RunExecutor = class {
|
|
|
3187
3170
|
});
|
|
3188
3171
|
return this.executionBackend.execute({
|
|
3189
3172
|
...execution,
|
|
3190
|
-
|
|
3173
|
+
context: {
|
|
3174
|
+
...execution.context,
|
|
3175
|
+
run: {
|
|
3176
|
+
runId,
|
|
3177
|
+
stepId,
|
|
3178
|
+
environmentId
|
|
3179
|
+
}
|
|
3180
|
+
}
|
|
3191
3181
|
});
|
|
3192
3182
|
}
|
|
3193
3183
|
};
|