@probelabs/visor 0.1.174 → 0.1.175

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 (84) hide show
  1. package/README.md +3 -2
  2. package/dist/cli-main.d.ts.map +1 -1
  3. package/dist/docs/guides/tdd-assistant-workflows.md +519 -0
  4. package/dist/docs/testing/dsl-reference.md +93 -0
  5. package/dist/examples/lifecycle-hooks.tests.yaml +62 -0
  6. package/dist/generated/config-schema.d.ts +28 -7
  7. package/dist/generated/config-schema.d.ts.map +1 -1
  8. package/dist/generated/config-schema.json +31 -7
  9. package/dist/index.js +331 -26
  10. package/dist/output/traces/{run-2026-03-09T15-44-30-340Z.ndjson → run-2026-03-09T18-49-07-663Z.ndjson} +84 -84
  11. package/dist/output/traces/{run-2026-03-09T15-45-10-778Z.ndjson → run-2026-03-09T18-49-46-345Z.ndjson} +1917 -1901
  12. package/dist/providers/ai-check-provider.d.ts.map +1 -1
  13. package/dist/providers/mcp-custom-sse-server.d.ts +4 -0
  14. package/dist/providers/mcp-custom-sse-server.d.ts.map +1 -1
  15. package/dist/sdk/{a2a-frontend-5L6H7ZVF.mjs → a2a-frontend-ORLAU5GK.mjs} +2 -2
  16. package/dist/sdk/{check-provider-registry-UPQNHHFF.mjs → check-provider-registry-7JPPJHVM.mjs} +3 -3
  17. package/dist/sdk/{check-provider-registry-YVQI4IOR.mjs → check-provider-registry-O36CQEGD.mjs} +3 -3
  18. package/dist/sdk/{check-provider-registry-UM762L7S.mjs → check-provider-registry-QCDV3SI6.mjs} +6 -6
  19. package/dist/sdk/{chunk-ZI3SEHWA.mjs → chunk-4FGX4SA6.mjs} +2 -2
  20. package/dist/sdk/{chunk-ZI3SEHWA.mjs.map → chunk-4FGX4SA6.mjs.map} +1 -1
  21. package/dist/sdk/{chunk-2PL2YH3B.mjs → chunk-FZPCP444.mjs} +153 -14
  22. package/dist/sdk/chunk-FZPCP444.mjs.map +1 -0
  23. package/dist/sdk/{chunk-UTBSBJFV.mjs → chunk-HNK5ZJ2L.mjs} +2 -2
  24. package/dist/sdk/{chunk-W4KCJM6J.mjs → chunk-MLXGCLZJ.mjs} +29 -8
  25. package/dist/sdk/chunk-MLXGCLZJ.mjs.map +1 -0
  26. package/dist/sdk/{chunk-YEARBXYT.mjs → chunk-QAO73GUX.mjs} +3 -3
  27. package/dist/sdk/{chunk-I6GKXMQ5.mjs → chunk-TAK5HLAR.mjs} +153 -14
  28. package/dist/sdk/chunk-TAK5HLAR.mjs.map +1 -0
  29. package/dist/sdk/{chunk-EP7PQ4IX.mjs → chunk-YVVOG7RP.mjs} +161 -22
  30. package/dist/sdk/chunk-YVVOG7RP.mjs.map +1 -0
  31. package/dist/sdk/{config-BVL3KFMB.mjs → config-4JMBJKWS.mjs} +2 -2
  32. package/dist/sdk/{failure-condition-evaluator-4O6BTC4Q.mjs → failure-condition-evaluator-RM5JJS4Q.mjs} +3 -3
  33. package/dist/sdk/{github-frontend-UXL73NKB.mjs → github-frontend-O5IAWXL5.mjs} +3 -3
  34. package/dist/sdk/{host-KJTXX76P.mjs → host-WTJBWO4T.mjs} +3 -3
  35. package/dist/sdk/{routing-AWYB2YX3.mjs → routing-AWOHU2WP.mjs} +4 -4
  36. package/dist/sdk/{schedule-tool-UMDRCNO5.mjs → schedule-tool-DF5WUVYV.mjs} +3 -3
  37. package/dist/sdk/{schedule-tool-SGCYDSHL.mjs → schedule-tool-L5G2BRIG.mjs} +6 -6
  38. package/dist/sdk/{schedule-tool-IEY2CFLU.mjs → schedule-tool-XVSYLH4Z.mjs} +3 -3
  39. package/dist/sdk/{schedule-tool-handler-5EPTHBLS.mjs → schedule-tool-handler-CFMFHDUL.mjs} +3 -3
  40. package/dist/sdk/{schedule-tool-handler-HMEGLYJF.mjs → schedule-tool-handler-JGWA4N3C.mjs} +3 -3
  41. package/dist/sdk/{schedule-tool-handler-5QVUZ5EZ.mjs → schedule-tool-handler-UJ4RFTW2.mjs} +6 -6
  42. package/dist/sdk/sdk.d.mts +9 -1
  43. package/dist/sdk/sdk.d.ts +9 -1
  44. package/dist/sdk/sdk.js +173 -13
  45. package/dist/sdk/sdk.js.map +1 -1
  46. package/dist/sdk/sdk.mjs +5 -5
  47. package/dist/sdk/{trace-helpers-6TEWG7RK.mjs → trace-helpers-4ERTVCZG.mjs} +2 -2
  48. package/dist/sdk/{workflow-check-provider-VJ7VIMCQ.mjs → workflow-check-provider-ETM452BO.mjs} +3 -3
  49. package/dist/sdk/{workflow-check-provider-7VNIO6L5.mjs → workflow-check-provider-I3XLJP6V.mjs} +6 -6
  50. package/dist/sdk/{workflow-check-provider-EWMZEEES.mjs → workflow-check-provider-Z6U7FZAF.mjs} +3 -3
  51. package/dist/test-runner/conversation-sugar.d.ts.map +1 -1
  52. package/dist/test-runner/index.d.ts +19 -0
  53. package/dist/test-runner/index.d.ts.map +1 -1
  54. package/dist/test-runner/validator.d.ts.map +1 -1
  55. package/dist/traces/{run-2026-03-09T15-44-30-340Z.ndjson → run-2026-03-09T18-49-07-663Z.ndjson} +84 -84
  56. package/dist/traces/{run-2026-03-09T15-45-10-778Z.ndjson → run-2026-03-09T18-49-46-345Z.ndjson} +1917 -1901
  57. package/dist/types/config.d.ts +9 -1
  58. package/dist/types/config.d.ts.map +1 -1
  59. package/package.json +1 -1
  60. package/dist/sdk/chunk-2PL2YH3B.mjs.map +0 -1
  61. package/dist/sdk/chunk-EP7PQ4IX.mjs.map +0 -1
  62. package/dist/sdk/chunk-I6GKXMQ5.mjs.map +0 -1
  63. package/dist/sdk/chunk-W4KCJM6J.mjs.map +0 -1
  64. /package/dist/sdk/{a2a-frontend-5L6H7ZVF.mjs.map → a2a-frontend-ORLAU5GK.mjs.map} +0 -0
  65. /package/dist/sdk/{check-provider-registry-UM762L7S.mjs.map → check-provider-registry-7JPPJHVM.mjs.map} +0 -0
  66. /package/dist/sdk/{check-provider-registry-UPQNHHFF.mjs.map → check-provider-registry-O36CQEGD.mjs.map} +0 -0
  67. /package/dist/sdk/{check-provider-registry-YVQI4IOR.mjs.map → check-provider-registry-QCDV3SI6.mjs.map} +0 -0
  68. /package/dist/sdk/{chunk-UTBSBJFV.mjs.map → chunk-HNK5ZJ2L.mjs.map} +0 -0
  69. /package/dist/sdk/{chunk-YEARBXYT.mjs.map → chunk-QAO73GUX.mjs.map} +0 -0
  70. /package/dist/sdk/{config-BVL3KFMB.mjs.map → config-4JMBJKWS.mjs.map} +0 -0
  71. /package/dist/sdk/{failure-condition-evaluator-4O6BTC4Q.mjs.map → failure-condition-evaluator-RM5JJS4Q.mjs.map} +0 -0
  72. /package/dist/sdk/{github-frontend-UXL73NKB.mjs.map → github-frontend-O5IAWXL5.mjs.map} +0 -0
  73. /package/dist/sdk/{host-KJTXX76P.mjs.map → host-WTJBWO4T.mjs.map} +0 -0
  74. /package/dist/sdk/{routing-AWYB2YX3.mjs.map → routing-AWOHU2WP.mjs.map} +0 -0
  75. /package/dist/sdk/{schedule-tool-IEY2CFLU.mjs.map → schedule-tool-DF5WUVYV.mjs.map} +0 -0
  76. /package/dist/sdk/{schedule-tool-SGCYDSHL.mjs.map → schedule-tool-L5G2BRIG.mjs.map} +0 -0
  77. /package/dist/sdk/{schedule-tool-UMDRCNO5.mjs.map → schedule-tool-XVSYLH4Z.mjs.map} +0 -0
  78. /package/dist/sdk/{schedule-tool-handler-5EPTHBLS.mjs.map → schedule-tool-handler-CFMFHDUL.mjs.map} +0 -0
  79. /package/dist/sdk/{schedule-tool-handler-5QVUZ5EZ.mjs.map → schedule-tool-handler-JGWA4N3C.mjs.map} +0 -0
  80. /package/dist/sdk/{schedule-tool-handler-HMEGLYJF.mjs.map → schedule-tool-handler-UJ4RFTW2.mjs.map} +0 -0
  81. /package/dist/sdk/{trace-helpers-6TEWG7RK.mjs.map → trace-helpers-4ERTVCZG.mjs.map} +0 -0
  82. /package/dist/sdk/{workflow-check-provider-7VNIO6L5.mjs.map → workflow-check-provider-ETM452BO.mjs.map} +0 -0
  83. /package/dist/sdk/{workflow-check-provider-EWMZEEES.mjs.map → workflow-check-provider-I3XLJP6V.mjs.map} +0 -0
  84. /package/dist/sdk/{workflow-check-provider-VJ7VIMCQ.mjs.map → workflow-check-provider-Z6U7FZAF.mjs.map} +0 -0
