@workglow/ai 0.2.19 → 0.2.21

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 (88) hide show
  1. package/README.md +11 -0
  2. package/dist/browser.js +499 -275
  3. package/dist/browser.js.map +40 -35
  4. package/dist/bun.js +499 -275
  5. package/dist/bun.js.map +40 -35
  6. package/dist/common.d.ts +1 -0
  7. package/dist/common.d.ts.map +1 -1
  8. package/dist/errors/ImageGenerationErrors.d.ts +36 -0
  9. package/dist/errors/ImageGenerationErrors.d.ts.map +1 -0
  10. package/dist/job/AiJob.d.ts +6 -0
  11. package/dist/job/AiJob.d.ts.map +1 -1
  12. package/dist/node.js +499 -275
  13. package/dist/node.js.map +40 -35
  14. package/dist/provider/AiProviderRegistry.d.ts +6 -0
  15. package/dist/provider/AiProviderRegistry.d.ts.map +1 -1
  16. package/dist/task/AiChatTask.d.ts +1 -0
  17. package/dist/task/AiChatTask.d.ts.map +1 -1
  18. package/dist/task/BackgroundRemovalTask.d.ts +4 -10
  19. package/dist/task/BackgroundRemovalTask.d.ts.map +1 -1
  20. package/dist/task/CountTokensTask.d.ts +1 -1
  21. package/dist/task/CountTokensTask.d.ts.map +1 -1
  22. package/dist/task/DownloadModelTask.d.ts +2 -2
  23. package/dist/task/DownloadModelTask.d.ts.map +1 -1
  24. package/dist/task/FaceDetectorTask.d.ts +2 -2
  25. package/dist/task/FaceDetectorTask.d.ts.map +1 -1
  26. package/dist/task/FaceLandmarkerTask.d.ts +6 -2
  27. package/dist/task/FaceLandmarkerTask.d.ts.map +1 -1
  28. package/dist/task/GestureRecognizerTask.d.ts +10 -2
  29. package/dist/task/GestureRecognizerTask.d.ts.map +1 -1
  30. package/dist/task/HandLandmarkerTask.d.ts +10 -2
  31. package/dist/task/HandLandmarkerTask.d.ts.map +1 -1
  32. package/dist/task/ImageClassificationTask.d.ts +2 -2
  33. package/dist/task/ImageClassificationTask.d.ts.map +1 -1
  34. package/dist/task/ImageEmbeddingTask.d.ts +3 -3
  35. package/dist/task/ImageEmbeddingTask.d.ts.map +1 -1
  36. package/dist/task/ImageSegmentationTask.d.ts +2 -2
  37. package/dist/task/ImageSegmentationTask.d.ts.map +1 -1
  38. package/dist/task/ImageToTextTask.d.ts +2 -2
  39. package/dist/task/ImageToTextTask.d.ts.map +1 -1
  40. package/dist/task/ObjectDetectionTask.d.ts +2 -2
  41. package/dist/task/ObjectDetectionTask.d.ts.map +1 -1
  42. package/dist/task/PoseLandmarkerTask.d.ts +14 -10
  43. package/dist/task/PoseLandmarkerTask.d.ts.map +1 -1
  44. package/dist/task/StructuredGenerationTask.d.ts +1 -0
  45. package/dist/task/StructuredGenerationTask.d.ts.map +1 -1
  46. package/dist/task/TextClassificationTask.d.ts +1 -1
  47. package/dist/task/TextClassificationTask.d.ts.map +1 -1
  48. package/dist/task/TextEmbeddingTask.d.ts +1 -1
  49. package/dist/task/TextEmbeddingTask.d.ts.map +1 -1
  50. package/dist/task/TextFillMaskTask.d.ts +1 -1
  51. package/dist/task/TextFillMaskTask.d.ts.map +1 -1
  52. package/dist/task/TextGenerationTask.d.ts +2 -1
  53. package/dist/task/TextGenerationTask.d.ts.map +1 -1
  54. package/dist/task/TextLanguageDetectionTask.d.ts +1 -1
  55. package/dist/task/TextLanguageDetectionTask.d.ts.map +1 -1
  56. package/dist/task/TextNamedEntityRecognitionTask.d.ts +1 -1
  57. package/dist/task/TextNamedEntityRecognitionTask.d.ts.map +1 -1
  58. package/dist/task/TextQuestionAnswerTask.d.ts +2 -1
  59. package/dist/task/TextQuestionAnswerTask.d.ts.map +1 -1
  60. package/dist/task/TextRewriterTask.d.ts +2 -1
  61. package/dist/task/TextRewriterTask.d.ts.map +1 -1
  62. package/dist/task/TextSummaryTask.d.ts +2 -1
  63. package/dist/task/TextSummaryTask.d.ts.map +1 -1
  64. package/dist/task/TextTranslationTask.d.ts +2 -1
  65. package/dist/task/TextTranslationTask.d.ts.map +1 -1
  66. package/dist/task/ToolCallingTask.d.ts +2 -1
  67. package/dist/task/ToolCallingTask.d.ts.map +1 -1
  68. package/dist/task/base/AiImageOutputTask.d.ts +108 -0
  69. package/dist/task/base/AiImageOutputTask.d.ts.map +1 -0
  70. package/dist/task/base/AiTaskSchemas.d.ts +68 -2
  71. package/dist/task/base/AiTaskSchemas.d.ts.map +1 -1
  72. package/dist/task/base/AiTaskSchemas.test.d.ts +7 -0
  73. package/dist/task/base/AiTaskSchemas.test.d.ts.map +1 -0
  74. package/dist/task/base/AiVisionTask.d.ts +6 -4
  75. package/dist/task/base/AiVisionTask.d.ts.map +1 -1
  76. package/dist/task/base/StreamingAiTask.d.ts +14 -0
  77. package/dist/task/base/StreamingAiTask.d.ts.map +1 -1
  78. package/dist/task/generation/AiImageSchemas.d.ts +73 -0
  79. package/dist/task/generation/AiImageSchemas.d.ts.map +1 -0
  80. package/dist/task/generation/ImageEditTask.d.ts +156 -0
  81. package/dist/task/generation/ImageEditTask.d.ts.map +1 -0
  82. package/dist/task/generation/ImageGenerateTask.d.ts +148 -0
  83. package/dist/task/generation/ImageGenerateTask.d.ts.map +1 -0
  84. package/dist/task/index.d.ts +7 -1
  85. package/dist/task/index.d.ts.map +1 -1
  86. package/dist/worker.js +48 -11
  87. package/dist/worker.js.map +6 -5
  88. package/package.json +11 -11
