@workglow/tasks 0.0.101 → 0.0.102
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.
- package/dist/browser.js +286 -108
- package/dist/browser.js.map +11 -11
- package/dist/bun.js +286 -108
- package/dist/bun.js.map +11 -11
- package/dist/common.d.ts +0 -1
- package/dist/common.d.ts.map +1 -1
- package/dist/node.js +286 -108
- package/dist/node.js.map +11 -11
- package/dist/task/DebugLogTask.d.ts +1 -0
- package/dist/task/DebugLogTask.d.ts.map +1 -1
- package/dist/task/DelayTask.d.ts +2 -1
- package/dist/task/DelayTask.d.ts.map +1 -1
- package/dist/task/JavaScriptTask.d.ts +62 -1
- package/dist/task/JavaScriptTask.d.ts.map +1 -1
- package/dist/task/LambdaTask.d.ts +6 -1
- package/dist/task/LambdaTask.d.ts.map +1 -1
- package/dist/task/mcp/McpListTask.d.ts +2 -2
- package/dist/task/mcp/McpPromptGetTask.d.ts +150 -66
- package/dist/task/mcp/McpPromptGetTask.d.ts.map +1 -1
- package/dist/task/mcp/McpResourceReadTask.d.ts +147 -47
- package/dist/task/mcp/McpResourceReadTask.d.ts.map +1 -1
- package/dist/task/mcp/McpToolCallTask.d.ts +148 -323
- package/dist/task/mcp/McpToolCallTask.d.ts.map +1 -1
- package/package.json +9 -9
|
@@ -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
|
|
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,56 @@ 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 inputSchema: {
|
|
63
|
+
readonly type: "object";
|
|
64
|
+
readonly properties: {};
|
|
65
|
+
readonly additionalProperties: true;
|
|
66
|
+
readonly "x-ui-hidden": true;
|
|
67
|
+
};
|
|
68
|
+
readonly outputSchema: {
|
|
69
|
+
readonly type: "object";
|
|
70
|
+
readonly properties: {};
|
|
71
|
+
readonly additionalProperties: true;
|
|
72
|
+
readonly "x-ui-hidden": true;
|
|
73
|
+
};
|
|
74
|
+
readonly extras: {
|
|
75
|
+
readonly type: "object";
|
|
76
|
+
readonly additionalProperties: true;
|
|
77
|
+
readonly "x-ui-hidden": true;
|
|
78
|
+
};
|
|
49
79
|
};
|
|
50
80
|
readonly required: readonly ["transport", "resource_uri"];
|
|
81
|
+
readonly if: {
|
|
82
|
+
readonly properties: {
|
|
83
|
+
readonly transport: {
|
|
84
|
+
readonly const: "stdio";
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
readonly required: readonly ["transport"];
|
|
88
|
+
};
|
|
89
|
+
readonly then: {
|
|
90
|
+
readonly required: readonly ["command"];
|
|
91
|
+
};
|
|
92
|
+
readonly else: {
|
|
93
|
+
readonly required: readonly ["server_url"];
|
|
94
|
+
};
|
|
95
|
+
readonly additionalProperties: false;
|
|
96
|
+
};
|
|
97
|
+
declare const inputSchema: {
|
|
98
|
+
readonly type: "object";
|
|
99
|
+
readonly properties: {};
|
|
51
100
|
readonly additionalProperties: false;
|
|
52
101
|
};
|
|
53
102
|
declare const outputSchema: {
|
|
@@ -103,57 +152,19 @@ declare const outputSchema: {
|
|
|
103
152
|
readonly required: readonly ["contents"];
|
|
104
153
|
readonly additionalProperties: false;
|
|
105
154
|
};
|
|
155
|
+
export type McpResourceReadTaskConfig = TaskConfig & FromSchema<typeof configSchema>;
|
|
106
156
|
export type McpResourceReadTaskInput = FromSchema<typeof inputSchema>;
|
|
107
157
|
export type McpResourceReadTaskOutput = FromSchema<typeof outputSchema>;
|
|
108
|
-
export declare class McpResourceReadTask extends Task<McpResourceReadTaskInput, McpResourceReadTaskOutput,
|
|
158
|
+
export declare class McpResourceReadTask extends Task<McpResourceReadTaskInput, McpResourceReadTaskOutput, McpResourceReadTaskConfig> {
|
|
109
159
|
static type: string;
|
|
110
160
|
static category: string;
|
|
111
161
|
static title: string;
|
|
112
162
|
static description: string;
|
|
113
163
|
static readonly cacheable = false;
|
|
164
|
+
static customizable: boolean;
|
|
114
165
|
static inputSchema(): {
|
|
115
166
|
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"];
|
|
167
|
+
readonly properties: {};
|
|
157
168
|
readonly additionalProperties: false;
|
|
158
169
|
};
|
|
159
170
|
static outputSchema(): {
|
|
@@ -209,12 +220,101 @@ export declare class McpResourceReadTask extends Task<McpResourceReadTaskInput,
|
|
|
209
220
|
readonly required: readonly ["contents"];
|
|
210
221
|
readonly additionalProperties: false;
|
|
211
222
|
};
|
|
212
|
-
|
|
223
|
+
static configSchema(): {
|
|
224
|
+
readonly type: "object";
|
|
225
|
+
readonly properties: {
|
|
226
|
+
readonly resource_uri: {
|
|
227
|
+
readonly type: "string";
|
|
228
|
+
readonly title: "Resource URI";
|
|
229
|
+
readonly description: "The URI of the resource to read";
|
|
230
|
+
readonly format: "string:uri:mcp-resourceuri";
|
|
231
|
+
};
|
|
232
|
+
readonly transport: {
|
|
233
|
+
readonly type: "string";
|
|
234
|
+
readonly enum: readonly ["stdio", "sse", "streamable-http"];
|
|
235
|
+
readonly title: "Transport";
|
|
236
|
+
readonly description: "The transport type to use for connecting to the MCP server";
|
|
237
|
+
};
|
|
238
|
+
readonly server_url: {
|
|
239
|
+
readonly type: "string";
|
|
240
|
+
readonly format: "string:uri";
|
|
241
|
+
readonly title: "Server URL";
|
|
242
|
+
readonly description: "The URL of the MCP server (for sse and streamable-http transports)";
|
|
243
|
+
};
|
|
244
|
+
readonly command: {
|
|
245
|
+
readonly type: "string";
|
|
246
|
+
readonly title: "Command";
|
|
247
|
+
readonly description: "The command to run (for stdio transport)";
|
|
248
|
+
};
|
|
249
|
+
readonly args: {
|
|
250
|
+
readonly type: "array";
|
|
251
|
+
readonly items: {
|
|
252
|
+
readonly type: "string";
|
|
253
|
+
};
|
|
254
|
+
readonly title: "Arguments";
|
|
255
|
+
readonly description: "Command arguments (for stdio transport)";
|
|
256
|
+
};
|
|
257
|
+
readonly env: {
|
|
258
|
+
readonly type: "object";
|
|
259
|
+
readonly additionalProperties: {
|
|
260
|
+
readonly type: "string";
|
|
261
|
+
};
|
|
262
|
+
readonly title: "Environment";
|
|
263
|
+
readonly description: "Environment variables (for stdio transport)";
|
|
264
|
+
};
|
|
265
|
+
readonly id: {
|
|
266
|
+
readonly "x-ui-hidden": true;
|
|
267
|
+
};
|
|
268
|
+
readonly title: {
|
|
269
|
+
readonly type: "string";
|
|
270
|
+
};
|
|
271
|
+
readonly description: {
|
|
272
|
+
readonly type: "string";
|
|
273
|
+
};
|
|
274
|
+
readonly cacheable: {
|
|
275
|
+
readonly type: "boolean";
|
|
276
|
+
};
|
|
277
|
+
readonly inputSchema: {
|
|
278
|
+
readonly type: "object";
|
|
279
|
+
readonly properties: {};
|
|
280
|
+
readonly additionalProperties: true;
|
|
281
|
+
readonly "x-ui-hidden": true;
|
|
282
|
+
};
|
|
283
|
+
readonly outputSchema: {
|
|
284
|
+
readonly type: "object";
|
|
285
|
+
readonly properties: {};
|
|
286
|
+
readonly additionalProperties: true;
|
|
287
|
+
readonly "x-ui-hidden": true;
|
|
288
|
+
};
|
|
289
|
+
readonly extras: {
|
|
290
|
+
readonly type: "object";
|
|
291
|
+
readonly additionalProperties: true;
|
|
292
|
+
readonly "x-ui-hidden": true;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
readonly required: readonly ["transport", "resource_uri"];
|
|
296
|
+
readonly if: {
|
|
297
|
+
readonly properties: {
|
|
298
|
+
readonly transport: {
|
|
299
|
+
readonly const: "stdio";
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
readonly required: readonly ["transport"];
|
|
303
|
+
};
|
|
304
|
+
readonly then: {
|
|
305
|
+
readonly required: readonly ["command"];
|
|
306
|
+
};
|
|
307
|
+
readonly else: {
|
|
308
|
+
readonly required: readonly ["server_url"];
|
|
309
|
+
};
|
|
310
|
+
readonly additionalProperties: false;
|
|
311
|
+
};
|
|
312
|
+
execute(_input: McpResourceReadTaskInput, context: IExecuteContext): Promise<McpResourceReadTaskOutput>;
|
|
213
313
|
}
|
|
214
|
-
export declare const mcpResourceRead: (
|
|
314
|
+
export declare const mcpResourceRead: (config: McpResourceReadTaskConfig) => Promise<McpResourceReadTaskOutput>;
|
|
215
315
|
declare module "@workglow/task-graph" {
|
|
216
316
|
interface Workflow {
|
|
217
|
-
mcpResourceRead: CreateWorkflow<McpResourceReadTaskInput, McpResourceReadTaskOutput,
|
|
317
|
+
mcpResourceRead: CreateWorkflow<McpResourceReadTaskInput, McpResourceReadTaskOutput, McpResourceReadTaskConfig>;
|
|
218
318
|
}
|
|
219
319
|
}
|
|
220
320
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpResourceReadTask.d.ts","sourceRoot":"","sources":["../../../src/task/mcp/McpResourceReadTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"McpResourceReadTask.d.ts","sourceRoot":"","sources":["../../../src/task/mcp/McpResourceReadTask.ts"],"names":[],"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