@@ -2,7 +2,7 @@ import {
2
2
  ConfigManager,
3
3
  VALID_EVENT_TRIGGERS,
4
4
  init_config
5
- } from "./chunk-W4KCJM6J.mjs";
5
+ } from "./chunk-MLXGCLZJ.mjs";
6
6
  import "./chunk-KWTCTEFT.mjs";
7
7
  import "./chunk-LW3INISN.mjs";
8
8
  import "./chunk-FT3I25QV.mjs";
@@ -13,4 +13,4 @@ export {
13
13
  ConfigManager,
14
14
  VALID_EVENT_TRIGGERS
15
15
  };
16
- //# sourceMappingURL=config-BVL3KFMB.mjs.map
16
+ //# sourceMappingURL=config-4JMBJKWS.mjs.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  FailureConditionEvaluator,
3
3
  init_failure_condition_evaluator
4
- } from "./chunk-UTBSBJFV.mjs";
5
- import "./chunk-ZI3SEHWA.mjs";
4
+ } from "./chunk-HNK5ZJ2L.mjs";
5
+ import "./chunk-4FGX4SA6.mjs";
6
6
  import "./chunk-6VVXKXTI.mjs";
7
7
  import "./chunk-34QX63WK.mjs";
8
8
  import "./chunk-25IC7KXZ.mjs";
