@workglow/tasks 0.0.102 → 0.0.104

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 (59) hide show
  1. package/dist/browser.js +5218 -4202
  2. package/dist/browser.js.map +24 -10
  3. package/dist/bun.js +2617 -1578
  4. package/dist/bun.js.map +25 -11
  5. package/dist/common.d.ts +29 -1
  6. package/dist/common.d.ts.map +1 -1
  7. package/dist/node.js +2617 -1578
  8. package/dist/node.js.map +25 -11
  9. package/dist/task/DateFormatTask.d.ts +107 -0
  10. package/dist/task/DateFormatTask.d.ts.map +1 -0
  11. package/dist/task/FetchUrlTask.d.ts +20 -1
  12. package/dist/task/FetchUrlTask.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 +4 -0
  19. package/dist/task/JavaScriptTask.d.ts.map +1 -1
  20. package/dist/task/JsonPathTask.d.ts +77 -0
  21. package/dist/task/JsonPathTask.d.ts.map +1 -0
  22. package/dist/task/LambdaTask.d.ts +4 -0
  23. package/dist/task/LambdaTask.d.ts.map +1 -1
  24. package/dist/task/OutputTask.d.ts.map +1 -1
  25. package/dist/task/RegexTask.d.ts +109 -0
  26. package/dist/task/RegexTask.d.ts.map +1 -0
  27. package/dist/task/TemplateTask.d.ts +89 -0
  28. package/dist/task/TemplateTask.d.ts.map +1 -0
  29. package/dist/task/mcp/McpPromptGetTask.d.ts +8 -0
  30. package/dist/task/mcp/McpPromptGetTask.d.ts.map +1 -1
  31. package/dist/task/mcp/McpResourceReadTask.d.ts +8 -0
  32. package/dist/task/mcp/McpResourceReadTask.d.ts.map +1 -1
  33. package/dist/task/mcp/McpToolCallTask.d.ts +8 -0
  34. package/dist/task/mcp/McpToolCallTask.d.ts.map +1 -1
  35. package/dist/task/string/StringConcatTask.d.ts +61 -0
  36. package/dist/task/string/StringConcatTask.d.ts.map +1 -0
  37. package/dist/task/string/StringIncludesTask.d.ts +81 -0
  38. package/dist/task/string/StringIncludesTask.d.ts.map +1 -0
  39. package/dist/task/string/StringJoinTask.d.ts +89 -0
  40. package/dist/task/string/StringJoinTask.d.ts.map +1 -0
  41. package/dist/task/string/StringLengthTask.d.ts +71 -0
  42. package/dist/task/string/StringLengthTask.d.ts.map +1 -0
  43. package/dist/task/string/StringLowerCaseTask.d.ts +71 -0
  44. package/dist/task/string/StringLowerCaseTask.d.ts.map +1 -0
  45. package/dist/task/string/StringReplaceTask.d.ts +91 -0
  46. package/dist/task/string/StringReplaceTask.d.ts.map +1 -0
  47. package/dist/task/string/StringSliceTask.d.ts +91 -0
  48. package/dist/task/string/StringSliceTask.d.ts.map +1 -0
  49. package/dist/task/string/StringTemplateTask.d.ts +83 -0
  50. package/dist/task/string/StringTemplateTask.d.ts.map +1 -0
  51. package/dist/task/string/StringTrimTask.d.ts +71 -0
  52. package/dist/task/string/StringTrimTask.d.ts.map +1 -0
  53. package/dist/task/string/StringUpperCaseTask.d.ts +71 -0
  54. package/dist/task/string/StringUpperCaseTask.d.ts.map +1 -0
  55. package/package.json +9 -9
  56. package/dist/task/scalar/scalar.test.d.ts +0 -7
  57. package/dist/task/scalar/scalar.test.d.ts.map +0 -1
  58. package/dist/task/vector/vector.test.d.ts +0 -7
  59. package/dist/task/vector/vector.test.d.ts.map +0 -1
