@relayfx/sdk 0.3.2 → 0.3.4

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/ai.js CHANGED
@@ -32,7 +32,7 @@ import {
32
32
  exports_tool_executor,
33
33
  exports_tool_output,
34
34
  exports_turn_policy
35
- } from "./index-bknsjvwf.js";
35
+ } from "./index-25gwk9tj.js";
36
36
  import"./index-nb39b5ae.js";
37
37
 
38
38
  // src/ai.ts
@@ -16,7 +16,7 @@ import {
16
16
  exports_tool_executor,
17
17
  exports_tool_output,
18
18
  exports_turn_policy
19
- } from "./index-bknsjvwf.js";
19
+ } from "./index-25gwk9tj.js";
20
20
  import {
21
21
  ClientError,
22
22
  CommandReplyInvalid,
@@ -15467,11 +15467,24 @@ var reconcileCompactionCheckpoint = Effect81.fn("AgentLoop.reconcileCompactionCh
15467
15467
  const checkpoint = path2.at(-1);
15468
15468
  if (checkpoint?._tag !== "Compaction" || checkpoint.version !== 2)
15469
15469
  return restoredHistory;
15470
+ const entryScope = input.sessionEntryScope ?? input.executionId;
15471
+ if (!checkpoint.id.startsWith(`${input.sessionId}:entry:${entryScope}:`))
15472
+ return restoredHistory;
15473
+ const result = {
15474
+ _tag: "AlreadyPresent",
15475
+ checkpoint,
15476
+ leafId: checkpoint.id
15477
+ };
15478
+ const repaired = exports_session.buildContext(path2);
15479
+ if (restoredHistory === undefined) {
15480
+ yield* persistTranscript(chats, input, repaired);
15481
+ yield* onCheckpointCommitted(result);
15482
+ return repaired;
15483
+ }
15470
15484
  const before = exports_session.buildContext(path2.slice(0, -1));
15471
15485
  if (!promptEquivalence2(before, restoredHistory)) {
15472
- const repaired2 = exports_session.buildContext(path2);
15473
- if (promptEquivalence2(repaired2, restoredHistory)) {
15474
- yield* onCheckpointCommitted(checkpoint);
15486
+ if (promptEquivalence2(repaired, restoredHistory)) {
15487
+ yield* onCheckpointCommitted(result);
15475
15488
  return restoredHistory;
15476
15489
  }
15477
15490
  if (!failOnMismatch)
@@ -15481,9 +15494,8 @@ var reconcileCompactionCheckpoint = Effect81.fn("AgentLoop.reconcileCompactionCh
15481
15494
  next_event_sequence: input.eventSequence + 1
15482
15495
  });
15483
15496
  }
15484
- const repaired = exports_session.buildContext(path2);
15485
15497
  yield* persistTranscript(chats, input, repaired);
15486
- yield* onCheckpointCommitted(checkpoint);
15498
+ yield* onCheckpointCommitted(result);
15487
15499
  return repaired;
15488
15500
  });
15489
15501
  var toolCallDecodeMaxRetriesConfig = Config4.int("RELAY_AGENT_TOOL_CALL_DECODE_MAX_RETRIES").pipe(Config4.withDefault(2));
@@ -15631,7 +15643,7 @@ var compactionOptions = (agent) => agent.compaction_policy === undefined ? undef
15631
15643
  reserveTokens: agent.compaction_policy.reserve_tokens,
15632
15644
  keepRecentTokens: agent.compaction_policy.keep_recent_tokens
15633
15645
  };