@@ -15,4 +15,4 @@ init_failure_condition_evaluator();
15
15
  export {
16
16
  FailureConditionEvaluator
17
17
  };
18
- //# sourceMappingURL=failure-condition-evaluator-4O6BTC4Q.mjs.map
18
+ //# sourceMappingURL=failure-condition-evaluator-RM5JJS4Q.mjs.map
@@ -5,8 +5,8 @@ import {
5
5
  import {
6
6
  failure_condition_evaluator_exports,
7
7
  init_failure_condition_evaluator
8
- } from "./chunk-UTBSBJFV.mjs";
9
- import "./chunk-ZI3SEHWA.mjs";
8
+ } from "./chunk-HNK5ZJ2L.mjs";
9
+ import "./chunk-4FGX4SA6.mjs";
10
10
  import {
11
11
  generateShortHumanId,
12
12
  init_human_id
@@ -1383,4 +1383,4 @@ init_github_frontend();
1383
1383
  export {
1384
1384
  GitHubFrontend
1385
1385
  };
1386
- //# sourceMappingURL=github-frontend-UXL73NKB.mjs.map
1386
+ //# sourceMappingURL=github-frontend-O5IAWXL5.mjs.map
@@ -24,7 +24,7 @@ var init_host = __esm({
24
24
  const { NdjsonSink } = await import("./ndjson-sink-FD2PSXGD.mjs");
25
25
  this.frontends.push(new NdjsonSink(spec.config));
26
26
  } else if (spec.name === "github") {
27
- const { GitHubFrontend } = await import("./github-frontend-UXL73NKB.mjs");
27
+ const { GitHubFrontend } = await import("./github-frontend-O5IAWXL5.mjs");
28
28
  this.frontends.push(new GitHubFrontend());
29
29
  } else if (spec.name === "slack") {
30
30
  const { SlackFrontend } = await import("./slack-frontend-6SXPTQDI.mjs");
@@ -45,7 +45,7 @@ var init_host = __esm({
45
45
  const { TeamsFrontend } = await import("./teams-frontend-DNW5GZP3.mjs");
46
46
  this.frontends.push(new TeamsFrontend(spec.config));
47
47
  } else if (spec.name === "a2a") {
48
- const { A2AFrontend } = await import("./a2a-frontend-5L6H7ZVF.mjs");
48
+ const { A2AFrontend } = await import("./a2a-frontend-ORLAU5GK.mjs");
49
49
  this.frontends.push(new A2AFrontend(spec.config));
50
50
  } else {
51
51
  this.log.warn(`[FrontendsHost] Unknown frontend '${spec.name}', skipping`);
@@ -84,4 +84,4 @@ export {
84
84
  FrontendsHost,
85
85
  isActiveFrontend
86
86
  };
87
- //# sourceMappingURL=host-KJTXX76P.mjs.map
87
+ //# sourceMappingURL=host-WTJBWO4T.mjs.map
@@ -4,9 +4,9 @@ import {
4
4
  evaluateTransitions,
5
5
  handleRouting,
6
6
  init_routing
7
- } from "./chunk-YEARBXYT.mjs";
8
- import "./chunk-UTBSBJFV.mjs";
9
- import "./chunk-ZI3SEHWA.mjs";
7
+ } from "./chunk-QAO73GUX.mjs";
8
+ import "./chunk-HNK5ZJ2L.mjs";
9
+ import "./chunk-4FGX4SA6.mjs";
10
10
  import "./chunk-6VVXKXTI.mjs";
11
11
  import "./chunk-34QX63WK.mjs";
12
12
  import "./chunk-PQWZ6NFL.mjs";
@@ -23,4 +23,4 @@ export {
23
23
  evaluateTransitions,
24
24
  handleRouting
25
25
  };
26
- //# sourceMappingURL=routing-AWYB2YX3.mjs.map
26
+ //# sourceMappingURL=routing-AWOHU2WP.mjs.map
@@ -4,7 +4,7 @@ import {
4
4
  handleScheduleAction,
5
5
  init_schedule_tool,
6
6
  isScheduleTool
7
- } from "./chunk-2PL2YH3B.mjs";
7
+ } from "./chunk-TAK5HLAR.mjs";
8
8
  import "./chunk-YSOIR46P.mjs";
9
9
  import "./chunk-PDQTEBOJ.mjs";
10
10
  import "./chunk-7VTZDC2X.mjs";
@@ -12,7 +12,7 @@ import "./chunk-B7BVQM5K.mjs";
12
12
  import "./chunk-XXAEN5KU.mjs";
13
13
  import "./chunk-RHKPFJLG.mjs";
14
14
  import "./chunk-UBTZE3FO.mjs";
15
- import "./chunk-W4KCJM6J.mjs";
15
+ import "./chunk-MLXGCLZJ.mjs";
16
16
  import "./chunk-KWTCTEFT.mjs";
17
17
  import "./chunk-WJIV7MKY.mjs";
18
18
  import "./chunk-EFNNJIMY.mjs";
@@ -33,4 +33,4 @@ export {
33
33
  handleScheduleAction,
34
34
  isScheduleTool
35
35
  };
36
- //# sourceMappingURL=schedule-tool-UMDRCNO5.mjs.map
36
+ //# sourceMappingURL=schedule-tool-DF5WUVYV.mjs.map
@@ -4,7 +4,7 @@ import {
4
4
  handleScheduleAction,
5
5
  init_schedule_tool,
6
6
  isScheduleTool
7
- } from "./chunk-EP7PQ4IX.mjs";
7
+ } from "./chunk-YVVOG7RP.mjs";
8
8
  import "./chunk-YSOIR46P.mjs";
9
9
  import "./chunk-PDQTEBOJ.mjs";
10
10
  import "./chunk-7VTZDC2X.mjs";
@@ -12,11 +12,11 @@ import "./chunk-B7BVQM5K.mjs";
12
12
  import "./chunk-XXAEN5KU.mjs";
13
13
  import "./chunk-RHKPFJLG.mjs";
14
14
  import "./chunk-UBTZE3FO.mjs";
15
- import "./chunk-W4KCJM6J.mjs";
15
+ import "./chunk-MLXGCLZJ.mjs";
16
16
  import "./chunk-KWTCTEFT.mjs";
17
- import "./chunk-YEARBXYT.mjs";
18
- import "./chunk-UTBSBJFV.mjs";
19
- import "./chunk-ZI3SEHWA.mjs";
17
+ import "./chunk-QAO73GUX.mjs";
18
+ import "./chunk-HNK5ZJ2L.mjs";
19
+ import "./chunk-4FGX4SA6.mjs";
20
20
  import "./chunk-6VVXKXTI.mjs";
21
21
  import "./chunk-34QX63WK.mjs";
22
22
  import "./chunk-PQWZ6NFL.mjs";
@@ -33,4 +33,4 @@ export {
33
33
  handleScheduleAction,
34
34
  isScheduleTool
35
35
  };
36
- //# sourceMappingURL=schedule-tool-SGCYDSHL.mjs.map
36
+ //# sourceMappingURL=schedule-tool-L5G2BRIG.mjs.map
@@ -4,7 +4,7 @@ import {
4
4
  handleScheduleAction,
5
5
  init_schedule_tool,
6
6
  isScheduleTool
7
- } from "./chunk-I6GKXMQ5.mjs";
7
+ } from "./chunk-FZPCP444.mjs";
8
8
  import "./chunk-YSOIR46P.mjs";
9
9
  import "./chunk-PDQTEBOJ.mjs";
10
10
  import "./chunk-7VTZDC2X.mjs";
@@ -12,7 +12,7 @@ import "./chunk-B7BVQM5K.mjs";
12
12
  import "./chunk-XXAEN5KU.mjs";
13
13
  import "./chunk-RHKPFJLG.mjs";
14
14
  import "./chunk-UBTZE3FO.mjs";
15
- import "./chunk-W4KCJM6J.mjs";
15
+ import "./chunk-MLXGCLZJ.mjs";
16
16
  import "./chunk-KWTCTEFT.mjs";
17
17
  import "./chunk-WJIV7MKY.mjs";
18
18
  import "./chunk-EFNNJIMY.mjs";
@@ -33,4 +33,4 @@ export {
33
33
  handleScheduleAction,
34
34
  isScheduleTool
35
35
  };
36
- //# sourceMappingURL=schedule-tool-IEY2CFLU.mjs.map
36
+ //# sourceMappingURL=schedule-tool-XVSYLH4Z.mjs.map
@@ -6,7 +6,7 @@ import {
6
6
  extractSlackContext,
7
7
  init_schedule_tool_handler,
8
8
  isScheduleToolCall
9
- } from "./chunk-2PL2YH3B.mjs";
9
+ } from "./chunk-FZPCP444.mjs";
10
10
  import "./chunk-YSOIR46P.mjs";
