@probelabs/visor 0.1.138-ee → 0.1.139-ee

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 (26) hide show
  1. package/dist/index.js +25 -13
  2. package/dist/providers/mcp-check-provider.d.ts.map +1 -1
  3. package/dist/providers/workflow-check-provider.d.ts.map +1 -1
  4. package/dist/sdk/{check-provider-registry-B5X3AL4Z.mjs → check-provider-registry-BQD6S2SI.mjs} +2 -2
  5. package/dist/sdk/{check-provider-registry-XRD3J74K.mjs → check-provider-registry-EHLKMSLE.mjs} +2 -2
  6. package/dist/sdk/{chunk-SUZCXRJ4.mjs → chunk-LZJATBWH.mjs} +30 -18
  7. package/dist/sdk/{chunk-3CREE2RR.mjs.map → chunk-LZJATBWH.mjs.map} +1 -1
  8. package/dist/sdk/{chunk-3CREE2RR.mjs → chunk-TJXIVJ37.mjs} +30 -18
  9. package/dist/sdk/{chunk-SUZCXRJ4.mjs.map → chunk-TJXIVJ37.mjs.map} +1 -1
  10. package/dist/sdk/{schedule-tool-handler-47KJUUJH.mjs → schedule-tool-handler-7FGVBTTW.mjs} +3 -3
  11. package/dist/sdk/{schedule-tool-handler-WHB5AGLT.mjs → schedule-tool-handler-AVPJACU6.mjs} +3 -3
  12. package/dist/sdk/sdk.js +24 -12
  13. package/dist/sdk/sdk.js.map +1 -1
  14. package/dist/sdk/sdk.mjs +1 -1
  15. package/dist/sdk/{workflow-check-provider-D375GDQS.mjs → workflow-check-provider-A6J5AEK4.mjs} +3 -3
  16. package/dist/sdk/{workflow-check-provider-MIFPOENL.mjs → workflow-check-provider-KCNRNZEO.mjs} +3 -3
  17. package/dist/state-machine/workflow-projection.d.ts.map +1 -1
  18. package/dist/types/workflow.d.ts +2 -0
  19. package/dist/types/workflow.d.ts.map +1 -1
  20. package/package.json +1 -1
  21. /package/dist/sdk/{check-provider-registry-B5X3AL4Z.mjs.map → check-provider-registry-BQD6S2SI.mjs.map} +0 -0
  22. /package/dist/sdk/{check-provider-registry-XRD3J74K.mjs.map → check-provider-registry-EHLKMSLE.mjs.map} +0 -0
  23. /package/dist/sdk/{schedule-tool-handler-47KJUUJH.mjs.map → schedule-tool-handler-7FGVBTTW.mjs.map} +0 -0
  24. /package/dist/sdk/{schedule-tool-handler-WHB5AGLT.mjs.map → schedule-tool-handler-AVPJACU6.mjs.map} +0 -0
  25. /package/dist/sdk/{workflow-check-provider-D375GDQS.mjs.map → workflow-check-provider-A6J5AEK4.mjs.map} +0 -0
  26. /package/dist/sdk/{workflow-check-provider-MIFPOENL.mjs.map → workflow-check-provider-KCNRNZEO.mjs.map} +0 -0
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- process.env.VISOR_VERSION = '0.1.138';
2
+ process.env.VISOR_VERSION = '0.1.139';
3
3
  process.env.PROBE_VERSION = '0.6.0-rc257';
