@kortyx/stream 0.2.3 → 0.3.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.
@@ -1,465 +0,0 @@
1
- import { z } from "zod";
2
- export declare const StreamResultSchema: z.ZodObject<{
3
- chunks: z.ZodArray<z.ZodUnion<[z.ZodObject<{
4
- type: z.ZodLiteral<"session">;
5
- sessionId: z.ZodString;
6
- }, "strip", z.ZodTypeAny, {
7
- type?: "session";
8
- sessionId?: string;
9
- }, {
10
- type?: "session";
11
- sessionId?: string;
12
- }>, z.ZodObject<{
13
- type: z.ZodLiteral<"status">;
14
- message: z.ZodString;
15
- node: z.ZodOptional<z.ZodString>;
16
- }, "strip", z.ZodTypeAny, {
17
- message?: string;
18
- type?: "status";
19
- node?: string;
20
- }, {
21
- message?: string;
22
- type?: "status";
23
- node?: string;
24
- }>, z.ZodObject<{
25
- type: z.ZodLiteral<"message">;
26
- content: z.ZodString;
27
- node: z.ZodOptional<z.ZodString>;
28
- }, "strip", z.ZodTypeAny, {
29
- type?: "message";
30
- node?: string;
31
- content?: string;
32
- }, {
33
- type?: "message";
34
- node?: string;
35
- content?: string;
36
- }>, z.ZodObject<{
37
- type: z.ZodLiteral<"text-start">;
38
- node: z.ZodOptional<z.ZodString>;
39
- }, "strip", z.ZodTypeAny, {
40
- type?: "text-start";
41
- node?: string;
42
- }, {
43
- type?: "text-start";
44
- node?: string;
45
- }>, z.ZodObject<{
46
- type: z.ZodLiteral<"text-delta">;
47
- delta: z.ZodString;
48
- node: z.ZodOptional<z.ZodString>;
49
- }, "strip", z.ZodTypeAny, {
50
- type?: "text-delta";
51
- node?: string;
52
- delta?: string;
53
- }, {
54
- type?: "text-delta";
55
- node?: string;
56
- delta?: string;
57
- }>, z.ZodObject<{
58
- type: z.ZodLiteral<"text-end">;
59
- node: z.ZodOptional<z.ZodString>;
60
- }, "strip", z.ZodTypeAny, {
61
- type?: "text-end";
62
- node?: string;
63
- }, {
64
- type?: "text-end";
65
- node?: string;
66
- }>, z.ZodObject<{
67
- type: z.ZodLiteral<"tool-result">;
68
- tool: z.ZodOptional<z.ZodString>;
69
- node: z.ZodOptional<z.ZodString>;
70
- content: z.ZodUnknown;
71
- }, "strip", z.ZodTypeAny, {
72
- type?: "tool-result";
73
- node?: string;
74
- content?: unknown;
75
- tool?: string;
76
- }, {
77
- type?: "tool-result";
78
- node?: string;
79
- content?: unknown;
80
- tool?: string;
81
- }>, z.ZodObject<{
82
- type: z.ZodLiteral<"interrupt">;
83
- requestId: z.ZodString;
84
- resumeToken: z.ZodString;
85
- workflow: z.ZodOptional<z.ZodString>;
86
- node: z.ZodOptional<z.ZodString>;
87
- input: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
88
- kind: z.ZodLiteral<"text">;
89
- multiple: z.ZodBoolean;
90
- question: z.ZodOptional<z.ZodString>;
91
- options: z.ZodOptional<z.ZodArray<z.ZodNever, "many">>;
92
- }, "strip", z.ZodTypeAny, {
93
- options?: never[];
94
- kind?: "text";
95
- multiple?: boolean;
96
- question?: string;
97
- }, {
98
- options?: never[];
99
- kind?: "text";
100
- multiple?: boolean;
101
- question?: string;
102
- }>, z.ZodObject<{
103
- kind: z.ZodEnum<["choice", "multi-choice"]>;
104
- multiple: z.ZodBoolean;
105
- question: z.ZodString;
106
- options: z.ZodArray<z.ZodObject<{
107
- id: z.ZodString;
108
- label: z.ZodString;
109
- description: z.ZodOptional<z.ZodString>;
110
- }, "strip", z.ZodTypeAny, {
111
- id?: string;
112
- label?: string;
113
- description?: string;
114
- }, {
115
- id?: string;
116
- label?: string;
117
- description?: string;
118
- }>, "many">;
119
- }, "strip", z.ZodTypeAny, {
120
- options?: {
121
- id?: string;
122
- label?: string;
123
- description?: string;
124
- }[];
125
- kind?: "choice" | "multi-choice";
126
- multiple?: boolean;
127
- question?: string;
128
- }, {
129
- options?: {
130
- id?: string;
131
- label?: string;
132
- description?: string;
133
- }[];
134
- kind?: "choice" | "multi-choice";
135
- multiple?: boolean;
136
- question?: string;
137
- }>]>;
138
- meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
139
- }, "strip", z.ZodTypeAny, {
140
- type?: "interrupt";
141
- node?: string;
142
- requestId?: string;
143
- resumeToken?: string;
144
- workflow?: string;
145
- input?: {
146
- options?: never[];
147
- kind?: "text";
148
- multiple?: boolean;
149
- question?: string;
150
- } | {
151
- options?: {
152
- id?: string;
153
- label?: string;
154
- description?: string;
155
- }[];
156
- kind?: "choice" | "multi-choice";
157
- multiple?: boolean;
158
- question?: string;
159
- };
160
- meta?: Record<string, unknown>;
161
- }, {
162
- type?: "interrupt";
163
- node?: string;
164
- requestId?: string;
165
- resumeToken?: string;
166
- workflow?: string;
167
- input?: {
168
- options?: never[];
169
- kind?: "text";
170
- multiple?: boolean;
171
- question?: string;
172
- } | {
173
- options?: {
174
- id?: string;
175
- label?: string;
176
- description?: string;
177
- }[];
178
- kind?: "choice" | "multi-choice";
179
- multiple?: boolean;
180
- question?: string;
181
- };
182
- meta?: Record<string, unknown>;
183
- }>, z.ZodDiscriminatedUnion<"dataType", [z.ZodObject<{
184
- type: z.ZodLiteral<"structured-data">;
185
- dataType: z.ZodLiteral<"jobs">;
186
- node: z.ZodOptional<z.ZodString>;
187
- data: z.ZodObject<{
188
- jobs: z.ZodArray<z.ZodObject<{
189
- id: z.ZodString;
190
- title: z.ZodString;
191
- company: z.ZodString;
192
- location: z.ZodString;
193
- match: z.ZodNumber;
194
- }, "strip", z.ZodTypeAny, {
195
- id?: string;
196
- title?: string;
197
- company?: string;
198
- location?: string;
199
- match?: number;
200
- }, {
201
- id?: string;
202
- title?: string;
203
- company?: string;
204
- location?: string;
205
- match?: number;
206
- }>, "many">;
207
- reasoning: z.ZodOptional<z.ZodString>;
208
- }, "strip", z.ZodTypeAny, {
209
- jobs?: {
210
- id?: string;
211
- title?: string;
212
- company?: string;
213
- location?: string;
214
- match?: number;
215
- }[];
216
- reasoning?: string;
217
- }, {
218
- jobs?: {
219
- id?: string;
220
- title?: string;
221
- company?: string;
222
- location?: string;
223
- match?: number;
224
- }[];
225
- reasoning?: string;
226
- }>;
227
- }, "strip", z.ZodTypeAny, {
228
- type?: "structured-data";
229
- dataType?: "jobs";
230
- node?: string;
231
- data?: {
232
- jobs?: {
233
- id?: string;
234
- title?: string;
235
- company?: string;
236
- location?: string;
237
- match?: number;
238
- }[];
239
- reasoning?: string;
240
- };
241
- }, {
242
- type?: "structured-data";
243
- dataType?: "jobs";
244
- node?: string;
245
- data?: {
246
- jobs?: {
247
- id?: string;
248
- title?: string;
249
- company?: string;
250
- location?: string;
251
- match?: number;
252
- }[];
253
- reasoning?: string;
254
- };
255
- }>]>, z.ZodObject<{
256
- type: z.ZodLiteral<"transition">;
257
- transitionTo: z.ZodString;
258
- payload: z.ZodOptional<z.ZodAny>;
259
- }, "strip", z.ZodTypeAny, {
260
- type?: "transition";
261
- transitionTo?: string;
262
- payload?: any;
263
- }, {
264
- type?: "transition";
265
- transitionTo?: string;
266
- payload?: any;
267
- }>, z.ZodObject<{
268
- type: z.ZodLiteral<"done">;
269
- data: z.ZodOptional<z.ZodAny>;
270
- }, "strip", z.ZodTypeAny, {
271
- type?: "done";
272
- data?: any;
273
- }, {
274
- type?: "done";
275
- data?: any;
276
- }>, z.ZodObject<{
277
- type: z.ZodLiteral<"error">;
278
- message: z.ZodString;
279
- }, "strip", z.ZodTypeAny, {
280
- message?: string;
281
- type?: "error";
282
- }, {
283
- message?: string;
284
- type?: "error";
285
- }>]>, "many">;
286
- transitionTo: z.ZodOptional<z.ZodString>;
287
- payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
288
- error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
289
- message: z.ZodString;
290
- code: z.ZodOptional<z.ZodString>;
291
- cause: z.ZodOptional<z.ZodUnknown>;
292
- }, "strip", z.ZodTypeAny, {
293
- code?: string;
294
- message?: string;
295
- cause?: unknown;
296
- }, {
297
- code?: string;
298
- message?: string;
299
- cause?: unknown;
300
- }>>>;
301
- }, "strip", z.ZodTypeAny, {
302
- transitionTo?: string;
303
- payload?: Record<string, any>;
304
- error?: {
305
- code?: string;
306
- message?: string;
307
- cause?: unknown;
308
- };
309
- chunks?: ({
310
- type?: "structured-data";
311
- dataType?: "jobs";
312
- node?: string;
313
- data?: {
314
- jobs?: {
315
- id?: string;
316
- title?: string;
317
- company?: string;
318
- location?: string;
319
- match?: number;
320
- }[];
321
- reasoning?: string;
322
- };
323
- } | {
324
- type?: "session";
325
- sessionId?: string;
326
- } | {
327
- message?: string;
328
- type?: "status";
329
- node?: string;
330
- } | {
331
- type?: "message";
332
- node?: string;
333
- content?: string;
334
- } | {
335
- type?: "text-start";
336
- node?: string;
337
- } | {
338
- type?: "text-delta";
339
- node?: string;
340
- delta?: string;
341
- } | {
342
- type?: "text-end";
343
- node?: string;
344
- } | {
345
- type?: "tool-result";
346
- node?: string;
347
- content?: unknown;
348
- tool?: string;
349
- } | {
350
- type?: "interrupt";
351
- node?: string;
352
- requestId?: string;
353
- resumeToken?: string;
354
- workflow?: string;
355
- input?: {
356
- options?: never[];
357
- kind?: "text";
358
- multiple?: boolean;
359
- question?: string;
360
- } | {
361
- options?: {
362
- id?: string;
363
- label?: string;
364
- description?: string;
365
- }[];
366
- kind?: "choice" | "multi-choice";
367
- multiple?: boolean;
368
- question?: string;
369
- };
370
- meta?: Record<string, unknown>;
371
- } | {
372
- type?: "transition";
373
- transitionTo?: string;
374
- payload?: any;
375
- } | {
376
- type?: "done";
377
- data?: any;
378
- } | {
379
- message?: string;
380
- type?: "error";
381
- })[];
382
- }, {
383
- transitionTo?: string;
384
- payload?: Record<string, any>;
385
- error?: {
386
- code?: string;
387
- message?: string;
388
- cause?: unknown;
389
- };
390
- chunks?: ({
391
- type?: "structured-data";
392
- dataType?: "jobs";
393
- node?: string;
394
- data?: {
395
- jobs?: {
396
- id?: string;
397
- title?: string;
398
- company?: string;
399
- location?: string;
400
- match?: number;
401
- }[];
402
- reasoning?: string;
403
- };
404
- } | {
405
- type?: "session";
406
- sessionId?: string;
407
- } | {
408
- message?: string;
409
- type?: "status";
410
- node?: string;
411
- } | {
412
- type?: "message";
413
- node?: string;
414
- content?: string;
415
- } | {
416
- type?: "text-start";
417
- node?: string;
418
- } | {
419
- type?: "text-delta";
420
- node?: string;
421
- delta?: string;
422
- } | {
423
- type?: "text-end";
424
- node?: string;
425
- } | {
426
- type?: "tool-result";
427
- node?: string;
428
- content?: unknown;
429
- tool?: string;
430
- } | {
431
- type?: "interrupt";
432
- node?: string;
433
- requestId?: string;
434
- resumeToken?: string;
435
- workflow?: string;
436
- input?: {
437
- options?: never[];
438
- kind?: "text";
439
- multiple?: boolean;
440
- question?: string;
441
- } | {
442
- options?: {
443
- id?: string;
444
- label?: string;
445
- description?: string;
446
- }[];
447
- kind?: "choice" | "multi-choice";
448
- multiple?: boolean;
449
- question?: string;
450
- };
451
- meta?: Record<string, unknown>;
452
- } | {
453
- type?: "transition";
454
- transitionTo?: string;
455
- payload?: any;
456
- } | {
457
- type?: "done";
458
- data?: any;
459
- } | {
460
- message?: string;
461
- type?: "error";
462
- })[];
463
- }>;
464
- export type StreamResult = z.infer<typeof StreamResultSchema>;
465
- //# sourceMappingURL=stream-result.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream-result.d.ts","sourceRoot":"","sources":["../../src/types/stream-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StreamResultSchema = void 0;
4
- const zod_1 = require("zod");
5
- const stream_chunk_1 = require("./stream-chunk");
6
- exports.StreamResultSchema = zod_1.z.object({
7
- chunks: zod_1.z.array(stream_chunk_1.StreamChunkSchema),
8
- transitionTo: zod_1.z.string().optional(),
9
- payload: zod_1.z.record(zod_1.z.any()).optional(),
10
- error: zod_1.z
11
- .object({
12
- message: zod_1.z.string(),
13
- code: zod_1.z.string().optional(),
14
- cause: zod_1.z.unknown().optional(),
15
- })
16
- .nullable()
17
- .optional(),
18
- });
@@ -1,76 +0,0 @@
1
- import { z } from "zod";
2
- export declare const StructuredDataChunkSchema: z.ZodDiscriminatedUnion<"dataType", [z.ZodObject<{
3
- type: z.ZodLiteral<"structured-data">;
4
- dataType: z.ZodLiteral<"jobs">;
5
- node: z.ZodOptional<z.ZodString>;
6
- data: z.ZodObject<{
7
- jobs: z.ZodArray<z.ZodObject<{
8
- id: z.ZodString;
9
- title: z.ZodString;
10
- company: z.ZodString;
11
- location: z.ZodString;
12
- match: z.ZodNumber;
13
- }, "strip", z.ZodTypeAny, {
14
- id?: string;
15
- title?: string;
16
- company?: string;
17
- location?: string;
18
- match?: number;
19
- }, {
20
- id?: string;
21
- title?: string;
22
- company?: string;
23
- location?: string;
24
- match?: number;
25
- }>, "many">;
26
- reasoning: z.ZodOptional<z.ZodString>;
27
- }, "strip", z.ZodTypeAny, {
28
- jobs?: {
29
- id?: string;
30
- title?: string;
31
- company?: string;
32
- location?: string;
33
- match?: number;
34
- }[];
35
- reasoning?: string;
36
- }, {
37
- jobs?: {
38
- id?: string;
39
- title?: string;
40
- company?: string;
41
- location?: string;
42
- match?: number;
43
- }[];
44
- reasoning?: string;
45
- }>;
46
- }, "strip", z.ZodTypeAny, {
47
- type?: "structured-data";
48
- dataType?: "jobs";
49
- node?: string;
50
- data?: {
51
- jobs?: {
52
- id?: string;
53
- title?: string;
54
- company?: string;
55
- location?: string;
56
- match?: number;
57
- }[];
58
- reasoning?: string;
59
- };
60
- }, {
61
- type?: "structured-data";
62
- dataType?: "jobs";
63
- node?: string;
64
- data?: {
65
- jobs?: {
66
- id?: string;
67
- title?: string;
68
- company?: string;
69
- location?: string;
70
- match?: number;
71
- }[];
72
- reasoning?: string;
73
- };
74
- }>]>;
75
- export type StructuredDataChunk = z.infer<typeof StructuredDataChunkSchema>;
76
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/structured-data/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAepC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StructuredDataChunkSchema = void 0;
4
- const zod_1 = require("zod");
5
- const jobs_1 = require("./jobs");
6
- exports.StructuredDataChunkSchema = zod_1.z.discriminatedUnion("dataType", [
7
- zod_1.z.object({
8
- type: zod_1.z.literal("structured-data"),
9
- dataType: zod_1.z.literal("jobs"),
10
- node: zod_1.z.string().optional(),
11
- data: jobs_1.JobsStructuredData,
12
- }),
13
- ]);
@@ -1,43 +0,0 @@
1
- import { z } from "zod";
2
- export declare const JobsStructuredData: z.ZodObject<{
3
- jobs: z.ZodArray<z.ZodObject<{
4
- id: z.ZodString;
5
- title: z.ZodString;
6
- company: z.ZodString;
7
- location: z.ZodString;
8
- match: z.ZodNumber;
9
- }, "strip", z.ZodTypeAny, {
10
- id?: string;
11
- title?: string;
12
- company?: string;
13
- location?: string;
14
- match?: number;
15
- }, {
16
- id?: string;
17
- title?: string;
18
- company?: string;
19
- location?: string;
20
- match?: number;
21
- }>, "many">;
22
- reasoning: z.ZodOptional<z.ZodString>;
23
- }, "strip", z.ZodTypeAny, {
24
- jobs?: {
25
- id?: string;
26
- title?: string;
27
- company?: string;
28
- location?: string;
29
- match?: number;
30
- }[];
31
- reasoning?: string;
32
- }, {
33
- jobs?: {
34
- id?: string;
35
- title?: string;
36
- company?: string;
37
- location?: string;
38
- match?: number;
39
- }[];
40
- reasoning?: string;
41
- }>;
42
- export type JobsStructuredData = z.infer<typeof JobsStructuredData>;
43
- //# sourceMappingURL=jobs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../../src/types/structured-data/jobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW7B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JobsStructuredData = void 0;
4
- const zod_1 = require("zod");
5
- exports.JobsStructuredData = zod_1.z.object({
6
- jobs: zod_1.z.array(zod_1.z.object({
7
- id: zod_1.z.string(),
8
- title: zod_1.z.string(),
9
- company: zod_1.z.string(),
10
- location: zod_1.z.string(),
11
- match: zod_1.z.number(),
12
- })),
13
- reasoning: zod_1.z.string().optional(),
14
- });