11
11
  import "./chunk-PDQTEBOJ.mjs";
12
12
  import "./chunk-7VTZDC2X.mjs";
@@ -14,7 +14,7 @@ import "./chunk-B7BVQM5K.mjs";
14
14
  import "./chunk-XXAEN5KU.mjs";
15
15
  import "./chunk-RHKPFJLG.mjs";
16
16
  import "./chunk-UBTZE3FO.mjs";
17
- import "./chunk-W4KCJM6J.mjs";
17
+ import "./chunk-MLXGCLZJ.mjs";
18
18
  import "./chunk-KWTCTEFT.mjs";
19
19
  import "./chunk-WJIV7MKY.mjs";
20
20
  import "./chunk-EFNNJIMY.mjs";
@@ -37,4 +37,4 @@ export {
37
37
  extractSlackContext,
38
38
  isScheduleToolCall
39
39
  };
40
- //# sourceMappingURL=schedule-tool-handler-5EPTHBLS.mjs.map
40
+ //# sourceMappingURL=schedule-tool-handler-CFMFHDUL.mjs.map
@@ -6,7 +6,7 @@ import {
6
6
  extractSlackContext,
7
7
  init_schedule_tool_handler,
8
8
  isScheduleToolCall
9
- } from "./chunk-I6GKXMQ5.mjs";
9
+ } from "./chunk-TAK5HLAR.mjs";
10
10
  import "./chunk-YSOIR46P.mjs";
