@workglow/tasks 0.0.101 → 0.0.103

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 (34) hide show
  1. package/dist/browser.js +1693 -1362
  2. package/dist/browser.js.map +17 -17
  3. package/dist/bun.js +1747 -1393
  4. package/dist/bun.js.map +18 -18
  5. package/dist/common.d.ts +1 -2
  6. package/dist/common.d.ts.map +1 -1
  7. package/dist/node.js +1747 -1393
  8. package/dist/node.js.map +18 -18
  9. package/dist/task/DebugLogTask.d.ts +1 -0
  10. package/dist/task/DebugLogTask.d.ts.map +1 -1
  11. package/dist/task/DelayTask.d.ts +2 -1
  12. package/dist/task/DelayTask.d.ts.map +1 -1
  13. package/dist/task/FileLoaderTask.d.ts +23 -0
  14. package/dist/task/FileLoaderTask.d.ts.map +1 -1
  15. package/dist/task/FileLoaderTask.server.d.ts +3 -0
  16. package/dist/task/FileLoaderTask.server.d.ts.map +1 -1
  17. package/dist/task/InputTask.d.ts.map +1 -1
  18. package/dist/task/JavaScriptTask.d.ts +66 -1
  19. package/dist/task/JavaScriptTask.d.ts.map +1 -1
  20. package/dist/task/LambdaTask.d.ts +10 -1
  21. package/dist/task/LambdaTask.d.ts.map +1 -1
  22. package/dist/task/OutputTask.d.ts.map +1 -1
  23. package/dist/task/mcp/McpListTask.d.ts +2 -2
  24. package/dist/task/mcp/McpPromptGetTask.d.ts +158 -66
  25. package/dist/task/mcp/McpPromptGetTask.d.ts.map +1 -1
  26. package/dist/task/mcp/McpResourceReadTask.d.ts +155 -47
  27. package/dist/task/mcp/McpResourceReadTask.d.ts.map +1 -1
  28. package/dist/task/mcp/McpToolCallTask.d.ts +156 -323
  29. package/dist/task/mcp/McpToolCallTask.d.ts.map +1 -1
  30. package/package.json +9 -9
  31. package/dist/task/scalar/scalar.test.d.ts +0 -7
  32. package/dist/task/scalar/scalar.test.d.ts.map +0 -1
  33. package/dist/task/vector/vector.test.d.ts +0 -7
  34. package/dist/task/vector/vector.test.d.ts.map +0 -1
@@ -5,13 +5,14 @@
5
5
  */
6
6
  import { CreateWorkflow, IExecuteContext, Task, TaskConfig } from "@workglow/task-graph";
7
7
  import { FromSchema } from "@workglow/util";
