@workglow/ai 0.0.71 → 0.0.73

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 (41) hide show
  1. package/dist/browser.js +1632 -283
  2. package/dist/browser.js.map +20 -8
  3. package/dist/bun.js +1632 -283
  4. package/dist/bun.js.map +20 -8
  5. package/dist/node.js +1632 -283
  6. package/dist/node.js.map +20 -8
  7. package/dist/task/BackgroundRemovalTask.d.ts +351 -0
  8. package/dist/task/BackgroundRemovalTask.d.ts.map +1 -0
  9. package/dist/task/FaceDetectorTask.d.ts +520 -0
  10. package/dist/task/FaceDetectorTask.d.ts.map +1 -0
  11. package/dist/task/FaceLandmarkerTask.d.ts +549 -0
  12. package/dist/task/FaceLandmarkerTask.d.ts.map +1 -0
  13. package/dist/task/GestureRecognizerTask.d.ts +629 -0
  14. package/dist/task/GestureRecognizerTask.d.ts.map +1 -0
  15. package/dist/task/HandLandmarkerTask.d.ts +576 -0
  16. package/dist/task/HandLandmarkerTask.d.ts.map +1 -0
  17. package/dist/task/ImageClassificationTask.d.ts +410 -0
  18. package/dist/task/ImageClassificationTask.d.ts.map +1 -0
  19. package/dist/task/ImageEmbeddingTask.d.ts +503 -0
  20. package/dist/task/ImageEmbeddingTask.d.ts.map +1 -0
  21. package/dist/task/ImageSegmentationTask.d.ts +423 -0
  22. package/dist/task/ImageSegmentationTask.d.ts.map +1 -0
  23. package/dist/task/ImageToTextTask.d.ts +355 -0
  24. package/dist/task/ImageToTextTask.d.ts.map +1 -0
  25. package/dist/task/ObjectDetectionTask.d.ts +476 -0
  26. package/dist/task/ObjectDetectionTask.d.ts.map +1 -0
  27. package/dist/task/PoseLandmarkerTask.d.ts +637 -0
  28. package/dist/task/PoseLandmarkerTask.d.ts.map +1 -0
  29. package/dist/task/{TextClassifierTask.d.ts → TextClassificationTask.d.ts} +23 -12
  30. package/dist/task/TextClassificationTask.d.ts.map +1 -0
  31. package/dist/task/TextFillMaskTask.d.ts.map +1 -1
  32. package/dist/task/TextNamedEntityRecognitionTask.d.ts.map +1 -1
  33. package/dist/task/base/AiTask.d.ts.map +1 -1
  34. package/dist/task/base/AiTaskSchemas.d.ts +153 -0
  35. package/dist/task/base/AiTaskSchemas.d.ts.map +1 -1
  36. package/dist/task/base/AiVisionTask.d.ts +33 -0
  37. package/dist/task/base/AiVisionTask.d.ts.map +1 -0
  38. package/dist/task/index.d.ts +12 -1
  39. package/dist/task/index.d.ts.map +1 -1
  40. package/package.json +9 -9
  41. package/dist/task/TextClassifierTask.d.ts.map +0 -1
package/dist/bun.js CHANGED
@@ -447,125 +447,9 @@ class DocumentConverterText extends DocumentConverter {
447
447
  return new Document(this.text, this.metadata);
448
448
  }
449
449
  }
450
- // src/task/base/AiTask.ts
451
- import {
452
- JobQueueTask,
453
- TaskConfigurationError
454
- } from "@workglow/task-graph";
455
- function schemaFormat(schema) {
456
- return typeof schema === "object" && schema !== null && "format" in schema ? schema.format : undefined;
457
- }
450
+ // src/task/BackgroundRemovalTask.ts
451
+ import { CreateWorkflow, TaskRegistry, Workflow } from "@workglow/task-graph";
458
452
 
459
- class AiTask extends JobQueueTask {
460
- static type = "AiTask";
461
- modelCache;
462
- constructor(input = {}, config = {}) {
463
- config.name ||= `${new.target.type || new.target.name}${input.model ? " with model " + input.model : ""}`;
464
- super(input, config);
465
- }
466
- async getJobInput(input) {
467
- if (typeof input.model !== "string") {
468
- console.error("AiTask: Model is not a string", input);
469
- throw new TaskConfigurationError("AiTask: Model is not a string, only create job for single model tasks");
470
- }
471
- const runtype = this.constructor.runtype ?? this.constructor.type;
472
- const model = await this.getModelForInput(input);
473
- return {
474
- taskType: runtype,
475
- aiProvider: model.provider,
476
- taskInput: input
477
- };
478
- }
479
- async createJob(input, queueName) {
480
- const jobInput = await this.getJobInput(input);
481
- const resolvedQueueName = queueName ?? await this.getDefaultQueueName(input);
482
- if (!resolvedQueueName) {
483
- throw new TaskConfigurationError("JobQueueTask: Unable to determine queue for AI provider");
484
- }
485
- const job = new AiJob({
486
- queueName: resolvedQueueName,
487
- jobRunId: this.config.runnerId,
488
- input: jobInput
489
- });
490
- return job;
491
- }
492
- async getModelForInput(input) {
493
- const modelname = input.model;
494
- if (!modelname)
495
- throw new TaskConfigurationError("AiTask: No model name found");
496
- if (this.modelCache && this.modelCache.name === modelname) {
497
- return this.modelCache.model;
498
- }
499
- const model = await getGlobalModelRepository().findByName(modelname);
500
- if (!model) {
501
- throw new TaskConfigurationError(`JobQueueTask: No model ${modelname} found`);
502
- }
503
- this.modelCache = { name: modelname, model };
504
- return model;
505
- }
506
- async getDefaultQueueName(input) {
507
- if (typeof input.model === "string") {
508
- const model = await this.getModelForInput(input);
509
- return model.provider;
510
- }
511
- return;
512
- }
513
- async validateInput(input) {
514
- const inputSchema = this.inputSchema();
515
- if (typeof inputSchema === "boolean") {
516
- if (inputSchema === false) {
517
- throw new TaskConfigurationError(`AiTask: Input schema is 'false' and accepts no inputs`);
518
- }
519
- return true;
520
- }
521
- const modelTaskProperties = Object.entries(inputSchema.properties || {}).filter(([key, schema]) => schemaFormat(schema)?.startsWith("model:"));
522
- if (modelTaskProperties.length > 0) {
523
- const taskModels = await getGlobalModelRepository().findModelsByTask(this.type);
524
- for (const [key, propSchema] of modelTaskProperties) {
525
- let requestedModels = Array.isArray(input[key]) ? input[key] : [input[key]];
526
- for (const model of requestedModels) {
527
- const foundModel = taskModels?.find((m) => m.model_id === model);
528
- if (!foundModel) {
529
- throw new TaskConfigurationError(`AiTask: Missing model for '${key}' named '${model}' for task '${this.type}'`);
530
- }
531
- }
532
- }
533
- }
534
- const modelPlainProperties = Object.entries(inputSchema.properties || {}).filter(([key, schema]) => schemaFormat(schema) === "model");
535
- if (modelPlainProperties.length > 0) {
536
- for (const [key, propSchema] of modelPlainProperties) {
537
- let requestedModels = Array.isArray(input[key]) ? input[key] : [input[key]];
538
- for (const model of requestedModels) {
539
- const foundModel = await getGlobalModelRepository().findByName(model);
540
- if (!foundModel) {
541
- throw new TaskConfigurationError(`AiTask: Missing model for "${key}" named "${model}"`);
542
- }
543
- }
544
- }
545
- }
546
- return super.validateInput(input);
547
- }
548
- async narrowInput(input) {
549
- const inputSchema = this.inputSchema();
550
- if (typeof inputSchema === "boolean") {
551
- if (inputSchema === false) {
552
- throw new TaskConfigurationError(`AiTask: Input schema is 'false' and accepts no inputs`);
553
- }
554
- return input;
555
- }
556
- const modelTaskProperties = Object.entries(inputSchema.properties || {}).filter(([key, schema]) => schemaFormat(schema)?.startsWith("model:"));
557
- if (modelTaskProperties.length > 0) {
558
- const taskModels = await getGlobalModelRepository().findModelsByTask(this.type);
559
- for (const [key, propSchema] of modelTaskProperties) {
560
- let requestedModels = Array.isArray(input[key]) ? input[key] : [input[key]];
561
- let usingModels = requestedModels.filter((model) => taskModels?.find((m) => m.model_id === model));
562
- usingModels = usingModels.length > 1 ? usingModels : usingModels[0];
563
- input[key] = usingModels;
564
- }
565
- }
566
- return input;
567
- }
568
- }
569
453
  // src/task/base/AiTaskSchemas.ts
