@alpic80/rivet-core 1.24.2-aidon.7 → 1.24.2-aidon.9

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.
@@ -10546,8 +10546,9 @@ var HttpCallNodeImpl = class extends NodeImpl {
10546
10546
  ];
10547
10547
  }
10548
10548
  getBody() {
10549
+ var _a;
10549
10550
  return import_ts_dedent.dedent`
10550
- ${this.data.useMethodInput ? "(Method Using Input)" : this.data.method} ${this.data.useUrlInput ? "(URL Using Input)" : this.data.url} ${this.data.useHeadersInput ? "\nHeaders: (Using Input)" : this.data.headers.trim() ? `
10551
+ ${this.data.useMethodInput ? "(Method Using Input)" : this.data.method} ${this.data.useUrlInput ? "(URL Using Input)" : this.data.url} ${this.data.useHeadersInput ? "\nHeaders: (Using Input)" : ((_a = this.data.headers) == null ? void 0 : _a.trim()) ? `
10551
10552
  Headers: ${this.data.headers}` : ""}${this.data.useBodyInput ? "\nBody: (Using Input)" : this.data.body.trim() ? `
10552
10553
  Body: ${this.data.body}` : ""}${this.data.errorOnNon200 ? "\nError on non-200" : ""}
10553
10554
  `;
@@ -10563,7 +10564,7 @@ Body: ${this.data.body}` : ""}${this.data.errorOnNon200 ? "\nError on non-200" :
10563
10564
  };
10564
10565
  }