8
- declare const inputSchema: {
8
+ declare const configSchema: {
9
9
  readonly type: "object";
10
10
  readonly properties: {
11
11
  readonly resource_uri: {
12
12
  readonly type: "string";
13
13
  readonly title: "Resource URI";
14
14
  readonly description: "The URI of the resource to read";
15
+ readonly format: "string:uri:mcp-resourceuri";
15
16
  };
16
17
  readonly transport: {
17
18
  readonly type: "string";
@@ -21,7 +22,7 @@ declare const inputSchema: {
21
22
  };
22
23
  readonly server_url: {
23
24
  readonly type: "string";
24
- readonly format: "uri";
25
+ readonly format: "string:uri";
25
26
  readonly title: "Server URL";
26
27
  readonly description: "The URL of the MCP server (for sse and streamable-http transports)";
27
28
  };
@@ -46,8 +47,60 @@ declare const inputSchema: {
46
47
  readonly title: "Environment";
47
48
  readonly description: "Environment variables (for stdio transport)";
48
49
  };
50
+ readonly id: {
51
+ readonly "x-ui-hidden": true;
52
+ };
53
+ readonly title: {
54
+ readonly type: "string";
55
+ };
56
+ readonly description: {
57
+ readonly type: "string";
58
+ };
59
+ readonly cacheable: {
60
+ readonly type: "boolean";
61
+ };
62
+ readonly timeout: {
63
+ readonly type: "number";
64
+ readonly description: "Max execution time in milliseconds";
65
+ };
66
+ readonly inputSchema: {
67
+ readonly type: "object";
68
+ readonly properties: {};
69
+ readonly additionalProperties: true;
70
+ readonly "x-ui-hidden": true;
71
+ };
72
+ readonly outputSchema: {
73
+ readonly type: "object";
74
+ readonly properties: {};
75
+ readonly additionalProperties: true;
76
+ readonly "x-ui-hidden": true;
77
+ };
78
+ readonly extras: {
79
+ readonly type: "object";
80
+ readonly additionalProperties: true;
81
+ readonly "x-ui-hidden": true;
82
+ };
49
83
  };
50
84
  readonly required: readonly ["transport", "resource_uri"];
85
+ readonly if: {
86
+ readonly properties: {
87
+ readonly transport: {
88
+ readonly const: "stdio";
89
+ };
90
+ };
91
+ readonly required: readonly ["transport"];
92
+ };
93
+ readonly then: {
94
+ readonly required: readonly ["command"];
95
+ };
96
+ readonly else: {
97
+ readonly required: readonly ["server_url"];
98
+ };
99
+ readonly additionalProperties: false;
100
+ };
101
+ declare const inputSchema: {
102
+ readonly type: "object";
103
+ readonly properties: {};
51
104
  readonly additionalProperties: false;
52
105
  };
53
106
  declare const outputSchema: {
@@ -103,57 +156,19 @@ declare const outputSchema: {
103
156
  readonly required: readonly ["contents"];
104
157
  readonly additionalProperties: false;
105
158
  };
159
+ export type McpResourceReadTaskConfig = TaskConfig & FromSchema<typeof configSchema>;
106
160
  export type McpResourceReadTaskInput = FromSchema<typeof inputSchema>;
107
161
  export type McpResourceReadTaskOutput = FromSchema<typeof outputSchema>;
108
- export declare class McpResourceReadTask extends Task<McpResourceReadTaskInput, McpResourceReadTaskOutput, TaskConfig> {
162
+ export declare class McpResourceReadTask extends Task<McpResourceReadTaskInput, McpResourceReadTaskOutput, McpResourceReadTaskConfig> {
109
163
  static type: string;
110
164
  static category: string;
111
165
  static title: string;
112
166
  static description: string;
113
167
  static readonly cacheable = false;
168
+ static customizable: boolean;
114
169
  static inputSchema(): {
115
170
  readonly type: "object";
116
- readonly properties: {
117
- readonly resource_uri: {
118
- readonly type: "string";
119
- readonly title: "Resource URI";
120
- readonly description: "The URI of the resource to read";
121
- };
122
- readonly transport: {
123
- readonly type: "string";
124
- readonly enum: readonly ["stdio", "sse", "streamable-http"];
125
- readonly title: "Transport";
126
- readonly description: "The transport type to use for connecting to the MCP server";
127
- };
128
- readonly server_url: {
129
- readonly type: "string";
130
- readonly format: "uri";
131
- readonly title: "Server URL";
132
- readonly description: "The URL of the MCP server (for sse and streamable-http transports)";
133
- };
134
- readonly command: {
135
- readonly type: "string";
136
- readonly title: "Command";
137
- readonly description: "The command to run (for stdio transport)";
138
- };
139
- readonly args: {
140
- readonly type: "array";
141
- readonly items: {
142
- readonly type: "string";
143
- };
144
- readonly title: "Arguments";
145
- readonly description: "Command arguments (for stdio transport)";
146
- };
147
- readonly env: {
148
- readonly type: "object";
149
- readonly additionalProperties: {
150
- readonly type: "string";
151
- };
152
- readonly title: "Environment";
153
- readonly description: "Environment variables (for stdio transport)";
154
- };
155
- };
156
- readonly required: readonly ["transport", "resource_uri"];
171
+ readonly properties: {};
157
172
  readonly additionalProperties: false;
158
173
  };
159
174
  static outputSchema(): {
@@ -209,12 +224,105 @@ export declare class McpResourceReadTask extends Task<McpResourceReadTaskInput,
209
224
  readonly required: readonly ["contents"];
210
225
  readonly additionalProperties: false;
211
226
  };
212
- execute(input: McpResourceReadTaskInput, context: IExecuteContext): Promise<McpResourceReadTaskOutput>;
227
+ static configSchema(): {
228
+ readonly type: "object";
229
+ readonly properties: {
230
+ readonly resource_uri: {
231
+ readonly type: "string";
232
+ readonly title: "Resource URI";
233
+ readonly description: "The URI of the resource to read";
234
+ readonly format: "string:uri:mcp-resourceuri";
235
+ };
236
+ readonly transport: {
237
+ readonly type: "string";
238
+ readonly enum: readonly ["stdio", "sse", "streamable-http"];
239
+ readonly title: "Transport";
240
+ readonly description: "The transport type to use for connecting to the MCP server";
241
+ };
242
+ readonly server_url: {
243
+ readonly type: "string";
244
+ readonly format: "string:uri";
245
+ readonly title: "Server URL";
246
+ readonly description: "The URL of the MCP server (for sse and streamable-http transports)";
247
+ };
248
+ readonly command: {
249
+ readonly type: "string";
250
+ readonly title: "Command";
251
+ readonly description: "The command to run (for stdio transport)";
252
+ };
253
+ readonly args: {
254
+ readonly type: "array";
255
+ readonly items: {
256
+ readonly type: "string";
257
+ };
258
+ readonly title: "Arguments";
259
+ readonly description: "Command arguments (for stdio transport)";
260
+ };
261
+ readonly env: {
262
+ readonly type: "object";
263
+ readonly additionalProperties: {
264
+ readonly type: "string";
265
+ };
266
+ readonly title: "Environment";
267
+ readonly description: "Environment variables (for stdio transport)";
268
+ };
269
+ readonly id: {
270
+ readonly "x-ui-hidden": true;
271
+ };
272
+ readonly title: {
273
+ readonly type: "string";
274
+ };
275
+ readonly description: {
276
+ readonly type: "string";
277
+ };
278
+ readonly cacheable: {
279
+ readonly type: "boolean";
280
+ };
281
+ readonly timeout: {
282
+ readonly type: "number";
283
+ readonly description: "Max execution time in milliseconds";
284
+ };
285
+ readonly inputSchema: {
286
+ readonly type: "object";
287
+ readonly properties: {};
288
+ readonly additionalProperties: true;
289
+ readonly "x-ui-hidden": true;
290
+ };
291
+ readonly outputSchema: {
292
+ readonly type: "object";
293
+ readonly properties: {};
294
+ readonly additionalProperties: true;
295
+ readonly "x-ui-hidden": true;
296
+ };
297
+ readonly extras: {
298
+ readonly type: "object";
299
+ readonly additionalProperties: true;
300
+ readonly "x-ui-hidden": true;
301
+ };
302
+ };
303
+ readonly required: readonly ["transport", "resource_uri"];
304
+ readonly if: {
305
+ readonly properties: {
306
+ readonly transport: {
307
+ readonly const: "stdio";
308
+ };
309
+ };
310
+ readonly required: readonly ["transport"];
311
+ };
312
+ readonly then: {
313
+ readonly required: readonly ["command"];
314
+ };
315
+ readonly else: {
316
+ readonly required: readonly ["server_url"];
317
+ };
318
+ readonly additionalProperties: false;
319
+ };
320
+ execute(_input: McpResourceReadTaskInput, context: IExecuteContext): Promise<McpResourceReadTaskOutput>;
213
321
  }
214
- export declare const mcpResourceRead: (input: McpResourceReadTaskInput, config?: TaskConfig) => Promise<McpResourceReadTaskOutput>;
322
+ export declare const mcpResourceRead: (config: McpResourceReadTaskConfig) => Promise<McpResourceReadTaskOutput>;
215
323
  declare module "@workglow/task-graph" {
216
324
  interface Workflow {
217
- mcpResourceRead: CreateWorkflow<McpResourceReadTaskInput, McpResourceReadTaskOutput, TaskConfig>;
325
+ mcpResourceRead: CreateWorkflow<McpResourceReadTaskInput, McpResourceReadTaskOutput, McpResourceReadTaskConfig>;
218
326
  }
219
327
  }
220
328
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"McpResourceReadTask.d.ts","sourceRoot":"","sources":["../../../src/task/mcp/McpResourceReadTask.ts"],"names":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