570
454
  import {
571
455
  FromSchemaDefaultOptions
@@ -693,134 +577,1541 @@ var TypeReplicateArray = (type, annotations = {}) => ({
693
577
  ...annotations,
694
578
  "x-replicate": true
695
579
  });
696
- // src/task/DocumentSplitterTask.ts
580
+ var TypeImageInput = {
581
+ oneOf: [
582
+ {
583
+ type: "string",
584
+ title: "Image Data",
585
+ description: "Image as data-uri"
586
+ },
587
+ {
588
+ type: "object",
589
+ additionalProperties: false,
590
+ properties: {
591
+ data: {
592
+ oneOf: [
593
+ {
594
+ type: "object",
595
+ format: "image:ImageBitmap",
596
+ title: "ImageBitmap"
597
+ },
598
+ {
599
+ type: "object",
600
+ format: "image:OffscreenCanvas",
601
+ title: "OffscreenCanvas"
602
+ },
603
+ {
604
+ type: "object",
605
+ format: "image:VideoFrame",
606
+ title: "VideoFrame"
607
+ },
608
+ {
609
+ type: "object",
610
+ properties: {
611
+ data: {
612
+ type: "array",
613
+ items: { type: "number", format: "Uint8Clamped" },
614
+ format: "Uint8ClampedArray",
615
+ title: "Data",
616
+ description: "Data of the image"
617
+ },
618
+ width: { type: "number", title: "Width", description: "Width of the image" },
619
+ height: { type: "number", title: "Height", description: "Height of the image" },
620
+ channels: {
621
+ type: "number",
622
+ title: "Channels",
623
+ description: "Channels of the image"
624
+ },
625
+ rawChannels: {
626
+ type: "number",
627
+ title: "Raw Channels",
628
+ description: "Raw channels of the image"
629
+ }
630
+ },
631
+ additionalProperties: false,
632
+ required: ["data", "width", "height", "channels"],
633
+ format: "image:ImageBinary",
634
+ title: "ImageBinary"
635
+ }
636
+ ]
637
+ },
638
+ width: { type: "number", title: "Width", description: "Width of the image" },
639
+ height: { type: "number", title: "Height", description: "Height of the image" },
640
+ channels: {
641
+ type: "number",
642
+ title: "Channels",
643
+ description: "Channels of the image",
644
+ minimum: 1,
645
+ maximum: 4
646
+ }
647
+ },
648
+ required: ["data", "width", "height", "channels"]
649
+ }
650
+ ],
651
+ title: "Image",
652
+ description: "Image as URL or base64-encoded data"
653
+ };
654
+ var TypeAudioInput = {
655
+ type: "string",
656
+ title: "Audio",
657
+ description: "Audio as data-uri, or Blob"
658
+ };
659
+ var TypeBoundingBox = {
660
+ type: "object",
661
+ properties: {
662
+ x: { type: "number", title: "X coordinate", description: "Left edge of the bounding box" },
663
+ y: { type: "number", title: "Y coordinate", description: "Top edge of the bounding box" },
664
+ width: { type: "number", title: "Width", description: "Width of the bounding box" },
665
+ height: { type: "number", title: "Height", description: "Height of the bounding box" }
666
+ },
667
+ required: ["x", "y", "width", "height"],
668
+ additionalProperties: false,
669
+ title: "Bounding Box",
670
+ description: "Bounding box coordinates"
671
+ };
672
+ var TypeCategory = {
673
+ type: "object",
674
+ properties: {
675
+ label: { type: "string", title: "Label", description: "Category label" },
676
+ score: {
677
+ type: "number",
678
+ title: "Confidence Score",
679
+ description: "Confidence score between 0 and 1",
680
+ minimum: 0,
681
+ maximum: 1
682
+ }
683
+ },
684
+ required: ["label", "score"],
685
+ additionalProperties: false,
686
+ title: "Category",
687
+ description: "Classification category with label and score"
688
+ };
689
+
690
+ // src/task/base/AiVisionTask.ts
691
+ import { convertImageDataToUseableForm } from "@workglow/util";
692
+
693
+ // src/task/base/AiTask.ts
697
694
  import {
698
- CreateWorkflow,
699
- Task,
700
- TaskRegistry,
701
- Workflow
695
+ JobQueueTask,
696
+ TaskConfigurationError
702
697
  } from "@workglow/task-graph";
703
- var inputSchema = {
698
+ function schemaFormat(schema) {
699
+ return typeof schema === "object" && schema !== null && "format" in schema ? schema.format : undefined;
700
+ }
701
+
702
+ class AiTask extends JobQueueTask {
703
+ static type = "AiTask";
704
+ modelCache;
705
+ constructor(input = {}, config = {}) {
706
+ config.name ||= `${new.target.type || new.target.name}${input.model ? " with model " + input.model : ""}`;
707
+ super(input, config);
708
+ }
709
+ async getJobInput(input) {
710
+ if (typeof input.model !== "string") {
711
+ console.error("AiTask: Model is not a string", input);
712
+ throw new TaskConfigurationError("AiTask: Model is not a string, only create job for single model tasks");
713
+ }
714
+ const runtype = this.constructor.runtype ?? this.constructor.type;
715
+ const model = await this.getModelForInput(input);
716
+ return {
717
+ taskType: runtype,
718
+ aiProvider: model.provider,
719
+ taskInput: input
720
+ };
721
+ }
722
+ async createJob(input, queueName) {
723
+ const jobInput = await this.getJobInput(input);
724
+ const resolvedQueueName = queueName ?? await this.getDefaultQueueName(input);
725
+ if (!resolvedQueueName) {
726
+ throw new TaskConfigurationError("JobQueueTask: Unable to determine queue for AI provider");
727
+ }
728
+ const job = new AiJob({
729
+ queueName: resolvedQueueName,
730
+ jobRunId: this.config.runnerId,
731
+ input: jobInput
732
+ });
733
+ return job;
734
+ }
735
+ async getModelForInput(input) {
736
+ const modelname = input.model;
737
+ if (!modelname)
738
+ throw new TaskConfigurationError("AiTask: No model name found");
739
+ if (this.modelCache && this.modelCache.name === modelname) {
740
+ return this.modelCache.model;
741
+ }
742
+ const model = await getGlobalModelRepository().findByName(modelname);
743
+ if (!model) {
744
+ throw new TaskConfigurationError(`JobQueueTask: No model ${modelname} found`);
745
+ }
746
+ this.modelCache = { name: modelname, model };
747
+ return model;
748
+ }
749
+ async getDefaultQueueName(input) {
750
+ if (typeof input.model === "string") {
751
+ const model = await this.getModelForInput(input);
752
+ return model.provider;
753
+ }
754
+ return;
755
+ }
756
+ async validateInput(input) {
757
+ const inputSchema = this.inputSchema();
758
+ if (typeof inputSchema === "boolean") {
759
+ if (inputSchema === false) {
760
+ throw new TaskConfigurationError(`AiTask: Input schema is 'false' and accepts no inputs`);
761
+ }
762
+ return true;
763
+ }
764
+ const modelTaskProperties = Object.entries(inputSchema.properties || {}).filter(([key, schema]) => schemaFormat(schema)?.startsWith("model:"));
765
+ if (modelTaskProperties.length > 0) {
766
+ const taskModels = await getGlobalModelRepository().findModelsByTask(this.type);
767
+ for (const [key, propSchema] of modelTaskProperties) {
768
+ let requestedModels = Array.isArray(input[key]) ? input[key] : [input[key]];
769
+ for (const model of requestedModels) {
770
+ const foundModel = taskModels?.find((m) => m.model_id === model);
771
+ if (!foundModel) {
772
+ throw new TaskConfigurationError(`AiTask: Missing model for '${key}' named '${model}' for task '${this.type}'`);
773
+ }
774
+ }
775
+ }
776
+ }
777
+ const modelPlainProperties = Object.entries(inputSchema.properties || {}).filter(([key, schema]) => schemaFormat(schema) === "model");
778
+ if (modelPlainProperties.length > 0) {
779
+ for (const [key, propSchema] of modelPlainProperties) {
780
+ let requestedModels = Array.isArray(input[key]) ? input[key] : [input[key]];
781
+ for (const model of requestedModels) {
782
+ const foundModel = await getGlobalModelRepository().findByName(model);
783
+ if (!foundModel) {
784
+ throw new TaskConfigurationError(`AiTask: Missing model for "${key}" named "${model}"`);
785
+ }
786
+ }
787
+ }
788
+ }
789
+ return super.validateInput(input);
790
+ }
791
+ async narrowInput(input) {
792
+ const inputSchema = this.inputSchema();
793
+ if (typeof inputSchema === "boolean") {
794
+ if (inputSchema === false) {
795
+ throw new TaskConfigurationError(`AiTask: Input schema is 'false' and accepts no inputs`);
796
+ }
797
+ return input;
798
+ }
799
+ const modelTaskProperties = Object.entries(inputSchema.properties || {}).filter(([key, schema]) => schemaFormat(schema)?.startsWith("model:"));
800
+ if (modelTaskProperties.length > 0) {
801
+ const taskModels = await getGlobalModelRepository().findModelsByTask(this.type);
802
+ for (const [key, propSchema] of modelTaskProperties) {
803
+ let requestedModels = Array.isArray(input[key]) ? input[key] : [input[key]];
804
+ let usingModels = requestedModels.filter((model) => taskModels?.find((m) => m.model_id === model));
805
+ usingModels = usingModels.length > 1 ? usingModels : usingModels[0];
806
+ input[key] = usingModels;
807
+ }
808
+ }
809
+ return input;
810
+ }
811
+ }
812
+
813
+ // src/task/base/AiVisionTask.ts
814
+ class AiVisionTask extends AiTask {
815
+ static type = "AiVisionTask";
816
+ async getJobInput(input) {
817
+ const jobInput = await super.getJobInput(input);
818
+ const registeredQueue = await this.resolveQueue(input);
819
+ const queueName = registeredQueue?.server.queueName;
820
+ const supports = ["Blob"];
821
+ if (input.image) {
822
+ if ("OffscreenCanvas" in globalThis) {
823
+ supports.push("OffscreenCanvas");
824
+ } else if (queueName === "TENSORFLOW_MEDIAPIPE" && "ImageBitmap" in globalThis) {
825
+ supports.push("ImageBitmap");
826
+ } else if (queueName === "TENSORFLOW_MEDIAPIPE" && "VideoFrame" in globalThis) {
827
+ supports.push("VideoFrame");
828
+ }
829
+ const image = await convertImageDataToUseableForm(input.image, supports);
830
+ jobInput.taskInput.image = image;
831
+ }
832
+ return jobInput;
833
+ }
834
+ }
835
+
836
+ // src/task/BackgroundRemovalTask.ts
837
+ var modelSchema = TypeReplicateArray(TypeModel("model:BackgroundRemovalTask"));
838
+ var processedImageSchema = {
839
+ type: "string",
840
+ contentEncoding: "base64",
841
+ contentMediaType: "image/png",
842
+ title: "Image",
843
+ description: "Base64-encoded PNG image with transparent background"
844
+ };
845
+ var BackgroundRemovalInputSchema = {
846
+ type: "object",
847
+ properties: {
848
+ image: TypeReplicateArray(TypeImageInput),
849
+ model: modelSchema
850
+ },
851
+ required: ["image", "model"],
852
+ additionalProperties: false
853
+ };
854
+ var BackgroundRemovalOutputSchema = {
855
+ type: "object",
856
+ properties: {
857
+ image: {
858
+ oneOf: [processedImageSchema, { type: "array", items: processedImageSchema }],
859
+ title: processedImageSchema.title,
860
+ description: processedImageSchema.description
861
+ }
862
+ },
863
+ required: ["image"],
864
+ additionalProperties: false
865
+ };
866
+
867
+ class BackgroundRemovalTask extends AiVisionTask {
868
+ static type = "BackgroundRemovalTask";
869
+ static category = "AI Vision Model";
870
+ static title = "Background Removal";
871
+ static description = "Removes backgrounds from images, producing images with transparent backgrounds";
872
+ static inputSchema() {
873
+ return BackgroundRemovalInputSchema;
874
+ }
875
+ static outputSchema() {
876
+ return BackgroundRemovalOutputSchema;
877
+ }
878
+ }
879
+ TaskRegistry.registerTask(BackgroundRemovalTask);
880
+ var BackgroundRemoval = (input, config) => {
881
+ return new BackgroundRemovalTask(input, config).run();
882
+ };
883
+ Workflow.prototype.BackgroundRemoval = CreateWorkflow(BackgroundRemovalTask);
884
+ // src/task/DocumentSplitterTask.ts
885
+ import {
886
+ CreateWorkflow as CreateWorkflow2,
887
+ Task,
888
+ TaskRegistry as TaskRegistry2,
889
+ Workflow as Workflow2
890
+ } from "@workglow/task-graph";
891
+ var inputSchema = {
892
+ type: "object",
893
+ properties: {
894
+ parser: {
895
+ type: "string",
896
+ enum: ["txt", "md"],
897
+ title: "Document Kind",
898
+ description: "The kind of document (txt or md)"
899
+ }
900
+ },
901
+ required: ["parser"],
902
+ additionalProperties: false
903
+ };
904
+ var outputSchema = {
905
+ type: "object",
906
+ properties: {
907
+ texts: {
908
+ type: "array",
909
+ items: { type: "string" },
910
+ title: "Text Chunks",
911
+ description: "The text chunks of the document"
912
+ }
913
+ },
914
+ required: ["texts"],
915
+ additionalProperties: false
916
+ };
917
+
918
+ class DocumentSplitterTask extends Task {
919
+ static type = "DocumentSplitterTask";
920
+ static category = "Document";
921
+ static title = "Document Splitter";
922
+ static description = "Splits documents into text chunks for processing";
923
+ static inputSchema() {
924
+ return inputSchema;
925
+ }
926
+ static outputSchema() {
927
+ return outputSchema;
928
+ }
929
+ flattenFragmentsToTexts(item) {
930
+ if (item instanceof Document) {
931
+ const texts = [];
932
+ item.fragments.forEach((fragment) => {
933
+ texts.push(...this.flattenFragmentsToTexts(fragment));
934
+ });
935
+ return texts;
936
+ } else {
937
+ return [item.content];
938
+ }
939
+ }
940
+ async executeReactive() {
941
+ return { texts: this.flattenFragmentsToTexts(this.runInputData.file) };
942
+ }
943
+ }
944
+ TaskRegistry2.registerTask(DocumentSplitterTask);
945
+ var DocumentSplitter = (input) => {
946
+ return new DocumentSplitterTask(input).run();
947
+ };
948
+ Workflow2.prototype.DocumentSplitter = CreateWorkflow2(DocumentSplitterTask);
949
+ // src/task/DownloadModelTask.ts
950
+ import { CreateWorkflow as CreateWorkflow3, TaskRegistry as TaskRegistry3, Workflow as Workflow3 } from "@workglow/task-graph";
951
+ var modelSchema2 = TypeReplicateArray(TypeModel("model"));
952
+ var DownloadModelInputSchema = {
953
+ type: "object",
954
+ properties: {
955
+ model: modelSchema2
956
+ },
957
+ required: ["model"],
958
+ additionalProperties: false
959
+ };
960
+ var DownloadModelOutputSchema = {
961
+ type: "object",
962
+ properties: {
963
+ model: modelSchema2
964
+ },
965
+ required: ["model"],
966
+ additionalProperties: false
967
+ };
968
+
969
+ class DownloadModelTask extends AiTask {
970
+ static type = "DownloadModelTask";
971
+ static category = "AI Text Model";
972
+ static title = "Download Model";
973
+ static description = "Downloads and caches AI models locally with progress tracking";
974
+ static inputSchema() {
975
+ return DownloadModelInputSchema;
976
+ }
977
+ static outputSchema() {
978
+ return DownloadModelOutputSchema;
979
+ }
980
+ static cacheable = false;
981
+ files = [];
982
+ constructor(input, config = {}) {
983
+ super(input, config);
984
+ this.on("progress", this.processProgress.bind(this));
985
+ this.on("start", () => {
986
+ this.files = [];
987
+ });
988
+ }
989
+ processProgress(progress, message = "", details) {
990
+ if (details?.file) {
991
+ const file = this.files.find((f) => f.file === details.file);
992
+ if (file) {
993
+ file.progress = details.progress;
994
+ } else {
995
+ this.files.push({ file: details.file, progress: details.progress });
996
+ }
997
+ this.progress = this.files.reduce((acc, f) => acc + f.progress, 0) / this.files.length;
998
+ } else {
999
+ this.progress = progress;
1000
+ }
1001
+ }
1002
+ }
1003
+ TaskRegistry3.registerTask(DownloadModelTask);
1004
+ var DownloadModel = (input, config) => {
1005
+ return new DownloadModelTask(input, config).run();
1006
+ };
1007
+ Workflow3.prototype.DownloadModel = CreateWorkflow3(DownloadModelTask);
1008
+ // src/task/FaceDetectorTask.ts
1009
+ import { CreateWorkflow as CreateWorkflow4, TaskRegistry as TaskRegistry4, Workflow as Workflow4 } from "@workglow/task-graph";
1010
+ var modelSchema3 = TypeReplicateArray(TypeModel("model:FaceDetectorTask"));
1011
+ var TypeBoundingBox2 = {
1012
+ type: "object",
1013
+ properties: {
1014
+ x: {
1015
+ type: "number",
1016
+ title: "X Coordinate",
1017
+ description: "X coordinate of the top-left corner"
1018
+ },
1019
+ y: {
1020
+ type: "number",
1021
+ title: "Y Coordinate",
1022
+ description: "Y coordinate of the top-left corner"
1023
+ },
1024
+ width: {
1025
+ type: "number",
1026
+ title: "Width",
1027
+ description: "Width of the bounding box"
1028
+ },
1029
+ height: {
1030
+ type: "number",
1031
+ title: "Height",
1032
+ description: "Height of the bounding box"
1033
+ }
1034
+ },
1035
+ required: ["x", "y", "width", "height"],
1036
+ additionalProperties: false
1037
+ };
1038
+ var TypeKeypoint = {
1039
+ type: "object",
1040
+ properties: {
1041
+ x: {
1042
+ type: "number",
1043
+ title: "X Coordinate",
1044
+ description: "X coordinate normalized to [0.0, 1.0]"
1045
+ },
1046
+ y: {
1047
+ type: "number",
1048
+ title: "Y Coordinate",
1049
+ description: "Y coordinate normalized to [0.0, 1.0]"
1050
+ },
1051
+ label: {
1052
+ type: "string",
1053
+ title: "Keypoint Label",
1054
+ description: "Label for the keypoint (e.g., 'leftEye', 'rightEye', 'noseTip', etc.)"
1055
+ }
1056
+ },
1057
+ required: ["x", "y"],
1058
+ additionalProperties: false
1059
+ };
1060
+ var TypeFaceDetection = {
1061
+ type: "object",
1062
+ properties: {
1063
+ box: TypeBoundingBox2,
1064
+ keypoints: {
1065
+ type: "array",
1066
+ items: TypeKeypoint,
1067
+ title: "Keypoints",
1068
+ description: "Facial keypoints (left eye, right eye, nose tip, mouth, left/right tragion)"
1069
+ },
1070
+ score: {
1071
+ type: "number",
1072
+ title: "Confidence Score",
1073
+ description: "Confidence score for the face detection"
1074
+ }
1075
+ },
1076
+ required: ["box", "keypoints", "score"],
1077
+ additionalProperties: false
1078
+ };
1079
+ var FaceDetectorInputSchema = {
1080
+ type: "object",
1081
+ properties: {
1082
+ image: TypeReplicateArray(TypeImageInput),
1083
+ model: modelSchema3,
1084
+ minDetectionConfidence: {
1085
+ type: "number",
1086
+ minimum: 0,
1087
+ maximum: 1,
1088
+ default: 0.5,
1089
+ title: "Min Detection Confidence",
1090
+ description: "Minimum confidence score for face detection",
1091
+ "x-ui-group": "Configuration"
1092
+ },
1093
+ minSuppressionThreshold: {
1094
+ type: "number",
1095
+ minimum: 0,
1096
+ maximum: 1,
1097
+ default: 0.3,
1098
+ title: "Min Suppression Threshold",
1099
+ description: "Minimum non-maximum-suppression threshold for overlapping detections",
1100
+ "x-ui-group": "Configuration"
1101
+ }
1102
+ },
1103
+ required: ["image", "model"],
1104
+ additionalProperties: false
1105
+ };
1106
+ var FaceDetectorOutputSchema = {
1107
+ type: "object",
1108
+ properties: {
1109
+ faces: {
1110
+ oneOf: [
1111
+ { type: "array", items: TypeFaceDetection },
1112
+ { type: "array", items: { type: "array", items: TypeFaceDetection } }
1113
+ ],
1114
+ title: "Face Detections",
1115
+ description: "Detected faces with bounding boxes, keypoints, and confidence scores"
1116
+ }
1117
+ },
1118
+ required: ["faces"],
1119
+ additionalProperties: false
1120
+ };
1121
+
1122
+ class FaceDetectorTask extends AiVisionTask {
1123
+ static type = "FaceDetectorTask";
1124
+ static category = "AI Vision Model";
1125
+ static title = "Face Detector";
1126
+ static description = "Detects faces in images. Locates faces and identifies facial keypoints like eyes, nose, and mouth.";
1127
+ static inputSchema() {
1128
+ return FaceDetectorInputSchema;
1129
+ }
1130
+ static outputSchema() {
1131
+ return FaceDetectorOutputSchema;
1132
+ }
1133
+ }
1134
+ TaskRegistry4.registerTask(FaceDetectorTask);
1135
+ var FaceDetector = (input, config) => {
1136
+ return new FaceDetectorTask(input, config).run();
1137
+ };
1138
+ Workflow4.prototype.FaceDetector = CreateWorkflow4(FaceDetectorTask);
1139
+ // src/task/FaceLandmarkerTask.ts
1140
+ import { CreateWorkflow as CreateWorkflow5, TaskRegistry as TaskRegistry5, Workflow as Workflow5 } from "@workglow/task-graph";
1141
+ var modelSchema4 = TypeReplicateArray(TypeModel("model:FaceLandmarkerTask"));
1142
+ var TypeLandmark = {
1143
+ type: "object",
1144
+ properties: {
1145
+ x: {
1146
+ type: "number",
1147
+ title: "X Coordinate",
1148
+ description: "X coordinate normalized to [0.0, 1.0]"
1149
+ },
1150
+ y: {
1151
+ type: "number",
1152
+ title: "Y Coordinate",
1153
+ description: "Y coordinate normalized to [0.0, 1.0]"
1154
+ },
1155
+ z: {
1156
+ type: "number",
1157
+ title: "Z Coordinate",
1158
+ description: "Z coordinate (depth)"
1159
+ }
1160
+ },
1161
+ required: ["x", "y", "z"],
1162
+ additionalProperties: false
1163
+ };
1164
+ var TypeBlendshape = {
1165
+ type: "object",
1166
+ properties: {
1167
+ label: {
1168
+ type: "string",
1169
+ title: "Blendshape Label",
1170
+ description: "Name of the blendshape (e.g., 'browDownLeft', 'eyeBlinkRight', etc.)"
1171
+ },
1172
+ score: {
1173
+ type: "number",
1174
+ title: "Coefficient Value",
1175
+ description: "Coefficient value for this blendshape"
1176
+ }
1177
+ },
1178
+ required: ["label", "score"],
1179
+ additionalProperties: false
1180
+ };
1181
+ var TypeTransformationMatrix = {
1182
+ type: "array",
1183
+ items: { type: "number" },
1184
+ minItems: 16,
1185
+ maxItems: 16,
1186
+ title: "Transformation Matrix",
1187
+ description: "4x4 transformation matrix for face effects rendering"
1188
+ };
1189
+ var TypeFaceLandmarkerDetection = {
1190
+ type: "object",
1191
+ properties: {
1192
+ landmarks: {
1193
+ type: "array",
1194
+ items: TypeLandmark,
1195
+ title: "Landmarks",
1196
+ description: "478 facial landmarks in image coordinates"
1197
+ },
1198
+ blendshapes: {
1199
+ type: "array",
1200
+ items: TypeBlendshape,
1201
+ title: "Blendshapes",
1202
+ description: "52 blendshape coefficients representing facial expressions"
1203
+ },
1204
+ transformationMatrix: TypeTransformationMatrix
1205
+ },
1206
+ required: ["landmarks"],
1207
+ additionalProperties: false
1208
+ };
1209
+ var FaceLandmarkerInputSchema = {
1210
+ type: "object",
1211
+ properties: {
1212
+ image: TypeReplicateArray(TypeImageInput),
1213
+ model: modelSchema4,
1214
+ numFaces: {
1215
+ type: "number",
1216
+ minimum: 1,
1217
+ maximum: 10,
1218
+ default: 1,
1219
+ title: "Number of Faces",
1220
+ description: "The maximum number of faces to detect",
1221
+ "x-ui-group": "Configuration"
1222
+ },
1223
+ minFaceDetectionConfidence: {
1224
+ type: "number",
1225
+ minimum: 0,
1226
+ maximum: 1,
1227
+ default: 0.5,
1228
+ title: "Min Face Detection Confidence",
1229
+ description: "Minimum confidence score for face detection",
1230
+ "x-ui-group": "Configuration"
1231
+ },
1232
+ minFacePresenceConfidence: {
1233
+ type: "number",
1234
+ minimum: 0,
1235
+ maximum: 1,
1236
+ default: 0.5,
1237
+ title: "Min Face Presence Confidence",
1238
+ description: "Minimum confidence score for face presence",
1239
+ "x-ui-group": "Configuration"
1240
+ },
1241
+ minTrackingConfidence: {
1242
+ type: "number",
1243
+ minimum: 0,
1244
+ maximum: 1,
1245
+ default: 0.5,
1246
+ title: "Min Tracking Confidence",
1247
+ description: "Minimum confidence score for face tracking",
1248
+ "x-ui-group": "Configuration"
1249
+ },
1250
+ outputFaceBlendshapes: {
1251
+ type: "boolean",
1252
+ default: false,
1253
+ title: "Output Face Blendshapes",
1254
+ description: "Whether to output blendshape coefficients for facial expressions",
1255
+ "x-ui-group": "Configuration"
1256
+ },
1257
+ outputFacialTransformationMatrixes: {
1258
+ type: "boolean",
1259
+ default: false,
1260
+ title: "Output Facial Transformation Matrix",
1261
+ description: "Whether to output transformation matrix for effects rendering",
1262
+ "x-ui-group": "Configuration"
1263
+ }
1264
+ },
1265
+ required: ["image", "model"],
1266
+ additionalProperties: false
1267
+ };
1268
+ var FaceLandmarkerOutputSchema = {
1269
+ type: "object",
1270
+ properties: {
1271
+ faces: {
1272
+ oneOf: [
1273
+ { type: "array", items: TypeFaceLandmarkerDetection },
1274
+ { type: "array", items: { type: "array", items: TypeFaceLandmarkerDetection } }
1275
+ ],
1276
+ title: "Face Detections",
1277
+ description: "Detected faces with landmarks, blendshapes, and transformation matrices"
1278
+ }
1279
+ },
1280
+ required: ["faces"],
1281
+ additionalProperties: false
1282
+ };
1283
+
1284
+ class FaceLandmarkerTask extends AiVisionTask {
1285
+ static type = "FaceLandmarkerTask";
1286
+ static category = "AI Vision Model";
1287
+ static title = "Face Landmarker";
1288
+ static description = "Detects facial landmarks and expressions in images. Identifies 478 facial landmarks, blendshapes for expressions, and transformation matrices for AR effects.";
1289
+ static inputSchema() {
1290
+ return FaceLandmarkerInputSchema;
1291
+ }
1292
+ static outputSchema() {
1293
+ return FaceLandmarkerOutputSchema;
1294
+ }
1295
+ }
1296
+ TaskRegistry5.registerTask(FaceLandmarkerTask);
1297
+ var FaceLandmarker = (input, config) => {
1298
+ return new FaceLandmarkerTask(input, config).run();
1299
+ };
1300
+ Workflow5.prototype.FaceLandmarker = CreateWorkflow5(FaceLandmarkerTask);
1301
+ // src/task/GestureRecognizerTask.ts
1302
+ import { CreateWorkflow as CreateWorkflow6, TaskRegistry as TaskRegistry6, Workflow as Workflow6 } from "@workglow/task-graph";
1303
+ var modelSchema5 = TypeReplicateArray(TypeModel("model:GestureRecognizerTask"));
1304
+ var TypeLandmark2 = {
1305
+ type: "object",
1306
+ properties: {
1307
+ x: {
1308
+ type: "number",
1309
+ title: "X Coordinate",
1310
+ description: "X coordinate normalized to [0.0, 1.0]"
1311
+ },
1312
+ y: {
1313
+ type: "number",
1314
+ title: "Y Coordinate",
1315
+ description: "Y coordinate normalized to [0.0, 1.0]"
1316
+ },
1317
+ z: {
1318
+ type: "number",
1319
+ title: "Z Coordinate",
1320
+ description: "Z coordinate (depth)"
1321
+ }
1322
+ },
1323
+ required: ["x", "y", "z"],
1324
+ additionalProperties: false
1325
+ };
1326
+ var TypeGesture = {
1327
+ type: "object",
1328
+ properties: {
1329
+ label: {
1330
+ type: "string",
1331
+ title: "Gesture Label",
1332
+ description: "The recognized gesture (e.g., 'Thumb_Up', 'Victory', etc.)"
1333
+ },
1334
+ score: {
1335
+ type: "number",
1336
+ title: "Confidence Score",
1337
+ description: "Confidence score for the gesture"
1338
+ }
1339
+ },
1340
+ required: ["label", "score"],
1341
+ additionalProperties: false
1342
+ };
1343
+ var TypeHandedness = {
1344
+ type: "object",
1345
+ properties: {
1346
+ label: {
1347
+ type: "string",
1348
+ title: "Hand Label",
1349
+ description: "Whether the hand is 'Left' or 'Right'"
1350
+ },
1351
+ score: {
1352
+ type: "number",
1353
+ title: "Confidence Score",
1354
+ description: "Confidence score for the handedness classification"
1355
+ }
1356
+ },
1357
+ required: ["label", "score"],
1358
+ additionalProperties: false
1359
+ };
1360
+ var TypeHandGestureDetection = {
1361
+ type: "object",
1362
+ properties: {
1363
+ gestures: {
1364
+ type: "array",
1365
+ items: TypeGesture,
1366
+ title: "Gestures",
1367
+ description: "Recognized gestures for this hand"
1368
+ },
1369
+ handedness: {
1370
+ type: "array",
1371
+ items: TypeHandedness,
1372
+ title: "Handedness",
1373
+ description: "Handedness classification (left/right)"
1374
+ },
1375
+ landmarks: {
1376
+ type: "array",
1377
+ items: TypeLandmark2,
1378
+ title: "Landmarks",
1379
+ description: "21 hand landmarks in image coordinates"
1380
+ },
1381
+ worldLandmarks: {
1382
+ type: "array",
1383
+ items: TypeLandmark2,
1384
+ title: "World Landmarks",
1385
+ description: "21 hand landmarks in 3D world coordinates (meters)"
1386
+ }
1387
+ },
1388
+ required: ["gestures", "handedness", "landmarks", "worldLandmarks"],
1389
+ additionalProperties: false
1390
+ };
1391
+ var GestureRecognizerInputSchema = {
1392
+ type: "object",
1393
+ properties: {
1394
+ image: TypeReplicateArray(TypeImageInput),
1395
+ model: modelSchema5,
1396
+ numHands: {
1397
+ type: "number",
1398
+ minimum: 1,
1399
+ maximum: 10,
1400
+ default: 1,
1401
+ title: "Number of Hands",
1402
+ description: "The maximum number of hands to detect",
1403
+ "x-ui-group": "Configuration"
1404
+ },
1405
+ minHandDetectionConfidence: {
1406
+ type: "number",
1407
+ minimum: 0,
1408
+ maximum: 1,
1409
+ default: 0.5,
1410
+ title: "Min Hand Detection Confidence",
1411
+ description: "Minimum confidence score for hand detection",
1412
+ "x-ui-group": "Configuration"
1413
+ },
1414
+ minHandPresenceConfidence: {
1415
+ type: "number",
1416
+ minimum: 0,
1417
+ maximum: 1,
1418
+ default: 0.5,
1419
+ title: "Min Hand Presence Confidence",
1420
+ description: "Minimum confidence score for hand presence",
1421
+ "x-ui-group": "Configuration"
1422
+ },
1423
+ minTrackingConfidence: {
1424
+ type: "number",
1425
+ minimum: 0,
1426
+ maximum: 1,
1427
+ default: 0.5,
1428
+ title: "Min Tracking Confidence",
1429
+ description: "Minimum confidence score for hand tracking",
1430
+ "x-ui-group": "Configuration"
1431
+ }
1432
+ },
1433
+ required: ["image", "model"],
1434
+ additionalProperties: false
1435
+ };
1436
+ var GestureRecognizerOutputSchema = {
1437
+ type: "object",
1438
+ properties: {
1439
+ hands: {
1440
+ oneOf: [
1441
+ { type: "array", items: TypeHandGestureDetection },
1442
+ { type: "array", items: { type: "array", items: TypeHandGestureDetection } }
1443
+ ],
1444
+ title: "Hand Detections",
1445
+ description: "Detected hands with gestures, handedness, and landmarks"
1446
+ }
1447
+ },
1448
+ required: ["hands"],
1449
+ additionalProperties: false
1450
+ };
1451
+
1452
+ class GestureRecognizerTask extends AiVisionTask {
1453
+ static type = "GestureRecognizerTask";
1454
+ static category = "AI Vision Model";
1455
+ static title = "Gesture Recognizer";
1456
+ static description = "Recognizes hand gestures in images. Detects hand landmarks, identifies gestures (thumbs up, victory, etc.), and classifies handedness.";
1457
+ static inputSchema() {
1458
+ return GestureRecognizerInputSchema;
1459
+ }
1460
+ static outputSchema() {
1461
+ return GestureRecognizerOutputSchema;
1462
+ }
1463
+ }
1464
+ TaskRegistry6.registerTask(GestureRecognizerTask);
1465
+ var GestureRecognizer = (input, config) => {
1466
+ return new GestureRecognizerTask(input, config).run();
1467
+ };
1468
+ Workflow6.prototype.GestureRecognizer = CreateWorkflow6(GestureRecognizerTask);
1469
+ // src/task/HandLandmarkerTask.ts
1470
+ import { CreateWorkflow as CreateWorkflow7, TaskRegistry as TaskRegistry7, Workflow as Workflow7 } from "@workglow/task-graph";
1471
+ var modelSchema6 = TypeReplicateArray(TypeModel("model:HandLandmarkerTask"));
1472
+ var TypeLandmark3 = {
1473
+ type: "object",
1474
+ properties: {
1475
+ x: {
1476
+ type: "number",
1477
+ title: "X Coordinate",
1478
+ description: "X coordinate normalized to [0.0, 1.0]"
1479
+ },
1480
+ y: {
1481
+ type: "number",
1482
+ title: "Y Coordinate",
1483
+ description: "Y coordinate normalized to [0.0, 1.0]"
1484
+ },
1485
+ z: {
1486
+ type: "number",
1487
+ title: "Z Coordinate",
1488
+ description: "Z coordinate (depth)"
1489
+ }
1490
+ },
1491
+ required: ["x", "y", "z"],
1492
+ additionalProperties: false
1493
+ };
1494
+ var TypeHandedness2 = {
1495
+ type: "object",
1496
+ properties: {
1497
+ label: {
1498
+ type: "string",
1499
+ title: "Hand Label",
1500
+ description: "Whether the hand is 'Left' or 'Right'"
1501
+ },
1502
+ score: {
1503
+ type: "number",
1504
+ title: "Confidence Score",
1505
+ description: "Confidence score for the handedness classification"
1506
+ }
1507
+ },
1508
+ required: ["label", "score"],
1509
+ additionalProperties: false
1510
+ };
1511
+ var TypeHandDetection = {
1512
+ type: "object",
1513
+ properties: {
1514
+ handedness: {
1515
+ type: "array",
1516
+ items: TypeHandedness2,
1517
+ title: "Handedness",
1518
+ description: "Handedness classification (left/right)"
1519
+ },
1520
+ landmarks: {
1521
+ type: "array",
1522
+ items: TypeLandmark3,
1523
+ title: "Landmarks",
1524
+ description: "21 hand landmarks in image coordinates"
1525
+ },
1526
+ worldLandmarks: {
1527
+ type: "array",
1528
+ items: TypeLandmark3,
1529
+ title: "World Landmarks",
1530
+ description: "21 hand landmarks in 3D world coordinates (meters)"
1531
+ }
1532
+ },
1533
+ required: ["handedness", "landmarks", "worldLandmarks"],
1534
+ additionalProperties: false
1535
+ };
1536
+ var HandLandmarkerInputSchema = {
1537
+ type: "object",
1538
+ properties: {
1539
+ image: TypeReplicateArray(TypeImageInput),
1540
+ model: modelSchema6,
1541
+ numHands: {
1542
+ type: "number",
1543
+ minimum: 1,
1544
+ maximum: 10,
1545
+ default: 1,
1546
+ title: "Number of Hands",
1547
+ description: "The maximum number of hands to detect",
1548
+ "x-ui-group": "Configuration"
1549
+ },
1550
+ minHandDetectionConfidence: {
1551
+ type: "number",
1552
+ minimum: 0,
1553
+ maximum: 1,
1554
+ default: 0.5,
1555
+ title: "Min Hand Detection Confidence",
1556
+ description: "Minimum confidence score for hand detection",
1557
+ "x-ui-group": "Configuration"
1558
+ },
1559
+ minHandPresenceConfidence: {
1560
+ type: "number",
1561
+ minimum: 0,
1562
+ maximum: 1,
1563
+ default: 0.5,
1564
+ title: "Min Hand Presence Confidence",
1565
+ description: "Minimum confidence score for hand presence",
1566
+ "x-ui-group": "Configuration"
1567
+ },
1568
+ minTrackingConfidence: {
1569
+ type: "number",
1570
+ minimum: 0,
1571
+ maximum: 1,
1572
+ default: 0.5,
1573
+ title: "Min Tracking Confidence",
1574
+ description: "Minimum confidence score for hand tracking",
1575
+ "x-ui-group": "Configuration"
1576
+ }
1577
+ },
1578
+ required: ["image", "model"],
1579
+ additionalProperties: false
1580
+ };
1581
+ var HandLandmarkerOutputSchema = {
1582
+ type: "object",
1583
+ properties: {
1584
+ hands: {
1585
+ oneOf: [
1586
+ { type: "array", items: TypeHandDetection },
1587
+ { type: "array", items: { type: "array", items: TypeHandDetection } }
1588
+ ],
1589
+ title: "Hand Detections",
1590
+ description: "Detected hands with handedness and landmarks"
1591
+ }
1592
+ },
1593
+ required: ["hands"],
1594
+ additionalProperties: false
1595
+ };
1596
+
1597
+ class HandLandmarkerTask extends AiVisionTask {
1598
+ static type = "HandLandmarkerTask";
1599
+ static category = "AI Vision Model";
1600
+ static title = "Hand Landmarker";
1601
+ static description = "Detects hand landmarks in images. Identifies 21 hand landmarks and classifies left vs. right hands.";
1602
+ static inputSchema() {
1603
+ return HandLandmarkerInputSchema;
1604
+ }
1605
+ static outputSchema() {
1606
+ return HandLandmarkerOutputSchema;
1607
+ }
1608
+ }
1609
+ TaskRegistry7.registerTask(HandLandmarkerTask);
1610
+ var HandLandmarker = (input, config) => {
1611
+ return new HandLandmarkerTask(input, config).run();
1612
+ };
1613
+ Workflow7.prototype.HandLandmarker = CreateWorkflow7(HandLandmarkerTask);
1614
+ // src/task/ImageClassificationTask.ts
1615
+ import { CreateWorkflow as CreateWorkflow8, TaskRegistry as TaskRegistry8, Workflow as Workflow8 } from "@workglow/task-graph";
1616
+ var modelSchema7 = TypeReplicateArray(TypeModel("model:ImageClassificationTask"));
1617
+ var ImageClassificationInputSchema = {
1618
+ type: "object",
1619
+ properties: {
1620
+ image: TypeReplicateArray(TypeImageInput),
1621
+ model: modelSchema7,
1622
+ categories: {
1623
+ type: "array",
1624
+ items: {
1625
+ type: "string"
1626
+ },
1627
+ title: "Categories",
1628
+ description: "List of candidate categories (optional, if provided uses zero-shot classification)",
1629
+ "x-ui-group": "Configuration"
1630
+ },
1631
+ maxCategories: {
1632
+ type: "number",
1633
+ minimum: 1,
1634
+ maximum: 1000,
1635
+ default: 5,
1636
+ title: "Max Categories",
1637
+ description: "The maximum number of categories to return",
1638
+ "x-ui-group": "Configuration"
1639
+ }
1640
+ },
1641
+ required: ["image", "model"],
1642
+ additionalProperties: false
1643
+ };
1644
+ var ImageClassificationOutputSchema = {
1645
+ type: "object",
1646
+ properties: {
1647
+ categories: {
1648
+ oneOf: [
1649
+ { type: "array", items: TypeCategory },
1650
+ { type: "array", items: { type: "array", items: TypeCategory } }
1651
+ ],
1652
+ title: "Categories",
1653
+ description: "The classification categories with their scores"
1654
+ }
1655
+ },
1656
+ required: ["categories"],
1657
+ additionalProperties: false
1658
+ };
1659
+
1660
+ class ImageClassificationTask extends AiVisionTask {
1661
+ static type = "ImageClassificationTask";
1662
+ static category = "AI Vision Model";
1663
+ static title = "Image Classification";
1664
+ static description = "Classifies images into categories using vision models. Supports zero-shot classification when categories are provided.";
1665
+ static inputSchema() {
1666
+ return ImageClassificationInputSchema;
1667
+ }
1668
+ static outputSchema() {
1669
+ return ImageClassificationOutputSchema;
1670
+ }
1671
+ }
1672
+ TaskRegistry8.registerTask(ImageClassificationTask);
1673
+ var ImageClassification = (input, config) => {
1674
+ return new ImageClassificationTask(input, config).run();
1675
+ };
1676
+ Workflow8.prototype.ImageClassification = CreateWorkflow8(ImageClassificationTask);
1677
+ // src/task/ImageEmbeddingTask.ts
1678
+ import { CreateWorkflow as CreateWorkflow9, TaskRegistry as TaskRegistry9, Workflow as Workflow9 } from "@workglow/task-graph";
1679
+ var modelSchema8 = TypeReplicateArray(TypeModel("model:ImageEmbeddingTask"));
1680
+ var embeddingSchema = TypedArraySchema({
1681
+ title: "Embedding",
1682
+ description: "The image embedding vector"
1683
+ });
1684
+ var ImageEmbeddingInputSchema = {
1685
+ type: "object",
1686
+ properties: {
1687
+ image: TypeReplicateArray(TypeImageInput),
1688
+ model: modelSchema8
1689
+ },
1690
+ required: ["image", "model"],
1691
+ additionalProperties: false
1692
+ };
1693
+ var ImageEmbeddingOutputSchema = {
1694
+ type: "object",
1695
+ properties: {
1696
+ vector: {
1697
+ oneOf: [embeddingSchema, { type: "array", items: embeddingSchema }],
1698
+ title: "Embedding",
1699
+ description: "The image embedding vector"
1700
+ }
1701
+ },
1702
+ required: ["vector"],
1703
+ additionalProperties: false
1704
+ };
1705
+
1706
+ class ImageEmbeddingTask extends AiVisionTask {
1707
+ static type = "ImageEmbeddingTask";
1708
+ static category = "AI Vision Model";
1709
+ static title = "Image Embedding";
1710
+ static description = "Generates embeddings from images using vision models";
1711
+ static inputSchema() {
1712
+ return ImageEmbeddingInputSchema;
1713
+ }
1714
+ static outputSchema() {
1715
+ return ImageEmbeddingOutputSchema;
1716
+ }
1717
+ }
1718
+ TaskRegistry9.registerTask(ImageEmbeddingTask);
1719
+ var ImageEmbedding = (input, config) => {
1720
+ return new ImageEmbeddingTask(input, config).run();
1721
+ };
1722
+ Workflow9.prototype.ImageEmbedding = CreateWorkflow9(ImageEmbeddingTask);
1723
+ // src/task/ImageSegmentationTask.ts
1724
+ import { CreateWorkflow as CreateWorkflow10, TaskRegistry as TaskRegistry10, Workflow as Workflow10 } from "@workglow/task-graph";
1725
+ var modelSchema9 = TypeReplicateArray(TypeModel("model:ImageSegmentationTask"));
1726
+ var ImageSegmentationInputSchema = {
704
1727
  type: "object",
705
1728
  properties: {
706
- parser: {
1729
+ image: TypeReplicateArray(TypeImageInput),
1730
+ model: modelSchema9,
1731
+ threshold: {
1732
+ type: "number",
1733
+ title: "Threshold",
1734
+ description: "The threshold for filtering masks by score",
1735
+ minimum: 0,
1736
+ maximum: 1,
1737
+ default: 0.5,
1738
+ "x-ui-group": "Configuration"
1739
+ },
1740
+ maskThreshold: {
1741
+ type: "number",
1742
+ title: "Mask Threshold",
1743
+ description: "Threshold to use when turning predicted masks into binary values",
1744
+ minimum: 0,
1745
+ maximum: 1,
1746
+ default: 0.5,
1747
+ "x-ui-group": "Configuration"
1748
+ }
1749
+ },
1750
+ required: ["image", "model"],
1751
+ additionalProperties: false
1752
+ };
1753
+ var segmentationMaskSchema = {
1754
+ type: "object",
1755
+ properties: {
1756
+ label: {
707
1757
  type: "string",
708
- enum: ["txt", "md"],
709
- title: "Document Kind",
710
- description: "The kind of document (txt or md)"
1758
+ title: "Label",
1759
+ description: "The label of the segmented region"
1760
+ },
1761
+ score: {
1762
+ type: "number",
1763
+ title: "Score",
1764
+ description: "The confidence score for this segmentation",
1765
+ minimum: 0,
1766
+ maximum: 1
1767
+ },
1768
+ mask: {
1769
+ type: "object",
1770
+ format: "image",
1771
+ title: "Mask",
1772
+ description: "Mask image"
711
1773
  }
712
1774
  },
713
- required: ["parser"],
1775
+ required: ["label", "score", "mask"],
714
1776
  additionalProperties: false
715
1777
  };
716
- var outputSchema = {
1778
+ var ImageSegmentationOutputSchema = {
717
1779
  type: "object",
718
1780
  properties: {
719
- texts: {
720
- type: "array",
721
- items: { type: "string" },
722
- title: "Text Chunks",
723
- description: "The text chunks of the document"
1781
+ masks: {
1782
+ oneOf: [
1783
+ { type: "array", items: segmentationMaskSchema },
1784
+ { type: "array", items: { type: "array", items: segmentationMaskSchema } }
1785
+ ],
1786
+ title: "Segmentation Masks",
1787
+ description: "The segmented regions with their labels, scores, and masks"
724
1788
  }
725
1789
  },
726
- required: ["texts"],
1790
+ required: ["masks"],
727
1791
  additionalProperties: false
728
1792
  };
729
1793
 
730
- class DocumentSplitterTask extends Task {
731
- static type = "DocumentSplitterTask";
732
- static category = "Document";
733
- static title = "Document Splitter";
734
- static description = "Splits documents into text chunks for processing";
1794
+ class ImageSegmentationTask extends AiVisionTask {
1795
+ static type = "ImageSegmentationTask";
1796
+ static category = "AI Vision Model";
1797
+ static title = "Image Segmentation";
1798
+ static description = "Segments images into regions with labels using computer vision models";
735
1799
  static inputSchema() {
736
- return inputSchema;
1800
+ return ImageSegmentationInputSchema;
737
1801
  }
738
1802
  static outputSchema() {
739
- return outputSchema;
1803
+ return ImageSegmentationOutputSchema;
740
1804
  }
741
- flattenFragmentsToTexts(item) {
742
- if (item instanceof Document) {
743
- const texts = [];
744
- item.fragments.forEach((fragment) => {
745
- texts.push(...this.flattenFragmentsToTexts(fragment));
746
- });
747
- return texts;
748
- } else {
749
- return [item.content];
1805
+ }
1806
+ TaskRegistry10.registerTask(ImageSegmentationTask);
1807
+ var ImageSegmentation = (input, config) => {
1808
+ return new ImageSegmentationTask(input, config).run();
1809
+ };
1810
+ Workflow10.prototype.ImageSegmentation = CreateWorkflow10(ImageSegmentationTask);
1811
+ // src/task/ImageToTextTask.ts
1812
+ import { CreateWorkflow as CreateWorkflow11, TaskRegistry as TaskRegistry11, Workflow as Workflow11 } from "@workglow/task-graph";
1813
+ var modelSchema10 = TypeReplicateArray(TypeModel("model:ImageToTextTask"));
1814
+ var generatedTextSchema = {
1815
+ type: "string",
1816
+ title: "Text",
1817
+ description: "The generated text description"
1818
+ };
1819
+ var ImageToTextInputSchema = {
1820
+ type: "object",
1821
+ properties: {
1822
+ image: TypeReplicateArray(TypeImageInput),
1823
+ model: modelSchema10,
1824
+ maxTokens: {
1825
+ type: "number",
1826
+ title: "Max Tokens",
1827
+ description: "The maximum number of tokens to generate",
1828
+ minimum: 1,
1829
+ maximum: 4096,
1830
+ "x-ui-group": "Configuration"
1831
+ }
1832
+ },
1833
+ required: ["image", "model"],
1834
+ additionalProperties: false
1835
+ };
1836
+ var ImageToTextOutputSchema = {
1837
+ type: "object",
1838
+ properties: {
1839
+ text: {
1840
+ oneOf: [generatedTextSchema, { type: "array", items: generatedTextSchema }],
1841
+ title: generatedTextSchema.title,
1842
+ description: generatedTextSchema.description
750
1843
  }
1844
+ },
1845
+ required: ["text"],
1846
+ additionalProperties: false
1847
+ };
1848
+
1849
+ class ImageToTextTask extends AiVisionTask {
1850
+ static type = "ImageToTextTask";
1851
+ static category = "AI Vision Model";
1852
+ static title = "Image to Text";
1853
+ static description = "Generates text descriptions from images using vision-language models";
1854
+ static inputSchema() {
1855
+ return ImageToTextInputSchema;
751
1856
  }
752
- async executeReactive() {
753
- return { texts: this.flattenFragmentsToTexts(this.runInputData.file) };
1857
+ static outputSchema() {
1858
+ return ImageToTextOutputSchema;
754
1859
  }
755
1860
  }
756
- TaskRegistry.registerTask(DocumentSplitterTask);
757
- var DocumentSplitter = (input) => {
758
- return new DocumentSplitterTask(input).run();
1861
+ TaskRegistry11.registerTask(ImageToTextTask);
1862
+ var ImageToText = (input, config) => {
1863
+ return new ImageToTextTask(input, config).run();
759
1864
  };
760
- Workflow.prototype.DocumentSplitter = CreateWorkflow(DocumentSplitterTask);
761
- // src/task/DownloadModelTask.ts
762
- import { CreateWorkflow as CreateWorkflow2, TaskRegistry as TaskRegistry2, Workflow as Workflow2 } from "@workglow/task-graph";
763
- var modelSchema = TypeReplicateArray(TypeModel("model"));
764
- var DownloadModelInputSchema = {
1865
+ Workflow11.prototype.ImageToText = CreateWorkflow11(ImageToTextTask);
1866
+ // src/task/ObjectDetectionTask.ts
1867
+ import { CreateWorkflow as CreateWorkflow12, TaskRegistry as TaskRegistry12, Workflow as Workflow12 } from "@workglow/task-graph";
1868
+ var modelSchema11 = TypeReplicateArray(TypeModel("model:ObjectDetectionTask"));
1869
+ var detectionSchema = {
765
1870
  type: "object",
766
1871
  properties: {
767
- model: modelSchema
1872
+ label: {
1873
+ type: "string",
1874
+ title: "Label",
1875
+ description: "The label of the detected object"
1876
+ },
1877
+ score: {
1878
+ type: "number",
1879
+ title: "Confidence Score",
1880
+ description: "The confidence score for this detection",
1881
+ minimum: 0,
1882
+ maximum: 1
1883
+ },
1884
+ box: TypeBoundingBox
768
1885
  },
769
- required: ["model"],
1886
+ required: ["label", "score", "box"],
770
1887
  additionalProperties: false
771
1888
  };
772
- var DownloadModelOutputSchema = {
1889
+ var ObjectDetectionInputSchema = {
773
1890
  type: "object",
774
1891
  properties: {
775
- model: modelSchema
1892
+ image: TypeReplicateArray(TypeImageInput),
1893
+ model: modelSchema11,
1894
+ labels: {
1895
+ type: "array",
1896
+ items: {
1897
+ type: "string"
1898
+ },
1899
+ title: "Labels",
1900
+ description: "List of object labels to detect (optional, if provided uses zero-shot detection)",
1901
+ "x-ui-group": "Configuration"
1902
+ },
1903
+ threshold: {
1904
+ type: "number",
1905
+ title: "Threshold",
1906
+ description: "The threshold for filtering detections by score",
1907
+ minimum: 0,
1908
+ maximum: 1,
1909
+ default: 0.5,
1910
+ "x-ui-group": "Configuration"
1911
+ }
776
1912
  },
777
- required: ["model"],
1913
+ required: ["image", "model"],
1914
+ additionalProperties: false
1915
+ };
1916
+ var ObjectDetectionOutputSchema = {
1917
+ type: "object",
1918
+ properties: {
1919
+ detections: {
1920
+ oneOf: [
1921
+ { type: "array", items: detectionSchema },
1922
+ { type: "array", items: { type: "array", items: detectionSchema } }
1923
+ ],
1924
+ title: "Detections",
1925
+ description: "The detected objects with their labels, scores, and bounding boxes"
1926
+ }
1927
+ },
1928
+ required: ["detections"],
778
1929
  additionalProperties: false
779
1930
  };
780
1931
 
781
- class DownloadModelTask extends AiTask {
782
- static type = "DownloadModelTask";
783
- static category = "AI Text Model";
784
- static title = "Download Model";
785
- static description = "Downloads and caches AI models locally with progress tracking";
1932
+ class ObjectDetectionTask extends AiVisionTask {
1933
+ static type = "ObjectDetectionTask";
1934
+ static category = "AI Vision Model";
1935
+ static title = "Object Detection";
1936
+ static description = "Detects objects in images using vision models. Supports zero-shot detection when labels are provided.";
786
1937
  static inputSchema() {
787
- return DownloadModelInputSchema;
1938
+ return ObjectDetectionInputSchema;
788
1939
  }
789
1940
  static outputSchema() {
790
- return DownloadModelOutputSchema;
791
- }
792
- static cacheable = false;
793
- files = [];
794
- constructor(input, config = {}) {
795
- super(input, config);
796
- this.on("progress", this.processProgress.bind(this));
797
- this.on("start", () => {
798
- this.files = [];
799
- });
1941
+ return ObjectDetectionOutputSchema;
800
1942
  }
801
- processProgress(progress, message = "", details) {
802
- if (details?.file) {
803
- const file = this.files.find((f) => f.file === details.file);
804
- if (file) {
805
- file.progress = details.progress;
806
- } else {
807
- this.files.push({ file: details.file, progress: details.progress });
808
- }
809
- this.progress = this.files.reduce((acc, f) => acc + f.progress, 0) / this.files.length;
810
- } else {
811
- this.progress = progress;
1943
+ }
1944
+ TaskRegistry12.registerTask(ObjectDetectionTask);
1945
+ var ObjectDetection = (input, config) => {
1946
+ return new ObjectDetectionTask(input, config).run();
1947
+ };
1948
+ Workflow12.prototype.ObjectDetection = CreateWorkflow12(ObjectDetectionTask);
1949
+ // src/task/PoseLandmarkerTask.ts
1950
+ import { CreateWorkflow as CreateWorkflow13, TaskRegistry as TaskRegistry13, Workflow as Workflow13 } from "@workglow/task-graph";
1951
+ var modelSchema12 = TypeReplicateArray(TypeModel("model:PoseLandmarkerTask"));
1952
+ var TypePoseLandmark = {
1953
+ type: "object",
1954
+ properties: {
1955
+ x: {
1956
+ type: "number",
1957
+ title: "X Coordinate",
1958
+ description: "X coordinate normalized to [0.0, 1.0]"
1959
+ },
1960
+ y: {
1961
+ type: "number",
1962
+ title: "Y Coordinate",
1963
+ description: "Y coordinate normalized to [0.0, 1.0]"
1964
+ },
1965
+ z: {
1966
+ type: "number",
1967
+ title: "Z Coordinate",
1968
+ description: "Z coordinate (depth)"
1969
+ },
1970
+ visibility: {
1971
+ type: "number",
1972
+ title: "Visibility",
1973
+ description: "Likelihood of the landmark being visible within the image"
1974
+ },
1975
+ presence: {
1976
+ type: "number",
1977
+ title: "Presence",
1978
+ description: "Likelihood of the landmark being present in the image"
1979
+ }
1980
+ },
1981
+ required: ["x", "y", "z"],
1982
+ additionalProperties: false
1983
+ };
1984
+ var TypeSegmentationMask = {
1985
+ type: "object",
1986
+ properties: {
1987
+ data: {
1988
+ type: "object",
1989
+ title: "Mask Data",
1990
+ description: "Canvas or image data containing the segmentation mask"
1991
+ },
1992
+ width: {
1993
+ type: "number",
1994
+ title: "Width",
1995
+ description: "Width of the segmentation mask"
1996
+ },
1997
+ height: {
1998
+ type: "number",
1999
+ title: "Height",
2000
+ description: "Height of the segmentation mask"
2001
+ }
2002
+ },
2003
+ required: ["data", "width", "height"],
2004
+ additionalProperties: false
2005
+ };
2006
+ var TypePoseDetection = {
2007
+ type: "object",
2008
+ properties: {
2009
+ landmarks: {
2010
+ type: "array",
2011
+ items: TypePoseLandmark,
2012
+ title: "Landmarks",
2013
+ description: "33 pose landmarks in image coordinates"
2014
+ },
2015
+ worldLandmarks: {
2016
+ type: "array",
2017
+ items: TypePoseLandmark,
2018
+ title: "World Landmarks",
2019
+ description: "33 pose landmarks in 3D world coordinates (meters)"
2020
+ },
2021
+ segmentationMask: TypeSegmentationMask
2022
+ },
2023
+ required: ["landmarks", "worldLandmarks"],
2024
+ additionalProperties: false
2025
+ };
2026
+ var PoseLandmarkerInputSchema = {
2027
+ type: "object",
2028
+ properties: {
2029
+ image: TypeReplicateArray(TypeImageInput),
2030
+ model: modelSchema12,
2031
+ numPoses: {
2032
+ type: "number",
2033
+ minimum: 1,
2034
+ maximum: 10,
2035
+ default: 1,
2036
+ title: "Number of Poses",
2037
+ description: "The maximum number of poses to detect",
2038
+ "x-ui-group": "Configuration"
2039
+ },
2040
+ minPoseDetectionConfidence: {
2041
+ type: "number",
2042
+ minimum: 0,
2043
+ maximum: 1,
2044
+ default: 0.5,
2045
+ title: "Min Pose Detection Confidence",
2046
+ description: "Minimum confidence score for pose detection",
2047
+ "x-ui-group": "Configuration"
2048
+ },
2049
+ minPosePresenceConfidence: {
2050
+ type: "number",
2051
+ minimum: 0,
2052
+ maximum: 1,
2053
+ default: 0.5,
2054
+ title: "Min Pose Presence Confidence",
2055
+ description: "Minimum confidence score for pose presence",
2056
+ "x-ui-group": "Configuration"
2057
+ },
2058
+ minTrackingConfidence: {
2059
+ type: "number",
2060
+ minimum: 0,
2061
+ maximum: 1,
2062
+ default: 0.5,
2063
+ title: "Min Tracking Confidence",
2064
+ description: "Minimum confidence score for pose tracking",
2065
+ "x-ui-group": "Configuration"
2066
+ },
2067
+ outputSegmentationMasks: {
2068
+ type: "boolean",
2069
+ default: false,
2070
+ title: "Output Segmentation Masks",
2071
+ description: "Whether to output segmentation masks for detected poses",
2072
+ "x-ui-group": "Configuration"
812
2073
  }
2074
+ },
2075
+ required: ["image", "model"],
2076
+ additionalProperties: false
2077
+ };
2078
+ var PoseLandmarkerOutputSchema = {
2079
+ type: "object",
2080
+ properties: {
2081
+ poses: {
2082
+ oneOf: [
2083
+ { type: "array", items: TypePoseDetection },
2084
+ { type: "array", items: { type: "array", items: TypePoseDetection } }
2085
+ ],
2086
+ title: "Pose Detections",
2087
+ description: "Detected poses with landmarks and optional segmentation masks"
2088
+ }
2089
+ },
2090
+ required: ["poses"],
2091
+ additionalProperties: false
2092
+ };
2093
+
2094
+ class PoseLandmarkerTask extends AiVisionTask {
2095
+ static type = "PoseLandmarkerTask";
2096
+ static category = "AI Vision Model";
2097
+ static title = "Pose Landmarker";
2098
+ static description = "Detects pose landmarks in images. Identifies 33 body landmarks for pose estimation and optional segmentation.";
2099
+ static inputSchema() {
2100
+ return PoseLandmarkerInputSchema;
2101
+ }
2102
+ static outputSchema() {
2103
+ return PoseLandmarkerOutputSchema;
813
2104
  }
814
2105
  }
815
- TaskRegistry2.registerTask(DownloadModelTask);
816
- var DownloadModel = (input, config) => {
817
- return new DownloadModelTask(input, config).run();
2106
+ TaskRegistry13.registerTask(PoseLandmarkerTask);
2107
+ var PoseLandmarker = (input, config) => {
2108
+ return new PoseLandmarkerTask(input, config).run();
818
2109
  };
819
- Workflow2.prototype.DownloadModel = CreateWorkflow2(DownloadModelTask);
820
- // src/task/TextClassifierTask.ts
821
- import { CreateWorkflow as CreateWorkflow3, TaskRegistry as TaskRegistry3, Workflow as Workflow3 } from "@workglow/task-graph";
822
- var modelSchema2 = TypeReplicateArray(TypeModel("model:TextClassifierTask"));
823
- var TextClassifierInputSchema = {
2110
+ Workflow13.prototype.PoseLandmarker = CreateWorkflow13(PoseLandmarkerTask);
2111
+ // src/task/TextClassificationTask.ts
2112
+ import { CreateWorkflow as CreateWorkflow14, TaskRegistry as TaskRegistry14, Workflow as Workflow14 } from "@workglow/task-graph";
2113
+ var modelSchema13 = TypeReplicateArray(TypeModel("model:TextClassificationTask"));
2114
+ var TextClassificationInputSchema = {
824
2115
  type: "object",
825
2116
  properties: {
826
2117
  text: TypeReplicateArray({
@@ -828,20 +2119,30 @@ var TextClassifierInputSchema = {
828
2119
  title: "Text",
829
2120
  description: "The text to classify"
830
2121
  }),
2122
+ candidateLabels: {
2123
+ type: "array",
2124
+ items: {
2125
+ type: "string"
2126
+ },
2127
+ title: "Candidate Labels",
2128
+ description: "List of candidate labels (optional, if provided uses zero-shot classification)",
2129
+ "x-ui-group": "Configuration"
2130
+ },
831
2131
  maxCategories: {
832
2132
  type: "number",
833
2133
  minimum: 1,
834
2134
  maximum: 1000,
835
2135
  default: 5,
836
2136
  title: "Max Categories",
837
- description: "The maximum number of categories to return"
2137
+ description: "The maximum number of categories to return",
2138
+ "x-ui-group": "Configuration"
838
2139
  },
839
- model: modelSchema2
2140
+ model: modelSchema13
840
2141
  },
841
2142
  required: ["text", "model"],
842
2143
  additionalProperties: false
843
2144
  };
844
- var TextClassifierOutputSchema = {
2145
+ var TextClassificationOutputSchema = {
845
2146
  type: "object",
846
2147
  properties: {
847
2148
  categories: {
@@ -871,26 +2172,26 @@ var TextClassifierOutputSchema = {
871
2172
  additionalProperties: false
872
2173
  };
873
2174
 
874
- class TextClassifierTask extends AiTask {
875
- static type = "TextClassifierTask";
2175
+ class TextClassificationTask extends AiTask {
2176
+ static type = "TextClassificationTask";
876
2177
  static category = "AI Text Model";
877
2178
  static title = "Text Classifier";
878
- static description = "Classifies text into predefined categories using language models";
2179
+ static description = "Classifies text into categories using language models. Supports zero-shot classification when candidate labels are provided.";
879
2180
  static inputSchema() {
880
- return TextClassifierInputSchema;
2181
+ return TextClassificationInputSchema;
881
2182
  }
882
2183
  static outputSchema() {
883
- return TextClassifierOutputSchema;
2184
+ return TextClassificationOutputSchema;
884
2185
  }
885
2186
  }
886
- TaskRegistry3.registerTask(TextClassifierTask);
887
- var TextClassifier = (input, config) => {
888
- return new TextClassifierTask(input, config).run();
2187
+ TaskRegistry14.registerTask(TextClassificationTask);
2188
+ var TextClassification = (input, config) => {
2189
+ return new TextClassificationTask(input, config).run();
889
2190
  };
890
- Workflow3.prototype.TextClassifier = CreateWorkflow3(TextClassifierTask);
2191
+ Workflow14.prototype.TextClassification = CreateWorkflow14(TextClassificationTask);
891
2192
  // src/task/TextEmbeddingTask.ts
892
- import { CreateWorkflow as CreateWorkflow4, TaskRegistry as TaskRegistry4, Workflow as Workflow4 } from "@workglow/task-graph";
893
- var modelSchema3 = TypeReplicateArray(TypeModel("model:TextEmbeddingTask"));
2193
+ import { CreateWorkflow as CreateWorkflow15, TaskRegistry as TaskRegistry15, Workflow as Workflow15 } from "@workglow/task-graph";
2194
+ var modelSchema14 = TypeReplicateArray(TypeModel("model:TextEmbeddingTask"));
894
2195
  var TextEmbeddingInputSchema = {
895
2196
  type: "object",
896
2197
  properties: {
@@ -899,7 +2200,7 @@ var TextEmbeddingInputSchema = {
899
2200
  title: "Text",
900
2201
  description: "The text to embed"
901
2202
  }),
902
- model: modelSchema3
2203
+ model: modelSchema14
903
2204
  },
904
2205
  required: ["text", "model"],
905
2206
  additionalProperties: false
@@ -928,14 +2229,14 @@ class TextEmbeddingTask extends AiTask {
928
2229
  return TextEmbeddingOutputSchema;
929
2230
  }
930
2231
  }
931
- TaskRegistry4.registerTask(TextEmbeddingTask);
2232
+ TaskRegistry15.registerTask(TextEmbeddingTask);
932
2233
  var TextEmbedding = async (input, config) => {
933
2234
  return new TextEmbeddingTask(input, config).run();
934
2235
  };
935
- Workflow4.prototype.TextEmbedding = CreateWorkflow4(TextEmbeddingTask);
2236
+ Workflow15.prototype.TextEmbedding = CreateWorkflow15(TextEmbeddingTask);
936
2237
  // src/task/TextFillMaskTask.ts
937
- import { CreateWorkflow as CreateWorkflow5, TaskRegistry as TaskRegistry5, Workflow as Workflow5 } from "@workglow/task-graph";
938
- var modelSchema4 = TypeReplicateArray(TypeModel("model:TextFillMaskTask"));
2238
+ import { CreateWorkflow as CreateWorkflow16, TaskRegistry as TaskRegistry16, Workflow as Workflow16 } from "@workglow/task-graph";
2239
+ var modelSchema15 = TypeReplicateArray(TypeModel("model:TextFillMaskTask"));
939
2240
  var TextFillMaskInputSchema = {
940
2241
  type: "object",
941
2242
  properties: {
@@ -944,7 +2245,7 @@ var TextFillMaskInputSchema = {
944
2245
  title: "Text",
945
2246
  description: "The text with a mask token to fill"
946
2247
  }),
947
- model: modelSchema4
2248
+ model: modelSchema15
948
2249
  },
949
2250
  required: ["text", "model"],
950
2251
  additionalProperties: false
@@ -987,8 +2288,8 @@ var TextFillMaskOutputSchema = {
987
2288
  class TextFillMaskTask extends AiTask {
988
2289
  static type = "TextFillMaskTask";
989
2290
  static category = "AI Text Model";
990
- static title = "Text Fill Mask";
991
- static description = "Fills masked tokens in text using language models";
2291
+ static title = "Fill Mask";
2292
+ static description = "Fills masked tokens in text";
992
2293
  static inputSchema() {
993
2294
  return TextFillMaskInputSchema;
994
2295
  }
@@ -996,23 +2297,23 @@ class TextFillMaskTask extends AiTask {
996
2297
  return TextFillMaskOutputSchema;
997
2298
  }
998
2299
  }
999
- TaskRegistry5.registerTask(TextFillMaskTask);
2300
+ TaskRegistry16.registerTask(TextFillMaskTask);
1000
2301
  var TextFillMask = (input, config) => {
1001
2302
  return new TextFillMaskTask(input, config).run();
1002
2303
  };
1003
- Workflow5.prototype.TextFillMask = CreateWorkflow5(TextFillMaskTask);
2304
+ Workflow16.prototype.TextFillMask = CreateWorkflow16(TextFillMaskTask);
1004
2305
  // src/task/TextGenerationTask.ts
1005
- import { CreateWorkflow as CreateWorkflow6, TaskRegistry as TaskRegistry6, Workflow as Workflow6 } from "@workglow/task-graph";
1006
- var generatedTextSchema = {
2306
+ import { CreateWorkflow as CreateWorkflow17, TaskRegistry as TaskRegistry17, Workflow as Workflow17 } from "@workglow/task-graph";
2307
+ var generatedTextSchema2 = {
1007
2308
  type: "string",
1008
2309
  title: "Text",
1009
2310
  description: "The generated text"
1010
2311
  };
1011
- var modelSchema5 = TypeReplicateArray(TypeModel("model:TextGenerationTask"));
2312
+ var modelSchema16 = TypeReplicateArray(TypeModel("model:TextGenerationTask"));
1012
2313
  var TextGenerationInputSchema = {
1013
2314
  type: "object",
1014
2315
  properties: {
1015
- model: modelSchema5,
2316
+ model: modelSchema16,
1016
2317
  prompt: TypeReplicateArray({
1017
2318
  type: "string",
1018
2319
  title: "Prompt",
@@ -1066,9 +2367,9 @@ var TextGenerationOutputSchema = {
1066
2367
  type: "object",
1067
2368
  properties: {
1068
2369
  text: {
1069
- oneOf: [generatedTextSchema, { type: "array", items: generatedTextSchema }],
1070
- title: generatedTextSchema.title,
1071
- description: generatedTextSchema.description
2370
+ oneOf: [generatedTextSchema2, { type: "array", items: generatedTextSchema2 }],
2371
+ title: generatedTextSchema2.title,
2372
+ description: generatedTextSchema2.description
1072
2373
  }
1073
2374
  },
1074
2375
  required: ["text"],
@@ -1087,14 +2388,14 @@ class TextGenerationTask extends AiTask {
1087
2388
  return TextGenerationOutputSchema;
1088
2389
  }
1089
2390
  }
1090
- TaskRegistry6.registerTask(TextGenerationTask);
2391
+ TaskRegistry17.registerTask(TextGenerationTask);
1091
2392
  var TextGeneration = (input, config) => {
1092
2393
  return new TextGenerationTask(input, config).run();
1093
2394
  };
1094
- Workflow6.prototype.TextGeneration = CreateWorkflow6(TextGenerationTask);
2395
+ Workflow17.prototype.TextGeneration = CreateWorkflow17(TextGenerationTask);
1095
2396
  // src/task/TextLanguageDetectionTask.ts
1096
- import { CreateWorkflow as CreateWorkflow7, TaskRegistry as TaskRegistry7, Workflow as Workflow7 } from "@workglow/task-graph";
1097
- var modelSchema6 = TypeReplicateArray(TypeModel("model:TextLanguageDetectionTask"));
2397
+ import { CreateWorkflow as CreateWorkflow18, TaskRegistry as TaskRegistry18, Workflow as Workflow18 } from "@workglow/task-graph";
2398
+ var modelSchema17 = TypeReplicateArray(TypeModel("model:TextLanguageDetectionTask"));
1098
2399
  var TextLanguageDetectionInputSchema = {
1099
2400
  type: "object",
1100
2401
  properties: {
@@ -1111,7 +2412,7 @@ var TextLanguageDetectionInputSchema = {
1111
2412
  title: "Max Languages",
1112
2413
  description: "The maximum number of languages to return"
1113
2414
  },
1114
- model: modelSchema6
2415
+ model: modelSchema17
1115
2416
  },
1116
2417
  required: ["text", "model"],
1117
2418
  additionalProperties: false
@@ -1158,14 +2459,14 @@ class TextLanguageDetectionTask extends AiTask {
1158
2459
  return TextLanguageDetectionOutputSchema;
1159
2460
  }
1160
2461
  }
1161
- TaskRegistry7.registerTask(TextLanguageDetectionTask);
2462
+ TaskRegistry18.registerTask(TextLanguageDetectionTask);
1162
2463
  var TextLanguageDetection = (input, config) => {
1163
2464
  return new TextLanguageDetectionTask(input, config).run();
1164
2465
  };
1165
- Workflow7.prototype.TextLanguageDetection = CreateWorkflow7(TextLanguageDetectionTask);
2466
+ Workflow18.prototype.TextLanguageDetection = CreateWorkflow18(TextLanguageDetectionTask);
1166
2467
  // src/task/TextNamedEntityRecognitionTask.ts
1167
- import { CreateWorkflow as CreateWorkflow8, TaskRegistry as TaskRegistry8, Workflow as Workflow8 } from "@workglow/task-graph";
1168
- var modelSchema7 = TypeReplicateArray(TypeModel("model:NamedEntityRecognitionTask"));
2468
+ import { CreateWorkflow as CreateWorkflow19, TaskRegistry as TaskRegistry19, Workflow as Workflow19 } from "@workglow/task-graph";
2469
+ var modelSchema18 = TypeReplicateArray(TypeModel("model:NamedEntityRecognitionTask"));
1169
2470
  var TextNamedEntityRecognitionInputSchema = {
1170
2471
  type: "object",
1171
2472
  properties: {
@@ -1184,7 +2485,7 @@ var TextNamedEntityRecognitionInputSchema = {
1184
2485
  "x-ui-group": "Configuration",
1185
2486
  "x-ui-group-open": false
1186
2487
  },
1187
- model: modelSchema7
2488
+ model: modelSchema18
1188
2489
  },
1189
2490
  required: ["text", "model"],
1190
2491
  additionalProperties: false
@@ -1227,8 +2528,8 @@ var TextNamedEntityRecognitionOutputSchema = {
1227
2528
  class TextNamedEntityRecognitionTask extends AiTask {
1228
2529
  static type = "TextNamedEntityRecognitionTask";
1229
2530
  static category = "AI Text Model";
1230
- static title = "Text Named Entity Recognition";
1231
- static description = "Extracts named entities from text using language models";
2531
+ static title = "Named Entity Recognition";
2532
+ static description = "Extracts named entities from text";
1232
2533
  static inputSchema() {
1233
2534
  return TextNamedEntityRecognitionInputSchema;
1234
2535
  }
@@ -1236,13 +2537,13 @@ class TextNamedEntityRecognitionTask extends AiTask {
1236
2537
  return TextNamedEntityRecognitionOutputSchema;
1237
2538
  }
1238
2539
  }
1239
- TaskRegistry8.registerTask(TextNamedEntityRecognitionTask);
2540
+ TaskRegistry19.registerTask(TextNamedEntityRecognitionTask);
1240
2541
  var TextNamedEntityRecognition = (input, config) => {
1241
2542
  return new TextNamedEntityRecognitionTask(input, config).run();
1242
2543
  };
1243
- Workflow8.prototype.TextNamedEntityRecognition = CreateWorkflow8(TextNamedEntityRecognitionTask);
2544
+ Workflow19.prototype.TextNamedEntityRecognition = CreateWorkflow19(TextNamedEntityRecognitionTask);
1244
2545
  // src/task/TextQuestionAnswerTask.ts
1245
- import { CreateWorkflow as CreateWorkflow9, TaskRegistry as TaskRegistry9, Workflow as Workflow9 } from "@workglow/task-graph";
2546
+ import { CreateWorkflow as CreateWorkflow20, TaskRegistry as TaskRegistry20, Workflow as Workflow20 } from "@workglow/task-graph";
1246
2547
  var contextSchema = {
1247
2548
  type: "string",
1248
2549
  title: "Context",
@@ -1258,13 +2559,13 @@ var textSchema = {
1258
2559
  title: "Text",
1259
2560
  description: "The generated text"
1260
2561
  };
1261
- var modelSchema8 = TypeReplicateArray(TypeModel("model:TextQuestionAnswerTask"));
2562
+ var modelSchema19 = TypeReplicateArray(TypeModel("model:TextQuestionAnswerTask"));
1262
2563
  var TextQuestionAnswerInputSchema = {
1263
2564
  type: "object",
1264
2565
  properties: {
1265
2566
  context: TypeReplicateArray(contextSchema),
1266
2567
  question: TypeReplicateArray(questionSchema),
1267
- model: modelSchema8
2568
+ model: modelSchema19
1268
2569
  },
1269
2570
  required: ["context", "question", "model"],
1270
2571
  additionalProperties: false
@@ -1294,14 +2595,14 @@ class TextQuestionAnswerTask extends AiTask {
1294
2595
  return TextQuestionAnswerOutputSchema;
1295
2596
  }
1296
2597
  }
1297
- TaskRegistry9.registerTask(TextQuestionAnswerTask);
2598
+ TaskRegistry20.registerTask(TextQuestionAnswerTask);
1298
2599
  var TextQuestionAnswer = (input, config) => {
1299
2600
  return new TextQuestionAnswerTask(input, config).run();
1300
2601
  };
1301
- Workflow9.prototype.TextQuestionAnswer = CreateWorkflow9(TextQuestionAnswerTask);
2602
+ Workflow20.prototype.TextQuestionAnswer = CreateWorkflow20(TextQuestionAnswerTask);
1302
2603
  // src/task/TextRewriterTask.ts
1303
- import { CreateWorkflow as CreateWorkflow10, TaskRegistry as TaskRegistry10, Workflow as Workflow10 } from "@workglow/task-graph";
1304
- var modelSchema9 = TypeReplicateArray(TypeModel("model:TextRewriterTask"));
2604
+ import { CreateWorkflow as CreateWorkflow21, TaskRegistry as TaskRegistry21, Workflow as Workflow21 } from "@workglow/task-graph";
2605
+ var modelSchema20 = TypeReplicateArray(TypeModel("model:TextRewriterTask"));
1305
2606
  var TextRewriterInputSchema = {
1306
2607
  type: "object",
1307
2608
  properties: {
@@ -1315,7 +2616,7 @@ var TextRewriterInputSchema = {
1315
2616
  title: "Prompt",
1316
2617
  description: "The prompt to direct the rewriting"
1317
2618
  }),
1318
- model: modelSchema9
2619
+ model: modelSchema20
1319
2620
  },
1320
2621
  required: ["text", "prompt", "model"],
1321
2622
  additionalProperties: false
@@ -1345,14 +2646,14 @@ class TextRewriterTask extends AiTask {
1345
2646
  return TextRewriterOutputSchema;
1346
2647
  }
1347
2648
  }
1348
- TaskRegistry10.registerTask(TextRewriterTask);
2649
+ TaskRegistry21.registerTask(TextRewriterTask);
1349
2650
  var TextRewriter = (input, config) => {
1350
2651
  return new TextRewriterTask(input, config).run();
1351
2652
  };
1352
- Workflow10.prototype.TextRewriter = CreateWorkflow10(TextRewriterTask);
2653
+ Workflow21.prototype.TextRewriter = CreateWorkflow21(TextRewriterTask);
1353
2654
  // src/task/TextSummaryTask.ts
1354
- import { CreateWorkflow as CreateWorkflow11, TaskRegistry as TaskRegistry11, Workflow as Workflow11 } from "@workglow/task-graph";
1355
- var modelSchema10 = TypeReplicateArray(TypeModel("model:TextSummaryTask"));
2655
+ import { CreateWorkflow as CreateWorkflow22, TaskRegistry as TaskRegistry22, Workflow as Workflow22 } from "@workglow/task-graph";
2656
+ var modelSchema21 = TypeReplicateArray(TypeModel("model:TextSummaryTask"));
1356
2657
  var TextSummaryInputSchema = {
1357
2658
  type: "object",
1358
2659
  properties: {
@@ -1361,7 +2662,7 @@ var TextSummaryInputSchema = {
1361
2662
  title: "Text",
1362
2663
  description: "The text to summarize"
1363
2664
  }),
1364
- model: modelSchema10
2665
+ model: modelSchema21
1365
2666
  },
1366
2667
  required: ["text", "model"],
1367
2668
  additionalProperties: false
@@ -1391,14 +2692,14 @@ class TextSummaryTask extends AiTask {
1391
2692
  return TextSummaryOutputSchema;
1392
2693
  }
1393
2694
  }
1394
- TaskRegistry11.registerTask(TextSummaryTask);
2695
+ TaskRegistry22.registerTask(TextSummaryTask);
1395
2696
  var TextSummary = async (input, config) => {
1396
2697
  return new TextSummaryTask(input, config).run();
1397
2698
  };
1398
- Workflow11.prototype.TextSummary = CreateWorkflow11(TextSummaryTask);
2699
+ Workflow22.prototype.TextSummary = CreateWorkflow22(TextSummaryTask);
1399
2700
  // src/task/TextTranslationTask.ts
1400
- import { CreateWorkflow as CreateWorkflow12, TaskRegistry as TaskRegistry12, Workflow as Workflow12 } from "@workglow/task-graph";
1401
- var modelSchema11 = TypeReplicateArray(TypeModel("model:TextTranslationTask"));
2701
+ import { CreateWorkflow as CreateWorkflow23, TaskRegistry as TaskRegistry23, Workflow as Workflow23 } from "@workglow/task-graph";
2702
+ var modelSchema22 = TypeReplicateArray(TypeModel("model:TextTranslationTask"));
1402
2703
  var translationTextSchema = {
1403
2704
  type: "string",
1404
2705
  title: "Text",
@@ -1424,7 +2725,7 @@ var TextTranslationInputSchema = {
1424
2725
  minLength: 2,
1425
2726
  maxLength: 2
1426
2727
  })),
1427
- model: modelSchema11
2728
+ model: modelSchema22
1428
2729
  },
1429
2730
  required: ["text", "source_lang", "target_lang", "model"],
1430
2731
  additionalProperties: false
@@ -1460,18 +2761,18 @@ class TextTranslationTask extends AiTask {
1460
2761
  return TextTranslationOutputSchema;
1461
2762
  }
1462
2763
  }
1463
- TaskRegistry12.registerTask(TextTranslationTask);
2764
+ TaskRegistry23.registerTask(TextTranslationTask);
1464
2765
  var TextTranslation = (input, config) => {
1465
2766
  return new TextTranslationTask(input, config).run();
1466
2767
  };
1467
- Workflow12.prototype.TextTranslation = CreateWorkflow12(TextTranslationTask);
2768
+ Workflow23.prototype.TextTranslation = CreateWorkflow23(TextTranslationTask);
1468
2769
  // src/task/UnloadModelTask.ts
1469
- import { CreateWorkflow as CreateWorkflow13, TaskRegistry as TaskRegistry13, Workflow as Workflow13 } from "@workglow/task-graph";
1470
- var modelSchema12 = TypeReplicateArray(TypeModel("model"));
2770
+ import { CreateWorkflow as CreateWorkflow24, TaskRegistry as TaskRegistry24, Workflow as Workflow24 } from "@workglow/task-graph";
2771
+ var modelSchema23 = TypeReplicateArray(TypeModel("model"));
1471
2772
  var UnloadModelInputSchema = {
1472
2773
  type: "object",
1473
2774
  properties: {
1474
- model: modelSchema12
2775
+ model: modelSchema23
1475
2776
  },
1476
2777
  required: ["model"],
1477
2778
  additionalProperties: false
@@ -1479,7 +2780,7 @@ var UnloadModelInputSchema = {
1479
2780
  var UnloadModelOutputSchema = {
1480
2781
  type: "object",
1481
2782
  properties: {
1482
- model: modelSchema12
2783
+ model: modelSchema23
1483
2784
  },
1484
2785
  required: ["model"],
1485
2786
  additionalProperties: false
@@ -1498,18 +2799,18 @@ class UnloadModelTask extends AiTask {
1498
2799
  }
1499
2800
  static cacheable = false;
1500
2801
  }
1501
- TaskRegistry13.registerTask(UnloadModelTask);
2802
+ TaskRegistry24.registerTask(UnloadModelTask);
1502
2803
  var UnloadModel = (input, config) => {
1503
2804
  return new UnloadModelTask(input, config).run();
1504
2805
  };
1505
- Workflow13.prototype.UnloadModel = CreateWorkflow13(UnloadModelTask);
2806
+ Workflow24.prototype.UnloadModel = CreateWorkflow24(UnloadModelTask);
1506
2807
  // src/task/VectorSimilarityTask.ts
1507
2808
  import {
1508
2809
  ArrayTask,
1509
- CreateWorkflow as CreateWorkflow14,
2810
+ CreateWorkflow as CreateWorkflow25,
1510
2811
  TaskError,
1511
- TaskRegistry as TaskRegistry14,
1512
- Workflow as Workflow14
2812
+ TaskRegistry as TaskRegistry25,
2813
+ Workflow as Workflow25
1513
2814
  } from "@workglow/task-graph";
1514
2815
  var SimilarityFn = {
1515
2816
  COSINE: "cosine",
@@ -1603,11 +2904,11 @@ class VectorSimilarityTask extends ArrayTask {
1603
2904
  };
1604
2905
  }
1605
2906
  }
1606
- TaskRegistry14.registerTask(VectorSimilarityTask);
2907
+ TaskRegistry25.registerTask(VectorSimilarityTask);
1607
2908
  var Similarity = (input, config) => {
1608
2909
  return new VectorSimilarityTask(input, config).run();
1609
2910
  };
1610
- Workflow14.prototype.Similarity = CreateWorkflow14(VectorSimilarityTask);
2911
+ Workflow25.prototype.Similarity = CreateWorkflow25(VectorSimilarityTask);
1611
2912
  function inner(arr1, arr2) {
1612
2913
  return 1 - arr1.reduce((acc, val, i) => acc + val * arr2[i], 0);
1613
2914
  }
@@ -1651,6 +2952,10 @@ export {
1651
2952
  TypeModelAsString,
1652
2953
  TypeModel,
1653
2954
  TypeLanguage,
2955
+ TypeImageInput,
2956
+ TypeCategory,
2957
+ TypeBoundingBox,
2958
+ TypeAudioInput,
1654
2959
  TextTranslationTask,
1655
2960
  TextTranslationOutputSchema,
1656
2961
  TextTranslationInputSchema,
@@ -1688,19 +2993,59 @@ export {
1688
2993
  TextEmbeddingOutputSchema,
1689
2994
  TextEmbeddingInputSchema,
1690
2995
  TextEmbedding,
1691
- TextClassifierTask,
1692
- TextClassifierOutputSchema,
1693
- TextClassifierInputSchema,
1694
- TextClassifier,
2996
+ TextClassificationTask,
2997
+ TextClassificationOutputSchema,
2998
+ TextClassificationInputSchema,
2999
+ TextClassification,
1695
3000
  TableFragment,
1696
3001
  SimilarityFn,
1697
3002
  Similarity,
3003
+ PoseLandmarkerTask,
3004
+ PoseLandmarkerOutputSchema,
3005
+ PoseLandmarkerInputSchema,
3006
+ PoseLandmarker,
3007
+ ObjectDetectionTask,
3008
+ ObjectDetectionOutputSchema,
3009
+ ObjectDetectionInputSchema,
3010
+ ObjectDetection,
1698
3011
  ModelSchema,
1699
3012
  ModelRepository,
1700
3013
  ModelPrimaryKeyNames,
1701
3014
  MODEL_REPOSITORY,
1702
3015
  InMemoryModelRepository,
3016
+ ImageToTextTask,
3017
+ ImageToTextOutputSchema,
3018
+ ImageToTextInputSchema,
3019
+ ImageToText,
3020
+ ImageSegmentationTask,
3021
+ ImageSegmentationOutputSchema,
3022
+ ImageSegmentationInputSchema,
3023
+ ImageSegmentation,
1703
3024
  ImageFragment,
3025
+ ImageEmbeddingTask,
3026
+ ImageEmbeddingOutputSchema,
3027
+ ImageEmbeddingInputSchema,
3028
+ ImageEmbedding,
3029
+ ImageClassificationTask,
3030
+ ImageClassificationOutputSchema,
3031
+ ImageClassificationInputSchema,
3032
+ ImageClassification,
3033
+ HandLandmarkerTask,
3034
+ HandLandmarkerOutputSchema,
3035
+ HandLandmarkerInputSchema,
3036
+ HandLandmarker,
3037
+ GestureRecognizerTask,
3038
+ GestureRecognizerOutputSchema,
3039
+ GestureRecognizerInputSchema,
3040
+ GestureRecognizer,
3041
+ FaceLandmarkerTask,
3042
+ FaceLandmarkerOutputSchema,
3043
+ FaceLandmarkerInputSchema,
3044
+ FaceLandmarker,
3045
+ FaceDetectorTask,
3046
+ FaceDetectorOutputSchema,
3047
+ FaceDetectorInputSchema,
3048
+ FaceDetector,
1704
3049
  DownloadModelTask,
1705
3050
  DownloadModel,
1706
3051
  DocumentSplitterTask,
@@ -1710,9 +3055,13 @@ export {
1710
3055
  DocumentConverterMarkdown,
1711
3056
  DocumentBaseFragment,
1712
3057
  Document,
3058
+ BackgroundRemovalTask,
3059
+ BackgroundRemovalOutputSchema,
3060
+ BackgroundRemovalInputSchema,
3061
+ BackgroundRemoval,
1713
3062
  AiTask,
1714
3063
  AiProviderRegistry,
1715
3064
  AiJob
1716
3065
  };
1717
3066
 
1718
- //# debugId=9A48653B4A13DC8664756E2164756E21
3067
+ //# debugId=C19F9DAFD0EE171E64756E2164756E21