@@ -0,0 +1,83 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CreateWorkflow, IExecuteReactiveContext, Task, TaskConfig } from "@workglow/task-graph";
7
+ import { FromSchema } from "@workglow/util";
8
+ declare const inputSchema: {
9
+ readonly type: "object";
10
+ readonly properties: {
11
+ readonly template: {
12
+ readonly type: "string";
13
+ readonly title: "Template";
14
+ readonly description: "Template string with {{key}} placeholders";
15
+ };
16
+ readonly values: {
17
+ readonly type: "object";
18
+ readonly title: "Values";
19
+ readonly description: "Key-value pairs to substitute into the template";
20
+ readonly additionalProperties: true;
21
+ };
22
+ };
23
+ readonly required: readonly ["template", "values"];
24
+ readonly additionalProperties: false;
25
+ };
26
+ declare const outputSchema: {
27
+ readonly type: "object";
28
+ readonly properties: {
29
+ readonly result: {
30
+ readonly type: "string";
31
+ readonly title: "Result";
32
+ readonly description: "Template with placeholders replaced by values";
33
+ };
34
+ };
35
+ readonly required: readonly ["result"];
36
+ readonly additionalProperties: false;
37
+ };
38
+ export type StringTemplateTaskInput = FromSchema<typeof inputSchema>;
39
+ export type StringTemplateTaskOutput = FromSchema<typeof outputSchema>;
40
+ export declare class StringTemplateTask<Input extends StringTemplateTaskInput = StringTemplateTaskInput, Output extends StringTemplateTaskOutput = StringTemplateTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
41
+ static readonly type = "StringTemplateTask";
42
+ static readonly category = "String";
43
+ static title: string;
44
+ static description: string;
45
+ static inputSchema(): {
46
+ readonly type: "object";
47
+ readonly properties: {
48
+ readonly template: {
49
+ readonly type: "string";
50
+ readonly title: "Template";
51
+ readonly description: "Template string with {{key}} placeholders";
52
+ };
53
+ readonly values: {
54
+ readonly type: "object";
55
+ readonly title: "Values";
56
+ readonly description: "Key-value pairs to substitute into the template";
57
+ readonly additionalProperties: true;
58
+ };
59
+ };
60
+ readonly required: readonly ["template", "values"];
61
+ readonly additionalProperties: false;
62
+ };
63
+ static outputSchema(): {
64
+ readonly type: "object";
65
+ readonly properties: {
66
+ readonly result: {
67
+ readonly type: "string";
68
+ readonly title: "Result";
69
+ readonly description: "Template with placeholders replaced by values";
70
+ };
71
+ };
72
+ readonly required: readonly ["result"];
73
+ readonly additionalProperties: false;
74
+ };
75
+ executeReactive(input: Input, output: Output, _context: IExecuteReactiveContext): Promise<Output>;
76
+ }
77
+ declare module "@workglow/task-graph" {
78
+ interface Workflow {
79
+ stringTemplate: CreateWorkflow<StringTemplateTaskInput, StringTemplateTaskOutput, TaskConfig>;
80
+ }
81
+ }
82
+ export {};
83
+ //# sourceMappingURL=StringTemplateTask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StringTemplateTask.d.ts","sourceRoot":"","sources":["../../../src/task/string/StringTemplateTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,IAAI,EACJ,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAkB,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;CAiBkB,CAAC;AAEpC,QAAA,MAAM,YAAY;;;;;;;;;;;CAWiB,CAAC;AAEpC,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AACrE,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAEvE,qBAAa,kBAAkB,CAC7B,KAAK,SAAS,uBAAuB,GAAG,uBAAuB,EAC/D,MAAM,SAAS,wBAAwB,GAAG,wBAAwB,EAClE,MAAM,SAAS,UAAU,GAAG,UAAU,CACtC,SAAQ,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IACnC,MAAM,CAAC,QAAQ,CAAC,IAAI,wBAAwB;IAC5C,MAAM,CAAC,QAAQ,CAAC,QAAQ,YAAY;IACpC,OAAc,KAAK,SAAc;IACjC,OAAc,WAAW,SAAoE;IAE7F,MAAM,CAAC,WAAW;;;;;;;;;;;;;;;;;;IAIlB,MAAM,CAAC,YAAY;;;;;;;;;;;;IAIb,eAAe,CACnB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,uBAAuB,GAChC,OAAO,CAAC,MAAM,CAAC;CAOnB;AAED,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,cAAc,EAAE,cAAc,CAAC,uBAAuB,EAAE,wBAAwB,EAAE,UAAU,CAAC,CAAC;KAC/F;CACF"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CreateWorkflow, IExecuteReactiveContext, Task, TaskConfig } from "@workglow/task-graph";
7
+ import { FromSchema } from "@workglow/util";
8
+ declare const inputSchema: {
9
+ readonly type: "object";
10
+ readonly properties: {
11
+ readonly value: {
12
+ readonly type: "string";
13
+ readonly title: "Value";
14
+ readonly description: "Input string";
15
+ };
16
+ };
17
+ readonly required: readonly ["value"];
18
+ readonly additionalProperties: false;
19
+ };
20
+ declare const outputSchema: {
21
+ readonly type: "object";
22
+ readonly properties: {
23
+ readonly result: {
24
+ readonly type: "string";
25
+ readonly title: "Result";
26
+ readonly description: "Trimmed string";
27
+ };
28
+ };
29
+ readonly required: readonly ["result"];
30
+ readonly additionalProperties: false;
31
+ };
32
+ export type StringTrimTaskInput = FromSchema<typeof inputSchema>;
33
+ export type StringTrimTaskOutput = FromSchema<typeof outputSchema>;
34
+ export declare class StringTrimTask<Input extends StringTrimTaskInput = StringTrimTaskInput, Output extends StringTrimTaskOutput = StringTrimTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
35
+ static readonly type = "StringTrimTask";
36
+ static readonly category = "String";
37
+ static title: string;
38
+ static description: string;
39
+ static inputSchema(): {
40
+ readonly type: "object";
41
+ readonly properties: {
42
+ readonly value: {
43
+ readonly type: "string";
44
+ readonly title: "Value";
45
+ readonly description: "Input string";
46
+ };
47
+ };
48
+ readonly required: readonly ["value"];
49
+ readonly additionalProperties: false;
50
+ };
51
+ static outputSchema(): {
52
+ readonly type: "object";
53
+ readonly properties: {
54
+ readonly result: {
55
+ readonly type: "string";
56
+ readonly title: "Result";
57
+ readonly description: "Trimmed string";
58
+ };
59
+ };
60
+ readonly required: readonly ["result"];
61
+ readonly additionalProperties: false;
62
+ };
63
+ executeReactive(input: Input, output: Output, _context: IExecuteReactiveContext): Promise<Output>;
64
+ }
65
+ declare module "@workglow/task-graph" {
66
+ interface Workflow {
67
+ stringTrim: CreateWorkflow<StringTrimTaskInput, StringTrimTaskOutput, TaskConfig>;
68
+ }
69
+ }
70
+ export {};
71
+ //# sourceMappingURL=StringTrimTask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StringTrimTask.d.ts","sourceRoot":"","sources":["../../../src/task/string/StringTrimTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,IAAI,EACJ,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAkB,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,QAAA,MAAM,WAAW;;;;;;;;;;;CAWkB,CAAC;AAEpC,QAAA,MAAM,YAAY;;;;;;;;;;;CAWiB,CAAC;AAEpC,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AACjE,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAEnE,qBAAa,cAAc,CACzB,KAAK,SAAS,mBAAmB,GAAG,mBAAmB,EACvD,MAAM,SAAS,oBAAoB,GAAG,oBAAoB,EAC1D,MAAM,SAAS,UAAU,GAAG,UAAU,CACtC,SAAQ,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IACnC,MAAM,CAAC,QAAQ,CAAC,IAAI,oBAAoB;IACxC,MAAM,CAAC,QAAQ,CAAC,QAAQ,YAAY;IACpC,OAAc,KAAK,SAAU;IAC7B,OAAc,WAAW,SAA2D;IAEpF,MAAM,CAAC,WAAW;;;;;;;;;;;;IAIlB,MAAM,CAAC,YAAY;;;;;;;;;;;;IAIb,eAAe,CACnB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,uBAAuB,GAChC,OAAO,CAAC,MAAM,CAAC;CAGnB;AAED,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,UAAU,EAAE,cAAc,CAAC,mBAAmB,EAAE,oBAAoB,EAAE,UAAU,CAAC,CAAC;KACnF;CACF"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CreateWorkflow, IExecuteReactiveContext, Task, TaskConfig } from "@workglow/task-graph";
7
+ import { FromSchema } from "@workglow/util";
8
+ declare const inputSchema: {
9
+ readonly type: "object";
10
+ readonly properties: {
11
+ readonly value: {
12
+ readonly type: "string";
13
+ readonly title: "Value";
14
+ readonly description: "Input string";
15
+ };
16
+ };
17
+ readonly required: readonly ["value"];
18
+ readonly additionalProperties: false;
19
+ };
20
+ declare const outputSchema: {
21
+ readonly type: "object";
22
+ readonly properties: {
23
+ readonly result: {
24
+ readonly type: "string";
25
+ readonly title: "Result";
26
+ readonly description: "Uppercased string";
27
+ };
28
+ };
29
+ readonly required: readonly ["result"];
30
+ readonly additionalProperties: false;
31
+ };
32
+ export type StringUpperCaseTaskInput = FromSchema<typeof inputSchema>;
33
+ export type StringUpperCaseTaskOutput = FromSchema<typeof outputSchema>;
34
+ export declare class StringUpperCaseTask<Input extends StringUpperCaseTaskInput = StringUpperCaseTaskInput, Output extends StringUpperCaseTaskOutput = StringUpperCaseTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
35
+ static readonly type = "StringUpperCaseTask";
36
+ static readonly category = "String";
37
+ static title: string;
38
+ static description: string;
39
+ static inputSchema(): {
40
+ readonly type: "object";
41
+ readonly properties: {
42
+ readonly value: {
43
+ readonly type: "string";
44
+ readonly title: "Value";
45
+ readonly description: "Input string";
46
+ };
47
+ };
48
+ readonly required: readonly ["value"];
49
+ readonly additionalProperties: false;
50
+ };
51
+ static outputSchema(): {
52
+ readonly type: "object";
53
+ readonly properties: {
54
+ readonly result: {
55
+ readonly type: "string";
56
+ readonly title: "Result";
57
+ readonly description: "Uppercased string";
58
+ };
59
+ };
60
+ readonly required: readonly ["result"];
61
+ readonly additionalProperties: false;
62
+ };
63
+ executeReactive(input: Input, output: Output, _context: IExecuteReactiveContext): Promise<Output>;
64
+ }
65
+ declare module "@workglow/task-graph" {
66
+ interface Workflow {
67
+ stringUpperCase: CreateWorkflow<StringUpperCaseTaskInput, StringUpperCaseTaskOutput, TaskConfig>;
68
+ }
69
+ }
70
+ export {};
71
+ //# sourceMappingURL=StringUpperCaseTask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StringUpperCaseTask.d.ts","sourceRoot":"","sources":["../../../src/task/string/StringUpperCaseTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,IAAI,EACJ,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAkB,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,QAAA,MAAM,WAAW;;;;;;;;;;;CAWkB,CAAC;AAEpC,QAAA,MAAM,YAAY;;;;;;;;;;;CAWiB,CAAC;AAEpC,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AACtE,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAExE,qBAAa,mBAAmB,CAC9B,KAAK,SAAS,wBAAwB,GAAG,wBAAwB,EACjE,MAAM,SAAS,yBAAyB,GAAG,yBAAyB,EACpE,MAAM,SAAS,UAAU,GAAG,UAAU,CACtC,SAAQ,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IACnC,MAAM,CAAC,QAAQ,CAAC,IAAI,yBAAyB;IAC7C,MAAM,CAAC,QAAQ,CAAC,QAAQ,YAAY;IACpC,OAAc,KAAK,SAAgB;IACnC,OAAc,WAAW,SAAqC;IAE9D,MAAM,CAAC,WAAW;;;;;;;;;;;;IAIlB,MAAM,CAAC,YAAY;;;;;;;;;;;;IAIb,eAAe,CACnB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,uBAAuB,GAChC,OAAO,CAAC,MAAM,CAAC;CAGnB;AAED,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,eAAe,EAAE,cAAc,CAC7B,wBAAwB,EACxB,yBAAyB,EACzB,UAAU,CACX,CAAC;KACH;CACF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@workglow/tasks",
3
3
  "type": "module",
