@workglow/tasks 0.2.13 → 0.2.15

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 (50) hide show
  1. package/dist/browser.js +189 -166
  2. package/dist/browser.js.map +22 -23
  3. package/dist/bun.js +205 -174
  4. package/dist/bun.js.map +24 -25
  5. package/dist/common.d.ts +0 -1
  6. package/dist/common.d.ts.map +1 -1
  7. package/dist/electron.js +205 -174
  8. package/dist/electron.js.map +24 -25
  9. package/dist/node.js +205 -174
  10. package/dist/node.js.map +24 -25
  11. package/dist/task/image/ImageBorderTask.d.ts +76 -58
  12. package/dist/task/image/ImageBorderTask.d.ts.map +1 -1
  13. package/dist/task/image/ImageSchemas.d.ts +66 -1
  14. package/dist/task/image/ImageSchemas.d.ts.map +1 -1
  15. package/dist/task/image/ImageTextTask.d.ts +91 -254
  16. package/dist/task/image/ImageTextTask.d.ts.map +1 -1
  17. package/dist/task/image/ImageTintTask.d.ts +76 -58
  18. package/dist/task/image/ImageTintTask.d.ts.map +1 -1
  19. package/dist/task/image/imageRasterCodecBrowser.d.ts +1 -1
  20. package/dist/task/image/imageRasterCodecBrowser.d.ts.map +1 -1
  21. package/dist/task/image/imageRasterCodecNode.d.ts +1 -1
  22. package/dist/task/image/imageRasterCodecNode.d.ts.map +1 -1
  23. package/dist/task/image/imageRasterCodecRegistry.d.ts +7 -7
  24. package/dist/task/image/imageRasterCodecRegistry.d.ts.map +1 -1
  25. package/dist/task/image/imageTaskIo.d.ts +11 -3
  26. package/dist/task/image/imageTaskIo.d.ts.map +1 -1
  27. package/dist/task/string/StringConcatTask.d.ts +6 -6
  28. package/dist/task/string/StringConcatTask.d.ts.map +1 -1
  29. package/dist/task/string/StringIncludesTask.d.ts +12 -12
  30. package/dist/task/string/StringIncludesTask.d.ts.map +1 -1
  31. package/dist/task/string/StringJoinTask.d.ts +12 -12
  32. package/dist/task/string/StringJoinTask.d.ts.map +1 -1
  33. package/dist/task/string/StringLengthTask.d.ts +12 -12
  34. package/dist/task/string/StringLengthTask.d.ts.map +1 -1
  35. package/dist/task/string/StringLowerCaseTask.d.ts +12 -12
  36. package/dist/task/string/StringLowerCaseTask.d.ts.map +1 -1
  37. package/dist/task/string/StringReplaceTask.d.ts +12 -12
  38. package/dist/task/string/StringReplaceTask.d.ts.map +1 -1
  39. package/dist/task/string/StringSliceTask.d.ts +12 -12
  40. package/dist/task/string/StringSliceTask.d.ts.map +1 -1
  41. package/dist/task/string/StringTemplateTask.d.ts +6 -6
  42. package/dist/task/string/StringTemplateTask.d.ts.map +1 -1
  43. package/dist/task/string/StringTrimTask.d.ts +12 -12
  44. package/dist/task/string/StringTrimTask.d.ts.map +1 -1
  45. package/dist/task/string/StringUpperCaseTask.d.ts +12 -12
  46. package/dist/task/string/StringUpperCaseTask.d.ts.map +1 -1
  47. package/dist/util/SafeFetch.server.d.ts.map +1 -1
  48. package/package.json +9 -9
  49. package/dist/task/image/imageTaskTransport.d.ts +0 -21
  50. package/dist/task/image/imageTaskTransport.d.ts.map +0 -1
package/dist/electron.js CHANGED
@@ -1,6 +1,9 @@
1
1
  import { createRequire } from "node:module";
2
2
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
3
3
 
4
+ // src/task/image/registerImageRasterCodec.node.ts
5
+ import { registerImageRasterCodec } from "@workglow/util/media";
6
+
4
7
  // src/task/image/imageRasterCodecNode.ts
5
8
  import { parseDataUri } from "@workglow/util/media";
6
9
 
@@ -140,18 +143,6 @@ function createNodeImageRasterCodec() {
140
143
  return { decodeDataUri, encodeDataUri };
141
144
  }
142
145
 
143
- // src/task/image/imageRasterCodecRegistry.ts
144
- var codec = null;
145
- function registerImageRasterCodec(next) {
146
- codec = next;
147
- }
148
- function getImageRasterCodec() {
149
- if (!codec) {
150
- throw new Error("Image raster codec is not registered. Ensure you import @workglow/tasks from the browser or Node entry (dist/browser.js or dist/node.js), or call registerImageRasterCodec() during startup.");
151
- }
152
- return codec;
153
- }
154
-
155
146
  // src/task/image/registerImageRasterCodec.node.ts
156
147
  registerImageRasterCodec(createNodeImageRasterCodec());
157
148
 
@@ -263,6 +254,9 @@ import { PermanentJobError as PermanentJobError2 } from "@workglow/job-queue";
263
254
  import { lookup as dnsLookup } from "node:dns/promises";