11
11
  import "./chunk-PDQTEBOJ.mjs";
12
12
  import "./chunk-7VTZDC2X.mjs";
@@ -14,7 +14,7 @@ import "./chunk-B7BVQM5K.mjs";
14
14
  import "./chunk-XXAEN5KU.mjs";
15
15
  import "./chunk-RHKPFJLG.mjs";
16
16
  import "./chunk-UBTZE3FO.mjs";
17
- import "./chunk-W4KCJM6J.mjs";
17
+ import "./chunk-MLXGCLZJ.mjs";
18
18
  import "./chunk-KWTCTEFT.mjs";
19
19
  import "./chunk-WJIV7MKY.mjs";
20
20
  import "./chunk-EFNNJIMY.mjs";
@@ -37,4 +37,4 @@ export {
37
37
  extractSlackContext,
38
38
  isScheduleToolCall
39
39
  };
40
- //# sourceMappingURL=schedule-tool-handler-HMEGLYJF.mjs.map
40
+ //# sourceMappingURL=schedule-tool-handler-JGWA4N3C.mjs.map
@@ -6,7 +6,7 @@ import {
6
6
  extractSlackContext,
7
7
  init_schedule_tool_handler,
8
8
  isScheduleToolCall
9
- } from "./chunk-EP7PQ4IX.mjs";
9
+ } from "./chunk-YVVOG7RP.mjs";
10
10
  import "./chunk-YSOIR46P.mjs";
11
11
  import "./chunk-PDQTEBOJ.mjs";
12
12
  import "./chunk-7VTZDC2X.mjs";
@@ -14,11 +14,11 @@ import "./chunk-B7BVQM5K.mjs";
14
14
  import "./chunk-XXAEN5KU.mjs";
15
15
  import "./chunk-RHKPFJLG.mjs";
16
16
  import "./chunk-UBTZE3FO.mjs";
17
- import "./chunk-W4KCJM6J.mjs";
17
+ import "./chunk-MLXGCLZJ.mjs";
18
18
  import "./chunk-KWTCTEFT.mjs";
19
- import "./chunk-YEARBXYT.mjs";
20
- import "./chunk-UTBSBJFV.mjs";
21
- import "./chunk-ZI3SEHWA.mjs";
19
+ import "./chunk-QAO73GUX.mjs";
20
+ import "./chunk-HNK5ZJ2L.mjs";
21
+ import "./chunk-4FGX4SA6.mjs";
22
22
  import "./chunk-6VVXKXTI.mjs";
23
23
  import "./chunk-34QX63WK.mjs";
24
24
  import "./chunk-PQWZ6NFL.mjs";
@@ -37,4 +37,4 @@ export {
37
37
  extractSlackContext,
38
38
  isScheduleToolCall
39
39
  };