15634
- var layer58 = Layer71.effect(Service61, Effect81.gen(function* () {
15646
+ var make11 = (layerOptions) => Effect81.gen(function* () {
15635
15647
  const eventLog = yield* Service41;
15636
15648
  const languageModels = yield* Service8;
15637
15649
  const tools = yield* Service12;
@@ -15714,12 +15726,12 @@ var layer58 = Layer71.effect(Service61, Effect81.gen(function* () {
15714
15726
  input: jsonValue6(resumeSuspension.tool_params)
15715
15727
  };
15716
15728
  const storedHistory = resumeToolCall === undefined ? yield* loadStoredHistory(chats, input) : yield* restoreHistory(chats, input);
15717
- const continuingDurableHistory = storedHistory !== undefined;
15718
- const durableMaxSequence = continuingDurableHistory ? yield* eventLog.maxSequence(input.executionId).pipe(Effect81.mapError((error5) => loopError(error5, input.eventSequence + 1))) : undefined;
15729
+ const durableMaxSequence = yield* eventLog.maxSequence(input.executionId).pipe(Effect81.mapError((error5) => loopError(error5, input.eventSequence + 1)));
15719
15730
  const nextEventSequence5 = Math.max(input.eventSequence + 1, (durableMaxSequence ?? -1) + 1);
15720
15731
  const allocator = yield* make10(nextEventSequence5);
15721
- const onCheckpointCommitted = (checkpoint) => appendCompactionCommittedEvent(eventLog, allocator, input, checkpoint);
15722
- const durableHistory = storedHistory === undefined || Option19.isNone(sessionRepository) ? storedHistory : yield* reconcileCompactionCheckpoint(sessionRepository.value, chats, input, storedHistory, onCheckpointCommitted, resumeSuspension === undefined);
15732
+ const onCheckpointCommitted = (result) => appendCompactionCommittedEvent(eventLog, allocator, input, result.checkpoint).pipe(Effect81.andThen(layerOptions?.onCheckpointCommitted?.(result) ?? Effect81.void));
15733
+ const durableHistory = Option19.isNone(sessionRepository) ? storedHistory : yield* reconcileCompactionCheckpoint(sessionRepository.value, chats, input, storedHistory, onCheckpointCommitted, resumeSuspension === undefined);
15734
+ const continuingDurableHistory = durableHistory !== undefined;
15723
15735
  const permissionsLayer = input.agent.permission_rules === undefined ? Layer71.empty : Option19.isNone(permissionRules) || Option19.isNone(waits) ? yield* AgentLoopError.make({
15724
15736
  message: "Execution permission rules require PermissionRuleRepository and WaitService in context",
15725
15737
  next_event_sequence: input.eventSequence + 1
@@ -15749,6 +15761,7 @@ var layer58 = Layer71.effect(Service61, Effect81.gen(function* () {
15749
15761
  const seededTokens = continuingDurableHistory ? yield* eventLog.sumUsage(input.executionId).pipe(Effect81.mapError((error5) => loopError(error5, input.eventSequence + 1))) : 0;
15750
15762
  const memory = input.memorySubjectId === undefined ? undefined : { key: { agent: input.agent.name, subject: input.memorySubjectId } };
15751
15763
  const restoredEpoch = durableHistory !== undefined && Option19.isSome(contextEpochs) ? yield* restoreContextEpoch(contextEpochs.value, input) : undefined;
15764
+ const freshSessionHistory = durableHistory !== undefined || input.sessionId === undefined || Option19.isNone(sessionRepository) ? undefined : yield* sessionRepository.value.path({ sessionId: input.sessionId }).pipe(Effect81.mapError((error5) => loopError(error5, input.eventSequence + 1)), Effect81.map((path2) => path2.length === 0 ? undefined : exports_session.buildContext(path2)));
15752
15765
  const { options, instructionsLayer } = durableHistory === undefined ? yield* assembler.assemble({ agent: input.agent, tools: definitions2, input: input.input }).pipe(Effect81.mapError((error5) => loopError(error5, input.eventSequence + 1)), Effect81.flatMap((assembled) => Effect81.gen(function* () {
15753
15766
  const epoch = { baseline: assembled.system, dynamicSourceIds: [] };
15754
15767
  if (Option19.isSome(contextEpochs))
@@ -15756,10 +15769,11 @@ var layer58 = Layer71.effect(Service61, Effect81.gen(function* () {
15756
15769
  return {
15757
15770
  options: {
15758
15771
  prompt: assembled.prompt,
15772
+ ...freshSessionHistory === undefined ? {} : { history: freshSessionHistory },
15759
15773
  sessionId: input.sessionId ?? input.executionId,
15760
15774
  ...memory === undefined ? {} : { memory }
15761
15775
  },
15762
- instructionsLayer: layerFromEpoch(epoch)
15776
+ instructionsLayer: freshSessionHistory === undefined ? layerFromEpoch(epoch) : Layer71.empty
15763
15777
  };
15764
15778
  }))) : {
15765
15779
  options: {
@@ -15910,7 +15924,7 @@ var layer58 = Layer71.effect(Service61, Effect81.gen(function* () {
15910
15924
  const runFold = Effect81.scoped(Effect81.gen(function* () {
15911
15925
  const base = withToolCallDecodeResilience(yield* LanguageModel.LanguageModel, definitions2.map((definition) => definition.name), toolCallDecodeMaxRetries, (classification) => Ref18.set(lastModelFailureClassification, classification));
15912
15926
  const sessionStore = input.sessionId !== undefined && Option19.isSome(sessionRepository) ? yield* make4(input.sessionId, input.sessionEntryScope ?? input.executionId, {
15913
- onCheckpointCommitted: (result) => onCheckpointCommitted(result.checkpoint).pipe(Effect81.orDie)
15927
+ onCheckpointCommitted: (result) => onCheckpointCommitted(result).pipe(Effect81.orDie)
15914
15928
  }).pipe(Effect81.provideService(exports_session_repository.Service, sessionRepository.value)) : undefined;
15915
15929
  const foldContext = yield* Layer71.build(Layer71.mergeAll(executorLayer, handlerLayer, layer53, exports_model_middleware.identityLayer, instructionsLayer, permissionsLayer, steeringLayer));
15916
15930
  const folded = exports_agent.stream(agent, batonOptions).pipe(Stream9.runFoldEffect(() => ({
@@ -15952,7 +15966,9 @@ var layer58 = Layer71.effect(Service61, Effect81.gen(function* () {
15952
15966
  };
15953
15967
  })
15954
15968
  });
15955
- }));
15969
+ });
15970
+ var layerWith = (layerOptions) => Layer71.effect(Service61, make11(layerOptions));
15971
+ var layer58 = layerWith();
15956
15972
  var run5 = Effect81.fn("AgentLoop.run.call")(function* (input) {
15957
15973
  const service = yield* Service61;
15958
15974
  return yield* service.run(input);
@@ -16285,7 +16301,7 @@ var nextEventSequence5 = Effect86.fn("SchedulerService.nextEventSequence")(funct
16285
16301
  const max = yield* eventLog.maxSequence(executionId).pipe(Effect86.mapError(toSchedulerError));
16286
16302
  return max === undefined ? 0 : max + 1;
16287
16303
  });
16288
- var make11 = Effect86.gen(function* () {
16304
+ var make12 = Effect86.gen(function* () {
16289
16305
  const schedules = yield* exports_schedule_repository.Service;
16290
16306
  const waits = yield* Service42;
16291
16307
  const eventLog = yield* Service41;
@@ -16393,7 +16409,7 @@ var pollLoop = (service, pollIntervalMillis) => Effect86.gen(function* () {
16393
16409
  }
16394
16410
  });
16395
16411
  var layer62 = Layer76.effect(Service69, Effect86.gen(function* () {
16396
- const service = yield* make11;
16412
+ const service = yield* make12;
16397
16413
  const enabled3 = yield* enabledConfig;
16398
16414
  const pollIntervalMillis = yield* pollIntervalMillisConfig;
16399
16415
  if (enabled3) {
@@ -16401,7 +16417,7 @@ var layer62 = Layer76.effect(Service69, Effect86.gen(function* () {
16401
16417
  }
16402
16418
  return service;
16403
16419
  }));
16404
- var memoryLayer45 = Layer76.effect(Service69, make11);
16420
+ var memoryLayer45 = Layer76.effect(Service69, make12);
16405
16421
  var runOnce2 = Effect86.fn("SchedulerService.runOnce.call")(function* () {
16406
16422
  const service = yield* Service69;
16407
16423
  return yield* service.runOnce;
@@ -16556,8 +16572,8 @@ var parentNotifierLayer = Layer77.effect(Service54, Effect87.gen(function* () {
16556
16572
  }).pipe(Effect87.provideService(exports_execution_repository.Service, executionRepository))
16557
16573
  });
16558
16574
  }));
16559
- var agentLoopLayerWith = (toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer) => layer58.pipe(Layer77.provideMerge(toolRuntimeLayer), Layer77.provideMerge(layer40), Layer77.provideMerge(layer42()), Layer77.provideMerge(promptAssemblerLayer), Layer77.provideMerge(schemaRegistryLayer));
16560
- var runtimeServicesLayerWith = (toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer) => {
16575
+ var agentLoopLayerWith = (toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, options) => layerWith(options).pipe(Layer77.provideMerge(toolRuntimeLayer), Layer77.provideMerge(layer40), Layer77.provideMerge(layer42()), Layer77.provideMerge(promptAssemblerLayer), Layer77.provideMerge(schemaRegistryLayer));
16576
+ var runtimeServicesLayerWith = (toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer, agentLoopOptions) => {
16561
16577
  const inboxLayer = Layer77.unwrap(Effect87.gen(function* () {
16562
16578
  const makeExecutionClient = yield* client;
16563
16579
  const executionRepository = yield* exports_execution_repository.Service;
@@ -16565,13 +16581,13 @@ var runtimeServicesLayerWith = (toolRuntimeLayer, promptAssemblerLayer, schemaRe
16565
16581
  }));
16566
16582
  const envelopeLayer = layer52.pipe(Layer77.provideMerge(layerFromRepository3), Layer77.provideMerge(inboxLayer));
16567
16583
  const topicLayer = layer51.pipe(Layer77.provideMerge(inboxLayer));
16568
- const agentLayer = agentLoopLayerWith(toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer).pipe(Layer77.provideMerge(inboxLayer), Layer77.provideMerge(envelopeLayer), Layer77.provideMerge(topicLayer));
16584
+ const agentLayer = agentLoopLayerWith(toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, agentLoopOptions).pipe(Layer77.provideMerge(inboxLayer), Layer77.provideMerge(envelopeLayer), Layer77.provideMerge(topicLayer));
16569
16585
  const entityRegistryLayer = layer60.pipe(Layer77.provideMerge(layer39));
16570
16586
  const entityInstanceLayer = layer61.pipe(Layer77.provideMerge(entityRegistryLayer), Layer77.provideMerge(layerFromRepository3), Layer77.provideMerge(layerFromRepository));
16571
16587
  return Layer77.mergeAll(addressResolutionLayerWith(toolRuntimeLayer), layer45, executionServiceLayer, layerFromServices, layerFromServices2, layerFromRepository2, agentLayer, layer48, parentNotifierLayer, inboxLayer, envelopeLayer, topicLayer, entityRegistryLayer, toolTransitionCoordinatorLayer, layer47).pipe(Layer77.provideMerge(entityInstanceLayer), Layer77.provideMerge(layer38), Layer77.provideMerge(layer34), Layer77.provideMerge(layerFromRepository));
16572
16588
  };
16573
- var workflowLayerWith = (toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer) => layer49.pipe(Layer77.provideMerge(runtimeServicesLayerWith(toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer)));
16574
- var workflowAndEntityLayerWith = (toolRuntimeLayer, schedulerLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer) => Layer77.mergeAll(layer59, schedulerLayer).pipe(Layer77.provideMerge(workflowLayerWith(toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer)));
16589
+ var workflowLayerWith = (toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer, agentLoopOptions) => layer49.pipe(Layer77.provideMerge(runtimeServicesLayerWith(toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer, agentLoopOptions)));
16590
+ var workflowAndEntityLayerWith = (toolRuntimeLayer, schedulerLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer, agentLoopOptions) => Layer77.mergeAll(layer59, schedulerLayer).pipe(Layer77.provideMerge(workflowLayerWith(toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, toolTransitionCoordinatorLayer, agentLoopOptions)));
16575
16591
  var makeService2 = (database, checkDatabase) => Effect87.gen(function* () {
16576
16592
  const sharding = yield* Sharding.Sharding;
16577
16593
  const workflow = yield* WorkflowEngine2.WorkflowEngine;
@@ -16660,7 +16676,7 @@ var testLanguageModelLayer = layerFromRegistrationEffects2([
16660
16676
  ]).pipe(Layer77.orDie);
16661
16677
  var testEmbeddingModelLayer = deterministicTestLayer();
16662
16678
  var defaultPromptAssemblerLayer = (blobStoreLayer = passthroughLayer2, artifactStoreLayer = passthroughLayer) => defaultLayerWithStores.pipe(Layer77.provide(Layer77.mergeAll(blobStoreLayer, artifactStoreLayer)));
16663
- var layerWith = (options) => {
16679
+ var layerWith2 = (options) => {
16664
16680
  const blobStoreLayer = options.blobStoreLayer ?? passthroughLayer2;
16665
16681
  const artifactStoreLayer = options.artifactStoreLayer ?? passthroughLayer;
16666
16682
  const promptAssemblerLayer = options.promptAssemblerLayer ?? defaultPromptAssemblerLayer(blobStoreLayer, artifactStoreLayer);
@@ -16669,7 +16685,7 @@ var layerWith = (options) => {
16669
16685
  const memoryLayer46 = layer41().pipe(Layer77.provideMerge(embeddingModelLayer));
16670
16686
  const clusterContextLayer = Layer77.mergeAll(options.languageModelLayer, memoryLayer46, blobStoreLayer, artifactStoreLayer, promptAssemblerLayer, schemaRegistryLayer);
16671
16687
  const clusterLayer = options.clusterLayer.pipe(Layer77.provide(clusterContextLayer));
16672
- return Layer77.mergeAll(options.checkLayer, workflowAndEntityLayerWith(options.toolRuntimeLayer, options.schedulerLayer, promptAssemblerLayer, schemaRegistryLayer, options.toolTransitionCoordinatorLayer)).pipe(Layer77.provideMerge(options.languageModelLayer), Layer77.provide(memoryLayer46), Layer77.provideMerge(ClusterWorkflowEngine.layer), Layer77.provideMerge(clusterLayer), Layer77.provideMerge(options.repositoryLayer), Layer77.provideMerge(blobStoreLayer), Layer77.provideMerge(artifactStoreLayer));
16688
+ return Layer77.mergeAll(options.checkLayer, workflowAndEntityLayerWith(options.toolRuntimeLayer, options.schedulerLayer, promptAssemblerLayer, schemaRegistryLayer, options.toolTransitionCoordinatorLayer, options.onCheckpointCommitted === undefined ? undefined : { onCheckpointCommitted: options.onCheckpointCommitted })).pipe(Layer77.provideMerge(options.languageModelLayer), Layer77.provide(memoryLayer46), Layer77.provideMerge(ClusterWorkflowEngine.layer), Layer77.provideMerge(clusterLayer), Layer77.provideMerge(options.repositoryLayer), Layer77.provideMerge(blobStoreLayer), Layer77.provideMerge(artifactStoreLayer));
16673
16689
  };
16674
16690
  var layerWithClient = (options) => {
16675
16691
  const blobStoreLayer = options.blobStoreLayer ?? passthroughLayer2;
@@ -16681,7 +16697,7 @@ var layerWithClient = (options) => {
16681
16697
  return Layer77.mergeAll(options.checkLayer, runtimeServicesLayerWith(options.toolRuntimeLayer, promptAssemblerLayer, schemaRegistryLayer, options.toolTransitionCoordinatorLayer)).pipe(Layer77.provideMerge(options.languageModelLayer), Layer77.provide(memoryLayer46), Layer77.provideMerge(options.clusterLayer), Layer77.provideMerge(options.repositoryLayer), Layer77.provideMerge(blobStoreLayer), Layer77.provideMerge(artifactStoreLayer));
16682
16698
  };
16683
16699
  var layerWithServices = (options) => {
16684
- const runtime = layerWith({
16700
+ const runtime = layerWith2({
16685
16701
  toolTransitionCoordinatorLayer: sqlLayer,
16686
16702
  checkLayer: sqlCheckLayer,
16687
16703
  clusterLayer: sqlClusterLayer,
@@ -16693,12 +16709,13 @@ var layerWithServices = (options) => {
16693
16709
  promptAssemblerLayer: options.promptAssemblerLayer,
16694
16710
  blobStoreLayer: options.blobStoreLayer,
16695
16711
  artifactStoreLayer: options.artifactStoreLayer,
16696
- schemaRegistryLayer: options.schemaRegistryLayer
16712
+ schemaRegistryLayer: options.schemaRegistryLayer,
16713
+ ...options.onCheckpointCommitted === undefined ? {} : { onCheckpointCommitted: options.onCheckpointCommitted }
16697
16714
  });
16698
16715
  return runtime.pipe(Layer77.provide(options.databaseLayer));
16699
16716
  };
16700
16717
  var layerWithServicesMultiNode = (options) => {
16701
- const runtime = layerWith({
16718
+ const runtime = layerWith2({
16702
16719
  toolTransitionCoordinatorLayer: sqlLayer,
16703
16720
  checkLayer: Layer77.mergeAll(sqlCheckLayer, multiNodeDialectGuard),
16704
16721
  clusterLayer: clusterLayerHttp(options.cluster),
@@ -16710,7 +16727,8 @@ var layerWithServicesMultiNode = (options) => {
16710
16727
  promptAssemblerLayer: options.promptAssemblerLayer,
16711
16728
  blobStoreLayer: options.blobStoreLayer,
16712
16729
  artifactStoreLayer: options.artifactStoreLayer,
16713
- schemaRegistryLayer: options.schemaRegistryLayer
16730
+ schemaRegistryLayer: options.schemaRegistryLayer,
16731
+ ...options.onCheckpointCommitted === undefined ? {} : { onCheckpointCommitted: options.onCheckpointCommitted }
16714
16732
  });
16715
16733
  return runtime.pipe(Layer77.provide(options.databaseLayer));
16716
16734
  };
@@ -16730,7 +16748,7 @@ var layerWithServicesMultiNodeClientOnly = (options) => {
16730
16748
  });
16731
16749
  return runtime.pipe(Layer77.provide(options.databaseLayer));
16732
16750
  };
16733
- var layer63 = layerWith({
16751
+ var layer63 = layerWith2({
16734
16752
  toolTransitionCoordinatorLayer: sqlLayer,
16735
16753
  checkLayer: sqlCheckLayer,
16736
16754
  clusterLayer: sqlClusterLayer,
@@ -16740,7 +16758,7 @@ var layer63 = layerWith({
16740
16758
  toolRuntimeLayer: layer35(),
16741
16759
  schedulerLayer: layer62
16742
16760
  });
16743
- var testLayerWithServices = (options) => layerWith({
16761
+ var testLayerWithServices = (options) => layerWith2({
16744
16762
  toolTransitionCoordinatorLayer: memoryLayer41,
16745
16763
  checkLayer: memoryCheckLayer,
16746
16764
  clusterLayer: memoryClusterLayer,
@@ -18574,7 +18592,7 @@ class Service73 extends Context73.Service()("@relayfx/sdk/runtime-database/Servi
18574
18592
  // src/runtime-database-owner.ts
18575
18593
  import { Effect as Effect91, Layer as Layer81 } from "effect";
18576
18594
  var internals = new WeakMap;
18577
- var make12 = (value) => {
18595
+ var make13 = (value) => {
18578
18596
  const database = {
18579
18597
  dialect: value.dialect,
18580
18598
  migrate: value.migrate,
@@ -18846,7 +18864,8 @@ function layerEmbedded(options) {
18846
18864
  blobStoreLayer: options.blobStoreLayer,
18847
18865
  artifactStoreLayer: options.artifactStoreLayer,
18848
18866
  promptAssemblerLayer: options.promptAssemblerLayer,
18849
- schemaRegistryLayer: options.schemaRegistryLayer
18867
+ schemaRegistryLayer: options.schemaRegistryLayer,
18868
+ ...options.onCheckpointCommitted === undefined ? {} : { onCheckpointCommitted: options.onCheckpointCommitted }
18850
18869
  });
18851
18870
  const host = normalizeHost(publicGraph(withHosts(runner, options), runtimeLayer(options.database), "embedded", {
18852
18871
  fanOut: options.childFanOutHostLayer !== undefined,
@@ -18864,6 +18883,7 @@ var layerRunner = (options) => {
18864
18883
  artifactStoreLayer: options.artifactStoreLayer,
18865
18884
  promptAssemblerLayer: options.promptAssemblerLayer,
18866
18885
  schemaRegistryLayer: options.schemaRegistryLayer,
18886
+ ...options.onCheckpointCommitted === undefined ? {} : { onCheckpointCommitted: options.onCheckpointCommitted },
18867
18887
  cluster: options.cluster
18868
18888
  });
18869
18889
  return normalizeHost(publicGraph(runner, runtimeLayer(options.database), "runner"), "runner", options.database.dialect);
@@ -18879,4 +18899,4 @@ var layerClient = (options) => {
18879
18899
  return embeddedOutput(normalizeHost(publicGraph(runner, runtimeLayer(options.database), "client"), "client", options.database.dialect));
18880
18900
  };
18881
18901
 
18882
- export { exports_child_fan_out_host, exports_artifact_store_service, exports_blob_store_service, exports_prompt_assembler_service, Dialect, dialect, fromDbTimestamp, fromNullableDbTimestamp, timestampParam, encodeJson, decodeJson, decodeBool, exports_embedding_model_service, exports_language_model_service, exports_model_hub, exports_schema_registry_service, RuntimeConfigurationError, normalizeAcquisitionCause, DatabaseIdentity, makeDatabaseIdentity, exports_workflow_definition_host, Service73 as Service, make12 as make, runtimeLayer, exports_tool_runtime, SqlFailure, DatabaseAlreadyOwned, MigratorError, SchemaHeadMismatch, RuntimeTopologyError, RuntimeMigrationError, exports_runtime };
18902
+ export { exports_child_fan_out_host, exports_artifact_store_service, exports_blob_store_service, exports_prompt_assembler_service, Dialect, dialect, fromDbTimestamp, fromNullableDbTimestamp, timestampParam, encodeJson, decodeJson, decodeBool, exports_embedding_model_service, exports_language_model_service, exports_model_hub, exports_schema_registry_service, RuntimeConfigurationError, normalizeAcquisitionCause, DatabaseIdentity, makeDatabaseIdentity, exports_workflow_definition_host, Service73 as Service, make13 as make, runtimeLayer, exports_tool_runtime, SqlFailure, DatabaseAlreadyOwned, MigratorError, SchemaHeadMismatch, RuntimeTopologyError, RuntimeMigrationError, exports_runtime };
@@ -3,7 +3,7 @@ import {
3
3
  __export
4
4
  } from "./index-nb39b5ae.js";
5
5
 
6
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/turn-policy.js
6
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/turn-policy.js
7
7
  var exports_turn_policy = {};
8
8
  __export(exports_turn_policy, {
9
9
  untilToolCall: () => untilToolCall,
@@ -74,7 +74,7 @@ var both = dual(2, (first, second) => ({
74
74
  }));
75
75
  var defaultPolicy = forever;
76
76
 
77
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/agent-event.js
77
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/agent-event.js
78
78
  var exports_agent_event = {};
79
79
  __export(exports_agent_event, {
80
80
  addUsage: () => addUsage,
@@ -184,7 +184,7 @@ class ResumeMismatch extends Schema2.TaggedErrorClass()("@batonfx/core/ResumeMis
184
184
  }) {
185
185
  }
186
186
 
187
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/tool-context.js
187
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/tool-context.js
188
188
  var exports_tool_context = {};
189
189
  __export(exports_tool_context, {
190
190
  testLayer: () => testLayer,
@@ -202,7 +202,7 @@ var layerDefault = Layer2.sync(ToolContext, () => ToolContext.of({
202
202
  }));
203
203
  var testLayer = (implementation) => Layer2.succeed(ToolContext, ToolContext.of(implementation));
204
204
 
205
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/tool-executor.js
205
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/tool-executor.js
206
206
  var exports_tool_executor = {};
207
207
  __export(exports_tool_executor, {
208
208
  testLayer: () => testLayer2,
@@ -427,7 +427,7 @@ function router(routes) {
427
427
  }
428
428
  var testLayer2 = (implementation) => Layer3.succeed(ToolExecutor, ToolExecutor.of(implementation));
429
429
 
430
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/approvals.js
430
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/approvals.js
431
431
  var exports_approvals = {};
432
432
  __export(exports_approvals, {
433
433
  testLayer: () => testLayer3,
@@ -442,7 +442,7 @@ var autoApprove = Layer4.succeed(Approvals, Approvals.of({ check: () => Effect4.
442
442
  var denyAll = Layer4.succeed(Approvals, Approvals.of({ check: () => Effect4.succeed({ _tag: "Denied" }) }));
443
443
  var testLayer3 = (implementation) => Layer4.succeed(Approvals, Approvals.of(implementation));
444
444
 
445
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/memory.js
445
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/memory.js
446
446
  var exports_memory = {};
447
447
  __export(exports_memory, {
448
448
  testLayer: () => testLayer4,
@@ -510,7 +510,7 @@ var layerNoop = Layer5.succeed(Memory, Memory.of(noop));
510
510
  var noopLayer = layerNoop;
511
511
  var testLayer4 = (implementation) => Layer5.succeed(Memory, Memory.of(implementation));
512
512
 
513
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/session.js
513
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/session.js
514
514
  var exports_session = {};
515
515
  __export(exports_session, {
516
516
  testLayer: () => testLayer5,
@@ -789,7 +789,7 @@ var layerMemory = Layer6.effect(SessionStore, Ref.make(initialState).pipe(Effect
789
789
  var memoryLayer = layerMemory;
790
790
  var testLayer5 = (implementation) => Layer6.succeed(SessionStore, SessionStore.of(implementation));
791
791
 
792
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/tool-output.js
792
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/tool-output.js
793
793
  var exports_tool_output = {};
794
794
  __export(exports_tool_output, {
795
795
  testLayer: () => testLayer6,
@@ -865,7 +865,7 @@ var bound = Function2.dual(2, (result, options) => Effect7.gen(function* () {
865
865
  return boundedFromOriginal(encoded, bytes, options.maxBytes, [path.value]);
866
866
  }));
867
867
 
868
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/compaction.js
868
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/compaction.js
869
869
  var exports_compaction = {};
870
870
  __export(exports_compaction, {
871
871
  truncate: () => truncate,
@@ -1134,7 +1134,7 @@ var truncate = (maxTokens) => ({
1134
1134
  });
1135
1135
  var testLayer7 = (implementation) => Layer8.succeed(Compaction, Compaction.of(implementation));
1136
1136
 
1137
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/instructions.js
1137
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/instructions.js
1138
1138
  var exports_instructions = {};
1139
1139
  __export(exports_instructions, {
1140
1140
  testLayer: () => testLayer8,
@@ -1183,7 +1183,7 @@ var renderUpdate = dual3(2, (epoch, context) => Effect9.gen(function* () {
1183
1183
  var layer2 = (sources) => Layer9.succeed(Instructions, Instructions.of({ sources: [...sources] }));
1184
1184
  var testLayer8 = (implementation) => Layer9.succeed(Instructions, Instructions.of(implementation));
1185
1185
 
1186
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/model-middleware.js
1186
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/model-middleware.js
1187
1187
  var exports_model_middleware = {};
1188
1188
  __export(exports_model_middleware, {
1189
1189
  layerIdentity: () => layerIdentity,
@@ -1199,7 +1199,7 @@ var layerIdentity = Layer10.succeed(ModelMiddleware, []);
1199
1199
  var identityLayer = layerIdentity;
1200
1200
  var layer3 = (middleware) => Layer10.succeed(ModelMiddleware, middleware);
1201
1201
 
1202
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/model-registry.js
1202
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/model-registry.js
1203
1203
  var exports_model_registry = {};
1204
1204
  __export(exports_model_registry, {
1205
1205
  testLayer: () => testLayer9,
@@ -1326,7 +1326,7 @@ var operate = Function4.dual(2, (selection, effect) => Effect11.gen(function* ()
1326
1326
  var stream = Function4.dual(2, (selection, operation) => Stream2.unwrap(Service.pipe(Effect11.map((service) => service.stream(selection, operation)))));
1327
1327
  var provide = operate;
1328
1328
 
1329
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/model-resilience.js
1329
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/model-resilience.js
1330
1330
  var exports_model_resilience = {};
1331
1331
  __export(exports_model_resilience, {
1332
1332
  testLayer: () => testLayer10,
@@ -1379,7 +1379,7 @@ var apply = Function5.dual(2, (model, resilience) => ({
1379
1379
  streamText: (options) => retryStream(() => model.streamText(options), (error) => Response5.makePart("error", { error }), resilience)
1380
1380
  }));
1381
1381
 
1382
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/permissions.js
1382
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/permissions.js
1383
1383
  var exports_permissions = {};
1384
1384
  __export(exports_permissions, {
1385
1385
  testLayer: () => testLayer11,
@@ -1513,7 +1513,7 @@ var ruleStoreMemory = (initialRules = []) => Layer13.effect(RuleStore, Ref4.make
1513
1513
  var ruleStoreTestLayer = (implementation) => Layer13.succeed(RuleStore, RuleStore.of(implementation));
1514
1514
  var testLayer11 = (implementation) => Layer13.succeed(Permissions, Permissions.of(implementation));
1515
1515
 
1516
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/skill-source.js
1516
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/skill-source.js
1517
1517
  var exports_skill_source = {};
1518
1518
  __export(exports_skill_source, {
1519
1519
  testLayer: () => testLayer12,
@@ -1593,7 +1593,7 @@ var selectListings = Function6.dual(3, (skills, budgetTokens, recentlyUsed) => {
1593
1593
  return selected;
1594
1594
  });
1595
1595
 
1596
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/steering.js
1596
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/steering.js
1597
1597
  var exports_steering = {};
1598
1598
  __export(exports_steering, {
1599
1599
  testLayer: () => testLayer13,
@@ -1651,7 +1651,7 @@ var layer7 = (options = {}) => Layer15.effect(Steering, Effect15.gen(function* (
1651
1651
  }));
1652
1652
  var testLayer13 = (implementation) => Layer15.succeed(Steering, Steering.of(implementation));
1653
1653
 
1654
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/agent.js
1654
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/agent.js
1655
1655
  var exports_agent = {};
1656
1656
  __export(exports_agent, {
1657
1657
  streamObject: () => streamObject,
@@ -1670,7 +1670,7 @@ import { Cause as Cause4, Channel, Effect as Effect18, Equal, Exit as Exit2, Fib
1670
1670
  import { dual as dual7 } from "effect/Function";
1671
1671
  import { AiError as AiError3, Chat, LanguageModel as LanguageModel5, Prompt as Prompt9, Response as Response7, Telemetry, Tokenizer as Tokenizer2, Tool as Tool7, Toolkit as Toolkit4 } from "effect/unstable/ai";
1672
1672
 
1673
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/tool-authorization.js
1673
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/tool-authorization.js
1674
1674
  import { Cause as Cause3, Context as Context15, Effect as Effect16, Layer as Layer16, Option as Option10, Schema as Schema13 } from "effect";
1675
1675
  import { dual as dual5 } from "effect/Function";
1676
1676
  import { Prompt as Prompt8, Response as Response6, Tool as Tool5 } from "effect/unstable/ai";
@@ -1841,7 +1841,7 @@ var make4 = (options = {}) => ({
1841
1841
  });
1842
1842
  var fromPermissions = dual5((args) => args.length === 2 || args.length === 1 && ("evaluate" in args[0]), (permissions, options = {}) => make4({ ...options, permissions }));
1843
1843
 
1844
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/tool-registry.js
1844
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/tool-registry.js
1845
1845
  import { Effect as Effect17, HashMap as HashMap3, Option as Option11 } from "effect";
1846
1846
  import { dual as dual6 } from "effect/Function";
1847
1847
  import { Tool as Tool6, Toolkit as Toolkit3 } from "effect/unstable/ai";
@@ -1894,7 +1894,7 @@ var select = dual6(2, (registry, names) => {
1894
1894
  };
1895
1895
  });
1896
1896
 
1897
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/agent.js
1897
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/agent.js
1898
1898
  var AgentTypeId = Symbol.for("@batonfx/core/Agent");
1899
1899
  var ModelLayerTypeId = Symbol.for("@batonfx/core/Agent/ModelLayer");
1900
1900
  var classifyOtherFailure = () => "other";
@@ -3185,7 +3185,7 @@ var generatePersistedObject = dual7(2, (agent, options) => Stream4.runFold(persi
3185
3185
  })
3186
3186
  }))));
3187
3187
 
3188
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/agent-tool.js
3188
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/agent-tool.js
3189
3189
  var exports_agent_tool = {};
3190
3190
  __export(exports_agent_tool, {
3191
3191
  asTool: () => asTool
@@ -3256,7 +3256,7 @@ var asTool = Function7.dual((args) => args.length !== 1 || ("name" in args[0]),
3256
3256
  return lazyHandled(toolkit, name, handler);
3257
3257
  });
3258
3258
 
3259
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/guardrail.js
3259
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/guardrail.js
3260
3260
  var exports_guardrail = {};
3261
3261
  __export(exports_guardrail, {
3262
3262
  validateInput: () => validateInput,
@@ -3337,7 +3337,7 @@ var filterOutput = (keep) => ({
3337
3337
  transformPart: (part, context) => Effect20.succeed(part.type === "tool-call" || keep(part, context) ? Option13.some(part) : Option13.none())
3338
3338
  });
3339
3339
 
3340
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/handoff.js
3340
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/handoff.js
3341
3341
  var exports_handoff = {};
3342
3342
  __export(exports_handoff, {
3343
3343
  transferTool: () => transferTool,
@@ -3417,7 +3417,7 @@ var supervisor = (options) => {
3417
3417
  };
3418
3418
  };
3419
3419
 
3420
- // ../../node_modules/.bun/@batonfx+core@0.6.0/node_modules/@batonfx/core/dist/index.js
3420
+ // ../../node_modules/.bun/@batonfx+core@0.6.1/node_modules/@batonfx/core/dist/index.js
3421
3421
  import { AiError as AiError5, Chat as Chat2, EmbeddingModel, IdGenerator, LanguageModel as LanguageModel7, Model as Model2, Prompt as Prompt13, Response as Response9, ResponseIdTracker, Telemetry as Telemetry2, Tokenizer as Tokenizer3, Tool as Tool10, Toolkit as Toolkit7 } from "effect/unstable/ai";
3422
3422
 
3423
3423
  export { exports_turn_policy, exports_agent_event, exports_tool_context, exports_tool_executor, exports_approvals, exports_memory, exports_session, exports_tool_output, exports_compaction, exports_instructions, exports_model_middleware, exports_model_registry, exports_model_resilience, exports_permissions, exports_skill_source, exports_steering, exports_agent, exports_agent_tool, exports_guardrail, exports_handoff, AiError5 as AiError, Chat2 as Chat, EmbeddingModel, IdGenerator, Model2 as Model, Prompt13 as Prompt, Response9 as Response, ResponseIdTracker, Telemetry2 as Telemetry, Tokenizer3 as Tokenizer, Tool10 as Tool, Toolkit7 as Toolkit };
@@ -8,7 +8,7 @@ import {
8
8
  SqlFailure,
9
9
  make,
10
10
  normalizeAcquisitionCause
11
- } from "./index-70m3hgk1.js";
11
+ } from "./index-01rpd00m.js";
12
12
 
13
13
  // src/migration-errors.ts
14
14
  import { Cause, Effect, Function } from "effect";
package/dist/index.js CHANGED
@@ -13,10 +13,10 @@ import {
13
13
  exports_tool_runtime,
14
14
  exports_workflow_definition_host,
15
15
  makeDatabaseIdentity
16
- } from "./index-70m3hgk1.js";
16
+ } from "./index-01rpd00m.js";
17
17
  import {
18
18
  exports_model_registry
19
- } from "./index-bknsjvwf.js";
19
+ } from "./index-25gwk9tj.js";
20
20
  import {
21
21
  Service,
22
22
  exports_address_schema,
@@ -169,13 +169,13 @@ __export(exports_language_model_registration, {
169
169
  OpenAiAccountCredentialError: () => OpenAiAccountCredentialError
170
170
  });
171
171
 
172
- // ../../node_modules/.bun/@batonfx+providers@0.6.0/node_modules/@batonfx/providers/dist/deterministic.js
172
+ // ../../node_modules/.bun/@batonfx+providers@0.6.1/node_modules/@batonfx/providers/dist/deterministic.js
173
173
  import { OpenAiClient as OpenAiClient2 } from "@effect/ai-openai";
174
174
  import { Config as Config2, Effect as Effect4, Layer as Layer3, Option, Stream as Stream2 } from "effect";
175
175
  import { LanguageModel, Response } from "effect/unstable/ai";
176
176
  import { FetchHttpClient as FetchHttpClient2 } from "effect/unstable/http";
177
177
 
178
- // ../../node_modules/.bun/@batonfx+providers@0.6.0/node_modules/@batonfx/providers/dist/openai.js
178
+ // ../../node_modules/.bun/@batonfx+providers@0.6.1/node_modules/@batonfx/providers/dist/openai.js
179
179
  import { OpenAiClient, OpenAiLanguageModel } from "@effect/ai-openai";
180
180
  import { Config, Effect as Effect3, Layer as Layer2, Redacted, Schema, Stream } from "effect";
181
181
  import { AiError } from "effect/unstable/ai";
@@ -263,7 +263,7 @@ var openAiAccount = (input) => exports_model_registry.registrationFromLayer({
263
263
  var withOpenAiAccount = (input) => exports_model_registry.layerFromRegistrationEffects([openAiAccount(input)]);
264
264
  var withOpenAiAccountFetch = (input) => withOpenAiAccount(input).pipe(Layer2.provide(FetchHttpClient.layer));
265
265
 
266
- // ../../node_modules/.bun/@batonfx+providers@0.6.0/node_modules/@batonfx/providers/dist/deterministic.js
266
+ // ../../node_modules/.bun/@batonfx+providers@0.6.1/node_modules/@batonfx/providers/dist/deterministic.js
267
267
  var deterministicModelLayer = Layer3.effect(LanguageModel.LanguageModel, LanguageModel.make({
268
268
  generateText: () => Effect4.succeed([{ type: "text", text: "deterministic response" }]),
269
269
  streamText: () => Stream2.make(Response.makePart("text-delta", { id: "text", delta: "deterministic response" }))
@@ -296,7 +296,7 @@ var withOpenAiOrDeterministic = (options) => Layer3.unwrap(Effect4.gen(function*
296
296
  }));
297
297
  var withOpenAiOrDeterministicFetch = (options) => withOpenAiOrDeterministic(options).pipe(Layer3.provide(FetchHttpClient2.layer));
298
298
 
299
- // ../../node_modules/.bun/@batonfx+providers@0.6.0/node_modules/@batonfx/providers/dist/anthropic.js
299
+ // ../../node_modules/.bun/@batonfx+providers@0.6.1/node_modules/@batonfx/providers/dist/anthropic.js
300
300
  import { AnthropicClient, AnthropicLanguageModel } from "@effect/ai-anthropic";
301
301
  import { Config as Config3, Layer as Layer4, Redacted as Redacted2 } from "effect";
302
302
  import { AiError as AiError2 } from "effect/unstable/ai";
@@ -321,7 +321,7 @@ var anthropic = (input) => exports_model_registry.registrationFromLayer({
321
321
  var anthropicClientLayerConfig = AnthropicClient.layerConfig;
322
322
  var withAnthropic = (options) => exports_model_registry.layerFromRegistrationEffects([anthropic(options)]).pipe(Layer4.provide(AnthropicClient.layerConfig({ ...options.clientConfig, apiKey: options.apiKey })));
323
323
  var withAnthropicFetch = (options) => withAnthropic(options).pipe(Layer4.provide(FetchHttpClient3.layer));
324
- // ../../node_modules/.bun/@batonfx+providers@0.6.0/node_modules/@batonfx/providers/dist/openai-compat.js
324
+ // ../../node_modules/.bun/@batonfx+providers@0.6.1/node_modules/@batonfx/providers/dist/openai-compat.js
325
325
  import { OpenAiClient as OpenAiClient3, OpenAiLanguageModel as OpenAiLanguageModel2 } from "@effect/ai-openai-compat";
326
326
  import { Config as Config4, Layer as Layer5, Redacted as Redacted3 } from "effect";
327
327
  import { FetchHttpClient as FetchHttpClient4 } from "effect/unstable/http";
@@ -344,7 +344,7 @@ var clientLayerConfig = (options) => OpenAiClient3.layerConfig({
344
344
  });
345
345
  var withOpenAiCompatible = (options) => exports_model_registry.layerFromRegistrationEffects([openAiCompatible(options)]).pipe(Layer5.provide(clientLayerConfig(options)));
346
346
  var withOpenAiCompatibleFetch = (options) => withOpenAiCompatible(options).pipe(Layer5.provide(FetchHttpClient4.layer));
347
- // ../../node_modules/.bun/@batonfx+providers@0.6.0/node_modules/@batonfx/providers/dist/openrouter.js
347
+ // ../../node_modules/.bun/@batonfx+providers@0.6.1/node_modules/@batonfx/providers/dist/openrouter.js
348
348
  import { OpenRouterClient, OpenRouterLanguageModel } from "@effect/ai-openrouter";
349
349
  import { Config as Config5, Layer as Layer6, Redacted as Redacted4 } from "effect";
350
350
  import { AiError as AiError3 } from "effect/unstable/ai";
package/dist/mysql.js CHANGED
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  database,
4
4
  normalizeMigrationCause
5
- } from "./index-szzswx0z.js";
5
+ } from "./index-pr9133xv.js";
6
6
  import {
7
7
  MigratorError,
8
8
  RuntimeMigrationError,
9
9
  SqlFailure
10
- } from "./index-70m3hgk1.js";
11
- import"./index-bknsjvwf.js";
10
+ } from "./index-01rpd00m.js";
11
+ import"./index-25gwk9tj.js";
12
12
  import"./index-cphmds30.js";
13
13
  import"./index-nb39b5ae.js";
14
14
 
package/dist/postgres.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  database,
4
4
  normalizeMigrationCause
5
- } from "./index-szzswx0z.js";
5
+ } from "./index-pr9133xv.js";
6
6
  import {
7
7
  Dialect,
8
8
  RuntimeMigrationError,
@@ -14,8 +14,8 @@ import {
14
14
  fromDbTimestamp,
15
15
  fromNullableDbTimestamp,
16
16
  timestampParam
17
- } from "./index-70m3hgk1.js";
18
- import"./index-bknsjvwf.js";
17
+ } from "./index-01rpd00m.js";
18
+ import"./index-25gwk9tj.js";
19
19
  import {
20
20
  exports_ids_schema
21
21
  } from "./index-cphmds30.js";
package/dist/sqlite.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  database,
4
4
  normalizeMigrationCause
5
- } from "./index-szzswx0z.js";
5
+ } from "./index-pr9133xv.js";
6
6
  import {
7
7
  DatabaseAlreadyOwned,
8
8
  RuntimeConfigurationError,
@@ -12,8 +12,8 @@ import {
12
12
  make,
13
13
  makeDatabaseIdentity,
14
14
  runtimeLayer
15
- } from "./index-70m3hgk1.js";
16
- import"./index-bknsjvwf.js";
15
+ } from "./index-01rpd00m.js";
16
+ import"./index-25gwk9tj.js";
17
17
  import"./index-cphmds30.js";
18
18
  import"./index-nb39b5ae.js";
19
19
 
@@ -1,3 +1,4 @@
1
+ import { Session } from "@batonfx/core";
1
2
  import { Service as PromptAssemblerService } from "../runtime/agent/prompt-assembler-service";
2
3
  import { Service as ArtifactStoreService } from "../runtime/content/artifact-store-service";
3
4
  import { Service as BlobStoreService } from "../runtime/content/blob-store-service";
@@ -171,6 +172,7 @@ export type MultiNodeDatabase<E = never, R = never> = Database<"pg", E, R> | Dat
171
172
  type HostOptions<HostE, HostR, ToolE = HostE, ToolR = HostR> = {
172
173
  readonly languageModelLayer: Layer.Layer<LanguageModelServiceService, HostE, HostR>;
173
174
  readonly toolRuntimeLayer: Layer.Layer<ToolRuntimeHostService, ToolE, ToolR>;
175
+ readonly onCheckpointCommitted?: (checkpoint: Session.CheckpointAppend) => Effect.Effect<void>;
174
176
  readonly embeddingModelLayer?: Layer.Layer<EmbeddingModelServiceService, HostE, HostR>;
175
177
  readonly blobStoreLayer?: Layer.Layer<BlobStoreService, HostE, HostR>;
176
178
  readonly artifactStoreLayer?: Layer.Layer<ArtifactStoreService, HostE, HostR>;
@@ -1,4 +1,4 @@
1
- import { AgentEvent, ModelRegistry } from "@batonfx/core";
1
+ import { AgentEvent, ModelRegistry, Session } from "@batonfx/core";
2
2
  import { Agent, Content, Execution, Ids, Shared, Tool } from "../../schema/index";
3
3
  import { AgentChatRepository } from "../../store-sql/portable";
4
4
  import { Cause, Context, Effect, Layer, Schema } from "effect";
@@ -77,6 +77,10 @@ export declare const mapBoundaryError: {
77
77
  (current: Execution.ExecutionEventSequence): (error: unknown) => AgentLoopError | AgentLoopWaitRequested | AgentLoopBudgetExceeded;
78
78
  (error: unknown, current: Execution.ExecutionEventSequence, failureClassification?: ModelRegistry.FailureClassification): AgentLoopError | AgentLoopWaitRequested | AgentLoopBudgetExceeded;
79
79
  };
80
+ export interface LayerOptions {
81
+ readonly onCheckpointCommitted?: (checkpoint: Session.CheckpointAppend) => Effect.Effect<void>;
82
+ }
83
+ export declare const layerWith: (layerOptions?: LayerOptions) => Layer.Layer<Service, never, AgentChatRepository.Service | EventLogService | ToolRuntimeService | LanguageModelServiceService | ModelCallPolicyService | SchemaRegistryService | PromptAssemblerService>;
80
84
  export declare const layer: Layer.Layer<Service, never, AgentChatRepository.Service | EventLogService | ToolRuntimeService | LanguageModelServiceService | ModelCallPolicyService | SchemaRegistryService | PromptAssemblerService>;
81
85
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
82
86
  export declare const run: (input: RunInput) => Effect.Effect<RunResult, AgentLoopBudgetExceeded | AgentLoopError | AgentLoopWaitRequested, Service>;
@@ -4,6 +4,7 @@ import { Config, Context, Crypto, Duration, Effect, Layer, Option, Schema } from
4
4
  import { MessageStorage, RunnerAddress, RunnerStorage, Runners, Sharding, ShardingConfig } from "effect/unstable/cluster";
5
5
  import { SqlClient } from "effect/unstable/sql/SqlClient";
6
6
  import { WorkflowEngine } from "effect/unstable/workflow";
7
+ import { type LayerOptions as AgentLoopLayerOptions } from "../agent/agent-loop-service";
7
8
  import { Service as ArtifactStoreService } from "../content/artifact-store-service";
8
9
  import { Service as BlobStoreService } from "../content/blob-store-service";
9
10
  import { Service as EmbeddingModelServiceService } from "../model/embedding-model-service";
@@ -71,6 +72,7 @@ export declare const assertClusterConfig: (expected: {
71
72
  }) => Effect.Effect<undefined, ClusterConfigMismatch, ShardingConfig.ShardingConfig>;
72
73
  /** @deprecated Use `Runtime.layerEmbedded` for an embedded process role. */
73
74
  export declare const layerWith: <CheckError, CheckIn, ClusterOut, ClusterError, ClusterIn, RepositoryOut, RepositoryError, RepositoryIn, LanguageModelOut, LanguageModelError, LanguageModelIn, EmbeddingModelError, EmbeddingModelIn, ToolRuntimeError, ToolRuntimeIn, SchedulerError, SchedulerIn, CoordinatorError, CoordinatorIn>(options: {
75
+ readonly onCheckpointCommitted?: AgentLoopLayerOptions["onCheckpointCommitted"];
74
76
  readonly checkLayer: Layer.Layer<Service, CheckError, CheckIn>;
75
77
  readonly clusterLayer: Layer.Layer<ClusterOut, ClusterError, ClusterIn>;
76
78
  readonly repositoryLayer: Layer.Layer<RepositoryOut, RepositoryError, RepositoryIn>;
@@ -100,6 +102,7 @@ export declare const layerWithClient: <CheckError, CheckIn, ClusterOut, ClusterE
100
102
  }) => Layer.Layer<ClusterOut | LanguageModelOut | RepositoryOut | 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-contract").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("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | import("../agent/agent-loop-service").Service | 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, CheckError | ClusterError | CoordinatorError | LanguageModelError | RepositoryError | ToolRuntimeError | Config.ConfigError, 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<CheckIn, LanguageModelOut>, 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<Sharding.Sharding, 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<Exclude<Exclude<Exclude<Exclude<CoordinatorIn, import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../agent/agent-registry-service").Service | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-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<ToolRuntimeIn, import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../agent/agent-registry-service").Service | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-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, 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("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../agent/agent-registry-service").Service | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-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<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("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../agent/agent-registry-service").Service | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-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<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("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../agent/agent-registry-service").Service | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-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>>;
101
103
  /** @deprecated Use `Runtime.layerEmbedded` for an embedded process role. */
102
104
  export declare const layerWithServices: <DatabaseError, DatabaseIn, LanguageModelError, LanguageModelIn, EmbeddingModelError, EmbeddingModelIn, ToolRuntimeError, ToolRuntimeIn>(options: {
105
+ readonly onCheckpointCommitted?: AgentLoopLayerOptions["onCheckpointCommitted"];
103
106
  readonly databaseLayer: Layer.Layer<SqlClient, DatabaseError, DatabaseIn>;
104
107
  readonly languageModelLayer: Layer.Layer<LanguageModelServiceService, LanguageModelError, LanguageModelIn>;
105
108
  readonly embeddingModelLayer?: Layer.Layer<EmbeddingModelServiceService, EmbeddingModelError, EmbeddingModelIn> | undefined;
@@ -111,6 +114,7 @@ export declare const layerWithServices: <DatabaseError, DatabaseIn, LanguageMode
111
114
  }) => Layer.Layer<MessageStorage.MessageStorage | Runners.Runners | 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-contract").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("../inbox/inbox-service").Service | import("../topic/topic-service").Service | import("../envelope/envelope-service").Service | ArtifactStoreService | PromptAssemblerService | import("../agent/agent-loop-service").Service | 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 | Sharding.Sharding | ShardingConfig.ShardingConfig | WorkflowEngine.WorkflowEngine, DatabaseError | LanguageModelError | ToolRuntimeError | ClusterConfigMismatch | Config.ConfigError, 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>, MessageStorage.MessageStorage | Runners.Runners | Sharding.Sharding | ShardingConfig.ShardingConfig>, 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<ToolRuntimeIn, import("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../agent/agent-registry-service").Service | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, MessageStorage.MessageStorage | Runners.Runners | Sharding.Sharding | ShardingConfig.ShardingConfig>, 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, 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("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../agent/agent-registry-service").Service | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, MessageStorage.MessageStorage | Runners.Runners | Sharding.Sharding | ShardingConfig.ShardingConfig>, 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<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("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../agent/agent-registry-service").Service | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, MessageStorage.MessageStorage | Runners.Runners | Sharding.Sharding | ShardingConfig.ShardingConfig>, 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<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("../address/address-book-service").Service | import("../execution/event-log-service").Service | import("../agent/agent-registry-service").Service | import("../entity/entity-registry-service").Service | import("../entity/entity-instance-service").Service>, import("../state/execution-state-service").Service>, import("../wait/wait-service").Service>, import("../execution/event-log-service").Service>, LanguageModelServiceService>, never>, WorkflowEngine.WorkflowEngine>, MessageStorage.MessageStorage | Runners.Runners | Sharding.Sharding | ShardingConfig.ShardingConfig>, 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>>;
112
115
  /** @deprecated Use `Runtime.layerRunner` for a runner process role. */
113
116
  export declare const layerWithServicesMultiNode: <DatabaseError, DatabaseIn, LanguageModelError, LanguageModelIn, EmbeddingModelError, EmbeddingModelIn, ToolRuntimeError, ToolRuntimeIn>(options: {
117
+ readonly onCheckpointCommitted?: AgentLoopLayerOptions["onCheckpointCommitted"];
114
118
  readonly databaseLayer: Layer.Layer<SqlClient, DatabaseError, DatabaseIn>;
115
119
  readonly languageModelLayer: Layer.Layer<LanguageModelServiceService, LanguageModelError, LanguageModelIn>;
116
120
  readonly embeddingModelLayer?: Layer.Layer<EmbeddingModelServiceService, EmbeddingModelError, EmbeddingModelIn> | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@relayfx/sdk",
4
- "version": "0.3.2",
4
+ "version": "0.3.4",
5
5
  "description": "Effect-native durable execution SDK for addressable agents and tools",
6
6
  "type": "module",
7
7
  "exports": {
@@ -57,8 +57,8 @@
57
57
  "typecheck": "bun tsc --noEmit"
58
58
  },
59
59
  "dependencies": {
60
- "@batonfx/core": "0.6.0",
61
- "@batonfx/providers": "0.6.0",
60
+ "@batonfx/core": "0.6.1",
61
+ "@batonfx/providers": "0.6.1",
62
62
  "@effect/ai-anthropic": "4.0.0-beta.98",
63
63
  "@effect/ai-openai": "4.0.0-beta.98",
64
64
  "@effect/ai-openai-compat": "4.0.0-beta.98",