@workglow/tasks 0.0.120 → 0.0.122

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 (97) hide show
  1. package/dist/browser.js +1041 -255
  2. package/dist/browser.js.map +18 -13
  3. package/dist/bun.js +1061 -258
  4. package/dist/bun.js.map +18 -13
  5. package/dist/common.d.ts +3 -1
  6. package/dist/common.d.ts.map +1 -1
  7. package/dist/node.js +1061 -258
  8. package/dist/node.js.map +18 -13
  9. package/dist/task/ArrayTask.d.ts +1 -10
  10. package/dist/task/ArrayTask.d.ts.map +1 -1
  11. package/dist/task/DateFormatTask.d.ts.map +1 -1
  12. package/dist/task/DebugLogTask.d.ts +3 -1
  13. package/dist/task/DebugLogTask.d.ts.map +1 -1
  14. package/dist/task/DelayTask.d.ts +3 -1
  15. package/dist/task/DelayTask.d.ts.map +1 -1
  16. package/dist/task/FetchUrlTask.d.ts +23 -1
  17. package/dist/task/FetchUrlTask.d.ts.map +1 -1
  18. package/dist/task/FileLoaderTask.d.ts +10 -7
  19. package/dist/task/FileLoaderTask.d.ts.map +1 -1
  20. package/dist/task/FileLoaderTask.server.d.ts +10 -7
  21. package/dist/task/FileLoaderTask.server.d.ts.map +1 -1
  22. package/dist/task/InputTask.d.ts +0 -1
  23. package/dist/task/InputTask.d.ts.map +1 -1
  24. package/dist/task/JavaScriptTask.d.ts +13 -10
  25. package/dist/task/JavaScriptTask.d.ts.map +1 -1
  26. package/dist/task/JsonPathTask.d.ts.map +1 -1
  27. package/dist/task/JsonTask.d.ts +3 -1
  28. package/dist/task/JsonTask.d.ts.map +1 -1
  29. package/dist/task/LambdaTask.d.ts +2 -2
  30. package/dist/task/LambdaTask.d.ts.map +1 -1
  31. package/dist/task/MergeTask.d.ts +3 -1
  32. package/dist/task/MergeTask.d.ts.map +1 -1
  33. package/dist/task/OutputTask.d.ts +0 -1
  34. package/dist/task/OutputTask.d.ts.map +1 -1
  35. package/dist/task/RegexTask.d.ts.map +1 -1
  36. package/dist/task/SplitTask.d.ts +3 -1
  37. package/dist/task/SplitTask.d.ts.map +1 -1
  38. package/dist/task/TemplateTask.d.ts.map +1 -1
  39. package/dist/task/adaptive.d.ts.map +1 -1
  40. package/dist/task/mcp/McpListTask.d.ts +245 -560
  41. package/dist/task/mcp/McpListTask.d.ts.map +1 -1
  42. package/dist/task/mcp/McpPromptGetTask.d.ts +84 -494
  43. package/dist/task/mcp/McpPromptGetTask.d.ts.map +1 -1
  44. package/dist/task/mcp/McpResourceReadTask.d.ts +20 -495
  45. package/dist/task/mcp/McpResourceReadTask.d.ts.map +1 -1
  46. package/dist/task/mcp/McpSearchTask.d.ts +111 -0
  47. package/dist/task/mcp/McpSearchTask.d.ts.map +1 -0
  48. package/dist/task/mcp/McpToolCallTask.d.ts +5 -498
  49. package/dist/task/mcp/McpToolCallTask.d.ts.map +1 -1
  50. package/dist/task/scalar/ScalarAbsTask.d.ts.map +1 -1
  51. package/dist/task/scalar/ScalarAddTask.d.ts.map +1 -1
  52. package/dist/task/scalar/ScalarCeilTask.d.ts.map +1 -1
  53. package/dist/task/scalar/ScalarDivideTask.d.ts.map +1 -1
  54. package/dist/task/scalar/ScalarFloorTask.d.ts.map +1 -1
  55. package/dist/task/scalar/ScalarMaxTask.d.ts.map +1 -1
  56. package/dist/task/scalar/ScalarMinTask.d.ts.map +1 -1
  57. package/dist/task/scalar/ScalarMultiplyTask.d.ts.map +1 -1
  58. package/dist/task/scalar/ScalarRoundTask.d.ts.map +1 -1
  59. package/dist/task/scalar/ScalarSubtractTask.d.ts.map +1 -1
  60. package/dist/task/scalar/ScalarSumTask.d.ts.map +1 -1
  61. package/dist/task/scalar/ScalarTruncTask.d.ts.map +1 -1
  62. package/dist/task/scalar/sumPrecise.d.ts.map +1 -1
  63. package/dist/task/string/StringConcatTask.d.ts.map +1 -1
  64. package/dist/task/string/StringIncludesTask.d.ts.map +1 -1
  65. package/dist/task/string/StringJoinTask.d.ts.map +1 -1
  66. package/dist/task/string/StringLengthTask.d.ts.map +1 -1
  67. package/dist/task/string/StringLowerCaseTask.d.ts.map +1 -1
  68. package/dist/task/string/StringReplaceTask.d.ts.map +1 -1
  69. package/dist/task/string/StringSliceTask.d.ts.map +1 -1
  70. package/dist/task/string/StringTemplateTask.d.ts.map +1 -1
  71. package/dist/task/string/StringTrimTask.d.ts.map +1 -1
  72. package/dist/task/string/StringUpperCaseTask.d.ts.map +1 -1
  73. package/dist/task/vector/VectorDistanceTask.d.ts.map +1 -1
  74. package/dist/task/vector/VectorDivideTask.d.ts.map +1 -1
  75. package/dist/task/vector/VectorDotProductTask.d.ts.map +1 -1
  76. package/dist/task/vector/VectorMultiplyTask.d.ts.map +1 -1
  77. package/dist/task/vector/VectorNormalizeTask.d.ts.map +1 -1
  78. package/dist/task/vector/VectorScaleTask.d.ts.map +1 -1
  79. package/dist/task/vector/VectorSubtractTask.d.ts.map +1 -1
  80. package/dist/task/vector/VectorSumTask.d.ts.map +1 -1
  81. package/dist/types.d.ts +4 -0
  82. package/dist/types.d.ts.map +1 -1
  83. package/dist/util/McpAuthProvider.d.ts +70 -0
  84. package/dist/util/McpAuthProvider.d.ts.map +1 -0
  85. package/dist/util/McpAuthTypes.d.ts +218 -0
  86. package/dist/util/McpAuthTypes.d.ts.map +1 -0
  87. package/dist/util/McpClientUtil.browser.d.ts +110 -0
  88. package/dist/util/McpClientUtil.browser.d.ts.map +1 -0
  89. package/dist/util/McpClientUtil.node.d.ts +134 -0
  90. package/dist/util/McpClientUtil.node.d.ts.map +1 -0
  91. package/dist/util/McpTaskDeps.d.ts +29 -0
  92. package/dist/util/McpTaskDeps.d.ts.map +1 -0
  93. package/dist/util/acorn.d.ts +3 -12
  94. package/dist/util/acorn.d.ts.map +1 -1
  95. package/dist/util/interpreter.d.ts +11 -486
  96. package/dist/util/interpreter.d.ts.map +1 -1
  97. package/package.json +21 -16
