@runflow-ai/sdk 1.0.5 → 1.0.7

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 (101) hide show
  1. package/dist/connectors/connector-creator.d.ts +29 -0
  2. package/dist/connectors/connector-creator.d.ts.map +1 -0
  3. package/dist/connectors/connector-creator.js +123 -0
  4. package/dist/connectors/connector-creator.js.map +1 -0
  5. package/dist/connectors/index.d.ts +3 -0
  6. package/dist/connectors/index.d.ts.map +1 -0
  7. package/dist/connectors/index.js +11 -0
  8. package/dist/connectors/index.js.map +1 -0
  9. package/dist/core/agent.d.ts +42 -0
  10. package/dist/core/agent.d.ts.map +1 -0
  11. package/dist/core/agent.js +533 -0
  12. package/dist/core/agent.js.map +1 -0
  13. package/dist/core/api-client.d.ts +34 -0
  14. package/dist/core/api-client.d.ts.map +1 -0
  15. package/dist/core/api-client.js +339 -0
  16. package/dist/core/api-client.js.map +1 -0
  17. package/dist/core/index.d.ts +5 -0
  18. package/dist/core/index.d.ts.map +1 -0
  19. package/dist/core/index.js +13 -0
  20. package/dist/core/index.js.map +1 -0
  21. package/dist/core/models.d.ts +4 -0
  22. package/dist/core/models.d.ts.map +1 -0
  23. package/dist/core/models.js +20 -0
  24. package/dist/core/models.js.map +1 -0
  25. package/dist/index.d.ts +6 -12
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +49 -107
  28. package/dist/index.js.map +1 -1
  29. package/dist/memory/index.d.ts +1 -0
  30. package/dist/memory/index.d.ts.map +1 -0
  31. package/dist/memory/index.js +4 -0
  32. package/dist/memory/index.js.map +1 -0
  33. package/dist/observability/index.d.ts +3 -0
  34. package/dist/observability/index.d.ts.map +1 -0
  35. package/dist/observability/index.js +10 -0
  36. package/dist/observability/index.js.map +1 -0
  37. package/dist/observability/trace-collector.d.ts +43 -0
  38. package/dist/observability/trace-collector.d.ts.map +1 -0
  39. package/dist/observability/trace-collector.js +233 -0
  40. package/dist/observability/trace-collector.js.map +1 -0
  41. package/dist/streaming/index.d.ts +1 -0
  42. package/dist/streaming/index.d.ts.map +1 -0
  43. package/dist/streaming/index.js +4 -0
  44. package/dist/streaming/index.js.map +1 -0
  45. package/dist/tools/index.d.ts +3 -0
  46. package/dist/tools/index.d.ts.map +1 -0
  47. package/dist/tools/index.js +7 -0
  48. package/dist/tools/index.js.map +1 -0
  49. package/dist/tools/tool-creator.d.ts +3 -0
  50. package/dist/tools/tool-creator.d.ts.map +1 -0
  51. package/dist/tools/tool-creator.js +105 -0
  52. package/dist/tools/tool-creator.js.map +1 -0
  53. package/dist/types/all-types.d.ts +432 -0
  54. package/dist/types/all-types.d.ts.map +1 -0
  55. package/dist/{types.js → types/all-types.js} +1 -2
  56. package/dist/types/all-types.js.map +1 -0
  57. package/dist/types/index.d.ts +2 -0
  58. package/dist/types/index.d.ts.map +1 -0
  59. package/dist/types/index.js +19 -0
  60. package/dist/types/index.js.map +1 -0
  61. package/dist/workflows/index.d.ts +3 -0
  62. package/dist/workflows/index.d.ts.map +1 -0
  63. package/dist/workflows/index.js +13 -0
  64. package/dist/workflows/index.js.map +1 -0
  65. package/dist/workflows/workflow.d.ts +53 -0
  66. package/dist/workflows/workflow.d.ts.map +1 -0
  67. package/dist/workflows/workflow.js +414 -0
  68. package/dist/workflows/workflow.js.map +1 -0
  69. package/package.json +69 -21
  70. package/README.md +0 -892
  71. package/dist/agents/runflow-agent.d.ts +0 -54
  72. package/dist/agents/runflow-agent.d.ts.map +0 -1
  73. package/dist/agents/runflow-agent.js +0 -343
  74. package/dist/agents/runflow-agent.js.map +0 -1
  75. package/dist/agents/server.d.ts +0 -47
  76. package/dist/agents/server.d.ts.map +0 -1
  77. package/dist/agents/server.js +0 -329
  78. package/dist/agents/server.js.map +0 -1
  79. package/dist/agents/swagger.d.ts +0 -758
  80. package/dist/agents/swagger.d.ts.map +0 -1
  81. package/dist/agents/swagger.js +0 -375
  82. package/dist/agents/swagger.js.map +0 -1
  83. package/dist/config.d.ts +0 -17
  84. package/dist/config.d.ts.map +0 -1
  85. package/dist/config.js +0 -131
  86. package/dist/config.js.map +0 -1
  87. package/dist/runflow-sdk.d.ts +0 -57
  88. package/dist/runflow-sdk.d.ts.map +0 -1
  89. package/dist/runflow-sdk.js +0 -622
  90. package/dist/runflow-sdk.js.map +0 -1
  91. package/dist/singleton.d.ts +0 -37
  92. package/dist/singleton.d.ts.map +0 -1
  93. package/dist/singleton.js +0 -86
  94. package/dist/singleton.js.map +0 -1
  95. package/dist/types.d.ts +0 -147
  96. package/dist/types.d.ts.map +0 -1
  97. package/dist/types.js.map +0 -1
  98. package/dist/utils.d.ts +0 -74
  99. package/dist/utils.d.ts.map +0 -1
  100. package/dist/utils.js +0 -312
  101. package/dist/utils.js.map +0 -1