4
- "version": "0.0.102",
4
+ "version": "0.0.104",
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-*'",
@@ -36,10 +36,10 @@
36
36
  "access": "public"
37
37
  },
38
38
  "peerDependencies": {
39
- "@workglow/task-graph": "0.0.102",
40
- "@workglow/util": "0.0.102",
41
- "@workglow/job-queue": "0.0.102",
42
- "@workglow/storage": "0.0.102"
39
+ "@workglow/task-graph": "0.0.104",
40
+ "@workglow/util": "0.0.104",
41
+ "@workglow/job-queue": "0.0.104",
42
+ "@workglow/storage": "0.0.104"
43
43
  },
44
44
  "peerDependenciesMeta": {
45
45
  "@workglow/task-graph": {
@@ -57,10 +57,10 @@
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/papaparse": "^5.5.2",
60
- "@workglow/job-queue": "0.0.102",
61
- "@workglow/storage": "0.0.102",
62
- "@workglow/task-graph": "0.0.102",
63
- "@workglow/util": "0.0.102"
60
+ "@workglow/job-queue": "0.0.104",
61
+ "@workglow/storage": "0.0.104",
62
+ "@workglow/task-graph": "0.0.104",
63
+ "@workglow/util": "0.0.104"
64
64
  },
65
65
  "dependencies": {
66
66
  "papaparse": "^5.5.3"
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export {};
7
- //# sourceMappingURL=scalar.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scalar.test.d.ts","sourceRoot":"","sources":["../../../src/task/scalar/scalar.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export {};
7
- //# sourceMappingURL=vector.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vector.test.d.ts","sourceRoot":"","sources":["../../../src/task/vector/vector.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}