@picoflow/core 1.0.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 (74) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +37 -0
  3. package/clients/http-client.d.ts +13 -0
  4. package/clients/http-client.js +1 -0
  5. package/clients/self-client.d.ts +4 -0
  6. package/clients/self-client.js +1 -0
  7. package/configs/core-config.d.ts +22 -0
  8. package/configs/core-config.js +1 -0
  9. package/decorators/stop-tool.d.ts +2 -0
  10. package/decorators/stop-tool.js +1 -0
  11. package/flow/content-type.d.ts +38 -0
  12. package/flow/content-type.js +1 -0
  13. package/flow/end-step.d.ts +14 -0
  14. package/flow/end-step.js +1 -0
  15. package/flow/flow-creator.d.ts +7 -0
  16. package/flow/flow-creator.js +1 -0
  17. package/flow/flow-types.d.ts +718 -0
  18. package/flow/flow-types.js +1 -0
  19. package/flow/flow.d.ts +55 -0
  20. package/flow/flow.js +1 -0
  21. package/flow/llm-runner.d.ts +11 -0
  22. package/flow/llm-runner.js +1 -0
  23. package/flow/logic-runner.d.ts +6 -0
  24. package/flow/logic-runner.js +1 -0
  25. package/flow/logic-step.d.ts +8 -0
  26. package/flow/logic-step.js +1 -0
  27. package/flow/memory.d.ts +10 -0
  28. package/flow/memory.js +1 -0
  29. package/flow/step.d.ts +63 -0
  30. package/flow/step.js +1 -0
  31. package/index.d.ts +34 -0
  32. package/index.js +47 -0
  33. package/package.json +34 -0
  34. package/prompt/endchat.md +6 -0
  35. package/prompt/flow-prompt.d.ts +3 -0
  36. package/prompt/flow-prompt.js +1 -0
  37. package/prompt/prompt-util.d.ts +7 -0
  38. package/prompt/prompt-util.js +1 -0
  39. package/services/flow-engine.d.ts +55 -0
  40. package/services/flow-engine.js +1 -0
  41. package/session/cosmo-session.d.ts +14 -0
  42. package/session/cosmo-session.js +1 -0
  43. package/session/file-session.d.ts +12 -0
  44. package/session/file-session.js +1 -0
  45. package/session/flow-session.d.ts +15 -0
  46. package/session/flow-session.js +1 -0
  47. package/session/mongo-session.d.ts +13 -0
  48. package/session/mongo-session.js +1 -0
  49. package/session/session-adaptor.d.ts +9 -0
  50. package/session/session-adaptor.js +1 -0
  51. package/session/session-logger.d.ts +12 -0
  52. package/session/session-logger.js +1 -0
  53. package/utils/constants.d.ts +7 -0
  54. package/utils/constants.js +1 -0
  55. package/utils/environ.d.ts +2 -0
  56. package/utils/environ.js +1 -0
  57. package/utils/errors.d.ts +28 -0
  58. package/utils/errors.js +1 -0
  59. package/utils/license-util.d.ts +17 -0
  60. package/utils/license-util.js +1 -0
  61. package/utils/llm-file.d.ts +22 -0
  62. package/utils/llm-file.js +1 -0
  63. package/utils/logic.d.ts +5 -0
  64. package/utils/logic.js +1 -0
  65. package/utils/message-util.d.ts +47 -0
  66. package/utils/message-util.js +1 -0
  67. package/utils/retry.d.ts +13 -0
  68. package/utils/retry.js +1 -0
  69. package/utils/string-util.d.ts +6 -0
  70. package/utils/string-util.js +1 -0
  71. package/utils/tool-util.d.ts +5 -0
  72. package/utils/tool-util.js +1 -0
  73. package/utils/verify-license.d.ts +1 -0
  74. package/utils/verify-license.js +1 -0
