@relayfx/sdk 0.3.4 → 0.3.6

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.
@@ -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.4",
4
+ "version": "0.3.6",
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",