@@ -4,253 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { CreateWorkflow, IExecuteContext, Task, TaskConfig } from "@workglow/task-graph";
7
- import { FromSchema } from "@workglow/util";
8
- declare const configSchema: {
9
- readonly type: "object";
10
- readonly properties: {
11
- readonly resource_uri: {
12
- readonly type: "string";
13
- readonly title: "Resource URI";
14
- readonly description: "The URI of the resource to read";
15
- readonly format: "string:uri:mcp-resourceuri";
16
- };
17
- readonly auth_type: {
18
- readonly type: "string";
19
- readonly enum: readonly ["none", "bearer", "client_credentials", "private_key_jwt", "static_private_key_jwt", "authorization_code"];
20
- readonly title: "Auth Type";
21
- readonly description: "Authentication method for connecting to the MCP server";
22
- readonly default: "none";
23
- };
24
- readonly auth_token: {
25
- readonly type: "string";
26
- readonly format: "credential";
27
- readonly title: "Bearer Token";
28
- readonly description: "Static bearer token or API key (for bearer auth)";
29
- };
30
- readonly auth_client_id: {
31
- readonly type: "string";
32
- readonly title: "Client ID";
33
- readonly description: "OAuth client ID (for OAuth auth types)";
34
- };
35
- readonly auth_client_secret: {
36
- readonly type: "string";
37
- readonly format: "credential";
38
- readonly title: "Client Secret";
39
- readonly description: "OAuth client secret (for client_credentials auth)";
40
- };
41
- readonly auth_private_key: {
42
- readonly type: "string";
43
- readonly format: "credential";
44
- readonly title: "Private Key";
45
- readonly description: "PEM or JWK private key (for private_key_jwt auth)";
46
- };
47
- readonly auth_algorithm: {
48
- readonly type: "string";
49
- readonly title: "Algorithm";
50
- readonly description: "JWT signing algorithm, e.g. RS256, ES256 (for private_key_jwt auth)";
51
- };
52
- readonly auth_jwt_bearer_assertion: {
53
- readonly type: "string";
54
- readonly format: "credential";
55
- readonly title: "JWT Assertion";
56
- readonly description: "Pre-built JWT assertion (for static_private_key_jwt auth)";
57
- };
58
- readonly auth_redirect_url: {
59
- readonly type: "string";
60
- readonly format: "uri";
61
- readonly title: "Redirect URL";
62
- readonly description: "OAuth redirect URL (for authorization_code auth)";
63
- };
64
- readonly auth_scope: {
65
- readonly type: "string";
66
- readonly title: "Scope";
67
- readonly description: "OAuth scope (space-separated)";
68
- };
69
- readonly auth_client_name: {
70
- readonly type: "string";
71
- readonly title: "Client Name";
72
- readonly description: "Optional OAuth client display name";
73
- };
74
- readonly auth_jwt_lifetime_seconds: {
75
- readonly type: "number";
76
- readonly title: "JWT Lifetime";
77
- readonly description: "JWT lifetime in seconds (default: 300)";
78
- readonly minimum: 1;
79
- };
80
- readonly transport: {
81
- readonly type: "string";
82
- readonly enum: readonly ["stdio", "sse", "streamable-http"];
83
- readonly title: "Transport";
84
- readonly description: "The transport type to use for connecting to the MCP server";
85
- };
86
- readonly server_url: {
87
- readonly type: "string";
88
- readonly format: "string:uri";
89
- readonly title: "Server URL";
90
- readonly description: "The URL of the MCP server (for sse and streamable-http transports)";
91
- };
92
- readonly command: {
93
- readonly type: "string";
94
- readonly title: "Command";
95
- readonly description: "The command to run (for stdio transport)";
96
- };
97
- readonly args: {
98
- readonly type: "array";
99
- readonly items: {
100
- readonly type: "string";
101
- };
102
- readonly title: "Arguments";
103
- readonly description: "Command arguments (for stdio transport)";
104
- };
105
- readonly env: {
106
- readonly type: "object";
107
- readonly additionalProperties: {
108
- readonly type: "string";
109
- };
110
- readonly title: "Environment";
111
- readonly description: "Environment variables (for stdio transport)";
112
- };
113
- readonly id: {
114
- readonly "x-ui-hidden": true;
115
- };
116
- readonly title: {
117
- readonly type: "string";
118
- };
119
- readonly description: {
120
- readonly type: "string";
121
- };
122
- readonly cacheable: {
123
- readonly type: "boolean";
124
- };
125
- readonly timeout: {
126
- readonly type: "number";
127
- readonly description: "Max execution time in milliseconds";
128
- };
129
- readonly inputSchema: {
130
- readonly type: "object";
131
- readonly properties: {};
132
- readonly additionalProperties: true;
133
- readonly "x-ui-hidden": true;
134
- };
135
- readonly outputSchema: {
136
- readonly type: "object";
137
- readonly properties: {};
138
- readonly additionalProperties: true;
139
- readonly "x-ui-hidden": true;
140
- };
141
- readonly extras: {
142
- readonly type: "object";
143
- readonly additionalProperties: true;
144
- readonly "x-ui-hidden": true;
145
- };
146
- };
147
- readonly required: readonly ["transport", "resource_uri"];
148
- readonly if: {
149
- readonly properties: {
150
- readonly transport: {
151
- readonly const: "stdio";
152
- };
153
- };
154
- readonly required: readonly ["transport"];
155
- };
156
- readonly then: {
157
- readonly required: readonly ["command"];
158
- };
159
- readonly else: {
160
- readonly required: readonly ["server_url"];
161
- };
162
- readonly allOf: readonly [{
163
- readonly if: {
164
- readonly properties: {
165
- readonly auth_type: {
166
- readonly const: "bearer";
167
- };
168
- };
169
- readonly required: readonly ["auth_type"];
170
- };
171
- readonly then: {
172
- readonly required: readonly ["auth_token"];
173
- readonly properties: {
174
- readonly auth_token: true;
175
- };
176
- };
177
- }, {
178
- readonly if: {
179
- readonly properties: {
180
- readonly auth_type: {
181
- readonly const: "client_credentials";
182
- };
183
- };
184
- readonly required: readonly ["auth_type"];
185
- };
186
- readonly then: {
187
- readonly required: readonly ["auth_client_id", "auth_client_secret"];
188
- readonly properties: {
189
- readonly auth_client_id: true;
190
- readonly auth_client_secret: true;
191
- readonly auth_client_name: true;
192
- readonly auth_scope: true;
193
- };
194
- };
195
- }, {
196
- readonly if: {
197
- readonly properties: {
198
- readonly auth_type: {
199
- readonly const: "private_key_jwt";
200
- };
201
- };
202
- readonly required: readonly ["auth_type"];
203
- };
204
- readonly then: {
205
- readonly required: readonly ["auth_client_id", "auth_private_key", "auth_algorithm"];
206
- readonly properties: {
207
- readonly auth_client_id: true;
208
- readonly auth_private_key: true;
209
- readonly auth_algorithm: true;
210
- readonly auth_client_name: true;
211
- readonly auth_jwt_lifetime_seconds: true;
212
- readonly auth_scope: true;
213
- };
214
- };
215
- }, {
216
- readonly if: {
217
- readonly properties: {
218
- readonly auth_type: {
219
- readonly const: "static_private_key_jwt";
220
- };
221
- };
222
- readonly required: readonly ["auth_type"];
223
- };
224
- readonly then: {
225
- readonly required: readonly ["auth_client_id", "auth_jwt_bearer_assertion"];
226
- readonly properties: {
227
- readonly auth_client_id: true;
228
- readonly auth_jwt_bearer_assertion: true;
229
- readonly auth_client_name: true;
230
- readonly auth_scope: true;
231
- };
232
- };
233
- }, {
234
- readonly if: {
235
- readonly properties: {
236
- readonly auth_type: {
237
- readonly const: "authorization_code";
238
- };
239
- };
240
- readonly required: readonly ["auth_type"];
241
- };
242
- readonly then: {
243
- readonly required: readonly ["auth_client_id", "auth_redirect_url"];
244
- readonly properties: {
245
- readonly auth_client_id: true;
246
- readonly auth_client_secret: true;
247
- readonly auth_redirect_url: true;
248
- readonly auth_scope: true;
249
- };
250
- };
251
- }];
252
- readonly additionalProperties: false;
253
- };
7
+ import { DataPortSchema, FromSchema } from "@workglow/util";
254
8
  declare const inputSchema: {
255
9
  readonly type: "object";
256
10
  readonly properties: {};
@@ -309,7 +63,7 @@ declare const outputSchema: {
309
63
  readonly required: readonly ["contents"];
310
64
  readonly additionalProperties: false;
311
65
  };
312
- export type McpResourceReadTaskConfig = TaskConfig & FromSchema<typeof configSchema>;
66
+ export type McpResourceReadTaskConfig = TaskConfig & Record<string, unknown>;
313
67
  export type McpResourceReadTaskInput = FromSchema<typeof inputSchema>;
314
68
  export type McpResourceReadTaskOutput = FromSchema<typeof outputSchema>;
315
69
  export declare class McpResourceReadTask extends Task<McpResourceReadTaskInput, McpResourceReadTaskOutput, McpResourceReadTaskConfig> {
@@ -377,255 +131,26 @@ export declare class McpResourceReadTask extends Task<McpResourceReadTaskInput,
377
131
  readonly required: readonly ["contents"];
378
132
  readonly additionalProperties: false;
379
133
  };
380
- static configSchema(): {
381
- readonly type: "object";
382
- readonly properties: {
383
- readonly resource_uri: {
384
- readonly type: "string";
385
- readonly title: "Resource URI";
386
- readonly description: "The URI of the resource to read";
387
- readonly format: "string:uri:mcp-resourceuri";
388
- };
389
- readonly auth_type: {
390
- readonly type: "string";
391
- readonly enum: readonly ["none", "bearer", "client_credentials", "private_key_jwt", "static_private_key_jwt", "authorization_code"];
392
- readonly title: "Auth Type";
393
- readonly description: "Authentication method for connecting to the MCP server";
394
- readonly default: "none";
395
- };
396
- readonly auth_token: {
397
- readonly type: "string";
398
- readonly format: "credential";
399
- readonly title: "Bearer Token";
400
- readonly description: "Static bearer token or API key (for bearer auth)";
401
- };
402
- readonly auth_client_id: {
403
- readonly type: "string";
404
- readonly title: "Client ID";
405
- readonly description: "OAuth client ID (for OAuth auth types)";
406
- };
407
- readonly auth_client_secret: {
408
- readonly type: "string";
409
- readonly format: "credential";
410
- readonly title: "Client Secret";
411
- readonly description: "OAuth client secret (for client_credentials auth)";
412
- };
413
- readonly auth_private_key: {
414
- readonly type: "string";
415
- readonly format: "credential";
416
- readonly title: "Private Key";
417
- readonly description: "PEM or JWK private key (for private_key_jwt auth)";
418
- };
419
- readonly auth_algorithm: {
420
- readonly type: "string";
421
- readonly title: "Algorithm";
422
- readonly description: "JWT signing algorithm, e.g. RS256, ES256 (for private_key_jwt auth)";
423
- };
424
- readonly auth_jwt_bearer_assertion: {
425
- readonly type: "string";
426
- readonly format: "credential";
427
- readonly title: "JWT Assertion";
428
- readonly description: "Pre-built JWT assertion (for static_private_key_jwt auth)";
429
- };
430
- readonly auth_redirect_url: {
431
- readonly type: "string";
432
- readonly format: "uri";
433
- readonly title: "Redirect URL";
434
- readonly description: "OAuth redirect URL (for authorization_code auth)";
435
- };
436
- readonly auth_scope: {
437
- readonly type: "string";
438
- readonly title: "Scope";
439
- readonly description: "OAuth scope (space-separated)";
440
- };
441
- readonly auth_client_name: {
442
- readonly type: "string";
443
- readonly title: "Client Name";
444
- readonly description: "Optional OAuth client display name";
445
- };
446
- readonly auth_jwt_lifetime_seconds: {
447
- readonly type: "number";
448
- readonly title: "JWT Lifetime";
449
- readonly description: "JWT lifetime in seconds (default: 300)";
450
- readonly minimum: 1;
451
- };
452
- readonly transport: {
453
- readonly type: "string";
454
- readonly enum: readonly ["stdio", "sse", "streamable-http"];
455
- readonly title: "Transport";
456
- readonly description: "The transport type to use for connecting to the MCP server";
457
- };
458
- readonly server_url: {
459
- readonly type: "string";
460
- readonly format: "string:uri";
461
- readonly title: "Server URL";
462
- readonly description: "The URL of the MCP server (for sse and streamable-http transports)";
463
- };
464
- readonly command: {
465
- readonly type: "string";
466
- readonly title: "Command";
467
- readonly description: "The command to run (for stdio transport)";
468
- };
469
- readonly args: {
470
- readonly type: "array";
471
- readonly items: {
472
- readonly type: "string";
473
- };
474
- readonly title: "Arguments";
475
- readonly description: "Command arguments (for stdio transport)";
476
- };
477
- readonly env: {
478
- readonly type: "object";
479
- readonly additionalProperties: {
480
- readonly type: "string";
481
- };
482
- readonly title: "Environment";
483
- readonly description: "Environment variables (for stdio transport)";
484
- };
485
- readonly id: {
486
- readonly "x-ui-hidden": true;
487
- };
488
- readonly title: {
489
- readonly type: "string";
490
- };
491
- readonly description: {
492
- readonly type: "string";
493
- };
494
- readonly cacheable: {
495
- readonly type: "boolean";
496
- };
497
- readonly timeout: {
498
- readonly type: "number";
499
- readonly description: "Max execution time in milliseconds";
500
- };
501
- readonly inputSchema: {
502
- readonly type: "object";
503
- readonly properties: {};
504
- readonly additionalProperties: true;
505
- readonly "x-ui-hidden": true;
506
- };
507
- readonly outputSchema: {
508
- readonly type: "object";
509
- readonly properties: {};
510
- readonly additionalProperties: true;
511
- readonly "x-ui-hidden": true;
512
- };
513
- readonly extras: {
514
- readonly type: "object";
515
- readonly additionalProperties: true;
516
- readonly "x-ui-hidden": true;
517
- };
518
- };
519
- readonly required: readonly ["transport", "resource_uri"];
520
- readonly if: {
521
- readonly properties: {
522
- readonly transport: {
523
- readonly const: "stdio";
524
- };
525
- };
526
- readonly required: readonly ["transport"];
527
- };
528
- readonly then: {
529
- readonly required: readonly ["command"];
530
- };
531
- readonly else: {
532
- readonly required: readonly ["server_url"];
533
- };
534
- readonly allOf: readonly [{
535
- readonly if: {
536
- readonly properties: {
537
- readonly auth_type: {
538
- readonly const: "bearer";
539
- };
540
- };
541
- readonly required: readonly ["auth_type"];
542
- };
543
- readonly then: {
544
- readonly required: readonly ["auth_token"];
545
- readonly properties: {
546
- readonly auth_token: true;
547
- };
548
- };
549
- }, {
550
- readonly if: {
551
- readonly properties: {
552
- readonly auth_type: {
553
- readonly const: "client_credentials";
554
- };
555
- };
556
- readonly required: readonly ["auth_type"];
557
- };
558
- readonly then: {
559
- readonly required: readonly ["auth_client_id", "auth_client_secret"];
560
- readonly properties: {
561
- readonly auth_client_id: true;
562
- readonly auth_client_secret: true;
563
- readonly auth_client_name: true;
564
- readonly auth_scope: true;
565
- };
566
- };
567
- }, {
568
- readonly if: {
569
- readonly properties: {
570
- readonly auth_type: {
571
- readonly const: "private_key_jwt";
572
- };
573
- };
574
- readonly required: readonly ["auth_type"];
575
- };
576
- readonly then: {
577
- readonly required: readonly ["auth_client_id", "auth_private_key", "auth_algorithm"];
578
- readonly properties: {
579
- readonly auth_client_id: true;
580
- readonly auth_private_key: true;
581
- readonly auth_algorithm: true;
582
- readonly auth_client_name: true;
583
- readonly auth_jwt_lifetime_seconds: true;
584
- readonly auth_scope: true;
585
- };
586
- };
587
- }, {
588
- readonly if: {
589
- readonly properties: {
590
- readonly auth_type: {
591
- readonly const: "static_private_key_jwt";
592
- };
593
- };
594
- readonly required: readonly ["auth_type"];
595
- };
596
- readonly then: {
597
- readonly required: readonly ["auth_client_id", "auth_jwt_bearer_assertion"];
598
- readonly properties: {
599
- readonly auth_client_id: true;
600
- readonly auth_jwt_bearer_assertion: true;
601
- readonly auth_client_name: true;
602
- readonly auth_scope: true;
603
- };
604
- };
605
- }, {
606
- readonly if: {
607
- readonly properties: {
608
- readonly auth_type: {
609
- readonly const: "authorization_code";
610
- };
611
- };
612
- readonly required: readonly ["auth_type"];
613
- };
614
- readonly then: {
615
- readonly required: readonly ["auth_client_id", "auth_redirect_url"];
616
- readonly properties: {
617
- readonly auth_client_id: true;
618
- readonly auth_client_secret: true;
619
- readonly auth_redirect_url: true;
620
- readonly auth_scope: true;
621
- };
622
- };
623
- }];
624
- readonly additionalProperties: false;
625
- };
134
+ static configSchema(): DataPortSchema;
626
135
  execute(_input: McpResourceReadTaskInput, context: IExecuteContext): Promise<McpResourceReadTaskOutput>;
627
136
  }