10565
10566
  async process(inputs, context) {
10566
- var _a;
10567
+ var _a, _b;
10567
10568
  const method = getInputOrData(this.data, inputs, "method", "string");
10568
10569
  const url = getInputOrData(this.data, inputs, "url", "string");
10569
10570
  try {
@@ -10581,7 +10582,7 @@ Body: ${this.data.body}` : ""}${this.data.errorOnNon200 ? "\nError on non-200" :
10581
10582
  } else {
10582
10583
  headers = coerceType(headersInput, "object");
10583
10584
  }
10584
- } else if (this.data.headers.trim()) {
10585
+ } else if ((_a = this.data.headers) == null ? void 0 : _a.trim()) {
10585
10586
  headers = JSON.parse(this.data.headers);
10586
10587
  }
10587
10588
  let body;
@@ -10627,7 +10628,7 @@ Body: ${this.data.body}` : ""}${this.data.errorOnNon200 ? "\nError on non-200" :
10627
10628
  type: "string",
10628
10629
  value: responseText
10629
10630
  };
10630
- if ((_a = response.headers.get("content-type")) == null ? void 0 : _a.includes("application/json")) {
10631
+ if ((_b = response.headers.get("content-type")) == null ? void 0 : _b.includes("application/json")) {
10631
10632
  const jsonData = JSON.parse(responseText);
10632
10633
  output["json"] = {
10633
10634
  type: "object",
@@ -13874,6 +13875,13 @@ var getMCPBaseInputs = (data) => {
13874
13875
  description: "The endpoint URL for the MCP server"
13875
13876
  });
13876
13877
  }
13878
+ if (data.transportType === "http" && data.useHeadersInput) {
13879
+ inputs.push({
13880
+ dataType: "object",
13881
+ id: "headers",
13882
+ title: "Headers"
13883
+ });
13884
+ }
13877
13885
  return inputs;
13878
13886
  };
13879
13887
 
@@ -13894,6 +13902,7 @@ var MCPDiscoveryNodeImpl = class extends NodeImpl {
13894
13902
  version: "1.0.0",
13895
13903
  transportType: "stdio",
13896
13904
  serverUrl: "http://localhost:8080/mcp",
13905
+ headers: "",
13897
13906
  serverId: "",
13898
13907
  useNameInput: false,
13899
13908
  useVersionInput: false,
@@ -13966,13 +13975,22 @@ var MCPDiscoveryNodeImpl = class extends NodeImpl {
13966
13975
  }
13967
13976
  ];
13968
13977
  if (this.data.transportType === "http") {
13969
- editors.push({
13970
- type: "string",
13971
- label: "Server URL",
13972
- dataKey: "serverUrl",
13973
- useInputToggleDataKey: "useServerUrlInput",
13974
- helperMessage: "The base URL endpoint for the MCP server with `/mcp`"
13975
- });
13978
+ editors.push(
13979
+ {
13980
+ type: "string",
13981
+ label: "Server URL",
13982
+ dataKey: "serverUrl",
13983
+ useInputToggleDataKey: "useServerUrlInput",
13984
+ helperMessage: "The base URL endpoint for the MCP server with `/mcp`"
13985
+ },
13986
+ {
13987
+ type: "code",
13988
+ label: "Headers",
13989
+ dataKey: "headers",
13990
+ useInputToggleDataKey: "useHeadersInput",
13991
+ language: "json"
13992
+ }
13993
+ );
13976
13994
  } else if (this.data.transportType === "stdio") {
13977
13995
  const serverOptions = await getServerOptions(context);
13978
13996
  editors.push({
@@ -13986,15 +14004,19 @@ var MCPDiscoveryNodeImpl = class extends NodeImpl {
13986
14004
  return editors;
13987
14005
  }
13988
14006
  getBody(context) {
14007
+ var _a;
13989
14008
  let base;
14009
+ let headers = "";
13990
14010
  if (this.data.transportType === "http") {
13991
14011
  base = this.data.useServerUrlInput ? "(Using Server URL Input)" : this.data.serverUrl;
14012
+ headers = this.data.useHeadersInput ? "\nHeaders: (Using Input)" : ((_a = this.data.headers) == null ? void 0 : _a.trim()) ? `
14013
+ Headers: ${this.data.headers}` : "";
13992
14014
  } else {
13993
14015
  base = `Server ID: ${this.data.serverId || "(None)"}`;
13994
14016
  }
13995
14017
  const namePart = `Name: ${this.data.name}`;
13996
14018
  const versionPart = `Version: ${this.data.version}`;
13997
- const parts = [namePart, versionPart, base];
14019
+ const parts = [namePart, versionPart, base, headers];
13998
14020
  if (context.executor !== "nodejs") {
13999
14021
  parts.push("(Requires Node Executor)");
14000
14022
  }
@@ -14011,6 +14033,7 @@ var MCPDiscoveryNodeImpl = class extends NodeImpl {
14011
14033
  };
14012
14034
  }
14013
14035
  async process(inputs, context) {
14036
+ var _a;
14014
14037
  const name = getInputOrData(this.data, inputs, "name", "string");
14015
14038
  const version = getInputOrData(this.data, inputs, "version", "string");
14016
14039
  const transportType = getInputOrData(this.data, inputs, "transportType", "string");
@@ -14031,8 +14054,21 @@ var MCPDiscoveryNodeImpl = class extends NodeImpl {
14031
14054
  "Include /mcp in your server URL. For example: http://localhost:8080/mcp"
14032
14055
  );
14033
14056
  }
14034
- tools = await context.mcpProvider.getHTTPTools({ name, version }, serverUrl);
14035
- prompts = await context.mcpProvider.getHTTPrompts({ name, version }, serverUrl);
14057
+ let headers;
14058
+ if (this.data.useHeadersInput) {
14059
+ const headersInput = inputs["headers"];
14060
+ if ((headersInput == null ? void 0 : headersInput.type) === "string") {
14061
+ headers = JSON.parse(headersInput.value);
14062
+ } else if ((headersInput == null ? void 0 : headersInput.type) === "object") {
14063
+ headers = headersInput.value;
14064
+ } else {
14065
+ headers = coerceType(headersInput, "object");
14066
+ }
14067
+ } else if ((_a = this.data.headers) == null ? void 0 : _a.trim()) {
14068
+ headers = JSON.parse(this.data.headers);
14069
+ }
14070
+ tools = await context.mcpProvider.getHTTPTools({ name, version }, serverUrl, headers);
14071
+ prompts = await context.mcpProvider.getHTTPrompts({ name, version }, serverUrl, headers);
14036
14072
  } else if (transportType === "stdio") {
14037
14073
  const serverId = this.data.serverId ?? "";
14038
14074
  const mcpConfig = await loadMCPConfiguration(context);
@@ -14099,6 +14135,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
14099
14135
  version: "1.0.0",
14100
14136
  transportType: "stdio",
14101
14137
  serverUrl: "http://localhost:8080/mcp",
14138
+ headers: "",
14102
14139
  serverId: "",
14103
14140
  toolName: "",
14104
14141
  toolArguments: import_ts_dedent69.dedent`
@@ -14200,17 +14237,26 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
14200
14237
  label: "Tool ID",
14201
14238
  dataKey: "toolCallId",
14202
14239
  useInputToggleDataKey: "useToolCallIdInput",
14203
- helperMessage: "The name for the MCP Tool Call"
14240
+ helperMessage: "The ID associated with the tool call"
14204
14241
  }
14205
14242
  ];
14206
14243
  if (this.data.transportType === "http") {
14207
- editors.push({
14208
- type: "string",
14209
- label: "Server URL",
14210
- dataKey: "serverUrl",
14211
- useInputToggleDataKey: "useServerUrlInput",
14212
- helperMessage: "The endpoint URL for the MCP server to connect"
14213
- });
14244
+ editors.push(
14245
+ {
14246
+ type: "string",
14247
+ label: "Server URL",
14248
+ dataKey: "serverUrl",
14249
+ useInputToggleDataKey: "useServerUrlInput",
14250
+ helperMessage: "The base URL endpoint for the MCP server with `/mcp`"
14251
+ },
14252
+ {
14253
+ type: "code",
14254
+ label: "Headers",
14255
+ dataKey: "headers",
14256
+ useInputToggleDataKey: "useHeadersInput",
14257
+ language: "json"
14258
+ }
14259
+ );
14214
14260
  } else if (this.data.transportType === "stdio") {
14215
14261
  const serverOptions = await getServerOptions(context);
14216
14262
  editors.push({
@@ -14224,15 +14270,19 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
14224
14270
  return editors;
14225
14271
  }
14226
14272
  getBody(context) {
14273
+ var _a;
14227
14274
  let base;
14275
+ let headers = "";
14228
14276
  if (this.data.transportType === "http") {
14229
14277
  base = this.data.useServerUrlInput ? "(Using Server URL Input)" : this.data.serverUrl;
14278
+ headers = this.data.useHeadersInput ? "\nHeaders: (Using Input)" : ((_a = this.data.headers) == null ? void 0 : _a.trim()) ? `
14279
+ Headers: ${this.data.headers}` : "";
14230
14280
  } else {
14231
14281
  base = `Server ID: ${this.data.serverId || "(None)"}`;
14232
14282
  }
14233
14283
  const namePart = `Name: ${this.data.name}`;
14234
14284
  const versionPart = `Version: ${this.data.version}`;
14235
- const parts = [namePart, versionPart, base];
14285
+ const parts = [namePart, versionPart, base, headers];
14236
14286
  if (context.executor !== "nodejs") {
14237
14287
  parts.push("(Requires Node Executor)");
14238
14288
  }
@@ -14249,6 +14299,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
14249
14299
  };
14250
14300
  }
14251
14301
  async process(inputs, context) {
14302
+ var _a;
14252
14303
  const name = getInputOrData(this.data, inputs, "name", "string");
14253
14304
  const version = getInputOrData(this.data, inputs, "version", "string");
14254
14305
  const toolName = getInputOrData(this.data, inputs, "toolName", "string");
@@ -14293,7 +14344,20 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
14293
14344
  "Include /mcp in your server URL. For example: http://localhost:8080/mcp"
14294
14345
  );
14295
14346
  }
14296
- toolResponse = await context.mcpProvider.httpToolCall({ name, version }, serverUrl, toolCall);
14347
+ let headers;
14348
+ if (this.data.useHeadersInput) {
14349
+ const headersInput = inputs["headers"];
14350
+ if ((headersInput == null ? void 0 : headersInput.type) === "string") {
14351
+ headers = JSON.parse(headersInput.value);
14352
+ } else if ((headersInput == null ? void 0 : headersInput.type) === "object") {
14353
+ headers = headersInput.value;
14354
+ } else {
14355
+ headers = coerceType(headersInput, "object");
14356
+ }
14357
+ } else if ((_a = this.data.headers) == null ? void 0 : _a.trim()) {
14358
+ headers = JSON.parse(this.data.headers);
14359
+ }
14360
+ toolResponse = await context.mcpProvider.httpToolCall({ name, version }, serverUrl, headers, toolCall);
14297
14361
  } else if (transportType === "stdio") {
14298
14362
  const serverId = this.data.serverId ?? "";
14299
14363
  const mcpConfig = await loadMCPConfiguration(context);
@@ -14346,6 +14410,7 @@ var MCPGetPromptNodeImpl = class extends NodeImpl {
14346
14410
  version: "1.0.0",
14347
14411
  transportType: "stdio",
14348
14412
  serverUrl: "http://localhost:8080/mcp",
14413
+ headers: "",
14349
14414
  serverId: "",
14350
14415
  promptName: "",
14351
14416
  promptArguments: import_ts_dedent.dedent`
@@ -14430,13 +14495,22 @@ var MCPGetPromptNodeImpl = class extends NodeImpl {
14430
14495
  }
14431
14496
  ];
14432
14497
  if (this.data.transportType === "http") {
14433
- editors.push({
14434
- type: "string",
14435
- label: "Server URL",
14436
- dataKey: "serverUrl",
14437
- useInputToggleDataKey: "useServerUrlInput",
14438
- helperMessage: "The endpoint URL for the MCP server to connect"
14439
- });
14498
+ editors.push(
14499
+ {
14500
+ type: "string",
14501
+ label: "Server URL",
14502
+ dataKey: "serverUrl",
14503
+ useInputToggleDataKey: "useServerUrlInput",
14504
+ helperMessage: "The base URL endpoint for the MCP server with `/mcp`"
14505
+ },
14506
+ {
14507
+ type: "code",
14508
+ label: "Headers",
14509
+ dataKey: "headers",
14510
+ useInputToggleDataKey: "useHeadersInput",
14511
+ language: "json"
14512
+ }
14513
+ );
14440
14514
  } else if (this.data.transportType === "stdio") {
14441
14515
  const serverOptions = await getServerOptions(context);
14442
14516
  editors.push({
@@ -14450,15 +14524,19 @@ var MCPGetPromptNodeImpl = class extends NodeImpl {
14450
14524
  return editors;
14451
14525
  }
14452
14526
  getBody(context) {
14527
+ var _a;
14453
14528
  let base;
14529
+ let headers = "";
14454
14530
  if (this.data.transportType === "http") {
14455
14531
  base = this.data.useServerUrlInput ? "(Using Server URL Input)" : this.data.serverUrl;
14532
+ headers = this.data.useHeadersInput ? "\nHeaders: (Using Input)" : ((_a = this.data.headers) == null ? void 0 : _a.trim()) ? `
14533
+ Headers: ${this.data.headers}` : "";
14456
14534
  } else {
14457
14535
  base = `Server ID: ${this.data.serverId || "(None)"}`;
14458
14536
  }
14459
14537
  const namePart = `Name: ${this.data.name}`;
14460
14538
  const versionPart = `Version: ${this.data.version}`;
14461
- const parts = [namePart, versionPart, base];
14539
+ const parts = [namePart, versionPart, base, headers];
14462
14540
  if (context.executor !== "nodejs") {
14463
14541
  parts.push("(Requires Node Executor)");
14464
14542
  }
@@ -14475,6 +14553,7 @@ var MCPGetPromptNodeImpl = class extends NodeImpl {
14475
14553
  };
14476
14554
  }
14477
14555
  async process(inputs, context) {
14556
+ var _a;
14478
14557
  const name = getInputOrData(this.data, inputs, "name", "string");
14479
14558
  const version = getInputOrData(this.data, inputs, "version", "string");
14480
14559
  const promptName = getInputOrData(this.data, inputs, "promptName", "string");
@@ -14518,7 +14597,20 @@ var MCPGetPromptNodeImpl = class extends NodeImpl {
14518
14597
  "Include /mcp in your server URL. For example: http://localhost:8080/mcp"
14519
14598
  );
14520
14599
  }
14521
- getPromptResponse = await context.mcpProvider.getHTTPrompt({ name, version }, serverUrl, getPromptRequest);
14600
+ let headers;
14601
+ if (this.data.useHeadersInput) {
14602
+ const headersInput = inputs["headers"];
14603
+ if ((headersInput == null ? void 0 : headersInput.type) === "string") {
14604
+ headers = JSON.parse(headersInput.value);
14605
+ } else if ((headersInput == null ? void 0 : headersInput.type) === "object") {
14606
+ headers = headersInput.value;
14607
+ } else {
14608
+ headers = coerceType(headersInput, "object");
14609
+ }
14610
+ } else if ((_a = this.data.headers) == null ? void 0 : _a.trim()) {
14611
+ headers = JSON.parse(this.data.headers);
14612
+ }
14613
+ getPromptResponse = await context.mcpProvider.getHTTPrompt({ name, version }, serverUrl, headers, getPromptRequest);
14522
14614
  } else if (transportType === "stdio") {
14523
14615
  const serverId = this.data.serverId ?? "";
14524
14616
  const mcpConfig = await loadMCPConfiguration(context);
@@ -16776,25 +16868,6 @@ var aidonPlugin = {
16776
16868
  label: "Aidon API Key",
16777
16869
  description: "The API Key for the Aidon application.",
16778
16870
  helperText: "API Key for the Aidon application."
16779
- },
16780
- fileBrowserURL: {
16781
- type: "string",
16782
- label: "FileBrowser URL",
16783
- description: "The URL for the FileBrowser service.",
16784
- helperText: "Defaults to https://ai-fb.aidon.ai. URL for the FileBrowser service.",
16785
- default: "https://ai-fb.aidon.ai"
16786
- },
16787
- fileBrowserUsername: {
16788
- type: "string",
16789
- label: "FileBrowser Username",
16790
- description: "The username for the FileBrowser service.",
16791
- helperText: "Enter username given to access FileBrowser."
16792
- },
16793
- fileBrowserPassword: {
16794
- type: "secret",
16795
- label: "FileBrowser password",
16796
- description: "The password for the FileBrowser service.",
16797
- helperText: "Enter passord given to access FileBrowser."
16798
16871
  }
16799
16872
  },
16800
16873
  register: (register) => {