@workglow/tasks 0.0.101 → 0.0.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.js CHANGED
@@ -1150,14 +1150,6 @@ Workflow12.prototype.multiply = CreateAdaptiveWorkflow(ScalarMultiplyTask, Vecto
1150
1150
  Workflow12.prototype.divide = CreateAdaptiveWorkflow(ScalarDivideTask, VectorDivideTask);
1151
1151
  Workflow12.prototype.sum = CreateAdaptiveWorkflow(ScalarSumTask, VectorSumTask);
1152
1152
 
1153
- // src/common.ts
1154
- import {
1155
- createMcpClient,
1156
- mcpClientFactory as mcpClientFactory5,
1157
- mcpServerConfigSchema as mcpServerConfigSchema5,
1158
- mcpTransportTypes
1159
- } from "@workglow/util";
1160
-
1161
1153
  // src/task/ArrayTask.ts
1162
1154
  import {
1163
1155
  uuid4
@@ -1321,6 +1313,7 @@ class DebugLogTask extends Task11 {
1321
1313
  static description = "Logs messages to the console with configurable log levels for debugging task graphs";
1322
1314
  static cacheable = false;
1323
1315
  static passthroughInputsToOutputs = true;
1316
+ static customizable = true;
1324
1317
  static configSchema() {
1325
1318
  return debugLogTaskConfigSchema;
1326
1319
  }
@@ -1386,6 +1379,7 @@ class DelayTask extends Task12 {
1386
1379
  static description = "Delays execution for a specified duration with progress tracking";
1387
1380
  static cacheable = false;
1388
1381
  static passthroughInputsToOutputs = true;
1382
+ static customizable = true;
1389
1383
  static configSchema() {
1390
1384
  return delayTaskConfigSchema;
1391
1385
  }
@@ -1477,7 +1471,7 @@ class InputTask extends Task13 {
1477
1471
  }
1478
1472
  Workflow15.prototype.input = CreateWorkflow14(InputTask);
1479
1473
  // src/task/JavaScriptTask.ts
1480
- import { CreateWorkflow as CreateWorkflow15, Task as Task14, Workflow as Workflow16 } from "@workglow/task-graph";
1474
+ import { CreateWorkflow as CreateWorkflow15, Task as Task14, TaskConfigSchema as TaskConfigSchema3, Workflow as Workflow16 } from "@workglow/task-graph";
1481
1475
 
1482
1476
  // src/util/acorn.js
1483
1477
  var options;
@@ -5940,6 +5934,20 @@ Interpreter["VALUE_IN_DESCRIPTOR"] = Interpreter.VALUE_IN_DESCRIPTOR;
5940
5934
  Interpreter["Status"] = Interpreter.Status;
5941
5935
 
5942
5936
  // src/task/JavaScriptTask.ts
5937
+ var configSchema = {
5938
+ type: "object",
5939
+ properties: {
5940
+ ...TaskConfigSchema3["properties"],
5941
+ javascript_code: {
5942
+ type: "string",
5943
+ title: "Code",
5944
+ minLength: 1,
5945
+ description: "JavaScript code to execute",
5946
+ format: "code:javascript"
5947
+ }
5948
+ },
5949
+ additionalProperties: false
5950
+ };
5943
5951
  var inputSchema14 = {
5944
5952
  type: "object",
5945
5953
  properties: {
@@ -5971,14 +5979,34 @@ class JavaScriptTask extends Task14 {
5971
5979
  static category = "Utility";
5972
5980
  static title = "JavaScript Interpreter";
5973
5981
  static description = "Executes JavaScript code in a sandboxed interpreter environment";
5982
+ static customizable = true;
5983
+ static configSchema() {
5984
+ return configSchema;
5985
+ }
5974
5986
  static inputSchema() {
5975
5987
  return inputSchema14;
5976
5988
  }
5977
5989
  static outputSchema() {
5978
5990
  return outputSchema14;
5979
5991
  }
5992
+ constructor(input2 = {}, config = {}) {
5993
+ super(input2, config);
5994
+ }
5995
+ inputSchema() {
5996
+ if (this.config?.javascript_code) {
5997
+ if (this.config.inputSchema) {
5998
+ return this.config.inputSchema;
5999
+ }
6000
+ return {
6001
+ type: "object",
6002
+ properties: {},
6003
+ additionalProperties: true
6004
+ };
6005
+ }
6006
+ return inputSchema14;
6007
+ }
5980
6008
  async executeReactive(input2, output) {
5981
- if (input2.javascript_code) {
6009
+ if (this.config.javascript_code || input2.javascript_code) {
5982
6010
  try {
5983
6011
  const inputVariables = Object.keys(input2).filter((key) => key !== "javascript_code");
5984
6012
  const inputVariablesString = inputVariables.map((key) => `var ${key} = ${JSON.stringify(input2[key])};`).join(`
@@ -6076,14 +6104,14 @@ import {
6076
6104
  CreateWorkflow as CreateWorkflow17,
6077
6105
  DATAFLOW_ALL_PORTS,
6078
6106
  Task as Task15,
6079
- TaskConfigSchema as TaskConfigSchema3,
6107
+ TaskConfigSchema as TaskConfigSchema4,
6080
6108
  TaskConfigurationError as TaskConfigurationError3,
6081
6109
  Workflow as Workflow18
6082
6110
  } from "@workglow/task-graph";
6083
6111
  var lambdaTaskConfigSchema = {
6084
6112
  type: "object",
6085
6113
  properties: {
6086
- ...TaskConfigSchema3["properties"],
6114
+ ...TaskConfigSchema4["properties"],
6087
6115
  execute: {},
6088
6116
  executeReactive: {}
6089
6117
  },
@@ -6562,28 +6590,32 @@ var mcpList = async (input2, config = {}) => {
6562
6590
  };
6563
6591
  Workflow22.prototype.mcpList = CreateWorkflow21(McpListTask);
6564
6592
  // src/task/mcp/McpPromptGetTask.ts
6565
- import { CreateWorkflow as CreateWorkflow22, Task as Task20, Workflow as Workflow23 } from "@workglow/task-graph";
6593
+ import {
6594
+ CreateWorkflow as CreateWorkflow22,
6595
+ Task as Task20,
6596
+ TaskConfigSchema as TaskConfigSchema5,
6597
+ Workflow as Workflow23
6598
+ } from "@workglow/task-graph";
6566
6599
  import {
6567
6600
  mcpClientFactory as mcpClientFactory2,
6568
6601
  mcpServerConfigSchema as mcpServerConfigSchema2
6569
6602
  } from "@workglow/util";
6570
- var inputSchema20 = {
6603
+ var configSchema2 = {
6571
6604
  type: "object",
6572
6605
  properties: {
6606
+ ...TaskConfigSchema5["properties"],
6573
6607
  ...mcpServerConfigSchema2,
6574
6608
  prompt_name: {
6575
6609
  type: "string",
6576
6610
  title: "Prompt Name",
6577
- description: "The name of the prompt to get"
6578
- },
6579
- prompt_arguments: {
6580
- type: "object",
6581
- additionalProperties: { type: "string" },
6582
- title: "Prompt Arguments",
6583
- description: "Arguments to pass to the prompt"
6611
+ description: "The name of the prompt to get",
6612
+ format: "string:mcp-promptname"
6584
6613
  }
6585
6614
  },
6586
6615
  required: ["transport", "prompt_name"],
6616
+ if: { properties: { transport: { const: "stdio" } }, required: ["transport"] },
6617
+ then: { required: ["command"] },
6618
+ else: { required: ["server_url"] },
6587
6619
  additionalProperties: false
6588
6620
  };
6589
6621
  var annotationsSchema = {
@@ -6687,7 +6719,7 @@ var contentSchema = {
6687
6719
  }
6688
6720
  ]
6689
6721
  };
6690
- var outputSchema19 = {
6722
+ var fallbackOutputSchema = {
6691
6723
  type: "object",
6692
6724
  properties: {
6693
6725
  messages: {
@@ -6713,6 +6745,11 @@ var outputSchema19 = {
6713
6745
  required: ["messages"],
6714
6746
  additionalProperties: false
6715
6747
  };
6748
+ var fallbackInputSchema = {
6749
+ type: "object",
6750
+ properties: {},
6751
+ additionalProperties: false
6752
+ };
6716
6753
 
6717
6754
  class McpPromptGetTask extends Task20 {
6718
6755
  static type = "McpPromptGetTask";
@@ -6720,18 +6757,71 @@ class McpPromptGetTask extends Task20 {
6720
6757
  static title = "MCP Get Prompt";
6721
6758
  static description = "Gets a prompt from an MCP server";
6722
6759
  static cacheable = false;
6760
+ static customizable = true;
6761
+ static hasDynamicSchemas = true;
6723
6762
  static inputSchema() {
6724
- return inputSchema20;
6763
+ return fallbackInputSchema;
6725
6764
  }
6726
6765
  static outputSchema() {
6727
- return outputSchema19;
6766
+ return fallbackOutputSchema;
6767
+ }
6768
+ static configSchema() {
6769
+ return configSchema2;
6770
+ }
6771
+ inputSchema() {
6772
+ return this.config?.inputSchema ?? fallbackInputSchema;
6773
+ }
6774
+ outputSchema() {
6775
+ return this.config?.outputSchema ?? fallbackOutputSchema;
6776
+ }
6777
+ _schemasDiscovering = false;
6778
+ async discoverSchemas(signal) {
6779
+ if (this.config.inputSchema)
6780
+ return;
6781
+ if (this._schemasDiscovering)
6782
+ return;
6783
+ if (!this.config.transport || !this.config.prompt_name)
6784
+ return;
6785
+ this._schemasDiscovering = true;
6786
+ try {
6787
+ const result = await mcpList({
6788
+ transport: this.config.transport,
6789
+ server_url: this.config.server_url,
6790
+ command: this.config.command,
6791
+ args: this.config.args,
6792
+ env: this.config.env,
6793
+ list_type: "prompts"
6794
+ });
6795
+ const prompt = result.prompts?.find((p) => p.name === this.config.prompt_name);
6796
+ if (prompt) {
6797
+ const args = prompt.arguments ?? [];
6798
+ const required = args.filter((a) => a.required).map((a) => a.name);
6799
+ const properties = {};
6800
+ for (const arg of args) {
6801
+ properties[arg.name] = {
6802
+ type: "string",
6803
+ ...arg.description ? { description: arg.description } : {}
6804
+ };
6805
+ }
6806
+ this.config.inputSchema = {
6807
+ type: "object",
6808
+ properties,
6809
+ ...required.length > 0 ? { required } : {},
6810
+ additionalProperties: false
6811
+ };
6812
+ this.emitSchemaChange();
6813
+ }
6814
+ } finally {
6815
+ this._schemasDiscovering = false;
6816
+ }
6728
6817
  }
6729
6818
  async execute(input2, context) {
6730
- const { client } = await mcpClientFactory2.create(input2, context.signal);
6819
+ await this.discoverSchemas(context.signal);
6820
+ const { client } = await mcpClientFactory2.create(this.config, context.signal);
6731
6821
  try {
6732
6822
  const result = await client.getPrompt({
6733
- name: input2.prompt_name,
6734
- arguments: input2.prompt_arguments
6823
+ name: this.config.prompt_name,
6824
+ arguments: input2
6735
6825
  });
6736
6826
  return {
6737
6827
  messages: result.messages,
@@ -6742,28 +6832,37 @@ class McpPromptGetTask extends Task20 {
6742
6832
  }
6743
6833
  }
6744
6834
  }
6745
- var mcpPromptGet = async (input2, config = {}) => {
6746
- const result = await new McpPromptGetTask({}, config).run(input2);
6747
- return result;
6835
+ var mcpPromptGet = async (input2, config) => {
6836
+ return new McpPromptGetTask({}, config).run(input2);
6748
6837
  };
6749
6838
  Workflow23.prototype.mcpPromptGet = CreateWorkflow22(McpPromptGetTask);
6750
6839
  // src/task/mcp/McpResourceReadTask.ts
6751
- import { CreateWorkflow as CreateWorkflow23, Task as Task21, Workflow as Workflow24 } from "@workglow/task-graph";
6840
+ import {
6841
+ CreateWorkflow as CreateWorkflow23,
6842
+ Task as Task21,
6843
+ TaskConfigSchema as TaskConfigSchema6,
6844
+ Workflow as Workflow24
6845
+ } from "@workglow/task-graph";
6752
6846
  import {
6753
6847
  mcpClientFactory as mcpClientFactory3,
6754
6848
  mcpServerConfigSchema as mcpServerConfigSchema3
6755
6849
  } from "@workglow/util";
6756
- var inputSchema21 = {
6850
+ var configSchema3 = {
6757
6851
  type: "object",
6758
6852
  properties: {
6853
+ ...TaskConfigSchema6["properties"],
6759
6854
  ...mcpServerConfigSchema3,
6760
6855
  resource_uri: {
6761
6856
  type: "string",
6762
6857
  title: "Resource URI",
6763
- description: "The URI of the resource to read"
6858
+ description: "The URI of the resource to read",
6859
+ format: "string:uri:mcp-resourceuri"
6764
6860
  }
6765
6861
  },
6766
6862
  required: ["transport", "resource_uri"],
6863
+ if: { properties: { transport: { const: "stdio" } }, required: ["transport"] },
6864
+ then: { required: ["command"] },
6865
+ else: { required: ["server_url"] },
6767
6866
  additionalProperties: false
6768
6867
  };
6769
6868
  var contentItemSchema = {
@@ -6792,7 +6891,12 @@ var contentItemSchema = {
6792
6891
  }
6793
6892
  ]
6794
6893
  };
6795
- var outputSchema20 = {
6894
+ var inputSchema20 = {
6895
+ type: "object",
6896
+ properties: {},
6897
+ additionalProperties: false
6898
+ };
6899
+ var outputSchema19 = {
6796
6900
  type: "object",
6797
6901
  properties: {
6798
6902
  contents: {
@@ -6812,49 +6916,57 @@ class McpResourceReadTask extends Task21 {
6812
6916
  static title = "MCP Read Resource";
6813
6917
  static description = "Reads a resource from an MCP server";
6814
6918
  static cacheable = false;
6919
+ static customizable = true;
6815
6920
  static inputSchema() {
6816
- return inputSchema21;
6921
+ return inputSchema20;
6817
6922
  }
6818
6923
  static outputSchema() {
6819
- return outputSchema20;
6924
+ return outputSchema19;
6820
6925
  }
6821
- async execute(input2, context) {
6822
- const { client } = await mcpClientFactory3.create(input2, context.signal);
6926
+ static configSchema() {
6927
+ return configSchema3;
6928
+ }
6929
+ async execute(_input, context) {
6930
+ const { client } = await mcpClientFactory3.create(this.config, context.signal);
6823
6931
  try {
6824
- const result = await client.readResource({ uri: input2.resource_uri });
6932
+ const result = await client.readResource({ uri: this.config.resource_uri });
6825
6933
  return { contents: result.contents };
6826
6934
  } finally {
6827
6935
  await client.close();
6828
6936
  }
6829
6937
  }
6830
6938
  }
6831
- var mcpResourceRead = async (input2, config = {}) => {
6832
- return new McpResourceReadTask({}, config).run(input2);
6939
+ var mcpResourceRead = async (config) => {
6940
+ return new McpResourceReadTask({}, config).run({});
6833
6941
  };
6834
6942
  Workflow24.prototype.mcpResourceRead = CreateWorkflow23(McpResourceReadTask);
6835
6943
  // src/task/mcp/McpToolCallTask.ts
6836
- import { CreateWorkflow as CreateWorkflow24, Task as Task22, Workflow as Workflow25 } from "@workglow/task-graph";
6944
+ import {
6945
+ CreateWorkflow as CreateWorkflow24,
6946
+ Task as Task22,
6947
+ TaskConfigSchema as TaskConfigSchema7,
6948
+ Workflow as Workflow25
6949
+ } from "@workglow/task-graph";
6837
6950
  import {
6838
6951
  mcpClientFactory as mcpClientFactory4,
6839
6952
  mcpServerConfigSchema as mcpServerConfigSchema4
6840
6953
  } from "@workglow/util";
6841
- var inputSchema22 = {
6954
+ var configSchema4 = {
6842
6955
  type: "object",
6843
6956
  properties: {
6957
+ ...TaskConfigSchema7["properties"],
6844
6958
  ...mcpServerConfigSchema4,
6845
6959
  tool_name: {
6846
6960
  type: "string",
6847
6961
  title: "Tool Name",
6848
- description: "The name of the tool to call"
6849
- },
6850
- tool_arguments: {
6851
- type: "object",
6852
- additionalProperties: true,
6853
- title: "Tool Arguments",
6854
- description: "Arguments to pass to the tool"
6962
+ description: "The name of the tool to call",
6963
+ format: "string:mcp-toolname"
6855
6964
  }
6856
6965
  },
6857
6966
  required: ["transport", "tool_name"],
6967
+ if: { properties: { transport: { const: "stdio" } }, required: ["transport"] },
6968
+ then: { required: ["command"] },
6969
+ else: { required: ["server_url"] },
6858
6970
  additionalProperties: false
6859
6971
  };
6860
6972
  var annotationsSchema2 = {
@@ -6958,7 +7070,7 @@ var toolContentSchema = {
6958
7070
  }
6959
7071
  ]
6960
7072
  };
6961
- var outputSchema21 = {
7073
+ var fallbackOutputSchema2 = {
6962
7074
  type: "object",
6963
7075
  properties: {
6964
7076
  content: {
@@ -6976,6 +7088,11 @@ var outputSchema21 = {
6976
7088
  required: ["content", "isError"],
6977
7089
  additionalProperties: false
6978
7090
  };
7091
+ var fallbackInputSchema2 = {
7092
+ type: "object",
7093
+ properties: {},
7094
+ additionalProperties: true
7095
+ };
6979
7096
 
6980
7097
  class McpToolCallTask extends Task22 {
6981
7098
  static type = "McpToolCallTask";
@@ -6983,38 +7100,103 @@ class McpToolCallTask extends Task22 {
6983
7100
  static title = "MCP Call Tool";
6984
7101
  static description = "Calls a tool on an MCP server and returns the result";
6985
7102
  static cacheable = false;
7103
+ static customizable = true;
7104
+ static hasDynamicSchemas = true;
6986
7105
  static inputSchema() {
6987
- return inputSchema22;
7106
+ return fallbackInputSchema2;
6988
7107
  }
6989
7108
  static outputSchema() {
6990
- return outputSchema21;
7109
+ return fallbackOutputSchema2;
7110
+ }
7111
+ static configSchema() {
7112
+ return configSchema4;
7113
+ }
7114
+ inputSchema() {
7115
+ return this.config?.inputSchema ?? fallbackInputSchema2;
7116
+ }
7117
+ outputSchema() {
7118
+ return this.config?.outputSchema ?? fallbackOutputSchema2;
7119
+ }
7120
+ _schemasDiscovering = false;
7121
+ async discoverSchemas(signal) {
7122
+ if (this.config.inputSchema && this.config.outputSchema)
7123
+ return;
7124
+ if (this._schemasDiscovering)
7125
+ return;
7126
+ if (!this.config.transport || !this.config.tool_name)
7127
+ return;
7128
+ this._schemasDiscovering = true;
7129
+ try {
7130
+ const result = await mcpList({
7131
+ transport: this.config.transport,
7132
+ server_url: this.config.server_url,
7133
+ command: this.config.command,
7134
+ args: this.config.args,
7135
+ env: this.config.env,
7136
+ list_type: "tools"
7137
+ });
7138
+ const tool = result.tools?.find((t) => t.name === this.config.tool_name);
7139
+ if (tool) {
7140
+ if (!this.config.inputSchema) {
7141
+ this.config.inputSchema = tool.inputSchema;
7142
+ }
7143
+ if (!this.config.outputSchema && tool.outputSchema) {
7144
+ this.config.outputSchema = tool.outputSchema;
7145
+ }
7146
+ this.emitSchemaChange();
7147
+ }
7148
+ } finally {
7149
+ this._schemasDiscovering = false;
7150
+ }
6991
7151
  }
6992
7152
  async execute(input2, context) {
6993
- const { client } = await mcpClientFactory4.create(input2, context.signal);
7153
+ await this.discoverSchemas(context.signal);
7154
+ const { client } = await mcpClientFactory4.create(this.config, context.signal);
6994
7155
  try {
6995
7156
  const result = await client.callTool({
6996
- name: input2.tool_name,
6997
- arguments: input2.tool_arguments
7157
+ name: this.config.tool_name,
7158
+ arguments: input2
6998
7159
  });
6999
7160
  if (!("content" in result) || !Array.isArray(result.content)) {
7000
7161
  throw new Error("Expected tool result with content array");
7001
7162
  }
7163
+ const content = result.content;
7164
+ const isError = result.isError === true;
7165
+ const structuredContent = "structuredContent" in result && result.structuredContent && typeof result.structuredContent === "object" && !Array.isArray(result.structuredContent) ? result.structuredContent : undefined;
7166
+ let parsedFromText;
7167
+ if (!structuredContent && content.length === 1) {
7168
+ const item = content[0];
7169
+ if (item && typeof item === "object" && "type" in item && item.type === "text" && "text" in item) {
7170
+ const text = String(item.text);
7171
+ const trimmed = text.trim();
7172
+ if (trimmed.startsWith("{") && trimmed.endsWith("}") || trimmed.startsWith("[") && trimmed.endsWith("]")) {
7173
+ try {
7174
+ const parsed = JSON.parse(text);
7175
+ if (parsed !== null && typeof parsed === "object" && !Array.isArray(parsed)) {
7176
+ parsedFromText = parsed;
7177
+ }
7178
+ } catch {}
7179
+ }
7180
+ }
7181
+ }
7002
7182
  return {
7003
- content: result.content,
7004
- isError: result.isError === true
7183
+ content,
7184
+ isError,
7185
+ ...parsedFromText,
7186
+ ...structuredContent
7005
7187
  };
7006
7188
  } finally {
7007
7189
  await client.close();
7008
7190
  }
7009
7191
  }
7010
7192
  }
7011
- var mcpToolCall = async (input2, config = {}) => {
7193
+ var mcpToolCall = async (input2, config) => {
7012
7194
  return new McpToolCallTask({}, config).run(input2);
7013
7195
  };
7014
7196
  Workflow25.prototype.mcpToolCall = CreateWorkflow24(McpToolCallTask);
7015
7197
  // src/task/scalar/ScalarAbsTask.ts
7016
7198
  import { CreateWorkflow as CreateWorkflow25, Task as Task23, Workflow as Workflow26 } from "@workglow/task-graph";
7017
- var inputSchema23 = {
7199
+ var inputSchema21 = {
7018
7200
  type: "object",
7019
7201
  properties: {
7020
7202
  value: {
@@ -7026,7 +7208,7 @@ var inputSchema23 = {
7026
7208
  required: ["value"],
7027
7209
  additionalProperties: false
7028
7210
  };
7029
- var outputSchema22 = {
7211
+ var outputSchema20 = {
7030
7212
  type: "object",
7031
7213
  properties: {
7032
7214
  result: {
@@ -7045,10 +7227,10 @@ class ScalarAbsTask extends Task23 {
7045
7227
  static title = "Abs";
7046
7228
  static description = "Returns the absolute value of a number";
7047
7229
  static inputSchema() {
7048
- return inputSchema23;
7230
+ return inputSchema21;
7049
7231
  }
7050
7232
  static outputSchema() {
7051
- return outputSchema22;
7233
+ return outputSchema20;
7052
7234
  }
7053
7235
  async execute(input2, _context) {
7054
7236
  return { result: Math.abs(input2.value) };
@@ -7057,7 +7239,7 @@ class ScalarAbsTask extends Task23 {
7057
7239
  Workflow26.prototype.scalarAbs = CreateWorkflow25(ScalarAbsTask);
7058
7240
  // src/task/scalar/ScalarCeilTask.ts
7059
7241
  import { CreateWorkflow as CreateWorkflow26, Task as Task24, Workflow as Workflow27 } from "@workglow/task-graph";
7060
- var inputSchema24 = {
7242
+ var inputSchema22 = {
7061
7243
  type: "object",
7062
7244
  properties: {
7063
7245
  value: {
@@ -7069,7 +7251,7 @@ var inputSchema24 = {
7069
7251
  required: ["value"],
7070
7252
  additionalProperties: false
7071
7253
  };
7072
- var outputSchema23 = {
7254
+ var outputSchema21 = {
7073
7255
  type: "object",
7074
7256
  properties: {
7075
7257
  result: {
@@ -7088,10 +7270,10 @@ class ScalarCeilTask extends Task24 {
7088
7270
  static title = "Ceil";
7089
7271
  static description = "Returns the smallest integer greater than or equal to a number";
7090
7272
  static inputSchema() {
7091
- return inputSchema24;
7273
+ return inputSchema22;
7092
7274
  }
7093
7275
  static outputSchema() {
7094
- return outputSchema23;
7276
+ return outputSchema21;
7095
7277
  }
7096
7278
  async execute(input2, _context) {
7097
7279
  return { result: Math.ceil(input2.value) };
@@ -7100,7 +7282,7 @@ class ScalarCeilTask extends Task24 {
7100
7282
  Workflow27.prototype.scalarCeil = CreateWorkflow26(ScalarCeilTask);
7101
7283
  // src/task/scalar/ScalarFloorTask.ts
7102
7284
  import { CreateWorkflow as CreateWorkflow27, Task as Task25, Workflow as Workflow28 } from "@workglow/task-graph";
7103
- var inputSchema25 = {
7285
+ var inputSchema23 = {
7104
7286
  type: "object",
7105
7287
  properties: {
7106
7288
  value: {
@@ -7112,7 +7294,7 @@ var inputSchema25 = {
7112
7294
  required: ["value"],
7113
7295
  additionalProperties: false
7114
7296
  };
7115
- var outputSchema24 = {
7297
+ var outputSchema22 = {
7116
7298
  type: "object",
7117
7299
  properties: {
7118
7300
  result: {
@@ -7131,10 +7313,10 @@ class ScalarFloorTask extends Task25 {
7131
7313
  static title = "Floor";
7132
7314
  static description = "Returns the largest integer less than or equal to a number";
7133
7315
  static inputSchema() {
7134
- return inputSchema25;
7316
+ return inputSchema23;
7135
7317
  }
7136
7318
  static outputSchema() {
7137
- return outputSchema24;
7319
+ return outputSchema22;
7138
7320
  }
7139
7321
  async execute(input2, _context) {
7140
7322
  return { result: Math.floor(input2.value) };
@@ -7143,7 +7325,7 @@ class ScalarFloorTask extends Task25 {
7143
7325
  Workflow28.prototype.scalarFloor = CreateWorkflow27(ScalarFloorTask);
7144
7326
  // src/task/scalar/ScalarMaxTask.ts
7145
7327
  import { CreateWorkflow as CreateWorkflow28, Task as Task26, Workflow as Workflow29 } from "@workglow/task-graph";
7146
- var inputSchema26 = {
7328
+ var inputSchema24 = {
7147
7329
  type: "object",
7148
7330
  properties: {
7149
7331
  values: {
@@ -7156,7 +7338,7 @@ var inputSchema26 = {
7156
7338
  required: ["values"],
7157
7339
  additionalProperties: false
7158
7340
  };
7159
- var outputSchema25 = {
7341
+ var outputSchema23 = {
7160
7342
  type: "object",
7161
7343
  properties: {
7162
7344
  result: {
@@ -7175,10 +7357,10 @@ class ScalarMaxTask extends Task26 {
7175
7357
  static title = "Max";
7176
7358
  static description = "Returns the largest of the given numbers";
7177
7359
  static inputSchema() {
7178
- return inputSchema26;
7360
+ return inputSchema24;
7179
7361
  }
7180
7362
  static outputSchema() {
7181
- return outputSchema25;
7363
+ return outputSchema23;
7182
7364
  }
7183
7365
  async execute(input2, _context) {
7184
7366
  return { result: Math.max(...input2.values) };
@@ -7187,7 +7369,7 @@ class ScalarMaxTask extends Task26 {
7187
7369
  Workflow29.prototype.scalarMax = CreateWorkflow28(ScalarMaxTask);
7188
7370
  // src/task/scalar/ScalarMinTask.ts
7189
7371
  import { CreateWorkflow as CreateWorkflow29, Task as Task27, Workflow as Workflow30 } from "@workglow/task-graph";
7190
- var inputSchema27 = {
7372
+ var inputSchema25 = {
7191
7373
  type: "object",
7192
7374
  properties: {
7193
7375
  values: {
@@ -7200,7 +7382,7 @@ var inputSchema27 = {
7200
7382
  required: ["values"],
7201
7383
  additionalProperties: false
7202
7384
  };
7203
- var outputSchema26 = {
7385
+ var outputSchema24 = {
7204
7386
  type: "object",
7205
7387
  properties: {
7206
7388
  result: {
@@ -7219,10 +7401,10 @@ class ScalarMinTask extends Task27 {
7219
7401
  static title = "Min";
7220
7402
  static description = "Returns the smallest of the given numbers";
7221
7403
  static inputSchema() {
7222
- return inputSchema27;
7404
+ return inputSchema25;
7223
7405
  }
7224
7406
  static outputSchema() {
7225
- return outputSchema26;
7407
+ return outputSchema24;
7226
7408
  }
7227
7409
  async execute(input2, _context) {
7228
7410
  return { result: Math.min(...input2.values) };
@@ -7231,7 +7413,7 @@ class ScalarMinTask extends Task27 {
7231
7413
  Workflow30.prototype.scalarMin = CreateWorkflow29(ScalarMinTask);
7232
7414
  // src/task/scalar/ScalarRoundTask.ts
7233
7415
  import { CreateWorkflow as CreateWorkflow30, Task as Task28, Workflow as Workflow31 } from "@workglow/task-graph";
7234
- var inputSchema28 = {
7416
+ var inputSchema26 = {
7235
7417
  type: "object",
7236
7418
  properties: {
7237
7419
  value: {
@@ -7243,7 +7425,7 @@ var inputSchema28 = {
7243
7425
  required: ["value"],
7244
7426
  additionalProperties: false
7245
7427
  };
7246
- var outputSchema27 = {
7428
+ var outputSchema25 = {
7247
7429
  type: "object",
7248
7430
  properties: {
7249
7431
  result: {
@@ -7262,10 +7444,10 @@ class ScalarRoundTask extends Task28 {
7262
7444
  static title = "Round";
7263
7445
  static description = "Returns the value of a number rounded to the nearest integer";
7264
7446
  static inputSchema() {
7265
- return inputSchema28;
7447
+ return inputSchema26;
7266
7448
  }
7267
7449
  static outputSchema() {
7268
- return outputSchema27;
7450
+ return outputSchema25;
7269
7451
  }
7270
7452
  async execute(input2, _context) {
7271
7453
  return { result: Math.round(input2.value) };
@@ -7274,7 +7456,7 @@ class ScalarRoundTask extends Task28 {
7274
7456
  Workflow31.prototype.scalarRound = CreateWorkflow30(ScalarRoundTask);
7275
7457
  // src/task/scalar/ScalarTruncTask.ts
7276
7458
  import { CreateWorkflow as CreateWorkflow31, Task as Task29, Workflow as Workflow32 } from "@workglow/task-graph";
7277
- var inputSchema29 = {
7459
+ var inputSchema27 = {
7278
7460
  type: "object",
7279
7461
  properties: {
7280
7462
  value: {
@@ -7286,7 +7468,7 @@ var inputSchema29 = {
7286
7468
  required: ["value"],
7287
7469
  additionalProperties: false
7288
7470
  };
7289
- var outputSchema28 = {
7471
+ var outputSchema26 = {
7290
7472
  type: "object",
7291
7473
  properties: {
7292
7474
  result: {
@@ -7305,10 +7487,10 @@ class ScalarTruncTask extends Task29 {
7305
7487
  static title = "Truncate";
7306
7488
  static description = "Returns the integer part of a number by removing fractional digits";
7307
7489
  static inputSchema() {
7308
- return inputSchema29;
7490
+ return inputSchema27;
7309
7491
  }
7310
7492
  static outputSchema() {
7311
- return outputSchema28;
7493
+ return outputSchema26;
7312
7494
  }
7313
7495
  async execute(input2, _context) {
7314
7496
  return { result: Math.trunc(input2.value) };
@@ -7320,7 +7502,7 @@ import { CreateWorkflow as CreateWorkflow32, Task as Task30, Workflow as Workflo
7320
7502
  import {
7321
7503
  TypedArraySchema as TypedArraySchema5
7322
7504
  } from "@workglow/util";
7323
- var inputSchema30 = {
7505
+ var inputSchema28 = {
7324
7506
  type: "object",
7325
7507
  properties: {
7326
7508
  vectors: {
@@ -7336,7 +7518,7 @@ var inputSchema30 = {
7336
7518
  required: ["vectors"],
7337
7519
  additionalProperties: false
7338
7520
  };
7339
- var outputSchema29 = {
7521
+ var outputSchema27 = {
7340
7522
  type: "object",
7341
7523
  properties: {
7342
7524
  result: {
@@ -7355,10 +7537,10 @@ class VectorDistanceTask extends Task30 {
7355
7537
  static title = "Distance";
7356
7538
  static description = "Returns the Euclidean distance between the first two vectors";
7357
7539
  static inputSchema() {
7358
- return inputSchema30;
7540
+ return inputSchema28;
7359
7541
  }
7360
7542
  static outputSchema() {
7361
- return outputSchema29;
7543
+ return outputSchema27;
7362
7544
  }
7363
7545
  async execute(input2, _context) {
7364
7546
  const { vectors } = input2;
@@ -7382,7 +7564,7 @@ import { CreateWorkflow as CreateWorkflow33, Task as Task31, Workflow as Workflo
7382
7564
  import {
7383
7565
  TypedArraySchema as TypedArraySchema6
7384
7566
  } from "@workglow/util";
7385
- var inputSchema31 = {
7567
+ var inputSchema29 = {
7386
7568
  type: "object",
7387
7569
  properties: {
7388
7570
  vectors: {
@@ -7398,7 +7580,7 @@ var inputSchema31 = {
7398
7580
  required: ["vectors"],
7399
7581
  additionalProperties: false
7400
7582
  };
7401
- var outputSchema30 = {
7583
+ var outputSchema28 = {
7402
7584
  type: "object",
7403
7585
  properties: {
7404
7586
  result: {
@@ -7417,10 +7599,10 @@ class VectorDotProductTask extends Task31 {
7417
7599
  static title = "Dot Product";
7418
7600
  static description = "Returns the dot (inner) product of the first two vectors";
7419
7601
  static inputSchema() {
7420
- return inputSchema31;
7602
+ return inputSchema29;
7421
7603
  }
7422
7604
  static outputSchema() {
7423
- return outputSchema30;
7605
+ return outputSchema28;
7424
7606
  }
7425
7607
  async execute(input2, _context) {
7426
7608
  const { vectors } = input2;
@@ -7442,7 +7624,7 @@ import {
7442
7624
  TypedArraySchema as TypedArraySchema7,
7443
7625
  normalize
7444
7626
  } from "@workglow/util";
7445
- var inputSchema32 = {
7627
+ var inputSchema30 = {
7446
7628
  type: "object",
7447
7629
  properties: {
7448
7630
  vector: TypedArraySchema7({
@@ -7453,7 +7635,7 @@ var inputSchema32 = {
7453
7635
  required: ["vector"],
7454
7636
  additionalProperties: false
7455
7637
  };
7456
- var outputSchema31 = {
7638
+ var outputSchema29 = {
7457
7639
  type: "object",
7458
7640
  properties: {
7459
7641
  result: TypedArraySchema7({
@@ -7471,10 +7653,10 @@ class VectorNormalizeTask extends Task32 {
7471
7653
  static title = "Normalize";
7472
7654
  static description = "Returns the L2-normalized (unit length) vector";
7473
7655
  static inputSchema() {
7474
- return inputSchema32;
7656
+ return inputSchema30;
7475
7657
  }
7476
7658
  static outputSchema() {
7477
- return outputSchema31;
7659
+ return outputSchema29;
7478
7660
  }
7479
7661
  async execute(input2, _context) {
7480
7662
  return { result: normalize(input2.vector) };
@@ -7487,7 +7669,7 @@ import {
7487
7669
  createTypedArrayFrom as createTypedArrayFrom5,
7488
7670
  TypedArraySchema as TypedArraySchema8
7489
7671
  } from "@workglow/util";
7490
- var inputSchema33 = {
7672
+ var inputSchema31 = {
7491
7673
  type: "object",
7492
7674
  properties: {
7493
7675
  vector: TypedArraySchema8({
@@ -7503,7 +7685,7 @@ var inputSchema33 = {
7503
7685
  required: ["vector", "scalar"],
7504
7686
  additionalProperties: false
7505
7687
  };
7506
- var outputSchema32 = {
7688
+ var outputSchema30 = {
7507
7689
  type: "object",
7508
7690
  properties: {
7509
7691
  result: TypedArraySchema8({
@@ -7521,10 +7703,10 @@ class VectorScaleTask extends Task33 {
7521
7703
  static title = "Scale";
7522
7704
  static description = "Multiplies each element of a vector by a scalar";
7523
7705
  static inputSchema() {
7524
- return inputSchema33;
7706
+ return inputSchema31;
7525
7707
  }
7526
7708
  static outputSchema() {
7527
- return outputSchema32;
7709
+ return outputSchema30;
7528
7710
  }
7529
7711
  async execute(input2, _context) {
7530
7712
  const { vector, scalar } = input2;
@@ -7584,13 +7766,10 @@ export {
7584
7766
  registerCommonTasks,
7585
7767
  process,
7586
7768
  merge,
7587
- mcpTransportTypes,
7588
7769
  mcpToolCall,
7589
- mcpServerConfigSchema5 as mcpServerConfigSchema,
7590
7770
  mcpResourceRead,
7591
7771
  mcpPromptGet,
7592
7772
  mcpList,
7593
- mcpClientFactory5 as mcpClientFactory,
7594
7773
  lambdaTaskConfigSchema,
7595
7774
  lambda,
7596
7775
  json,
@@ -7599,7 +7778,6 @@ export {
7599
7778
  fetchUrl,
7600
7779
  delay,
7601
7780
  debugLog,
7602
- createMcpClient,
7603
7781
  VectorSumTask,
7604
7782
  VectorSubtractTask,
7605
7783
  VectorScaleTask,
@@ -7640,4 +7818,4 @@ export {
7640
7818
  ArrayTask
7641
7819
  };
7642
7820
 
7643
- //# debugId=B9BF1F6C8E1711C764756E2164756E21
7821
+ //# debugId=1E3D4020BD1C3CB964756E2164756E21