@relayfx/sdk 0.1.0 → 0.2.1

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 (47) hide show
  1. package/dist/ai.js +2 -2
  2. package/dist/{index-vbf5hcw8.js → index-9tx9fh58.js} +320 -33
  3. package/dist/{index-sms8x6cq.js → index-bke4jyr6.js} +1 -1
  4. package/dist/{index-q0z11q9m.js → index-jy6rpstp.js} +5711 -3835
  5. package/dist/index.js +92 -3
  6. package/dist/migrations/20260712180000_child_fan_out/migration.sql +27 -0
  7. package/dist/migrations/20260712190000_workflow_definitions/migration.sql +3 -0
  8. package/dist/migrations/20260712200000_workflow_runtime/migration.sql +2 -0
  9. package/dist/migrations/mysql/0008_child_fan_out.sql +26 -0
  10. package/dist/migrations/mysql/0009_workflow_definitions.sql +3 -0
  11. package/dist/migrations/mysql/0010_workflow_runtime.sql +3 -0
  12. package/dist/migrations/pg/20260712180000_child_fan_out/migration.sql +27 -0
  13. package/dist/migrations/pg/20260712190000_workflow_definitions/migration.sql +3 -0
  14. package/dist/migrations/pg/20260712200000_workflow_runtime/migration.sql +2 -0
  15. package/dist/migrations/sqlite/0008_child_fan_out.sql +27 -0
  16. package/dist/migrations/sqlite/0009_workflow_definitions.sql +3 -0
  17. package/dist/migrations/sqlite/0010_workflow_runtime.sql +3 -0
  18. package/dist/sqlite.js +60 -11
  19. package/dist/types/relay/adapter-outbox.d.ts +3 -3
  20. package/dist/types/relay/client.d.ts +147 -17
  21. package/dist/types/relay/index.d.ts +2 -2
  22. package/dist/types/relay/operation.d.ts +559 -2
  23. package/dist/types/relay/sqlite-migrations.d.ts +16 -1
  24. package/dist/types/relay/sqlite-runtime.d.ts +8 -3
  25. package/dist/types/relay/sqlite.d.ts +3 -1
  26. package/dist/types/runtime/child/child-fan-out-admission-service.d.ts +30 -0
  27. package/dist/types/runtime/child/child-fan-out-runtime.d.ts +34 -0
  28. package/dist/types/runtime/child/child-fan-out-transition-service.d.ts +25 -0
  29. package/dist/types/runtime/cluster/execution-entity.d.ts +4 -2
  30. package/dist/types/runtime/execution/active-execution-registry.d.ts +12 -0
  31. package/dist/types/runtime/execution/execution-service.d.ts +1 -0
  32. package/dist/types/runtime/index.d.ts +5 -0
  33. package/dist/types/runtime/runner/runner-runtime-service.d.ts +14 -14
  34. package/dist/types/runtime/workflow/definition-runtime.d.ts +78 -0
  35. package/dist/types/runtime/workflow/execution-workflow.d.ts +5 -5
  36. package/dist/types/schema/child-orchestration-schema.d.ts +393 -0
  37. package/dist/types/schema/execution-schema.d.ts +2 -2
  38. package/dist/types/schema/ids-schema.d.ts +12 -0
  39. package/dist/types/schema/index.d.ts +3 -0
  40. package/dist/types/schema/wait-schema.d.ts +98 -0
  41. package/dist/types/schema/workflow-schema.d.ts +2062 -0
  42. package/dist/types/store-sql/child/child-fan-out-repository.d.ts +53 -0
  43. package/dist/types/store-sql/index.d.ts +2 -0
  44. package/dist/types/store-sql/portable.d.ts +2 -0
  45. package/dist/types/store-sql/schema/relay-schema.d.ts +1266 -1
  46. package/dist/types/store-sql/workflow/workflow-definition-repository.d.ts +29 -0
  47. package/package.json +1 -1