264
255
  import { Agent, fetch as undiciFetch } from "undici";
265
256
 
257
+ // src/util/SafeFetch.ts
258
+ import { PermanentJobError } from "@workglow/job-queue";
259
+
266
260
  // src/util/UrlClassifier.ts
267
261
  import { resourcePatternMatches } from "@workglow/task-graph";
268
262
  import ipaddr from "ipaddr.js";
@@ -491,7 +485,6 @@ function urlMatchesScope(url, patterns) {
491
485
  }
492
486
 
493
487
  // src/util/SafeFetch.ts
494
- import { PermanentJobError } from "@workglow/job-queue";
495
488
  var MAX_REDIRECT_HOPS = 20;
496
489
  function assertAllowedUrl(url, allowPrivate, privateResourceScopes) {
497
490
  const classification = classifyUrl(url);
@@ -555,6 +548,12 @@ function safeFetch(url, options = {}) {
555
548
 
556
549
  // src/util/SafeFetch.server.ts
557
550
  var MAX_REDIRECT_HOPS2 = 20;
551
+ function closeAgent(dispatcher) {
552
+ dispatcher.close?.().catch(() => {});
553
+ }
554
+ async function closeAgentAsync(dispatcher) {
555
+ await dispatcher.close?.().catch(() => {});
556
+ }
558
557
  async function resolveAll(hostname) {
559
558
  try {
560
559
  const addrs = await dnsLookup(hostname, { all: true, verbatim: true });
@@ -626,7 +625,7 @@ async function fetchOneHop(url, opts, fetchInit) {
626
625
  });
627
626
  return { response, dispatcher };
628
627
  } catch (err) {
629
- await dispatcher.close().catch(() => {});
628
+ await closeAgentAsync(dispatcher);
630
629
  throw err;
631
630
  }
632
631
  }
@@ -644,14 +643,14 @@ var serverSafeFetch = async (url, options) => {
644
643
  for (let hops = 0;hops <= MAX_REDIRECT_HOPS2; hops += 1) {
645
644
  const { response, dispatcher } = await fetchOneHop(currentUrl, opts, fetchInit);
646
645
  if (prevDispatcher !== undefined) {
647
- prevDispatcher.close().catch(() => {});
646
+ closeAgent(prevDispatcher);
648
647
  }
649
648
  if (!isRedirectStatus2(response.status)) {
650
649
  const body = response.body;
651
650
  if (body !== null) {
652
651
  const { readable, writable } = new TransformStream;
653
652
  body.pipeTo(writable).finally(() => {
654
- dispatcher.close().catch(() => {});
653
+ closeAgent(dispatcher);
655
654
  });
656
655
  return new Response(readable, {
657
656
  status: response.status,
@@ -659,20 +658,20 @@ var serverSafeFetch = async (url, options) => {
659
658
  headers: response.headers
660
659
  });
661
660
  }
662
- dispatcher.close().catch(() => {});
661
+ closeAgent(dispatcher);
663
662
  return response;
664
663
  }
665
664
  if (requestedRedirectMode === "manual") {
666
- dispatcher.close().catch(() => {});
665
+ closeAgent(dispatcher);
667
666
  return response;
668
667
  }
669
668
  if (requestedRedirectMode === "error") {
670
- dispatcher.close().catch(() => {});
669
+ closeAgent(dispatcher);
671
670
  throw new TypeError(`Fetch for ${currentUrl} failed because redirect mode was set to 'error'.`);
672
671
  }
673
672
  const location = response.headers.get("location");
674
673
  if (!location) {
675
- dispatcher.close().catch(() => {});
674
+ closeAgent(dispatcher);
676
675
  throw new PermanentJobError2(`Refusing to follow redirect from ${currentUrl}: missing Location header.`);
677
676
  }
678
677
  prevDispatcher = dispatcher;
@@ -5948,45 +5947,50 @@ var ColorSchema = (annotations = {}) => ({
5948
5947
  a: { type: "integer", minimum: 0, maximum: 255, title: "Alpha", default: 255 }
5949
5948
  },
5950
5949
  required: ["r", "g", "b"],
5950
+ format: "color",
5951
5951
  additionalProperties: false,
5952
5952
  ...annotations
5953
5953
  });
5954
-
5955
- // src/task/image/imageTaskTransport.ts
5956
- function isDataUriImage(value) {
5957
- return typeof value === "string" && value.startsWith("data:");
5958
- }
5959
- function parseDataUriMimeType(dataUri) {
5960
- const match = dataUri.match(/^data:([^;,]+)/);
5961
- const raw = match?.[1]?.trim();
5962
- if (!raw) {
5963
- return "image/png";
5964
- }
5965
- return raw.toLowerCase();
5966
- }
5967
- async function resolveImageInput(value) {
5968
- if (typeof value === "string") {
5969
- if (!isDataUriImage(value)) {
5970
- throw new Error(`resolveImageInput: unsupported string value – expected a data URI (data:image/...;base64,...) but received: "${value.slice(0, 80)}${value.length > 80 ? "…" : ""}"`);
5954
+ var HexColorSchema = (annotations = {}) => ({
5955
+ type: "string",
5956
+ format: "color",
5957
+ pattern: "^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
5958
+ title: "Color (hex)",
5959
+ description: "Color as a `#RRGGBB[AA]` or `#RGB[A]` hex string",
5960
+ ...annotations
5961
+ });
5962
+ var ColorValueSchema = (annotations = {}) => ({
5963
+ oneOf: [
5964
+ ColorSchema(),
5965
+ HexColorSchema({
5966
+ title: annotations.title ?? "Color",
5967
+ description: annotations.description ?? "Color as {r,g,b,a} object or `#RRGGBB[AA]` / `#RGB[A]` hex string"
5968
+ })
5969
+ ],
5970
+ ...annotations
5971
+ });
5972
+ var ColorObjectType = null;
5973
+ var ColorFromSchemaOptions = {
5974
+ ...FromSchemaDefaultOptions,
5975
+ deserialize: [
5976
+ {
5977
+ pattern: { type: "object", format: "color" },
5978
+ output: ColorObjectType
5971
5979
  }
5972
- const mimeType = parseDataUriMimeType(value);
5973
- const raster = await getImageRasterCodec().decodeDataUri(value);
5974
- return { raster, transport: { kind: "dataUri", mimeType } };
5975
- }
5976
- return { raster: value, transport: { kind: "binary", mimeType: "image/png" } };
5977
- }
5978
- async function formatImageOutput(raster, transport) {
5979
- if (transport.kind === "binary") {
5980
- return raster;
5981
- }
5982
- return getImageRasterCodec().encodeDataUri(raster, transport.mimeType);
5983
- }
5980
+ ]
5981
+ };
5984
5982
 
5985
5983
  // src/task/image/imageTaskIo.ts
5984
+ import { Image, getImageRasterCodec } from "@workglow/util/media";
5986
5985
  async function produceImageOutput(inputImage, run) {
5987
- const { raster, transport } = await resolveImageInput(inputImage);
5988
- const outRaster = await run(raster);
5989
- return formatImageOutput(outRaster, transport);
5986
+ const image = Image.is(inputImage) ? inputImage : Image.from(inputImage);
5987
+ const pixels = await image.getPixels();
5988
+ const out = await run(pixels);
5989
+ if (image.kind === "dataUri") {
5990
+ const mime = image.mimeType ?? "image/png";
5991
+ return getImageRasterCodec().encodeDataUri(out, mime);
5992
+ }
5993
+ return out;
5990
5994
  }
5991
5995
 
5992
5996
  // src/task/image/ImageBlurTask.ts
@@ -6077,6 +6081,7 @@ import {
6077
6081
  Task as Task43,
6078
6082
  Workflow as Workflow18
6079
6083
  } from "@workglow/task-graph";
6084
+ import { resolveColor } from "@workglow/util/media";
6080
6085
  var inputSchema42 = {
6081
6086
  type: "object",
6082
6087
  properties: {
@@ -6088,7 +6093,7 @@ var inputSchema42 = {
6088
6093
  minimum: 1,
6089
6094
  default: 1
6090
6095
  },
6091
- color: ColorSchema({ title: "Color", description: "Border color" })
6096
+ color: ColorValueSchema({ title: "Color", description: "Border color" })
6092
6097
  },
6093
6098
  required: ["image", "color"],
6094
6099
  additionalProperties: false
@@ -6114,7 +6119,8 @@ class ImageBorderTask extends Task43 {
6114
6119
  return outputSchema41;
6115
6120
  }
6116
6121
  async executeReactive(input, _output, _context) {
6117
- const { borderWidth: bw = 1, color } = input;
6122
+ const { borderWidth: bw = 1 } = input;
6123
+ const color = resolveColor(input.color);
6118
6124
  const image = await produceImageOutput(input.image, (img) => {
6119
6125
  const { data: src, width: srcW, height: srcH, channels: srcCh } = img;
6120
6126
  const outCh = 4;
@@ -6124,7 +6130,7 @@ class ImageBorderTask extends Task43 {
6124
6130
  const r = color.r;
6125
6131
  const g = color.g;
6126
6132
  const b = color.b;
6127
- const a = color.a ?? 255;
6133
+ const a = color.a;
6128
6134
  for (let i = 0;i < dst.length; i += outCh) {
6129
6135
  dst[i] = r;
6130
6136
  dst[i + 1] = g;
@@ -6671,6 +6677,8 @@ class ImagePosterizeTask extends Task51 {
6671
6677
  }
6672
6678
  }
6673
6679
  Workflow26.prototype.imagePosterize = CreateWorkflow25(ImagePosterizeTask);
6680
+ // src/task/image/imageRasterCodecRegistry.ts
6681
+ import { getImageRasterCodec as getImageRasterCodec2, registerImageRasterCodec as registerImageRasterCodec2 } from "@workglow/util/media";
6674
6682
  // src/task/image/ImageResizeTask.ts
6675
6683
  import {
6676
6684
  CreateWorkflow as CreateWorkflow26,
@@ -6876,6 +6884,7 @@ import {
6876
6884
  Task as Task55,
6877
6885
  Workflow as Workflow30
6878
6886
  } from "@workglow/task-graph";
6887
+ import { resolveColor as resolveColor2 } from "@workglow/util/media";
6879
6888
  function toRgbaImage(image) {
6880
6889
  const { data, width, height, channels } = image;
6881
6890
  const rgba = new Uint8ClampedArray(width * height * 4);
@@ -6939,16 +6948,6 @@ function compositeTextOverBackground(background, overlay) {
6939
6948
  }
6940
6949
  return { data: out, width: bg.width, height: bg.height, channels: 4 };
6941
6950
  }
6942
- function hasUsableBackgroundImage(value) {
6943
- if (typeof value === "string") {
6944
- return value.length > 0;
6945
- }
6946
- if (typeof value !== "object" || value === null) {
6947
- return false;
6948
- }
6949
- const candidate = value;
6950
- return typeof candidate.width === "number" && typeof candidate.height === "number" && typeof candidate.channels === "number" && candidate.data !== undefined;
6951
- }
6952
6951
  var IMAGE_TEXT_POSITION_LABELS = {
6953
6952
  "top-left": "Top left",
6954
6953
  "top-center": "Top center",
@@ -6960,17 +6959,18 @@ var IMAGE_TEXT_POSITION_LABELS = {
6960
6959
  "bottom-center": "Bottom center",
6961
6960
  "bottom-right": "Bottom right"
6962
6961
  };
6962
+ var backgroundImageProperty = ImageBinaryOrDataUriSchema({
6963
+ title: "Image",
6964
+ description: "Background image to render the text onto"
6965
+ });
6963
6966
  var inputSchema54 = {
6964
6967
  type: "object",
6965
6968
  properties: {
6966
- image: ImageBinaryOrDataUriSchema({
6967
- title: "Image",
6968
- description: "Optional background image to render the text onto"
6969
- }),
6970
6969
  text: {
6971
6970
  type: "string",
6972
6971
  title: "Text",
6973
- description: "Text to render (use \\n for line breaks)"
6972
+ description: "Text to render (use \\n for line breaks)",
6973
+ minLength: 1
6974
6974
  },
6975
6975
  font: {
6976
6976
  type: "string",
@@ -6987,7 +6987,16 @@ var inputSchema54 = {
6987
6987
  },
6988
6988
  bold: { type: "boolean", title: "Bold", default: false },
6989
6989
  italic: { type: "boolean", title: "Italic", default: false },
6990
- color: ColorSchema({ title: "Color", description: "Text color" }),
6990
+ color: ColorValueSchema({ title: "Color", description: "Text color" }),
6991
+ position: {
6992
+ type: "string",
6993
+ title: "Position",
6994
+ description: "Anchor position of the text block within the image",
6995
+ enum: [...IMAGE_TEXT_ANCHOR_POSITIONS],
6996
+ default: "middle-center",
6997
+ "x-ui-enum-labels": IMAGE_TEXT_POSITION_LABELS
6998
+ },
6999
+ image: backgroundImageProperty,
6991
7000
  width: {
6992
7001
  type: "integer",
6993
7002
  title: "Width",
@@ -6999,18 +7008,18 @@ var inputSchema54 = {
6999
7008
  title: "Height",
7000
7009
  description: "Output height in pixels",
7001
7010
  minimum: 1
7002
- },
7003
- position: {
7004
- type: "string",
7005
- title: "Position",
7006
- description: "Anchor position of the text block within the image",
7007
- enum: [...IMAGE_TEXT_ANCHOR_POSITIONS],
7008
- default: "middle-center",
7009
- "x-ui-enum-labels": IMAGE_TEXT_POSITION_LABELS
7010
7011
  }
7011
7012
  },
7012
- required: ["text", "color", "width", "height"],
7013
- additionalProperties: false
7013
+ required: ["text", "color"],
7014
+ additionalProperties: false,
7015
+ if: {
7016
+ not: {
7017
+ required: ["image"]
7018
+ }
7019
+ },
7020
+ then: {
7021
+ required: ["width", "height"]
7022
+ }
7014
7023
  };
7015
7024
  var outputSchema53 = {
7016
7025
  type: "object",
@@ -7020,6 +7029,16 @@ var outputSchema53 = {
7020
7029
  required: ["image"],
7021
7030
  additionalProperties: false
7022
7031
  };
7032
+ function hasUsableBackgroundImage(value) {
7033
+ if (typeof value === "string") {
7034
+ return value.length > 0;
7035
+ }
7036
+ if (typeof value !== "object" || value === null) {
7037
+ return false;
7038
+ }
7039
+ const candidate = value;
7040
+ return typeof candidate.width === "number" && typeof candidate.height === "number" && typeof candidate.channels === "number" && candidate.data !== undefined;
7041
+ }
7023
7042
 
7024
7043
  class ImageTextTask extends Task55 {
7025
7044
  static type = "ImageTextTask";
@@ -7035,38 +7054,49 @@ class ImageTextTask extends Task55 {
7035
7054
  getDefaultInputsFromStaticInputDefinitions() {
7036
7055
  const defaults = super.getDefaultInputsFromStaticInputDefinitions();
7037
7056
  delete defaults.image;
7057
+ delete defaults.width;
7058
+ delete defaults.height;
7038
7059
  return defaults;
7039
7060
  }
7040
7061
  async executeReactive(input, _output, _context) {
7062
+ const color = resolveColor2(input.color);
7041
7063
  const fontSize = input.fontSize ?? 24;
7042
7064
  const font = input.font ?? "sans-serif";
7043
7065
  const bold = input.bold ?? false;
7044
7066
  const italic = input.italic ?? false;
7045
7067
  const position = input.position ?? "middle-center";
7046
- const renderParams = {
7047
- text: input.text,
7048
- font,
7049
- fontSize,
7050
- bold,
7051
- italic,
7052
- color: input.color,
7053
- width: input.width,
7054
- height: input.height,
7055
- position
7056
- };
7057
- const backgroundImage = input.image;
7068
+ const backgroundImage = "image" in input ? input.image : undefined;
7058
7069
  let image;
7059
7070
  if (hasUsableBackgroundImage(backgroundImage)) {
7060
- const validatedBackgroundImage = backgroundImage;
7061
- image = await produceImageOutput(validatedBackgroundImage, async (background) => {
7062
- if (background.width !== input.width || background.height !== input.height) {
7063
- throw new Error(`ImageTextTask: background image dimensions (${background.width}x${background.height}) must match width/height (${input.width}x${input.height})`);
7064
- }
7065
- const overlay = await renderImageTextToRgba(renderParams);
7071
+ image = await produceImageOutput(backgroundImage, async (background) => {
7072
+ const overlay = await renderImageTextToRgba({
7073
+ text: input.text,
7074
+ font,
7075
+ fontSize,
7076
+ bold,
7077
+ italic,
7078
+ color,
7079
+ width: background.width,
7080
+ height: background.height,
7081
+ position
7082
+ });
7066
7083
  return compositeTextOverBackground(background, overlay);
7067
7084
  });
7068
7085
  } else {
7069
- image = await renderImageTextToRgba(renderParams);
7086
+ if (!("width" in input) || !("height" in input) || typeof input.width !== "number" || typeof input.height !== "number") {
7087
+ throw new Error("ImageTextTask: width and height are required when no background image is provided");
7088
+ }
7089
+ image = await renderImageTextToRgba({
7090
+ text: input.text,
7091
+ font,
7092
+ fontSize,
7093
+ bold,
7094
+ italic,
7095
+ color,
7096
+ width: input.width,
7097
+ height: input.height,
7098
+ position
7099
+ });
7070
7100
  }
7071
7101
  return { image };
7072
7102
  }
@@ -7142,11 +7172,12 @@ import {
7142
7172
  Task as Task57,
7143
7173
  Workflow as Workflow32
7144
7174
  } from "@workglow/task-graph";
7175
+ import { resolveColor as resolveColor3 } from "@workglow/util/media";
7145
7176
  var inputSchema56 = {
7146
7177
  type: "object",
7147
7178
  properties: {
7148
7179
  image: ImageBinaryOrDataUriSchema({ title: "Image", description: "Source image" }),
7149
- color: ColorSchema({ title: "Color", description: "Tint color" }),
7180
+ color: ColorValueSchema({ title: "Color", description: "Tint color" }),
7150
7181
  amount: {
7151
7182
  type: "number",
7152
7183
  title: "Amount",
@@ -7180,7 +7211,7 @@ class ImageTintTask extends Task57 {
7180
7211
  return outputSchema55;
7181
7212
  }
7182
7213
  async executeReactive(input, _output, _context) {
7183
- const { r: tr, g: tg, b: tb } = input.color;
7214
+ const { r: tr, g: tg, b: tb } = resolveColor3(input.color);
7184
7215
  const amount = input.amount ?? 0.5;
7185
7216
  const invAmount = 1 - amount;
7186
7217
  const tintR = tr * amount;
@@ -14030,13 +14061,13 @@ var inputSchema74 = {
14030
14061
  var outputSchema73 = {
14031
14062
  type: "object",
14032
14063
  properties: {
14033
- result: {
14064
+ text: {
14034
14065
  type: "string",
14035
- title: "Result",
14066
+ title: "Text",
14036
14067
  description: "Concatenation of all input strings"
14037
14068
  }
14038
14069
  },
14039
- required: ["result"],
14070
+ required: ["text"],
14040
14071
  additionalProperties: false
14041
14072
  };
14042
14073
 
@@ -14052,7 +14083,7 @@ class StringConcatTask extends Task80 {
14052
14083
  return outputSchema73;
14053
14084
  }
14054
14085
  async executeReactive(input2, _output, _context) {
14055
- return { result: Object.values(input2).join("") };
14086
+ return { text: Object.values(input2).join("") };
14056
14087
  }
14057
14088
  }
14058
14089
  Workflow56.prototype.stringConcat = CreateWorkflow55(StringConcatTask);
@@ -14065,9 +14096,9 @@ import {
14065
14096
  var inputSchema75 = {
14066
14097
  type: "object",
14067
14098
  properties: {
14068
- value: {
14099
+ text: {
14069
14100
  type: "string",
14070
- title: "Value",
14101
+ title: "Text",
14071
14102
  description: "Input string to search in"
14072
14103
  },
14073
14104
  search: {
@@ -14076,19 +14107,19 @@ var inputSchema75 = {
14076
14107
  description: "Substring to search for"
14077
14108
  }
14078
14109
  },
14079
- required: ["value", "search"],
14110
+ required: ["text", "search"],
14080
14111
  additionalProperties: false
14081
14112
  };
14082
14113
  var outputSchema74 = {
14083
14114
  type: "object",
14084
14115
  properties: {
14085
- result: {
14116
+ included: {
14086
14117
  type: "boolean",
14087
- title: "Result",
14118
+ title: "Included",
14088
14119
  description: "Whether the string contains the search substring"
14089
14120
  }
14090
14121
  },
14091
- required: ["result"],
14122
+ required: ["included"],
14092
14123
  additionalProperties: false
14093
14124
  };
14094
14125
 
@@ -14104,7 +14135,7 @@ class StringIncludesTask extends Task81 {
14104
14135
  return outputSchema74;
14105
14136
  }
14106
14137
  async executeReactive(input2, _output, _context) {
14107
- return { result: input2.value.includes(input2.search) };
14138
+ return { included: input2.text.includes(input2.search) };
14108
14139
  }
14109
14140
  }
14110
14141
  Workflow57.prototype.stringIncludes = CreateWorkflow56(StringIncludesTask);
@@ -14117,10 +14148,10 @@ import {
14117
14148
  var inputSchema76 = {
14118
14149
  type: "object",
14119
14150
  properties: {
14120
- values: {
14151
+ texts: {
14121
14152
  type: "array",
14122
14153
  items: { type: "string" },
14123
- title: "Values",
14154
+ title: "Texts",
14124
14155
  description: "Array of strings to join"
14125
14156
  },
14126
14157
  separator: {
@@ -14130,19 +14161,19 @@ var inputSchema76 = {
14130
14161
  default: ""
14131
14162
  }
14132
14163
  },
14133
- required: ["values"],
14164
+ required: ["texts"],
14134
14165
  additionalProperties: false
14135
14166
  };
14136
14167
  var outputSchema75 = {
14137
14168
  type: "object",
14138
14169
  properties: {
14139
- result: {
14170
+ text: {
14140
14171
  type: "string",
14141
- title: "Result",
14172
+ title: "Text",
14142
14173
  description: "Joined string"
14143
14174
  }
14144
14175
  },
14145
- required: ["result"],
14176
+ required: ["text"],
14146
14177
  additionalProperties: false
14147
14178
  };
14148
14179
 
@@ -14159,7 +14190,7 @@ class StringJoinTask extends Task82 {
14159
14190
  }
14160
14191
  async executeReactive(input2, _output, _context) {
14161
14192
  const separator = input2.separator ?? "";
14162
- return { result: input2.values.join(separator) };
14193
+ return { text: input2.texts.join(separator) };
14163
14194
  }
14164
14195
  }
14165
14196
  Workflow58.prototype.stringJoin = CreateWorkflow57(StringJoinTask);
@@ -14172,25 +14203,25 @@ import {
14172
14203
  var inputSchema77 = {
14173
14204
  type: "object",
14174
14205
  properties: {
14175
- value: {
14206
+ text: {
14176
14207
  type: "string",
14177
- title: "Value",
14208
+ title: "Text",
14178
14209
  description: "Input string"
14179
14210
  }
14180
14211
  },
14181
- required: ["value"],
14212
+ required: ["text"],
14182
14213
  additionalProperties: false
14183
14214
  };
14184
14215
  var outputSchema76 = {
14185
14216
  type: "object",
14186
14217
  properties: {
14187
- result: {
14218
+ length: {
14188
14219
  type: "integer",
14189
- title: "Result",
14220
+ title: "Length",
14190
14221
  description: "Length of the string"
14191
14222
  }
14192
14223
  },
14193
- required: ["result"],
14224
+ required: ["length"],
14194
14225
  additionalProperties: false
14195
14226
  };
14196
14227
 
@@ -14206,7 +14237,7 @@ class StringLengthTask extends Task83 {
14206
14237
  return outputSchema76;
14207
14238
  }
14208
14239
  async executeReactive(input2, _output, _context) {
14209
- return { result: input2.value.length };
14240
+ return { length: input2.text.length };
14210
14241
  }
14211
14242
  }
14212
14243
  Workflow59.prototype.stringLength = CreateWorkflow58(StringLengthTask);
@@ -14219,25 +14250,25 @@ import {
14219
14250
  var inputSchema78 = {
14220
14251
  type: "object",
14221
14252
  properties: {
14222
- value: {
14253
+ text: {
14223
14254
  type: "string",
14224
- title: "Value",
14255
+ title: "Text",
14225
14256
  description: "Input string"
14226
14257
  }
14227
14258
  },
14228
- required: ["value"],
14259
+ required: ["text"],
14229
14260
  additionalProperties: false
14230
14261
  };
14231
14262
  var outputSchema77 = {
14232
14263
  type: "object",
14233
14264
  properties: {
14234
- result: {
14265
+ text: {
14235
14266
  type: "string",
14236
- title: "Result",
14267
+ title: "Text",
14237
14268
  description: "Lowercased string"
14238
14269
  }
14239
14270
  },
14240
- required: ["result"],
14271
+ required: ["text"],
14241
14272
  additionalProperties: false
14242
14273
  };
14243
14274
 
@@ -14253,7 +14284,7 @@ class StringLowerCaseTask extends Task84 {
14253
14284
  return outputSchema77;
14254
14285
  }
14255
14286
  async executeReactive(input2, _output, _context) {
14256
- return { result: input2.value.toLowerCase() };
14287
+ return { text: input2.text.toLowerCase() };
14257
14288
  }
14258
14289
  }
14259
14290
  Workflow60.prototype.stringLowerCase = CreateWorkflow59(StringLowerCaseTask);
@@ -14266,9 +14297,9 @@ import {
14266
14297
  var inputSchema79 = {
14267
14298
  type: "object",
14268
14299
  properties: {
14269
- value: {
14300
+ text: {
14270
14301
  type: "string",
14271
- title: "Value",
14302
+ title: "Text",
14272
14303
  description: "Input string"
14273
14304
  },
14274
14305
  search: {
@@ -14282,19 +14313,19 @@ var inputSchema79 = {
14282
14313
  description: "Replacement string"
14283
14314
  }
14284
14315
  },
14285
- required: ["value", "search", "replace"],
14316
+ required: ["text", "search", "replace"],
14286
14317
  additionalProperties: false
14287
14318
  };
14288
14319
  var outputSchema78 = {
14289
14320
  type: "object",
14290
14321
  properties: {
14291
- result: {
14322
+ text: {
14292
14323
  type: "string",
14293
- title: "Result",
14324
+ title: "Text",
14294
14325
  description: "String with all occurrences replaced"
14295
14326
  }
14296
14327
  },
14297
- required: ["result"],
14328
+ required: ["text"],
14298
14329
  additionalProperties: false
14299
14330
  };
14300
14331
 
@@ -14310,7 +14341,7 @@ class StringReplaceTask extends Task85 {
14310
14341
  return outputSchema78;
14311
14342
  }
14312
14343
  async executeReactive(input2, _output, _context) {
14313
- return { result: input2.value.replaceAll(input2.search, input2.replace) };
14344
+ return { text: input2.text.replaceAll(input2.search, input2.replace) };
14314
14345
  }
14315
14346
  }
14316
14347
  Workflow61.prototype.stringReplace = CreateWorkflow60(StringReplaceTask);
@@ -14323,9 +14354,9 @@ import {
14323
14354
  var inputSchema80 = {
14324
14355
  type: "object",
14325
14356
  properties: {
14326
- value: {
14357
+ text: {
14327
14358
  type: "string",
14328
- title: "Value",
14359
+ title: "Text",
14329
14360
  description: "Input string"
14330
14361
  },
14331
14362
  start: {
@@ -14339,19 +14370,19 @@ var inputSchema80 = {
14339
14370
  description: "End index (exclusive, supports negative indexing)"
14340
14371
  }
14341
14372
  },
14342
- required: ["value", "start"],
14373
+ required: ["text", "start"],
14343
14374
  additionalProperties: false
14344
14375
  };
14345
14376
  var outputSchema79 = {
14346
14377
  type: "object",
14347
14378
  properties: {
14348
- result: {
14379
+ text: {
14349
14380
  type: "string",
14350
- title: "Result",
14381
+ title: "Text",
14351
14382
  description: "Extracted substring"
14352
14383
  }
14353
14384
  },
14354
- required: ["result"],
14385
+ required: ["text"],
14355
14386
  additionalProperties: false
14356
14387
  };
14357
14388
 
@@ -14367,7 +14398,7 @@ class StringSliceTask extends Task86 {
14367
14398
  return outputSchema79;
14368
14399
  }
14369
14400
  async executeReactive(input2, _output, _context) {
14370
- return { result: input2.value.slice(input2.start, input2.end) };
14401
+ return { text: input2.text.slice(input2.start, input2.end) };
14371
14402
  }
14372
14403
  }
14373
14404
  Workflow62.prototype.stringSlice = CreateWorkflow61(StringSliceTask);
@@ -14398,13 +14429,13 @@ var inputSchema81 = {
14398
14429
  var outputSchema80 = {
14399
14430
  type: "object",
14400
14431
  properties: {
14401
- result: {
14432
+ text: {
14402
14433
  type: "string",
14403
- title: "Result",
14434
+ title: "Text",
14404
14435
  description: "Template with placeholders replaced by values"
14405
14436
  }
14406
14437
  },
14407
- required: ["result"],
14438
+ required: ["text"],
14408
14439
  additionalProperties: false
14409
14440
  };
14410
14441
 
@@ -14420,11 +14451,11 @@ class StringTemplateTask extends Task87 {
14420
14451
  return outputSchema80;
14421
14452
  }
14422
14453
  async executeReactive(input2, _output, _context) {
14423
- let result = input2.template;
14454
+ let text = input2.template;
14424
14455
  for (const [key, value] of Object.entries(input2.values)) {
14425
- result = result.replaceAll(`{{${key}}}`, String(value));
14456
+ text = text.replaceAll(`{{${key}}}`, String(value));
14426
14457
  }
14427
- return { result };
14458
+ return { text };
14428
14459
  }
14429
14460
  }
14430
14461
  Workflow63.prototype.stringTemplate = CreateWorkflow62(StringTemplateTask);
@@ -14437,25 +14468,25 @@ import {
14437
14468
  var inputSchema82 = {
14438
14469
  type: "object",
14439
14470
  properties: {
14440
- value: {
14471
+ text: {
14441
14472
  type: "string",
14442
- title: "Value",
14473
+ title: "Text",
14443
14474
  description: "Input string"
14444
14475
  }
14445
14476
  },
14446
- required: ["value"],
14477
+ required: ["text"],
14447
14478
  additionalProperties: false
14448
14479
  };
14449
14480
  var outputSchema81 = {
14450
14481
  type: "object",
14451
14482
  properties: {
14452
- result: {
14483
+ text: {
14453
14484
  type: "string",
14454
- title: "Result",
14485
+ title: "Text",
14455
14486
  description: "Trimmed string"
14456
14487
  }
14457
14488
  },
14458
- required: ["result"],
14489
+ required: ["text"],
14459
14490
  additionalProperties: false
14460
14491
  };
14461
14492
 
@@ -14471,7 +14502,7 @@ class StringTrimTask extends Task88 {
14471
14502
  return outputSchema81;
14472
14503
  }
14473
14504
  async executeReactive(input2, _output, _context) {
14474
- return { result: input2.value.trim() };
14505
+ return { text: input2.text.trim() };
14475
14506
  }
14476
14507
  }
14477
14508
  Workflow64.prototype.stringTrim = CreateWorkflow63(StringTrimTask);
@@ -14484,25 +14515,25 @@ import {
14484
14515
  var inputSchema83 = {
14485
14516
  type: "object",
14486
14517
  properties: {
14487
- value: {
14518
+ text: {
14488
14519
  type: "string",
14489
- title: "Value",
14520
+ title: "Text",
14490
14521
  description: "Input string"
14491
14522
  }
14492
14523
  },
14493
- required: ["value"],
14524
+ required: ["text"],
14494
14525
  additionalProperties: false
14495
14526
  };
14496
14527
  var outputSchema82 = {
14497
14528
  type: "object",
14498
14529
  properties: {
14499
- result: {
14530
+ text: {
14500
14531
  type: "string",
14501
- title: "Result",
14532
+ title: "Text",
14502
14533
  description: "Uppercased string"
14503
14534
  }
14504
14535
  },
14505
- required: ["result"],
14536
+ required: ["text"],
14506
14537
  additionalProperties: false
14507
14538
  };
14508
14539
 
@@ -14518,7 +14549,7 @@ class StringUpperCaseTask extends Task89 {
14518
14549
  return outputSchema82;
14519
14550
  }
14520
14551
  async executeReactive(input2, _output, _context) {
14521
- return { result: input2.value.toUpperCase() };
14552
+ return { text: input2.text.toUpperCase() };
14522
14553
  }
14523
14554
  }
14524
14555
  Workflow65.prototype.stringUpperCase = CreateWorkflow64(StringUpperCaseTask);
@@ -16338,13 +16369,12 @@ export {
16338
16369
  searchMcpRegistryPage,
16339
16370
  searchMcpRegistry,
16340
16371
  safeFetch,
16341
- resolveImageInput,
16342
16372
  resolveAuthSecrets,
16343
16373
  resetSafeFetch,
16344
16374
  registerSafeFetch,
16345
16375
  registerMcpTaskDeps,
16346
16376
  registerMcpServer,
16347
- registerImageRasterCodec,
16377
+ registerImageRasterCodec2 as registerImageRasterCodec,
16348
16378
  registerCommonTasks2 as registerCommonTasks,
16349
16379
  registerBrowserDeps,
16350
16380
  produceImageOutput,
@@ -16365,16 +16395,14 @@ export {
16365
16395
  lambda,
16366
16396
  json,
16367
16397
  javaScript,
16368
- isDataUriImage,
16369
16398
  getSafeFetchImpl,
16370
16399
  getMcpTaskDeps,
16371
16400
  getMcpServerConfig,
16372
16401
  getMcpServer,
16373
- getImageRasterCodec,
16402
+ getImageRasterCodec2 as getImageRasterCodec,
16374
16403
  getGlobalMcpServers,
16375
16404
  getGlobalMcpServerRepository,
16376
16405
  getBrowserDeps,
16377
- formatImageOutput,
16378
16406
  fileLoader,
16379
16407
  fetchUrl,
16380
16408
  extractDataUriMimeType,
@@ -16472,6 +16500,7 @@ export {
16472
16500
  ImageBinaryOrDataUriSchema,
16473
16501
  HumanInputTask,
16474
16502
  HumanApprovalTask,
16503
+ HexColorSchema,
16475
16504
  FileLoaderTask2 as FileLoaderTask,
16476
16505
  FetchUrlTask,
16477
16506
  FetchUrlJob,
@@ -16480,7 +16509,9 @@ export {
16480
16509
  DebugLogTask,
16481
16510
  DateFormatTask,
16482
16511
  CredentialStoreOAuthProvider,
16512
+ ColorValueSchema,
16483
16513
  ColorSchema,
16514
+ ColorFromSchemaOptions,
16484
16515
  CDPBrowserBackend,
16485
16516
  BunWebViewBackend,
16486
16517
  BrowserWaitTask,
@@ -16514,4 +16545,4 @@ export {
16514
16545
  ArrayTask
16515
16546
  };
16516
16547
 
16517
- //# debugId=512D314B3B00A4EC64756E2164756E21
16548
+ //# debugId=66ACFB4024136A3764756E2164756E21