@ekairos/events 1.22.39-beta.development.0 → 1.22.41-beta.development.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.
- package/README.md +5 -3
- package/dist/codex.d.ts +11 -2
- package/dist/codex.js +13 -5
- package/dist/context.action.d.ts +55 -0
- package/dist/context.action.js +25 -0
- package/dist/context.builder.d.ts +52 -42
- package/dist/context.builder.js +29 -24
- package/dist/context.d.ts +2 -1
- package/dist/context.engine.d.ts +50 -47
- package/dist/context.engine.js +222 -173
- package/dist/context.events.js +28 -87
- package/dist/context.js +1 -0
- package/dist/context.part-identity.d.ts +40 -0
- package/dist/context.part-identity.js +268 -0
- package/dist/context.parts.d.ts +389 -164
- package/dist/context.parts.js +235 -224
- package/dist/context.registry.d.ts +1 -1
- package/dist/context.runtime.d.ts +10 -4
- package/dist/context.runtime.js +7 -1
- package/dist/context.step-stream.d.ts +16 -2
- package/dist/context.step-stream.js +58 -16
- package/dist/context.stream.d.ts +4 -0
- package/dist/context.stream.js +23 -1
- package/dist/context.toolcalls.d.ts +8 -20
- package/dist/context.toolcalls.js +61 -55
- package/dist/domain.d.ts +1 -0
- package/dist/domain.js +1 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.js +5 -3
- package/dist/reactors/ai-sdk.chunk-map.js +27 -0
- package/dist/reactors/ai-sdk.reactor.d.ts +8 -9
- package/dist/reactors/ai-sdk.reactor.js +2 -5
- package/dist/reactors/ai-sdk.step.d.ts +2 -3
- package/dist/reactors/ai-sdk.step.js +10 -7
- package/dist/reactors/scripted.reactor.d.ts +7 -4
- package/dist/reactors/types.d.ts +8 -8
- package/dist/schema.d.ts +273 -2
- package/dist/schema.js +1 -1
- package/dist/steps/store.steps.d.ts +51 -12
- package/dist/steps/store.steps.js +137 -0
- package/dist/steps/stream.steps.d.ts +15 -0
- package/dist/steps/stream.steps.js +16 -5
- package/dist/steps/trace.steps.d.ts +4 -4
- package/dist/steps/trace.steps.js +21 -6
- package/dist/tools-to-model-tools.d.ts +4 -2
- package/dist/tools-to-model-tools.js +30 -11
- package/package.json +16 -6
package/dist/context.parts.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const reactorMetadataSchema: z.ZodObject<{
|
|
3
|
+
reactorKind: z.ZodString;
|
|
4
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
5
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
6
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
7
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
2
9
|
export declare const contextPartContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
10
|
type: z.ZodLiteral<"text">;
|
|
4
11
|
text: z.ZodString;
|
|
@@ -24,7 +31,7 @@ export declare const contextPartContentSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
24
31
|
title: z.ZodString;
|
|
25
32
|
filename: z.ZodOptional<z.ZodString>;
|
|
26
33
|
}, z.core.$strip>], "type">;
|
|
27
|
-
declare const contextInlineContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
34
|
+
export declare const contextInlineContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
28
35
|
type: z.ZodLiteral<"text">;
|
|
29
36
|
text: z.ZodString;
|
|
30
37
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -38,204 +45,422 @@ declare const contextInlineContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
38
45
|
type: z.ZodLiteral<"json">;
|
|
39
46
|
value: z.ZodUnknown;
|
|
40
47
|
}, z.core.$strip>], "type">;
|
|
41
|
-
export declare const
|
|
42
|
-
type: z.ZodLiteral<"
|
|
43
|
-
content: z.
|
|
44
|
-
|
|
48
|
+
export declare const contextMessagePartSchema: z.ZodObject<{
|
|
49
|
+
type: z.ZodLiteral<"message">;
|
|
50
|
+
content: z.ZodObject<{
|
|
51
|
+
text: z.ZodOptional<z.ZodString>;
|
|
52
|
+
blocks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
53
|
+
type: z.ZodLiteral<"text">;
|
|
54
|
+
text: z.ZodString;
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"file">;
|
|
57
|
+
mediaType: z.ZodString;
|
|
58
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
59
|
+
data: z.ZodOptional<z.ZodString>;
|
|
60
|
+
url: z.ZodOptional<z.ZodString>;
|
|
61
|
+
fileId: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
63
|
+
type: z.ZodLiteral<"json">;
|
|
64
|
+
value: z.ZodUnknown;
|
|
65
|
+
}, z.core.$strip>], "type">>>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
68
|
+
reactorKind: z.ZodString;
|
|
69
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
70
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
71
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
72
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export declare const contextReasoningPartSchema: z.ZodObject<{
|
|
76
|
+
type: z.ZodLiteral<"reasoning">;
|
|
77
|
+
content: z.ZodObject<{
|
|
45
78
|
text: z.ZodString;
|
|
79
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
80
|
+
streaming: "streaming";
|
|
81
|
+
done: "done";
|
|
82
|
+
}>>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
85
|
+
reactorKind: z.ZodString;
|
|
86
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
87
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
88
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
89
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
export declare const contextSourcePartSchema: z.ZodObject<{
|
|
93
|
+
type: z.ZodLiteral<"source">;
|
|
94
|
+
content: z.ZodObject<{
|
|
95
|
+
sources: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
96
|
+
type: z.ZodLiteral<"source-url">;
|
|
97
|
+
sourceId: z.ZodString;
|
|
98
|
+
url: z.ZodString;
|
|
99
|
+
title: z.ZodOptional<z.ZodString>;
|
|
100
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
101
|
+
type: z.ZodLiteral<"source-document">;
|
|
102
|
+
sourceId: z.ZodString;
|
|
103
|
+
mediaType: z.ZodString;
|
|
104
|
+
title: z.ZodString;
|
|
105
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, z.core.$strip>], "type">>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
109
|
+
reactorKind: z.ZodString;
|
|
110
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
111
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
112
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
113
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
114
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
export declare const contextActionPartSchema: z.ZodObject<{
|
|
117
|
+
type: z.ZodLiteral<"action">;
|
|
118
|
+
content: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
119
|
+
status: z.ZodLiteral<"started">;
|
|
120
|
+
actionName: z.ZodString;
|
|
121
|
+
actionCallId: z.ZodString;
|
|
122
|
+
input: z.ZodUnknown;
|
|
46
123
|
}, z.core.$strip>, z.ZodObject<{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
url: z.ZodOptional<z.ZodString>;
|
|
52
|
-
fileId: z.ZodOptional<z.ZodString>;
|
|
124
|
+
status: z.ZodLiteral<"completed">;
|
|
125
|
+
actionName: z.ZodString;
|
|
126
|
+
actionCallId: z.ZodString;
|
|
127
|
+
output: z.ZodUnknown;
|
|
53
128
|
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
129
|
+
status: z.ZodLiteral<"failed">;
|
|
130
|
+
actionName: z.ZodString;
|
|
131
|
+
actionCallId: z.ZodString;
|
|
132
|
+
error: z.ZodObject<{
|
|
133
|
+
message: z.ZodString;
|
|
134
|
+
code: z.ZodOptional<z.ZodString>;
|
|
135
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
}, z.core.$strip>], "status">;
|
|
138
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
139
|
+
reactorKind: z.ZodString;
|
|
140
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
141
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
142
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
143
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
144
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
export declare const contextEnginePartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
147
|
+
type: z.ZodLiteral<"message">;
|
|
148
|
+
content: z.ZodObject<{
|
|
149
|
+
text: z.ZodOptional<z.ZodString>;
|
|
150
|
+
blocks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
151
|
+
type: z.ZodLiteral<"text">;
|
|
152
|
+
text: z.ZodString;
|
|
153
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
154
|
+
type: z.ZodLiteral<"file">;
|
|
155
|
+
mediaType: z.ZodString;
|
|
156
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
157
|
+
data: z.ZodOptional<z.ZodString>;
|
|
158
|
+
url: z.ZodOptional<z.ZodString>;
|
|
159
|
+
fileId: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
161
|
+
type: z.ZodLiteral<"json">;
|
|
162
|
+
value: z.ZodUnknown;
|
|
163
|
+
}, z.core.$strip>], "type">>>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
166
|
+
reactorKind: z.ZodString;
|
|
167
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
168
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
169
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
170
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
171
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
61
172
|
}, z.core.$strip>, z.ZodObject<{
|
|
62
173
|
type: z.ZodLiteral<"reasoning">;
|
|
63
|
-
content: z.
|
|
64
|
-
type: z.ZodLiteral<"text">;
|
|
174
|
+
content: z.ZodObject<{
|
|
65
175
|
text: z.ZodString;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
176
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
177
|
+
streaming: "streaming";
|
|
178
|
+
done: "done";
|
|
179
|
+
}>>;
|
|
180
|
+
}, z.core.$strip>;
|
|
181
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
182
|
+
reactorKind: z.ZodString;
|
|
183
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
184
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
185
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
186
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
187
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
71
188
|
}, z.core.$strip>, z.ZodObject<{
|
|
72
189
|
type: z.ZodLiteral<"source">;
|
|
73
|
-
content: z.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
190
|
+
content: z.ZodObject<{
|
|
191
|
+
sources: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
192
|
+
type: z.ZodLiteral<"source-url">;
|
|
193
|
+
sourceId: z.ZodString;
|
|
194
|
+
url: z.ZodString;
|
|
195
|
+
title: z.ZodOptional<z.ZodString>;
|
|
196
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
197
|
+
type: z.ZodLiteral<"source-document">;
|
|
198
|
+
sourceId: z.ZodString;
|
|
199
|
+
mediaType: z.ZodString;
|
|
200
|
+
title: z.ZodString;
|
|
201
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
202
|
+
}, z.core.$strip>], "type">>;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
205
|
+
reactorKind: z.ZodString;
|
|
206
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
207
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
208
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
209
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
210
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
211
|
+
}, z.core.$strip>], "type">;
|
|
212
|
+
export declare const contextPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
213
|
+
type: z.ZodLiteral<"message">;
|
|
214
|
+
content: z.ZodObject<{
|
|
215
|
+
text: z.ZodOptional<z.ZodString>;
|
|
216
|
+
blocks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
217
|
+
type: z.ZodLiteral<"text">;
|
|
218
|
+
text: z.ZodString;
|
|
219
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
220
|
+
type: z.ZodLiteral<"file">;
|
|
221
|
+
mediaType: z.ZodString;
|
|
222
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
223
|
+
data: z.ZodOptional<z.ZodString>;
|
|
224
|
+
url: z.ZodOptional<z.ZodString>;
|
|
225
|
+
fileId: z.ZodOptional<z.ZodString>;
|
|
226
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
227
|
+
type: z.ZodLiteral<"json">;
|
|
228
|
+
value: z.ZodUnknown;
|
|
229
|
+
}, z.core.$strip>], "type">>>;
|
|
230
|
+
}, z.core.$strip>;
|
|
231
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
232
|
+
reactorKind: z.ZodString;
|
|
233
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
234
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
235
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
236
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
237
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
85
238
|
}, z.core.$strip>, z.ZodObject<{
|
|
86
|
-
type: z.ZodLiteral<"
|
|
87
|
-
|
|
88
|
-
toolName: z.ZodString;
|
|
89
|
-
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
90
|
-
type: z.ZodLiteral<"text">;
|
|
239
|
+
type: z.ZodLiteral<"reasoning">;
|
|
240
|
+
content: z.ZodObject<{
|
|
91
241
|
text: z.ZodString;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"input-streaming": "input-streaming";
|
|
105
|
-
"input-available": "input-available";
|
|
106
|
-
}>>;
|
|
242
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
243
|
+
streaming: "streaming";
|
|
244
|
+
done: "done";
|
|
245
|
+
}>>;
|
|
246
|
+
}, z.core.$strip>;
|
|
247
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
248
|
+
reactorKind: z.ZodString;
|
|
249
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
250
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
251
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
252
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
253
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
107
254
|
}, z.core.$strip>, z.ZodObject<{
|
|
108
|
-
type: z.ZodLiteral<"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
255
|
+
type: z.ZodLiteral<"source">;
|
|
256
|
+
content: z.ZodObject<{
|
|
257
|
+
sources: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
258
|
+
type: z.ZodLiteral<"source-url">;
|
|
259
|
+
sourceId: z.ZodString;
|
|
260
|
+
url: z.ZodString;
|
|
261
|
+
title: z.ZodOptional<z.ZodString>;
|
|
262
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
263
|
+
type: z.ZodLiteral<"source-document">;
|
|
264
|
+
sourceId: z.ZodString;
|
|
265
|
+
mediaType: z.ZodString;
|
|
266
|
+
title: z.ZodString;
|
|
267
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
268
|
+
}, z.core.$strip>], "type">>;
|
|
269
|
+
}, z.core.$strip>;
|
|
270
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
271
|
+
reactorKind: z.ZodString;
|
|
272
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
273
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
274
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
275
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
276
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
277
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
278
|
+
type: z.ZodLiteral<"action">;
|
|
279
|
+
content: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
280
|
+
status: z.ZodLiteral<"started">;
|
|
281
|
+
actionName: z.ZodString;
|
|
282
|
+
actionCallId: z.ZodString;
|
|
283
|
+
input: z.ZodUnknown;
|
|
114
284
|
}, z.core.$strip>, z.ZodObject<{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
url: z.ZodOptional<z.ZodString>;
|
|
120
|
-
fileId: z.ZodOptional<z.ZodString>;
|
|
285
|
+
status: z.ZodLiteral<"completed">;
|
|
286
|
+
actionName: z.ZodString;
|
|
287
|
+
actionCallId: z.ZodString;
|
|
288
|
+
output: z.ZodUnknown;
|
|
121
289
|
}, z.core.$strip>, z.ZodObject<{
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
290
|
+
status: z.ZodLiteral<"failed">;
|
|
291
|
+
actionName: z.ZodString;
|
|
292
|
+
actionCallId: z.ZodString;
|
|
293
|
+
error: z.ZodObject<{
|
|
294
|
+
message: z.ZodString;
|
|
295
|
+
code: z.ZodOptional<z.ZodString>;
|
|
296
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
}, z.core.$strip>], "status">;
|
|
299
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
300
|
+
reactorKind: z.ZodString;
|
|
301
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
302
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
303
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
304
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
305
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
129
306
|
}, z.core.$strip>], "type">;
|
|
130
307
|
export declare const contextPartEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
131
|
-
type: z.ZodLiteral<"
|
|
132
|
-
content: z.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
308
|
+
type: z.ZodLiteral<"message">;
|
|
309
|
+
content: z.ZodObject<{
|
|
310
|
+
text: z.ZodOptional<z.ZodString>;
|
|
311
|
+
blocks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
312
|
+
type: z.ZodLiteral<"text">;
|
|
313
|
+
text: z.ZodString;
|
|
314
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
315
|
+
type: z.ZodLiteral<"file">;
|
|
316
|
+
mediaType: z.ZodString;
|
|
317
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
318
|
+
data: z.ZodOptional<z.ZodString>;
|
|
319
|
+
url: z.ZodOptional<z.ZodString>;
|
|
320
|
+
fileId: z.ZodOptional<z.ZodString>;
|
|
321
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
322
|
+
type: z.ZodLiteral<"json">;
|
|
323
|
+
value: z.ZodUnknown;
|
|
324
|
+
}, z.core.$strip>], "type">>>;
|
|
325
|
+
}, z.core.$strip>;
|
|
326
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
327
|
+
reactorKind: z.ZodString;
|
|
328
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
329
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
330
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
331
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
332
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
151
333
|
}, z.core.$strip>, z.ZodObject<{
|
|
152
334
|
type: z.ZodLiteral<"reasoning">;
|
|
153
|
-
content: z.
|
|
154
|
-
type: z.ZodLiteral<"text">;
|
|
335
|
+
content: z.ZodObject<{
|
|
155
336
|
text: z.ZodString;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
|
|
337
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
338
|
+
streaming: "streaming";
|
|
339
|
+
done: "done";
|
|
340
|
+
}>>;
|
|
341
|
+
}, z.core.$strip>;
|
|
342
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
343
|
+
reactorKind: z.ZodString;
|
|
344
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
345
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
346
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
347
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
348
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
162
349
|
}, z.core.$strip>, z.ZodObject<{
|
|
163
350
|
type: z.ZodLiteral<"source">;
|
|
164
|
-
content: z.
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}, z.core.$strip
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}, z.core.$
|
|
185
|
-
type: z.ZodLiteral<"file">;
|
|
186
|
-
mediaType: z.ZodString;
|
|
187
|
-
filename: z.ZodOptional<z.ZodString>;
|
|
188
|
-
data: z.ZodOptional<z.ZodString>;
|
|
189
|
-
url: z.ZodOptional<z.ZodString>;
|
|
190
|
-
fileId: z.ZodOptional<z.ZodString>;
|
|
191
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
192
|
-
type: z.ZodLiteral<"json">;
|
|
193
|
-
value: z.ZodUnknown;
|
|
194
|
-
}, z.core.$strip>], "type">>;
|
|
195
|
-
state: z.ZodOptional<z.ZodEnum<{
|
|
196
|
-
"input-streaming": "input-streaming";
|
|
197
|
-
"input-available": "input-available";
|
|
198
|
-
}>>;
|
|
199
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
351
|
+
content: z.ZodObject<{
|
|
352
|
+
sources: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
353
|
+
type: z.ZodLiteral<"source-url">;
|
|
354
|
+
sourceId: z.ZodString;
|
|
355
|
+
url: z.ZodString;
|
|
356
|
+
title: z.ZodOptional<z.ZodString>;
|
|
357
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
358
|
+
type: z.ZodLiteral<"source-document">;
|
|
359
|
+
sourceId: z.ZodString;
|
|
360
|
+
mediaType: z.ZodString;
|
|
361
|
+
title: z.ZodString;
|
|
362
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
363
|
+
}, z.core.$strip>], "type">>;
|
|
364
|
+
}, z.core.$strip>;
|
|
365
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
366
|
+
reactorKind: z.ZodString;
|
|
367
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
368
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
369
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
370
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
371
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
200
372
|
}, z.core.$strip>, z.ZodObject<{
|
|
201
|
-
type: z.ZodLiteral<"
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
373
|
+
type: z.ZodLiteral<"action">;
|
|
374
|
+
content: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
375
|
+
status: z.ZodLiteral<"started">;
|
|
376
|
+
actionName: z.ZodString;
|
|
377
|
+
actionCallId: z.ZodString;
|
|
378
|
+
input: z.ZodUnknown;
|
|
207
379
|
}, z.core.$strip>, z.ZodObject<{
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
url: z.ZodOptional<z.ZodString>;
|
|
213
|
-
fileId: z.ZodOptional<z.ZodString>;
|
|
380
|
+
status: z.ZodLiteral<"completed">;
|
|
381
|
+
actionName: z.ZodString;
|
|
382
|
+
actionCallId: z.ZodString;
|
|
383
|
+
output: z.ZodUnknown;
|
|
214
384
|
}, z.core.$strip>, z.ZodObject<{
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
385
|
+
status: z.ZodLiteral<"failed">;
|
|
386
|
+
actionName: z.ZodString;
|
|
387
|
+
actionCallId: z.ZodString;
|
|
388
|
+
error: z.ZodObject<{
|
|
389
|
+
message: z.ZodString;
|
|
390
|
+
code: z.ZodOptional<z.ZodString>;
|
|
391
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
392
|
+
}, z.core.$strip>;
|
|
393
|
+
}, z.core.$strip>], "status">;
|
|
394
|
+
reactorMetadata: z.ZodOptional<z.ZodObject<{
|
|
395
|
+
reactorKind: z.ZodString;
|
|
396
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
397
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
398
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
399
|
+
actionCallId: z.ZodOptional<z.ZodString>;
|
|
400
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
223
401
|
}, z.core.$strip>], "type">;
|
|
224
402
|
export type ContextPartContent = z.infer<typeof contextPartContentSchema>;
|
|
225
403
|
export type ContextInlineContent = z.infer<typeof contextInlineContentSchema>;
|
|
226
|
-
export type
|
|
404
|
+
export type ReactorMetadata = z.infer<typeof reactorMetadataSchema>;
|
|
405
|
+
export type ContextEnginePart = z.infer<typeof contextEnginePartSchema>;
|
|
227
406
|
export type ContextPartEnvelope = z.infer<typeof contextPartEnvelopeSchema>;
|
|
407
|
+
export type ContextPartActionMap = Record<string, {
|
|
408
|
+
input: z.ZodType;
|
|
409
|
+
output: z.ZodType;
|
|
410
|
+
}>;
|
|
411
|
+
type ContextActionName<TActions extends ContextPartActionMap> = Extract<keyof TActions, string>;
|
|
412
|
+
type ContextPartActionInput<TActions extends ContextPartActionMap, Name extends string> = Name extends keyof TActions ? z.output<TActions[Name]["input"]> : never;
|
|
413
|
+
type ContextPartActionOutput<TActions extends ContextPartActionMap, Name extends string> = Name extends keyof TActions ? z.output<TActions[Name]["output"]> : never;
|
|
414
|
+
export type ContextActionStartedPart<TActions extends ContextPartActionMap, Name extends ContextActionName<TActions> = ContextActionName<TActions>> = {
|
|
415
|
+
type: "action";
|
|
416
|
+
content: {
|
|
417
|
+
status: "started";
|
|
418
|
+
actionName: Name;
|
|
419
|
+
actionCallId: string;
|
|
420
|
+
input: ContextPartActionInput<TActions, Name>;
|
|
421
|
+
};
|
|
422
|
+
reactorMetadata?: ReactorMetadata;
|
|
423
|
+
};
|
|
424
|
+
export type ContextActionCompletedPart<TActions extends ContextPartActionMap, Name extends ContextActionName<TActions> = ContextActionName<TActions>> = {
|
|
425
|
+
type: "action";
|
|
426
|
+
content: {
|
|
427
|
+
status: "completed";
|
|
428
|
+
actionName: Name;
|
|
429
|
+
actionCallId: string;
|
|
430
|
+
output: ContextPartActionOutput<TActions, Name>;
|
|
431
|
+
};
|
|
432
|
+
reactorMetadata?: ReactorMetadata;
|
|
433
|
+
};
|
|
434
|
+
export type ContextActionFailedPart<TActions extends ContextPartActionMap, Name extends ContextActionName<TActions> = ContextActionName<TActions>> = {
|
|
435
|
+
type: "action";
|
|
436
|
+
content: {
|
|
437
|
+
status: "failed";
|
|
438
|
+
actionName: Name;
|
|
439
|
+
actionCallId: string;
|
|
440
|
+
error: {
|
|
441
|
+
message: string;
|
|
442
|
+
code?: string;
|
|
443
|
+
details?: unknown;
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
reactorMetadata?: ReactorMetadata;
|
|
447
|
+
};
|
|
448
|
+
export type ContextActionPart<TActions extends ContextPartActionMap> = {
|
|
449
|
+
[Name in ContextActionName<TActions>]: ContextActionStartedPart<TActions, Name> | ContextActionCompletedPart<TActions, Name> | ContextActionFailedPart<TActions, Name>;
|
|
450
|
+
}[ContextActionName<TActions>];
|
|
451
|
+
export type ContextPart<TActions extends ContextPartActionMap = ContextPartActionMap> = ContextEnginePart | ContextActionPart<TActions>;
|
|
452
|
+
export declare function createContextPartSchema<TActions extends ContextPartActionMap = Record<string, never>>(actions?: TActions): z.ZodType<ContextPart<TActions>>;
|
|
453
|
+
export declare function parseContextPart<TActions extends ContextPartActionMap>(actions: TActions, value: unknown): ContextPart<TActions>;
|
|
228
454
|
export declare function isContextPartEnvelope(value: unknown): value is ContextPartEnvelope;
|
|
229
455
|
export declare function parseContextPartEnvelope(value: unknown): ContextPartEnvelope;
|
|
230
456
|
export declare function splitContextPartEnvelope(value: ContextPartEnvelope): {
|
|
231
|
-
part:
|
|
232
|
-
metadata?:
|
|
457
|
+
part: ContextPartEnvelope;
|
|
458
|
+
metadata?: undefined;
|
|
233
459
|
};
|
|
234
460
|
export declare function mergeContextPartEnvelope(params: {
|
|
235
461
|
part: unknown;
|
|
236
462
|
metadata?: unknown;
|
|
237
463
|
}): ContextPartEnvelope;
|
|
238
|
-
export declare function normalizeToolResultContentToBlocks(value: unknown): ContextInlineContent[];
|
|
239
464
|
export declare function normalizeUiPartToContextPartEnvelopes(value: unknown): ContextPartEnvelope[];
|
|
240
465
|
export declare function normalizePartsForPersistence(parts: unknown[]): ContextPartEnvelope[];
|
|
241
466
|
export {};
|