@relayfx/test 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +5 -0
  2. package/dist/index.js +18190 -0
  3. package/dist/types/runtime/address/address-book-service.d.ts +74 -0
  4. package/dist/types/runtime/address/address-resolution-service.d.ts +140 -0
  5. package/dist/types/runtime/agent/agent-loop-service.d.ts +85 -0
  6. package/dist/types/runtime/agent/agent-registry-service.d.ts +31 -0
  7. package/dist/types/runtime/agent/prompt-assembler-service.d.ts +64 -0
  8. package/dist/types/runtime/agent/relay-approvals.d.ts +2 -0
  9. package/dist/types/runtime/agent/relay-compaction.d.ts +23 -0
  10. package/dist/types/runtime/agent/relay-instructions.d.ts +7 -0
  11. package/dist/types/runtime/agent/relay-permissions.d.ts +25 -0
  12. package/dist/types/runtime/agent/relay-steering.d.ts +17 -0
  13. package/dist/types/runtime/agent/relay-tool-executor.d.ts +22 -0
  14. package/dist/types/runtime/agent/relay-tool-output.d.ts +7 -0
  15. package/dist/types/runtime/agent/sequence-allocator.d.ts +8 -0
  16. package/dist/types/runtime/child/child-run-service.d.ts +90 -0
  17. package/dist/types/runtime/child/parent-notifier-service.d.ts +40 -0
  18. package/dist/types/runtime/child/spawn-child-run-tool.d.ts +211 -0
  19. package/dist/types/runtime/cluster/execution-entity.d.ts +37 -0
  20. package/dist/types/runtime/content/artifact-store-service.d.ts +26 -0
  21. package/dist/types/runtime/content/blob-store-service.d.ts +54 -0
  22. package/dist/types/runtime/entity/entity-instance-service.d.ts +67 -0
  23. package/dist/types/runtime/entity/entity-registry-service.d.ts +35 -0
  24. package/dist/types/runtime/envelope/envelope-service.d.ts +56 -0
  25. package/dist/types/runtime/execution/event-log-service.d.ts +68 -0
  26. package/dist/types/runtime/execution/execution-service.d.ts +65 -0
  27. package/dist/types/runtime/execution/execution-watch-service.d.ts +32 -0
  28. package/dist/types/runtime/execution/session-stream-service.d.ts +33 -0
  29. package/dist/types/runtime/inbox/inbox-service.d.ts +76 -0
  30. package/dist/types/runtime/inbox/send-message-tool.d.ts +27 -0
  31. package/dist/types/runtime/inbox/wait-for-messages-tool.d.ts +34 -0
  32. package/dist/types/runtime/index.d.ts +51 -0
  33. package/dist/types/runtime/memory/memory-service.d.ts +22 -0
  34. package/dist/types/runtime/model/embedding-model-service.d.ts +68 -0
  35. package/dist/types/runtime/model/language-model-service.d.ts +34 -0
  36. package/dist/types/runtime/model/model-call-policy.d.ts +14 -0
  37. package/dist/types/runtime/observability/runtime-metrics.d.ts +19 -0
  38. package/dist/types/runtime/presence/presence-service.d.ts +30 -0
  39. package/dist/types/runtime/presence/presence-tool.d.ts +20 -0
  40. package/dist/types/runtime/runner/runner-runtime-service.d.ts +149 -0
  41. package/dist/types/runtime/schedule/scheduler-service.d.ts +34 -0
  42. package/dist/types/runtime/schema-registry/schema-registry-service.d.ts +27 -0
  43. package/dist/types/runtime/session/session-store-service.d.ts +14 -0
  44. package/dist/types/runtime/skill/skill-registry-service.d.ts +44 -0
  45. package/dist/types/runtime/state/execution-state-service.d.ts +57 -0
  46. package/dist/types/runtime/state/state-tools.d.ts +5 -0
  47. package/dist/types/runtime/tool/tool-input-schema-digest.d.ts +6 -0
  48. package/dist/types/runtime/tool/tool-runtime-service.d.ts +139 -0
  49. package/dist/types/runtime/tool/tool-transition-coordinator.d.ts +13 -0
  50. package/dist/types/runtime/topic/publish-to-topic-tool.d.ts +24 -0
  51. package/dist/types/runtime/topic/topic-service.d.ts +50 -0
  52. package/dist/types/runtime/wait/wait-service.d.ts +81 -0
  53. package/dist/types/runtime/wait/wait-signal.d.ts +16 -0
  54. package/dist/types/runtime/workflow/activity-version-registry.d.ts +89 -0
  55. package/dist/types/runtime/workflow/execution-workflow.d.ts +475 -0
  56. package/dist/types/runtime/workspace/workspace-planner-service.d.ts +64 -0
  57. package/dist/types/runtime/workspace/workspace-provider-service.d.ts +108 -0
  58. package/dist/types/runtime/workspace/workspace-runtime-service.d.ts +21 -0
  59. package/dist/types/schema/address-schema.d.ts +77 -0
  60. package/dist/types/schema/agent-schema.d.ts +658 -0
  61. package/dist/types/schema/content-schema.d.ts +118 -0
  62. package/dist/types/schema/entity-schema.d.ts +40 -0
  63. package/dist/types/schema/envelope-schema.d.ts +180 -0
  64. package/dist/types/schema/execution-schema.d.ts +347 -0
  65. package/dist/types/schema/ids-schema.d.ts +94 -0
  66. package/dist/types/schema/inbox-schema.d.ts +81 -0
  67. package/dist/types/schema/index.d.ts +16 -0
  68. package/dist/types/schema/presence-schema.d.ts +28 -0
  69. package/dist/types/schema/schedule-schema.d.ts +79 -0
  70. package/dist/types/schema/shared-schema.d.ts +13 -0
  71. package/dist/types/schema/skill-schema.d.ts +260 -0
  72. package/dist/types/schema/state-schema.d.ts +35 -0
  73. package/dist/types/schema/tool-schema.d.ts +84 -0
  74. package/dist/types/schema/workspace-schema.d.ts +78 -0
  75. package/dist/types/test/captured-model.d.ts +13 -0
  76. package/dist/types/test/index.d.ts +6 -0
  77. package/dist/types/test/scripted-model.d.ts +39 -0
  78. package/dist/types/test/test-runtime.d.ts +9 -0
  79. package/dist/types/test/test-tools.d.ts +18 -0
  80. package/dist/types/test/wait-test-kit.d.ts +9 -0
  81. package/package.json +45 -0
