@relayfx/test 0.2.13 → 0.2.14

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.js CHANGED
@@ -21,7 +21,7 @@ __export(exports_scripted_model, {
21
21
  responseParts: () => responseParts,
22
22
  registration: () => registration,
23
23
  nextTurn: () => nextTurn,
24
- layer: () => layer69
24
+ layer: () => layer67
25
25
  });
26
26
 
27
27
  // ../schema/src/address-schema.ts
@@ -2504,10 +2504,17 @@ var layer6 = Layer6.effect(Service6, Effect7.gen(function* () {
2504
2504
  return yield* new ChildFanOutConflict({ fan_out_id: definition.fan_out_id });
2505
2505
  return existing;
2506
2506
  }
2507
- yield* sql.withTransaction(Effect7.gen(function* () {
2507
+ const inserted = sql.withTransaction(Effect7.gen(function* () {
2508
2508
  yield* sql`INSERT INTO relay_child_fan_outs (tenant_id, id, parent_execution_id, definition_json, state, created_at) VALUES (${tenantId}, ${definition.fan_out_id}, ${definition.parent_execution_id}, ${encodeJson(definition)}, 'joining', ${timestampParam(sql, definition.created_at)})`;
2509
2509
  yield* Effect7.forEach(definition.children, (child, ordinal) => sql`INSERT INTO relay_child_fan_out_members (tenant_id, fan_out_id, child_execution_id, ordinal, state) VALUES (${tenantId}, ${definition.fan_out_id}, ${child.child_execution_id}, ${ordinal}, 'queued')`, { discard: true });
2510
- })).pipe(Effect7.mapError(repositoryError));
2510
+ }));
2511
+ yield* inserted.pipe(Effect7.mapError(repositoryError), Effect7.catch((error) => Effect7.gen(function* () {
2512
+ const current2 = yield* load(tenantId, definition.fan_out_id).pipe(Effect7.mapError(repositoryError));
2513
+ if (current2 === undefined)
2514
+ return yield* error;
2515
+ if (!sameDefinition(cloneDefinition2(current2), definition))
2516
+ return yield* new ChildFanOutConflict({ fan_out_id: definition.fan_out_id });
2517
+ })));
2511
2518
  const created = yield* load(tenantId, definition.fan_out_id).pipe(Effect7.mapError(repositoryError));
2512
2519
  if (created === undefined)
2513
2520
  return yield* new ChildFanOutRepositoryError({ message: "Fan-out insert returned no row" });
@@ -9676,12 +9683,20 @@ var memoryLayer27 = Layer28.sync(Service28, () => {
9676
9683
  inspect,
9677
9684
  listNonterminal: Effect29.fn("WorkflowDefinitionRepository.memory.listNonterminal")(() => Effect29.sync(() => [...runs.values()].filter((record2) => record2.status === "running").map(clone3))),
9678
9685
  cancel: Effect29.fn("WorkflowDefinitionRepository.memory.cancel")(function* (id2) {
9686
+ const now = yield* Clock3.currentTimeMillis;
9679
9687
  const record2 = runs.get(id2);
9680
9688
  if (record2 === undefined)
9681
- return;
9682
- const updated = { ...record2, status: "cancelled", updated_at: yield* Clock3.currentTimeMillis };
9689
+ return { transitioned: false, record: undefined };
9690
+ if (record2.status !== "running")
9691
+ return { transitioned: false, record: clone3(record2) };
9692
+ const updated = { ...record2, status: "cancelled", updated_at: now };
9683
9693
  runs.set(id2, updated);
9684
- return clone3(updated);
9694
+ const events = lifecycle.get(id2) ?? [];
9695
+ lifecycle.set(id2, [
9696
+ ...events,
9697
+ { execution_id: id2, sequence: events.length + 1, type: "workflow.cancelled", created_at: now }
9698
+ ]);
9699
+ return { transitioned: true, record: clone3(updated) };
9685
9700
  }),
9686
9701
  getOperation: Effect29.fn("WorkflowDefinitionRepository.memory.getOperation")((executionId, operationId2) => Effect29.sync(() => clone3(operations.get(`${executionId}:${operationId2}`)))),
9687
9702
  putOperation: Effect29.fn("WorkflowDefinitionRepository.memory.putOperation")((state) => Effect29.sync(() => {
@@ -9696,18 +9711,34 @@ var memoryLayer27 = Layer28.sync(Service28, () => {
9696
9711
  return clone3(stored);
9697
9712
  })),
9698
9713
  listLifecycle: Effect29.fn("WorkflowDefinitionRepository.memory.listLifecycle")((executionId) => Effect29.sync(() => clone3(lifecycle.get(executionId) ?? []))),
9699
- finish: Effect29.fn("WorkflowDefinitionRepository.memory.finish")(function* (id2, status) {
9714
+ finish: Effect29.fn("WorkflowDefinitionRepository.memory.finish")(function* (id2, status, data) {
9715
+ const now = yield* Clock3.currentTimeMillis;
9700
9716
  const record2 = runs.get(id2);
9701
- if (record2 === undefined)
9702
- return;
9703
- const updated = { ...record2, status, updated_at: yield* Clock3.currentTimeMillis };
9717
+ if (record2 === undefined || record2.status !== "running")
9718
+ return { transitioned: false, record: record2 === undefined ? undefined : clone3(record2) };
9719
+ const updated = { ...record2, status, updated_at: now };
9704
9720
  runs.set(id2, updated);
9705
- return clone3(updated);
9721
+ const events = lifecycle.get(id2) ?? [];
9722
+ lifecycle.set(id2, [
9723
+ ...events,
9724
+ {
9725
+ execution_id: id2,
9726
+ sequence: events.length + 1,
9727
+ type: status === "completed" ? "workflow.completed" : "workflow.failed",
9728
+ ...data === undefined ? {} : { data: clone3(data) },
9729
+ created_at: now
9730
+ }
9731
+ ]);
9732
+ return { transitioned: true, record: clone3(updated) };
9706
9733
  })
9707
9734
  });
9708
9735
  });
9709
9736
  var layer27 = Layer28.effect(Service28, Effect29.gen(function* () {
9710
9737
  const sql = yield* SqlClient28;
9738
+ const operationUpsert = sql.onDialectOrElse({
9739
+ mysql: () => sql.literal("ON DUPLICATE KEY UPDATE status=VALUES(status), fan_out_id=VALUES(fan_out_id), decision=VALUES(decision), output_json=VALUES(output_json), attempt=VALUES(attempt), backoff_until=VALUES(backoff_until), compensation_operation_id=VALUES(compensation_operation_id), started_at=VALUES(started_at), completed_at=VALUES(completed_at), updated_at=VALUES(updated_at)"),
9740
+ orElse: () => sql.literal("ON CONFLICT (tenant_id, execution_id, operation_id) DO UPDATE SET status=excluded.status, fan_out_id=excluded.fan_out_id, decision=excluded.decision, output_json=excluded.output_json, attempt=excluded.attempt, backoff_until=excluded.backoff_until, compensation_operation_id=excluded.compensation_operation_id, started_at=excluded.started_at, completed_at=excluded.completed_at, updated_at=excluded.updated_at")
9741
+ });
9711
9742
  const register = Effect29.fn("WorkflowDefinitionRepository.register")(function* (input) {
9712
9743
  const tenant = yield* current();
9713
9744
  const digest = yield* Effect29.promise(() => exports_workflow_schema.digestDefinition(input.definition));
@@ -9738,7 +9769,7 @@ var layer27 = Layer28.effect(Service28, Effect29.gen(function* () {
9738
9769
  start: Effect29.fn("WorkflowDefinitionRepository.start")(function* (input) {
9739
9770
  const tenant = yield* current();
9740
9771
  const now = yield* Clock3.currentTimeMillis;
9741
- return yield* sql.withTransaction(Effect29.gen(function* () {
9772
+ const insert = sql.withTransaction(Effect29.gen(function* () {
9742
9773
  const old = yield* sql`SELECT execution_id, workflow_definition_id, workflow_definition_revision, workflow_definition_digest, status, created_at, updated_at FROM relay_workflow_runs WHERE tenant_id=${tenant} AND execution_id=${input.execution_id}`;
9743
9774
  if (old[0] !== undefined)
9744
9775
  return decodeRun(old[0]);
@@ -9758,6 +9789,7 @@ var layer27 = Layer28.effect(Service28, Effect29.gen(function* () {
9758
9789
  updated_at: now
9759
9790
  };
9760
9791
  }));
9792
+ return yield* insert.pipe(Effect29.catch((error5) => sql`SELECT execution_id, workflow_definition_id, workflow_definition_revision, workflow_definition_digest, status, created_at, updated_at FROM relay_workflow_runs WHERE tenant_id=${tenant} AND execution_id=${input.execution_id}`.pipe(Effect29.flatMap((rows) => rows[0] === undefined ? Effect29.fail(error5) : Effect29.succeed(decodeRun(rows[0]))))));
9761
9793
  }),
9762
9794
  inspect: Effect29.fn("WorkflowDefinitionRepository.inspect")(function* (id2) {
9763
9795
  const tenant = yield* current();
@@ -9772,9 +9804,7 @@ var layer27 = Layer28.effect(Service28, Effect29.gen(function* () {
9772
9804
  cancel: Effect29.fn("WorkflowDefinitionRepository.cancel")(function* (id2) {
9773
9805
  const tenant = yield* current();
9774
9806
  const now = yield* Clock3.currentTimeMillis;
9775
- yield* sql`UPDATE relay_workflow_runs SET status='cancelled', updated_at=${timestampParam(sql, now)} WHERE tenant_id=${tenant} AND execution_id=${id2}`;
9776
- const rows = yield* sql`SELECT execution_id, workflow_definition_id, workflow_definition_revision, workflow_definition_digest, status, created_at, updated_at FROM relay_workflow_runs WHERE tenant_id=${tenant} AND execution_id=${id2}`;
9777
- return rows[0] === undefined ? undefined : decodeRun(rows[0]);
9807
+ return yield* transition2(sql, tenant, id2, "cancelled", now);
9778
9808
  }),
9779
9809
  getOperation: Effect29.fn("WorkflowDefinitionRepository.getOperation")(function* (executionId, operationId2) {
9780
9810
  const tenant = yield* current();
@@ -9783,8 +9813,7 @@ var layer27 = Layer28.effect(Service28, Effect29.gen(function* () {
9783
9813
  }),
9784
9814
  putOperation: Effect29.fn("WorkflowDefinitionRepository.putOperation")(function* (state) {
9785
9815
  const tenant = yield* current();
9786
- yield* sql`DELETE FROM relay_workflow_operation_states WHERE tenant_id=${tenant} AND execution_id=${state.execution_id} AND operation_id=${state.operation_id}`;
9787
- yield* sql`INSERT INTO relay_workflow_operation_states (tenant_id, execution_id, operation_id, status, fan_out_id, decision, output_json, attempt, backoff_until, compensation_operation_id, started_at, completed_at, updated_at) VALUES (${tenant}, ${state.execution_id}, ${state.operation_id}, ${state.status}, ${state.fan_out_id ?? null}, ${state.decision === undefined ? null : state.decision}, ${state.output === undefined ? null : encodeJson(state.output)}, ${state.attempt ?? null}, ${state.backoff_until === undefined ? null : timestampParam(sql, state.backoff_until)}, ${state.compensation_operation_id ?? null}, ${state.started_at === undefined ? null : timestampParam(sql, state.started_at)}, ${state.completed_at === undefined ? null : timestampParam(sql, state.completed_at)}, ${timestampParam(sql, state.updated_at)})`;
9816
+ yield* sql`INSERT INTO relay_workflow_operation_states (tenant_id, execution_id, operation_id, status, fan_out_id, decision, output_json, attempt, backoff_until, compensation_operation_id, started_at, completed_at, updated_at) VALUES (${tenant}, ${state.execution_id}, ${state.operation_id}, ${state.status}, ${state.fan_out_id ?? null}, ${state.decision === undefined ? null : state.decision}, ${state.output === undefined ? null : encodeJson(state.output)}, ${state.attempt ?? null}, ${state.backoff_until === undefined ? null : timestampParam(sql, state.backoff_until)}, ${state.compensation_operation_id ?? null}, ${state.started_at === undefined ? null : timestampParam(sql, state.started_at)}, ${state.completed_at === undefined ? null : timestampParam(sql, state.completed_at)}, ${timestampParam(sql, state.updated_at)}) ${operationUpsert}`;
9788
9817
  return state;
9789
9818
  }),
9790
9819
  listOperations: Effect29.fn("WorkflowDefinitionRepository.listOperations")(function* (executionId) {
@@ -9806,15 +9835,41 @@ var layer27 = Layer28.effect(Service28, Effect29.gen(function* () {
9806
9835
  const rows = yield* sql`SELECT * FROM relay_workflow_lifecycle_events WHERE tenant_id=${tenant} AND execution_id=${executionId} ORDER BY sequence`;
9807
9836
  return rows.map(decodeLifecycle);
9808
9837
  }),
9809
- finish: Effect29.fn("WorkflowDefinitionRepository.finish")(function* (id2, status) {
9838
+ finish: Effect29.fn("WorkflowDefinitionRepository.finish")(function* (id2, status, data) {
9810
9839
  const tenant = yield* current();
9811
9840
  const now = yield* Clock3.currentTimeMillis;
9812
- yield* sql`UPDATE relay_workflow_runs SET status=${status}, updated_at=${timestampParam(sql, now)} WHERE tenant_id=${tenant} AND execution_id=${id2}`;
9813
- const rows = yield* sql`SELECT execution_id, workflow_definition_id, workflow_definition_revision, workflow_definition_digest, status, created_at, updated_at FROM relay_workflow_runs WHERE tenant_id=${tenant} AND execution_id=${id2}`;
9814
- return rows[0] === undefined ? undefined : decodeRun(rows[0]);
9841
+ return yield* transition2(sql, tenant, id2, status, now, data);
9815
9842
  })
9816
9843
  });
9817
9844
  }));
9845
+ var transition2 = (sql, tenant, id2, status, now, data) => sql.withTransaction(Effect29.gen(function* () {
9846
+ const result = yield* sql.onDialectOrElse({
9847
+ mysql: () => Effect29.gen(function* () {
9848
+ const before = yield* sql`SELECT execution_id, workflow_definition_id, workflow_definition_revision, workflow_definition_digest, status, created_at, updated_at FROM relay_workflow_runs WHERE tenant_id=${tenant} AND execution_id=${id2} FOR UPDATE`;
9849
+ if (before[0] === undefined)
9850
+ return { transitioned: false, record: undefined };
9851
+ if (before[0].status !== "running")
9852
+ return { transitioned: false, record: decodeRun(before[0]) };
9853
+ yield* sql`UPDATE relay_workflow_runs SET status=${status}, updated_at=${timestampParam(sql, now)} WHERE tenant_id=${tenant} AND execution_id=${id2} AND status='running'`;
9854
+ const rows2 = yield* sql`SELECT execution_id, workflow_definition_id, workflow_definition_revision, workflow_definition_digest, status, created_at, updated_at FROM relay_workflow_runs WHERE tenant_id=${tenant} AND execution_id=${id2}`;
9855
+ return { transitioned: true, record: decodeRun(rows2[0]) };
9856
+ }),
9857
+ orElse: () => Effect29.gen(function* () {
9858
+ const changed = yield* sql`UPDATE relay_workflow_runs SET status=${status}, updated_at=${timestampParam(sql, now)} WHERE tenant_id=${tenant} AND execution_id=${id2} AND status='running' RETURNING execution_id, workflow_definition_id, workflow_definition_revision, workflow_definition_digest, status, created_at, updated_at`;
9859
+ if (changed[0] !== undefined)
9860
+ return { transitioned: true, record: decodeRun(changed[0]) };
9861
+ const rows2 = yield* sql`SELECT execution_id, workflow_definition_id, workflow_definition_revision, workflow_definition_digest, status, created_at, updated_at FROM relay_workflow_runs WHERE tenant_id=${tenant} AND execution_id=${id2}`;
9862
+ return { transitioned: false, record: rows2[0] === undefined ? undefined : decodeRun(rows2[0]) };
9863
+ })
9864
+ });
9865
+ if (!result.transitioned)
9866
+ return result;
9867
+ const rows = yield* sql`SELECT COALESCE(MAX(sequence), 0) AS sequence FROM relay_workflow_lifecycle_events WHERE tenant_id=${tenant} AND execution_id=${id2}`;
9868
+ const sequence = Number(rows[0]?.sequence ?? 0) + 1;
9869
+ const eventType = status === "cancelled" ? "workflow.cancelled" : status === "completed" ? "workflow.completed" : "workflow.failed";
9870
+ yield* sql`INSERT INTO relay_workflow_lifecycle_events (tenant_id, execution_id, sequence, event_type, operation_id, data_json, created_at) VALUES (${tenant}, ${id2}, ${sequence}, ${eventType}, ${null}, ${data === undefined ? null : encodeJson(data)}, ${timestampParam(sql, now)})`;
9871
+ return result;
9872
+ }));
9818
9873
  var decodeDefinition = (row) => ({
9819
9874
  id: exports_ids_schema.WorkflowDefinitionId.make(row.workflow_definition_id),
9820
9875
  revision: Number(row.revision),
@@ -10248,7 +10303,10 @@ var layerFromRepository2 = Layer30.effect(Service30, Effect33.gen(function* () {
10248
10303
  yield* recordEventReplayed("repository", replay.history.length);
10249
10304
  return replay.history;
10250
10305
  }),
10251
- stream: (input) => Stream5.unwrap(loadReplay(input).pipe(Effect33.map(({ history, sequence }) => Stream5.fromIterable(history).pipe(Stream5.concat(liveTail(repository, hubs, input, history.at(-1)?.sequence ?? sequence).pipe(Stream5.takeUntil(isTerminal))))))),
10306
+ stream: (input) => Stream5.unwrap(loadReplay(input).pipe(Effect33.map(({ history, sequence }) => {
10307
+ const replay = Stream5.fromIterable(history);
10308
+ return history.some(isTerminal) ? replay : replay.pipe(Stream5.concat(liveTail(repository, hubs, input, history.at(-1)?.sequence ?? sequence).pipe(Stream5.takeUntil(isTerminal))));
10309
+ }))),
10252
10310
  findBySequenceOrCursor: Effect33.fn("EventLog.repository.findBySequenceOrCursor")((input) => repository.findBySequenceOrCursor(input).pipe(Effect33.mapError(mapRepositoryFindError))),
10253
10311
  findByCursor: Effect33.fn("EventLog.repository.findByCursor")((input) => repository.findByCursor(input).pipe(Effect33.mapError(mapRepositoryFindError))),
10254
10312
  findBySequence: Effect33.fn("EventLog.repository.findBySequence")((input) => repository.findBySequence(input).pipe(Effect33.mapError(mapRepositoryFindError))),
@@ -10300,7 +10358,10 @@ var memoryLayer28 = Layer30.effect(Service30, Effect33.gen(function* () {
10300
10358
  yield* recordEventReplayed("memory", replay.history.length);
10301
10359
  return replay.history;
10302
10360
  }),
10303
- stream: (input) => Stream5.unwrap(loadReplay(input).pipe(Effect33.map(({ history, sequence }) => Stream5.fromIterable(history).pipe(Stream5.concat(liveEvents(pubsub, input, history, sequence)))))),
10361
+ stream: (input) => Stream5.unwrap(loadReplay(input).pipe(Effect33.map(({ history, sequence }) => {
10362
+ const replay = Stream5.fromIterable(history);
10363
+ return history.some(isTerminal) ? replay : replay.pipe(Stream5.concat(liveEvents(pubsub, input, history, sequence)));
10364
+ }))),
10304
10365
  findBySequenceOrCursor: Effect33.fn("EventLog.memory.findBySequenceOrCursor")(function* (input) {
10305
10366
  const executionEvents = yield* allEvents(input.executionId);
10306
10367
  const event = executionEvents.find((item) => item.sequence === input.sequence || item.cursor === input.cursor);
@@ -16500,15 +16561,15 @@ var makeLayer = (signalDependencies) => Layer69.effect(Service55, Effect76.gen(f
16500
16561
  if (wait?.state === "open") {
16501
16562
  const waitId = wait.id;
16502
16563
  const sequence = yield* nextSequence(eventLog, input.executionId).pipe(Effect76.mapError((error5) => new InboxDeliveryError({ execution_id: input.executionId, message: error5._tag })));
16503
- const transition2 = yield* waits.wake({ waitId, resolvedAt: input.createdAt, eventSequence: sequence }).pipe(Effect76.mapError((error5) => new InboxDeliveryError({
16564
+ const transition3 = yield* waits.wake({ waitId, resolvedAt: input.createdAt, eventSequence: sequence }).pipe(Effect76.mapError((error5) => new InboxDeliveryError({
16504
16565
  execution_id: input.executionId,
16505
16566
  message: error5._tag === "WaitNotFound" ? error5.wait_id : error5.message
16506
16567
  })));
16507
- if (transition2.transitioned && signalDependencies !== undefined) {
16568
+ if (transition3.transitioned && signalDependencies !== undefined) {
16508
16569
  yield* signalWorkflowWait({
16509
16570
  makeExecutionClient: signalDependencies.makeExecutionClient,
16510
- executionId: transition2.wait.executionId,
16511
- waitId: transition2.wait.id,
16571
+ executionId: transition3.wait.executionId,
16572
+ waitId: transition3.wait.id,
16512
16573
  state: "resolved",
16513
16574
  signaledAt: input.createdAt
16514
16575
  }).pipe(Effect76.provideService(exports_execution_repository.Service, signalDependencies.executionRepository), Effect76.mapError((error5) => new InboxDeliveryError({ execution_id: input.executionId, message: String(error5) })));
@@ -16546,14 +16607,14 @@ var makeLayer = (signalDependencies) => Layer69.effect(Service55, Effect76.gen(f
16546
16607
  }
16547
16608
  }).pipe(Effect76.mapError((error5) => new InboxDeliveryError({ execution_id: wait.executionId, message: error5.message })));
16548
16609
  const sequence = yield* nextSequence(eventLog, wait.executionId).pipe(Effect76.mapError((error5) => new InboxDeliveryError({ execution_id: wait.executionId, message: error5._tag })));
16549
- const transition2 = yield* waits.wake({ waitId, resolvedAt: input.createdAt, eventSequence: sequence }).pipe(Effect76.mapError(() => new InboxReplyTokenInvalid({ reply_token: input.replyToken })));
16550
- if (!transition2.transitioned)
16610
+ const transition3 = yield* waits.wake({ waitId, resolvedAt: input.createdAt, eventSequence: sequence }).pipe(Effect76.mapError(() => new InboxReplyTokenInvalid({ reply_token: input.replyToken })));
16611
+ if (!transition3.transitioned)
16551
16612
  return yield* new InboxReplyTokenInvalid({ reply_token: input.replyToken });
16552
16613
  if (signalDependencies !== undefined) {
16553
16614
  yield* signalWorkflowWait({
16554
16615
  makeExecutionClient: signalDependencies.makeExecutionClient,
16555
- executionId: transition2.wait.executionId,
16556
- waitId: transition2.wait.id,
16616
+ executionId: transition3.wait.executionId,
16617
+ waitId: transition3.wait.id,
16557
16618
  state: "resolved",
16558
16619
  signaledAt: input.createdAt
16559
16620
  }).pipe(Effect76.provideService(exports_execution_repository.Service, signalDependencies.executionRepository), Effect76.mapError((error5) => new InboxDeliveryError({ execution_id: wait.executionId, message: String(error5) })));
@@ -16738,8 +16799,8 @@ var registeredTool4 = (config) => tool(toolName4, {
16738
16799
  }).pipe(Effect79.mapError((error5) => new ToolRuntimeError({ message: error5.message })));
16739
16800
  if ((yield* config.inbox.undrainedCount(context.executionId).pipe(Effect79.mapError((error5) => new ToolRuntimeError({ message: error5.message })))) > 0) {
16740
16801
  const sequence = yield* config.eventLog.maxSequence(context.executionId).pipe(Effect79.map((value) => (value ?? -1) + 1), Effect79.mapError((error5) => new ToolRuntimeError({ message: error5._tag })));
16741
- const transition2 = yield* config.waits.wake({ waitId, resolvedAt: context.createdAt, eventSequence: sequence }).pipe(Effect79.mapError((error5) => new ToolRuntimeError({ message: error5._tag })));
16742
- if (transition2.transitioned) {
16802
+ const transition3 = yield* config.waits.wake({ waitId, resolvedAt: context.createdAt, eventSequence: sequence }).pipe(Effect79.mapError((error5) => new ToolRuntimeError({ message: error5._tag })));
16803
+ if (transition3.transitioned) {
16743
16804
  const drained = yield* drain3();
16744
16805
  return { status: "messages", messages: drained.map(project2) };
16745
16806
  }
@@ -18368,7 +18429,7 @@ var terminal2 = Effect92.fn("ChildFanOutTransitionService.terminal.call")(functi
18368
18429
  return yield* service.terminal(input);
18369
18430
  });
18370
18431
  // ../runtime/src/child/child-fan-out-runtime.ts
18371
- import { Clock as Clock15, Context as Context75, Effect as Effect93, Layer as Layer82, Schema as Schema94 } from "effect";
18432
+ import { Clock as Clock15, Context as Context75, Effect as Effect93, FiberMap, Layer as Layer82, Schema as Schema94 } from "effect";
18372
18433
  class HandlerService extends Context75.Service()("@relayfx/runtime/ChildFanOutRuntimeHandlers") {
18373
18434
  }
18374
18435
 
@@ -18378,11 +18439,11 @@ class ChildFanOutRuntimeError extends Schema94.TaggedErrorClass()("ChildFanOutRu
18378
18439
  class Service62 extends Context75.Service()("@relayfx/runtime/ChildFanOutRuntime") {
18379
18440
  }
18380
18441
  var runtimeError = (error5) => new ChildFanOutRuntimeError({ message: String(error5) });
18381
- var layer62 = Layer82.effect(Service62, Effect93.gen(function* () {
18442
+ var layerFromRuntime = Layer82.effect(Service62, Effect93.gen(function* () {
18382
18443
  const repository = yield* exports_child_fan_out_repository.Service;
18383
18444
  const transitions = yield* Service61;
18384
18445
  const handlers = yield* HandlerService;
18385
- const scope = yield* Effect93.scope;
18446
+ const hosts = yield* FiberMap.make();
18386
18447
  const run5 = Effect93.fn("ChildFanOutRuntime.run")(function* (fanOutId) {
18387
18448
  while (true) {
18388
18449
  const fanOut = yield* repository.get(fanOutId);
@@ -18412,7 +18473,7 @@ var layer62 = Layer82.effect(Service62, Effect93.gen(function* () {
18412
18473
  })), { concurrency: fanOut.max_concurrency, discard: true });
18413
18474
  }
18414
18475
  });
18415
- const launch = (fanOutId) => run5(fanOutId).pipe(Effect93.ignore, Effect93.forkIn(scope), Effect93.asVoid);
18476
+ const launch = (fanOutId) => FiberMap.run(hosts, fanOutId, run5(fanOutId).pipe(Effect93.ignore), { onlyIfMissing: true }).pipe(Effect93.asVoid);
18416
18477
  const recover2 = Effect93.fn("ChildFanOutRuntime.recover")(function* () {
18417
18478
  const fanOuts = yield* repository.listNonTerminal();
18418
18479
  yield* Effect93.forEach(fanOuts, (fanOut) => launch(fanOut.fan_out_id), { discard: true });
@@ -18467,7 +18528,7 @@ var entity = Entity2.make("Relay/Execution", [
18467
18528
  SignalWait,
18468
18529
  Cancel
18469
18530
  ]).annotate(ClusterSchema.ShardGroup, () => "execution");
18470
- var layer63 = entity.toLayer(entity.of({
18531
+ var layer62 = entity.toLayer(entity.of({
18471
18532
  start: (request) => startRequest(request.payload),
18472
18533
  dispatch: (request) => dispatchRequest(request.payload),
18473
18534
  signalWait: (request) => signalWait(request.payload),
@@ -18498,7 +18559,7 @@ class EntityRegistryError extends Schema96.TaggedErrorClass()("EntityRegistryErr
18498
18559
  class Service63 extends Context76.Service()("@relayfx/runtime/EntityRegistry") {
18499
18560
  }
18500
18561
  var repositoryError4 = (error5) => new EntityRegistryError({ message: error5.message });
18501
- var layer64 = Layer83.effect(Service63, Effect94.gen(function* () {
18562
+ var layer63 = Layer83.effect(Service63, Effect94.gen(function* () {
18502
18563
  const repository = yield* exports_entity_repository.Service;
18503
18564
  const agents = yield* Service33;
18504
18565
  return Service63.of({
@@ -18556,7 +18617,7 @@ var lifecycleEvent = (instance, type, at, sequence) => ({
18556
18617
  data: { kind: instance.kind, key: instance.key, generation: instance.generation },
18557
18618
  created_at: at
18558
18619
  });
18559
- var layer65 = Layer84.effect(Service64, Effect95.gen(function* () {
18620
+ var layer64 = Layer84.effect(Service64, Effect95.gen(function* () {
18560
18621
  const repository = yield* exports_entity_repository.Service;
18561
18622
  const registry = yield* Service63;
18562
18623
  const agents = yield* Service33;
@@ -18737,7 +18798,7 @@ __export(exports_runner_runtime_service, {
18737
18798
  layerWithLanguageModelService: () => layerWithLanguageModelService,
18738
18799
  layerWithClient: () => layerWithClient,
18739
18800
  layerWith: () => layerWith,
18740
- layer: () => layer67,
18801
+ layer: () => layer66,
18741
18802
  clusterShardingConfigLayer: () => clusterShardingConfigLayer,
18742
18803
  clusterLayerHttpClientOnly: () => clusterLayerHttpClientOnly,
18743
18804
  clusterLayerHttp: () => clusterLayerHttp,
@@ -18913,7 +18974,7 @@ var pollLoop = (service, pollIntervalMillis) => Effect98.gen(function* () {
18913
18974
  }
18914
18975
  }
18915
18976
  });
18916
- var layer66 = Layer87.effect(Service67, Effect98.gen(function* () {
18977
+ var layer65 = Layer87.effect(Service67, Effect98.gen(function* () {
18917
18978
  const service = yield* make15;
18918
18979
  const enabled3 = yield* enabledConfig;
18919
18980
  const pollIntervalMillis = yield* pollIntervalMillisConfig;
@@ -19053,7 +19114,8 @@ var assertClusterConfig = Effect99.fn("RunnerRuntime.assertClusterConfig")(funct
19053
19114
  return yield* new ClusterConfigMismatch({ field: "availableShardGroups", expected: want, actual });
19054
19115
  }
19055
19116
  });
19056
- var sqlRepositoryBaseLayer = Layer88.mergeAll(exports_address_book_repository.layer, exports_agent_chat_repository.layer, exports_agent_definition_repository.layer, exports_workflow_definition_repository.layer, exports_child_execution_repository.layer, exports_child_fan_out_repository.layer, exports_cluster_registry_repository.layer, exports_compaction_repository.layer, exports_context_epoch_repository.layer, exports_execution_repository.layer, exports_envelope_repository.layer, exports_entity_repository.layer, exports_execution_event_repository.layerWithBus, exports_inbox_repository.layer, exports_memory_repository.layer, exports_topic_repository.layer, exports_permission_rule_repository.layer, exports_presence_repository.layer.pipe(Layer88.provide(exports_notification_bus.layerFromDialect)), exports_schedule_repository.layer, exports_session_repository.layer, exports_skill_definition_repository.layer, exports_steering_repository.layer, exports_tool_call_repository.layer, exports_workspace_lease_repository.layer);
19117
+ var sqlNotificationLayer = exports_notification_bus.layerFromDialect;
19118
+ var sqlRepositoryBaseLayer = Layer88.mergeAll(exports_address_book_repository.layer, exports_agent_chat_repository.layer, exports_agent_definition_repository.layer, exports_workflow_definition_repository.layer, exports_child_execution_repository.layer, exports_child_fan_out_repository.layer, exports_cluster_registry_repository.layer, exports_compaction_repository.layer, exports_context_epoch_repository.layer, exports_execution_repository.layerWithoutBus, exports_envelope_repository.layer, exports_entity_repository.layer, exports_execution_event_repository.layer, exports_inbox_repository.layer, exports_memory_repository.layer, exports_topic_repository.layer, exports_permission_rule_repository.layer, exports_presence_repository.layer, exports_schedule_repository.layer, exports_session_repository.layer, exports_skill_definition_repository.layer, exports_steering_repository.layer, exports_tool_call_repository.layer, exports_workspace_lease_repository.layer).pipe(Layer88.provideMerge(sqlNotificationLayer));
19057
19119
  var sqlRepositoryLayer = Layer88.mergeAll(sqlRepositoryBaseLayer, exports_execution_state_repository.layer.pipe(Layer88.provide(sqlRepositoryBaseLayer)));
19058
19120
  var memoryRepositoryBaseLayer = Layer88.mergeAll(exports_address_book_repository.memoryLayer, exports_agent_chat_repository.memoryLayer, exports_agent_definition_repository.memoryLayer, exports_workflow_definition_repository.memoryLayer, exports_child_execution_repository.memoryLayer, exports_child_fan_out_repository.memoryLayer, exports_cluster_registry_repository.memoryLayer, exports_compaction_repository.memoryLayer, exports_context_epoch_repository.memoryLayer, exports_execution_repository.memoryLayer, exports_envelope_repository.memoryLayer, exports_entity_repository.memoryLayer, exports_execution_event_repository.memoryLayer, exports_inbox_repository.memoryLayer, exports_memory_repository.memoryLayer, exports_topic_repository.memoryLayer, exports_permission_rule_repository.memoryLayer, exports_presence_repository.memoryLayer, exports_schedule_repository.memoryLayer, exports_session_repository.memoryLayer, exports_skill_definition_repository.memoryLayer, exports_steering_repository.memoryLayer, exports_tool_call_repository.memoryLayer, exports_workspace_lease_repository.memoryLayer);
19059
19121
  var memoryRepositoryLayer = Layer88.mergeAll(memoryRepositoryBaseLayer, exports_execution_state_repository.memoryLayer.pipe(Layer88.provide(memoryRepositoryBaseLayer)));
@@ -19086,12 +19148,12 @@ var runtimeServicesLayerWith = (toolRuntimeLayer, promptAssemblerLayer, schemaRe
19086
19148
  const envelopeLayer = layer53.pipe(Layer88.provideMerge(layerFromRepository), Layer88.provideMerge(inboxLayer));
19087
19149
  const topicLayer = layer52.pipe(Layer88.provideMerge(inboxLayer));
19088
19150
  const agentLayer = agentLoopLayerWith(toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer).pipe(Layer88.provideMerge(inboxLayer), Layer88.provideMerge(envelopeLayer), Layer88.provideMerge(topicLayer));
19089
- const entityRegistryLayer = layer64.pipe(Layer88.provideMerge(layer30));
19090
- const entityInstanceLayer = layer65.pipe(Layer88.provideMerge(entityRegistryLayer), Layer88.provideMerge(layerFromRepository), Layer88.provideMerge(layerFromRepository2));
19151
+ const entityRegistryLayer = layer63.pipe(Layer88.provideMerge(layer30));
19152
+ const entityInstanceLayer = layer64.pipe(Layer88.provideMerge(entityRegistryLayer), Layer88.provideMerge(layerFromRepository), Layer88.provideMerge(layerFromRepository2));
19091
19153
  return Layer88.mergeAll(addressResolutionLayerWith(toolRuntimeLayer), layer46, executionServiceLayer, layerFromServices, layerFromServices2, layerFromRepository3, agentLayer, layer49, parentNotifierLayer, inboxLayer, envelopeLayer, topicLayer, entityRegistryLayer, entityInstanceLayer, toolTransitionCoordinatorLayer, layer48).pipe(Layer88.provideMerge(layer45), Layer88.provideMerge(layer28), Layer88.provideMerge(layerFromRepository2));
19092
19154
  };
19093
19155
  var workflowLayerWith = (toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer) => layer50.pipe(Layer88.provideMerge(runtimeServicesLayerWith(toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer)));
19094
- var workflowAndEntityLayerWith = (toolRuntimeLayer, schedulerLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer) => Layer88.mergeAll(layer63, schedulerLayer).pipe(Layer88.provideMerge(workflowLayerWith(toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer)));
19156
+ var workflowAndEntityLayerWith = (toolRuntimeLayer, schedulerLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer) => Layer88.mergeAll(layer62, schedulerLayer).pipe(Layer88.provideMerge(workflowLayerWith(toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer)));
19095
19157
  var makeService2 = (database, checkDatabase) => Effect99.gen(function* () {
19096
19158
  const sharding = yield* Sharding.Sharding;
19097
19159
  const workflow = yield* WorkflowEngine.WorkflowEngine;
@@ -19209,7 +19271,7 @@ var layerWithServices = (options) => {
19209
19271
  languageModelLayer: options.languageModelLayer,
19210
19272
  embeddingModelLayer: options.embeddingModelLayer,
19211
19273
  toolRuntimeLayer: options.toolRuntimeLayer,
19212
- schedulerLayer: layer66,
19274
+ schedulerLayer: layer65,
19213
19275
  promptAssemblerLayer: options.promptAssemblerLayer,
19214
19276
  blobStoreLayer: options.blobStoreLayer,
19215
19277
  artifactStoreLayer: options.artifactStoreLayer,
@@ -19226,7 +19288,7 @@ var layerWithServicesMultiNode = (options) => {
19226
19288
  languageModelLayer: options.languageModelLayer,
19227
19289
  embeddingModelLayer: options.embeddingModelLayer,
19228
19290
  toolRuntimeLayer: options.toolRuntimeLayer,
19229
- schedulerLayer: layer66,
19291
+ schedulerLayer: layer65,
19230
19292
  promptAssemblerLayer: options.promptAssemblerLayer,
19231
19293
  blobStoreLayer: options.blobStoreLayer,
19232
19294
  artifactStoreLayer: options.artifactStoreLayer,
@@ -19251,7 +19313,7 @@ var layerWithServicesMultiNodeClientOnly = (options) => {
19251
19313
  return runtime.pipe(Layer88.provide(options.databaseLayer));
19252
19314
  };
19253
19315
  var layerWithLanguageModelService = (options) => layerWithServices({ ...options, toolRuntimeLayer: layer29() });
19254
- var layer67 = layerWith({
19316
+ var layer66 = layerWith({
19255
19317
  toolTransitionCoordinatorLayer: sqlLayer,
19256
19318
  checkLayer: sqlCheckLayer,
19257
19319
  clusterLayer: sqlClusterLayer,
@@ -19259,7 +19321,7 @@ var layer67 = layerWith({
19259
19321
  languageModelLayer: memoryLayer35(),
19260
19322
  embeddingModelLayer: memoryLayer34(),
19261
19323
  toolRuntimeLayer: layer29(),
19262
- schedulerLayer: layer66
19324
+ schedulerLayer: layer65
19263
19325
  });
19264
19326
  var testLayerWithServices = (options) => layerWith({
19265
19327
  toolTransitionCoordinatorLayer: memoryLayer40,
@@ -19309,7 +19371,7 @@ var check = Effect99.fn("RunnerRuntime.check.call")(function* () {
19309
19371
  return yield* service.check();
19310
19372
  });
19311
19373
  // ../runtime/src/workflow/definition-runtime.ts
19312
- import { Cause as Cause5, Clock as Clock17, Context as Context82, Effect as Effect100, Exit as Exit3, Layer as Layer89, Option as Option30, Schema as Schema102 } from "effect";
19374
+ import { Cause as Cause5, Clock as Clock17, Context as Context82, Effect as Effect100, Exit as Exit3, FiberMap as FiberMap2, Layer as Layer89, Option as Option30, Schema as Schema102 } from "effect";
19313
19375
 
19314
19376
  class UnsupportedOperation extends Schema102.TaggedErrorClass()("UnsupportedWorkflowOperation", { operation_id: exports_ids_schema.WorkflowOperationId, kind: Schema102.String }) {
19315
19377
  }
@@ -19607,7 +19669,7 @@ var run5 = Effect100.fn("WorkflowDefinitionRuntime.run")(function* (executionId)
19607
19669
  });
19608
19670
  break;
19609
19671
  }
19610
- const completedAt2 = yield* Clock17.currentTimeMillis;
19672
+ const completedAt = yield* Clock17.currentTimeMillis;
19611
19673
  const current2 = yield* repository.getOperation(executionId, id2);
19612
19674
  yield* repository.putOperation({
19613
19675
  execution_id: executionId,
@@ -19617,15 +19679,15 @@ var run5 = Effect100.fn("WorkflowDefinitionRuntime.run")(function* (executionId)
19617
19679
  ...current2?.decision === undefined ? {} : { decision: current2.decision },
19618
19680
  ...current2?.fan_out_id === undefined ? {} : { fan_out_id: current2.fan_out_id },
19619
19681
  started_at: startedAt,
19620
- completed_at: completedAt2,
19621
- updated_at: completedAt2
19682
+ completed_at: completedAt,
19683
+ updated_at: completedAt
19622
19684
  });
19623
19685
  yield* repository.appendLifecycle({
19624
19686
  execution_id: executionId,
19625
19687
  operation_id: id2,
19626
19688
  type: "operation.completed",
19627
19689
  ...output2 === undefined ? {} : { data: output2 },
19628
- created_at: completedAt2
19690
+ created_at: completedAt
19629
19691
  });
19630
19692
  return output2;
19631
19693
  });
@@ -19635,11 +19697,7 @@ var run5 = Effect100.fn("WorkflowDefinitionRuntime.run")(function* (executionId)
19635
19697
  if (Option30.isSome(failure3) && failure3.value instanceof WorkflowJoining)
19636
19698
  return yield* result;
19637
19699
  const currentRun = yield* repository.inspect(executionId);
19638
- const now = yield* Clock17.currentTimeMillis;
19639
19700
  if (currentRun?.status === "cancelled") {
19640
- const events = yield* repository.listLifecycle(executionId);
19641
- if (!events.some((event) => event.type === "workflow.cancelled"))
19642
- yield* repository.appendLifecycle({ execution_id: executionId, type: "workflow.cancelled", created_at: now });
19643
19701
  return yield* result;
19644
19702
  }
19645
19703
  const states = yield* repository.listOperations(executionId);
@@ -19655,44 +19713,33 @@ var run5 = Effect100.fn("WorkflowDefinitionRuntime.run")(function* (executionId)
19655
19713
  created_at: yield* Clock17.currentTimeMillis
19656
19714
  });
19657
19715
  yield* execute(state.compensation_operation_id);
19658
- const completedAt2 = yield* Clock17.currentTimeMillis;
19716
+ const completedAt = yield* Clock17.currentTimeMillis;
19659
19717
  yield* repository.putOperation({
19660
19718
  ...state,
19661
19719
  status: "compensated",
19662
- completed_at: completedAt2,
19663
- updated_at: completedAt2
19720
+ completed_at: completedAt,
19721
+ updated_at: completedAt
19664
19722
  });
19665
19723
  yield* repository.appendLifecycle({
19666
19724
  execution_id: executionId,
19667
19725
  operation_id: state.operation_id,
19668
19726
  type: "compensation.completed",
19669
- created_at: completedAt2
19727
+ created_at: completedAt
19670
19728
  });
19671
19729
  }
19672
19730
  yield* repository.finish(executionId, "failed");
19673
- yield* repository.appendLifecycle({
19674
- execution_id: executionId,
19675
- type: "workflow.failed",
19676
- created_at: yield* Clock17.currentTimeMillis
19677
- });
19678
19731
  return yield* result;
19679
19732
  }
19680
19733
  const output = result.value;
19681
- const completedAt = yield* Clock17.currentTimeMillis;
19682
- yield* repository.finish(executionId, "completed");
19683
- yield* repository.appendLifecycle({
19684
- execution_id: executionId,
19685
- type: "workflow.completed",
19686
- ...output === undefined ? {} : { data: output },
19687
- created_at: completedAt
19688
- });
19734
+ yield* repository.finish(executionId, "completed", output);
19689
19735
  return output;
19690
19736
  });
19691
- var layer68 = Layer89.effect(Service69, Effect100.gen(function* () {
19737
+ var layerFromRuntime2 = Layer89.effect(Service69, Effect100.gen(function* () {
19692
19738
  const repository = yield* exports_workflow_definition_repository.Service;
19693
19739
  const handlers = yield* HandlerService2;
19740
+ const hosts = yield* FiberMap2.make();
19694
19741
  const execute = (executionId) => run5(executionId).pipe(Effect100.provideService(HandlerService2, handlers), Effect100.provideService(exports_workflow_definition_repository.Service, repository));
19695
- const launch = Effect100.fn("WorkflowDefinitionRuntime.launch")((executionId) => execute(executionId).pipe(Effect100.ignore, Effect100.forkDetach, Effect100.asVoid));
19742
+ const launch = Effect100.fn("WorkflowDefinitionRuntime.launch")((executionId) => FiberMap2.run(hosts, executionId, execute(executionId).pipe(Effect100.ignore), { onlyIfMissing: true }).pipe(Effect100.asVoid));
19696
19743
  const recover2 = Effect100.fn("WorkflowDefinitionRuntime.recover")(function* () {
19697
19744
  const records = yield* repository.listNonterminal();
19698
19745
  yield* Effect100.forEach(records, (record2) => launch(record2.execution_id), { discard: true });
@@ -19708,7 +19755,10 @@ var layer68 = Layer89.effect(Service69, Effect100.gen(function* () {
19708
19755
  recover: recover2,
19709
19756
  inspect: repository.inspect,
19710
19757
  replay: repository.listLifecycle,
19711
- cancel: repository.cancel
19758
+ cancel: Effect100.fn("WorkflowDefinitionRuntime.cancel")(function* (executionId) {
19759
+ const cancelled = yield* repository.cancel(executionId);
19760
+ return cancelled.record;
19761
+ })
19712
19762
  });
19713
19763
  yield* recover2();
19714
19764
  return service;
@@ -19982,7 +20032,7 @@ var nextTurn = (cursor, turns) => Ref26.getAndUpdate(cursor, (index) => index +
19982
20032
  }
19983
20033
  return Effect102.succeed(turn);
19984
20034
  }));
19985
- var layer69 = (turns) => {
20035
+ var layer67 = (turns) => {
19986
20036
  const cursor = Effect102.runSync(Ref26.make(0));
19987
20037
  return Layer90.effect(LanguageModel9.LanguageModel, LanguageModel9.make({
19988
20038
  generateText: () => nextTurn(cursor, turns).pipe(Effect102.map((turn) => [...responseParts(turn)])),
@@ -19992,7 +20042,7 @@ var layer69 = (turns) => {
19992
20042
  var registration = (turns, options) => Effect102.runSync(exports_language_model_service.registrationFromLayer({
19993
20043
  provider: options?.provider ?? "test",
19994
20044
  model: options?.model ?? "scripted",
19995
- layer: layer69(turns),
20045
+ layer: layer67(turns),
19996
20046
  ...options?.registrationKey === undefined ? {} : { registrationKey: options.registrationKey }
19997
20047
  }));
19998
20048
  // src/captured-model.ts
@@ -20005,16 +20055,16 @@ import { LanguageModel as LanguageModel10 } from "effect/unstable/ai";
20005
20055
  var make16 = (turns, options) => Effect103.gen(function* () {
20006
20056
  const captured = yield* Ref27.make([]);
20007
20057
  const cursor = yield* Ref27.make(0);
20008
- const layer70 = Layer91.effect(LanguageModel10.LanguageModel, LanguageModel10.make({
20058
+ const layer68 = Layer91.effect(LanguageModel10.LanguageModel, LanguageModel10.make({
20009
20059
  generateText: (request) => Ref27.update(captured, (prompts) => [...prompts, request.prompt]).pipe(Effect103.andThen(nextTurn(cursor, turns)), Effect103.map((turn) => [...responseParts(turn)])),
20010
20060
  streamText: (request) => Stream17.unwrap(Ref27.update(captured, (prompts) => [...prompts, request.prompt]).pipe(Effect103.andThen(nextTurn(cursor, turns)), Effect103.map((turn) => Stream17.fromIterable(streamParts(turn)))))
20011
20061
  }));
20012
20062
  const registration2 = yield* exports_language_model_service.registrationFromLayer({
20013
20063
  provider: options?.provider ?? "test",
20014
20064
  model: options?.model ?? "scripted",
20015
- layer: layer70
20065
+ layer: layer68
20016
20066
  });
20017
- return { layer: layer70, registration: registration2, prompts: Ref27.get(captured) };
20067
+ return { layer: layer68, registration: registration2, prompts: Ref27.get(captured) };
20018
20068
  });
20019
20069
  // src/test-tools.ts
20020
20070
  var exports_test_tools = {};
@@ -20051,9 +20101,9 @@ var waitingTool = (options) => exports_tool_runtime_service.dynamicTool(options.
20051
20101
  var exports_test_runtime = {};
20052
20102
  __export(exports_test_runtime, {
20053
20103
  layerWith: () => layerWith2,
20054
- layer: () => layer70
20104
+ layer: () => layer68
20055
20105
  });
20056
- var layer70 = exports_runner_runtime_service.testLayer;
20106
+ var layer68 = exports_runner_runtime_service.testLayer;
20057
20107
  var normalizeModel = (model) => {
20058
20108
  if (model === undefined)
20059
20109
  return exports_language_model_service.memoryLayer();
@@ -29,6 +29,8 @@ export interface Interface {
29
29
  declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/ChildFanOutRuntime", Interface>;
30
30
  export declare class Service extends Service_base {
31
31
  }
32
+ export declare const layerFromRuntime: Layer.Layer<Service, ChildFanOutRuntimeError, ChildFanOutRepository.Service | TransitionService | HandlerService>;
32
33
  export declare const layer: Layer.Layer<Service, ChildFanOutRuntimeError, ChildFanOutRepository.Service | TransitionService | HandlerService>;
34
+ export declare const handlersLayer: (handlers: Handlers) => Layer.Layer<HandlerService, never, never>;
33
35
  export declare const testHandlersLayer: (handlers: Handlers) => Layer.Layer<HandlerService, never, never>;
34
36
  export {};
@@ -1,4 +1,4 @@
1
- import { AddressBookRepository, AgentChatRepository, AgentDefinitionRepository, ChildExecutionRepository, ChildFanOutRepository, ClusterRegistryRepository, CompactionRepository, ContextEpochRepository, EnvelopeRepository, EntityRepository, ExecutionEventRepository, ExecutionRepository, ExecutionStateRepository, InboxRepository, MemoryRepository, TopicRepository, PermissionRuleRepository, PresenceRepository, ScheduleRepository, SessionRepository, SkillDefinitionRepository, SteeringRepository, ToolCallRepository, WorkspaceLeaseRepository, WorkflowDefinitionRepository } from "@relayfx/store-sql/portable";
1
+ import { AddressBookRepository, AgentChatRepository, AgentDefinitionRepository, ChildExecutionRepository, ChildFanOutRepository, ClusterRegistryRepository, CompactionRepository, ContextEpochRepository, EnvelopeRepository, EntityRepository, ExecutionEventRepository, ExecutionRepository, ExecutionStateRepository, InboxRepository, MemoryRepository, NotificationBus, TopicRepository, PermissionRuleRepository, PresenceRepository, ScheduleRepository, SessionRepository, SkillDefinitionRepository, SteeringRepository, ToolCallRepository, WorkspaceLeaseRepository, WorkflowDefinitionRepository } from "@relayfx/store-sql/portable";
2
2
  import { Config, Context, Crypto, Duration, Effect, Layer, Option, Schema } from "effect";
3
3
  import { MessageStorage, RunnerAddress, RunnerStorage, Runners, Sharding, ShardingConfig } from "effect/unstable/cluster";
4
4
  import { SqlClient } from "effect/unstable/sql/SqlClient";
@@ -75,12 +75,12 @@ export declare const layerWith: <CheckError, CheckIn, ClusterOut, ClusterError,
75
75
  readonly embeddingModelLayer?: Layer.Layer<EmbeddingModelServiceService, EmbeddingModelError, EmbeddingModelIn> | undefined;
76
76
  readonly toolRuntimeLayer: Layer.Layer<ToolRuntimeService, ToolRuntimeError, ToolRuntimeIn>;
77
77
  readonly schedulerLayer: Layer.Layer<SchedulerServiceService, SchedulerError, SchedulerIn>;
78
- readonly promptAssemblerLayer?: Layer.Layer<PromptAssemblerService> | undefined;
79
- readonly blobStoreLayer?: Layer.Layer<BlobStoreService> | undefined;
80
- readonly artifactStoreLayer?: Layer.Layer<ArtifactStoreService> | undefined;
81
- readonly schemaRegistryLayer?: Layer.Layer<SchemaRegistryService> | undefined;
78
+ readonly promptAssemblerLayer?: Layer.Layer<PromptAssemblerService, LanguageModelError, LanguageModelIn> | undefined;
79
+ readonly blobStoreLayer?: Layer.Layer<BlobStoreService, LanguageModelError, LanguageModelIn> | undefined;
80
+ readonly artifactStoreLayer?: Layer.Layer<ArtifactStoreService, LanguageModelError, LanguageModelIn> | undefined;
81
+ readonly schemaRegistryLayer?: Layer.Layer<SchemaRegistryService, LanguageModelError, LanguageModelIn> | undefined;
82
82
  readonly toolTransitionCoordinatorLayer: Layer.Layer<ToolTransitionCoordinatorService, CoordinatorError, CoordinatorIn>;
83
- }) => Layer.Layer<import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | ClusterOut | RepositoryOut | LanguageModelOut, Config.ConfigError | CheckError | ClusterError | RepositoryError | LanguageModelError | ToolRuntimeError | SchedulerError | CoordinatorError, Exclude<Exclude<RepositoryIn, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<LanguageModelIn, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<ClusterIn, SchemaRegistryService | BlobStoreService | ArtifactStoreService | PromptAssemblerService | LanguageModelOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Sharding.Sharding, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<MessageStorage.MessageStorage, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<AddressBookRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<AgentChatRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<AgentDefinitionRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ChildExecutionRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<EnvelopeRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<EntityRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ExecutionEventRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ExecutionRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ExecutionStateRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<InboxRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<TopicRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<PresenceRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ScheduleRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<SkillDefinitionRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolCallRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<WorkspaceLeaseRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelServiceService, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<BlobStoreService, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ShardingConfig.ShardingConfig, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<WorkflowEngine.WorkflowEngine, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Sharding.Sharding, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<CheckIn, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<CoordinatorIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../child/child-run-service").Service>, import("../model/model-call-policy").Service>, PromptAssemblerService>, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<SchedulerIn, import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | PromptAssemblerService | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service>, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService>>;
83
+ }) => Layer.Layer<import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | ClusterOut | RepositoryOut | LanguageModelOut, Config.ConfigError | CheckError | ClusterError | RepositoryError | LanguageModelError | ToolRuntimeError | SchedulerError | CoordinatorError, LanguageModelIn | Exclude<LanguageModelIn, ArtifactStoreService> | Exclude<Exclude<RepositoryIn, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<LanguageModelIn, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<ClusterIn, SchemaRegistryService | BlobStoreService | ArtifactStoreService | PromptAssemblerService | LanguageModelOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Sharding.Sharding, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<MessageStorage.MessageStorage, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<AddressBookRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<AgentChatRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<AgentDefinitionRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ChildExecutionRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<EnvelopeRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<EntityRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ExecutionEventRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ExecutionRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ExecutionStateRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<InboxRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<TopicRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<PresenceRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ScheduleRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<SkillDefinitionRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolCallRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<WorkspaceLeaseRepository.Service, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelServiceService, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<BlobStoreService, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ShardingConfig.ShardingConfig, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<WorkflowEngine.WorkflowEngine, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Sharding.Sharding, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<CheckIn, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<CoordinatorIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../child/child-run-service").Service>, import("../model/model-call-policy").Service>, PromptAssemblerService>, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<SchedulerIn, import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | PromptAssemblerService | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service>, LanguageModelOut>, never>, WorkflowEngine.WorkflowEngine>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService>>;
84
84
  export declare const layerWithClient: <CheckError, CheckIn, ClusterOut, ClusterError, ClusterIn, RepositoryOut, RepositoryError, RepositoryIn, LanguageModelOut, LanguageModelError, LanguageModelIn, EmbeddingModelError, EmbeddingModelIn, ToolRuntimeError, ToolRuntimeIn, CoordinatorError, CoordinatorIn>(options: {
85
85
  readonly checkLayer: Layer.Layer<Service, CheckError, CheckIn>;
86
86
  readonly clusterLayer: Layer.Layer<ClusterOut, ClusterError, ClusterIn>;
@@ -88,59 +88,59 @@ export declare const layerWithClient: <CheckError, CheckIn, ClusterOut, ClusterE
88
88
  readonly languageModelLayer: Layer.Layer<LanguageModelOut, LanguageModelError, LanguageModelIn>;
89
89
  readonly embeddingModelLayer?: Layer.Layer<EmbeddingModelServiceService, EmbeddingModelError, EmbeddingModelIn> | undefined;
90
90
  readonly toolRuntimeLayer: Layer.Layer<ToolRuntimeService, ToolRuntimeError, ToolRuntimeIn>;
91
- readonly promptAssemblerLayer?: Layer.Layer<PromptAssemblerService> | undefined;
92
- readonly blobStoreLayer?: Layer.Layer<BlobStoreService> | undefined;
93
- readonly artifactStoreLayer?: Layer.Layer<ArtifactStoreService> | undefined;
94
- readonly schemaRegistryLayer?: Layer.Layer<SchemaRegistryService> | undefined;
91
+ readonly promptAssemblerLayer?: Layer.Layer<PromptAssemblerService, LanguageModelError, LanguageModelIn> | undefined;
92
+ readonly blobStoreLayer?: Layer.Layer<BlobStoreService, LanguageModelError, LanguageModelIn> | undefined;
93
+ readonly artifactStoreLayer?: Layer.Layer<ArtifactStoreService, LanguageModelError, LanguageModelIn> | undefined;
94
+ readonly schemaRegistryLayer?: Layer.Layer<SchemaRegistryService, LanguageModelError, LanguageModelIn> | undefined;
95
95
  readonly toolTransitionCoordinatorLayer: Layer.Layer<ToolTransitionCoordinatorService, CoordinatorError, CoordinatorIn>;
96
- }) => Layer.Layer<import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | Service | ClusterOut | RepositoryOut | LanguageModelOut, Config.ConfigError | CheckError | ClusterError | RepositoryError | LanguageModelError | ToolRuntimeError | CoordinatorError, Exclude<Exclude<RepositoryIn, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<ClusterIn, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<AddressBookRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<AgentChatRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<AgentDefinitionRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ChildExecutionRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<EnvelopeRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<EntityRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ExecutionEventRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ExecutionRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ExecutionStateRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<InboxRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<TopicRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<PresenceRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ScheduleRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<SkillDefinitionRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<WorkspaceLeaseRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelServiceService, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<BlobStoreService, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ShardingConfig.ShardingConfig, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Sharding.Sharding, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<CheckIn, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<CoordinatorIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../child/child-run-service").Service>, import("../model/model-call-policy").Service>, PromptAssemblerService>, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService>>;
96
+ }) => Layer.Layer<import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | Service | ClusterOut | RepositoryOut | LanguageModelOut, Config.ConfigError | CheckError | ClusterError | RepositoryError | LanguageModelError | ToolRuntimeError | CoordinatorError, LanguageModelIn | Exclude<LanguageModelIn, ArtifactStoreService> | Exclude<Exclude<RepositoryIn, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<ClusterIn, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<AddressBookRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<AgentChatRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<AgentDefinitionRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ChildExecutionRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<EnvelopeRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<EntityRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ExecutionEventRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ExecutionRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ExecutionStateRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<InboxRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<TopicRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<PresenceRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ScheduleRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<SkillDefinitionRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<WorkspaceLeaseRepository.Service, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelServiceService, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<BlobStoreService, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ShardingConfig.ShardingConfig, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Sharding.Sharding, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<CheckIn, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<CoordinatorIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../child/child-run-service").Service>, import("../model/model-call-policy").Service>, PromptAssemblerService>, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelOut>, never>, ClusterOut>, RepositoryOut>, BlobStoreService>, ArtifactStoreService>>;
97
97
  export declare const layerWithServices: <DatabaseError, DatabaseIn, LanguageModelError, LanguageModelIn, EmbeddingModelError, EmbeddingModelIn, ToolRuntimeError, ToolRuntimeIn>(options: {
98
98
  readonly databaseLayer: Layer.Layer<SqlClient, DatabaseError, DatabaseIn>;
99
99
  readonly languageModelLayer: Layer.Layer<LanguageModelServiceService, LanguageModelError, LanguageModelIn>;
100
100
  readonly embeddingModelLayer?: Layer.Layer<EmbeddingModelServiceService, EmbeddingModelError, EmbeddingModelIn> | undefined;
101
101
  readonly toolRuntimeLayer: Layer.Layer<ToolRuntimeService, ToolRuntimeError, ToolRuntimeIn>;
102
- readonly promptAssemblerLayer?: Layer.Layer<PromptAssemblerService> | undefined;
103
- readonly blobStoreLayer?: Layer.Layer<BlobStoreService> | undefined;
104
- readonly artifactStoreLayer?: Layer.Layer<ArtifactStoreService> | undefined;
105
- readonly schemaRegistryLayer?: Layer.Layer<SchemaRegistryService> | undefined;
106
- }) => Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | Runners.Runners | MessageStorage.MessageStorage, Config.ConfigError | ClusterConfigMismatch | DatabaseError | LanguageModelError | ToolRuntimeError, DatabaseIn | Exclude<Exclude<Exclude<Exclude<LanguageModelIn, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../child/child-run-service").Service>, import("../model/model-call-policy").Service>, PromptAssemblerService>, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient>>;
102
+ readonly promptAssemblerLayer?: Layer.Layer<PromptAssemblerService, LanguageModelError, LanguageModelIn> | undefined;
103
+ readonly blobStoreLayer?: Layer.Layer<BlobStoreService, LanguageModelError, LanguageModelIn> | undefined;
104
+ readonly artifactStoreLayer?: Layer.Layer<ArtifactStoreService, LanguageModelError, LanguageModelIn> | undefined;
105
+ readonly schemaRegistryLayer?: Layer.Layer<SchemaRegistryService, LanguageModelError, LanguageModelIn> | undefined;
106
+ }) => Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | Runners.Runners | MessageStorage.MessageStorage, Config.ConfigError | ClusterConfigMismatch | DatabaseError | LanguageModelError | ToolRuntimeError, DatabaseIn | Exclude<LanguageModelIn, SqlClient> | Exclude<Exclude<LanguageModelIn, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<LanguageModelIn, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../child/child-run-service").Service>, import("../model/model-call-policy").Service>, PromptAssemblerService>, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient>>;
107
107
  export declare const layerWithServicesMultiNode: <DatabaseError, DatabaseIn, LanguageModelError, LanguageModelIn, EmbeddingModelError, EmbeddingModelIn, ToolRuntimeError, ToolRuntimeIn>(options: {
108
108
  readonly databaseLayer: Layer.Layer<SqlClient, DatabaseError, DatabaseIn>;
109
109
  readonly languageModelLayer: Layer.Layer<LanguageModelServiceService, LanguageModelError, LanguageModelIn>;
110
110
  readonly embeddingModelLayer?: Layer.Layer<EmbeddingModelServiceService, EmbeddingModelError, EmbeddingModelIn> | undefined;
111
111
  readonly toolRuntimeLayer: Layer.Layer<ToolRuntimeService, ToolRuntimeError, ToolRuntimeIn>;
112
- readonly promptAssemblerLayer?: Layer.Layer<PromptAssemblerService> | undefined;
113
- readonly blobStoreLayer?: Layer.Layer<BlobStoreService> | undefined;
114
- readonly artifactStoreLayer?: Layer.Layer<ArtifactStoreService> | undefined;
115
- readonly schemaRegistryLayer?: Layer.Layer<SchemaRegistryService> | undefined;
112
+ readonly promptAssemblerLayer?: Layer.Layer<PromptAssemblerService, LanguageModelError, LanguageModelIn> | undefined;
113
+ readonly blobStoreLayer?: Layer.Layer<BlobStoreService, LanguageModelError, LanguageModelIn> | undefined;
114
+ readonly artifactStoreLayer?: Layer.Layer<ArtifactStoreService, LanguageModelError, LanguageModelIn> | undefined;
115
+ readonly schemaRegistryLayer?: Layer.Layer<SchemaRegistryService, LanguageModelError, LanguageModelIn> | undefined;
116
116
  readonly cluster: {
117
117
  readonly runnerHost: string;
118
118
  readonly rpcPort: number;
119
119
  readonly assignedShardGroups: ReadonlyArray<string>;
120
120
  } & ClusterHttpTuning;
121
- }) => Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | Runners.Runners | MessageStorage.MessageStorage, Config.ConfigError | ClusterConfigMismatch | DatabaseError | LanguageModelError | ToolRuntimeError, DatabaseIn | import("effect/unstable/http/HttpServer").HttpServer | Exclude<Exclude<Exclude<Exclude<LanguageModelIn, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../child/child-run-service").Service>, import("../model/model-call-policy").Service>, PromptAssemblerService>, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient>>;
121
+ }) => Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | Runners.Runners | MessageStorage.MessageStorage, Config.ConfigError | ClusterConfigMismatch | DatabaseError | LanguageModelError | ToolRuntimeError, DatabaseIn | import("effect/unstable/http/HttpServer").HttpServer | Exclude<LanguageModelIn, SqlClient> | Exclude<Exclude<LanguageModelIn, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<LanguageModelIn, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../child/child-run-service").Service>, import("../model/model-call-policy").Service>, PromptAssemblerService>, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient>>;
122
122
  export declare const layerWithServicesMultiNodeClientOnly: <DatabaseError, DatabaseIn, LanguageModelError, LanguageModelIn, EmbeddingModelError, EmbeddingModelIn, ToolRuntimeError, ToolRuntimeIn>(options: {
123
123
  readonly databaseLayer: Layer.Layer<SqlClient, DatabaseError, DatabaseIn>;
124
124
  readonly languageModelLayer: Layer.Layer<LanguageModelServiceService, LanguageModelError, LanguageModelIn>;
125
125
  readonly embeddingModelLayer?: Layer.Layer<EmbeddingModelServiceService, EmbeddingModelError, EmbeddingModelIn> | undefined;
126
126
  readonly toolRuntimeLayer: Layer.Layer<ToolRuntimeService, ToolRuntimeError, ToolRuntimeIn>;
127
- readonly promptAssemblerLayer?: Layer.Layer<PromptAssemblerService> | undefined;
128
- readonly blobStoreLayer?: Layer.Layer<BlobStoreService> | undefined;
129
- readonly artifactStoreLayer?: Layer.Layer<ArtifactStoreService> | undefined;
130
- readonly schemaRegistryLayer?: Layer.Layer<SchemaRegistryService> | undefined;
127
+ readonly promptAssemblerLayer?: Layer.Layer<PromptAssemblerService, LanguageModelError, LanguageModelIn> | undefined;
128
+ readonly blobStoreLayer?: Layer.Layer<BlobStoreService, LanguageModelError, LanguageModelIn> | undefined;
129
+ readonly artifactStoreLayer?: Layer.Layer<ArtifactStoreService, LanguageModelError, LanguageModelIn> | undefined;
130
+ readonly schemaRegistryLayer?: Layer.Layer<SchemaRegistryService, LanguageModelError, LanguageModelIn> | undefined;
131
131
  readonly cluster?: ClusterHttpTuning | undefined;
132
- }) => Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | Service | Runners.Runners | MessageStorage.MessageStorage, Config.ConfigError | DatabaseError | LanguageModelError | ToolRuntimeError, DatabaseIn | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../child/child-run-service").Service>, import("../model/model-call-policy").Service>, PromptAssemblerService>, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient>>;
132
+ }) => Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | Service | Runners.Runners | MessageStorage.MessageStorage, Config.ConfigError | DatabaseError | LanguageModelError | ToolRuntimeError, DatabaseIn | Exclude<LanguageModelIn, SqlClient> | Exclude<Exclude<LanguageModelIn, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../child/child-run-service").Service>, import("../model/model-call-policy").Service>, PromptAssemblerService>, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient>>;
133
133
  export declare const layerWithLanguageModelService: <DatabaseError, DatabaseIn, LanguageModelError, LanguageModelIn>(options: {
134
134
  readonly databaseLayer: Layer.Layer<SqlClient, DatabaseError, DatabaseIn>;
135
135
  readonly languageModelLayer: Layer.Layer<LanguageModelServiceService, LanguageModelError, LanguageModelIn>;
136
- }) => Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | Runners.Runners | MessageStorage.MessageStorage, Config.ConfigError | ClusterConfigMismatch | DatabaseError | LanguageModelError, DatabaseIn | Exclude<Exclude<Exclude<Exclude<LanguageModelIn, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient>>;
137
- export declare const layer: Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | Runners.Runners | MessageStorage.MessageStorage, Config.ConfigError | ClusterConfigMismatch, SqlClient>;
136
+ }) => Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | Runners.Runners | MessageStorage.MessageStorage, Config.ConfigError | ClusterConfigMismatch | DatabaseError | LanguageModelError, DatabaseIn | Exclude<LanguageModelIn, SqlClient> | Exclude<Exclude<LanguageModelIn, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<LanguageModelIn, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, SqlClient>>;
137
+ export declare const layer: Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | NotificationBus.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | Runners.Runners | MessageStorage.MessageStorage, Config.ConfigError | ClusterConfigMismatch, SqlClient>;
138
138
  export declare const testLayerWithServices: <LanguageModelError, LanguageModelIn, ToolRuntimeError, ToolRuntimeIn>(options: {
139
139
  readonly languageModelLayer: Layer.Layer<LanguageModelServiceService, LanguageModelError, LanguageModelIn>;
140
140
  readonly embeddingModelLayer?: Layer.Layer<EmbeddingModelServiceService> | undefined;
141
141
  readonly toolRuntimeLayer: Layer.Layer<ToolRuntimeService, ToolRuntimeError, ToolRuntimeIn>;
142
- }) => Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | Crypto.Crypto | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver, Config.ConfigError | LanguageModelError | ToolRuntimeError, Exclude<Exclude<Exclude<Exclude<LanguageModelIn, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../child/child-run-service").Service>, import("../model/model-call-policy").Service>, PromptAssemblerService>, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto>>;
143
- export declare const testLayerWithLanguageModelService: <LanguageModelError, LanguageModelIn>(languageModelLayer: Layer.Layer<LanguageModelServiceService, LanguageModelError, LanguageModelIn>) => Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | Crypto.Crypto | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver, Config.ConfigError | LanguageModelError, Exclude<Exclude<Exclude<Exclude<LanguageModelIn, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto>>;
142
+ }) => Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | Crypto.Crypto | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver, Config.ConfigError | LanguageModelError | ToolRuntimeError, Exclude<LanguageModelIn, Crypto.Crypto> | Exclude<Exclude<LanguageModelIn, ArtifactStoreService>, Crypto.Crypto> | Exclude<Exclude<Exclude<Exclude<LanguageModelIn, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<ToolRuntimeIn, import("../child/child-run-service").Service>, import("../model/model-call-policy").Service>, PromptAssemblerService>, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto>>;
143
+ export declare const testLayerWithLanguageModelService: <LanguageModelError, LanguageModelIn>(languageModelLayer: Layer.Layer<LanguageModelServiceService, LanguageModelError, LanguageModelIn>) => Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | Crypto.Crypto | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver, Config.ConfigError | LanguageModelError, Exclude<LanguageModelIn, Crypto.Crypto> | Exclude<Exclude<LanguageModelIn, ArtifactStoreService>, Crypto.Crypto> | Exclude<Exclude<Exclude<Exclude<LanguageModelIn, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<LanguageModelIn, SchemaRegistryService>, import("../inbox/inbox-service").Service>, import("../address/address-book-service").Service | import("../inbox/inbox-service").Service | import("../envelope/envelope-service").Service>, import("../inbox/inbox-service").Service | import("../topic/topic-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, ShardingConfig.ShardingConfig | Sharding.Sharding | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver>, AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service>, BlobStoreService>, ArtifactStoreService>, Crypto.Crypto>>;
144
144
  export declare const testLayer: Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | Crypto.Crypto | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver, Config.ConfigError, never>;
145
145
  export declare const testClientLayer: Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | Crypto.Crypto | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | Service | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver, Config.ConfigError, never>;
146
146
  export declare const testLayerWithDatabaseCheck: <CheckError>(checkDatabase: Effect.Effect<void, CheckError>) => Layer.Layer<AddressBookRepository.Service | AgentChatRepository.Service | AgentDefinitionRepository.Service | ChildExecutionRepository.Service | ChildFanOutRepository.Service | ClusterRegistryRepository.Service | CompactionRepository.Service | ContextEpochRepository.Service | EnvelopeRepository.Service | EntityRepository.Service | ExecutionEventRepository.Service | ExecutionRepository.Service | ExecutionStateRepository.Service | InboxRepository.Service | TopicRepository.Service | MemoryRepository.Service | PermissionRuleRepository.Service | PresenceRepository.Service | ScheduleRepository.Service | SessionRepository.Service | SkillDefinitionRepository.Service | SteeringRepository.Service | ToolCallRepository.Service | WorkspaceLeaseRepository.Service | WorkflowDefinitionRepository.Service | import("../address/address-book-service").Service | Crypto.Crypto | import("../execution/event-log-service").Service | import("../wait/wait-service").Service | ToolRuntimeService | import("../agent/agent-registry-service").Service | import("../address/address-resolution-service").Service | import("../child/child-run-service").Service | LanguageModelServiceService | import("../model/model-call-policy").Service | import("../presence/presence-service").Service | SchemaRegistryService | BlobStoreService | import("../state/execution-state-service").Service | ParentNotifierService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ShardingConfig.ShardingConfig | import("../execution/active-execution-registry").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | WorkflowEngine.WorkflowEngine | import("../agent/agent-loop-service").Service | import("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | Sharding.Sharding | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service | import("../execution/execution-watch-service").Service | import("../execution/session-stream-service").Service | SchedulerServiceService | Service | Runners.Runners | MessageStorage.MessageStorage | MessageStorage.MemoryDriver, Config.ConfigError, never>;
@@ -73,6 +73,8 @@ export declare class WorkflowJoining extends WorkflowJoining_base {
73
73
  }
74
74
  export declare const validate: (definition: Workflow.Definition) => Effect.Effect<void, never, never> | Effect.Effect<never, UnsupportedOperation, never>;
75
75
  export declare const run: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<Schema.Json | undefined, unknown, WorkflowDefinitionRepository.Service | HandlerService>;
76
+ export declare const handlersLayer: (handlers: Handlers) => Layer.Layer<HandlerService, never, never>;
76
77
  export declare const testHandlersLayer: (handlers: Handlers) => Layer.Layer<HandlerService, never, never>;
78
+ export declare const layerFromRuntime: Layer.Layer<Service, unknown, WorkflowDefinitionRepository.Service | HandlerService>;
77
79
  export declare const layer: Layer.Layer<Service, unknown, WorkflowDefinitionRepository.Service | HandlerService>;
78
80
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@relayfx/test",
4
- "version": "0.2.13",
4
+ "version": "0.2.14",
5
5
  "description": "Experimental deterministic test kit for Relay applications",
6
6
  "type": "module",
7
7
  "exports": {
@@ -36,7 +36,7 @@
36
36
  "typecheck": "bun tsc --noEmit"
37
37
  },
38
38
  "dependencies": {
39
- "@relayfx/sdk": "0.2.13",
39
+ "@relayfx/sdk": "0.2.14",
40
40
  "effect": "4.0.0-beta.93"
41
41
  },
42
42
  "peerDependencies": {