@relayfx/sdk 0.3.3 → 0.3.5

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.
@@ -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;
@@ -6140,6 +6140,21 @@ export declare const relayToolAttempts: import("drizzle-orm/pg-core").PgTableWit
6140
6140
  identity: undefined;
6141
6141
  generated: undefined;
6142
6142
  }>;
6143
+ executionId: import("drizzle-orm/pg-core").PgBuildColumn<"relay_tool_attempts", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, string & import("effect/Brand").Brand<"Relay.ExecutionId">>>, {
6144
+ name: string;
6145
+ tableName: "relay_tool_attempts";
6146
+ dataType: "string";
6147
+ data: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
6148
+ driverParam: string;
6149
+ notNull: true;
6150
+ hasDefault: false;
6151
+ isPrimaryKey: false;
6152
+ isAutoincrement: false;
6153
+ hasRuntimeDefault: false;
6154
+ enumValues: undefined;
6155
+ identity: undefined;
6156
+ generated: undefined;
6157
+ }>;
6143
6158
  id: import("drizzle-orm/pg-core").PgBuildColumn<"relay_tool_attempts", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, string & import("effect/Brand").Brand<"Relay.ToolAttemptId">>>, {
6144
6159
  name: string;
6145
6160
  tableName: "relay_tool_attempts";
@@ -6297,6 +6312,21 @@ export declare const relayToolResults: import("drizzle-orm/pg-core").PgTableWith
6297
6312
  identity: undefined;
6298
6313
  generated: undefined;
6299
6314
  }>;
