@workglow/tasks 0.0.95 → 0.0.97

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.
@@ -0,0 +1,658 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CreateWorkflow, IExecuteContext, Task, TaskConfig } from "@workglow/task-graph";
7
+ import { DataPortSchema, FromSchema } from "@workglow/util";
8
+ declare const inputSchema: {
9
+ readonly type: "object";
10
+ readonly properties: {
11
+ readonly list_type: {
12
+ readonly type: "string";
13
+ readonly enum: readonly ["tools", "resources", "prompts"];
14
+ readonly title: "List Type";
15
+ readonly description: "The type of items to list from the MCP server";
16
+ };
17
+ readonly transport: {
18
+ readonly type: "string";
19
+ readonly enum: readonly ["stdio", "sse", "streamable-http"];
20
+ readonly title: "Transport";
21
+ readonly description: "The transport type to use for connecting to the MCP server";
22
+ };
23
+ readonly server_url: {
24
+ readonly type: "string";
25
+ readonly format: "uri";
26
+ readonly title: "Server URL";
27
+ readonly description: "The URL of the MCP server (for sse and streamable-http transports)";
28
+ };
29
+ readonly command: {
30
+ readonly type: "string";
31
+ readonly title: "Command";
32
+ readonly description: "The command to run (for stdio transport)";
33
+ };
34
+ readonly args: {
35
+ readonly type: "array";
36
+ readonly items: {
37
+ readonly type: "string";
38
+ };
39
+ readonly title: "Arguments";
40
+ readonly description: "Command arguments (for stdio transport)";
41
+ };
42
+ readonly env: {
43
+ readonly type: "object";
44
+ readonly additionalProperties: {
45
+ readonly type: "string";
46
+ };
47
+ readonly title: "Environment";
48
+ readonly description: "Environment variables (for stdio transport)";
49
+ };
50
+ };
51
+ readonly required: readonly ["transport", "list_type"];
52
+ readonly additionalProperties: false;
53
+ };
54
+ declare const outputSchemaAll: {
55
+ readonly type: "object";
56
+ readonly properties: {
57
+ readonly prompts: {
58
+ readonly type: "array";
59
+ readonly items: {
60
+ readonly type: "object";
61
+ readonly properties: {
62
+ readonly name: {
63
+ readonly type: "string";
64
+ };
65
+ readonly description: {
66
+ readonly type: "string";
67
+ };
68
+ readonly arguments: {
69
+ readonly type: "array";
70
+ readonly items: {
71
+ readonly type: "object";
72
+ readonly properties: {
73
+ readonly name: {
74
+ readonly type: "string";
75
+ };
76
+ readonly description: {
77
+ readonly type: "string";
78
+ };
79
+ readonly required: {
80
+ readonly type: "boolean";
81
+ };
82
+ };
83
+ readonly required: readonly ["name"];
84
+ readonly additionalProperties: false;
85
+ };
86
+ };
87
+ readonly _meta: {
88
+ readonly type: "object";
89
+ readonly additionalProperties: true;
90
+ };
91
+ readonly icons: {
92
+ readonly type: "array";
93
+ readonly items: {
94
+ readonly type: "object";
95
+ readonly properties: {
96
+ readonly src: {
97
+ readonly type: "string";
98
+ };
99
+ readonly mimeType: {
100
+ readonly type: "string";
101
+ };
102
+ readonly sizes: {
103
+ readonly type: "array";
104
+ readonly items: {
105
+ readonly type: "string";
106
+ };
107
+ };
108
+ readonly theme: {
109
+ readonly type: "string";
110
+ readonly enum: readonly ["light", "dark"];
111
+ };
112
+ };
113
+ readonly additionalProperties: false;
114
+ };
115
+ };
116
+ readonly title: {
117
+ readonly type: "string";
118
+ };
119
+ };
120
+ readonly required: readonly ["name"];
121
+ readonly additionalProperties: false;
122
+ };
123
+ readonly title: "Prompts";
124
+ readonly description: "The prompts available on the MCP server";
125
+ };
126
+ readonly resources: {
127
+ readonly type: "array";
128
+ readonly items: {
129
+ readonly type: "object";
130
+ readonly properties: {
131
+ readonly uri: {
132
+ readonly type: "string";
133
+ };
134
+ readonly name: {
135
+ readonly type: "string";
136
+ };
137
+ readonly description: {
138
+ readonly type: "string";
139
+ };
140
+ readonly mimeType: {
141
+ readonly type: "string";
142
+ };
143
+ readonly annotations: {
144
+ readonly type: "object";
145
+ readonly properties: {
146
+ readonly audience: {
147
+ readonly type: "array";
148
+ readonly items: {
149
+ readonly type: "string";
150
+ readonly enum: readonly ["user", "assistant"];
151
+ };
152
+ };
153
+ readonly priority: {
154
+ readonly type: "number";
155
+ };
156
+ readonly lastModified: {
157
+ readonly type: "string";
158
+ };
159
+ };
160
+ readonly additionalProperties: false;
161
+ };
162
+ readonly _meta: {
163
+ readonly type: "object";
164
+ readonly additionalProperties: true;
165
+ };
166
+ readonly icons: {
167
+ readonly type: "array";
168
+ readonly items: {
169
+ readonly type: "object";
170
+ readonly properties: {
171
+ readonly src: {
172
+ readonly type: "string";
173
+ };
174
+ readonly mimeType: {
175
+ readonly type: "string";
176
+ };
177
+ readonly sizes: {
178
+ readonly type: "array";
179
+ readonly items: {
180
+ readonly type: "string";
181
+ };
182
+ };
183
+ readonly theme: {
184
+ readonly type: "string";
185
+ readonly enum: readonly ["light", "dark"];
186
+ };
187
+ };
188
+ readonly additionalProperties: false;
189
+ };
190
+ };
191
+ readonly title: {
192
+ readonly type: "string";
193
+ };
194
+ };
195
+ readonly required: readonly ["uri", "name"];
196
+ readonly additionalProperties: false;
197
+ };
198
+ readonly title: "Resources";
199
+ readonly description: "The resources available on the MCP server";
200
+ };
201
+ readonly tools: {
202
+ readonly type: "array";
203
+ readonly items: {
204
+ readonly type: "object";
205
+ readonly properties: {
206
+ readonly name: {
207
+ readonly type: "string";
208
+ };
209
+ readonly description: {
210
+ readonly type: "string";
211
+ };
212
+ readonly inputSchema: {
213
+ readonly type: "object";
214
+ readonly properties: {
215
+ readonly type: {
216
+ readonly type: "string";
217
+ };
218
+ readonly properties: {
219
+ readonly type: "object";
220
+ readonly additionalProperties: true;
221
+ };
222
+ readonly required: {
223
+ readonly type: "array";
224
+ readonly items: {
225
+ readonly type: "string";
226
+ };
227
+ };
228
+ };
229
+ readonly additionalProperties: true;
230
+ };
231
+ readonly outputSchema: {
232
+ readonly type: "object";
233
+ readonly properties: {
234
+ readonly type: {
235
+ readonly type: "string";
236
+ };
237
+ readonly properties: {
238
+ readonly type: "object";
239
+ readonly additionalProperties: true;
240
+ };
241
+ readonly required: {
242
+ readonly type: "array";
243
+ readonly items: {
244
+ readonly type: "string";
245
+ };
246
+ };
247
+ };
248
+ readonly additionalProperties: true;
249
+ };
250
+ readonly annotations: {
251
+ readonly type: "object";
252
+ readonly properties: {
253
+ readonly title: {
254
+ readonly type: "string";
255
+ };
256
+ readonly readOnlyHint: {
257
+ readonly type: "boolean";
258
+ };
259
+ readonly destructiveHint: {
260
+ readonly type: "boolean";
261
+ };
262
+ readonly idempotentHint: {
263
+ readonly type: "boolean";
264
+ };
265
+ readonly openWorldHint: {
266
+ readonly type: "boolean";
267
+ };
268
+ };
269
+ readonly additionalProperties: false;
270
+ };
271
+ readonly execution: {
272
+ readonly type: "object";
273
+ readonly properties: {
274
+ readonly taskSupport: {
275
+ readonly type: "string";
276
+ readonly enum: readonly ["optional", "required", "forbidden"];
277
+ };
278
+ };
279
+ readonly additionalProperties: false;
280
+ };
281
+ readonly _meta: {
282
+ readonly type: "object";
283
+ readonly additionalProperties: true;
284
+ };
285
+ readonly icons: {
286
+ readonly type: "array";
287
+ readonly items: {
288
+ readonly type: "object";
289
+ readonly properties: {
290
+ readonly src: {
291
+ readonly type: "string";
292
+ };
293
+ readonly mimeType: {
294
+ readonly type: "string";
295
+ };
296
+ readonly sizes: {
297
+ readonly type: "array";
298
+ readonly items: {
299
+ readonly type: "string";
300
+ };
301
+ };
302
+ readonly theme: {
303
+ readonly type: "string";
304
+ readonly enum: readonly ["light", "dark"];
305
+ };
306
+ };
307
+ readonly additionalProperties: false;
308
+ };
309
+ };
310
+ readonly title: {
311
+ readonly type: "string";
312
+ };
313
+ };
314
+ readonly required: readonly ["name", "inputSchema"];
315
+ readonly additionalProperties: false;
316
+ };
317
+ readonly title: "Tools";
318
+ readonly description: "The tools available on the MCP server";
319
+ };
320
+ };
321
+ readonly additionalProperties: false;
322
+ };
323
+ export type McpListTaskInput = FromSchema<typeof inputSchema>;
324
+ export type McpListTaskOutput = FromSchema<typeof outputSchemaAll>;
325
+ export declare class McpListTask extends Task<McpListTaskInput, McpListTaskOutput, TaskConfig> {
326
+ static type: string;
327
+ static category: string;
328
+ static title: string;
329
+ static description: string;
330
+ static readonly cacheable = false;
331
+ static hasDynamicSchemas: boolean;
332
+ static inputSchema(): {
333
+ readonly type: "object";
334
+ readonly properties: {
335
+ readonly list_type: {
336
+ readonly type: "string";
337
+ readonly enum: readonly ["tools", "resources", "prompts"];
338
+ readonly title: "List Type";
339
+ readonly description: "The type of items to list from the MCP server";
340
+ };
341
+ readonly transport: {
342
+ readonly type: "string";
343
+ readonly enum: readonly ["stdio", "sse", "streamable-http"];
344
+ readonly title: "Transport";
345
+ readonly description: "The transport type to use for connecting to the MCP server";
346
+ };
347
+ readonly server_url: {
348
+ readonly type: "string";
349
+ readonly format: "uri";
350
+ readonly title: "Server URL";
351
+ readonly description: "The URL of the MCP server (for sse and streamable-http transports)";
352
+ };
353
+ readonly command: {
354
+ readonly type: "string";
355
+ readonly title: "Command";
356
+ readonly description: "The command to run (for stdio transport)";
357
+ };
358
+ readonly args: {
359
+ readonly type: "array";
360
+ readonly items: {
361
+ readonly type: "string";
362
+ };
363
+ readonly title: "Arguments";
364
+ readonly description: "Command arguments (for stdio transport)";
365
+ };
366
+ readonly env: {
367
+ readonly type: "object";
368
+ readonly additionalProperties: {
369
+ readonly type: "string";
370
+ };
371
+ readonly title: "Environment";
372
+ readonly description: "Environment variables (for stdio transport)";
373
+ };
374
+ };
375
+ readonly required: readonly ["transport", "list_type"];
376
+ readonly additionalProperties: false;
377
+ };
378
+ static outputSchema(): {
379
+ readonly type: "object";
380
+ readonly properties: {
381
+ readonly prompts: {
382
+ readonly type: "array";
383
+ readonly items: {
384
+ readonly type: "object";
385
+ readonly properties: {
386
+ readonly name: {
387
+ readonly type: "string";
388
+ };
389
+ readonly description: {
390
+ readonly type: "string";
391
+ };
392
+ readonly arguments: {
393
+ readonly type: "array";
394
+ readonly items: {
395
+ readonly type: "object";
396
+ readonly properties: {
397
+ readonly name: {
398
+ readonly type: "string";
399
+ };
400
+ readonly description: {
401
+ readonly type: "string";
402
+ };
403
+ readonly required: {
404
+ readonly type: "boolean";
405
+ };
406
+ };
407
+ readonly required: readonly ["name"];
408
+ readonly additionalProperties: false;
409
+ };
410
+ };
411
+ readonly _meta: {
412
+ readonly type: "object";
413
+ readonly additionalProperties: true;
414
+ };
415
+ readonly icons: {
416
+ readonly type: "array";
417
+ readonly items: {
418
+ readonly type: "object";
419
+ readonly properties: {
420
+ readonly src: {
421
+ readonly type: "string";
422
+ };
423
+ readonly mimeType: {
424
+ readonly type: "string";
425
+ };
426
+ readonly sizes: {
427
+ readonly type: "array";
428
+ readonly items: {
429
+ readonly type: "string";
430
+ };
431
+ };
432
+ readonly theme: {
433
+ readonly type: "string";
434
+ readonly enum: readonly ["light", "dark"];
435
+ };
436
+ };
437
+ readonly additionalProperties: false;
438
+ };
439
+ };
440
+ readonly title: {
441
+ readonly type: "string";
442
+ };
443
+ };
444
+ readonly required: readonly ["name"];
445
+ readonly additionalProperties: false;
446
+ };
447
+ readonly title: "Prompts";
448
+ readonly description: "The prompts available on the MCP server";
449
+ };
450
+ readonly resources: {
451
+ readonly type: "array";
452
+ readonly items: {
453
+ readonly type: "object";
454
+ readonly properties: {
455
+ readonly uri: {
456
+ readonly type: "string";
457
+ };
458
+ readonly name: {
459
+ readonly type: "string";
460
+ };
461
+ readonly description: {
462
+ readonly type: "string";
463
+ };
464
+ readonly mimeType: {
465
+ readonly type: "string";
466
+ };
467
+ readonly annotations: {
468
+ readonly type: "object";
469
+ readonly properties: {
470
+ readonly audience: {
471
+ readonly type: "array";
472
+ readonly items: {
473
+ readonly type: "string";
474
+ readonly enum: readonly ["user", "assistant"];
475
+ };
476
+ };
477
+ readonly priority: {
478
+ readonly type: "number";
479
+ };
480
+ readonly lastModified: {
481
+ readonly type: "string";
482
+ };
483
+ };
484
+ readonly additionalProperties: false;
485
+ };
486
+ readonly _meta: {
487
+ readonly type: "object";
488
+ readonly additionalProperties: true;
489
+ };
490
+ readonly icons: {
491
+ readonly type: "array";
492
+ readonly items: {
493
+ readonly type: "object";
494
+ readonly properties: {
495
+ readonly src: {
496
+ readonly type: "string";
497
+ };
498
+ readonly mimeType: {
499
+ readonly type: "string";
500
+ };
501
+ readonly sizes: {
502
+ readonly type: "array";
503
+ readonly items: {
504
+ readonly type: "string";
505
+ };
506
+ };
507
+ readonly theme: {
508
+ readonly type: "string";
509
+ readonly enum: readonly ["light", "dark"];
510
+ };
511
+ };
512
+ readonly additionalProperties: false;
513
+ };
514
+ };
515
+ readonly title: {
516
+ readonly type: "string";
517
+ };
518
+ };
519
+ readonly required: readonly ["uri", "name"];
520
+ readonly additionalProperties: false;
521
+ };
522
+ readonly title: "Resources";
523
+ readonly description: "The resources available on the MCP server";
524
+ };
525
+ readonly tools: {
526
+ readonly type: "array";
527
+ readonly items: {
528
+ readonly type: "object";
529
+ readonly properties: {
530
+ readonly name: {
531
+ readonly type: "string";
532
+ };
533
+ readonly description: {
534
+ readonly type: "string";
535
+ };
536
+ readonly inputSchema: {
537
+ readonly type: "object";
538
+ readonly properties: {
539
+ readonly type: {
540
+ readonly type: "string";
541
+ };
542
+ readonly properties: {
543
+ readonly type: "object";
544
+ readonly additionalProperties: true;
545
+ };
546
+ readonly required: {
547
+ readonly type: "array";
548
+ readonly items: {
549
+ readonly type: "string";
550
+ };
551
+ };
552
+ };
553
+ readonly additionalProperties: true;
554
+ };
555
+ readonly outputSchema: {
556
+ readonly type: "object";
557
+ readonly properties: {
558
+ readonly type: {
559
+ readonly type: "string";
560
+ };
561
+ readonly properties: {
562
+ readonly type: "object";
563
+ readonly additionalProperties: true;
564
+ };
565
+ readonly required: {
566
+ readonly type: "array";
567
+ readonly items: {
568
+ readonly type: "string";
569
+ };
570
+ };
571
+ };
572
+ readonly additionalProperties: true;
573
+ };
574
+ readonly annotations: {
575
+ readonly type: "object";
576
+ readonly properties: {
577
+ readonly title: {
578
+ readonly type: "string";
579
+ };
580
+ readonly readOnlyHint: {
581
+ readonly type: "boolean";
582
+ };
583
+ readonly destructiveHint: {
584
+ readonly type: "boolean";
585
+ };
586
+ readonly idempotentHint: {
587
+ readonly type: "boolean";
588
+ };
589
+ readonly openWorldHint: {
590
+ readonly type: "boolean";
591
+ };
592
+ };
593
+ readonly additionalProperties: false;
594
+ };
595
+ readonly execution: {
596
+ readonly type: "object";
597
+ readonly properties: {
598
+ readonly taskSupport: {
599
+ readonly type: "string";
600
+ readonly enum: readonly ["optional", "required", "forbidden"];
601
+ };
602
+ };
603
+ readonly additionalProperties: false;
604
+ };
605
+ readonly _meta: {
606
+ readonly type: "object";
607
+ readonly additionalProperties: true;
608
+ };
609
+ readonly icons: {
610
+ readonly type: "array";
611
+ readonly items: {
612
+ readonly type: "object";
613
+ readonly properties: {
614
+ readonly src: {
615
+ readonly type: "string";
616
+ };
617
+ readonly mimeType: {
618
+ readonly type: "string";
619
+ };
620
+ readonly sizes: {
621
+ readonly type: "array";
622
+ readonly items: {
623
+ readonly type: "string";
624
+ };
625
+ };
626
+ readonly theme: {
627
+ readonly type: "string";
628
+ readonly enum: readonly ["light", "dark"];
629
+ };
630
+ };
631
+ readonly additionalProperties: false;
632
+ };
633
+ };
634
+ readonly title: {
635
+ readonly type: "string";
636
+ };
637
+ };
638
+ readonly required: readonly ["name", "inputSchema"];
639
+ readonly additionalProperties: false;
640
+ };
641
+ readonly title: "Tools";
642
+ readonly description: "The tools available on the MCP server";
643
+ };
644
+ };
645
+ readonly additionalProperties: false;
646
+ };
647
+ outputSchema(): DataPortSchema;
648
+ setInput(input: Record<string, unknown>): void;
649
+ execute(input: McpListTaskInput, context: IExecuteContext): Promise<McpListTaskOutput>;
650
+ }
651
+ export declare const mcpList: (input: McpListTaskInput, config?: TaskConfig) => Promise<McpListTaskOutput>;
652
+ declare module "@workglow/task-graph" {
653
+ interface Workflow {
654
+ mcpList: CreateWorkflow<McpListTaskInput, McpListTaskOutput, TaskConfig>;
655
+ }
656
+ }
657
+ export {};
658
+ //# sourceMappingURL=McpListTask.d.ts.map
@@ -0,0 +1 @@
1
+ {"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