4
- process.env.VISOR_COMMIT_SHA = '0fe252c4d2e04567b4f5d72d73796d0abc3a88f7';
5
- process.env.VISOR_COMMIT_SHORT = '0fe252c';
4
+ process.env.VISOR_COMMIT_SHA = 'aa10b1837c5ab4db49ff46f5391606063e95d13b';
5
+ process.env.VISOR_COMMIT_SHORT = 'aa10b18';
6
6
  /******/ (() => { // webpackBootstrap
7
7
  /******/ var __webpack_modules__ = ({
8
8
 
@@ -188294,7 +188294,7 @@ class McpCheckProvider extends check_provider_interface_1.CheckProvider {
188294
188294
  }
188295
188295
  }
188296
188296
  // Create MCP client and execute method
188297
- const result = await this.executeMcpMethod(cfg, methodArgs, prInfo, dependencyResults);
188297
+ const result = await this.executeMcpMethod(cfg, methodArgs, prInfo, dependencyResults, sessionInfo);
188298
188298
  // Apply transforms if specified
188299
188299
  let finalOutput = result;
188300
188300
  // Apply Liquid transform
@@ -188404,19 +188404,29 @@ class McpCheckProvider extends check_provider_interface_1.CheckProvider {
188404
188404
  /**
188405
188405
  * Execute an MCP method using the configured transport
188406
188406
  */
188407
- async executeMcpMethod(config, methodArgs, prInfo, dependencyResults) {
188407
+ async executeMcpMethod(config, methodArgs, prInfo, dependencyResults, sessionInfo) {
188408
188408
  const transport = config.transport || 'stdio';
188409
188409
  const timeout = (config.timeout || 60) * 1000; // Convert to milliseconds
188410
188410
  if (transport === 'custom') {
188411
- // Execute custom YAML-defined tool
188412
- if (!this.customToolExecutor) {
188413
- throw new Error('No custom tools available. Define tools in the "tools" section of your configuration.');
188414
- }
188415
- const hasTool = await this.customToolExecutor.hasTool(config.method);
188416
- if (!hasTool) {
188417
- const availableToolNames = await this.customToolExecutor.getToolNames();
188411
+ // Check both local execution context and global registry for tools
188412
+ const localTools = sessionInfo?._parentContext?.config?.tools || sessionInfo?.config?.tools || {};
188413
+ let localExecutor;
188414
+ if (Object.keys(localTools).length > 0) {
188415
+ localExecutor = new custom_tool_executor_1.CustomToolExecutor(localTools);
188416
+ }
188417
+ const hasLocalTool = localExecutor ? await localExecutor.hasTool(config.method) : false;
188418
+ const hasGlobalTool = this.customToolExecutor
188419
+ ? await this.customToolExecutor.hasTool(config.method)
188420
+ : false;
188421
+ if (!hasLocalTool && !hasGlobalTool) {
188422
+ const localNames = localExecutor ? await localExecutor.getToolNames() : [];
188423
+ const globalNames = this.customToolExecutor
188424
+ ? await this.customToolExecutor.getToolNames()
188425
+ : [];
188426
+ const availableToolNames = [...new Set([...localNames, ...globalNames])];
188418
188427
  throw new Error(`Custom tool not found: ${config.method}. Available tools: ${availableToolNames.join(', ')}`);
188419
188428
  }
188429
+ const activeExecutor = hasLocalTool ? localExecutor : this.customToolExecutor;
188420
188430
  // Build context for custom tool execution
188421
188431
  const context = {
188422
188432
  pr: prInfo
@@ -188432,7 +188442,7 @@ class McpCheckProvider extends check_provider_interface_1.CheckProvider {
188432
188442
  outputs: this.buildOutputContext(dependencyResults),
188433
188443
  env: this.getSafeEnvironmentVariables(),
188434
188444
  };
188435
- return await this.customToolExecutor.execute(config.method, methodArgs, context);
188445
+ return await activeExecutor.execute(config.method, methodArgs, context);
188436
188446
  }
188437
188447
  else if (transport === 'stdio') {
188438
188448
  return await this.executeStdioMethod(config, methodArgs, timeout);
@@ -191126,6 +191136,7 @@ class WorkflowCheckProvider extends check_provider_interface_1.CheckProvider {
191126
191136
  // Carry over optional inputs/outputs if present so callers can consume them
191127
191137
  inputs: loaded.inputs,
191128
191138
  outputs: loaded.outputs,
191139
+ tools: loaded.tools,
191129
191140
  };
191130
191141
  return workflowDef;
191131
191142
  }
@@ -209074,6 +209085,7 @@ function projectWorkflowToGraph(workflow, workflowInputs, _parentCheckId) {
209074
209085
  // Create a synthetic config for this workflow
209075
209086
  const config = {
209076
209087
  checks,
209088
+ tools: workflow.tools,
209077
209089
  version: '1.0',
209078
209090
  output: {
209079
209091
  pr_comment: {
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/mcp-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAe,MAAM,aAAa,CAAC;AAYzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAyCvD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,mBAAmB;IACzD,4GAA4G;IAC5G,SAAS,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;IAChD,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,kDAAkD;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4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C;;OAEG;YACW,gBAAgB;IAuB9B;;OAEG;YACW,iBAAiB;IAwB/B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAgB1B;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAcnC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAuD/B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;OAEG;IACH,OAAO,CAAC,cAAc;IAyDtB,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,QAAQ;IAWhB,sBAAsB,IAAI,MAAM,EAAE;IAwB5B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAKrC,eAAe,IAAI,MAAM,EAAE;CAG5B"}
1
+ {"version":3,"file":"mcp-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/mcp-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAe,MAAM,aAAa,CAAC;AAYzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAyCvD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,mBAAmB;IACzD,4GAA4G;IAC5G,SAAS,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;IAChD,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,kDAAkD;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CA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W,iBAAiB;IAwB/B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAgB1B;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAcnC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAuD/B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;OAEG;IACH,OAAO,CAAC,cAAc;IAyDtB,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,QAAQ;IAWhB,sBAAsB,IAAI,MAAM,EAAE;IAwB5B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAKrC,eAAe,IAAI,MAAM,EAAE;CAG5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/workflow-check-provider.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAClG,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAa5C;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,aAAa;IACtD,OAAO,CAAC,QAAQ,CAAmB;IACnC,OAAO,CAAC,QAAQ,CAAmB;IACnC,OAAO,CAAC,MAAM,CAAS;;IASvB,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIlB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAwBjD,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAC9C,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,aAAa,CAAC;IAiIzB,sBAAsB,IAAI,MAAM,EAAE;IAa5B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAIrC,eAAe,IAAI,MAAM,EAAE;IAI3B;;OAEG;YACW,aAAa;IAsN3B;;OAEG;IACH,OAAO,CAAC,cAAc;IA4BtB;;OAEG;IACH,OAAO,CAAC,UAAU;IA0BlB;;OAEG;IACH;;OAEG;YACW,sBAAsB;IAsOpC;;OAEG;YACW,+BAA+B;IA2J7C;;OAEG;IACH,OAAO,CAAC,oCAAoC;IA8B5C,OAAO,CAAC,oBAAoB;IA6C5B;;;OAGG;YACW,0BAA0B;CAuEzC"}
1
+ {"version":3,"file":"workflow-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/workflow-check-provider.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAClG,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAa5C;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,aAAa;IACtD,OAAO,CAAC,QAAQ,CAAmB;IACnC,OAAO,CAAC,QAAQ,CAAmB;IACnC,OAAO,CAAC,MAAM,CAAS;;IASvB,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIlB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAwBjD,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAC9C,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,aAAa,CAAC;IAiIzB,sBAAsB,IAAI,MAAM,EAAE;IAa5B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAIrC,eAAe,IAAI,MAAM,EAAE;IAI3B;;OAEG;YACW,aAAa;IAsN3B;;OAEG;IACH,OAAO,CAAC,cAAc;IA4BtB;;OAEG;IACH,OAAO,CAAC,UAAU;IA0BlB;;OAEG;IACH;;OAEG;YACW,sBAAsB;IAsOpC;;OAEG;YACW,+BAA+B;IA2J7C;;OAEG;IACH,OAAO,CAAC,oCAAoC;IA8B5C,OAAO,CAAC,oBAAoB;IA6C5B;;;OAGG;YACW,0BAA0B;CAwEzC"}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CheckProviderRegistry,
3
3
  init_check_provider_registry
4
- } from "./chunk-SUZCXRJ4.mjs";
4
+ } from "./chunk-LZJATBWH.mjs";
5
5
  import "./chunk-KFKHU6CM.mjs";
6
6
  import "./chunk-LG4AUKHB.mjs";
7
7
  import "./chunk-B7BVQM5K.mjs";
@@ -26,4 +26,4 @@ init_check_provider_registry();
26
26
  export {
27
27
  CheckProviderRegistry
28
28
  };
29
- //# sourceMappingURL=check-provider-registry-B5X3AL4Z.mjs.map
29
+ //# sourceMappingURL=check-provider-registry-BQD6S2SI.mjs.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CheckProviderRegistry,
3
3
  init_check_provider_registry
4
- } from "./chunk-3CREE2RR.mjs";
4
+ } from "./chunk-TJXIVJ37.mjs";
5
5
  import "./chunk-LG4AUKHB.mjs";
6
6
  import "./chunk-KFKHU6CM.mjs";
7
7
  import "./chunk-B7BVQM5K.mjs";
@@ -26,4 +26,4 @@ init_check_provider_registry();
26
26
  export {
27
27
  CheckProviderRegistry
28
28
  };
29
- //# sourceMappingURL=check-provider-registry-XRD3J74K.mjs.map
29
+ //# sourceMappingURL=check-provider-registry-EHLKMSLE.mjs.map
@@ -3922,7 +3922,7 @@ async function executeWorkflowAsTool(workflowId, args, context2, argsOverrides)
3922
3922
  ...args,
3923
3923
  ...argsOverrides
3924
3924
  };
3925
- const { WorkflowCheckProvider: WorkflowCheckProvider2 } = await import("./workflow-check-provider-D375GDQS.mjs");
3925
+ const { WorkflowCheckProvider: WorkflowCheckProvider2 } = await import("./workflow-check-provider-KCNRNZEO.mjs");
3926
3926
  const provider = new WorkflowCheckProvider2();
3927
3927
  const checkConfig = {
3928
3928
  type: "workflow",
@@ -11408,7 +11408,7 @@ var init_state_machine_execution_engine = __esm({
11408
11408
  try {
11409
11409
  const map = options?.webhookContext?.webhookData;
11410
11410
  if (map) {
11411
- const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-B5X3AL4Z.mjs");
11411
+ const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-BQD6S2SI.mjs");
11412
11412
  const reg = CheckProviderRegistry2.getInstance();
11413
11413
  const p = reg.getProvider("http_input");
11414
11414
  if (p && typeof p.setWebhookContext === "function") p.setWebhookContext(map);
@@ -11531,7 +11531,7 @@ var init_state_machine_execution_engine = __esm({
11531
11531
  tag_filter: tagFilter
11532
11532
  } : config;
11533
11533
  try {
11534
- const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-B5X3AL4Z.mjs");
11534
+ const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-BQD6S2SI.mjs");
11535
11535
  const registry = CheckProviderRegistry2.getInstance();
11536
11536
  registry.setCustomTools(configWithTagFilter.tools || {});
11537
11537
  } catch (error) {
@@ -11595,7 +11595,7 @@ var init_state_machine_execution_engine = __esm({
11595
11595
  try {
11596
11596
  const webhookData = this.executionContext?.webhookContext?.webhookData;
11597
11597
  if (webhookData instanceof Map) {
11598
- const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-47KJUUJH.mjs");
11598
+ const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-AVPJACU6.mjs");
11599
11599
  const slackCtx = extractSlackContext2(webhookData);
11600
11600
  if (slackCtx) {
11601
11601
  const payload = Array.from(webhookData.values())[0];
@@ -35704,7 +35704,13 @@ var init_mcp_check_provider = __esm({
35704
35704
  };
35705
35705
  }
35706
35706
  }
35707
- const result = await this.executeMcpMethod(cfg, methodArgs, prInfo, dependencyResults);
35707
+ const result = await this.executeMcpMethod(
35708
+ cfg,
35709
+ methodArgs,
35710
+ prInfo,
35711
+ dependencyResults,
35712
+ sessionInfo
35713
+ );
35708
35714
  let finalOutput = result;
35709
35715
  if (cfg.transform) {
35710
35716
  try {
@@ -35805,22 +35811,26 @@ var init_mcp_check_provider = __esm({
35805
35811
  /**
35806
35812
  * Execute an MCP method using the configured transport
35807
35813
  */
35808
- async executeMcpMethod(config, methodArgs, prInfo, dependencyResults) {
35814
+ async executeMcpMethod(config, methodArgs, prInfo, dependencyResults, sessionInfo) {
35809
35815
  const transport = config.transport || "stdio";
35810
35816
  const timeout = (config.timeout || 60) * 1e3;
35811
35817
  if (transport === "custom") {
35812
- if (!this.customToolExecutor) {
35813
- throw new Error(
35814
- 'No custom tools available. Define tools in the "tools" section of your configuration.'
35815
- );
35816
- }
35817
- const hasTool = await this.customToolExecutor.hasTool(config.method);
35818
- if (!hasTool) {
35819
- const availableToolNames = await this.customToolExecutor.getToolNames();
35818
+ const localTools = sessionInfo?._parentContext?.config?.tools || sessionInfo?.config?.tools || {};
35819
+ let localExecutor;
35820
+ if (Object.keys(localTools).length > 0) {
35821
+ localExecutor = new CustomToolExecutor(localTools);
35822
+ }
35823
+ const hasLocalTool = localExecutor ? await localExecutor.hasTool(config.method) : false;
35824
+ const hasGlobalTool = this.customToolExecutor ? await this.customToolExecutor.hasTool(config.method) : false;
35825
+ if (!hasLocalTool && !hasGlobalTool) {
35826
+ const localNames = localExecutor ? await localExecutor.getToolNames() : [];
35827
+ const globalNames = this.customToolExecutor ? await this.customToolExecutor.getToolNames() : [];
35828
+ const availableToolNames = [.../* @__PURE__ */ new Set([...localNames, ...globalNames])];
35820
35829
  throw new Error(
35821
35830
  `Custom tool not found: ${config.method}. Available tools: ${availableToolNames.join(", ")}`
35822
35831
  );
35823
35832
  }
35833
+ const activeExecutor = hasLocalTool ? localExecutor : this.customToolExecutor;
35824
35834
  const context2 = {
35825
35835
  pr: prInfo ? {
35826
35836
  number: prInfo.number,
@@ -35833,7 +35843,7 @@ var init_mcp_check_provider = __esm({
35833
35843
  outputs: this.buildOutputContext(dependencyResults),
35834
35844
  env: this.getSafeEnvironmentVariables()
35835
35845
  };
35836
- return await this.customToolExecutor.execute(config.method, methodArgs, context2);
35846
+ return await activeExecutor.execute(config.method, methodArgs, context2);
35837
35847
  } else if (transport === "stdio") {
35838
35848
  return await this.executeStdioMethod(config, methodArgs, timeout);
35839
35849
  } else if (transport === "sse") {
@@ -37280,7 +37290,7 @@ function buildBuiltinGlobals(opts) {
37280
37290
  const scheduleFn = async (args = {}) => {
37281
37291
  try {
37282
37292
  const { handleScheduleAction: handleScheduleAction2, buildScheduleToolContext: buildScheduleToolContext2 } = await import("./schedule-tool-2COUUTF7.mjs");
37283
- const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-47KJUUJH.mjs");
37293
+ const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-AVPJACU6.mjs");
37284
37294
  const parentCtx = opts.sessionInfo?._parentContext;
37285
37295
  const webhookData = parentCtx?.prInfo?.eventContext?.webhookData;
37286
37296
  const visorCfg = parentCtx?.config;
@@ -39414,6 +39424,7 @@ function projectWorkflowToGraph(workflow, workflowInputs, _parentCheckId) {
39414
39424
  }
39415
39425
  const config = {
39416
39426
  checks,
39427
+ tools: workflow.tools,
39417
39428
  version: "1.0",
39418
39429
  output: {
39419
39430
  pr_comment: {
@@ -40201,7 +40212,8 @@ ${errors}`);
40201
40212
  on: loaded.on,
40202
40213
  // Carry over optional inputs/outputs if present so callers can consume them
40203
40214
  inputs: loaded.inputs,
40204
- outputs: loaded.outputs
40215
+ outputs: loaded.outputs,
40216
+ tools: loaded.tools
40205
40217
  };
40206
40218
  return workflowDef;
40207
40219
  }
@@ -40232,4 +40244,4 @@ undici/lib/fetch/body.js:
40232
40244
  undici/lib/websocket/frame.js:
40233
40245
  (*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
40234
40246
  */
40235
- //# sourceMappingURL=chunk-SUZCXRJ4.mjs.map
40247
+ //# sourceMappingURL=chunk-LZJATBWH.mjs.map