@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 CHANGED
@@ -366,11 +366,6 @@ var init_container = __esm({
366
366
  }
367
367
  }
368
368
  }
369
- /**
370
- * Check if a service is explicitly configured (not using fallback).
371
- * @param service - Service name (e.g., 'llm', 'vectorStore', 'workflows')
372
- * @returns true if service is configured, false if using NoOp/fallback
373
- */
374
369
  isConfigured(service) {
375
370
  if (this.adapters.has(service)) {
376
371
  return true;
@@ -458,9 +453,13 @@ var init_container = __esm({
458
453
  get invoke() {
459
454
  return this.adapters.get("invoke") ?? new noop.NoOpInvoke();
460
455
  }
461
- /** Artifact storage adapter (fallback: MemoryArtifacts) */
462
- get artifacts() {
463
- return this.adapters.get("artifacts") ?? new noop.MemoryArtifacts();
456
+ /** SQL database adapter (fallback: NoOpSQLDatabase — throws on use) */
457
+ get sqlDatabase() {
458
+ return this.adapters.get("sqlDatabase") ?? new noop.NoOpSQLDatabase();
459
+ }
460
+ /** Document database adapter (fallback: NoOpDocumentDatabase — throws on use) */
461
+ get documentDatabase() {
462
+ return this.adapters.get("documentDatabase") ?? new noop.NoOpDocumentDatabase();
464
463
  }
465
464
  // ═══════════════════════════════════════════════════════════════════════════
466
465
  // SERVICES (derived from adapters, lazy-initialized)
@@ -2228,11 +2227,9 @@ var init_unix_socket_server = __esm({
2228
2227
  return this.platform.eventBus;
2229
2228
  case "invoke":
2230
2229
  return this.platform.invoke;
2231
- case "artifacts":
2232
- return this.platform.artifacts;
2233
2230
  default:
2234
2231
  throw new Error(
2235
- `Unknown adapter: '${name}'. Valid adapters: vectorStore, cache, config, llm, embeddings, storage, logger, analytics, eventBus, invoke, artifacts`
2232
+ `Unknown adapter: '${name}'. Valid adapters: vectorStore, cache, config, llm, embeddings, storage, logger, analytics, eventBus, invoke`
2236
2233
  );
2237
2234
  }
2238
2235
  }
@@ -2800,7 +2797,7 @@ var EnvironmentLeaseStore = class {
2800
2797
  var EnvironmentManager = class {
2801
2798
  constructor(platform2, options = {}) {
2802
2799
  this.platform = platform2;
2803
- const db = this.platform.getAdapter("db");
2800
+ const db = this.platform.getAdapter("sqlDatabase");
2804
2801
  if (db) {
2805
2802
  this.store = new EnvironmentLeaseStore(db);
2806
2803
  }
@@ -3187,20 +3184,6 @@ var RunExecutor = class {
3187
3184
  */
3188
3185
  async executeStep(request) {
3189
3186
  const { runId, stepId, environmentId, execution } = request;
3190
- const descriptor = execution.descriptor && typeof execution.descriptor === "object" ? {
3191
- ...execution.descriptor,
3192
- run: {
3193
- runId,
3194
- stepId,
3195
- environmentId
3196
- }
3197
- } : {
3198
- run: {
3199
- runId,
3200
- stepId,
3201
- environmentId
3202
- }
3203
- };
3204
3187
  this.logger.debug("RunExecutor: executing step", {
3205
3188
  runId,
3206
3189
  stepId,
@@ -3211,7 +3194,14 @@ var RunExecutor = class {
3211
3194
  });
3212
3195
  return this.executionBackend.execute({
3213
3196
  ...execution,
3214
- descriptor
3197
+ context: {
3198
+ ...execution.context,
3199
+ run: {
3200
+ runId,
3201
+ stepId,
3202
+ environmentId
3203
+ }
3204
+ }
3215
3205
  });
3216
3206
  }
3217
3207
  };