@@ -1,758 +0,0 @@
1
- import express from 'express';
2
- export interface SwaggerConfig {
3
- title?: string;
4
- description?: string;
5
- version?: string;
6
- contact?: {
7
- name?: string;
8
- email?: string;
9
- url?: string;
10
- };
11
- }
12
- /**
13
- * Gera especificação OpenAPI para o agente
14
- */
15
- export declare function generateSwaggerSpec(port: number, config?: SwaggerConfig): {
16
- openapi: string;
17
- info: {
18
- title: string;
19
- description: string;
20
- version: string;
21
- contact: {
22
- name?: string;
23
- email?: string;
24
- url?: string;
25
- };
26
- };
27
- servers: {
28
- url: string;
29
- description: string;
30
- }[];
31
- paths: {
32
- '/chat': {
33
- post: {
34
- summary: string;
35
- description: string;
36
- tags: string[];
37
- requestBody: {
38
- required: boolean;
39
- content: {
40
- 'application/json': {
41
- schema: {
42
- type: string;
43
- required: string[];
44
- properties: {
45
- message: {
46
- type: string;
47
- description: string;
48
- example: string;
49
- };
50
- companyId: {
51
- type: string;
52
- description: string;
53
- example: string;
54
- };
55
- userId: {
56
- type: string;
57
- description: string;
58
- example: string;
59
- };
60
- sessionId: {
61
- type: string;
62
- description: string;
63
- example: string;
64
- };
65
- channel: {
66
- type: string;
67
- description: string;
68
- example: string;
69
- };
70
- metadata: {
71
- type: string;
72
- description: string;
73
- example: {
74
- source: string;
75
- page: string;
76
- };
77
- };
78
- images: {
79
- type: string;
80
- description: string;
81
- items: {
82
- type: string;
83
- properties: {
84
- data: {
85
- type: string;
86
- description: string;
87
- example: string;
88
- };
89
- mimeType: {
90
- type: string;
91
- description: string;
92
- example: string;
93
- };
94
- description: {
95
- type: string;
96
- description: string;
97
- example: string;
98
- };
99
- };
100
- required: string[];
101
- };
102
- };
103
- llmProvider: {
104
- type: string;
105
- description: string;
106
- enum: string[];
107
- example: string;
108
- };
109
- llmModel: {
110
- type: string;
111
- description: string;
112
- example: string;
113
- };
114
- };
115
- };
116
- };
117
- };
118
- };
119
- responses: {
120
- 200: {
121
- description: string;
122
- content: {
123
- 'application/json': {
124
- schema: {
125
- type: string;
126
- properties: {
127
- success: {
128
- type: string;
129
- example: boolean;
130
- };
131
- data: {
132
- type: string;
133
- properties: {
134
- message: {
135
- type: string;
136
- description: string;
137
- example: string;
138
- };
139
- metadata: {
140
- type: string;
141
- description: string;
142
- properties: {
143
- llmProvider: {
144
- type: string;
145
- example: string;
146
- };
147
- model: {
148
- type: string;
149
- example: string;
150
- };
151
- toolsUsed: {
152
- type: string;
153
- items: {
154
- type: string;
155
- };
156
- example: string[];
157
- };
158
- processingTime: {
159
- type: string;
160
- example: number;
161
- };
162
- imagesProcessed: {
163
- type: string;
164
- example: number;
165
- };
166
- };
167
- };
168
- };
169
- };
170
- };
171
- };
172
- };
173
- };
174
- };
175
- 400: {
176
- description: string;
177
- content: {
178
- 'application/json': {
179
- schema: {
180
- type: string;
181
- properties: {
182
- success: {
183
- type: string;
184
- example: boolean;
185
- };
186
- error: {
187
- type: string;
188
- example: string;
189
- };
190
- };
191
- };
192
- };
193
- };
194
- };
195
- 429: {
196
- description: string;
197
- content: {
198
- 'application/json': {
199
- schema: {
200
- type: string;
201
- properties: {
202
- success: {
203
- type: string;
204
- example: boolean;
205
- };
206
- error: {
207
- type: string;
208
- example: string;
209
- };
210
- };
211
- };
212
- };
213
- };
214
- };
215
- 500: {
216
- description: string;
217
- content: {
218
- 'application/json': {
219
- schema: {
220
- type: string;
221
- properties: {
222
- success: {
223
- type: string;
224
- example: boolean;
225
- };
226
- error: {
227
- type: string;
228
- example: string;
229
- };
230
- };
231
- };
232
- };
233
- };
234
- };
235
- };
236
- };
237
- };
238
- '/health': {
239
- get: {
240
- summary: string;
241
- description: string;
242
- tags: string[];
243
- responses: {
244
- 200: {
245
- description: string;
246
- content: {
247
- 'application/json': {
248
- schema: {
249
- type: string;
250
- properties: {
251
- status: {
252
- type: string;
253
- example: string;
254
- };
255
- timestamp: {
256
- type: string;
257
- example: string;
258
- };
259
- agent: {
260
- type: string;
261
- properties: {
262
- systemPrompt: {
263
- type: string;
264
- };
265
- llmProvider: {
266
- type: string;
267
- };
268
- model: {
269
- type: string;
270
- };
271
- };
272
- };
273
- };
274
- };
275
- };
276
- };
277
- };
278
- };
279
- };
280
- };
281
- '/agent-info': {
282
- get: {
283
- summary: string;
284
- description: string;
285
- tags: string[];
286
- responses: {
287
- 200: {
288
- description: string;
289
- content: {
290
- 'application/json': {
291
- schema: {
292
- type: string;
293
- properties: {
294
- systemPrompt: {
295
- type: string;
296
- };
297
- llm: {
298
- type: string;
299
- properties: {
300
- provider: {
301
- type: string;
302
- example: string;
303
- };
304
- model: {
305
- type: string;
306
- example: string;
307
- };
308
- };
309
- };
310
- toolsEnabled: {
311
- type: string;
312
- };
313
- sessionEnabled: {
314
- type: string;
315
- };
316
- };
317
- };
318
- };
319
- };
320
- };
321
- };
322
- };
323
- };
324
- };
325
- components: {
326
- schemas: {
327
- ChatRequest: {
328
- type: string;
329
- required: string[];
330
- properties: {
331
- message: {
332
- type: string;
333
- };
334
- companyId: {
335
- type: string;
336
- };
337
- userId: {
338
- type: string;
339
- };
340
- sessionId: {
341
- type: string;
342
- };
343
- channel: {
344
- type: string;
345
- };
346
- metadata: {
347
- type: string;
348
- };
349
- };
350
- };
351
- ChatResponse: {
352
- type: string;
353
- properties: {
354
- success: {
355
- type: string;
356
- };
357
- data: {
358
- type: string;
359
- properties: {
360
- message: {
361
- type: string;
362
- };
363
- metadata: {
364
- type: string;
365
- };
366
- };
367
- };
368
- };
369
- };
370
- ErrorResponse: {
371
- type: string;
372
- properties: {
373
- success: {
374
- type: string;
375
- example: boolean;
376
- };
377
- error: {
378
- type: string;
379
- };
380
- };
381
- };
382
- };
383
- };
384
- };
385
- /**
386
- * Adiciona endpoints de documentação Swagger ao app Express
387
- */
388
- export declare function setupSwagger(app: express.Application, port: number, config?: SwaggerConfig): {
389
- openapi: string;
390
- info: {
391
- title: string;
392
- description: string;
393
- version: string;
394
- contact: {
395
- name?: string;
396
- email?: string;
397
- url?: string;
398
- };
399
- };
400
- servers: {
401
- url: string;
402
- description: string;
403
- }[];
404
- paths: {
405
- '/chat': {
406
- post: {
407
- summary: string;
408
- description: string;
409
- tags: string[];
410
- requestBody: {
411
- required: boolean;
412
- content: {
413
- 'application/json': {
414
- schema: {
415
- type: string;
416
- required: string[];
417
- properties: {
418
- message: {
419
- type: string;
420
- description: string;
421
- example: string;
422
- };
423
- companyId: {
424
- type: string;
425
- description: string;
426
- example: string;
427
- };
428
- userId: {
429
- type: string;
430
- description: string;
431
- example: string;
432
- };
433
- sessionId: {
434
- type: string;
435
- description: string;
436
- example: string;
437
- };
438
- channel: {
439
- type: string;
440
- description: string;
441
- example: string;
442
- };
443
- metadata: {
444
- type: string;
445
- description: string;
446
- example: {
447
- source: string;
448
- page: string;
449
- };
450
- };
451
- images: {
452
- type: string;
453
- description: string;
454
- items: {
455
- type: string;
456
- properties: {
457
- data: {
458
- type: string;
459
- description: string;
460
- example: string;
461
- };
462
- mimeType: {
463
- type: string;
464
- description: string;
465
- example: string;
466
- };
467
- description: {
468
- type: string;
469
- description: string;
470
- example: string;
471
- };
472
- };
473
- required: string[];
474
- };
475
- };
476
- llmProvider: {
477
- type: string;
478
- description: string;
479
- enum: string[];
480
- example: string;
481
- };
482
- llmModel: {
483
- type: string;
484
- description: string;
485
- example: string;
486
- };
487
- };
488
- };
489
- };
490
- };
491
- };
492
- responses: {
493
- 200: {
494
- description: string;
495
- content: {
496
- 'application/json': {
497
- schema: {
498
- type: string;
499
- properties: {
500
- success: {
501
- type: string;
502
- example: boolean;
503
- };
504
- data: {
505
- type: string;
506
- properties: {
507
- message: {
508
- type: string;
509
- description: string;
510
- example: string;
511
- };
512
- metadata: {
513
- type: string;
514
- description: string;
515
- properties: {
516
- llmProvider: {
517
- type: string;
518
- example: string;
519
- };
520
- model: {
521
- type: string;
522
- example: string;
523
- };
524
- toolsUsed: {
525
- type: string;
526
- items: {
527
- type: string;
528
- };
529
- example: string[];
530
- };
531
- processingTime: {
532
- type: string;
533
- example: number;
534
- };
535
- imagesProcessed: {
536
- type: string;
537
- example: number;
538
- };
539
- };
540
- };
541
- };
542
- };
543
- };
544
- };
545
- };
546
- };
547
- };
548
- 400: {
549
- description: string;
550
- content: {
551
- 'application/json': {
552
- schema: {
553
- type: string;
554
- properties: {
555
- success: {
556
- type: string;
557
- example: boolean;
558
- };
559
- error: {
560
- type: string;
561
- example: string;
562
- };
563
- };
564
- };
565
- };
566
- };
567
- };
568
- 429: {
569
- description: string;
570
- content: {
571
- 'application/json': {
572
- schema: {
573
- type: string;
574
- properties: {
575
- success: {
576
- type: string;
577
- example: boolean;
578
- };
579
- error: {
580
- type: string;
581
- example: string;
582
- };
583
- };
584
- };
585
- };
586
- };
587
- };
588
- 500: {
589
- description: string;
590
- content: {
591
- 'application/json': {
592
- schema: {
593
- type: string;
594
- properties: {
595
- success: {
596
- type: string;
597
- example: boolean;
598
- };
599
- error: {
600
- type: string;
601
- example: string;
602
- };
603
- };
604
- };
605
- };
606
- };
607
- };
608
- };
609
- };
610
- };
611
- '/health': {
612
- get: {
613
- summary: string;
614
- description: string;
615
- tags: string[];
616
- responses: {
617
- 200: {
618
- description: string;
619
- content: {
620
- 'application/json': {
621
- schema: {
622
- type: string;
623
- properties: {
624
- status: {
625
- type: string;
626
- example: string;
627
- };
628
- timestamp: {
629
- type: string;
630
- example: string;
631
- };
632
- agent: {
633
- type: string;
634
- properties: {
635
- systemPrompt: {
636
- type: string;
637
- };
638
- llmProvider: {
639
- type: string;
640
- };
641
- model: {
642
- type: string;
643
- };
644
- };
645
- };
646
- };
647
- };
648
- };
649
- };
650
- };
651
- };
652
- };
653
- };
654
- '/agent-info': {
655
- get: {
656
- summary: string;
657
- description: string;
658
- tags: string[];
659
- responses: {
660
- 200: {
661
- description: string;
662
- content: {
663
- 'application/json': {
664
- schema: {
665
- type: string;
666
- properties: {
667
- systemPrompt: {
668
- type: string;
669
- };
670
- llm: {
671
- type: string;
672
- properties: {
673
- provider: {
674
- type: string;
675
- example: string;
676
- };
677
- model: {
678
- type: string;
679
- example: string;
680
- };
681
- };
682
- };
683
- toolsEnabled: {
684
- type: string;
685
- };
686
- sessionEnabled: {
687
- type: string;
688
- };
689
- };
690
- };
691
- };
692
- };
693
- };
694
- };
695
- };
696
- };
697
- };
698
- components: {
699
- schemas: {
700
- ChatRequest: {
701
- type: string;
702
- required: string[];
703
- properties: {
704
- message: {
705
- type: string;
706
- };
707
- companyId: {
708
- type: string;
709
- };
710
- userId: {
711
- type: string;
712
- };
713
- sessionId: {
714
- type: string;
715
- };
716
- channel: {
717
- type: string;
718
- };
719
- metadata: {
720
- type: string;
721
- };
722
- };
723
- };
724
- ChatResponse: {
725
- type: string;
726
- properties: {
727
- success: {
728
- type: string;
729
- };
730
- data: {
731
- type: string;
732
- properties: {
733
- message: {
734
- type: string;
735
- };
736
- metadata: {
737
- type: string;
738
- };
739
- };
740
- };
741
- };
742
- };
743
- ErrorResponse: {
744
- type: string;
745
- properties: {
746
- success: {
747
- type: string;
748
- example: boolean;
749
- };
750
- error: {
751
- type: string;
752
- };
753
- };
754
- };
755
- };
756
- };
757
- };
758
- //# sourceMappingURL=swagger.d.ts.map