@@ -0,0 +1,40 @@
1
+ import { Content, Ids } from "../../schema/index";
2
+ import { ChildExecutionRepository } from "@relayfx/store-sql/portable";
3
+ import { Context, Effect, Layer, Ref, Schema } from "effect";
4
+ import { Service as EventLogService } from "../execution/event-log-service";
5
+ import { Service as WaitServiceService } from "../wait/wait-service";
6
+ declare const ParentNotifyError_base: Schema.Class<ParentNotifyError, Schema.TaggedStruct<"ParentNotifyError", {
7
+ readonly message: Schema.String;
8
+ }>, import("effect/Cause").YieldableError>;
9
+ export declare class ParentNotifyError extends ParentNotifyError_base {
10
+ }
11
+ export declare const ChildTerminalStatus: Schema.Literals<readonly ["completed", "failed", "cancelled"]>;
12
+ export type ChildTerminalStatus = typeof ChildTerminalStatus.Type;
13
+ export interface NotifyInput {
14
+ readonly parentExecutionId: Ids.ExecutionId;
15
+ readonly childExecutionId: Ids.ChildExecutionId;
16
+ readonly parentWaitId?: Ids.WaitId;
17
+ readonly status: ChildTerminalStatus;
18
+ readonly output: ReadonlyArray<Content.Part>;
19
+ readonly notifiedAt: number;
20
+ }
21
+ export interface Interface {
22
+ readonly notify: (input: NotifyInput) => Effect.Effect<void, ParentNotifyError>;
23
+ }
24
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/ParentNotifier", Interface>;
25
+ export declare class Service extends Service_base {
26
+ }
27
+ export interface SignalParentWaitInput {
28
+ readonly executionId: Ids.ExecutionId;
29
+ readonly waitId: Ids.WaitId;
30
+ readonly signaledAt: number;
31
+ }
32
+ export interface MakeOptions {
33
+ readonly signalWait: (input: SignalParentWaitInput) => Effect.Effect<void, unknown>;
34
+ }
35
+ export declare const make: (options: MakeOptions) => Effect.Effect<Interface, never, ChildExecutionRepository.Service | EventLogService | WaitServiceService>;
36
+ export declare const layerWith: (options: MakeOptions) => Layer.Layer<Service, never, ChildExecutionRepository.Service | EventLogService | WaitServiceService>;
37
+ export declare const memoryLayer: (notifications?: Ref.Ref<ReadonlyArray<NotifyInput>>) => Layer.Layer<Service, never, never>;
38
+ export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
39
+ export declare const notify: (input: NotifyInput) => Effect.Effect<void, ParentNotifyError, Service>;
40
+ export {};
@@ -0,0 +1,211 @@
1
+ import { Agent, Content, Execution, Ids, Shared } from "../../schema/index";
2
+ import { Effect, Schema } from "effect";
3
+ import type { RegisteredTool } from "../tool/tool-runtime-service";
4
+ import type { Interface as EventLogInterface } from "../execution/event-log-service";
5
+ import type { Interface as WaitServiceInterface } from "../wait/wait-service";
6
+ import type { Interface as ChildRunServiceInterface } from "./child-run-service";
7
+ export declare const toolName = "spawn_child_run";
8
+ export declare const permissionName = "relay.child_run.spawn";
9
+ export declare const Input: Schema.Struct<{
10
+ readonly preset_name: Schema.optionalKey<Schema.String>;
11
+ readonly instructions: Schema.optionalKey<Schema.String>;
12
+ readonly model: Schema.optionalKey<Schema.Struct<{
13
+ readonly provider: Schema.String;
14
+ readonly model: Schema.String;
15
+ readonly registration_key: Schema.optionalKey<Schema.String>;
16
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
17
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
18
+ }>>;
19
+ readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
20
+ readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
21
+ readonly output_schema_ref: Schema.optionalKey<Schema.String>;
22
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
23
+ readonly input: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
24
+ readonly type: Schema.Literal<"text">;
25
+ readonly text: Schema.String;
26
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
27
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
28
+ }>, Schema.Struct<{
29
+ readonly type: Schema.Literal<"structured">;
30
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
31
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
32
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
33
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
34
+ }>, Schema.Struct<{
35
+ readonly type: Schema.Literal<"blob-reference">;
36
+ readonly uri: Schema.String;
37
+ readonly media_type: Schema.String;
38
+ readonly filename: Schema.optionalKey<Schema.String>;
39
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
40
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
41
+ }>, Schema.Struct<{
42
+ readonly type: Schema.Literal<"artifact-reference">;
43
+ readonly artifact_id: Schema.String;
44
+ readonly media_type: Schema.optionalKey<Schema.String>;
45
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
46
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
47
+ }>, Schema.Struct<{
48
+ readonly type: Schema.Literal<"tool-call">;
49
+ readonly call: Schema.Struct<{
50
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
51
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
52
+ };
53
+ readonly name: Schema.String;
54
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
55
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
56
+ }>;
57
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
58
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
59
+ }>, Schema.Struct<{
60
+ readonly type: Schema.Literal<"tool-result">;
61
+ readonly result: Schema.Struct<{
62
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
63
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
64
+ };
65
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
66
+ readonly error: Schema.optionalKey<Schema.String>;
67
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
68
+ }>;
69
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
70
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
71
+ }>]>>>;
72
+ }>;
73
+ export interface Input extends Schema.Schema.Type<typeof Input> {
74
+ }
75
+ export declare const Output: Schema.Struct<{
76
+ readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
77
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
78
+ };
79
+ readonly status: Schema.Literals<readonly ["completed", "failed", "cancelled"]>;
80
+ readonly output: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
81
+ readonly type: Schema.Literal<"text">;
82
+ readonly text: Schema.String;
83
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
84
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
85
+ }>, Schema.Struct<{
86
+ readonly type: Schema.Literal<"structured">;
87
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
88
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
89
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
90
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
91
+ }>, Schema.Struct<{
92
+ readonly type: Schema.Literal<"blob-reference">;
93
+ readonly uri: Schema.String;
94
+ readonly media_type: Schema.String;
95
+ readonly filename: Schema.optionalKey<Schema.String>;
96
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
97
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
98
+ }>, Schema.Struct<{
99
+ readonly type: Schema.Literal<"artifact-reference">;
100
+ readonly artifact_id: Schema.String;
101
+ readonly media_type: Schema.optionalKey<Schema.String>;
102
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
103
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
104
+ }>, Schema.Struct<{
105
+ readonly type: Schema.Literal<"tool-call">;
106
+ readonly call: Schema.Struct<{
107
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
108
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
109
+ };
110
+ readonly name: Schema.String;
111
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
112
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
113
+ }>;
114
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
115
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
116
+ }>, Schema.Struct<{
117
+ readonly type: Schema.Literal<"tool-result">;
118
+ readonly result: Schema.Struct<{
119
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
120
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
121
+ };
122
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
123
+ readonly error: Schema.optionalKey<Schema.String>;
124
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
125
+ }>;
126
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
127
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
128
+ }>]>>;
129
+ }>;
130
+ export interface Output extends Schema.Schema.Type<typeof Output> {
131
+ }
132
+ export declare const TransferInput: Schema.Struct<{
133
+ readonly input: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
134
+ readonly type: Schema.Literal<"text">;
135
+ readonly text: Schema.String;
136
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
137
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
138
+ }>, Schema.Struct<{
139
+ readonly type: Schema.Literal<"structured">;
140
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
141
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
142
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
143
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
144
+ }>, Schema.Struct<{
145
+ readonly type: Schema.Literal<"blob-reference">;
146
+ readonly uri: Schema.String;
147
+ readonly media_type: Schema.String;
148
+ readonly filename: Schema.optionalKey<Schema.String>;
149
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
150
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
151
+ }>, Schema.Struct<{
152
+ readonly type: Schema.Literal<"artifact-reference">;
153
+ readonly artifact_id: Schema.String;
154
+ readonly media_type: Schema.optionalKey<Schema.String>;
155
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
156
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
157
+ }>, Schema.Struct<{
158
+ readonly type: Schema.Literal<"tool-call">;
159
+ readonly call: Schema.Struct<{
160
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
161
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
162
+ };
163
+ readonly name: Schema.String;
164
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
165
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
166
+ }>;
167
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
168
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
169
+ }>, Schema.Struct<{
170
+ readonly type: Schema.Literal<"tool-result">;
171
+ readonly result: Schema.Struct<{
172
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
173
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
174
+ };
175
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
176
+ readonly error: Schema.optionalKey<Schema.String>;
177
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
178
+ }>;
179
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
180
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
181
+ }>]>>>;
182
+ }>;
183
+ export interface TransferInput extends Schema.Schema.Type<typeof TransferInput> {
184
+ }
185
+ export interface DispatchInput {
186
+ readonly executionId: Ids.ExecutionId;
187
+ readonly rootAddressId: Ids.AddressId;
188
+ readonly input: ReadonlyArray<Content.Part>;
189
+ readonly eventSequence: Execution.ExecutionEventSequence;
190
+ readonly startedAt: number;
191
+ readonly completedAt: number;
192
+ readonly agentId: Ids.AgentId;
193
+ readonly agentRevision: Agent.DefinitionRevision;
194
+ readonly agentSnapshot: Agent.Definition;
195
+ readonly agentToolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
196
+ readonly metadata: Shared.Metadata;
197
+ }
198
+ export interface Config {
199
+ readonly agent: Agent.Definition;
200
+ readonly agentId: Ids.AgentId;
201
+ readonly agentRevision: Agent.DefinitionRevision;
202
+ readonly agentToolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
203
+ readonly childRuns: ChildRunServiceInterface;
204
+ readonly eventLog: EventLogInterface;
205
+ readonly waits: WaitServiceInterface;
206
+ readonly dispatch: (input: DispatchInput) => Effect.Effect<void, unknown, any>;
207
+ }
208
+ export declare const enabled: (agent: Agent.Definition) => boolean;
209
+ export declare const registeredTool: (config: Config) => RegisteredTool;
210
+ export declare const transferToolName: (name: string) => string;
211
+ export declare const transferTools: (config: Config) => ReadonlyArray<RegisteredTool>;
@@ -0,0 +1,37 @@
1
+ import type { ChildExecutionRepository, EnvelopeRepository, ExecutionRepository, ToolCallRepository } from "@relayfx/store-sql/portable";
2
+ import { Entity } from "effect/unstable/cluster";
3
+ import { Rpc } from "effect/unstable/rpc";
4
+ import type { WorkflowEngine } from "effect/unstable/workflow";
5
+ import { Schema } from "effect";
6
+ import type { Effect } from "effect";
7
+ import { ExecutionWorkflowFailed, StartInput, StartResult } from "../workflow/execution-workflow";
8
+ import type { Service as EventLogService } from "../execution/event-log-service";
9
+ import type { Service as WaitServiceService } from "../wait/wait-service";
10
+ import type { Service as ToolTransitionCoordinatorService } from "../tool/tool-transition-coordinator";
11
+ export declare const Start: Rpc.Rpc<"start", typeof StartInput, typeof StartResult, typeof ExecutionWorkflowFailed>;
12
+ export declare const SignalWait: Rpc.Rpc<"signalWait", Schema.Struct<{
13
+ readonly workflow_execution_id: Schema.String;
14
+ readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
15
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
16
+ };
17
+ readonly state: Schema.Literals<readonly ["resolved", "timed_out", "cancelled"]>;
18
+ readonly signaled_at: Schema.Int;
19
+ }>, Schema.Void, typeof ExecutionWorkflowFailed, never, never>;
20
+ export declare const Dispatch: Rpc.Rpc<"dispatch", typeof StartInput, typeof Schema.Void, typeof ExecutionWorkflowFailed>;
21
+ export declare const Cancel: Rpc.Rpc<"cancel", Schema.Struct<{
22
+ readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
23
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
24
+ };
25
+ readonly cancelled_at: Schema.Int;
26
+ readonly reason: Schema.optionalKey<Schema.String>;
27
+ }>, Schema.Struct<{
28
+ readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
29
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
30
+ };
31
+ readonly status: Schema.Literals<readonly ["queued", "running", "waiting", "completed", "failed", "cancelled"]>;
32
+ }>, typeof ExecutionWorkflowFailed, never, never>;
33
+ type ExecutionRpc = typeof Start | typeof Dispatch | typeof SignalWait | typeof Cancel;
34
+ export declare const entity: Entity.Entity<"Relay/Execution", ExecutionRpc>;
35
+ export declare const layer: import("effect/Layer").Layer<never, never, ChildExecutionRepository.Service | EnvelopeRepository.Service | ExecutionRepository.Service | ToolCallRepository.Service | EventLogService | WaitServiceService | ToolTransitionCoordinatorService | WorkflowEngine.WorkflowEngine | import("effect/unstable/cluster/Sharding").Sharding>;
36
+ export declare const client: Effect.Effect<(entityId: string) => import("effect/unstable/rpc/RpcClient").RpcClient.From<ExecutionRpc, import("effect/unstable/cluster/ClusterError").MailboxFull | import("effect/unstable/cluster/ClusterError").AlreadyProcessingMessage | import("effect/unstable/cluster/ClusterError").PersistenceError>, never, import("effect/unstable/cluster/Sharding").Sharding>;
37
+ export {};
@@ -0,0 +1,26 @@
1
+ import { Content } from "../../schema/index";
2
+ import { Context, Effect, Layer, Schema } from "effect";
3
+ declare const ArtifactNotResolvable_base: Schema.Class<ArtifactNotResolvable, Schema.TaggedStruct<"ArtifactNotResolvable", {
4
+ readonly artifact_id: Schema.String;
5
+ readonly reason: Schema.String;
6
+ }>, import("effect/Cause").YieldableError>;
7
+ export declare class ArtifactNotResolvable extends ArtifactNotResolvable_base {
8
+ }
9
+ export interface Interface {
10
+ readonly resolve: (part: Content.ArtifactReferencePart) => Effect.Effect<ReadonlyArray<Content.Part>, ArtifactNotResolvable>;
11
+ }
12
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/ArtifactStore", Interface>;
13
+ export declare class Service extends Service_base {
14
+ }
15
+ export declare const passthroughLayer: Layer.Layer<Service>;
16
+ export interface MemoryInterface extends Interface {
17
+ readonly register: (artifact_id: string, parts: ReadonlyArray<Content.Part>) => Effect.Effect<void>;
18
+ }
19
+ declare const Memory_base: Context.ServiceClass<Memory, "@relayfx/runtime/ArtifactStore/Memory", MemoryInterface>;
20
+ export declare class Memory extends Memory_base {
21
+ }
22
+ export declare const memoryLayer: Layer.Layer<Service | Memory>;
23
+ export declare const testLayer: (implementation: Interface) => Layer.Layer<Service>;
24
+ export declare const resolve: (part: Content.ArtifactReferencePart) => Effect.Effect<readonly Content.Part[], ArtifactNotResolvable, Service>;
25
+ export declare const register: (artifact_id: string, parts: readonly Content.Part[]) => Effect.Effect<void, never, Memory>;
26
+ export {};
@@ -0,0 +1,54 @@
1
+ import { Content, Shared } from "../../schema/index";
2
+ import { Context, Effect, Layer, Schema } from "effect";
3
+ declare const BlobNotResolvable_base: Schema.Class<BlobNotResolvable, Schema.TaggedStruct<"BlobNotResolvable", {
4
+ readonly uri: Schema.String;
5
+ readonly reason: Schema.String;
6
+ }>, import("effect/Cause").YieldableError>;
7
+ export declare class BlobNotResolvable extends BlobNotResolvable_base {
8
+ }
9
+ declare const BlobStoreError_base: Schema.Class<BlobStoreError, Schema.TaggedStruct<"BlobStoreError", {
10
+ readonly message: Schema.String;
11
+ }>, import("effect/Cause").YieldableError>;
12
+ export declare class BlobStoreError extends BlobStoreError_base {
13
+ }
14
+ export type ResolvedBlob = {
15
+ readonly _tag: "Bytes";
16
+ readonly bytes: Uint8Array;
17
+ readonly mediaType: string;
18
+ readonly fileName?: string;
19
+ } | {
20
+ readonly _tag: "Url";
21
+ readonly url: string;
22
+ readonly mediaType: string;
23
+ readonly fileName?: string;
24
+ };
25
+ export interface PutBlobInput {
26
+ readonly bytes: Uint8Array;
27
+ readonly mediaType: string;
28
+ readonly fileName?: string;
29
+ readonly metadata?: Shared.Metadata;
30
+ }
31
+ export interface Interface {
32
+ readonly resolve: (part: Content.BlobReferencePart) => Effect.Effect<ResolvedBlob, BlobNotResolvable | BlobStoreError>;
33
+ readonly put: (input: PutBlobInput) => Effect.Effect<Content.BlobReferencePart, BlobStoreError>;
34
+ }
35
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/BlobStore", Interface>;
36
+ export declare class Service extends Service_base {
37
+ }
38
+ export declare const passthroughLayer: Layer.Layer<Service>;
39
+ export declare const memoryLayer: Layer.Layer<Service>;
40
+ /**
41
+ * Wraps a custom store implementation as a layer.
42
+ *
43
+ * @experimental
44
+ */
45
+ export declare const testLayer: (implementation: Interface) => Layer.Layer<Service>;
46
+ /**
47
+ * @experimental
48
+ */
49
+ export declare const resolve: (part: Content.BlobReferencePart) => Effect.Effect<ResolvedBlob, BlobNotResolvable | BlobStoreError, Service>;
50
+ /**
51
+ * @experimental
52
+ */
53
+ export declare const put: (input: PutBlobInput) => Effect.Effect<Content.BlobReferencePart, BlobStoreError, Service>;
54
+ export {};
@@ -0,0 +1,67 @@
1
+ import { Content, Entity, Ids, Shared } from "../../schema/index";
2
+ import { EntityRepository } from "@relayfx/store-sql/portable";
3
+ import { Context, Effect, Layer, Schema } from "effect";
4
+ import { Service as AddressBookService } from "../address/address-book-service";
5
+ import { Service as AgentRegistryService } from "../agent/agent-registry-service";
6
+ import { Service as EventLogService } from "../execution/event-log-service";
7
+ import { EntityKindInvalid, EntityKindNotFound, Service as EntityRegistryService } from "./entity-registry-service";
8
+ declare const EntityDestroyed_base: Schema.Class<EntityDestroyed, Schema.TaggedStruct<"EntityDestroyed", {
9
+ readonly kind: Schema.brand<Schema.String, "Relay.EntityKindName"> & {
10
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EntityKindName">;
11
+ };
12
+ readonly key: Schema.brand<Schema.String, "Relay.EntityKey"> & {
13
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EntityKey">;
14
+ };
15
+ }>, import("effect/Cause").YieldableError>;
16
+ export declare class EntityDestroyed extends EntityDestroyed_base {
17
+ }
18
+ declare const EntityNotFound_base: Schema.Class<EntityNotFound, Schema.TaggedStruct<"EntityNotFound", {
19
+ readonly kind: Schema.brand<Schema.String, "Relay.EntityKindName"> & {
20
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EntityKindName">;
21
+ };
22
+ readonly key: Schema.brand<Schema.String, "Relay.EntityKey"> & {
23
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EntityKey">;
24
+ };
25
+ }>, import("effect/Cause").YieldableError>;
26
+ export declare class EntityNotFound extends EntityNotFound_base {
27
+ }
28
+ declare const EntityServiceError_base: Schema.Class<EntityServiceError, Schema.TaggedStruct<"EntityServiceError", {
29
+ readonly message: Schema.String;
30
+ }>, import("effect/Cause").YieldableError>;
31
+ export declare class EntityServiceError extends EntityServiceError_base {
32
+ }
33
+ export interface GetOrCreateInput {
34
+ readonly kind: Ids.EntityKindName;
35
+ readonly key: Ids.EntityKey;
36
+ readonly input?: ReadonlyArray<Content.Part>;
37
+ readonly metadata?: Shared.Metadata;
38
+ readonly createdAt: number;
39
+ }
40
+ export interface Interface {
41
+ readonly getOrCreate: (input: GetOrCreateInput) => Effect.Effect<Entity.Instance, EntityKindNotFound | EntityKindInvalid | EntityServiceError>;
42
+ readonly get: (input: {
43
+ readonly kind: Ids.EntityKindName;
44
+ readonly key: Ids.EntityKey;
45
+ }) => Effect.Effect<Entity.Instance | undefined, EntityServiceError>;
46
+ readonly destroy: (input: {
47
+ readonly kind: Ids.EntityKindName;
48
+ readonly key: Ids.EntityKey;
49
+ readonly reason?: string;
50
+ readonly destroyedAt: number;
51
+ }) => Effect.Effect<Entity.Instance, EntityNotFound | EntityDestroyed | EntityServiceError>;
52
+ readonly list: (input: {
53
+ readonly kind?: Ids.EntityKindName;
54
+ readonly afterKind?: Ids.EntityKindName;
55
+ readonly afterKey?: string;
56
+ readonly limit?: number;
57
+ }) => Effect.Effect<ReadonlyArray<Entity.Instance>, EntityServiceError>;
58
+ }
59
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/EntityInstanceService", Interface>;
60
+ export declare class Service extends Service_base {
61
+ }
62
+ export declare const entityExecutionId: (tenant: Ids.TenantId, kind: Ids.EntityKindName, key: Ids.EntityKey, generation: number) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
63
+ export declare const entityAddressId: (tenant: Ids.TenantId, kind: Ids.EntityKindName, key: Ids.EntityKey) => string & import("effect/Brand").Brand<"Relay.AddressId">;
64
+ export declare const entitySessionId: (tenant: Ids.TenantId, kind: Ids.EntityKindName, key: Ids.EntityKey) => string & import("effect/Brand").Brand<"Relay.SessionId">;
65
+ export declare const layer: Layer.Layer<Service, never, EntityRepository.Service | AddressBookService | EventLogService | AgentRegistryService | import("effect/unstable/cluster/Sharding").Sharding | EntityRegistryService>;
66
+ export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
67
+ export {};
@@ -0,0 +1,35 @@
1
+ import { Entity, Ids } from "../../schema/index";
2
+ import { EntityRepository } from "@relayfx/store-sql/portable";
3
+ import { Context, Effect, Layer, Schema } from "effect";
4
+ import { Service as AgentRegistryService } from "../agent/agent-registry-service";
5
+ declare const EntityKindNotFound_base: Schema.Class<EntityKindNotFound, Schema.TaggedStruct<"EntityKindNotFound", {
6
+ readonly kind: Schema.brand<Schema.String, "Relay.EntityKindName"> & {
7
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EntityKindName">;
8
+ };
9
+ }>, import("effect/Cause").YieldableError>;
10
+ export declare class EntityKindNotFound extends EntityKindNotFound_base {
11
+ }
12
+ declare const EntityKindInvalid_base: Schema.Class<EntityKindInvalid, Schema.TaggedStruct<"EntityKindInvalid", {
13
+ readonly kind: Schema.brand<Schema.String, "Relay.EntityKindName"> & {
14
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EntityKindName">;
15
+ };
16
+ readonly message: Schema.String;
17
+ }>, import("effect/Cause").YieldableError>;
18
+ export declare class EntityKindInvalid extends EntityKindInvalid_base {
19
+ }
20
+ declare const EntityRegistryError_base: Schema.Class<EntityRegistryError, Schema.TaggedStruct<"EntityRegistryError", {
21
+ readonly message: Schema.String;
22
+ }>, import("effect/Cause").YieldableError>;
23
+ export declare class EntityRegistryError extends EntityRegistryError_base {
24
+ }
25
+ export interface Interface {
26
+ readonly registerKind: (input: Entity.KindDefinition) => Effect.Effect<Entity.KindDefinition, EntityKindInvalid | EntityRegistryError>;
27
+ readonly getKind: (kind: Ids.EntityKindName) => Effect.Effect<Entity.KindDefinition | undefined, EntityRegistryError>;
28
+ readonly listKinds: () => Effect.Effect<ReadonlyArray<Entity.KindDefinition>, EntityRegistryError>;
29
+ }
30
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/EntityRegistry", Interface>;
31
+ export declare class Service extends Service_base {
32
+ }
33
+ export declare const layer: Layer.Layer<Service, never, EntityRepository.Service | AgentRegistryService>;
34
+ export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
35
+ export {};
@@ -0,0 +1,56 @@
1
+ import { Envelope, Execution, Ids } from "../../schema/index";
2
+ import { EnvelopeRepository } from "@relayfx/store-sql/portable";
3
+ import { Context, Effect, Layer, Schema } from "effect";
4
+ import { Route, Service as AddressBookService } from "../address/address-book-service";
5
+ import { Service as EventLogService } from "../execution/event-log-service";
6
+ declare const EnvelopeAddressNotFound_base: Schema.Class<EnvelopeAddressNotFound, Schema.TaggedStruct<"EnvelopeAddressNotFound", {
7
+ readonly address_id: Schema.brand<Schema.String, "Relay.AddressId"> & {
8
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
9
+ };
10
+ }>, import("effect/Cause").YieldableError>;
11
+ export declare class EnvelopeAddressNotFound extends EnvelopeAddressNotFound_base {
12
+ }
13
+ declare const EnvelopeRouteUnavailable_base: Schema.Class<EnvelopeRouteUnavailable, Schema.TaggedStruct<"EnvelopeRouteUnavailable", {
14
+ readonly address_id: Schema.brand<Schema.String, "Relay.AddressId"> & {
15
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
16
+ };
17
+ readonly route_key: Schema.String;
18
+ }>, import("effect/Cause").YieldableError>;
19
+ export declare class EnvelopeRouteUnavailable extends EnvelopeRouteUnavailable_base {
20
+ }
21
+ declare const EnvelopeRouteDeferred_base: Schema.Class<EnvelopeRouteDeferred, Schema.TaggedStruct<"EnvelopeRouteDeferred", {
22
+ readonly address_id: Schema.brand<Schema.String, "Relay.AddressId"> & {
23
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
24
+ };
25
+ readonly route_key: Schema.String;
26
+ }>, import("effect/Cause").YieldableError>;
27
+ export declare class EnvelopeRouteDeferred extends EnvelopeRouteDeferred_base {
28
+ }
29
+ declare const EnvelopeServiceError_base: Schema.Class<EnvelopeServiceError, Schema.TaggedStruct<"EnvelopeServiceError", {
30
+ readonly message: Schema.String;
31
+ }>, import("effect/Cause").YieldableError>;
32
+ export declare class EnvelopeServiceError extends EnvelopeServiceError_base {
33
+ }
34
+ export interface SendInput {
35
+ readonly envelopeId: Ids.EnvelopeId;
36
+ readonly executionId: Ids.ExecutionId;
37
+ readonly input: Envelope.SendInput;
38
+ readonly eventSequence: Execution.ExecutionEventSequence;
39
+ readonly createdAt: number;
40
+ readonly waitId?: Ids.WaitId;
41
+ }
42
+ export interface Interface {
43
+ readonly send: (input: SendInput) => Effect.Effect<Envelope.EnvelopeAccepted & {
44
+ readonly route_kind?: Route["kind"];
45
+ }, EnvelopeAddressNotFound | EnvelopeRouteUnavailable | EnvelopeRouteDeferred | EnvelopeServiceError>;
46
+ }
47
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/EnvelopeService", Interface>;
48
+ export declare class Service extends Service_base {
49
+ }
50
+ export declare const layer: Layer.Layer<Service, never, EnvelopeRepository.Service | AddressBookService | EventLogService>;
51
+ export declare const memoryLayer: (routes?: Iterable<readonly [Ids.AddressId, Route]>) => Layer.Layer<Service, never, never>;
52
+ export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
53
+ export declare const send: (input: SendInput) => Effect.Effect<Envelope.EnvelopeAccepted & {
54
+ readonly route_kind?: Route["kind"];
55
+ }, EnvelopeAddressNotFound | EnvelopeRouteUnavailable | EnvelopeRouteDeferred | EnvelopeServiceError, Service>;
56
+ export {};
@@ -0,0 +1,68 @@
1
+ import { Execution, Ids } from "../../schema/index";
2
+ import { ExecutionEventRepository } from "@relayfx/store-sql/portable";
3
+ import { Context, Effect, Layer, Option, Schema, Stream } from "effect";
4
+ declare const EventLogCursorNotFound_base: Schema.Class<EventLogCursorNotFound, Schema.TaggedStruct<"EventLogCursorNotFound", {
5
+ readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
6
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
7
+ };
8
+ readonly cursor: Schema.String;
9
+ }>, import("effect/Cause").YieldableError>;
10
+ export declare class EventLogCursorNotFound extends EventLogCursorNotFound_base {
11
+ }
12
+ declare const EventLogError_base: Schema.Class<EventLogError, Schema.TaggedStruct<"EventLogError", {
13
+ readonly message: Schema.String;
14
+ }>, import("effect/Cause").YieldableError>;
15
+ export declare class EventLogError extends EventLogError_base {
16
+ }
17
+ export interface ReplayInput {
18
+ readonly executionId: Ids.ExecutionId;
19
+ readonly afterCursor?: string;
20
+ readonly limit?: number;
21
+ }
22
+ export interface FindBySequenceOrCursorInput {
23
+ readonly executionId: Ids.ExecutionId;
24
+ readonly sequence: Execution.ExecutionEventSequence;
25
+ readonly cursor: string;
26
+ }
27
+ export interface FindByCursorInput {
28
+ readonly executionId: Ids.ExecutionId;
29
+ readonly cursor: string;
30
+ }
31
+ export interface FindBySequenceInput {
32
+ readonly executionId: Ids.ExecutionId;
33
+ readonly sequence: Execution.ExecutionEventSequence;
34
+ }
35
+ export interface FindFirstByTypeAfterSequenceInput {
36
+ readonly executionId: Ids.ExecutionId;
37
+ readonly type: Execution.ExecutionEventType;
38
+ readonly afterSequence: Execution.ExecutionEventSequence;
39
+ }
40
+ export interface Interface {
41
+ readonly append: (input: Execution.ExecutionEvent) => Effect.Effect<Execution.ExecutionEvent, EventLogError>;
42
+ readonly replay: (input: ReplayInput) => Effect.Effect<ReadonlyArray<Execution.ExecutionEvent>, EventLogCursorNotFound | EventLogError>;
43
+ readonly stream: (input: ReplayInput) => Stream.Stream<Execution.ExecutionEvent, EventLogCursorNotFound | EventLogError>;
44
+ readonly findBySequenceOrCursor: (input: FindBySequenceOrCursorInput) => Effect.Effect<Option.Option<Execution.ExecutionEvent>, EventLogError>;
45
+ readonly findByCursor: (input: FindByCursorInput) => Effect.Effect<Option.Option<Execution.ExecutionEvent>, EventLogError>;
46
+ readonly findBySequence: (input: FindBySequenceInput) => Effect.Effect<Option.Option<Execution.ExecutionEvent>, EventLogError>;
47
+ readonly findFirstByTypeAfterSequence: (input: FindFirstByTypeAfterSequenceInput) => Effect.Effect<Option.Option<Execution.ExecutionEvent>, EventLogError>;
48
+ readonly maxSequence: (executionId: Ids.ExecutionId) => Effect.Effect<Execution.ExecutionEventSequence | undefined, EventLogError>;
49
+ readonly sumUsage: (executionId: Ids.ExecutionId) => Effect.Effect<number, EventLogError>;
50
+ }
51
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/EventLog", Interface>;
52
+ export declare class Service extends Service_base {
53
+ }
54
+ export declare const layerFromRepository: Layer.Layer<Service, never, ExecutionEventRepository.Service>;
55
+ export declare const memoryLayer: Layer.Layer<Service, never, never>;
56
+ export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
57
+ export declare const appendIdempotentTo: (eventLog: Interface, input: Execution.ExecutionEvent) => Effect.Effect<Execution.ExecutionEvent, EventLogError, never>;
58
+ export declare const append: (input: Execution.ExecutionEvent) => Effect.Effect<Execution.ExecutionEvent, EventLogError, Service>;
59
+ export declare const appendIdempotent: (input: Execution.ExecutionEvent) => Effect.Effect<Execution.ExecutionEvent, EventLogError, Service>;
60
+ export declare const replay: (input: ReplayInput) => Effect.Effect<readonly Execution.ExecutionEvent[], EventLogCursorNotFound | EventLogError, Service>;
61
+ export declare const findBySequenceOrCursor: (input: FindBySequenceOrCursorInput) => Effect.Effect<Option.Option<Execution.ExecutionEvent>, EventLogError, Service>;
62
+ export declare const findByCursor: (input: FindByCursorInput) => Effect.Effect<Option.Option<Execution.ExecutionEvent>, EventLogError, Service>;
63
+ export declare const findBySequence: (input: FindBySequenceInput) => Effect.Effect<Option.Option<Execution.ExecutionEvent>, EventLogError, Service>;
64
+ export declare const findFirstByTypeAfterSequence: (input: FindFirstByTypeAfterSequenceInput) => Effect.Effect<Option.Option<Execution.ExecutionEvent>, EventLogError, Service>;
65
+ export declare const maxSequence: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<number | undefined, EventLogError, Service>;
66
+ export declare const sumUsage: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<number, EventLogError, Service>;
67
+ export declare const stream: (input: ReplayInput) => Stream.Stream<Execution.ExecutionEvent, EventLogCursorNotFound | EventLogError, Service>;
68
+ export {};