@workglow/tasks 0.0.52 → 0.0.53
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/index.js +56 -8
- package/dist/index.js.map +4 -4
- package/dist/task/FetchTask.d.ts +20 -5
- package/dist/task/FetchTask.d.ts.map +1 -1
- package/dist/task/JsonTask.d.ts +5 -0
- package/dist/task/JsonTask.d.ts.map +1 -1
- package/package.json +9 -9
package/dist/task/FetchTask.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { IJobExecuteContext, Job } from "@workglow/job-queue";
|
|
7
7
|
import { CreateWorkflow, JobQueueTask, JobQueueTaskConfig } from "@workglow/task-graph";
|
|
8
|
-
import { FromSchema } from "@workglow/util";
|
|
8
|
+
import { DataPortSchema, FromSchema } from "@workglow/util";
|
|
9
9
|
declare const inputSchema: {
|
|
10
10
|
readonly type: "object";
|
|
11
11
|
readonly properties: {
|
|
@@ -35,9 +35,13 @@ declare const inputSchema: {
|
|
|
35
35
|
readonly description: "The body of the request";
|
|
36
36
|
};
|
|
37
37
|
readonly response_type: {
|
|
38
|
-
readonly
|
|
38
|
+
readonly anyOf: readonly [{
|
|
39
|
+
readonly type: "null";
|
|
40
|
+
}, {
|
|
41
|
+
readonly enum: readonly ["json", "text", "blob", "arraybuffer"];
|
|
42
|
+
}];
|
|
39
43
|
readonly title: "Response Type";
|
|
40
|
-
readonly default:
|
|
44
|
+
readonly default: null;
|
|
41
45
|
};
|
|
42
46
|
readonly timeout: {
|
|
43
47
|
readonly type: "number";
|
|
@@ -106,6 +110,7 @@ export declare class FetchTask<Input extends FetchTaskInput = FetchTaskInput, Ou
|
|
|
106
110
|
static category: string;
|
|
107
111
|
static title: string;
|
|
108
112
|
static description: string;
|
|
113
|
+
static hasDynamicSchemas: boolean;
|
|
109
114
|
static inputSchema(): {
|
|
110
115
|
readonly type: "object";
|
|
111
116
|
readonly properties: {
|
|
@@ -135,9 +140,13 @@ export declare class FetchTask<Input extends FetchTaskInput = FetchTaskInput, Ou
|
|
|
135
140
|
readonly description: "The body of the request";
|
|
136
141
|
};
|
|
137
142
|
readonly response_type: {
|
|
138
|
-
readonly
|
|
143
|
+
readonly anyOf: readonly [{
|
|
144
|
+
readonly type: "null";
|
|
145
|
+
}, {
|
|
146
|
+
readonly enum: readonly ["json", "text", "blob", "arraybuffer"];
|
|
147
|
+
}];
|
|
139
148
|
readonly title: "Response Type";
|
|
140
|
-
readonly default:
|
|
149
|
+
readonly default: null;
|
|
141
150
|
};
|
|
142
151
|
readonly timeout: {
|
|
143
152
|
readonly type: "number";
|
|
@@ -181,6 +190,12 @@ export declare class FetchTask<Input extends FetchTaskInput = FetchTaskInput, Ou
|
|
|
181
190
|
};
|
|
182
191
|
readonly additionalProperties: false;
|
|
183
192
|
};
|
|
193
|
+
/**
|
|
194
|
+
* Override outputSchema to compute it dynamically based on the current response_type value.
|
|
195
|
+
* If response_type is null, all output types are available.
|
|
196
|
+
* If response_type is a specific value (e.g., "json"), only that output type is available.
|
|
197
|
+
*/
|
|
198
|
+
outputSchema(): DataPortSchema;
|
|
184
199
|
constructor(input?: Input, config?: Config);
|
|
185
200
|
protected getDefaultQueueName(input: Input): Promise<string | undefined>;
|
|
186
201
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetchTask.d.ts","sourceRoot":"","sources":["../../src/task/FetchTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"FetchTask.d.ts","sourceRoot":"","sources":["../../src/task/FetchTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,kBAAkB,EAClB,GAAG,EAGJ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,cAAc,EACd,YAAY,EACZ,kBAAkB,EAKnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gB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Y,IAAI,cAAc;gBA4ClC,KAAK,GAAE,KAAmB,EAAE,MAAM,GAAE,MAAqB;cAS5C,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAgBxF;AAID,eAAO,MAAM,KAAK,GAChB,OAAO,cAAc,EACrB,SAAQ,eAAoB,KAC3B,OAAO,CAAC,eAAe,CAGzB,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,KAAK,EAAE,cAAc,CAAC,cAAc,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;KACzE;CACF"}
|
package/dist/task/JsonTask.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
1
6
|
import { CreateWorkflow, GraphAsTask, TaskConfig } from "@workglow/task-graph";
|
|
2
7
|
import { FromSchema } from "@workglow/util";
|
|
3
8
|
declare const inputSchema: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonTask.d.ts","sourceRoot":"","sources":["../../src/task/JsonTask.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"JsonTask.d.ts","sourceRoot":"","sources":["../../src/task/JsonTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,cAAc,EAEd,WAAW,EAEX,UAAU,EAIX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAkB,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,QAAA,MAAM,WAAW;;;;;;;;;;CAUkB,CAAC;AAEpC,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAE3D,QAAA,MAAM,YAAY;;;;;;;;;CASiB,CAAC;AAEpC,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAE7D;;;GAGG;AACH,qBAAa,QAAQ,CACnB,KAAK,SAAS,aAAa,GAAG,aAAa,EAC3C,MAAM,SAAS,cAAc,GAAG,cAAc,EAC9C,MAAM,SAAS,UAAU,GAAG,UAAU,CACtC,SAAQ,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IAC1C,OAAc,IAAI,SAAc;IAChC,OAAc,QAAQ,SAAY;WAEpB,WAAW;;;;;;;;;;;WAIX,YAAY;;;;;;;;;;IAI1B;;;OAGG;IACI,eAAe;CA0BvB;AAKD;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,OAAO,aAAa,EAAE,SAAQ,UAAe;;EAEjE,CAAC;AAGF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,IAAI,EAAE,cAAc,CAAC,aAAa,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;KACjE;CACF"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workglow/tasks",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.53",
|
|
5
5
|
"description": "Pre-built task implementations for Workglow, including common AI operations and utility functions.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"watch": "concurrently -c 'auto' 'bun:watch-*'",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@workglow/task-graph": "0.0.
|
|
34
|
-
"@workglow/util": "0.0.
|
|
35
|
-
"@workglow/job-queue": "0.0.
|
|
36
|
-
"@workglow/storage": "0.0.
|
|
33
|
+
"@workglow/task-graph": "0.0.53",
|
|
34
|
+
"@workglow/util": "0.0.53",
|
|
35
|
+
"@workglow/job-queue": "0.0.53",
|
|
36
|
+
"@workglow/storage": "0.0.53"
|
|
37
37
|
},
|
|
38
38
|
"peerDependenciesMeta": {
|
|
39
39
|
"@workglow/task-graph": {
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@workglow/job-queue": "0.0.
|
|
54
|
-
"@workglow/storage": "0.0.
|
|
55
|
-
"@workglow/task-graph": "0.0.
|
|
56
|
-
"@workglow/util": "0.0.
|
|
53
|
+
"@workglow/job-queue": "0.0.53",
|
|
54
|
+
"@workglow/storage": "0.0.53",
|
|
55
|
+
"@workglow/task-graph": "0.0.53",
|
|
56
|
+
"@workglow/util": "0.0.53"
|
|
57
57
|
}
|
|
58
58
|
}
|