6315
+ executionId: import("drizzle-orm/pg-core").PgBuildColumn<"relay_tool_results", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, string & import("effect/Brand").Brand<"Relay.ExecutionId">>>, {
6316
+ name: string;
6317
+ tableName: "relay_tool_results";
6318
+ dataType: "string";
6319
+ data: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
6320
+ driverParam: string;
6321
+ notNull: true;
6322
+ hasDefault: false;
6323
+ isPrimaryKey: false;
6324
+ isAutoincrement: false;
6325
+ hasRuntimeDefault: false;
6326
+ enumValues: undefined;
6327
+ identity: undefined;
6328
+ generated: undefined;
6329
+ }>;
6300
6330
  toolCallId: import("drizzle-orm/pg-core").PgBuildColumn<"relay_tool_results", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, string & import("effect/Brand").Brand<"Relay.ToolCallId">>>, {
6301
6331
  name: string;
6302
6332
  tableName: "relay_tool_results";
@@ -97,12 +97,14 @@ export interface ToolAttemptRecord {
97
97
  readonly completedAt?: number;
98
98
  }
99
99
  export interface PrepareExternalWaitInput {
100
+ readonly executionId: Ids.ExecutionId;
100
101
  readonly callId: Ids.ToolCallId;
101
102
  readonly waitId: Ids.WaitId;
102
103
  readonly availableAt: number;
103
104
  readonly updatedAt: number;
104
105
  }
105
106
  export interface BeginAttemptInput {
107
+ readonly executionId: Ids.ExecutionId;
106
108
  readonly callId: Ids.ToolCallId;
107
109
  readonly startedAt: number;
108
110
  }
@@ -119,6 +121,7 @@ export interface ClaimRemoteInput {
119
121
  readonly claimExpiresAt: number;
120
122
  }
121
123
  export interface ReleaseRemoteInput {
124
+ readonly executionId: Ids.ExecutionId;
122
125
  readonly callId: Ids.ToolCallId;
123
126
  readonly attemptId: Ids.ToolAttemptId;
124
127
  readonly workerId: Tool.WorkerId;
@@ -127,6 +130,7 @@ export interface ReleaseRemoteInput {
127
130
  readonly error?: string;
128
131
  }
129
132
  export interface AcceptRemoteOutcomeInput {
133
+ readonly executionId: Ids.ExecutionId;
130
134
  readonly callId: Ids.ToolCallId;
131
135
  readonly attemptId: Ids.ToolAttemptId;
132
136
  readonly workerId: Tool.WorkerId;
@@ -160,23 +164,24 @@ export declare const toolCallIdempotencyKey: {
160
164
  (tenantId: Ids.TenantId, executionId: Ids.ExecutionId, callId: Ids.ToolCallId): string;
161
165
  };
162
166
  export interface RecordResultInput {
167
+ readonly executionId: Ids.ExecutionId;
163
168
  readonly result: Tool.Result;
164
169
  readonly createdAt: number;
165
170
  }
166
171
  export interface Interface {
167
172
  readonly ensureCall: (input: EnsureCallInput) => Effect.Effect<ToolCallRecord, ToolCallStateError>;
168
173
  readonly recordCall: (input: RecordCallInput) => Effect.Effect<ToolCallRecord, DuplicateToolCall | ToolCallRepositoryError>;
169
- readonly getCall: (id: Ids.ToolCallId) => Effect.Effect<ToolCallRecord | undefined, ToolCallRepositoryError>;
174
+ readonly getCall: (executionId: Ids.ExecutionId, id: Ids.ToolCallId) => Effect.Effect<ToolCallRecord | undefined, ToolCallRepositoryError>;
170
175
  readonly listCalls: (executionId: Ids.ExecutionId) => Effect.Effect<ReadonlyArray<ToolCallRecord>, ToolCallRepositoryError>;
171
176
  readonly recordResult: (input: RecordResultInput) => Effect.Effect<ToolResultRecord, ToolCallNotFound | DuplicateToolResult | ToolCallRepositoryError>;
172
- readonly getResult: (callId: Ids.ToolCallId) => Effect.Effect<ToolResultRecord | undefined, ToolCallRepositoryError>;
177
+ readonly getResult: (executionId: Ids.ExecutionId, callId: Ids.ToolCallId) => Effect.Effect<ToolResultRecord | undefined, ToolCallRepositoryError>;
173
178
  readonly prepareExternalWait: (input: PrepareExternalWaitInput) => Effect.Effect<ToolCallRecord, ToolCallStateError>;
174
179
  readonly beginAttempt: (input: BeginAttemptInput) => Effect.Effect<ToolAttemptRecord, ToolCallStateError>;
175
180
  readonly acceptClientOutcome: (input: AcceptClientOutcomeInput) => Effect.Effect<AcceptedOutcome, ToolCallStateError>;
176
181
  readonly claimRemote: (input: ClaimRemoteInput) => Effect.Effect<ToolWorkLease | undefined, ToolCallStateError>;
177
182
  readonly releaseRemote: (input: ReleaseRemoteInput) => Effect.Effect<ToolCallRecord, ToolCallStateError>;
178
183
  readonly acceptRemoteOutcome: (input: AcceptRemoteOutcomeInput) => Effect.Effect<AcceptedOutcome, ToolCallStateError>;
179
- readonly listAttempts: (callId: Ids.ToolCallId) => Effect.Effect<ReadonlyArray<ToolAttemptRecord>, ToolCallRepositoryError>;
184
+ readonly listAttempts: (executionId: Ids.ExecutionId, callId: Ids.ToolCallId) => Effect.Effect<ReadonlyArray<ToolAttemptRecord>, ToolCallRepositoryError>;
180
185
  readonly failOpenForExecution: (input: FailOpenForExecutionInput) => Effect.Effect<ReadonlyArray<ToolCallRecord>, ToolCallNotFound | ToolCallRepositoryError>;
181
186
  }
182
187
  declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/tool/tool-call-repository/Service", Interface>;
@@ -227,10 +232,10 @@ export declare const memoryLayer: Layer.Layer<Service, never, never>;
227
232
  type TestInterface = Pick<Interface, "recordCall" | "getCall" | "listCalls" | "recordResult" | "getResult"> & Partial<Interface>;
228
233
  export declare const testLayer: (implementation: TestInterface) => Layer.Layer<Service, never, never>;
229
234
  export declare const recordCall: (input: RecordCallInput) => Effect.Effect<ToolCallRecord, DuplicateToolCall | ToolCallRepositoryError, Service>;
230
- export declare const getCall: (id: string & import("effect/Brand").Brand<"Relay.ToolCallId">) => Effect.Effect<ToolCallRecord | undefined, ToolCallRepositoryError, Service>;
235
+ export declare const getCall: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">, id: string & import("effect/Brand").Brand<"Relay.ToolCallId">) => Effect.Effect<ToolCallRecord | undefined, ToolCallRepositoryError, Service>;
231
236
  export declare const listCalls: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<readonly ToolCallRecord[], ToolCallRepositoryError, Service>;
232
237
  export declare const recordResult: (input: RecordResultInput) => Effect.Effect<ToolResultRecord, DuplicateToolResult | ToolCallNotFound | ToolCallRepositoryError, Service>;
233
- export declare const getResult: (callId: string & import("effect/Brand").Brand<"Relay.ToolCallId">) => Effect.Effect<ToolResultRecord | undefined, ToolCallRepositoryError, Service>;
238
+ export declare const getResult: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">, callId: string & import("effect/Brand").Brand<"Relay.ToolCallId">) => Effect.Effect<ToolResultRecord | undefined, ToolCallRepositoryError, Service>;
234
239
  export declare const ensureCall: (input: EnsureCallInput) => Effect.Effect<ToolCallRecord, ToolCallStateError, Service>;
235
240
  export declare const prepareExternalWait: (input: PrepareExternalWaitInput) => Effect.Effect<ToolCallRecord, ToolCallStateError, Service>;
236
241
  export declare const beginAttempt: (input: BeginAttemptInput) => Effect.Effect<ToolAttemptRecord, ToolCallStateError, Service>;
@@ -238,6 +243,6 @@ export declare const acceptClientOutcome: (input: AcceptClientOutcomeInput) => E
238
243
  export declare const claimRemote: (input: ClaimRemoteInput) => Effect.Effect<ToolWorkLease | undefined, ToolCallStateError, Service>;
239
244
  export declare const releaseRemote: (input: ReleaseRemoteInput) => Effect.Effect<ToolCallRecord, ToolCallStateError, Service>;
240
245
  export declare const acceptRemoteOutcome: (input: AcceptRemoteOutcomeInput) => Effect.Effect<AcceptedOutcome, ToolCallStateError, Service>;
241
- export declare const listAttempts: (callId: string & import("effect/Brand").Brand<"Relay.ToolCallId">) => Effect.Effect<readonly ToolAttemptRecord[], ToolCallRepositoryError, Service>;
246
+ export declare const listAttempts: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">, callId: string & import("effect/Brand").Brand<"Relay.ToolCallId">) => Effect.Effect<readonly ToolAttemptRecord[], ToolCallRepositoryError, Service>;
242
247
  export declare const failOpenForExecution: (input: FailOpenForExecutionInput) => Effect.Effect<readonly ToolCallRecord[], ToolCallNotFound | ToolCallRepositoryError, Service>;
243
248
  export {};
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.3",
4
+ "version": "0.3.5",
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.1",
61
- "@batonfx/providers": "0.6.1",
60
+ "@batonfx/core": "0.6.2",
61
+ "@batonfx/providers": "0.6.2",
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",