@@ -0,0 +1,393 @@
1
+ import { Schema } from "effect";
2
+ export declare const JoinPolicy: Schema.Union<readonly [Schema.TaggedStruct<"all", {}>, Schema.TaggedStruct<"first-success", {}>, Schema.TaggedStruct<"quorum", {
3
+ readonly count: Schema.Int;
4
+ }>, Schema.TaggedStruct<"best-effort", {}>]>;
5
+ export type JoinPolicy = typeof JoinPolicy.Type;
6
+ export declare const FanOutChild: Schema.Struct<{
7
+ readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
8
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
9
+ };
10
+ readonly address_id: Schema.brand<Schema.String, "Relay.AddressId"> & {
11
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
12
+ };
13
+ readonly override: Schema.optionalKey<Schema.Struct<{
14
+ readonly instructions: Schema.optionalKey<Schema.String>;
15
+ readonly model: Schema.optionalKey<Schema.Struct<{
16
+ readonly provider: Schema.String;
17
+ readonly model: Schema.String;
18
+ readonly registration_key: Schema.optionalKey<Schema.String>;
19
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
20
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
21
+ }>>;
22
+ readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
23
+ readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
24
+ readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
25
+ readonly mode: Schema.Literals<readonly ["share", "fork"]>;
26
+ readonly fallback: Schema.optionalKey<Schema.Literals<readonly ["fail", "fresh"]>>;
27
+ }>>;
28
+ readonly output_schema_ref: Schema.optionalKey<Schema.String>;
29
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
30
+ }>>;
31
+ readonly input: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
32
+ readonly type: Schema.Literal<"text">;
33
+ readonly text: Schema.String;
34
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
35
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
36
+ }>, Schema.Struct<{
37
+ readonly type: Schema.Literal<"structured">;
38
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
39
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
40
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
41
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
42
+ }>, Schema.Struct<{
43
+ readonly type: Schema.Literal<"blob-reference">;
44
+ readonly uri: Schema.String;
45
+ readonly media_type: Schema.String;
46
+ readonly filename: Schema.optionalKey<Schema.String>;
47
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
48
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
49
+ }>, Schema.Struct<{
50
+ readonly type: Schema.Literal<"artifact-reference">;
51
+ readonly artifact_id: Schema.String;
52
+ readonly media_type: Schema.optionalKey<Schema.String>;
53
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
54
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
55
+ }>, Schema.Struct<{
56
+ readonly type: Schema.Literal<"tool-call">;
57
+ readonly call: Schema.Struct<{
58
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
59
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
60
+ };
61
+ readonly name: Schema.String;
62
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
63
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
64
+ }>;
65
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
66
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
67
+ }>, Schema.Struct<{
68
+ readonly type: Schema.Literal<"tool-result">;
69
+ readonly result: Schema.Struct<{
70
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
71
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
72
+ };
73
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
74
+ readonly error: Schema.optionalKey<Schema.String>;
75
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
76
+ }>;
77
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
78
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
79
+ }>]>>>;
80
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
81
+ }>;
82
+ export interface FanOutChild extends Schema.Schema.Type<typeof FanOutChild> {
83
+ }
84
+ export declare const FanOutDefinition: Schema.Struct<{
85
+ readonly fan_out_id: Schema.brand<Schema.String, "Relay.ChildFanOutId"> & {
86
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildFanOutId">;
87
+ };
88
+ readonly parent_execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
89
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
90
+ };
91
+ readonly children: Schema.$Array<Schema.Struct<{
92
+ readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
93
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
94
+ };
95
+ readonly address_id: Schema.brand<Schema.String, "Relay.AddressId"> & {
96
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
97
+ };
98
+ readonly override: Schema.optionalKey<Schema.Struct<{
99
+ readonly instructions: Schema.optionalKey<Schema.String>;
100
+ readonly model: Schema.optionalKey<Schema.Struct<{
101
+ readonly provider: Schema.String;
102
+ readonly model: Schema.String;
103
+ readonly registration_key: Schema.optionalKey<Schema.String>;
104
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
105
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
106
+ }>>;
107
+ readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
108
+ readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
109
+ readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
110
+ readonly mode: Schema.Literals<readonly ["share", "fork"]>;
111
+ readonly fallback: Schema.optionalKey<Schema.Literals<readonly ["fail", "fresh"]>>;
112
+ }>>;
113
+ readonly output_schema_ref: Schema.optionalKey<Schema.String>;
114
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
115
+ }>>;
116
+ readonly input: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
117
+ readonly type: Schema.Literal<"text">;
118
+ readonly text: Schema.String;
119
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
120
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
121
+ }>, Schema.Struct<{
122
+ readonly type: Schema.Literal<"structured">;
123
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
124
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
125
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
126
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
127
+ }>, Schema.Struct<{
128
+ readonly type: Schema.Literal<"blob-reference">;
129
+ readonly uri: Schema.String;
130
+ readonly media_type: Schema.String;
131
+ readonly filename: Schema.optionalKey<Schema.String>;
132
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
133
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
134
+ }>, Schema.Struct<{
135
+ readonly type: Schema.Literal<"artifact-reference">;
136
+ readonly artifact_id: Schema.String;
137
+ readonly media_type: Schema.optionalKey<Schema.String>;
138
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
139
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
140
+ }>, Schema.Struct<{
141
+ readonly type: Schema.Literal<"tool-call">;
142
+ readonly call: Schema.Struct<{
143
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
144
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
145
+ };
146
+ readonly name: Schema.String;
147
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
148
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
149
+ }>;
150
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
151
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
152
+ }>, Schema.Struct<{
153
+ readonly type: Schema.Literal<"tool-result">;
154
+ readonly result: Schema.Struct<{
155
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
156
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
157
+ };
158
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
159
+ readonly error: Schema.optionalKey<Schema.String>;
160
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
161
+ }>;
162
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
163
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
164
+ }>]>>>;
165
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
166
+ }>>;
167
+ readonly max_concurrency: Schema.Int;
168
+ readonly join: Schema.Union<readonly [Schema.TaggedStruct<"all", {}>, Schema.TaggedStruct<"first-success", {}>, Schema.TaggedStruct<"quorum", {
169
+ readonly count: Schema.Int;
170
+ }>, Schema.TaggedStruct<"best-effort", {}>]>;
171
+ readonly created_at: Schema.Int;
172
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
173
+ }>;
174
+ export interface FanOutDefinition extends Schema.Schema.Type<typeof FanOutDefinition> {
175
+ }
176
+ export declare const MemberState: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
177
+ export type MemberState = typeof MemberState.Type;
178
+ export declare const AggregateState: Schema.Literals<readonly ["joining", "satisfied", "failed", "cancelled"]>;
179
+ export type AggregateState = typeof AggregateState.Type;
180
+ export declare const FanOutMember: Schema.Struct<{
181
+ readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
182
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
183
+ };
184
+ readonly ordinal: Schema.Int;
185
+ readonly state: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
186
+ readonly output: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
187
+ readonly type: Schema.Literal<"text">;
188
+ readonly text: Schema.String;
189
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
190
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
191
+ }>, Schema.Struct<{
192
+ readonly type: Schema.Literal<"structured">;
193
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
194
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
195
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
196
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
197
+ }>, Schema.Struct<{
198
+ readonly type: Schema.Literal<"blob-reference">;
199
+ readonly uri: Schema.String;
200
+ readonly media_type: Schema.String;
201
+ readonly filename: Schema.optionalKey<Schema.String>;
202
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
203
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
204
+ }>, Schema.Struct<{
205
+ readonly type: Schema.Literal<"artifact-reference">;
206
+ readonly artifact_id: Schema.String;
207
+ readonly media_type: Schema.optionalKey<Schema.String>;
208
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
209
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
210
+ }>, Schema.Struct<{
211
+ readonly type: Schema.Literal<"tool-call">;
212
+ readonly call: Schema.Struct<{
213
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
214
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
215
+ };
216
+ readonly name: Schema.String;
217
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
218
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
219
+ }>;
220
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
221
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
222
+ }>, Schema.Struct<{
223
+ readonly type: Schema.Literal<"tool-result">;
224
+ readonly result: Schema.Struct<{
225
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
226
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
227
+ };
228
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
229
+ readonly error: Schema.optionalKey<Schema.String>;
230
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
231
+ }>;
232
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
233
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
234
+ }>]>>>;
235
+ readonly error: Schema.optionalKey<Schema.String>;
236
+ readonly completed_at: Schema.optionalKey<Schema.Int>;
237
+ }>;
238
+ export interface FanOutMember extends Schema.Schema.Type<typeof FanOutMember> {
239
+ }
240
+ export declare const FanOutState: Schema.Struct<{
241
+ readonly state: Schema.Literals<readonly ["joining", "satisfied", "failed", "cancelled"]>;
242
+ readonly members: Schema.$Array<Schema.Struct<{
243
+ readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
244
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
245
+ };
246
+ readonly ordinal: Schema.Int;
247
+ readonly state: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
248
+ readonly output: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
249
+ readonly type: Schema.Literal<"text">;
250
+ readonly text: Schema.String;
251
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
252
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
253
+ }>, Schema.Struct<{
254
+ readonly type: Schema.Literal<"structured">;
255
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
256
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
257
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
258
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
259
+ }>, Schema.Struct<{
260
+ readonly type: Schema.Literal<"blob-reference">;
261
+ readonly uri: Schema.String;
262
+ readonly media_type: Schema.String;
263
+ readonly filename: Schema.optionalKey<Schema.String>;
264
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
265
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
266
+ }>, Schema.Struct<{
267
+ readonly type: Schema.Literal<"artifact-reference">;
268
+ readonly artifact_id: Schema.String;
269
+ readonly media_type: Schema.optionalKey<Schema.String>;
270
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
271
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
272
+ }>, Schema.Struct<{
273
+ readonly type: Schema.Literal<"tool-call">;
274
+ readonly call: Schema.Struct<{
275
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
276
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
277
+ };
278
+ readonly name: Schema.String;
279
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
280
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
281
+ }>;
282
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
283
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
284
+ }>, Schema.Struct<{
285
+ readonly type: Schema.Literal<"tool-result">;
286
+ readonly result: Schema.Struct<{
287
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
288
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
289
+ };
290
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
291
+ readonly error: Schema.optionalKey<Schema.String>;
292
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
293
+ }>;
294
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
295
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
296
+ }>]>>>;
297
+ readonly error: Schema.optionalKey<Schema.String>;
298
+ readonly completed_at: Schema.optionalKey<Schema.Int>;
299
+ }>>;
300
+ readonly satisfied_at: Schema.optionalKey<Schema.Int>;
301
+ readonly failed_at: Schema.optionalKey<Schema.Int>;
302
+ readonly cancelled_at: Schema.optionalKey<Schema.Int>;
303
+ readonly fan_out_id: Schema.brand<Schema.String, "Relay.ChildFanOutId"> & {
304
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildFanOutId">;
305
+ };
306
+ readonly parent_execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
307
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
308
+ };
309
+ readonly children: Schema.$Array<Schema.Struct<{
310
+ readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
311
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
312
+ };
313
+ readonly address_id: Schema.brand<Schema.String, "Relay.AddressId"> & {
314
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
315
+ };
316
+ readonly override: Schema.optionalKey<Schema.Struct<{
317
+ readonly instructions: Schema.optionalKey<Schema.String>;
318
+ readonly model: Schema.optionalKey<Schema.Struct<{
319
+ readonly provider: Schema.String;
320
+ readonly model: Schema.String;
321
+ readonly registration_key: Schema.optionalKey<Schema.String>;
322
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
323
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
324
+ }>>;
325
+ readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
326
+ readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
327
+ readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
328
+ readonly mode: Schema.Literals<readonly ["share", "fork"]>;
329
+ readonly fallback: Schema.optionalKey<Schema.Literals<readonly ["fail", "fresh"]>>;
330
+ }>>;
331
+ readonly output_schema_ref: Schema.optionalKey<Schema.String>;
332
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
333
+ }>>;
334
+ readonly input: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
335
+ readonly type: Schema.Literal<"text">;
336
+ readonly text: Schema.String;
337
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
338
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
339
+ }>, Schema.Struct<{
340
+ readonly type: Schema.Literal<"structured">;
341
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
342
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
343
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
344
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
345
+ }>, Schema.Struct<{
346
+ readonly type: Schema.Literal<"blob-reference">;
347
+ readonly uri: Schema.String;
348
+ readonly media_type: Schema.String;
349
+ readonly filename: Schema.optionalKey<Schema.String>;
350
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
351
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
352
+ }>, Schema.Struct<{
353
+ readonly type: Schema.Literal<"artifact-reference">;
354
+ readonly artifact_id: Schema.String;
355
+ readonly media_type: Schema.optionalKey<Schema.String>;
356
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
357
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
358
+ }>, Schema.Struct<{
359
+ readonly type: Schema.Literal<"tool-call">;
360
+ readonly call: Schema.Struct<{
361
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
362
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
363
+ };
364
+ readonly name: Schema.String;
365
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
366
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
367
+ }>;
368
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
369
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
370
+ }>, Schema.Struct<{
371
+ readonly type: Schema.Literal<"tool-result">;
372
+ readonly result: Schema.Struct<{
373
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
374
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
375
+ };
376
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
377
+ readonly error: Schema.optionalKey<Schema.String>;
378
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
379
+ }>;
380
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
381
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
382
+ }>]>>>;
383
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
384
+ }>>;
385
+ readonly max_concurrency: Schema.Int;
386
+ readonly join: Schema.Union<readonly [Schema.TaggedStruct<"all", {}>, Schema.TaggedStruct<"first-success", {}>, Schema.TaggedStruct<"quorum", {
387
+ readonly count: Schema.Int;
388
+ }>, Schema.TaggedStruct<"best-effort", {}>]>;
389
+ readonly created_at: Schema.Int;
390
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
391
+ }>;
392
+ export interface FanOutState extends Schema.Schema.Type<typeof FanOutState> {
393
+ }
@@ -276,7 +276,7 @@ export declare const ChildRunAccepted: Schema.Struct<{
276
276
  }>;