package/dist/bun.js CHANGED
@@ -47,6 +47,9 @@ class AiProviderRegistry {
47
47
  registerStrategyResolver(providerName, resolver) {
48
48
  this.strategyResolvers.set(providerName, resolver);
49
49
  }
50
+ setDefaultStrategy(strategy) {
51
+ this.defaultStrategy = strategy;
52
+ }
50
53
  getStrategy(model) {
51
54
  const resolver = this.strategyResolvers.get(model.provider);
52
55
  if (resolver)
@@ -149,6 +152,41 @@ function setAiProviderRegistry(pr) {
149
152
  providerRegistry = pr;
150
153
  }
151
154
 
155
+ // src/errors/ImageGenerationErrors.ts
156
+ class ProviderUnsupportedFeatureError extends Error {
157
+ field;
158
+ modelId;
159
+ retryable = false;
160
+ constructor(field, modelId, detail) {
161
+ super(`Model "${modelId}" does not support input field "${field}": ${detail}`);
162
+ this.field = field;
163
+ this.modelId = modelId;
164
+ this.name = "ProviderUnsupportedFeatureError";
165
+ }
166
+ }
167
+
168
+ class ImageGenerationContentPolicyError extends Error {
169
+ modelId;
170
+ providerReason;
171
+ retryable = false;
172
+ constructor(modelId, providerReason) {
173
+ super(`Image generation refused by ${modelId}: ${providerReason}`);
174
+ this.modelId = modelId;
175
+ this.providerReason = providerReason;
176
+ this.name = "ImageGenerationContentPolicyError";
177
+ }
178
+ }
179
+
180
+ class ImageGenerationProviderError extends Error {
181
+ modelId;
182
+ retryable = true;
183
+ constructor(modelId, message, options) {
184
+ super(`${modelId}: ${message}`, options);
185
+ this.modelId = modelId;
186
+ this.name = "ImageGenerationProviderError";
187
+ }
188
+ }
189
+
152
190
  // src/job/AiJob.ts
153
191
  var DEFAULT_AI_TIMEOUT_MS = 120000;
154
192
  var LOCAL_INFERENCE_DEFAULT_TIMEOUT_MS = 300000;
@@ -165,6 +203,12 @@ function classifyProviderError(err, taskType, provider) {
165
203
  if (err instanceof PermanentJobError || err instanceof RetryableJobError || err instanceof AbortSignalJobError) {
166
204
  return err;
167
205
  }
206
+ if (err instanceof ProviderUnsupportedFeatureError || err instanceof ImageGenerationContentPolicyError) {
207
+ return new PermanentJobError(err.message);
208
+ }
209
+ if (err instanceof ImageGenerationProviderError) {
210
+ return err.retryable ? new RetryableJobError(err.message) : new PermanentJobError(err.message);
211
+ }
168
212
  const message = err instanceof Error ? err.message : String(err);
169
213
  const status = typeof err?.status === "number" ? err.status : typeof err?.statusCode === "number" ? err.statusCode : (() => {
170
214
  const m = message.match(/\b([45]\d{2})\b/);
@@ -251,23 +295,14 @@ class AiJob extends Job {
251
295
  return;
252
296
  }
253
297
  const model = input.taskInput.model;
254
- let lastFinishData;
255
298
  const timeoutMs = resolveAiJobTimeoutMs(input.aiProvider, input.timeoutMs);
256
299
  const timeoutSignal = AbortSignal.timeout(timeoutMs);
257
300
  const combinedSignal = AbortSignal.any([context.signal, timeoutSignal]);
258
301
  try {
259
- for await (const event of streamFn(input.taskInput, model, combinedSignal, input.outputSchema, input.sessionId)) {
260
- if (event.type === "finish") {
261
- lastFinishData = event.data;
262
- }
263
- yield event;
264
- }
302
+ yield* streamFn(input.taskInput, model, combinedSignal, input.outputSchema, input.sessionId);
265
303
  } catch (err) {
266
304
  const logger = getLogger();
267
305
  logger.warn(`AiJob: Stream error for ${input.taskType} (${input.aiProvider}): ${err instanceof Error ? err.message : String(err)}`);
268
- if (lastFinishData === undefined) {
269
- yield { type: "finish", data: {} };
270
- }
271
306
  throw classifyProviderError(err, input.taskType, input.aiProvider);
272
307
  }
273
308
  }
@@ -884,11 +919,50 @@ function TypeSingleOrArray(type) {
884
919
  anyOf: [type, { type: "array", items: type }]
885
920
  };
886
921
  }
922
+ var TypeLandmark = {
923
+ type: "object",
924
+ properties: {
925
+ x: {
926
+ type: "number",
927
+ title: "X Coordinate",
928
+ description: "X coordinate normalized to [0.0, 1.0]"
929
+ },
930
+ y: {
931
+ type: "number",
932
+ title: "Y Coordinate",
933
+ description: "Y coordinate normalized to [0.0, 1.0]"
934
+ },
935
+ z: {
936
+ type: "number",
937
+ title: "Z Coordinate",
938
+ description: "Z coordinate (depth)"
939
+ }
940
+ },
941
+ required: ["x", "y", "z"],
942
+ format: "point:3d:relative",
943
+ additionalProperties: false
944
+ };
945
+ var TypePoseLandmark = {
946
+ ...TypeLandmark,
947
+ properties: {
948
+ ...TypeLandmark.properties,
949
+ visibility: {
950
+ type: "number",
951
+ title: "Visibility",
952
+ description: "Likelihood of the landmark being visible within the image"
953
+ },
954
+ presence: {
955
+ type: "number",
956
+ title: "Presence",
957
+ description: "Likelihood of the landmark being present in the image"
958
+ }
959
+ }
960
+ };
887
961
  var TypeImageInput = {
888
962
  type: "object",
889
963
  properties: {},
890
964
  title: "Image",
891
- description: "Image as data URI, Blob, ImageBitmap, ImageBinary, or GpuImage \u2014 hydrated to GpuImage by the runner",
965
+ description: "Image as data: URI, Blob, ImageBitmap, or ImageValue \u2014 hydrated to ImageValue at task entry",
892
966
  format: "image"
893
967
  };
894
968
  var TypeAudioInput = {
@@ -1118,6 +1192,8 @@ class AiTask extends Task {
1118
1192
  // src/task/base/StreamingAiTask.ts
1119
1193
  class StreamingAiTask extends AiTask {
1120
1194
  static type = "StreamingAiTask";
1195
+ static preparingPhaseLabel = "Preparing";
1196
+ static streamingPhaseLabel = "Streaming";
1121
1197
  async* executeStream(input, context) {
1122
1198
  const model = input.model;
1123
1199
  if (!model || typeof model !== "object") {
@@ -1137,7 +1213,16 @@ class StreamingAiTask extends AiTask {
1137
1213
  defaultPort = firstProp;
1138
1214
  }
1139
1215
  }
1216
+ const ctor = this.constructor;
1217
+ const preparingLabel = ctor.preparingPhaseLabel;
1218
+ const streamingLabel = ctor.streamingPhaseLabel;
1219
+ yield { type: "phase", message: preparingLabel, progress: undefined };
1220
+ let firstDataSeen = false;
1140
1221
  for await (const event of strategy.executeStream(jobInput, context, this.runConfig.runnerId)) {
1222
+ if (!firstDataSeen && (event.type === "text-delta" || event.type === "object-delta" || event.type === "snapshot")) {
1223
+ firstDataSeen = true;
1224
+ yield { type: "phase", message: streamingLabel, progress: undefined };
1225
+ }
1141
1226
  if (event.type === "text-delta") {
1142
1227
  yield { ...event, port: event.port ?? defaultPort };
1143
1228
  } else if (event.type === "object-delta") {
@@ -1362,6 +1447,7 @@ var AiChatOutputSchema = {
1362
1447
 
1363
1448
  class AiChatTask extends StreamingAiTask {
1364
1449
  static type = "AiChatTask";
1450
+ static streamingPhaseLabel = "Replying";
1365
1451
  static category = "AI Chat";
1366
1452
  static title = "AI Chat";
1367
1453
  static description = "Multi-turn chat with a language model, using a human connector to collect user input between turns.";
@@ -1507,40 +1593,15 @@ class AiChatTask extends StreamingAiTask {
1507
1593
 
1508
1594
  // src/task/BackgroundRemovalTask.ts
1509
1595
  import { CreateWorkflow, Workflow } from "@workglow/task-graph";
1596
+ import { ImageValueSchema } from "@workglow/util/media";
1510
1597
 
1511
1598
  // src/task/base/AiVisionTask.ts
1512
1599
  class AiVisionTask extends AiTask {
1513
1600
  static type = "AiVisionTask";
1514
- async getJobInput(input) {
1515
- const jobInput = await super.getJobInput(input);
1516
- if (!input.image)
1517
- return jobInput;
1518
- const provider = input.model.provider;
1519
- const wantsBitmap = typeof provider === "string" && provider.startsWith("TENSORFLOW_MEDIAPIPE") && typeof ImageBitmap !== "undefined";
1520
- const materializeOne = async (img) => {
1521
- if (wantsBitmap) {
1522
- const bin = await img.materialize();
1523
- const id = new ImageData(bin.data, bin.width, bin.height);
1524
- return createImageBitmap(id);
1525
- }
1526
- return img.materialize();
1527
- };
1528
- const value = input.image;
1529
- const materialized = Array.isArray(value) ? await Promise.all(value.map(materializeOne)) : await materializeOne(value);
1530
- jobInput.taskInput.image = materialized;
1531
- return jobInput;
1532
- }
1533
1601
  }
1534
1602
 
1535
1603
  // src/task/BackgroundRemovalTask.ts
1536
1604
  var modelSchema2 = TypeModel("model:BackgroundRemovalTask");
1537
- var processedImageSchema = {
1538
- type: "string",
1539
- contentEncoding: "base64",
1540
- contentMediaType: "image/png",
1541
- title: "Image",
1542
- description: "Base64-encoded PNG image with transparent background"
1543
- };
1544
1605
  var BackgroundRemovalInputSchema = {
1545
1606
  type: "object",
1546
1607
  properties: {
@@ -1553,7 +1614,10 @@ var BackgroundRemovalInputSchema = {
1553
1614
  var BackgroundRemovalOutputSchema = {
1554
1615
  type: "object",
1555
1616
  properties: {
1556
- image: processedImageSchema
1617
+ image: ImageValueSchema({
1618
+ title: "Image",
1619
+ description: "Image with transparent background"
1620
+ })
1557
1621
  },
1558
1622
  required: ["image"],
1559
1623
  additionalProperties: false
@@ -1561,7 +1625,7 @@ var BackgroundRemovalOutputSchema = {
1561
1625
 
1562
1626
  class BackgroundRemovalTask extends AiVisionTask {
1563
1627
  static type = "BackgroundRemovalTask";
1564
- static category = "AI Vision Model";
1628
+ static category = "AI Vision";
1565
1629
  static title = "Background Removal";
1566
1630
  static description = "Removes backgrounds from images, producing images with transparent backgrounds";
1567
1631
  static inputSchema() {
@@ -1617,7 +1681,7 @@ var TextEmbeddingOutputSchema = {
1617
1681
 
1618
1682
  class TextEmbeddingTask extends AiTask {
1619
1683
  static type = "TextEmbeddingTask";
1620
- static category = "AI Text Model";
1684
+ static category = "AI Text";
1621
1685
  static title = "Text Embedding";
1622
1686
  static description = "Generates vector embeddings for text to capture semantic meaning";
1623
1687
  static inputSchema() {
@@ -2000,7 +2064,7 @@ var CountTokensOutputSchema = {
2000
2064
 
2001
2065
  class CountTokensTask extends AiTask {
2002
2066
  static type = "CountTokensTask";
2003
- static category = "AI Text Model";
2067
+ static category = "AI Text";
2004
2068
  static title = "Count Tokens";
2005
2069
  static description = "Counts the number of tokens in a text string using the model's tokenizer";
2006
2070
  static cacheable = true;
@@ -2386,7 +2450,7 @@ var TextNamedEntityRecognitionOutputSchema = {
2386
2450
 
2387
2451
  class TextNamedEntityRecognitionTask extends AiTask {
2388
2452
  static type = "TextNamedEntityRecognitionTask";
2389
- static category = "AI Text Model";
2453
+ static category = "AI Text";
2390
2454
  static title = "Named Entity Recognition";
2391
2455
  static description = "Extracts named entities from text";
2392
2456
  static inputSchema() {
@@ -2433,8 +2497,9 @@ var TextSummaryOutputSchema = {
2433
2497
 
2434
2498
  class TextSummaryTask extends StreamingAiTask {
2435
2499
  static type = "TextSummaryTask";
2436
- static category = "AI Text Model";
2500
+ static category = "AI Text";
2437
2501
  static title = "Text Summary";
2502
+ static streamingPhaseLabel = "Summarizing";
2438
2503
  static description = "Summarizes text into a shorter form while preserving key information";
2439
2504
  static inputSchema() {
2440
2505
  return TextSummaryInputSchema;
@@ -2834,9 +2899,196 @@ var downloadModel = (input, config) => {
2834
2899
  };
2835
2900
  Workflow11.prototype.downloadModel = CreateWorkflow11(DownloadModelTask);
2836
2901
 
2837
- // src/task/FaceDetectorTask.ts
2902
+ // src/task/generation/ImageEditTask.ts
2838
2903
  import { CreateWorkflow as CreateWorkflow12, Workflow as Workflow12 } from "@workglow/task-graph";
2839
- var modelSchema9 = TypeModel("model:FaceDetectorTask");
2904
+ import { ImageValueSchema as ImageValueSchema3 } from "@workglow/util/media";
2905
+
2906
+ // src/task/base/AiImageOutputTask.ts
2907
+ class AiImageOutputTask extends StreamingAiTask {
2908
+ static type = "AiImageOutputTask";
2909
+ static streamingPhaseLabel = "Rendering";
2910
+ _latestPartial = undefined;
2911
+ get cacheable() {
2912
+ const seed = this.runInputData?.seed;
2913
+ if (seed === undefined || seed === null)
2914
+ return false;
2915
+ return super.cacheable;
2916
+ }
2917
+ ingestPartial(image) {
2918
+ this._latestPartial = image;
2919
+ }
2920
+ takeFinalPartial() {
2921
+ const partial = this._latestPartial;
2922
+ this._latestPartial = undefined;
2923
+ return partial;
2924
+ }
2925
+ discardPartial() {
2926
+ this._latestPartial = undefined;
2927
+ }
2928
+ async* executeStream(input, context) {
2929
+ try {
2930
+ for await (const event of super.executeStream(input, context)) {
2931
+ if (event.type === "snapshot") {
2932
+ const newImage = event.data?.image;
2933
+ if (newImage) {
2934
+ this.ingestPartial(newImage);
2935
+ }
2936
+ yield event;
2937
+ } else if (event.type === "finish") {
2938
+ this._latestPartial = undefined;
2939
+ yield event;
2940
+ } else {
2941
+ yield event;
2942
+ }
2943
+ }
2944
+ } catch (err) {
2945
+ this.discardPartial();
2946
+ throw err;
2947
+ }
2948
+ }
2949
+ async executePreview(_input, _context) {
2950
+ if (this._latestPartial !== undefined) {
2951
+ return { image: this._latestPartial };
2952
+ }
2953
+ const prior = this.runOutputData?.image;
2954
+ if (prior !== undefined) {
2955
+ return { image: prior };
2956
+ }
2957
+ return;
2958
+ }
2959
+ async cleanup() {
2960
+ this.discardPartial();
2961
+ }
2962
+ async validateProviderImageInput(input) {
2963
+ const model = input.model;
2964
+ if (!model || typeof model === "string")
2965
+ return;
2966
+ const provider = model.provider;
2967
+ const validator = AiImageOutputTask._providerValidators.get(provider);
2968
+ if (validator) {
2969
+ await validator(this.type, input, model);
2970
+ }
2971
+ }
2972
+ static _providerValidators = new Map;
2973
+ static registerProviderImageValidator(providerName, validator) {
2974
+ AiImageOutputTask._providerValidators.set(providerName, validator);
2975
+ }
2976
+ static unregisterProviderImageValidator(providerName) {
2977
+ AiImageOutputTask._providerValidators.delete(providerName);
2978
+ }
2979
+ static UnsupportedFeatureError = ProviderUnsupportedFeatureError;
2980
+ }
2981
+
2982
+ // src/task/generation/AiImageSchemas.ts
2983
+ import { ImageValueSchema as ImageValueSchema2 } from "@workglow/util/media";
2984
+ var AspectRatioSchema = {
2985
+ type: "string",
2986
+ title: "Aspect Ratio",
2987
+ description: "Output image aspect ratio. Mapped per-provider to the nearest supported size.",
2988
+ enum: ["1:1", "16:9", "9:16", "4:3", "3:4"],
2989
+ default: "1:1"
2990
+ };
2991
+ var QualitySchema = {
2992
+ type: "string",
2993
+ title: "Quality",
2994
+ description: "Generation quality. Only honored by providers that support it (gpt-image-2).",
2995
+ enum: ["low", "medium", "high"],
2996
+ "x-ui-group": "Configuration"
2997
+ };
2998
+ var AiImageOptionsProperties = {
2999
+ aspectRatio: AspectRatioSchema,
3000
+ quality: QualitySchema,
3001
+ seed: {
3002
+ type: "number",
3003
+ title: "Seed",
3004
+ description: "Random seed for reproducibility. When unset, results are non-deterministic and the task is treated as not cacheable.",
3005
+ "x-ui-group": "Configuration"
3006
+ },
3007
+ negativePrompt: {
3008
+ type: "string",
3009
+ title: "Negative Prompt",
3010
+ description: "What the model should avoid. Honored by providers that support it (Imagen, HF diffusion models).",
3011
+ "x-ui-group": "Configuration"
3012
+ },
3013
+ providerOptions: {
3014
+ type: "object",
3015
+ title: "Provider Options",
3016
+ description: "Provider-specific options that don't normalize across providers (e.g., DALL-E style, HF guidance scale).",
3017
+ additionalProperties: true,
3018
+ "x-ui-group": "Advanced"
3019
+ }
3020
+ };
3021
+ var AiImageOutputSchema = {
3022
+ type: "object",
3023
+ properties: {
3024
+ image: ImageValueSchema2({
3025
+ title: "Image",
3026
+ description: "Generated image",
3027
+ "x-stream": "replace"
3028
+ })
3029
+ },
3030
+ required: ["image"],
3031
+ additionalProperties: false
3032
+ };
3033
+
3034
+ // src/task/generation/ImageEditTask.ts
3035
+ var modelSchema9 = TypeModel("model:ImageEditTask");
3036
+ var ImageEditInputSchema = {
3037
+ type: "object",
3038
+ properties: {
3039
+ model: modelSchema9,
3040
+ prompt: {
3041
+ type: "string",
3042
+ title: "Prompt",
3043
+ description: "Text describing the edit to apply"
3044
+ },
3045
+ image: ImageValueSchema3({
3046
+ title: "Image",
3047
+ description: "Primary image to edit"
3048
+ }),
3049
+ mask: ImageValueSchema3({
3050
+ title: "Mask",
3051
+ description: "Optional inpainting mask. Transparent regions indicate where to edit. Supported by OpenAI and HF inpainting models."
3052
+ }),
3053
+ additionalImages: {
3054
+ type: "array",
3055
+ title: "Additional Images",
3056
+ description: "Optional reference / composite images. Used by gpt-image-2 and Gemini 2.5 Flash Image for multi-image edits.",
3057
+ items: ImageValueSchema3()
3058
+ },
3059
+ ...AiImageOptionsProperties
3060
+ },
3061
+ required: ["model", "prompt", "image"],
3062
+ additionalProperties: false
3063
+ };
3064
+ var ImageEditOutputSchema = AiImageOutputSchema;
3065
+
3066
+ class ImageEditTask extends AiImageOutputTask {
3067
+ static type = "ImageEditTask";
3068
+ static category = "AI Vision";
3069
+ static title = "Edit Image";
3070
+ static description = "Edits an input image guided by a prompt. Optionally accepts a mask (inpaint) and/or additional reference images (composite).";
3071
+ static cacheable = true;
3072
+ static inputSchema() {
3073
+ return ImageEditInputSchema;
3074
+ }
3075
+ static outputSchema() {
3076
+ return ImageEditOutputSchema;
3077
+ }
3078
+ async validateInput(input) {
3079
+ const ok = await super.validateInput(input);
3080
+ if (!ok)
3081
+ return false;
3082
+ await this.validateProviderImageInput(input);
3083
+ return true;
3084
+ }
3085
+ }
3086
+ var imageEdit = (input, config) => new ImageEditTask(config).run(input);
3087
+ Workflow12.prototype.imageEdit = CreateWorkflow12(ImageEditTask);
3088
+
3089
+ // src/task/FaceDetectorTask.ts
3090
+ import { CreateWorkflow as CreateWorkflow13, Workflow as Workflow13 } from "@workglow/task-graph";
3091
+ var modelSchema10 = TypeModel("model:FaceDetectorTask");
2840
3092
  var TypeBoundingBox2 = {
2841
3093
  type: "object",
2842
3094
  properties: {
@@ -2909,7 +3161,7 @@ var FaceDetectorInputSchema = {
2909
3161
  type: "object",
2910
3162
  properties: {
2911
3163
  image: TypeImageInput,
2912
- model: modelSchema9,
3164
+ model: modelSchema10,
2913
3165
  minDetectionConfidence: {
2914
3166
  type: "number",
2915
3167
  minimum: 0,
@@ -2950,7 +3202,7 @@ var FaceDetectorOutputSchema = {
2950
3202
 
2951
3203
  class FaceDetectorTask extends AiVisionTask {
2952
3204
  static type = "FaceDetectorTask";
2953
- static category = "AI Vision Model";
3205
+ static category = "AI Vision";
2954
3206
  static title = "Face Detector";
2955
3207
  static description = "Detects faces in images. Locates faces and identifies facial keypoints like eyes, nose, and mouth.";
2956
3208
  static inputSchema() {
@@ -2963,33 +3215,11 @@ class FaceDetectorTask extends AiVisionTask {
2963
3215
  var faceDetector = (input, config) => {
2964
3216
  return new FaceDetectorTask(config).run(input);
2965
3217
  };
2966
- Workflow12.prototype.faceDetector = CreateWorkflow12(FaceDetectorTask);
3218
+ Workflow13.prototype.faceDetector = CreateWorkflow13(FaceDetectorTask);
2967
3219
 
2968
3220
  // src/task/FaceLandmarkerTask.ts
2969
- import { CreateWorkflow as CreateWorkflow13, Workflow as Workflow13 } from "@workglow/task-graph";
2970
- var modelSchema10 = TypeModel("model:FaceLandmarkerTask");
2971
- var TypeLandmark = {
2972
- type: "object",
2973
- properties: {
2974
- x: {
2975
- type: "number",
2976
- title: "X Coordinate",
2977
- description: "X coordinate normalized to [0.0, 1.0]"
2978
- },
2979
- y: {
2980
- type: "number",
2981
- title: "Y Coordinate",
2982
- description: "Y coordinate normalized to [0.0, 1.0]"
2983
- },
2984
- z: {
2985
- type: "number",
2986
- title: "Z Coordinate",
2987
- description: "Z coordinate (depth)"
2988
- }
2989
- },
2990
- required: ["x", "y", "z"],
2991
- additionalProperties: false
2992
- };
3221
+ import { CreateWorkflow as CreateWorkflow14, Workflow as Workflow14 } from "@workglow/task-graph";
3222
+ var modelSchema11 = TypeModel("model:FaceLandmarkerTask");
2993
3223
  var TypeBlendshape = {
2994
3224
  type: "object",
2995
3225
  properties: {
@@ -3022,7 +3252,8 @@ var TypeFaceLandmarkerDetection = {
3022
3252
  type: "array",
3023
3253
  items: TypeLandmark,
3024
3254
  title: "Landmarks",
3025
- description: "478 facial landmarks in image coordinates"
3255
+ description: "478 facial landmarks in image coordinates",
3256
+ format: "points:3d:relative"
3026
3257
  },
3027
3258
  blendshapes: {
3028
3259
  type: "array",
@@ -3039,7 +3270,7 @@ var FaceLandmarkerInputSchema = {
3039
3270
  type: "object",
3040
3271
  properties: {
3041
3272
  image: TypeImageInput,
3042
- model: modelSchema10,
3273
+ model: modelSchema11,
3043
3274
  numFaces: {
3044
3275
  type: "number",
3045
3276
  minimum: 1,
@@ -3112,7 +3343,7 @@ var FaceLandmarkerOutputSchema = {
3112
3343
 
3113
3344
  class FaceLandmarkerTask extends AiVisionTask {
3114
3345
  static type = "FaceLandmarkerTask";
3115
- static category = "AI Vision Model";
3346
+ static category = "AI Vision";
3116
3347
  static title = "Face Landmarker";
3117
3348
  static description = "Detects facial landmarks and expressions in images. Identifies 478 facial landmarks, blendshapes for expressions, and transformation matrices for AR effects.";
3118
3349
  static inputSchema() {
@@ -3125,33 +3356,53 @@ class FaceLandmarkerTask extends AiVisionTask {
3125
3356
  var faceLandmarker = (input, config) => {
3126
3357
  return new FaceLandmarkerTask(config).run(input);
3127
3358
  };
3128
- Workflow13.prototype.faceLandmarker = CreateWorkflow13(FaceLandmarkerTask);
3359
+ Workflow14.prototype.faceLandmarker = CreateWorkflow14(FaceLandmarkerTask);
3129
3360
 
3130
- // src/task/GestureRecognizerTask.ts
3131
- import { CreateWorkflow as CreateWorkflow14, Workflow as Workflow14 } from "@workglow/task-graph";
3132
- var modelSchema11 = TypeModel("model:GestureRecognizerTask");
3133
- var TypeLandmark2 = {
3361
+ // src/task/generation/ImageGenerateTask.ts
3362
+ import { CreateWorkflow as CreateWorkflow15, Workflow as Workflow15 } from "@workglow/task-graph";
3363
+ var modelSchema12 = TypeModel("model:ImageGenerateTask");
3364
+ var ImageGenerateInputSchema = {
3134
3365
  type: "object",
3135
3366
  properties: {
3136
- x: {
3137
- type: "number",
3138
- title: "X Coordinate",
3139
- description: "X coordinate normalized to [0.0, 1.0]"
3140
- },
3141
- y: {
3142
- type: "number",
3143
- title: "Y Coordinate",
3144
- description: "Y coordinate normalized to [0.0, 1.0]"
3367
+ model: modelSchema12,
3368
+ prompt: {
3369
+ type: "string",
3370
+ title: "Prompt",
3371
+ description: "Text describing the image to generate"
3145
3372
  },
3146
- z: {
3147
- type: "number",
3148
- title: "Z Coordinate",
3149
- description: "Z coordinate (depth)"
3150
- }
3373
+ ...AiImageOptionsProperties
3151
3374
  },
3152
- required: ["x", "y", "z"],
3375
+ required: ["model", "prompt"],
3153
3376
  additionalProperties: false
3154
3377
  };
3378
+ var ImageGenerateOutputSchema = AiImageOutputSchema;
3379
+
3380
+ class ImageGenerateTask extends AiImageOutputTask {
3381
+ static type = "ImageGenerateTask";
3382
+ static category = "AI Vision";
3383
+ static title = "Generate Image";
3384
+ static description = "Generates an image from a text prompt using configurable AI image-generation models.";
3385
+ static cacheable = true;
3386
+ static inputSchema() {
3387
+ return ImageGenerateInputSchema;
3388
+ }
3389
+ static outputSchema() {
3390
+ return ImageGenerateOutputSchema;
3391
+ }
3392
+ async validateInput(input) {
3393
+ const ok = await super.validateInput(input);
3394
+ if (!ok)
3395
+ return false;
3396
+ await this.validateProviderImageInput(input);
3397
+ return true;
3398
+ }
3399
+ }
3400
+ var imageGenerate = (input, config) => new ImageGenerateTask(config).run(input);
3401
+ Workflow15.prototype.imageGenerate = CreateWorkflow15(ImageGenerateTask);
3402
+
3403
+ // src/task/GestureRecognizerTask.ts
3404
+ import { CreateWorkflow as CreateWorkflow16, Workflow as Workflow16 } from "@workglow/task-graph";
3405
+ var modelSchema13 = TypeModel("model:GestureRecognizerTask");
3155
3406
  var TypeGesture = {
3156
3407
  type: "object",
3157
3408
  properties: {
@@ -3203,15 +3454,17 @@ var TypeHandGestureDetection = {
3203
3454
  },
3204
3455
  landmarks: {
3205
3456
  type: "array",
3206
- items: TypeLandmark2,
3457
+ items: TypeLandmark,
3207
3458
  title: "Landmarks",
3208
- description: "21 hand landmarks in image coordinates"
3459
+ description: "21 hand landmarks in image coordinates",
3460
+ format: "points:3d:relative"
3209
3461
  },
3210
3462
  worldLandmarks: {
3211
3463
  type: "array",
3212
- items: TypeLandmark2,
3464
+ items: TypeLandmark,
3213
3465
  title: "World Landmarks",
3214
- description: "21 hand landmarks in 3D world coordinates (meters)"
3466
+ description: "21 hand landmarks in 3D world coordinates (meters)",
3467
+ format: "points:3d:meters"
3215
3468
  }
3216
3469
  },
3217
3470
  required: ["gestures", "handedness", "landmarks", "worldLandmarks"],
@@ -3221,7 +3474,7 @@ var GestureRecognizerInputSchema = {
3221
3474
  type: "object",
3222
3475
  properties: {
3223
3476
  image: TypeImageInput,
3224
- model: modelSchema11,
3477
+ model: modelSchema13,
3225
3478
  numHands: {
3226
3479
  type: "number",
3227
3480
  minimum: 1,
@@ -3280,7 +3533,7 @@ var GestureRecognizerOutputSchema = {
3280
3533
 
3281
3534
  class GestureRecognizerTask extends AiVisionTask {
3282
3535
  static type = "GestureRecognizerTask";
3283
- static category = "AI Vision Model";
3536
+ static category = "AI Vision";
3284
3537
  static title = "Gesture Recognizer";
3285
3538
  static description = "Recognizes hand gestures in images. Detects hand landmarks, identifies gestures (thumbs up, victory, etc.), and classifies handedness.";
3286
3539
  static inputSchema() {
@@ -3293,33 +3546,11 @@ class GestureRecognizerTask extends AiVisionTask {
3293
3546
  var gestureRecognizer = (input, config) => {
3294
3547
  return new GestureRecognizerTask(config).run(input);
3295
3548
  };
3296
- Workflow14.prototype.gestureRecognizer = CreateWorkflow14(GestureRecognizerTask);
3549
+ Workflow16.prototype.gestureRecognizer = CreateWorkflow16(GestureRecognizerTask);
3297
3550
 
3298
3551
  // src/task/HandLandmarkerTask.ts
3299
- import { CreateWorkflow as CreateWorkflow15, Workflow as Workflow15 } from "@workglow/task-graph";
3300
- var modelSchema12 = TypeModel("model:HandLandmarkerTask");
3301
- var TypeLandmark3 = {
3302
- type: "object",
3303
- properties: {
3304
- x: {
3305
- type: "number",
3306
- title: "X Coordinate",
3307
- description: "X coordinate normalized to [0.0, 1.0]"
3308
- },
3309
- y: {
3310
- type: "number",
3311
- title: "Y Coordinate",
3312
- description: "Y coordinate normalized to [0.0, 1.0]"
3313
- },
3314
- z: {
3315
- type: "number",
3316
- title: "Z Coordinate",
3317
- description: "Z coordinate (depth)"
3318
- }
3319
- },
3320
- required: ["x", "y", "z"],
3321
- additionalProperties: false
3322
- };
3552
+ import { CreateWorkflow as CreateWorkflow17, Workflow as Workflow17 } from "@workglow/task-graph";
3553
+ var modelSchema14 = TypeModel("model:HandLandmarkerTask");
3323
3554
  var TypeHandedness2 = {
3324
3555
  type: "object",
3325
3556
  properties: {
@@ -3348,15 +3579,17 @@ var TypeHandDetection = {
3348
3579
  },
3349
3580
  landmarks: {
3350
3581
  type: "array",
3351
- items: TypeLandmark3,
3582
+ items: TypeLandmark,
3352
3583
  title: "Landmarks",
3353
- description: "21 hand landmarks in image coordinates"
3584
+ description: "21 hand landmarks in image coordinates",
3585
+ format: "points:3d:relative"
3354
3586
  },
3355
3587
  worldLandmarks: {
3356
3588
  type: "array",
3357
- items: TypeLandmark3,
3589
+ items: TypeLandmark,
3358
3590
  title: "World Landmarks",
3359
- description: "21 hand landmarks in 3D world coordinates (meters)"
3591
+ description: "21 hand landmarks in 3D world coordinates (meters)",
3592
+ format: "points:3d:meters"
3360
3593
  }
3361
3594
  },
3362
3595
  required: ["handedness", "landmarks", "worldLandmarks"],
@@ -3366,7 +3599,7 @@ var HandLandmarkerInputSchema = {
3366
3599
  type: "object",
3367
3600
  properties: {
3368
3601
  image: TypeImageInput,
3369
- model: modelSchema12,
3602
+ model: modelSchema14,
3370
3603
  numHands: {
3371
3604
  type: "number",
3372
3605
  minimum: 1,
@@ -3425,7 +3658,7 @@ var HandLandmarkerOutputSchema = {
3425
3658
 
3426
3659
  class HandLandmarkerTask extends AiVisionTask {
3427
3660
  static type = "HandLandmarkerTask";
3428
- static category = "AI Vision Model";
3661
+ static category = "AI Vision";
3429
3662
  static title = "Hand Landmarker";
3430
3663
  static description = "Detects hand landmarks in images. Identifies 21 hand landmarks and classifies left vs. right hands.";
3431
3664
  static inputSchema() {
@@ -3438,7 +3671,7 @@ class HandLandmarkerTask extends AiVisionTask {
3438
3671
  var handLandmarker = (input, config) => {
3439
3672
  return new HandLandmarkerTask(config).run(input);
3440
3673
  };
3441
- Workflow15.prototype.handLandmarker = CreateWorkflow15(HandLandmarkerTask);
3674
+ Workflow17.prototype.handLandmarker = CreateWorkflow17(HandLandmarkerTask);
3442
3675
 
3443
3676
  // src/task/HierarchicalChunkerTask.ts
3444
3677
  import {
@@ -3447,9 +3680,9 @@ import {
3447
3680
  getChildren as getChildren2,
3448
3681
  hasChildren as hasChildren2
3449
3682
  } from "@workglow/knowledge-base";
3450
- import { CreateWorkflow as CreateWorkflow16, Task as Task7, Workflow as Workflow16 } from "@workglow/task-graph";
3683
+ import { CreateWorkflow as CreateWorkflow18, Task as Task7, Workflow as Workflow18 } from "@workglow/task-graph";
3451
3684
  import { uuid4 } from "@workglow/util";
3452
- var modelSchema13 = TypeModel("model", {
3685
+ var modelSchema15 = TypeModel("model", {
3453
3686
  title: "Model",
3454
3687
  description: "Model to use for token counting"
3455
3688
  });
@@ -3495,7 +3728,7 @@ var inputSchema6 = {
3495
3728
  description: "Strategy for chunking",
3496
3729
  default: "hierarchical"
3497
3730
  },
3498
- model: modelSchema13
3731
+ model: modelSchema15
3499
3732
  },
3500
3733
  required: ["doc_id", "documentTree"],
3501
3734
  additionalProperties: false
@@ -3674,11 +3907,11 @@ class HierarchicalChunkerTask extends Task7 {
3674
3907
  var hierarchicalChunker = (input, config) => {
3675
3908
  return new HierarchicalChunkerTask(config).run(input);
3676
3909
  };
3677
- Workflow16.prototype.hierarchicalChunker = CreateWorkflow16(HierarchicalChunkerTask);
3910
+ Workflow18.prototype.hierarchicalChunker = CreateWorkflow18(HierarchicalChunkerTask);
3678
3911
 
3679
3912
  // src/task/HierarchyJoinTask.ts
3680
3913
  import { ChunkRecordArraySchema as ChunkRecordArraySchema2, TypeKnowledgeBase as TypeKnowledgeBase4 } from "@workglow/knowledge-base";
3681
- import { CreateWorkflow as CreateWorkflow17, Task as Task8, Workflow as Workflow17 } from "@workglow/task-graph";
3914
+ import { CreateWorkflow as CreateWorkflow19, Task as Task8, Workflow as Workflow19 } from "@workglow/task-graph";
3682
3915
  var inputSchema7 = {
3683
3916
  type: "object",
3684
3917
  properties: {
@@ -3849,11 +4082,11 @@ class HierarchyJoinTask extends Task8 {
3849
4082
  var hierarchyJoin = (input, config) => {
3850
4083
  return new HierarchyJoinTask(config).run(input);
3851
4084
  };
3852
- Workflow17.prototype.hierarchyJoin = CreateWorkflow17(HierarchyJoinTask);
4085
+ Workflow19.prototype.hierarchyJoin = CreateWorkflow19(HierarchyJoinTask);
3853
4086
 
3854
4087
  // src/task/KbToDocumentsTask.ts
3855
4088
  import { TypeKnowledgeBase as TypeKnowledgeBase5 } from "@workglow/knowledge-base";
3856
- import { CreateWorkflow as CreateWorkflow18, Task as Task9, Workflow as Workflow18 } from "@workglow/task-graph";
4089
+ import { CreateWorkflow as CreateWorkflow20, Task as Task9, Workflow as Workflow20 } from "@workglow/task-graph";
3857
4090
  var inputSchema8 = {
3858
4091
  type: "object",
3859
4092
  properties: {
@@ -3938,16 +4171,16 @@ class KbToDocumentsTask extends Task9 {
3938
4171
  var kbToDocuments = (input, config) => {
3939
4172
  return new KbToDocumentsTask(config).run(input);
3940
4173
  };
3941
- Workflow18.prototype.kbToDocuments = CreateWorkflow18(KbToDocumentsTask);
4174
+ Workflow20.prototype.kbToDocuments = CreateWorkflow20(KbToDocumentsTask);
3942
4175
 
3943
4176
  // src/task/ImageClassificationTask.ts
3944
- import { CreateWorkflow as CreateWorkflow19, Workflow as Workflow19 } from "@workglow/task-graph";
3945
- var modelSchema14 = TypeModel("model:ImageClassificationTask");
4177
+ import { CreateWorkflow as CreateWorkflow21, Workflow as Workflow21 } from "@workglow/task-graph";
4178
+ var modelSchema16 = TypeModel("model:ImageClassificationTask");
3946
4179
  var ImageClassificationInputSchema = {
3947
4180
  type: "object",
3948
4181
  properties: {
3949
4182
  image: TypeImageInput,
3950
- model: modelSchema14,
4183
+ model: modelSchema16,
3951
4184
  categories: {
3952
4185
  type: "array",
3953
4186
  items: {
@@ -3988,7 +4221,7 @@ var ImageClassificationOutputSchema = {
3988
4221
 
3989
4222
  class ImageClassificationTask extends AiVisionTask {
3990
4223
  static type = "ImageClassificationTask";
3991
- static category = "AI Vision Model";
4224
+ static category = "AI Vision";
3992
4225
  static title = "Image Classification";
3993
4226
  static description = "Classifies images into categories using vision models. Supports zero-shot classification when categories are provided.";
3994
4227
  static inputSchema() {
@@ -4001,19 +4234,19 @@ class ImageClassificationTask extends AiVisionTask {
4001
4234
  var imageClassification = (input, config) => {
4002
4235
  return new ImageClassificationTask(config).run(input);
4003
4236
  };
4004
- Workflow19.prototype.imageClassification = CreateWorkflow19(ImageClassificationTask);
4237
+ Workflow21.prototype.imageClassification = CreateWorkflow21(ImageClassificationTask);
4005
4238
 
4006
4239
  // src/task/ImageEmbeddingTask.ts
4007
- import { CreateWorkflow as CreateWorkflow20, Workflow as Workflow20 } from "@workglow/task-graph";
4240
+ import { CreateWorkflow as CreateWorkflow22, Workflow as Workflow22 } from "@workglow/task-graph";
4008
4241
  import {
4009
4242
  TypedArraySchema as TypedArraySchema4
4010
4243
  } from "@workglow/util/schema";
4011
- var modelSchema15 = TypeModel("model:ImageEmbeddingTask");
4244
+ var modelSchema17 = TypeModel("model:ImageEmbeddingTask");
4012
4245
  var ImageEmbeddingInputSchema = {
4013
4246
  type: "object",
4014
4247
  properties: {
4015
4248
  image: TypeSingleOrArray(TypeImageInput),
4016
- model: modelSchema15
4249
+ model: modelSchema17
4017
4250
  },
4018
4251
  required: ["image", "model"],
4019
4252
  additionalProperties: false
@@ -4032,7 +4265,7 @@ var ImageEmbeddingOutputSchema = {
4032
4265
 
4033
4266
  class ImageEmbeddingTask extends AiVisionTask {
4034
4267
  static type = "ImageEmbeddingTask";
4035
- static category = "AI Vision Model";
4268
+ static category = "AI Vision";
4036
4269
  static title = "Image Embedding";
4037
4270
  static description = "Generates embeddings from images using vision models";
4038
4271
  static inputSchema() {
@@ -4045,16 +4278,16 @@ class ImageEmbeddingTask extends AiVisionTask {
4045
4278
  var imageEmbedding = (input, config) => {
4046
4279
  return new ImageEmbeddingTask(config).run(input);
4047
4280
  };
4048
- Workflow20.prototype.imageEmbedding = CreateWorkflow20(ImageEmbeddingTask);
4281
+ Workflow22.prototype.imageEmbedding = CreateWorkflow22(ImageEmbeddingTask);
4049
4282
 
4050
4283
  // src/task/ImageSegmentationTask.ts
4051
- import { CreateWorkflow as CreateWorkflow21, Workflow as Workflow21 } from "@workglow/task-graph";
4052
- var modelSchema16 = TypeModel("model:ImageSegmentationTask");
4284
+ import { CreateWorkflow as CreateWorkflow23, Workflow as Workflow23 } from "@workglow/task-graph";
4285
+ var modelSchema18 = TypeModel("model:ImageSegmentationTask");
4053
4286
  var ImageSegmentationInputSchema = {
4054
4287
  type: "object",
4055
4288
  properties: {
4056
4289
  image: TypeImageInput,
4057
- model: modelSchema16,
4290
+ model: modelSchema18,
4058
4291
  threshold: {
4059
4292
  type: "number",
4060
4293
  title: "Threshold",
@@ -4120,7 +4353,7 @@ var ImageSegmentationOutputSchema = {
4120
4353
 
4121
4354
  class ImageSegmentationTask extends AiVisionTask {
4122
4355
  static type = "ImageSegmentationTask";
4123
- static category = "AI Vision Model";
4356
+ static category = "AI Vision";
4124
4357
  static title = "Image Segmentation";
4125
4358
  static description = "Segments images into regions with labels using computer vision models";
4126
4359
  static inputSchema() {
@@ -4133,11 +4366,11 @@ class ImageSegmentationTask extends AiVisionTask {
4133
4366
  var imageSegmentation = (input, config) => {
4134
4367
  return new ImageSegmentationTask(config).run(input);
4135
4368
  };
4136
- Workflow21.prototype.imageSegmentation = CreateWorkflow21(ImageSegmentationTask);
4369
+ Workflow23.prototype.imageSegmentation = CreateWorkflow23(ImageSegmentationTask);
4137
4370
 
4138
4371
  // src/task/ImageToTextTask.ts
4139
- import { CreateWorkflow as CreateWorkflow22, Workflow as Workflow22 } from "@workglow/task-graph";
4140
- var modelSchema17 = TypeModel("model:ImageToTextTask");
4372
+ import { CreateWorkflow as CreateWorkflow24, Workflow as Workflow24 } from "@workglow/task-graph";
4373
+ var modelSchema19 = TypeModel("model:ImageToTextTask");
4141
4374
  var generatedTextSchema = {
4142
4375
  type: "string",
4143
4376
  title: "Text",
@@ -4147,7 +4380,7 @@ var ImageToTextInputSchema = {
4147
4380
  type: "object",
4148
4381
  properties: {
4149
4382
  image: TypeImageInput,
4150
- model: modelSchema17,
4383
+ model: modelSchema19,
4151
4384
  maxTokens: {
4152
4385
  type: "number",
4153
4386
  title: "Max Tokens",
@@ -4175,7 +4408,7 @@ var ImageToTextOutputSchema = {
4175
4408
 
4176
4409
  class ImageToTextTask extends AiVisionTask {
4177
4410
  static type = "ImageToTextTask";
4178
- static category = "AI Vision Model";
4411
+ static category = "AI Vision";
4179
4412
  static title = "Image to Text";
4180
4413
  static description = "Generates text descriptions from images using vision-language models";
4181
4414
  static inputSchema() {
@@ -4188,15 +4421,15 @@ class ImageToTextTask extends AiVisionTask {
4188
4421
  var imageToText = (input, config) => {
4189
4422
  return new ImageToTextTask(config).run(input);
4190
4423
  };
4191
- Workflow22.prototype.imageToText = CreateWorkflow22(ImageToTextTask);
4424
+ Workflow24.prototype.imageToText = CreateWorkflow24(ImageToTextTask);
4192
4425
 
4193
4426
  // src/task/ModelInfoTask.ts
4194
- import { CreateWorkflow as CreateWorkflow23, Workflow as Workflow23 } from "@workglow/task-graph";
4195
- var modelSchema18 = TypeModel("model");
4427
+ import { CreateWorkflow as CreateWorkflow25, Workflow as Workflow25 } from "@workglow/task-graph";
4428
+ var modelSchema20 = TypeModel("model");
4196
4429
  var ModelInfoInputSchema = {
4197
4430
  type: "object",
4198
4431
  properties: {
4199
- model: modelSchema18,
4432
+ model: modelSchema20,
4200
4433
  detail: {
4201
4434
  type: "string",
4202
4435
  enum: ["cached_status", "files", "files_with_metadata", "dimensions"],
@@ -4209,7 +4442,7 @@ var ModelInfoInputSchema = {
4209
4442
  var ModelInfoOutputSchema = {
4210
4443
  type: "object",
4211
4444
  properties: {
4212
- model: modelSchema18,
4445
+ model: modelSchema20,
4213
4446
  is_local: { type: "boolean" },
4214
4447
  is_remote: { type: "boolean" },
4215
4448
  supports_browser: { type: "boolean" },
@@ -4267,10 +4500,10 @@ class ModelInfoTask extends AiTask {
4267
4500
  var modelInfo = (input, config) => {
4268
4501
  return new ModelInfoTask(config).run(input);
4269
4502
  };
4270
- Workflow23.prototype.modelInfo = CreateWorkflow23(ModelInfoTask);
4503
+ Workflow25.prototype.modelInfo = CreateWorkflow25(ModelInfoTask);
4271
4504
 
4272
4505
  // src/task/ModelSearchTask.ts
4273
- import { CreateWorkflow as CreateWorkflow24, Task as Task10, Workflow as Workflow24 } from "@workglow/task-graph";
4506
+ import { CreateWorkflow as CreateWorkflow26, Task as Task10, Workflow as Workflow26 } from "@workglow/task-graph";
4274
4507
  var ModelSearchInputSchema = {
4275
4508
  type: "object",
4276
4509
  properties: {
@@ -4361,11 +4594,11 @@ class ModelSearchTask extends Task10 {
4361
4594
  var modelSearch = (input, config) => {
4362
4595
  return new ModelSearchTask(config).run(input);
4363
4596
  };
4364
- Workflow24.prototype.modelSearch = CreateWorkflow24(ModelSearchTask);
4597
+ Workflow26.prototype.modelSearch = CreateWorkflow26(ModelSearchTask);
4365
4598
 
4366
4599
  // src/task/ObjectDetectionTask.ts
4367
- import { CreateWorkflow as CreateWorkflow25, Workflow as Workflow25 } from "@workglow/task-graph";
4368
- var modelSchema19 = TypeModel("model:ObjectDetectionTask");
4600
+ import { CreateWorkflow as CreateWorkflow27, Workflow as Workflow27 } from "@workglow/task-graph";
4601
+ var modelSchema21 = TypeModel("model:ObjectDetectionTask");
4369
4602
  var detectionSchema = {
4370
4603
  type: "object",
4371
4604
  properties: {
@@ -4390,7 +4623,7 @@ var ObjectDetectionInputSchema = {
4390
4623
  type: "object",
4391
4624
  properties: {
4392
4625
  image: TypeImageInput,
4393
- model: modelSchema19,
4626
+ model: modelSchema21,
4394
4627
  labels: {
4395
4628
  type: "array",
4396
4629
  items: {
@@ -4431,7 +4664,7 @@ var ObjectDetectionOutputSchema = {
4431
4664
 
4432
4665
  class ObjectDetectionTask extends AiVisionTask {
4433
4666
  static type = "ObjectDetectionTask";
4434
- static category = "AI Vision Model";
4667
+ static category = "AI Vision";
4435
4668
  static title = "Object Detection";
4436
4669
  static description = "Detects objects in images using vision models. Supports zero-shot detection when labels are provided.";
4437
4670
  static inputSchema() {
@@ -4444,43 +4677,11 @@ class ObjectDetectionTask extends AiVisionTask {
4444
4677
  var objectDetection = (input, config) => {
4445
4678
  return new ObjectDetectionTask(config).run(input);
4446
4679
  };
4447
- Workflow25.prototype.objectDetection = CreateWorkflow25(ObjectDetectionTask);
4680
+ Workflow27.prototype.objectDetection = CreateWorkflow27(ObjectDetectionTask);
4448
4681
 
4449
4682
  // src/task/PoseLandmarkerTask.ts
4450
- import { CreateWorkflow as CreateWorkflow26, Workflow as Workflow26 } from "@workglow/task-graph";
4451
- var modelSchema20 = TypeModel("model:PoseLandmarkerTask");
4452
- var TypePoseLandmark = {
4453
- type: "object",
4454
- properties: {
4455
- x: {
4456
- type: "number",
4457
- title: "X Coordinate",
4458
- description: "X coordinate normalized to [0.0, 1.0]"
4459
- },
4460
- y: {
4461
- type: "number",
4462
- title: "Y Coordinate",
4463
- description: "Y coordinate normalized to [0.0, 1.0]"
4464
- },
4465
- z: {
4466
- type: "number",
4467
- title: "Z Coordinate",
4468
- description: "Z coordinate (depth)"
4469
- },
4470
- visibility: {
4471
- type: "number",
4472
- title: "Visibility",
4473
- description: "Likelihood of the landmark being visible within the image"
4474
- },
4475
- presence: {
4476
- type: "number",
4477
- title: "Presence",
4478
- description: "Likelihood of the landmark being present in the image"
4479
- }
4480
- },
4481
- required: ["x", "y", "z"],
4482
- additionalProperties: false
4483
- };
4683
+ import { CreateWorkflow as CreateWorkflow28, Workflow as Workflow28 } from "@workglow/task-graph";
4684
+ var modelSchema22 = TypeModel("model:PoseLandmarkerTask");
4484
4685
  var TypeSegmentationMask = {
4485
4686
  type: "object",
4486
4687
  properties: {
@@ -4527,7 +4728,7 @@ var PoseLandmarkerInputSchema = {
4527
4728
  type: "object",
4528
4729
  properties: {
4529
4730
  image: TypeImageInput,
4530
- model: modelSchema20,
4731
+ model: modelSchema22,
4531
4732
  numPoses: {
4532
4733
  type: "number",
4533
4734
  minimum: 1,
@@ -4593,7 +4794,7 @@ var PoseLandmarkerOutputSchema = {
4593
4794
 
4594
4795
  class PoseLandmarkerTask extends AiVisionTask {
4595
4796
  static type = "PoseLandmarkerTask";
4596
- static category = "AI Vision Model";
4797
+ static category = "AI Vision";
4597
4798
  static title = "Pose Landmarker";
4598
4799
  static description = "Detects pose landmarks in images. Identifies 33 body landmarks for pose estimation and optional segmentation.";
4599
4800
  static inputSchema() {
@@ -4606,10 +4807,10 @@ class PoseLandmarkerTask extends AiVisionTask {
4606
4807
  var poseLandmarker = (input, config) => {
4607
4808
  return new PoseLandmarkerTask(config).run(input);
4608
4809
  };
4609
- Workflow26.prototype.poseLandmarker = CreateWorkflow26(PoseLandmarkerTask);
4810
+ Workflow28.prototype.poseLandmarker = CreateWorkflow28(PoseLandmarkerTask);
4610
4811
 
4611
4812
  // src/task/QueryExpanderTask.ts
4612
- import { CreateWorkflow as CreateWorkflow27, Task as Task11, Workflow as Workflow27 } from "@workglow/task-graph";
4813
+ import { CreateWorkflow as CreateWorkflow29, Task as Task11, Workflow as Workflow29 } from "@workglow/task-graph";
4613
4814
  var QueryExpansionMethod = {
4614
4815
  MULTI_QUERY: "multi-query",
4615
4816
  SYNONYMS: "synonyms"
@@ -4779,10 +4980,10 @@ class QueryExpanderTask extends Task11 {
4779
4980
  var queryExpander = (input, config) => {
4780
4981
  return new QueryExpanderTask(config).run(input);
4781
4982
  };
4782
- Workflow27.prototype.queryExpander = CreateWorkflow27(QueryExpanderTask);
4983
+ Workflow29.prototype.queryExpander = CreateWorkflow29(QueryExpanderTask);
4783
4984
 
4784
4985
  // src/task/RerankerTask.ts
4785
- import { CreateWorkflow as CreateWorkflow28, Task as Task12, Workflow as Workflow28 } from "@workglow/task-graph";
4986
+ import { CreateWorkflow as CreateWorkflow30, Task as Task12, Workflow as Workflow30 } from "@workglow/task-graph";
4786
4987
  var inputSchema10 = {
4787
4988
  type: "object",
4788
4989
  properties: {
@@ -4944,11 +5145,11 @@ class RerankerTask extends Task12 {
4944
5145
  var reranker = (input, config) => {
4945
5146
  return new RerankerTask(config).run(input);
4946
5147
  };
4947
- Workflow28.prototype.reranker = CreateWorkflow28(RerankerTask);
5148
+ Workflow30.prototype.reranker = CreateWorkflow30(RerankerTask);
4948
5149
 
4949
5150
  // src/task/StructuralParserTask.ts
4950
5151
  import { StructuralParser } from "@workglow/knowledge-base";
4951
- import { CreateWorkflow as CreateWorkflow29, Task as Task13, Workflow as Workflow29 } from "@workglow/task-graph";
5152
+ import { CreateWorkflow as CreateWorkflow31, Task as Task13, Workflow as Workflow31 } from "@workglow/task-graph";
4952
5153
  import { uuid4 as uuid42 } from "@workglow/util";
4953
5154
  var inputSchema11 = {
4954
5155
  type: "object",
@@ -5051,16 +5252,16 @@ class StructuralParserTask extends Task13 {
5051
5252
  var structuralParser = (input, config) => {
5052
5253
  return new StructuralParserTask(config).run(input);
5053
5254
  };
5054
- Workflow29.prototype.structuralParser = CreateWorkflow29(StructuralParserTask);
5255
+ Workflow31.prototype.structuralParser = CreateWorkflow31(StructuralParserTask);
5055
5256
 
5056
5257
  // src/task/StructuredGenerationTask.ts
5057
- import { CreateWorkflow as CreateWorkflow30, TaskConfigurationError as TaskConfigurationError4, TaskError, Workflow as Workflow30 } from "@workglow/task-graph";
5258
+ import { CreateWorkflow as CreateWorkflow32, TaskConfigurationError as TaskConfigurationError4, TaskError, Workflow as Workflow32 } from "@workglow/task-graph";
5058
5259
  import { compileSchema as compileSchema2 } from "@workglow/util/schema";
5059
- var modelSchema21 = TypeModel("model:StructuredGenerationTask");
5260
+ var modelSchema23 = TypeModel("model:StructuredGenerationTask");
5060
5261
  var StructuredGenerationInputSchema = {
5061
5262
  type: "object",
5062
5263
  properties: {
5063
- model: modelSchema21,
5264
+ model: modelSchema23,
5064
5265
  prompt: {
5065
5266
  type: "string",
5066
5267
  title: "Prompt",
@@ -5143,7 +5344,8 @@ ${errorList}
5143
5344
 
5144
5345
  class StructuredGenerationTask extends StreamingAiTask {
5145
5346
  static type = "StructuredGenerationTask";
5146
- static category = "AI Text Model";
5347
+ static streamingPhaseLabel = "Generating";
5348
+ static category = "AI Text";
5147
5349
  static title = "Structured Generation";
5148
5350
  static description = "Generates structured JSON output conforming to a provided schema using language models, with automatic validation and retry on mismatch";
5149
5351
  static inputSchema() {
@@ -5228,11 +5430,11 @@ class StructuredGenerationTask extends StreamingAiTask {
5228
5430
  var structuredGeneration = (input, config) => {
5229
5431
  return new StructuredGenerationTask(config).run(input);
5230
5432
  };
5231
- Workflow30.prototype.structuredGeneration = CreateWorkflow30(StructuredGenerationTask);
5433
+ Workflow32.prototype.structuredGeneration = CreateWorkflow32(StructuredGenerationTask);
5232
5434
 
5233
5435
  // src/task/TextChunkerTask.ts
5234
5436
  import { ChunkRecordArraySchema as ChunkRecordArraySchema3 } from "@workglow/knowledge-base";
5235
- import { CreateWorkflow as CreateWorkflow31, Task as Task14, Workflow as Workflow31 } from "@workglow/task-graph";
5437
+ import { CreateWorkflow as CreateWorkflow33, Task as Task14, Workflow as Workflow33 } from "@workglow/task-graph";
5236
5438
  var ChunkingStrategy = {
5237
5439
  FIXED: "fixed",
5238
5440
  SENTENCE: "sentence",
@@ -5482,11 +5684,11 @@ class TextChunkerTask extends Task14 {
5482
5684
  var textChunker = (input, config) => {
5483
5685
  return new TextChunkerTask(config).run(input);
5484
5686
  };
5485
- Workflow31.prototype.textChunker = CreateWorkflow31(TextChunkerTask);
5687
+ Workflow33.prototype.textChunker = CreateWorkflow33(TextChunkerTask);
5486
5688
 
5487
5689
  // src/task/TextClassificationTask.ts
5488
- import { CreateWorkflow as CreateWorkflow32, Workflow as Workflow32 } from "@workglow/task-graph";
5489
- var modelSchema22 = TypeModel("model:TextClassificationTask");
5690
+ import { CreateWorkflow as CreateWorkflow34, Workflow as Workflow34 } from "@workglow/task-graph";
5691
+ var modelSchema24 = TypeModel("model:TextClassificationTask");
5490
5692
  var TextClassificationInputSchema = {
5491
5693
  type: "object",
5492
5694
  properties: {
@@ -5513,7 +5715,7 @@ var TextClassificationInputSchema = {
5513
5715
  description: "The maximum number of categories to return",
5514
5716
  "x-ui-group": "Configuration"
5515
5717
  },
5516
- model: modelSchema22
5718
+ model: modelSchema24
5517
5719
  },
5518
5720
  required: ["text", "model"],
5519
5721
  additionalProperties: false
@@ -5550,7 +5752,7 @@ var TextClassificationOutputSchema = {
5550
5752
 
5551
5753
  class TextClassificationTask extends AiTask {
5552
5754
  static type = "TextClassificationTask";
5553
- static category = "AI Text Model";
5755
+ static category = "AI Text";
5554
5756
  static title = "Text Classifier";
5555
5757
  static description = "Classifies text into categories using language models. Supports zero-shot classification when candidate labels are provided.";
5556
5758
  static inputSchema() {
@@ -5563,11 +5765,11 @@ class TextClassificationTask extends AiTask {
5563
5765
  var textClassification = (input, config) => {
5564
5766
  return new TextClassificationTask(config).run(input);
5565
5767
  };
5566
- Workflow32.prototype.textClassification = CreateWorkflow32(TextClassificationTask);
5768
+ Workflow34.prototype.textClassification = CreateWorkflow34(TextClassificationTask);
5567
5769
 
5568
5770
  // src/task/TextFillMaskTask.ts
5569
- import { CreateWorkflow as CreateWorkflow33, Workflow as Workflow33 } from "@workglow/task-graph";
5570
- var modelSchema23 = TypeModel("model:TextFillMaskTask");
5771
+ import { CreateWorkflow as CreateWorkflow35, Workflow as Workflow35 } from "@workglow/task-graph";
5772
+ var modelSchema25 = TypeModel("model:TextFillMaskTask");
5571
5773
  var TextFillMaskInputSchema = {
5572
5774
  type: "object",
5573
5775
  properties: {
@@ -5576,7 +5778,7 @@ var TextFillMaskInputSchema = {
5576
5778
  title: "Text",
5577
5779
  description: "The text with a mask token to fill"
5578
5780
  },
5579
- model: modelSchema23
5781
+ model: modelSchema25
5580
5782
  },
5581
5783
  required: ["text", "model"],
5582
5784
  additionalProperties: false
@@ -5618,7 +5820,7 @@ var TextFillMaskOutputSchema = {
5618
5820
 
5619
5821
  class TextFillMaskTask extends AiTask {
5620
5822
  static type = "TextFillMaskTask";
5621
- static category = "AI Text Model";
5823
+ static category = "AI Text";
5622
5824
  static title = "Fill Mask";
5623
5825
  static description = "Fills masked tokens in text";
5624
5826
  static inputSchema() {
@@ -5631,21 +5833,21 @@ class TextFillMaskTask extends AiTask {
5631
5833
  var textFillMask = (input, config) => {
5632
5834
  return new TextFillMaskTask(config).run(input);
5633
5835
  };
5634
- Workflow33.prototype.textFillMask = CreateWorkflow33(TextFillMaskTask);
5836
+ Workflow35.prototype.textFillMask = CreateWorkflow35(TextFillMaskTask);
5635
5837
 
5636
5838
  // src/task/TextGenerationTask.ts
5637
- import { CreateWorkflow as CreateWorkflow34, Workflow as Workflow34 } from "@workglow/task-graph";
5839
+ import { CreateWorkflow as CreateWorkflow36, Workflow as Workflow36 } from "@workglow/task-graph";
5638
5840
  var generatedTextSchema2 = {
5639
5841
  type: "string",
5640
5842
  title: "Text",
5641
5843
  description: "The generated text",
5642
5844
  "x-stream": "append"
5643
5845
  };
5644
- var modelSchema24 = TypeModel("model:TextGenerationTask");
5846
+ var modelSchema26 = TypeModel("model:TextGenerationTask");
5645
5847
  var TextGenerationInputSchema = {
5646
5848
  type: "object",
5647
5849
  properties: {
5648
- model: modelSchema24,
5850
+ model: modelSchema26,
5649
5851
  prompt: {
5650
5852
  type: "string",
5651
5853
  title: "Prompt",
@@ -5706,7 +5908,8 @@ var TextGenerationOutputSchema = {
5706
5908
 
5707
5909
  class TextGenerationTask extends StreamingAiTask {
5708
5910
  static type = "TextGenerationTask";
5709
- static category = "AI Text Model";
5911
+ static streamingPhaseLabel = "Generating";
5912
+ static category = "AI Text";
5710
5913
  static title = "Text Generation";
5711
5914
  static description = "Generates text from a prompt using language models with configurable parameters";
5712
5915
  static inputSchema() {
@@ -5719,11 +5922,11 @@ class TextGenerationTask extends StreamingAiTask {
5719
5922
  var textGeneration = (input, config) => {
5720
5923
  return new TextGenerationTask(config).run(input);
5721
5924
  };
5722
- Workflow34.prototype.textGeneration = CreateWorkflow34(TextGenerationTask);
5925
+ Workflow36.prototype.textGeneration = CreateWorkflow36(TextGenerationTask);
5723
5926
 
5724
5927
  // src/task/TextLanguageDetectionTask.ts
5725
- import { CreateWorkflow as CreateWorkflow35, Workflow as Workflow35 } from "@workglow/task-graph";
5726
- var modelSchema25 = TypeModel("model:TextLanguageDetectionTask");
5928
+ import { CreateWorkflow as CreateWorkflow37, Workflow as Workflow37 } from "@workglow/task-graph";
5929
+ var modelSchema27 = TypeModel("model:TextLanguageDetectionTask");
5727
5930
  var TextLanguageDetectionInputSchema = {
5728
5931
  type: "object",
5729
5932
  properties: {
@@ -5740,7 +5943,7 @@ var TextLanguageDetectionInputSchema = {
5740
5943
  title: "Max Languages",
5741
5944
  description: "The maximum number of languages to return"
5742
5945
  },
5743
- model: modelSchema25
5946
+ model: modelSchema27
5744
5947
  },
5745
5948
  required: ["text", "model"],
5746
5949
  additionalProperties: false
@@ -5777,7 +5980,7 @@ var TextLanguageDetectionOutputSchema = {
5777
5980
 
5778
5981
  class TextLanguageDetectionTask extends AiTask {
5779
5982
  static type = "TextLanguageDetectionTask";
5780
- static category = "AI Text Model";
5983
+ static category = "AI Text";
5781
5984
  static title = "Language Detection";
5782
5985
  static description = "Detects the language of text using language models";
5783
5986
  static inputSchema() {
@@ -5790,10 +5993,10 @@ class TextLanguageDetectionTask extends AiTask {
5790
5993
  var textLanguageDetection = (input, config) => {
5791
5994
  return new TextLanguageDetectionTask(config).run(input);
5792
5995
  };
5793
- Workflow35.prototype.textLanguageDetection = CreateWorkflow35(TextLanguageDetectionTask);
5996
+ Workflow37.prototype.textLanguageDetection = CreateWorkflow37(TextLanguageDetectionTask);
5794
5997
 
5795
5998
  // src/task/TextQuestionAnswerTask.ts
5796
- import { CreateWorkflow as CreateWorkflow36, Workflow as Workflow36 } from "@workglow/task-graph";
5999
+ import { CreateWorkflow as CreateWorkflow38, Workflow as Workflow38 } from "@workglow/task-graph";
5797
6000
  var contextSchema = {
5798
6001
  type: "string",
5799
6002
  title: "Context",
@@ -5810,13 +6013,13 @@ var textSchema = {
5810
6013
  description: "The generated text",
5811
6014
  "x-stream": "append"
5812
6015
  };
5813
- var modelSchema26 = TypeModel("model:TextQuestionAnswerTask");
6016
+ var modelSchema28 = TypeModel("model:TextQuestionAnswerTask");
5814
6017
  var TextQuestionAnswerInputSchema = {
5815
6018
  type: "object",
5816
6019
  properties: {
5817
6020
  context: contextSchema,
5818
6021
  question: questionSchema,
5819
- model: modelSchema26
6022
+ model: modelSchema28
5820
6023
  },
5821
6024
  required: ["context", "question", "model"],
5822
6025
  additionalProperties: false
@@ -5832,7 +6035,8 @@ var TextQuestionAnswerOutputSchema = {
5832
6035
 
5833
6036
  class TextQuestionAnswerTask extends StreamingAiTask {
5834
6037
  static type = "TextQuestionAnswerTask";
5835
- static category = "AI Text Model";
6038
+ static streamingPhaseLabel = "Answering";
6039
+ static category = "AI Text";
5836
6040
  static title = "Text Question Answer";
5837
6041
  static description = "Answers questions based on provided context using language models";
5838
6042
  static inputSchema() {
@@ -5845,11 +6049,11 @@ class TextQuestionAnswerTask extends StreamingAiTask {
5845
6049
  var textQuestionAnswer = (input, config) => {
5846
6050
  return new TextQuestionAnswerTask(config).run(input);
5847
6051
  };
5848
- Workflow36.prototype.textQuestionAnswer = CreateWorkflow36(TextQuestionAnswerTask);
6052
+ Workflow38.prototype.textQuestionAnswer = CreateWorkflow38(TextQuestionAnswerTask);
5849
6053
 
5850
6054
  // src/task/TextRewriterTask.ts
5851
- import { CreateWorkflow as CreateWorkflow37, Workflow as Workflow37 } from "@workglow/task-graph";
5852
- var modelSchema27 = TypeModel("model:TextRewriterTask");
6055
+ import { CreateWorkflow as CreateWorkflow39, Workflow as Workflow39 } from "@workglow/task-graph";
6056
+ var modelSchema29 = TypeModel("model:TextRewriterTask");
5853
6057
  var TextRewriterInputSchema = {
5854
6058
  type: "object",
5855
6059
  properties: {
@@ -5863,7 +6067,7 @@ var TextRewriterInputSchema = {
5863
6067
  title: "Prompt",
5864
6068
  description: "The prompt to direct the rewriting"
5865
6069
  },
5866
- model: modelSchema27
6070
+ model: modelSchema29
5867
6071
  },
5868
6072
  required: ["text", "prompt", "model"],
5869
6073
  additionalProperties: false
@@ -5884,7 +6088,8 @@ var TextRewriterOutputSchema = {
5884
6088
 
5885
6089
  class TextRewriterTask extends StreamingAiTask {
5886
6090
  static type = "TextRewriterTask";
5887
- static category = "AI Text Model";
6091
+ static streamingPhaseLabel = "Rewriting";
6092
+ static category = "AI Text";
5888
6093
  static title = "Text Rewriter";
5889
6094
  static description = "Rewrites text according to a given prompt using language models";
5890
6095
  static inputSchema() {
@@ -5897,11 +6102,11 @@ class TextRewriterTask extends StreamingAiTask {
5897
6102
  var textRewriter = (input, config) => {
5898
6103
  return new TextRewriterTask(config).run(input);
5899
6104
  };
5900
- Workflow37.prototype.textRewriter = CreateWorkflow37(TextRewriterTask);
6105
+ Workflow39.prototype.textRewriter = CreateWorkflow39(TextRewriterTask);
5901
6106
 
5902
6107
  // src/task/TextTranslationTask.ts
5903
- import { CreateWorkflow as CreateWorkflow38, Workflow as Workflow38 } from "@workglow/task-graph";
5904
- var modelSchema28 = TypeModel("model:TextTranslationTask");
6108
+ import { CreateWorkflow as CreateWorkflow40, Workflow as Workflow40 } from "@workglow/task-graph";
6109
+ var modelSchema30 = TypeModel("model:TextTranslationTask");
5905
6110
  var translationTextSchema = {
5906
6111
  type: "string",
5907
6112
  title: "Text",
@@ -5928,7 +6133,7 @@ var TextTranslationInputSchema = {
5928
6133
  minLength: 2,
5929
6134
  maxLength: 2
5930
6135
  }),
5931
- model: modelSchema28
6136
+ model: modelSchema30
5932
6137
  },
5933
6138
  required: ["text", "source_lang", "target_lang", "model"],
5934
6139
  additionalProperties: false
@@ -5950,7 +6155,8 @@ var TextTranslationOutputSchema = {
5950
6155
 
5951
6156
  class TextTranslationTask extends StreamingAiTask {
5952
6157
  static type = "TextTranslationTask";
5953
- static category = "AI Text Model";
6158
+ static streamingPhaseLabel = "Translating";
6159
+ static category = "AI Text";
5954
6160
  static title = "Text Translation";
5955
6161
  static description = "Translates text from one language to another using language models";
5956
6162
  static inputSchema() {
@@ -5963,10 +6169,10 @@ class TextTranslationTask extends StreamingAiTask {
5963
6169
  var textTranslation = (input, config) => {
5964
6170
  return new TextTranslationTask(config).run(input);
5965
6171
  };
5966
- Workflow38.prototype.textTranslation = CreateWorkflow38(TextTranslationTask);
6172
+ Workflow40.prototype.textTranslation = CreateWorkflow40(TextTranslationTask);
5967
6173
 
5968
6174
  // src/task/ToolCallingTask.ts
5969
- import { CreateWorkflow as CreateWorkflow39, getTaskConstructors, Workflow as Workflow39 } from "@workglow/task-graph";
6175
+ import { CreateWorkflow as CreateWorkflow41, getTaskConstructors, Workflow as Workflow41 } from "@workglow/task-graph";
5970
6176
  import { makeFingerprint } from "@workglow/util";
5971
6177
  function taskTypesToTools(taskNames, registry) {
5972
6178
  const constructors = getTaskConstructors(registry);
@@ -6050,11 +6256,11 @@ var ToolCallSchema = {
6050
6256
  required: ["id", "name", "input"],
6051
6257
  additionalProperties: false
6052
6258
  };
6053
- var modelSchema29 = TypeModel("model:ToolCallingTask");
6259
+ var modelSchema31 = TypeModel("model:ToolCallingTask");
6054
6260
  var ToolCallingInputSchema = {
6055
6261
  type: "object",
6056
6262
  properties: {
6057
- model: modelSchema29,
6263
+ model: modelSchema31,
6058
6264
  prompt: {
6059
6265
  oneOf: [
6060
6266
  { type: "string", title: "Prompt", description: "The prompt to send to the model" },
@@ -6151,7 +6357,8 @@ var ToolCallingOutputSchema = {
6151
6357
 
6152
6358
  class ToolCallingTask extends StreamingAiTask {
6153
6359
  static type = "ToolCallingTask";
6154
- static category = "AI Text Model";
6360
+ static streamingPhaseLabel = "Generating";
6361
+ static category = "AI Text";
6155
6362
  static title = "Tool Calling";
6156
6363
  static description = "Sends a prompt with tool definitions to a language model and returns text along with any tool calls the model requests";
6157
6364
  static inputSchema() {
@@ -6198,10 +6405,10 @@ class ToolCallingTask extends StreamingAiTask {
6198
6405
  var toolCalling = (input, config) => {
6199
6406
  return new ToolCallingTask(config).run(input);
6200
6407
  };
6201
- Workflow39.prototype.toolCalling = CreateWorkflow39(ToolCallingTask);
6408
+ Workflow41.prototype.toolCalling = CreateWorkflow41(ToolCallingTask);
6202
6409
 
6203
6410
  // src/task/TopicSegmenterTask.ts
6204
- import { CreateWorkflow as CreateWorkflow40, Task as Task15, Workflow as Workflow40 } from "@workglow/task-graph";
6411
+ import { CreateWorkflow as CreateWorkflow42, Task as Task15, Workflow as Workflow42 } from "@workglow/task-graph";
6205
6412
  var SegmentationMethod = {
6206
6413
  HEURISTIC: "heuristic",
6207
6414
  EMBEDDING_SIMILARITY: "embedding-similarity",
@@ -6481,15 +6688,15 @@ class TopicSegmenterTask extends Task15 {
6481
6688
  var topicSegmenter = (input, config) => {
6482
6689
  return new TopicSegmenterTask(config).run(input);
6483
6690
  };
6484
- Workflow40.prototype.topicSegmenter = CreateWorkflow40(TopicSegmenterTask);
6691
+ Workflow42.prototype.topicSegmenter = CreateWorkflow42(TopicSegmenterTask);
6485
6692
 
6486
6693
  // src/task/UnloadModelTask.ts
6487
- import { CreateWorkflow as CreateWorkflow41, Workflow as Workflow41 } from "@workglow/task-graph";
6488
- var modelSchema30 = TypeModel("model");
6694
+ import { CreateWorkflow as CreateWorkflow43, Workflow as Workflow43 } from "@workglow/task-graph";
6695
+ var modelSchema32 = TypeModel("model");
6489
6696
  var UnloadModelInputSchema = {
6490
6697
  type: "object",
6491
6698
  properties: {
6492
- model: modelSchema30
6699
+ model: modelSchema32
6493
6700
  },
6494
6701
  required: ["model"],
6495
6702
  additionalProperties: false
@@ -6497,7 +6704,7 @@ var UnloadModelInputSchema = {
6497
6704
  var UnloadModelOutputSchema = {
6498
6705
  type: "object",
6499
6706
  properties: {
6500
- model: modelSchema30
6707
+ model: modelSchema32
6501
6708
  },
6502
6709
  required: ["model"],
6503
6710
  additionalProperties: false
@@ -6519,10 +6726,10 @@ class UnloadModelTask extends AiTask {
6519
6726
  var unloadModel = (input, config) => {
6520
6727
  return new UnloadModelTask(config).run(input);
6521
6728
  };
6522
- Workflow41.prototype.unloadModel = CreateWorkflow41(UnloadModelTask);
6729
+ Workflow43.prototype.unloadModel = CreateWorkflow43(UnloadModelTask);
6523
6730
 
6524
6731
  // src/task/VectorQuantizeTask.ts
6525
- import { CreateWorkflow as CreateWorkflow42, Task as Task16, Workflow as Workflow42 } from "@workglow/task-graph";
6732
+ import { CreateWorkflow as CreateWorkflow44, Task as Task16, Workflow as Workflow44 } from "@workglow/task-graph";
6526
6733
  import {
6527
6734
  normalizeNumberArray,
6528
6735
  TensorType,
@@ -6705,10 +6912,10 @@ class VectorQuantizeTask extends Task16 {
6705
6912
  var vectorQuantize = (input, config) => {
6706
6913
  return new VectorQuantizeTask(config).run(input);
6707
6914
  };
6708
- Workflow42.prototype.vectorQuantize = CreateWorkflow42(VectorQuantizeTask);
6915
+ Workflow44.prototype.vectorQuantize = CreateWorkflow44(VectorQuantizeTask);
6709
6916
 
6710
6917
  // src/task/VectorSimilarityTask.ts
6711
- import { CreateWorkflow as CreateWorkflow43, GraphAsTask, Workflow as Workflow43 } from "@workglow/task-graph";
6918
+ import { CreateWorkflow as CreateWorkflow45, GraphAsTask, Workflow as Workflow45 } from "@workglow/task-graph";
6712
6919
  import {
6713
6920
  cosineSimilarity,
6714
6921
  hammingSimilarity,
@@ -6822,7 +7029,7 @@ class VectorSimilarityTask extends GraphAsTask {
6822
7029
  var similarity = (input, config) => {
6823
7030
  return new VectorSimilarityTask(config).run(input);
6824
7031
  };
6825
- Workflow43.prototype.similarity = CreateWorkflow43(VectorSimilarityTask);
7032
+ Workflow45.prototype.similarity = CreateWorkflow45(VectorSimilarityTask);
6826
7033
  // src/task/MessageConversion.ts
6827
7034
  function getInputMessages(input) {
6828
7035
  const messages = input.messages;
@@ -6983,8 +7190,10 @@ var registerAiTasks = () => {
6983
7190
  ChunkRetrievalTask,
6984
7191
  ChunkVectorUpsertTask,
6985
7192
  DownloadModelTask,
7193
+ ImageEditTask,
6986
7194
  FaceDetectorTask,
6987
7195
  FaceLandmarkerTask,
7196
+ ImageGenerateTask,
6988
7197
  GestureRecognizerTask,
6989
7198
  HandLandmarkerTask,
6990
7199
  HierarchicalChunkerTask,
@@ -7062,7 +7271,9 @@ export {
7062
7271
  isAllowedToolName,
7063
7272
  imageToText,
7064
7273
  imageSegmentation,
7274
+ imageGenerate,
7065
7275
  imageEmbedding,
7276
+ imageEdit,
7066
7277
  imageClassification,
7067
7278
  hierarchyJoin,
7068
7279
  hierarchicalChunker,
@@ -7078,6 +7289,7 @@ export {
7078
7289
  documentEnricher,
7079
7290
  countTokens,
7080
7291
  contextBuilder,
7292
+ classifyProviderError,
7081
7293
  chunkVectorUpsert,
7082
7294
  chunkRetrieval,
7083
7295
  buildToolDescription,
@@ -7086,10 +7298,12 @@ export {
7086
7298
  VectorQuantizeTask,
7087
7299
  UnloadModelTask,
7088
7300
  TypeSingleOrArray,
7301
+ TypePoseLandmark,
7089
7302
  TypeModelByDetail,
7090
7303
  TypeModelAsString,
7091
7304
  TypeModel,
7092
7305
  TypeLanguage,
7306
+ TypeLandmark,
7093
7307
  TypeImageInput,
7094
7308
  TypeCategory,
7095
7309
  TypeBoundingBox,
@@ -7143,6 +7357,7 @@ export {
7143
7357
  QueuedAiProvider,
7144
7358
  QueryExpansionMethod,
7145
7359
  QueryExpanderTask,
7360
+ ProviderUnsupportedFeatureError,
7146
7361
  PoseLandmarkerTask,
7147
7362
  PoseLandmarkerOutputSchema,
7148
7363
  PoseLandmarkerInputSchema,
@@ -7164,9 +7379,17 @@ export {
7164
7379
  ImageSegmentationTask,
7165
7380
  ImageSegmentationOutputSchema,
7166
7381
  ImageSegmentationInputSchema,
7382
+ ImageGenerationProviderError,
7383
+ ImageGenerationContentPolicyError,
7384
+ ImageGenerateTask,
7385
+ ImageGenerateOutputSchema,
7386
+ ImageGenerateInputSchema,
7167
7387
  ImageEmbeddingTask,
7168
7388
  ImageEmbeddingOutputSchema,
7169
7389
  ImageEmbeddingInputSchema,
7390
+ ImageEditTask,
7391
+ ImageEditOutputSchema,
7392
+ ImageEditInputSchema,
7170
7393
  ImageClassificationTask,
7171
7394
  ImageClassificationOutputSchema,
7172
7395
  ImageClassificationInputSchema,
@@ -7206,9 +7429,10 @@ export {
7206
7429
  AiProviderRegistry,
7207
7430
  AiProvider,
7208
7431
  AiJob,
7432
+ AiImageOutputTask,
7209
7433
  AiChatTask,
7210
7434
  AiChatOutputSchema,
7211
7435
  AiChatInputSchema
7212
7436
  };
7213
7437
 
7214
- //# debugId=54021044A3C741C364756E2164756E21
7438
+ //# debugId=E1B65A06F81AD80964756E2164756E21