628
- export declare const mcpResourceRead: (config: McpResourceReadTaskConfig) => Promise<McpResourceReadTaskOutput>;
137
+ export declare const mcpResourceRead: (config: McpResourceReadTaskConfig) => Promise<{
138
+ contents: ({
139
+ _meta?: {
140
+ [x: string]: unknown;
141
+ } | undefined;
142
+ mimeType?: string | undefined;
143
+ text: string;
144
+ uri: string;
145
+ } | {
146
+ _meta?: {
147
+ [x: string]: unknown;
148
+ } | undefined;
149
+ blob: string;
150
+ mimeType?: string | undefined;
151
+ uri: string;
152
+ })[];
153
+ }>;
629
154
  declare module "@workglow/task-graph" {
630
155
  interface Workflow {
631
156
  mcpResourceRead: CreateWorkflow<McpResourceReadTaskInput, McpResourceReadTaskOutput, McpResourceReadTaskConfig>;
@@ -1 +1 @@
1
- {"version":3,"file":"McpResourceReadTask.d.ts","sourceRoot":"","sources":["../../../src/task/mcp/McpResourceReadTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,eAAe,EACf,IAAI,EACJ,UAAU,EAGX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,UAAU,EAIX,MAAM,gBAAgB,CAAC;AAExB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBiB,CAAC;AA6BpC,QAAA,MAAM,WAAW;;;;CAIkB,CAAC;AAEpC,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYiB,CAAC;AAEpC,MAAM,MAAM,yBAAyB,GAA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B,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,CAC1B,CAAC;KACH;CACF"}
@@ -0,0 +1,111 @@
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
+ interface McpRegistryServer {
9
+ name: string;
10
+ title?: string;
11
+ description: string;
12
+ version: string;
13
+ packages?: Array<{
14
+ registryType: string;
15
+ identifier: string;
16
+ transport: {
17
+ type: string;
18
+ };
19
+ environmentVariables?: Array<{
20
+ name: string;
21
+ description?: string;
22
+ isRequired?: boolean;
23
+ }>;
24
+ runtimeArguments?: Array<{
25
+ type: string;
26
+ name: string;
27
+ value?: string;
28
+ isRequired?: boolean;
29
+ description?: string;
30
+ }>;
31
+ packageArguments?: Array<{
32
+ type: string;
33
+ name: string;
34
+ value?: string;
35
+ isRequired?: boolean;
36
+ description?: string;
37
+ }>;
38
+ }>;
39
+ remotes?: Array<{
40
+ type: string;
41
+ url: string;
42
+ }>;
43
+ }
44
+ export interface McpSearchResultItem {
45
+ readonly id: string;
46
+ readonly label: string;
47
+ readonly description: string;
48
+ readonly config: Record<string, unknown>;
49
+ }
50
+ /** Results from {@link searchMcpRegistryPage}; pass `nextCursor` back for the next page. */
51
+ export interface McpRegistrySearchPage {
52
+ readonly results: McpSearchResultItem[];
53
+ readonly nextCursor: string | undefined;
54
+ }
55
+ declare const McpSearchInputSchema: {
56
+ readonly type: "object";
57
+ readonly properties: {
58
+ readonly query: {
59
+ readonly type: "string";
60
+ readonly title: "Query";
61
+ readonly description: "Search query for the MCP registry";
62
+ };
63
+ };
64
+ readonly required: readonly ["query"];
65
+ readonly additionalProperties: false;
66
+ };
67
+ export type McpSearchTaskInput = FromSchema<typeof McpSearchInputSchema>;
68
+ export type McpSearchTaskOutput = {
69
+ results: McpSearchResultItem[];
70
+ };
71
+ /**
72
+ * Map an MCP registry server entry to a config object usable for MCP server configuration.
73
+ */
74
+ export declare function mapMcpRegistryResult(server: McpRegistryServer): Record<string, unknown>;
75
+ /**
76
+ * Search the MCP registry for one page of servers (max 100 per request — registry limit).
77
+ */
78
+ export declare function searchMcpRegistryPage(query: string, options?: {
79
+ readonly cursor?: string;
80
+ readonly signal?: AbortSignal;
81
+ }): Promise<McpRegistrySearchPage>;
82
+ /**
83
+ * Search the MCP registry for servers matching a query (first page only).
84
+ */
85
+ export declare function searchMcpRegistry(query: string, signal?: AbortSignal): Promise<McpSearchResultItem[]>;
86
+ /**
87
+ * Search the MCP server registry for servers matching a query.
88
+ */
89
+ export declare class McpSearchTask extends Task<McpSearchTaskInput, McpSearchTaskOutput, TaskConfig> {
90
+ static type: string;
91
+ static category: string;
92
+ static title: string;
93
+ static description: string;
94
+ static cacheable: boolean;
95
+ static inputSchema(): DataPortSchema;
96
+ static outputSchema(): DataPortSchema;
97
+ execute(input: McpSearchTaskInput, context: IExecuteContext): Promise<McpSearchTaskOutput>;
98
+ }
99
+ /**
100
+ * Search the MCP server registry.
101
+ */
102
+ export declare const mcpSearch: (input: {
103
+ query: string;
104
+ }, config?: TaskConfig | undefined) => Promise<McpSearchTaskOutput>;
105
+ declare module "@workglow/task-graph" {
106
+ interface Workflow {
107
+ mcpSearch: CreateWorkflow<McpSearchTaskInput, McpSearchTaskOutput, TaskConfig>;
108
+ }
109
+ }
110
+ export {};
111
+ //# sourceMappingURL=McpSearchTask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"McpSearchTask.d.ts","sourceRoot":"","sources":["../../../src/task/mcp/McpSearchTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,IAAI,EAAE,UAAU,EAAY,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAI5D,U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