277
277
  export interface ChildRunAccepted extends Schema.Schema.Type<typeof ChildRunAccepted> {
278
278
  }
279
- export declare const ExecutionEventType: Schema.Literals<readonly ["execution.accepted", "execution.started", "execution.completed", "execution.failed", "execution.cancelled", "model.input.prepared", "model.output.delta", "model.reasoning.delta", "model.output.completed", "model.usage.reported", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.received", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "entity.created", "entity.destroyed", "envelope.accepted", "envelope.routed", "envelope.ready", "delivery.attempt", "wait.created", "wait.woken", "wait.timed_out", "wait.cancelled", "child_run.spawned", "child_run.event", "workspace.lease.planned", "workspace.lease.acquired", "workspace.suspended", "workspace.resumed", "workspace.snapshot.created", "workspace.lease.released", "workspace.lease.failed"]>;
279
+ export declare const ExecutionEventType: Schema.Literals<readonly ["execution.accepted", "execution.started", "execution.completed", "execution.failed", "execution.cancelled", "model.input.prepared", "model.output.delta", "model.reasoning.delta", "model.output.completed", "model.usage.reported", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.received", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "entity.created", "entity.destroyed", "envelope.accepted", "envelope.routed", "envelope.ready", "delivery.attempt", "wait.created", "wait.woken", "wait.timed_out", "wait.cancelled", "child_run.spawned", "child_run.event", "child_fan_out.created", "child_fan_out.member.admitted", "child_fan_out.member.terminal", "child_fan_out.terminal", "workspace.lease.planned", "workspace.lease.acquired", "workspace.suspended", "workspace.resumed", "workspace.snapshot.created", "workspace.lease.released", "workspace.lease.failed"]>;
280
280
  export type ExecutionEventType = typeof ExecutionEventType.Type;
281
281
  export declare const ExecutionEvent: Schema.Struct<{
282
282
  readonly id: Schema.brand<Schema.String, "Relay.EventId"> & {
@@ -288,7 +288,7 @@ export declare const ExecutionEvent: Schema.Struct<{
288
288
  readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
289
289
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
290
290
  }>;
291
- readonly type: Schema.Literals<readonly ["execution.accepted", "execution.started", "execution.completed", "execution.failed", "execution.cancelled", "model.input.prepared", "model.output.delta", "model.reasoning.delta", "model.output.completed", "model.usage.reported", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.received", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "entity.created", "entity.destroyed", "envelope.accepted", "envelope.routed", "envelope.ready", "delivery.attempt", "wait.created", "wait.woken", "wait.timed_out", "wait.cancelled", "child_run.spawned", "child_run.event", "workspace.lease.planned", "workspace.lease.acquired", "workspace.suspended", "workspace.resumed", "workspace.snapshot.created", "workspace.lease.released", "workspace.lease.failed"]>;
291
+ readonly type: Schema.Literals<readonly ["execution.accepted", "execution.started", "execution.completed", "execution.failed", "execution.cancelled", "model.input.prepared", "model.output.delta", "model.reasoning.delta", "model.output.completed", "model.usage.reported", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.received", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "entity.created", "entity.destroyed", "envelope.accepted", "envelope.routed", "envelope.ready", "delivery.attempt", "wait.created", "wait.woken", "wait.timed_out", "wait.cancelled", "child_run.spawned", "child_run.event", "child_fan_out.created", "child_fan_out.member.admitted", "child_fan_out.member.terminal", "child_fan_out.terminal", "workspace.lease.planned", "workspace.lease.acquired", "workspace.suspended", "workspace.resumed", "workspace.snapshot.created", "workspace.lease.released", "workspace.lease.failed"]>;
292
292
  readonly sequence: Schema.Int;
293
293
  readonly cursor: Schema.String;
294
294
  readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -16,6 +16,14 @@ export declare const AgentId: Schema.brand<Schema.String, "Relay.AgentId"> & {
16
16
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
17
17
  };
18
18
  export type AgentId = typeof AgentId.Type;
19
+ export declare const WorkflowDefinitionId: Schema.brand<Schema.String, "Relay.WorkflowDefinitionId"> & {
20
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WorkflowDefinitionId">;
21
+ };
22
+ export type WorkflowDefinitionId = typeof WorkflowDefinitionId.Type;
23
+ export declare const WorkflowOperationId: Schema.brand<Schema.String, "Relay.WorkflowOperationId"> & {
24
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WorkflowOperationId">;
25
+ };
26
+ export type WorkflowOperationId = typeof WorkflowOperationId.Type;
19
27
  export declare const EntityKindName: Schema.brand<Schema.String, "Relay.EntityKindName"> & {
20
28
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EntityKindName">;
21
29
  };
@@ -44,6 +52,10 @@ export declare const ChildExecutionId: Schema.brand<Schema.String, "Relay.ChildE
44
52
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
45
53
  };
46
54
  export type ChildExecutionId = typeof ChildExecutionId.Type;
55
+ export declare const ChildFanOutId: Schema.brand<Schema.String, "Relay.ChildFanOutId"> & {
56
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildFanOutId">;
57
+ };
58
+ export type ChildFanOutId = typeof ChildFanOutId.Type;
47
59
  export declare const MemorySubjectId: Schema.brand<Schema.String, "Relay.MemorySubjectId"> & {
48
60
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.MemorySubjectId">;
49
61
  };
@@ -1,5 +1,6 @@
1
1
  export * as Address from "./address-schema";
2
2
  export * as Agent from "./agent-schema";
3
+ export * as ChildOrchestration from "./child-orchestration-schema";
3
4
  export * as Content from "./content-schema";
4
5
  export * as Envelope from "./envelope-schema";
5
6
  export * as Entity from "./entity-schema";
@@ -12,5 +13,7 @@ export * as Shared from "./shared-schema";
12
13
  export * as Skill from "./skill-schema";
13
14
  export * as State from "./state-schema";
14
15
  export * as Tool from "./tool-schema";
16
+ export * as Waits from "./wait-schema";
17
+ export * as Workflow from "./workflow-schema";
15
18
  export * as Workspace from "./workspace-schema";
16
19
  export declare const schemaPackage = "./index";
@@ -0,0 +1,98 @@
1
+ import { Schema } from "effect";
2
+ import { WaitMode } from "./envelope-schema";
3
+ import { EnvelopeId, WaitId } from "./ids-schema";
4
+ export declare const WaitKind: Schema.Literals<readonly ["permission", "tool_approval", "tool_placement", "child_join", "inbox", "reply", "timer", "external"]>;
5
+ export type WaitKind = typeof WaitKind.Type;
6
+ export declare const PermissionWait: Schema.Struct<{
7
+ readonly kind: Schema.Literal<"permission">;
8
+ readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
9
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
10
+ };
11
+ readonly tool_call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
12
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
13
+ };
14
+ }>;
15
+ export declare const ToolApprovalWait: Schema.Struct<{
16
+ readonly kind: Schema.Literal<"tool_approval">;
17
+ readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
18
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
19
+ };
20
+ readonly tool_call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
21
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
22
+ };
23
+ }>;
24
+ export declare const ToolPlacementWait: Schema.Struct<{
25
+ readonly kind: Schema.Literal<"tool_placement">;
26
+ readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
27
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
28
+ };
29
+ readonly tool_call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
30
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
31
+ };
32
+ }>;
33
+ export declare const ChildJoinWait: Schema.Struct<{
34
+ readonly kind: Schema.Literal<"child_join">;
35
+ readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
36
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
37
+ };
38
+ readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
39
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
40
+ };
41
+ }>;
42
+ export declare const InboxWait: Schema.Struct<{
43
+ readonly kind: Schema.Literal<"inbox">;
44
+ readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
45
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
46
+ };
47
+ readonly tool_call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
48
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
49
+ };
50
+ }>;
51
+ export declare const ReplyWait: Schema.Struct<{
52
+ readonly kind: Schema.Literal<"reply">;
53
+ readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
54
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
55
+ };
56
+ readonly envelope_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.EnvelopeId"> & {
57
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EnvelopeId">;
58
+ }>;
59
+ }>;
60
+ export declare const TimerWait: Schema.Struct<{
61
+ readonly kind: Schema.Literal<"timer">;
62
+ readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
63
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
64
+ };
65
+ }>;
66
+ export declare const ExternalWait: Schema.Struct<{
67
+ readonly kind: Schema.Literal<"external">;
68
+ readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
69
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
70
+ };
71
+ readonly mode: Schema.Literals<readonly ["reply", "event", "until", "child"]>;
72
+ }>;
73
+ export type Classification = typeof PermissionWait.Type | typeof ToolApprovalWait.Type | typeof ToolPlacementWait.Type | typeof ChildJoinWait.Type | typeof InboxWait.Type | typeof ReplyWait.Type | typeof TimerWait.Type | typeof ExternalWait.Type;
74
+ export declare const Classification: Schema.Schema<Classification>;
75
+ export interface ClassifyInput {
76
+ readonly wait_id: WaitId;
77
+ readonly mode: WaitMode;
78
+ readonly envelope_id?: EnvelopeId;
79
+ readonly correlation_key?: string;
80
+ }
81
+ /**
82
+ * Derives a wait's public kind from its persisted fields.
83
+ *
84
+ * Relay mints every runtime-owned wait id inside a reserved namespace, so the
85
+ * namespace is the classification authority; envelope anchoring and mode only
86
+ * classify what no namespace claims. Reconnecting clients and replay consumers
87
+ * get the same answer Relay does without interpreting internal metadata.
88
+ */
89
+ export declare const classify: (input: ClassifyInput) => Classification;
90
+ export declare const Resolver: Schema.Literals<readonly ["resolve_permission", "resolve_tool_approval", "wake"]>;
91
+ export type Resolver = typeof Resolver.Type;
92
+ /**
93
+ * Names the one public resolver a classification admits. Runtime-owned kinds
94
+ * (child joins, inbox parks, tool placement) return undefined: deliveries,
95
+ * child completion, and tool completion resolve them — callers never do.
96
+ */
97
+ export declare const resolverFor: (classification: Classification) => Resolver | undefined;
98
+ export declare const externallyResolvable: (classification: Classification) => boolean;