40
- //# sourceMappingURL=schedule-tool-handler-5QVUZ5EZ.mjs.map
40
+ //# sourceMappingURL=schedule-tool-handler-UJ4RFTW2.mjs.map
@@ -1322,7 +1322,7 @@ interface VisorHooks {
1322
1322
  */
1323
1323
  interface CustomToolDefinition {
1324
1324
  /** Tool implementation type (defaults to 'command') */
1325
- type?: 'command' | 'api' | 'workflow';
1325
+ type?: 'command' | 'api' | 'workflow' | 'http_client';
1326
1326
  /** Tool name - used to reference the tool in MCP blocks */
1327
1327
  name: string;
1328
1328
  /** Description of what the tool does */
@@ -1390,6 +1390,14 @@ interface CustomToolDefinition {
1390
1390
  requestTimeoutMs?: number;
1391
1391
  /** Alias for requestTimeoutMs (snake_case) */
1392
1392
  request_timeout_ms?: number;
1393
+ /** Base URL for HTTP client tools */
1394
+ base_url?: string;
1395
+ /** Authentication config for HTTP client tools */
1396
+ auth?: {
1397
+ type: string;
1398
+ token?: string;
1399
+ [key: string]: unknown;
1400
+ };
1393
1401
  /** Workflow ID (registry lookup) or file path (for type: 'workflow') */
1394
1402
  workflow?: string;
1395
1403
  /** Inline workflow inputs (for type: 'workflow' with inline steps) */
package/dist/sdk/sdk.d.ts CHANGED
@@ -1322,7 +1322,7 @@ interface VisorHooks {
1322
1322
  */
1323
1323
  interface CustomToolDefinition {
1324
1324
  /** Tool implementation type (defaults to 'command') */
1325
- type?: 'command' | 'api' | 'workflow';
1325
+ type?: 'command' | 'api' | 'workflow' | 'http_client';
1326
1326
  /** Tool name - used to reference the tool in MCP blocks */
1327
1327
  name: string;
1328
1328
  /** Description of what the tool does */
@@ -1390,6 +1390,14 @@ interface CustomToolDefinition {
1390
1390
  requestTimeoutMs?: number;
1391
1391
  /** Alias for requestTimeoutMs (snake_case) */
1392
1392
  request_timeout_ms?: number;
1393
+ /** Base URL for HTTP client tools */
1394
+ base_url?: string;
1395
+ /** Authentication config for HTTP client tools */
1396
+ auth?: {
1397
+ type: string;
1398
+ token?: string;
1399
+ [key: string]: unknown;
1400
+ };
1393
1401
  /** Workflow ID (registry lookup) or file path (for type: 'workflow') */
1394
1402
  workflow?: string;
1395
1403
  /** Inline workflow inputs (for type: 'workflow' with inline steps) */
package/dist/sdk/sdk.js CHANGED
@@ -704,7 +704,7 @@ var require_package = __commonJS({
704
704
  "package.json"(exports2, module2) {
705
705
  module2.exports = {
706
706
  name: "@probelabs/visor",
707
- version: "0.1.174",
707
+ version: "0.1.175",
708
708
  main: "dist/index.js",
709
709
  bin: {
710
710
  visor: "./dist/index.js"
@@ -12724,7 +12724,7 @@ var init_config_schema = __esm({
12724
12724
  properties: {
12725
12725
  type: {
12726
12726
  type: "string",
12727
- enum: ["command", "api", "workflow"],
12727
+ enum: ["command", "api", "workflow", "http_client"],
12728
12728
  description: "Tool implementation type (defaults to 'command')"
12729
12729
  },
12730
12730
  name: {
@@ -12921,6 +12921,27 @@ var init_config_schema = __esm({
12921
12921
  type: "number",
12922
12922
  description: "Alias for requestTimeoutMs (snake_case)"
12923
12923
  },
12924
+ base_url: {
12925
+ type: "string",
12926
+ description: "Base URL for HTTP client tools"
12927
+ },
12928
+ auth: {
12929
+ type: "object",
12930
+ properties: {
12931
+ type: {
12932
+ type: "string"
12933
+ },
12934
+ token: {
12935
+ type: "string"
12936
+ }
12937
+ },
12938
+ required: ["type"],
12939
+ additionalProperties: {},
12940
+ description: "Authentication config for HTTP client tools",
12941
+ patternProperties: {
12942
+ "^x-": {}
12943
+ }
12944
+ },
12924
12945
  workflow: {
12925
12946
  type: "string",
12926
12947
  description: "Workflow ID (registry lookup) or file path (for type: 'workflow')"
@@ -13460,7 +13481,7 @@ var init_config_schema = __esm({
13460
13481
  description: "Arguments/inputs for the workflow"
13461
13482
  },
13462
13483
  overrides: {
13463
- $ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-14017-28611-src_types_config.ts-0-56833%3E%3E",
13484
+ $ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-14017-28611-src_types_config.ts-0-57090%3E%3E",
13464
13485
  description: "Override specific step configurations in the workflow"
13465
13486
  },
13466
13487
  output_mapping: {
@@ -13476,7 +13497,7 @@ var init_config_schema = __esm({
13476
13497
  description: "Config file path - alternative to workflow ID (loads a Visor config file as workflow)"
13477
13498
  },
13478
13499
  workflow_overrides: {
13479
- $ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-14017-28611-src_types_config.ts-0-56833%3E%3E",
13500
+ $ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-14017-28611-src_types_config.ts-0-57090%3E%3E",
13480
13501
  description: "Alias for overrides - workflow step overrides (backward compatibility)"
13481
13502
  },
13482
13503
  ref: {
@@ -14178,7 +14199,7 @@ var init_config_schema = __esm({
14178
14199
  description: "Custom output name (defaults to workflow name)"
14179
14200
  },
14180
14201
  overrides: {
14181
- $ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-14017-28611-src_types_config.ts-0-56833%3E%3E",
14202
+ $ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-14017-28611-src_types_config.ts-0-57090%3E%3E",
14182
14203
  description: "Step overrides"
14183
14204
  },
14184
14205
  output_mapping: {
@@ -14193,13 +14214,13 @@ var init_config_schema = __esm({
14193
14214
  "^x-": {}
14194
14215
  }
14195
14216
  },
14196
- "Record<string,Partial<interface-src_types_config.ts-14017-28611-src_types_config.ts-0-56833>>": {
14217
+ "Record<string,Partial<interface-src_types_config.ts-14017-28611-src_types_config.ts-0-57090>>": {
14197
14218
  type: "object",
14198
14219
  additionalProperties: {
14199
- $ref: "#/definitions/Partial%3Cinterface-src_types_config.ts-14017-28611-src_types_config.ts-0-56833%3E"
14220
+ $ref: "#/definitions/Partial%3Cinterface-src_types_config.ts-14017-28611-src_types_config.ts-0-57090%3E"
14200
14221
  }
14201
14222
  },
14202
- "Partial<interface-src_types_config.ts-14017-28611-src_types_config.ts-0-56833>": {
14223
+ "Partial<interface-src_types_config.ts-14017-28611-src_types_config.ts-0-57090>": {
14203
14224
  type: "object",
14204
14225
  additionalProperties: false
14205
14226
  },
@@ -22043,6 +22064,9 @@ var init_schedule_tool_handler = __esm({
22043
22064
  });
22044
22065
 
22045
22066
  // src/providers/mcp-custom-sse-server.ts
22067
+ function isHttpClientTool(tool) {
22068
+ return Boolean(tool && tool.type === "http_client" && (tool.base_url || tool.url));
22069
+ }
22046
22070
  var import_http, import_events, CustomToolsSSEServer;
22047
22071
  var init_mcp_custom_sse_server = __esm({
22048
22072
  "src/providers/mcp-custom-sse-server.ts"() {
@@ -22056,6 +22080,7 @@ var init_mcp_custom_sse_server = __esm({
22056
22080
  init_workflow_registry();
22057
22081
  init_schedule_tool();
22058
22082
  init_schedule_tool_handler();
22083
+ init_env_resolver();
22059
22084
  CustomToolsSSEServer = class _CustomToolsSSEServer {
22060
22085
  server = null;
22061
22086
  port = 0;
@@ -22089,10 +22114,12 @@ var init_mcp_custom_sse_server = __esm({
22089
22114
  }
22090
22115
  }
22091
22116
  for (const [name, tool] of this.tools.entries()) {
22092
- if (!isWorkflowTool(tool)) {
22093
- toolsRecord[name] = tool;
22117
+ if (isWorkflowTool(tool) || isHttpClientTool(tool)) {
22118
+ if (isWorkflowTool(tool)) {
22119
+ workflowToolNames.push(name);
22120
+ }
22094
22121
  } else {
22095
- workflowToolNames.push(name);
22122
+ toolsRecord[name] = tool;
22096
22123
  }
22097
22124
  }
22098
22125
  if (workflowToolNames.length > 0 && !workflowContext) {
@@ -22572,7 +22599,12 @@ var init_mcp_custom_sse_server = __esm({
22572
22599
  description: tool.description || `Execute ${tool.name}`,
22573
22600
  inputSchema: normalizeInputSchema(tool.inputSchema)
22574
22601
  }));
22575
- const allTools = [...regularTools, ...workflowTools];
22602
+ const httpClientTools = Array.from(this.tools.values()).filter(isHttpClientTool).map((tool) => ({
22603
+ name: tool.name,
22604
+ description: tool.description || `Call ${tool.name} HTTP API`,
22605
+ inputSchema: normalizeInputSchema(tool.inputSchema)
22606
+ }));
22607
+ const allTools = [...regularTools, ...workflowTools, ...httpClientTools];
22576
22608
  if (this.debug) {
22577
22609
  logger.debug(
22578
22610
  `[CustomToolsSSEServer:${this.sessionId}] Listing ${allTools.length} tools: ${allTools.map((t) => t.name).join(", ")}`
@@ -22696,6 +22728,8 @@ var init_mcp_custom_sse_server = __esm({
22696
22728
  this.workflowContext,
22697
22729
  workflowTool.__argsOverrides
22698
22730
  );
22731
+ } else if (tool && isHttpClientTool(tool)) {
22732
+ result = await this.executeHttpClientTool(tool, args);
22699
22733
  } else {
22700
22734
  result = await this.toolExecutor.execute(toolName, args);
22701
22735
  }
@@ -22759,6 +22793,83 @@ var init_mcp_custom_sse_server = __esm({
22759
22793
  }
22760
22794
  }
22761
22795
  }
22796
+ /**
22797
+ * Execute an http_client tool — proxy REST API calls through the configured base URL.
22798
+ */
22799
+ async executeHttpClientTool(tool, args) {
22800
+ const baseUrl = (tool.base_url || tool.url).replace(/\/+$/, "");
22801
+ const apiPath = args.path || "";
22802
+ const method = (args.method || "GET").toUpperCase();
22803
+ const queryParams = args.query || {};
22804
+ const body = args.body;
22805
+ const toolHeaders = tool.headers || {};
22806
+ const timeout = tool.timeout || 3e4;
22807
+ let url = apiPath.startsWith("http") ? apiPath : `${baseUrl}/${apiPath.replace(/^\/+/, "")}`;
22808
+ if (Object.keys(queryParams).length > 0) {
22809
+ const qs = new URLSearchParams(queryParams).toString();
22810
+ url += `${url.includes("?") ? "&" : "?"}${qs}`;
22811
+ }
22812
+ const resolvedHeaders = {};
22813
+ for (const [key, value] of Object.entries(toolHeaders)) {
22814
+ resolvedHeaders[key] = String(EnvironmentResolver.resolveValue(value));
22815
+ }
22816
+ if (tool.auth) {
22817
+ const authType = tool.auth.type;
22818
+ if (authType === "bearer" && tool.auth.token) {
22819
+ const token = String(EnvironmentResolver.resolveValue(tool.auth.token));
22820
+ resolvedHeaders["Authorization"] = `Bearer ${token}`;
22821
+ }
22822
+ }
22823
+ if (this.debug) {
22824
+ logger.debug(`[CustomToolsSSEServer:${this.sessionId}] HTTP client: ${method} ${url}`);
22825
+ }
22826
+ const controller = new AbortController();
22827
+ const timeoutId = setTimeout(() => controller.abort(), timeout);
22828
+ try {
22829
+ const requestOptions = {
22830
+ method,
22831
+ headers: resolvedHeaders,
22832
+ signal: controller.signal
22833
+ };
22834
+ if (method !== "GET" && body) {
22835
+ requestOptions.body = typeof body === "string" ? body : JSON.stringify(body);
22836
+ if (!resolvedHeaders["Content-Type"] && !resolvedHeaders["content-type"]) {
22837
+ resolvedHeaders["Content-Type"] = "application/json";
22838
+ }
22839
+ }
22840
+ const response = await fetch(url, requestOptions);
22841
+ clearTimeout(timeoutId);
22842
+ if (!response.ok) {
22843
+ let errorBody = "";
22844
+ try {
22845
+ errorBody = await response.text();
22846
+ } catch {
22847
+ }
22848
+ throw new Error(
22849
+ `HTTP ${response.status}: ${response.statusText}${errorBody ? ` - ${errorBody.substring(0, 500)}` : ""}`
22850
+ );
22851
+ }
22852
+ const contentType = response.headers.get("content-type");
22853
+ if (contentType && contentType.includes("application/json")) {
22854
+ return await response.json();
22855
+ }
22856
+ const text = await response.text();
22857
+ if (text.trim().startsWith("{") || text.trim().startsWith("[")) {
22858
+ try {
22859
+ return JSON.parse(text);
22860
+ } catch {
22861
+ return text;
22862
+ }
22863
+ }
22864
+ return text;
22865
+ } catch (error) {
22866
+ clearTimeout(timeoutId);
22867
+ if (error instanceof Error && error.name === "AbortError") {
22868
+ throw new Error(`HTTP client request timed out after ${timeout}ms`);
22869
+ }
22870
+ throw error;
22871
+ }
22872
+ }
22762
22873
  /**
22763
22874
  * Convert a type: 'workflow' tool definition into a WorkflowToolDefinition marker.
22764
22875
  *
@@ -23842,6 +23953,7 @@ ${preview}`);
23842
23953
  }
23843
23954
  const workflowEntriesFromMcp = [];
23844
23955
  const toolEntriesFromMcp = [];
23956
+ const httpClientEntriesFromMcp = [];
23845
23957
  const mcpEntriesToRemove = [];
23846
23958
  for (const [serverName, serverConfig] of Object.entries(mcpServers)) {
23847
23959
  const cfg = serverConfig;
@@ -23855,6 +23967,12 @@ ${preview}`);
23855
23967
  logger.debug(
23856
23968
  `[AICheckProvider] Extracted workflow tool '${serverName}' (workflow=${cfg.workflow}) from ai_mcp_servers`
23857
23969
  );
23970
+ } else if (cfg.type === "http_client" && (cfg.base_url || cfg.url)) {
23971
+ httpClientEntriesFromMcp.push({ name: serverName, config: cfg });
23972
+ mcpEntriesToRemove.push(serverName);
23973
+ logger.debug(
23974
+ `[AICheckProvider] Extracted http_client tool '${serverName}' (base_url=${cfg.base_url || cfg.url}) from ai_mcp_servers`
23975
+ );
23858
23976
  } else if (cfg.tool && typeof cfg.tool === "string") {
23859
23977
  toolEntriesFromMcp.push(cfg.tool);
23860
23978
  mcpEntriesToRemove.push(serverName);
@@ -23907,7 +24025,7 @@ ${preview}`);
23907
24025
  logger.debug(`[AICheckProvider] Schedule tool requested (${contextInfo})`);
23908
24026
  }
23909
24027
  const scheduleToolEnabled = scheduleToolRequested || config.ai?.enable_scheduler === true && !config.ai?.disableTools;
23910
- if ((customToolsToLoad.length > 0 || scheduleToolEnabled) && (customToolsServerName || scheduleToolEnabled) && !config.ai?.disableTools) {
24028
+ if ((customToolsToLoad.length > 0 || scheduleToolEnabled || httpClientEntriesFromMcp.length > 0) && (customToolsServerName || scheduleToolEnabled || httpClientEntriesFromMcp.length > 0) && !config.ai?.disableTools) {
23911
24029
  if (!customToolsServerName) {
23912
24030
  customToolsServerName = "__tools__";
23913
24031
  }
@@ -23939,6 +24057,48 @@ ${preview}`);
23939
24057
  customTools.set(scheduleTool.name, scheduleTool);
23940
24058
  logger.debug(`[AICheckProvider] Added built-in schedule tool`);
23941
24059
  }
24060
+ for (const entry of httpClientEntriesFromMcp) {
24061
+ const httpTool = {
24062
+ name: entry.name,
24063
+ type: "http_client",
24064
+ description: entry.config.description || `Call ${entry.name} HTTP API (base: ${entry.config.base_url || entry.config.url})`,
24065
+ base_url: entry.config.base_url || entry.config.url,
24066
+ auth: entry.config.auth,
24067
+ headers: entry.config.headers,
24068
+ timeout: entry.config.timeout || 3e4,
24069
+ inputSchema: {
24070
+ type: "object",
24071
+ properties: {
24072
+ path: {
24073
+ type: "string",
24074
+ description: "API path (e.g. /jobs, /candidates/{id})"
24075
+ },
24076
+ method: {
24077
+ type: "string",
24078
+ description: "HTTP method (default: GET)",
24079
+ enum: ["GET", "POST", "PUT", "PATCH", "DELETE"]
24080
+ },
24081
+ query: {
24082
+ type: "object",
24083
+ description: "Query string parameters",
24084
+ additionalProperties: { type: "string" }
24085
+ },
24086
+ body: {
24087
+ type: "object",
24088
+ description: "Request body for POST/PUT/PATCH"
24089
+ }
24090
+ },
24091
+ required: ["path"]
24092
+ }
24093
+ };
24094
+ customTools.set(entry.name, httpTool);
24095
+ logger.debug(
24096
+ `[AICheckProvider] Added http_client tool '${entry.name}' (base_url=${httpTool.base_url})`
24097
+ );
24098
+ }
24099
+ if (httpClientEntriesFromMcp.length > 0 && !customToolsServerName) {
24100
+ customToolsServerName = "__tools__";
24101
+ }
23942
24102
  if (customTools.size > 0) {
23943
24103
  const sessionId = config.checkName || `ai-check-${Date.now()}`;
23944
24104
  const debug = aiConfig.debug || process.env.VISOR_DEBUG === "true";