@@ -0,0 +1,718 @@
1
+ import { z } from 'zod';
2
+ import { HttpContentType } from './content-type';
3
+ import { Step } from './step';
4
+ import { MessageTypes } from '../utils/message-util';
5
+ declare const ChatMessageSchema: z.ZodObject<{
6
+ id: z.ZodString;
7
+ type: z.ZodEnum<["system", "human", "ai", "tool"]>;
8
+ content: z.ZodString;
9
+ timestamp: z.ZodDate;
10
+ tool_call_id: z.ZodOptional<z.ZodString>;
11
+ name: z.ZodString;
12
+ status: z.ZodOptional<z.ZodEnum<["success", "error"]>>;
13
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
14
+ name: z.ZodString;
15
+ args: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
16
+ id: z.ZodString;
17
+ }, "strip", z.ZodTypeAny, {
18
+ id?: string;
19
+ name?: string;
20
+ args?: {};
21
+ }, {
22
+ id?: string;
23
+ name?: string;
24
+ args?: {};
25
+ }>, "many">>;
26
+ additional_kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ content?: string;
29
+ tool_calls?: {
30
+ id?: string;
31
+ name?: string;
32
+ args?: {};
33
+ }[];
34
+ type?: "ai" | "human" | "system" | "tool";
35
+ id?: string;
36
+ name?: string;
37
+ additional_kwargs?: Record<string, any>;
38
+ status?: "success" | "error";
39
+ timestamp?: Date;
40
+ tool_call_id?: string;
41
+ }, {
42
+ content?: string;
43
+ tool_calls?: {
44
+ id?: string;
45
+ name?: string;
46
+ args?: {};
47
+ }[];
48
+ type?: "ai" | "human" | "system" | "tool";
49
+ id?: string;
50
+ name?: string;
51
+ additional_kwargs?: Record<string, any>;
52
+ status?: "success" | "error";
53
+ timestamp?: Date;
54
+ tool_call_id?: string;
55
+ }>;
56
+ export type ChatMessageType = z.infer<typeof ChatMessageSchema>;
57
+ declare const StepSchema: z.ZodObject<{
58
+ name: z.ZodString;
59
+ isActive: z.ZodBoolean;
60
+ state: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
61
+ modelName: z.ZodString;
62
+ temperature: z.ZodNumber;
63
+ }, "strip", z.ZodTypeAny, {
64
+ name?: string;
65
+ isActive?: boolean;
66
+ state?: {};
67
+ modelName?: string;
68
+ temperature?: number;
69
+ }, {
70
+ name?: string;
71
+ isActive?: boolean;
72
+ state?: {};
73
+ modelName?: string;
74
+ temperature?: number;
75
+ }>;
76
+ export type StepType = z.infer<typeof StepSchema>;
77
+ declare const MemorySchema: z.ZodObject<{
78
+ nameSpace: z.ZodString;
79
+ history: z.ZodArray<z.ZodObject<{
80
+ id: z.ZodString;
81
+ type: z.ZodEnum<["system", "human", "ai", "tool"]>;
82
+ content: z.ZodString;
83
+ timestamp: z.ZodDate;
84
+ tool_call_id: z.ZodOptional<z.ZodString>;
85
+ name: z.ZodString;
86
+ status: z.ZodOptional<z.ZodEnum<["success", "error"]>>;
87
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
88
+ name: z.ZodString;
89
+ args: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
90
+ id: z.ZodString;
91
+ }, "strip", z.ZodTypeAny, {
92
+ id?: string;
93
+ name?: string;
94
+ args?: {};
95
+ }, {
96
+ id?: string;
97
+ name?: string;
98
+ args?: {};
99
+ }>, "many">>;
100
+ additional_kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ content?: string;
103
+ tool_calls?: {
104
+ id?: string;
105
+ name?: string;
106
+ args?: {};
107
+ }[];
108
+ type?: "ai" | "human" | "system" | "tool";
109
+ id?: string;
110
+ name?: string;
111
+ additional_kwargs?: Record<string, any>;
112
+ status?: "success" | "error";
113
+ timestamp?: Date;
114
+ tool_call_id?: string;
115
+ }, {
116
+ content?: string;
117
+ tool_calls?: {
118
+ id?: string;
119
+ name?: string;
120
+ args?: {};
121
+ }[];
122
+ type?: "ai" | "human" | "system" | "tool";
123
+ id?: string;
124
+ name?: string;
125
+ additional_kwargs?: Record<string, any>;
126
+ status?: "success" | "error";
127
+ timestamp?: Date;
128
+ tool_call_id?: string;
129
+ }>, "many">;
130
+ }, "strip", z.ZodTypeAny, {
131
+ nameSpace?: string;
132
+ history?: {
133
+ content?: string;
134
+ tool_calls?: {
135
+ id?: string;
136
+ name?: string;
137
+ args?: {};
138
+ }[];
139
+ type?: "ai" | "human" | "system" | "tool";
140
+ id?: string;
141
+ name?: string;
142
+ additional_kwargs?: Record<string, any>;
143
+ status?: "success" | "error";
144
+ timestamp?: Date;
145
+ tool_call_id?: string;
146
+ }[];
147
+ }, {
148
+ nameSpace?: string;
149
+ history?: {
150
+ content?: string;
151
+ tool_calls?: {
152
+ id?: string;
153
+ name?: string;
154
+ args?: {};
155
+ }[];
156
+ type?: "ai" | "human" | "system" | "tool";
157
+ id?: string;
158
+ name?: string;
159
+ additional_kwargs?: Record<string, any>;
160
+ status?: "success" | "error";
161
+ timestamp?: Date;
162
+ tool_call_id?: string;
163
+ }[];
164
+ }>;
165
+ export type MemoryType = z.infer<typeof MemorySchema>;
166
+ declare const FlowSchema: z.ZodObject<{
167
+ name: z.ZodString;
168
+ memory: z.ZodArray<z.ZodObject<{
169
+ nameSpace: z.ZodString;
170
+ history: z.ZodArray<z.ZodObject<{
171
+ id: z.ZodString;
172
+ type: z.ZodEnum<["system", "human", "ai", "tool"]>;
173
+ content: z.ZodString;
174
+ timestamp: z.ZodDate;
175
+ tool_call_id: z.ZodOptional<z.ZodString>;
176
+ name: z.ZodString;
177
+ status: z.ZodOptional<z.ZodEnum<["success", "error"]>>;
178
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
179
+ name: z.ZodString;
180
+ args: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
181
+ id: z.ZodString;
182
+ }, "strip", z.ZodTypeAny, {
183
+ id?: string;
184
+ name?: string;
185
+ args?: {};
186
+ }, {
187
+ id?: string;
188
+ name?: string;
189
+ args?: {};
190
+ }>, "many">>;
191
+ additional_kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ content?: string;
194
+ tool_calls?: {
195
+ id?: string;
196
+ name?: string;
197
+ args?: {};
198
+ }[];
199
+ type?: "ai" | "human" | "system" | "tool";
200
+ id?: string;
201
+ name?: string;
202
+ additional_kwargs?: Record<string, any>;
203
+ status?: "success" | "error";
204
+ timestamp?: Date;
205
+ tool_call_id?: string;
206
+ }, {
207
+ content?: string;
208
+ tool_calls?: {
209
+ id?: string;
210
+ name?: string;
211
+ args?: {};
212
+ }[];
213
+ type?: "ai" | "human" | "system" | "tool";
214
+ id?: string;
215
+ name?: string;
216
+ additional_kwargs?: Record<string, any>;
217
+ status?: "success" | "error";
218
+ timestamp?: Date;
219
+ tool_call_id?: string;
220
+ }>, "many">;
221
+ }, "strip", z.ZodTypeAny, {
222
+ nameSpace?: string;
223
+ history?: {
224
+ content?: string;
225
+ tool_calls?: {
226
+ id?: string;
227
+ name?: string;
228
+ args?: {};
229
+ }[];
230
+ type?: "ai" | "human" | "system" | "tool";
231
+ id?: string;
232
+ name?: string;
233
+ additional_kwargs?: Record<string, any>;
234
+ status?: "success" | "error";
235
+ timestamp?: Date;
236
+ tool_call_id?: string;
237
+ }[];
238
+ }, {
239
+ nameSpace?: string;
240
+ history?: {
241
+ content?: string;
242
+ tool_calls?: {
243
+ id?: string;
244
+ name?: string;
245
+ args?: {};
246
+ }[];
247
+ type?: "ai" | "human" | "system" | "tool";
248
+ id?: string;
249
+ name?: string;
250
+ additional_kwargs?: Record<string, any>;
251
+ status?: "success" | "error";
252
+ timestamp?: Date;
253
+ tool_call_id?: string;
254
+ }[];
255
+ }>, "many">;
256
+ steps: z.ZodArray<z.ZodObject<{
257
+ name: z.ZodString;
258
+ isActive: z.ZodBoolean;
259
+ state: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
260
+ modelName: z.ZodString;
261
+ temperature: z.ZodNumber;
262
+ }, "strip", z.ZodTypeAny, {
263
+ name?: string;
264
+ isActive?: boolean;
265
+ state?: {};
266
+ modelName?: string;
267
+ temperature?: number;
268
+ }, {
269
+ name?: string;
270
+ isActive?: boolean;
271
+ state?: {};
272
+ modelName?: string;
273
+ temperature?: number;
274
+ }>, "many">;
275
+ context: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
276
+ temperature: z.ZodNumber;
277
+ sequence: z.ZodArray<z.ZodString, "many">;
278
+ }, "strip", z.ZodTypeAny, {
279
+ name?: string;
280
+ memory?: {
281
+ nameSpace?: string;
282
+ history?: {
283
+ content?: string;
284
+ tool_calls?: {
285
+ id?: string;
286
+ name?: string;
287
+ args?: {};
288
+ }[];
289
+ type?: "ai" | "human" | "system" | "tool";
290
+ id?: string;
291
+ name?: string;
292
+ additional_kwargs?: Record<string, any>;
293
+ status?: "success" | "error";
294
+ timestamp?: Date;
295
+ tool_call_id?: string;
296
+ }[];
297
+ }[];
298
+ steps?: {
299
+ name?: string;
300
+ isActive?: boolean;
301
+ state?: {};
302
+ modelName?: string;
303
+ temperature?: number;
304
+ }[];
305
+ temperature?: number;
306
+ context?: {};
307
+ sequence?: string[];
308
+ }, {
309
+ name?: string;
310
+ memory?: {
311
+ nameSpace?: string;
312
+ history?: {
313
+ content?: string;
314
+ tool_calls?: {
315
+ id?: string;
316
+ name?: string;
317
+ args?: {};
318
+ }[];
319
+ type?: "ai" | "human" | "system" | "tool";
320
+ id?: string;
321
+ name?: string;
322
+ additional_kwargs?: Record<string, any>;
323
+ status?: "success" | "error";
324
+ timestamp?: Date;
325
+ tool_call_id?: string;
326
+ }[];
327
+ }[];
328
+ steps?: {
329
+ name?: string;
330
+ isActive?: boolean;
331
+ state?: {};
332
+ modelName?: string;
333
+ temperature?: number;
334
+ }[];
335
+ temperature?: number;
336
+ context?: {};
337
+ sequence?: string[];
338
+ }>;
339
+ export type FlowType = z.infer<typeof FlowSchema>;
340
+ declare const _SessionSchema: z.ZodObject<{
341
+ id: z.ZodString;
342
+ createdOn: z.ZodDate;
343
+ saveOn: z.ZodDate;
344
+ runStatus: z.ZodEnum<["completed", "aborted", "running"]>;
345
+ version: z.ZodNumber;
346
+ expireAfter: z.ZodNumber;
347
+ flows: z.ZodArray<z.ZodObject<{
348
+ name: z.ZodString;
349
+ memory: z.ZodArray<z.ZodObject<{
350
+ nameSpace: z.ZodString;
351
+ history: z.ZodArray<z.ZodObject<{
352
+ id: z.ZodString;
353
+ type: z.ZodEnum<["system", "human", "ai", "tool"]>;
354
+ content: z.ZodString;
355
+ timestamp: z.ZodDate;
356
+ tool_call_id: z.ZodOptional<z.ZodString>;
357
+ name: z.ZodString;
358
+ status: z.ZodOptional<z.ZodEnum<["success", "error"]>>;
359
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
360
+ name: z.ZodString;
361
+ args: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
362
+ id: z.ZodString;
363
+ }, "strip", z.ZodTypeAny, {
364
+ id?: string;
365
+ name?: string;
366
+ args?: {};
367
+ }, {
368
+ id?: string;
369
+ name?: string;
370
+ args?: {};
371
+ }>, "many">>;
372
+ additional_kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
373
+ }, "strip", z.ZodTypeAny, {
374
+ content?: string;
375
+ tool_calls?: {
376
+ id?: string;
377
+ name?: string;
378
+ args?: {};
379
+ }[];
380
+ type?: "ai" | "human" | "system" | "tool";
381
+ id?: string;
382
+ name?: string;
383
+ additional_kwargs?: Record<string, any>;
384
+ status?: "success" | "error";
385
+ timestamp?: Date;
386
+ tool_call_id?: string;
387
+ }, {
388
+ content?: string;
389
+ tool_calls?: {
390
+ id?: string;
391
+ name?: string;
392
+ args?: {};
393
+ }[];
394
+ type?: "ai" | "human" | "system" | "tool";
395
+ id?: string;
396
+ name?: string;
397
+ additional_kwargs?: Record<string, any>;
398
+ status?: "success" | "error";
399
+ timestamp?: Date;
400
+ tool_call_id?: string;
401
+ }>, "many">;
402
+ }, "strip", z.ZodTypeAny, {
403
+ nameSpace?: string;
404
+ history?: {
405
+ content?: string;
406
+ tool_calls?: {
407
+ id?: string;
408
+ name?: string;
409
+ args?: {};
410
+ }[];
411
+ type?: "ai" | "human" | "system" | "tool";
412
+ id?: string;
413
+ name?: string;
414
+ additional_kwargs?: Record<string, any>;
415
+ status?: "success" | "error";
416
+ timestamp?: Date;
417
+ tool_call_id?: string;
418
+ }[];
419
+ }, {
420
+ nameSpace?: string;
421
+ history?: {
422
+ content?: string;
423
+ tool_calls?: {
424
+ id?: string;
425
+ name?: string;
426
+ args?: {};
427
+ }[];
428
+ type?: "ai" | "human" | "system" | "tool";
429
+ id?: string;
430
+ name?: string;
431
+ additional_kwargs?: Record<string, any>;
432
+ status?: "success" | "error";
433
+ timestamp?: Date;
434
+ tool_call_id?: string;
435
+ }[];
436
+ }>, "many">;
437
+ steps: z.ZodArray<z.ZodObject<{
438
+ name: z.ZodString;
439
+ isActive: z.ZodBoolean;
440
+ state: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
441
+ modelName: z.ZodString;
442
+ temperature: z.ZodNumber;
443
+ }, "strip", z.ZodTypeAny, {
444
+ name?: string;
445
+ isActive?: boolean;
446
+ state?: {};
447
+ modelName?: string;
448
+ temperature?: number;
449
+ }, {
450
+ name?: string;
451
+ isActive?: boolean;
452
+ state?: {};
453
+ modelName?: string;
454
+ temperature?: number;
455
+ }>, "many">;
456
+ context: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
457
+ temperature: z.ZodNumber;
458
+ sequence: z.ZodArray<z.ZodString, "many">;
459
+ }, "strip", z.ZodTypeAny, {
460
+ name?: string;
461
+ memory?: {
462
+ nameSpace?: string;
463
+ history?: {
464
+ content?: string;
465
+ tool_calls?: {
466
+ id?: string;
467
+ name?: string;
468
+ args?: {};
469
+ }[];
470
+ type?: "ai" | "human" | "system" | "tool";
471
+ id?: string;
472
+ name?: string;
473
+ additional_kwargs?: Record<string, any>;
474
+ status?: "success" | "error";
475
+ timestamp?: Date;
476
+ tool_call_id?: string;
477
+ }[];
478
+ }[];
479
+ steps?: {
480
+ name?: string;
481
+ isActive?: boolean;
482
+ state?: {};
483
+ modelName?: string;
484
+ temperature?: number;
485
+ }[];
486
+ temperature?: number;
487
+ context?: {};
488
+ sequence?: string[];
489
+ }, {
490
+ name?: string;
491
+ memory?: {
492
+ nameSpace?: string;
493
+ history?: {
494
+ content?: string;
495
+ tool_calls?: {
496
+ id?: string;
497
+ name?: string;
498
+ args?: {};
499
+ }[];
500
+ type?: "ai" | "human" | "system" | "tool";
501
+ id?: string;
502
+ name?: string;
503
+ additional_kwargs?: Record<string, any>;
504
+ status?: "success" | "error";
505
+ timestamp?: Date;
506
+ tool_call_id?: string;
507
+ }[];
508
+ }[];
509
+ steps?: {
510
+ name?: string;
511
+ isActive?: boolean;
512
+ state?: {};
513
+ modelName?: string;
514
+ temperature?: number;
515
+ }[];
516
+ temperature?: number;
517
+ context?: {};
518
+ sequence?: string[];
519
+ }>, "many">;
520
+ log: z.ZodArray<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, "many">;
521
+ error: z.ZodArray<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, "many">;
522
+ warn: z.ZodArray<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, "many">;
523
+ debug: z.ZodArray<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, "many">;
524
+ verbose: z.ZodArray<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, "many">;
525
+ tokens: z.ZodObject<{
526
+ inputTokens: z.ZodNumber;
527
+ outputTokens: z.ZodNumber;
528
+ totalTokens: z.ZodNumber;
529
+ }, "strip", z.ZodTypeAny, {
530
+ inputTokens?: number;
531
+ outputTokens?: number;
532
+ totalTokens?: number;
533
+ }, {
534
+ inputTokens?: number;
535
+ outputTokens?: number;
536
+ totalTokens?: number;
537
+ }>;
538
+ }, "strip", z.ZodTypeAny, {
539
+ id?: string;
540
+ error?: {}[];
541
+ createdOn?: Date;
542
+ saveOn?: Date;
543
+ runStatus?: "completed" | "aborted" | "running";
544
+ version?: number;
545
+ expireAfter?: number;
546
+ flows?: {
547
+ name?: string;
548
+ memory?: {
549
+ nameSpace?: string;
550
+ history?: {
551
+ content?: string;
552
+ tool_calls?: {
553
+ id?: string;
554
+ name?: string;
555
+ args?: {};
556
+ }[];
557
+ type?: "ai" | "human" | "system" | "tool";
558
+ id?: string;
559
+ name?: string;
560
+ additional_kwargs?: Record<string, any>;
561
+ status?: "success" | "error";
562
+ timestamp?: Date;
563
+ tool_call_id?: string;
564
+ }[];
565
+ }[];
566
+ steps?: {
567
+ name?: string;
568
+ isActive?: boolean;
569
+ state?: {};
570
+ modelName?: string;
571
+ temperature?: number;
572
+ }[];
573
+ temperature?: number;
574
+ context?: {};
575
+ sequence?: string[];
576
+ }[];
577
+ log?: {}[];
578
+ warn?: {}[];
579
+ debug?: {}[];
580
+ verbose?: {}[];
581
+ tokens?: {
582
+ inputTokens?: number;
583
+ outputTokens?: number;
584
+ totalTokens?: number;
585
+ };
586
+ }, {
587
+ id?: string;
588
+ error?: {}[];
589
+ createdOn?: Date;
590
+ saveOn?: Date;
591
+ runStatus?: "completed" | "aborted" | "running";
592
+ version?: number;
593
+ expireAfter?: number;
594
+ flows?: {
595
+ name?: string;
596
+ memory?: {
597
+ nameSpace?: string;
598
+ history?: {
599
+ content?: string;
600
+ tool_calls?: {
601
+ id?: string;
602
+ name?: string;
603
+ args?: {};
604
+ }[];
605
+ type?: "ai" | "human" | "system" | "tool";
606
+ id?: string;
607
+ name?: string;
608
+ additional_kwargs?: Record<string, any>;
609
+ status?: "success" | "error";
610
+ timestamp?: Date;
611
+ tool_call_id?: string;
612
+ }[];
613
+ }[];
614
+ steps?: {
615
+ name?: string;
616
+ isActive?: boolean;
617
+ state?: {};
618
+ modelName?: string;
619
+ temperature?: number;
620
+ }[];
621
+ temperature?: number;
622
+ context?: {};
623
+ sequence?: string[];
624
+ }[];
625
+ log?: {}[];
626
+ warn?: {}[];
627
+ debug?: {}[];
628
+ verbose?: {}[];
629
+ tokens?: {
630
+ inputTokens?: number;
631
+ outputTokens?: number;
632
+ totalTokens?: number;
633
+ };
634
+ }>;
635
+ export type SessionType = z.infer<typeof _SessionSchema>;
636
+ export type ClassType = {
637
+ new (...args: any[]): any;
638
+ };
639
+ export declare enum ToolStatus {
640
+ success = "success",
641
+ error = "error"
642
+ }
643
+ declare const _ToolSchema: z.ZodObject<{
644
+ name: z.ZodString;
645
+ description: z.ZodString;
646
+ schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
647
+ }, "strip", z.ZodTypeAny, {
648
+ name?: string;
649
+ description?: string;
650
+ schema?: {};
651
+ }, {
652
+ name?: string;
653
+ description?: string;
654
+ schema?: {};
655
+ }>;
656
+ export type ToolType = z.infer<typeof _ToolSchema>;
657
+ declare const RunResponseSchema: z.ZodObject<{
658
+ success: z.ZodBoolean;
659
+ completed: z.ZodBoolean;
660
+ message: z.ZodString;
661
+ session: z.ZodString;
662
+ contentType: z.ZodNativeEnum<typeof HttpContentType>;
663
+ }, "strip", z.ZodTypeAny, {
664
+ message?: string;
665
+ success?: boolean;
666
+ completed?: boolean;
667
+ contentType?: HttpContentType;
668
+ session?: string;
669
+ }, {
670
+ message?: string;
671
+ success?: boolean;
672
+ completed?: boolean;
673
+ contentType?: HttpContentType;
674
+ session?: string;
675
+ }>;
676
+ export type RunResponseType = z.infer<typeof RunResponseSchema>;
677
+ declare const RunResponseDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
678
+ success: z.ZodBoolean;
679
+ completed: z.ZodBoolean;
680
+ message: z.ZodString;
681
+ session: z.ZodString;
682
+ contentType: z.ZodNativeEnum<typeof HttpContentType>;
683
+ }, "strip", z.ZodTypeAny, {
684
+ message?: string;
685
+ success?: boolean;
686
+ completed?: boolean;
687
+ contentType?: HttpContentType;
688
+ session?: string;
689
+ }, {
690
+ message?: string;
691
+ success?: boolean;
692
+ completed?: boolean;
693
+ contentType?: HttpContentType;
694
+ session?: string;
695
+ }>>;
696
+ export declare class RunResponseDto extends RunResponseDto_base {
697
+ }
698
+ export type StepClassType<T extends Step = Step> = {
699
+ new (...args: any[]): T;
700
+ };
701
+ type StepNameType = StepClassType | string;
702
+ type StepToolType = {
703
+ step: StepNameType;
704
+ tool?: string;
705
+ prompt?: string;
706
+ state?: object;
707
+ contentType?: HttpContentType;
708
+ };
709
+ type StepMessageType = {
710
+ step: StepNameType;
711
+ message?: MessageTypes;
712
+ prompt?: string;
713
+ state?: object;
714
+ contentType?: HttpContentType;
715
+ };
716
+ export type ToolResponseType = StepToolType | StepMessageType | StepNameType;
717
+ export type LogicResponseType = StepMessageType | StepNameType;
718
+ export {};