@probelabs/visor 0.1.76 → 0.1.78

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/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- process.env.VISOR_VERSION = '0.1.76';
3
- process.env.PROBE_VERSION = '0.6.0-rc119';
2
+ process.env.VISOR_VERSION = '0.1.78';
3
+ process.env.PROBE_VERSION = '0.6.0-rc120';
4
4
  /******/ (() => { // webpackBootstrap
5
5
  /******/ var __webpack_modules__ = ({
6
6
 
@@ -105343,6 +105343,44 @@ class ConfigManager {
105343
105343
  : 'Both ai_mcp_servers and ai.mcpServers are set; ai.mcpServers takes precedence for this check.',
105344
105344
  });
105345
105345
  }
105346
+ // Type-specific guidance for MCP placement to avoid silent ignores
105347
+ try {
105348
+ const anyCheck = checkConfig;
105349
+ const aiObj = anyCheck.ai || undefined;
105350
+ const hasBareMcpAtCheck = Object.prototype.hasOwnProperty.call(anyCheck, 'mcpServers');
105351
+ const hasAiMcp = aiObj && Object.prototype.hasOwnProperty.call(aiObj, 'mcpServers');
105352
+ const hasClaudeCodeMcp = anyCheck.claude_code &&
105353
+ typeof anyCheck.claude_code === 'object' &&
105354
+ Object.prototype.hasOwnProperty.call(anyCheck.claude_code, 'mcpServers');
105355
+ if (checkConfig.type === 'ai') {
105356
+ if (hasBareMcpAtCheck) {
105357
+ warnings.push({
105358
+ field: `checks.${checkName}.mcpServers`,
105359
+ message: "'mcpServers' at the check root is ignored for type 'ai'. Use 'ai.mcpServers' or 'ai_mcp_servers' instead.",
105360
+ value: anyCheck.mcpServers,
105361
+ });
105362
+ }
105363
+ if (hasClaudeCodeMcp) {
105364
+ warnings.push({
105365
+ field: `checks.${checkName}.claude_code.mcpServers`,
105366
+ message: "'claude_code.mcpServers' is ignored for type 'ai'. Use 'ai.mcpServers' or 'ai_mcp_servers' instead.",
105367
+ });
105368
+ }
105369
+ }
105370
+ if (checkConfig.type === 'claude-code') {
105371
+ if (hasAiMcp || checkConfig.ai_mcp_servers) {
105372
+ warnings.push({
105373
+ field: hasAiMcp
105374
+ ? `checks.${checkName}.ai.mcpServers`
105375
+ : `checks.${checkName}.ai_mcp_servers`,
105376
+ message: "For type 'claude-code', MCP must be configured under 'claude_code.mcpServers'. 'ai.mcpServers' and 'ai_mcp_servers' are ignored for this check.",
105377
+ });
105378
+ }
105379
+ }
105380
+ }
105381
+ catch {
105382
+ // best-effort hints; never fail validation here
105383
+ }
105346
105384
  }
105347
105385
  }
105348
105386
  // Validate global MCP servers if present
@@ -105391,6 +105429,10 @@ class ConfigManager {
105391
105429
  if (!checkConfig.type) {
105392
105430
  checkConfig.type = 'ai';
105393
105431
  }
105432
+ // Backward-compat alias: accept 'logger' as 'log'
105433
+ if (checkConfig.type === 'logger') {
105434
+ checkConfig.type = 'log';
105435
+ }
105394
105436
  if (!this.validCheckTypes.includes(checkConfig.type)) {
105395
105437
  errors.push({
105396
105438
  field: `checks.${checkName}.type`,
@@ -105427,6 +105469,8 @@ class ConfigManager {
105427
105469
  });
105428
105470
  }
105429
105471
  }
105472
+ // Note: Do not add special-case validation for log 'message' here.
105473
+ // Schema (Ajv) permits 'message' and related keys; provider enforces at execution time.
105430
105474
  // HTTP input checks require endpoint field
105431
105475
  if (checkConfig.type === 'http_input' && !checkConfig.endpoint) {
105432
105476
  errors.push({
@@ -106625,980 +106669,932 @@ exports.FailureConditionEvaluator = FailureConditionEvaluator;
106625
106669
  Object.defineProperty(exports, "__esModule", ({ value: true }));
106626
106670
  exports.configSchema = void 0;
106627
106671
  // AUTO-GENERATED FILE. DO NOT EDIT.
106628
- // Generated by scripts/generate-config-schema.js from src/types/config.ts
106672
+ // Generated by scripts/generate-config-schema.js from src/types/config.ts
106629
106673
  exports.configSchema = {
106630
- "$schema": "http://json-schema.org/draft-07/schema#",
106631
- "$ref": "#/definitions/VisorConfig",
106632
- "definitions": {
106633
- "VisorConfig": {
106634
- "type": "object",
106635
- "properties": {
106636
- "version": {
106637
- "type": "string",
106638
- "description": "Configuration version"
106674
+ $schema: 'http://json-schema.org/draft-07/schema#',
106675
+ $ref: '#/definitions/VisorConfig',
106676
+ definitions: {
106677
+ VisorConfig: {
106678
+ type: 'object',
106679
+ properties: {
106680
+ version: {
106681
+ type: 'string',
106682
+ description: 'Configuration version',
106639
106683
  },
106640
- "extends": {
106641
- "anyOf": [
106684
+ extends: {
106685
+ anyOf: [
106642
106686
  {
106643
- "type": "string"
106687
+ type: 'string',
106644
106688
  },
106645
106689
  {
106646
- "type": "array",
106647
- "items": {
106648
- "type": "string"
106649
- }
106650
- }
106690
+ type: 'array',
106691
+ items: {
106692
+ type: 'string',
106693
+ },
106694
+ },
106651
106695
  ],
106652
- "description": "Extends from other configurations - can be file path, HTTP(S) URL, or \"default\""
106696
+ description: 'Extends from other configurations - can be file path, HTTP(S) URL, or "default"',
106697
+ },
106698
+ checks: {
106699
+ $ref: '#/definitions/Record%3Cstring%2CCheckConfig%3E',
106700
+ description: 'Check configurations',
106653
106701
  },
106654
- "checks": {
106655
- "$ref": "#/definitions/Record%3Cstring%2CCheckConfig%3E",
106656
- "description": "Check configurations"
106702
+ output: {
106703
+ $ref: '#/definitions/OutputConfig',
106704
+ description: 'Output configuration',
106657
106705
  },
106658
- "output": {
106659
- "$ref": "#/definitions/OutputConfig",
106660
- "description": "Output configuration"
106706
+ http_server: {
106707
+ $ref: '#/definitions/HttpServerConfig',
106708
+ description: 'HTTP server configuration for receiving webhooks',
106661
106709
  },
106662
- "http_server": {
106663
- "$ref": "#/definitions/HttpServerConfig",
106664
- "description": "HTTP server configuration for receiving webhooks"
106710
+ env: {
106711
+ $ref: '#/definitions/EnvConfig',
106712
+ description: 'Global environment variables',
106665
106713
  },
106666
- "env": {
106667
- "$ref": "#/definitions/EnvConfig",
106668
- "description": "Global environment variables"
106714
+ ai_model: {
106715
+ type: 'string',
106716
+ description: 'Global AI model setting',
106669
106717
  },
106670
- "ai_model": {
106671
- "type": "string",
106672
- "description": "Global AI model setting"
106718
+ ai_provider: {
106719
+ type: 'string',
106720
+ description: 'Global AI provider setting',
106673
106721
  },
106674
- "ai_provider": {
106675
- "type": "string",
106676
- "description": "Global AI provider setting"
106722
+ ai_mcp_servers: {
106723
+ $ref: '#/definitions/Record%3Cstring%2CMcpServerConfig%3E',
106724
+ description: 'Global MCP servers configuration for AI checks',
106677
106725
  },
106678
- "ai_mcp_servers": {
106679
- "$ref": "#/definitions/Record%3Cstring%2CMcpServerConfig%3E",
106680
- "description": "Global MCP servers configuration for AI checks"
106726
+ max_parallelism: {
106727
+ type: 'number',
106728
+ description: 'Maximum number of checks to run in parallel (default: 3)',
106681
106729
  },
106682
- "max_parallelism": {
106683
- "type": "number",
106684
- "description": "Maximum number of checks to run in parallel (default: 3)"
106730
+ fail_fast: {
106731
+ type: 'boolean',
106732
+ description: 'Stop execution when any check fails (default: false)',
106685
106733
  },
106686
- "fail_fast": {
106687
- "type": "boolean",
106688
- "description": "Stop execution when any check fails (default: false)"
106734
+ fail_if: {
106735
+ type: 'string',
106736
+ description: 'Simple global fail condition - fails if expression evaluates to true',
106689
106737
  },
106690
- "fail_if": {
106691
- "type": "string",
106692
- "description": "Simple global fail condition - fails if expression evaluates to true"
106738
+ failure_conditions: {
106739
+ $ref: '#/definitions/FailureConditions',
106740
+ description: 'Global failure conditions - optional (deprecated, use fail_if)',
106693
106741
  },
106694
- "failure_conditions": {
106695
- "$ref": "#/definitions/FailureConditions",
106696
- "description": "Global failure conditions - optional (deprecated, use fail_if)"
106742
+ tag_filter: {
106743
+ $ref: '#/definitions/TagFilter',
106744
+ description: 'Tag filter for selective check execution',
106697
106745
  },
106698
- "tag_filter": {
106699
- "$ref": "#/definitions/TagFilter",
106700
- "description": "Tag filter for selective check execution"
106746
+ routing: {
106747
+ $ref: '#/definitions/RoutingDefaults',
106748
+ description: 'Optional routing defaults for retry/goto/run policies',
106701
106749
  },
106702
- "routing": {
106703
- "$ref": "#/definitions/RoutingDefaults",
106704
- "description": "Optional routing defaults for retry/goto/run policies"
106705
- }
106706
106750
  },
106707
- "required": [
106708
- "version",
106709
- "checks",
106710
- "output"
106711
- ],
106712
- "additionalProperties": false,
106713
- "description": "Main Visor configuration",
106714
- "patternProperties": {
106715
- "^x-": {}
106716
- }
106751
+ required: ['version', 'checks', 'output'],
106752
+ additionalProperties: false,
106753
+ description: 'Main Visor configuration',
106754
+ patternProperties: {
106755
+ '^x-': {},
106756
+ },
106717
106757
  },
106718
- "Record<string,CheckConfig>": {
106719
- "type": "object",
106720
- "additionalProperties": {
106721
- "$ref": "#/definitions/CheckConfig"
106722
- }
106758
+ 'Record<string,CheckConfig>': {
106759
+ type: 'object',
106760
+ additionalProperties: {
106761
+ $ref: '#/definitions/CheckConfig',
106762
+ },
106723
106763
  },
106724
- "CheckConfig": {
106725
- "type": "object",
106726
- "properties": {
106727
- "type": {
106728
- "$ref": "#/definitions/ConfigCheckType",
106729
- "description": "Type of check to perform (defaults to 'ai' if not specified)"
106764
+ CheckConfig: {
106765
+ type: 'object',
106766
+ properties: {
106767
+ type: {
106768
+ $ref: '#/definitions/ConfigCheckType',
106769
+ description: "Type of check to perform (defaults to 'ai' if not specified)",
106730
106770
  },
106731
- "prompt": {
106732
- "type": "string",
106733
- "description": "AI prompt for the check - can be inline string or file path (auto-detected) - required for AI checks"
106771
+ prompt: {
106772
+ type: 'string',
106773
+ description: 'AI prompt for the check - can be inline string or file path (auto-detected) - required for AI checks',
106734
106774
  },
106735
- "appendPrompt": {
106736
- "type": "string",
106737
- "description": "Additional prompt to append when extending configurations - merged with parent prompt"
106775
+ appendPrompt: {
106776
+ type: 'string',
106777
+ description: 'Additional prompt to append when extending configurations - merged with parent prompt',
106738
106778
  },
106739
- "exec": {
106740
- "type": "string",
106741
- "description": "Command execution with Liquid template support - required for command checks"
106779
+ exec: {
106780
+ type: 'string',
106781
+ description: 'Command execution with Liquid template support - required for command checks',
106742
106782
  },
106743
- "stdin": {
106744
- "type": "string",
106745
- "description": "Stdin input for tools with Liquid template support - optional for tool checks"
106783
+ stdin: {
106784
+ type: 'string',
106785
+ description: 'Stdin input for tools with Liquid template support - optional for tool checks',
106746
106786
  },
106747
- "url": {
106748
- "type": "string",
106749
- "description": "HTTP URL - required for http output checks"
106787
+ url: {
106788
+ type: 'string',
106789
+ description: 'HTTP URL - required for http output checks',
106750
106790
  },
106751
- "body": {
106752
- "type": "string",
106753
- "description": "HTTP body template (Liquid) - required for http output checks"
106791
+ body: {
106792
+ type: 'string',
106793
+ description: 'HTTP body template (Liquid) - required for http output checks',
106754
106794
  },
106755
- "method": {
106756
- "type": "string",
106757
- "description": "HTTP method (defaults to POST)"
106795
+ method: {
106796
+ type: 'string',
106797
+ description: 'HTTP method (defaults to POST)',
106758
106798
  },
106759
- "headers": {
106760
- "$ref": "#/definitions/Record%3Cstring%2Cstring%3E",
106761
- "description": "HTTP headers"
106799
+ headers: {
106800
+ $ref: '#/definitions/Record%3Cstring%2Cstring%3E',
106801
+ description: 'HTTP headers',
106762
106802
  },
106763
- "endpoint": {
106764
- "type": "string",
106765
- "description": "HTTP endpoint path - required for http_input checks"
106803
+ endpoint: {
106804
+ type: 'string',
106805
+ description: 'HTTP endpoint path - required for http_input checks',
106766
106806
  },
106767
- "transform": {
106768
- "type": "string",
106769
- "description": "Transform template for http_input data (Liquid) - optional"
106807
+ transform: {
106808
+ type: 'string',
106809
+ description: 'Transform template for http_input data (Liquid) - optional',
106770
106810
  },
106771
- "transform_js": {
106772
- "type": "string",
106773
- "description": "Transform using JavaScript expressions (evaluated in secure sandbox) - optional"
106811
+ transform_js: {
106812
+ type: 'string',
106813
+ description: 'Transform using JavaScript expressions (evaluated in secure sandbox) - optional',
106774
106814
  },
106775
- "schedule": {
106776
- "type": "string",
106777
- "description": "Cron schedule expression (e.g., \"0 2 * * *\") - optional for any check type"
106815
+ schedule: {
106816
+ type: 'string',
106817
+ description: 'Cron schedule expression (e.g., "0 2 * * *") - optional for any check type',
106778
106818
  },
106779
- "focus": {
106780
- "type": "string",
106781
- "description": "Focus area for the check (security/performance/style/architecture/all) - optional"
106819
+ focus: {
106820
+ type: 'string',
106821
+ description: 'Focus area for the check (security/performance/style/architecture/all) - optional',
106782
106822
  },
106783
- "command": {
106784
- "type": "string",
106785
- "description": "Command that triggers this check (e.g., \"review\", \"security-scan\") - optional"
106823
+ command: {
106824
+ type: 'string',
106825
+ description: 'Command that triggers this check (e.g., "review", "security-scan") - optional',
106786
106826
  },
106787
- "on": {
106788
- "type": "array",
106789
- "items": {
106790
- "$ref": "#/definitions/EventTrigger"
106827
+ on: {
106828
+ type: 'array',
106829
+ items: {
106830
+ $ref: '#/definitions/EventTrigger',
106791
106831
  },
106792
- "description": "Events that trigger this check (defaults to ['manual'] if not specified)"
106832
+ description: "Events that trigger this check (defaults to ['manual'] if not specified)",
106793
106833
  },
106794
- "triggers": {
106795
- "type": "array",
106796
- "items": {
106797
- "type": "string"
106834
+ triggers: {
106835
+ type: 'array',
106836
+ items: {
106837
+ type: 'string',
106798
106838
  },
106799
- "description": "File patterns that trigger this check (optional)"
106839
+ description: 'File patterns that trigger this check (optional)',
106800
106840
  },
106801
- "ai": {
106802
- "$ref": "#/definitions/AIProviderConfig",
106803
- "description": "AI provider configuration (optional)"
106841
+ ai: {
106842
+ $ref: '#/definitions/AIProviderConfig',
106843
+ description: 'AI provider configuration (optional)',
106804
106844
  },
106805
- "ai_model": {
106806
- "type": "string",
106807
- "description": "AI model to use for this check - overrides global setting"
106845
+ ai_model: {
106846
+ type: 'string',
106847
+ description: 'AI model to use for this check - overrides global setting',
106808
106848
  },
106809
- "ai_provider": {
106810
- "type": "string",
106811
- "description": "AI provider to use for this check - overrides global setting"
106849
+ ai_provider: {
106850
+ type: 'string',
106851
+ description: 'AI provider to use for this check - overrides global setting',
106812
106852
  },
106813
- "ai_mcp_servers": {
106814
- "$ref": "#/definitions/Record%3Cstring%2CMcpServerConfig%3E",
106815
- "description": "MCP servers for this AI check - overrides global setting"
106853
+ ai_mcp_servers: {
106854
+ $ref: '#/definitions/Record%3Cstring%2CMcpServerConfig%3E',
106855
+ description: 'MCP servers for this AI check - overrides global setting',
106816
106856
  },
106817
- "claude_code": {
106818
- "$ref": "#/definitions/ClaudeCodeConfig",
106819
- "description": "Claude Code configuration (for claude-code type checks)"
106857
+ claude_code: {
106858
+ $ref: '#/definitions/ClaudeCodeConfig',
106859
+ description: 'Claude Code configuration (for claude-code type checks)',
106820
106860
  },
106821
- "env": {
106822
- "$ref": "#/definitions/EnvConfig",
106823
- "description": "Environment variables for this check"
106861
+ env: {
106862
+ $ref: '#/definitions/EnvConfig',
106863
+ description: 'Environment variables for this check',
106824
106864
  },
106825
- "depends_on": {
106826
- "type": "array",
106827
- "items": {
106828
- "type": "string"
106865
+ depends_on: {
106866
+ type: 'array',
106867
+ items: {
106868
+ type: 'string',
106829
106869
  },
106830
- "description": "Check IDs that this check depends on (optional)"
106870
+ description: 'Check IDs that this check depends on (optional)',
106831
106871
  },
106832
- "group": {
106833
- "type": "string",
106834
- "description": "Group name for comment separation (e.g., \"code-review\", \"pr-overview\") - optional"
106872
+ group: {
106873
+ type: 'string',
106874
+ description: 'Group name for comment separation (e.g., "code-review", "pr-overview") - optional',
106835
106875
  },
106836
- "schema": {
106837
- "anyOf": [
106876
+ schema: {
106877
+ anyOf: [
106838
106878
  {
106839
- "type": "string"
106879
+ type: 'string',
106840
106880
  },
106841
106881
  {
106842
- "$ref": "#/definitions/Record%3Cstring%2Cunknown%3E"
106843
- }
106882
+ $ref: '#/definitions/Record%3Cstring%2Cunknown%3E',
106883
+ },
106844
106884
  ],
106845
- "description": "Schema type for template rendering (e.g., \"code-review\", \"markdown\") or inline JSON schema object - optional"
106885
+ description: 'Schema type for template rendering (e.g., "code-review", "markdown") or inline JSON schema object - optional',
106846
106886
  },
106847
- "template": {
106848
- "$ref": "#/definitions/CustomTemplateConfig",
106849
- "description": "Custom template configuration - optional"
106887
+ template: {
106888
+ $ref: '#/definitions/CustomTemplateConfig',
106889
+ description: 'Custom template configuration - optional',
106850
106890
  },
106851
- "if": {
106852
- "type": "string",
106853
- "description": "Condition to determine if check should run - runs if expression evaluates to true"
106891
+ if: {
106892
+ type: 'string',
106893
+ description: 'Condition to determine if check should run - runs if expression evaluates to true',
106854
106894
  },
106855
- "reuse_ai_session": {
106856
- "type": "boolean",
106857
- "description": "Whether to reuse AI session from dependency checks (only works with depends_on)"
106895
+ reuse_ai_session: {
106896
+ type: 'boolean',
106897
+ description: 'Whether to reuse AI session from dependency checks (only works with depends_on)',
106858
106898
  },
106859
- "fail_if": {
106860
- "type": "string",
106861
- "description": "Simple fail condition - fails check if expression evaluates to true"
106899
+ fail_if: {
106900
+ type: 'string',
106901
+ description: 'Simple fail condition - fails check if expression evaluates to true',
106862
106902
  },
106863
- "failure_conditions": {
106864
- "$ref": "#/definitions/FailureConditions",
106865
- "description": "Check-specific failure conditions - optional (deprecated, use fail_if)"
106903
+ failure_conditions: {
106904
+ $ref: '#/definitions/FailureConditions',
106905
+ description: 'Check-specific failure conditions - optional (deprecated, use fail_if)',
106866
106906
  },
106867
- "tags": {
106868
- "type": "array",
106869
- "items": {
106870
- "type": "string"
106907
+ tags: {
106908
+ type: 'array',
106909
+ items: {
106910
+ type: 'string',
106871
106911
  },
106872
- "description": "Tags for categorizing and filtering checks (e.g., [\"local\", \"fast\", \"security\"])"
106912
+ description: 'Tags for categorizing and filtering checks (e.g., ["local", "fast", "security"])',
106873
106913
  },
106874
- "forEach": {
106875
- "type": "boolean",
106876
- "description": "Process output as array and run dependent checks for each item"
106914
+ forEach: {
106915
+ type: 'boolean',
106916
+ description: 'Process output as array and run dependent checks for each item',
106877
106917
  },
106878
- "on_fail": {
106879
- "$ref": "#/definitions/OnFailConfig",
106880
- "description": "Failure routing configuration for this check (retry/goto/run)"
106918
+ on_fail: {
106919
+ $ref: '#/definitions/OnFailConfig',
106920
+ description: 'Failure routing configuration for this check (retry/goto/run)',
106921
+ },
106922
+ on_success: {
106923
+ $ref: '#/definitions/OnSuccessConfig',
106924
+ description: 'Success routing configuration for this check (post-actions and optional goto)',
106925
+ },
106926
+ message: {
106927
+ type: 'string',
106928
+ description: 'Message template for log checks',
106929
+ },
106930
+ level: {
106931
+ type: 'string',
106932
+ enum: ['debug', 'info', 'warn', 'error'],
106933
+ description: 'Log level for log checks',
106934
+ },
106935
+ include_pr_context: {
106936
+ type: 'boolean',
106937
+ description: 'Include PR context in log output',
106938
+ },
106939
+ include_dependencies: {
106940
+ type: 'boolean',
106941
+ description: 'Include dependency summaries in log output',
106942
+ },
106943
+ include_metadata: {
106944
+ type: 'boolean',
106945
+ description: 'Include execution metadata in log output',
106881
106946
  },
106882
- "on_success": {
106883
- "$ref": "#/definitions/OnSuccessConfig",
106884
- "description": "Success routing configuration for this check (post-actions and optional goto)"
106885
- }
106886
106947
  },
106887
- "additionalProperties": false,
106888
- "description": "Configuration for a single check",
106889
- "patternProperties": {
106890
- "^x-": {}
106891
- }
106948
+ additionalProperties: false,
106949
+ description: 'Configuration for a single check',
106950
+ patternProperties: {
106951
+ '^x-': {},
106952
+ },
106892
106953
  },
106893
- "ConfigCheckType": {
106894
- "type": "string",
106895
- "enum": [
106896
- "ai",
106897
- "command",
106898
- "http",
106899
- "http_input",
106900
- "http_client",
106901
- "noop",
106902
- "log",
106903
- "claude-code"
106904
- ],
106905
- "description": "Valid check types in configuration"
106954
+ ConfigCheckType: {
106955
+ type: 'string',
106956
+ enum: ['ai', 'command', 'http', 'http_input', 'http_client', 'noop', 'log', 'claude-code'],
106957
+ description: 'Valid check types in configuration',
106906
106958
  },
106907
- "Record<string,string>": {
106908
- "type": "object",
106909
- "additionalProperties": {
106910
- "type": "string"
106911
- }
106959
+ 'Record<string,string>': {
106960
+ type: 'object',
106961
+ additionalProperties: {
106962
+ type: 'string',
106963
+ },
106912
106964
  },
106913
- "EventTrigger": {
106914
- "type": "string",
106915
- "enum": [
106916
- "pr_opened",
106917
- "pr_updated",
106918
- "pr_closed",
106919
- "issue_opened",
106920
- "issue_comment",
106921
- "manual",
106922
- "schedule",
106923
- "webhook_received"
106965
+ EventTrigger: {
106966
+ type: 'string',
106967
+ enum: [
106968
+ 'pr_opened',
106969
+ 'pr_updated',
106970
+ 'pr_closed',
106971
+ 'issue_opened',
106972
+ 'issue_comment',
106973
+ 'manual',
106974
+ 'schedule',
106975
+ 'webhook_received',
106924
106976
  ],
106925
- "description": "Valid event triggers for checks"
106977
+ description: 'Valid event triggers for checks',
106926
106978
  },
106927
- "AIProviderConfig": {
106928
- "type": "object",
106929
- "properties": {
106930
- "provider": {
106931
- "type": "string",
106932
- "enum": [
106933
- "google",
106934
- "anthropic",
106935
- "openai",
106936
- "bedrock",
106937
- "mock"
106938
- ],
106939
- "description": "AI provider to use"
106979
+ AIProviderConfig: {
106980
+ type: 'object',
106981
+ properties: {
106982
+ provider: {
106983
+ type: 'string',
106984
+ enum: ['google', 'anthropic', 'openai', 'bedrock', 'mock'],
106985
+ description: 'AI provider to use',
106940
106986
  },
106941
- "model": {
106942
- "type": "string",
106943
- "description": "Model name to use"
106987
+ model: {
106988
+ type: 'string',
106989
+ description: 'Model name to use',
106944
106990
  },
106945
- "apiKey": {
106946
- "type": "string",
106947
- "description": "API key (usually from environment variables)"
106991
+ apiKey: {
106992
+ type: 'string',
106993
+ description: 'API key (usually from environment variables)',
106948
106994
  },
106949
- "timeout": {
106950
- "type": "number",
106951
- "description": "Request timeout in milliseconds"
106995
+ timeout: {
106996
+ type: 'number',
106997
+ description: 'Request timeout in milliseconds',
106952
106998
  },
106953
- "debug": {
106954
- "type": "boolean",
106955
- "description": "Enable debug mode"
106999
+ debug: {
107000
+ type: 'boolean',
107001
+ description: 'Enable debug mode',
107002
+ },
107003
+ mcpServers: {
107004
+ $ref: '#/definitions/Record%3Cstring%2CMcpServerConfig%3E',
107005
+ description: 'MCP servers configuration',
106956
107006
  },
106957
- "mcpServers": {
106958
- "$ref": "#/definitions/Record%3Cstring%2CMcpServerConfig%3E",
106959
- "description": "MCP servers configuration"
106960
- }
106961
107007
  },
106962
- "additionalProperties": false,
106963
- "description": "AI provider configuration",
106964
- "patternProperties": {
106965
- "^x-": {}
106966
- }
107008
+ additionalProperties: false,
107009
+ description: 'AI provider configuration',
107010
+ patternProperties: {
107011
+ '^x-': {},
107012
+ },
106967
107013
  },
106968
- "Record<string,McpServerConfig>": {
106969
- "type": "object",
106970
- "additionalProperties": {
106971
- "$ref": "#/definitions/McpServerConfig"
106972
- }
107014
+ 'Record<string,McpServerConfig>': {
107015
+ type: 'object',
107016
+ additionalProperties: {
107017
+ $ref: '#/definitions/McpServerConfig',
107018
+ },
106973
107019
  },
106974
- "McpServerConfig": {
106975
- "type": "object",
106976
- "properties": {
106977
- "command": {
106978
- "type": "string",
106979
- "description": "Command to execute for the MCP server"
107020
+ McpServerConfig: {
107021
+ type: 'object',
107022
+ properties: {
107023
+ command: {
107024
+ type: 'string',
107025
+ description: 'Command to execute for the MCP server',
106980
107026
  },
106981
- "args": {
106982
- "type": "array",
106983
- "items": {
106984
- "type": "string"
107027
+ args: {
107028
+ type: 'array',
107029
+ items: {
107030
+ type: 'string',
106985
107031
  },
106986
- "description": "Arguments to pass to the command"
107032
+ description: 'Arguments to pass to the command',
107033
+ },
107034
+ env: {
107035
+ $ref: '#/definitions/Record%3Cstring%2Cstring%3E',
107036
+ description: 'Environment variables for the MCP server',
106987
107037
  },
106988
- "env": {
106989
- "$ref": "#/definitions/Record%3Cstring%2Cstring%3E",
106990
- "description": "Environment variables for the MCP server"
106991
- }
106992
107038
  },
106993
- "required": [
106994
- "command"
106995
- ],
106996
- "additionalProperties": false,
106997
- "description": "MCP Server configuration",
106998
- "patternProperties": {
106999
- "^x-": {}
107000
- }
107039
+ required: ['command'],
107040
+ additionalProperties: false,
107041
+ description: 'MCP Server configuration',
107042
+ patternProperties: {
107043
+ '^x-': {},
107044
+ },
107001
107045
  },
107002
- "ClaudeCodeConfig": {
107003
- "type": "object",
107004
- "properties": {
107005
- "allowedTools": {
107006
- "type": "array",
107007
- "items": {
107008
- "type": "string"
107046
+ ClaudeCodeConfig: {
107047
+ type: 'object',
107048
+ properties: {
107049
+ allowedTools: {
107050
+ type: 'array',
107051
+ items: {
107052
+ type: 'string',
107009
107053
  },
107010
- "description": "List of allowed tools for Claude Code to use"
107054
+ description: 'List of allowed tools for Claude Code to use',
107011
107055
  },
107012
- "maxTurns": {
107013
- "type": "number",
107014
- "description": "Maximum number of turns in conversation"
107056
+ maxTurns: {
107057
+ type: 'number',
107058
+ description: 'Maximum number of turns in conversation',
107015
107059
  },
107016
- "systemPrompt": {
107017
- "type": "string",
107018
- "description": "System prompt for Claude Code"
107060
+ systemPrompt: {
107061
+ type: 'string',
107062
+ description: 'System prompt for Claude Code',
107019
107063
  },
107020
- "mcpServers": {
107021
- "$ref": "#/definitions/Record%3Cstring%2CMcpServerConfig%3E",
107022
- "description": "MCP servers configuration"
107064
+ mcpServers: {
107065
+ $ref: '#/definitions/Record%3Cstring%2CMcpServerConfig%3E',
107066
+ description: 'MCP servers configuration',
107023
107067
  },
107024
- "subagent": {
107025
- "type": "string",
107026
- "description": "Path to subagent script"
107068
+ subagent: {
107069
+ type: 'string',
107070
+ description: 'Path to subagent script',
107027
107071
  },
107028
- "hooks": {
107029
- "type": "object",
107030
- "properties": {
107031
- "onStart": {
107032
- "type": "string",
107033
- "description": "Called when check starts"
107072
+ hooks: {
107073
+ type: 'object',
107074
+ properties: {
107075
+ onStart: {
107076
+ type: 'string',
107077
+ description: 'Called when check starts',
107034
107078
  },
107035
- "onEnd": {
107036
- "type": "string",
107037
- "description": "Called when check ends"
107079
+ onEnd: {
107080
+ type: 'string',
107081
+ description: 'Called when check ends',
107082
+ },
107083
+ onError: {
107084
+ type: 'string',
107085
+ description: 'Called when check encounters an error',
107038
107086
  },
107039
- "onError": {
107040
- "type": "string",
107041
- "description": "Called when check encounters an error"
107042
- }
107043
107087
  },
107044
- "additionalProperties": false,
107045
- "description": "Event hooks for lifecycle management",
107046
- "patternProperties": {
107047
- "^x-": {}
107048
- }
107049
- }
107088
+ additionalProperties: false,
107089
+ description: 'Event hooks for lifecycle management',
107090
+ patternProperties: {
107091
+ '^x-': {},
107092
+ },
107093
+ },
107094
+ },
107095
+ additionalProperties: false,
107096
+ description: 'Claude Code configuration',
107097
+ patternProperties: {
107098
+ '^x-': {},
107050
107099
  },
107051
- "additionalProperties": false,
107052
- "description": "Claude Code configuration",
107053
- "patternProperties": {
107054
- "^x-": {}
107055
- }
107056
107100
  },
107057
- "EnvConfig": {
107058
- "type": "object",
107059
- "additionalProperties": {
107060
- "type": [
107061
- "string",
107062
- "number",
107063
- "boolean"
107064
- ]
107101
+ EnvConfig: {
107102
+ type: 'object',
107103
+ additionalProperties: {
107104
+ type: ['string', 'number', 'boolean'],
107065
107105
  },
107066
- "description": "Environment variable reference configuration"
107106
+ description: 'Environment variable reference configuration',
107067
107107
  },
107068
- "Record<string,unknown>": {
107069
- "type": "object",
107070
- "additionalProperties": {}
107108
+ 'Record<string,unknown>': {
107109
+ type: 'object',
107110
+ additionalProperties: {},
107071
107111
  },
107072
- "CustomTemplateConfig": {
107073
- "type": "object",
107074
- "properties": {
107075
- "file": {
107076
- "type": "string",
107077
- "description": "Path to custom template file (relative to config file or absolute)"
107112
+ CustomTemplateConfig: {
107113
+ type: 'object',
107114
+ properties: {
107115
+ file: {
107116
+ type: 'string',
107117
+ description: 'Path to custom template file (relative to config file or absolute)',
107118
+ },
107119
+ content: {
107120
+ type: 'string',
107121
+ description: 'Raw template content as string',
107078
107122
  },
107079
- "content": {
107080
- "type": "string",
107081
- "description": "Raw template content as string"
107082
- }
107083
107123
  },
107084
- "additionalProperties": false,
107085
- "description": "Custom template configuration",
107086
- "patternProperties": {
107087
- "^x-": {}
107088
- }
107124
+ additionalProperties: false,
107125
+ description: 'Custom template configuration',
107126
+ patternProperties: {
107127
+ '^x-': {},
107128
+ },
107089
107129
  },
107090
- "FailureConditions": {
107091
- "type": "object",
107092
- "additionalProperties": {
107093
- "$ref": "#/definitions/FailureCondition"
107130
+ FailureConditions: {
107131
+ type: 'object',
107132
+ additionalProperties: {
107133
+ $ref: '#/definitions/FailureCondition',
107094
107134
  },
107095
- "description": "Collection of failure conditions"
107135
+ description: 'Collection of failure conditions',
107096
107136
  },
107097
- "FailureCondition": {
107098
- "anyOf": [
107137
+ FailureCondition: {
107138
+ anyOf: [
107099
107139
  {
107100
- "$ref": "#/definitions/SimpleFailureCondition"
107140
+ $ref: '#/definitions/SimpleFailureCondition',
107101
107141
  },
107102
107142
  {
107103
- "$ref": "#/definitions/ComplexFailureCondition"
107104
- }
107143
+ $ref: '#/definitions/ComplexFailureCondition',
107144
+ },
107105
107145
  ],
107106
- "description": "Failure condition - can be a simple expression string or complex object"
107146
+ description: 'Failure condition - can be a simple expression string or complex object',
107107
107147
  },
107108
- "SimpleFailureCondition": {
107109
- "type": "string",
107110
- "description": "Simple failure condition - just an expression string"
107148
+ SimpleFailureCondition: {
107149
+ type: 'string',
107150
+ description: 'Simple failure condition - just an expression string',
107111
107151
  },
107112
- "ComplexFailureCondition": {
107113
- "type": "object",
107114
- "properties": {
107115
- "condition": {
107116
- "type": "string",
107117
- "description": "Expression to evaluate using Function Constructor"
107152
+ ComplexFailureCondition: {
107153
+ type: 'object',
107154
+ properties: {
107155
+ condition: {
107156
+ type: 'string',
107157
+ description: 'Expression to evaluate using Function Constructor',
107118
107158
  },
107119
- "message": {
107120
- "type": "string",
107121
- "description": "Human-readable message when condition is met"
107159
+ message: {
107160
+ type: 'string',
107161
+ description: 'Human-readable message when condition is met',
107122
107162
  },
107123
- "severity": {
107124
- "$ref": "#/definitions/FailureConditionSeverity",
107125
- "description": "Severity level of the failure"
107163
+ severity: {
107164
+ $ref: '#/definitions/FailureConditionSeverity',
107165
+ description: 'Severity level of the failure',
107166
+ },
107167
+ halt_execution: {
107168
+ type: 'boolean',
107169
+ description: 'Whether this condition should halt execution',
107126
107170
  },
107127
- "halt_execution": {
107128
- "type": "boolean",
107129
- "description": "Whether this condition should halt execution"
107130
- }
107131
107171
  },
107132
- "required": [
107133
- "condition"
107134
- ],
107135
- "additionalProperties": false,
107136
- "description": "Complex failure condition with additional metadata",
107137
- "patternProperties": {
107138
- "^x-": {}
107139
- }
107172
+ required: ['condition'],
107173
+ additionalProperties: false,
107174
+ description: 'Complex failure condition with additional metadata',
107175
+ patternProperties: {
107176
+ '^x-': {},
107177
+ },
107140
107178
  },
107141
- "FailureConditionSeverity": {
107142
- "type": "string",
107143
- "enum": [
107144
- "error",
107145
- "warning",
107146
- "info"
107147
- ],
107148
- "description": "Failure condition severity levels"
107179
+ FailureConditionSeverity: {
107180
+ type: 'string',
107181
+ enum: ['error', 'warning', 'info'],
107182
+ description: 'Failure condition severity levels',
107149
107183
  },
107150
- "OnFailConfig": {
107151
- "type": "object",
107152
- "properties": {
107153
- "retry": {
107154
- "$ref": "#/definitions/RetryPolicy",
107155
- "description": "Retry policy"
107184
+ OnFailConfig: {
107185
+ type: 'object',
107186
+ properties: {
107187
+ retry: {
107188
+ $ref: '#/definitions/RetryPolicy',
107189
+ description: 'Retry policy',
107156
107190
  },
107157
- "run": {
107158
- "type": "array",
107159
- "items": {
107160
- "type": "string"
107191
+ run: {
107192
+ type: 'array',
107193
+ items: {
107194
+ type: 'string',
107161
107195
  },
107162
- "description": "Remediation steps to run before reattempt"
107196
+ description: 'Remediation steps to run before reattempt',
107163
107197
  },
107164
- "goto": {
107165
- "type": "string",
107166
- "description": "Jump back to an ancestor step (by id)"
107198
+ goto: {
107199
+ type: 'string',
107200
+ description: 'Jump back to an ancestor step (by id)',
107167
107201
  },
107168
- "goto_js": {
107169
- "type": "string",
107170
- "description": "Dynamic goto: JS expression returning step id or null"
107202
+ goto_js: {
107203
+ type: 'string',
107204
+ description: 'Dynamic goto: JS expression returning step id or null',
107205
+ },
107206
+ run_js: {
107207
+ type: 'string',
107208
+ description: 'Dynamic remediation list: JS expression returning string[]',
107171
107209
  },
107172
- "run_js": {
107173
- "type": "string",
107174
- "description": "Dynamic remediation list: JS expression returning string[]"
107175
- }
107176
107210
  },
107177
- "additionalProperties": false,
107178
- "description": "Failure routing configuration per check",
107179
- "patternProperties": {
107180
- "^x-": {}
107181
- }
107211
+ additionalProperties: false,
107212
+ description: 'Failure routing configuration per check',
107213
+ patternProperties: {
107214
+ '^x-': {},
107215
+ },
107182
107216
  },
107183
- "RetryPolicy": {
107184
- "type": "object",
107185
- "properties": {
107186
- "max": {
107187
- "type": "number",
107188
- "description": "Maximum retry attempts (excluding the first attempt)"
107217
+ RetryPolicy: {
107218
+ type: 'object',
107219
+ properties: {
107220
+ max: {
107221
+ type: 'number',
107222
+ description: 'Maximum retry attempts (excluding the first attempt)',
107223
+ },
107224
+ backoff: {
107225
+ $ref: '#/definitions/BackoffPolicy',
107226
+ description: 'Backoff policy',
107189
107227
  },
107190
- "backoff": {
107191
- "$ref": "#/definitions/BackoffPolicy",
107192
- "description": "Backoff policy"
107193
- }
107194
107228
  },
107195
- "additionalProperties": false,
107196
- "description": "Retry policy for a step",
107197
- "patternProperties": {
107198
- "^x-": {}
107199
- }
107229
+ additionalProperties: false,
107230
+ description: 'Retry policy for a step',
107231
+ patternProperties: {
107232
+ '^x-': {},
107233
+ },
107200
107234
  },
107201
- "BackoffPolicy": {
107202
- "type": "object",
107203
- "properties": {
107204
- "mode": {
107205
- "type": "string",
107206
- "enum": [
107207
- "fixed",
107208
- "exponential"
107209
- ],
107210
- "description": "Backoff mode"
107235
+ BackoffPolicy: {
107236
+ type: 'object',
107237
+ properties: {
107238
+ mode: {
107239
+ type: 'string',
107240
+ enum: ['fixed', 'exponential'],
107241
+ description: 'Backoff mode',
107242
+ },
107243
+ delay_ms: {
107244
+ type: 'number',
107245
+ description: 'Initial delay in milliseconds',
107211
107246
  },
107212
- "delay_ms": {
107213
- "type": "number",
107214
- "description": "Initial delay in milliseconds"
107215
- }
107216
107247
  },
107217
- "additionalProperties": false,
107218
- "description": "Backoff policy for retries",
107219
- "patternProperties": {
107220
- "^x-": {}
107221
- }
107248
+ additionalProperties: false,
107249
+ description: 'Backoff policy for retries',
107250
+ patternProperties: {
107251
+ '^x-': {},
107252
+ },
107222
107253
  },
107223
- "OnSuccessConfig": {
107224
- "type": "object",
107225
- "properties": {
107226
- "run": {
107227
- "type": "array",
107228
- "items": {
107229
- "type": "string"
107254
+ OnSuccessConfig: {
107255
+ type: 'object',
107256
+ properties: {
107257
+ run: {
107258
+ type: 'array',
107259
+ items: {
107260
+ type: 'string',
107230
107261
  },
107231
- "description": "Post-success steps to run"
107262
+ description: 'Post-success steps to run',
107232
107263
  },
107233
- "goto": {
107234
- "type": "string",
107235
- "description": "Optional jump back to ancestor step (by id)"
107264
+ goto: {
107265
+ type: 'string',
107266
+ description: 'Optional jump back to ancestor step (by id)',
107236
107267
  },
107237
- "goto_js": {
107238
- "type": "string",
107239
- "description": "Dynamic goto: JS expression returning step id or null"
107268
+ goto_js: {
107269
+ type: 'string',
107270
+ description: 'Dynamic goto: JS expression returning step id or null',
107271
+ },
107272
+ run_js: {
107273
+ type: 'string',
107274
+ description: 'Dynamic post-success steps: JS expression returning string[]',
107240
107275
  },
107241
- "run_js": {
107242
- "type": "string",
107243
- "description": "Dynamic post-success steps: JS expression returning string[]"
107244
- }
107245
107276
  },
107246
- "additionalProperties": false,
107247
- "description": "Success routing configuration per check",
107248
- "patternProperties": {
107249
- "^x-": {}
107250
- }
107277
+ additionalProperties: false,
107278
+ description: 'Success routing configuration per check',
107279
+ patternProperties: {
107280
+ '^x-': {},
107281
+ },
107251
107282
  },
107252
- "OutputConfig": {
107253
- "type": "object",
107254
- "properties": {
107255
- "pr_comment": {
107256
- "$ref": "#/definitions/PrCommentOutput",
107257
- "description": "PR comment configuration"
107283
+ OutputConfig: {
107284
+ type: 'object',
107285
+ properties: {
107286
+ pr_comment: {
107287
+ $ref: '#/definitions/PrCommentOutput',
107288
+ description: 'PR comment configuration',
107258
107289
  },
107259
- "file_comment": {
107260
- "$ref": "#/definitions/FileCommentOutput",
107261
- "description": "File comment configuration (optional)"
107290
+ file_comment: {
107291
+ $ref: '#/definitions/FileCommentOutput',
107292
+ description: 'File comment configuration (optional)',
107262
107293
  },
107263
- "github_checks": {
107264
- "$ref": "#/definitions/GitHubCheckOutput",
107265
- "description": "GitHub check runs configuration (optional)"
107294
+ github_checks: {
107295
+ $ref: '#/definitions/GitHubCheckOutput',
107296
+ description: 'GitHub check runs configuration (optional)',
107297
+ },
107298
+ suppressionEnabled: {
107299
+ type: 'boolean',
107300
+ description: 'Whether to enable issue suppression via visor-disable comments (default: true)',
107266
107301
  },
107267
- "suppressionEnabled": {
107268
- "type": "boolean",
107269
- "description": "Whether to enable issue suppression via visor-disable comments (default: true)"
107270
- }
107271
107302
  },
107272
- "required": [
107273
- "pr_comment"
107274
- ],
107275
- "additionalProperties": false,
107276
- "description": "Output configuration",
107277
- "patternProperties": {
107278
- "^x-": {}
107279
- }
107303
+ required: ['pr_comment'],
107304
+ additionalProperties: false,
107305
+ description: 'Output configuration',
107306
+ patternProperties: {
107307
+ '^x-': {},
107308
+ },
107280
107309
  },
107281
- "PrCommentOutput": {
107282
- "type": "object",
107283
- "properties": {
107284
- "format": {
107285
- "$ref": "#/definitions/ConfigOutputFormat",
107286
- "description": "Format of the output"
107310
+ PrCommentOutput: {
107311
+ type: 'object',
107312
+ properties: {
107313
+ format: {
107314
+ $ref: '#/definitions/ConfigOutputFormat',
107315
+ description: 'Format of the output',
107287
107316
  },
107288
- "group_by": {
107289
- "$ref": "#/definitions/GroupByOption",
107290
- "description": "How to group the results"
107317
+ group_by: {
107318
+ $ref: '#/definitions/GroupByOption',
107319
+ description: 'How to group the results',
107291
107320
  },
107292
- "collapse": {
107293
- "type": "boolean",
107294
- "description": "Whether to collapse sections by default"
107321
+ collapse: {
107322
+ type: 'boolean',
107323
+ description: 'Whether to collapse sections by default',
107324
+ },
107325
+ debug: {
107326
+ $ref: '#/definitions/DebugConfig',
107327
+ description: 'Debug mode configuration (optional)',
107295
107328
  },
107296
- "debug": {
107297
- "$ref": "#/definitions/DebugConfig",
107298
- "description": "Debug mode configuration (optional)"
107299
- }
107300
107329
  },
107301
- "required": [
107302
- "format",
107303
- "group_by",
107304
- "collapse"
107305
- ],
107306
- "additionalProperties": false,
107307
- "description": "PR comment output configuration",
107308
- "patternProperties": {
107309
- "^x-": {}
107310
- }
107330
+ required: ['format', 'group_by', 'collapse'],
107331
+ additionalProperties: false,
107332
+ description: 'PR comment output configuration',
107333
+ patternProperties: {
107334
+ '^x-': {},
107335
+ },
107311
107336
  },
107312
- "ConfigOutputFormat": {
107313
- "type": "string",
107314
- "enum": [
107315
- "table",
107316
- "json",
107317
- "markdown",
107318
- "sarif"
107319
- ],
107320
- "description": "Valid output formats"
107337
+ ConfigOutputFormat: {
107338
+ type: 'string',
107339
+ enum: ['table', 'json', 'markdown', 'sarif'],
107340
+ description: 'Valid output formats',
107321
107341
  },
107322
- "GroupByOption": {
107323
- "type": "string",
107324
- "enum": [
107325
- "check",
107326
- "file",
107327
- "severity"
107328
- ],
107329
- "description": "Valid grouping options"
107342
+ GroupByOption: {
107343
+ type: 'string',
107344
+ enum: ['check', 'file', 'severity'],
107345
+ description: 'Valid grouping options',
107330
107346
  },
107331
- "DebugConfig": {
107332
- "type": "object",
107333
- "properties": {
107334
- "enabled": {
107335
- "type": "boolean",
107336
- "description": "Enable debug mode"
107347
+ DebugConfig: {
107348
+ type: 'object',
107349
+ properties: {
107350
+ enabled: {
107351
+ type: 'boolean',
107352
+ description: 'Enable debug mode',
107337
107353
  },
107338
- "includePrompts": {
107339
- "type": "boolean",
107340
- "description": "Include AI prompts in debug output"
107354
+ includePrompts: {
107355
+ type: 'boolean',
107356
+ description: 'Include AI prompts in debug output',
107341
107357
  },
107342
- "includeRawResponses": {
107343
- "type": "boolean",
107344
- "description": "Include raw AI responses in debug output"
107358
+ includeRawResponses: {
107359
+ type: 'boolean',
107360
+ description: 'Include raw AI responses in debug output',
107345
107361
  },
107346
- "includeTiming": {
107347
- "type": "boolean",
107348
- "description": "Include timing information"
107362
+ includeTiming: {
107363
+ type: 'boolean',
107364
+ description: 'Include timing information',
107365
+ },
107366
+ includeProviderInfo: {
107367
+ type: 'boolean',
107368
+ description: 'Include provider information',
107349
107369
  },
107350
- "includeProviderInfo": {
107351
- "type": "boolean",
107352
- "description": "Include provider information"
107353
- }
107354
107370
  },
107355
- "required": [
107356
- "enabled",
107357
- "includePrompts",
107358
- "includeRawResponses",
107359
- "includeTiming",
107360
- "includeProviderInfo"
107371
+ required: [
107372
+ 'enabled',
107373
+ 'includePrompts',
107374
+ 'includeRawResponses',
107375
+ 'includeTiming',
107376
+ 'includeProviderInfo',
107361
107377
  ],
107362
- "additionalProperties": false,
107363
- "description": "Debug mode configuration",
107364
- "patternProperties": {
107365
- "^x-": {}
107366
- }
107378
+ additionalProperties: false,
107379
+ description: 'Debug mode configuration',
107380
+ patternProperties: {
107381
+ '^x-': {},
107382
+ },
107367
107383
  },
107368
- "FileCommentOutput": {
107369
- "type": "object",
107370
- "properties": {
107371
- "enabled": {
107372
- "type": "boolean",
107373
- "description": "Whether file comments are enabled"
107384
+ FileCommentOutput: {
107385
+ type: 'object',
107386
+ properties: {
107387
+ enabled: {
107388
+ type: 'boolean',
107389
+ description: 'Whether file comments are enabled',
107390
+ },
107391
+ inline: {
107392
+ type: 'boolean',
107393
+ description: 'Whether to show inline comments',
107374
107394
  },
107375
- "inline": {
107376
- "type": "boolean",
107377
- "description": "Whether to show inline comments"
107378
- }
107379
107395
  },
107380
- "required": [
107381
- "enabled",
107382
- "inline"
107383
- ],
107384
- "additionalProperties": false,
107385
- "description": "File comment output configuration",
107386
- "patternProperties": {
107387
- "^x-": {}
107388
- }
107396
+ required: ['enabled', 'inline'],
107397
+ additionalProperties: false,
107398
+ description: 'File comment output configuration',
107399
+ patternProperties: {
107400
+ '^x-': {},
107401
+ },
107389
107402
  },
107390
- "GitHubCheckOutput": {
107391
- "type": "object",
107392
- "properties": {
107393
- "enabled": {
107394
- "type": "boolean",
107395
- "description": "Whether GitHub check runs are enabled"
107403
+ GitHubCheckOutput: {
107404
+ type: 'object',
107405
+ properties: {
107406
+ enabled: {
107407
+ type: 'boolean',
107408
+ description: 'Whether GitHub check runs are enabled',
107396
107409
  },
107397
- "per_check": {
107398
- "type": "boolean",
107399
- "description": "Whether to create individual check runs per configured check"
107410
+ per_check: {
107411
+ type: 'boolean',
107412
+ description: 'Whether to create individual check runs per configured check',
107413
+ },
107414
+ name_prefix: {
107415
+ type: 'string',
107416
+ description: 'Custom name prefix for check runs',
107400
107417
  },
107401
- "name_prefix": {
107402
- "type": "string",
107403
- "description": "Custom name prefix for check runs"
107404
- }
107405
107418
  },
107406
- "required": [
107407
- "enabled",
107408
- "per_check"
107409
- ],
107410
- "additionalProperties": false,
107411
- "description": "GitHub Check Runs output configuration",
107412
- "patternProperties": {
107413
- "^x-": {}
107414
- }
107419
+ required: ['enabled', 'per_check'],
107420
+ additionalProperties: false,
107421
+ description: 'GitHub Check Runs output configuration',
107422
+ patternProperties: {
107423
+ '^x-': {},
107424
+ },
107415
107425
  },
107416
- "HttpServerConfig": {
107417
- "type": "object",
107418
- "properties": {
107419
- "enabled": {
107420
- "type": "boolean",
107421
- "description": "Whether HTTP server is enabled"
107426
+ HttpServerConfig: {
107427
+ type: 'object',
107428
+ properties: {
107429
+ enabled: {
107430
+ type: 'boolean',
107431
+ description: 'Whether HTTP server is enabled',
107422
107432
  },
107423
- "port": {
107424
- "type": "number",
107425
- "description": "Port to listen on"
107433
+ port: {
107434
+ type: 'number',
107435
+ description: 'Port to listen on',
107426
107436
  },
107427
- "host": {
107428
- "type": "string",
107429
- "description": "Host/IP to bind to (defaults to 0.0.0.0)"
107437
+ host: {
107438
+ type: 'string',
107439
+ description: 'Host/IP to bind to (defaults to 0.0.0.0)',
107430
107440
  },
107431
- "tls": {
107432
- "$ref": "#/definitions/TlsConfig",
107433
- "description": "TLS/SSL configuration for HTTPS"
107441
+ tls: {
107442
+ $ref: '#/definitions/TlsConfig',
107443
+ description: 'TLS/SSL configuration for HTTPS',
107434
107444
  },
107435
- "auth": {
107436
- "$ref": "#/definitions/HttpAuthConfig",
107437
- "description": "Authentication configuration"
107445
+ auth: {
107446
+ $ref: '#/definitions/HttpAuthConfig',
107447
+ description: 'Authentication configuration',
107438
107448
  },
107439
- "endpoints": {
107440
- "type": "array",
107441
- "items": {
107442
- "$ref": "#/definitions/HttpEndpointConfig"
107449
+ endpoints: {
107450
+ type: 'array',
107451
+ items: {
107452
+ $ref: '#/definitions/HttpEndpointConfig',
107443
107453
  },
107444
- "description": "HTTP endpoints configuration"
107445
- }
107454
+ description: 'HTTP endpoints configuration',
107455
+ },
107456
+ },
107457
+ required: ['enabled', 'port'],
107458
+ additionalProperties: false,
107459
+ description: 'HTTP server configuration for receiving webhooks',
107460
+ patternProperties: {
107461
+ '^x-': {},
107446
107462
  },
107447
- "required": [
107448
- "enabled",
107449
- "port"
107450
- ],
107451
- "additionalProperties": false,
107452
- "description": "HTTP server configuration for receiving webhooks",
107453
- "patternProperties": {
107454
- "^x-": {}
107455
- }
107456
107463
  },
107457
- "TlsConfig": {
107458
- "type": "object",
107459
- "properties": {
107460
- "enabled": {
107461
- "type": "boolean",
107462
- "description": "Enable TLS/HTTPS"
107464
+ TlsConfig: {
107465
+ type: 'object',
107466
+ properties: {
107467
+ enabled: {
107468
+ type: 'boolean',
107469
+ description: 'Enable TLS/HTTPS',
107463
107470
  },
107464
- "cert": {
107465
- "type": "string",
107466
- "description": "Path to TLS certificate file or certificate content"
107471
+ cert: {
107472
+ type: 'string',
107473
+ description: 'Path to TLS certificate file or certificate content',
107467
107474
  },
107468
- "key": {
107469
- "type": "string",
107470
- "description": "Path to TLS key file or key content"
107475
+ key: {
107476
+ type: 'string',
107477
+ description: 'Path to TLS key file or key content',
107471
107478
  },
107472
- "ca": {
107473
- "type": "string",
107474
- "description": "Path to CA certificate file or CA content (optional)"
107479
+ ca: {
107480
+ type: 'string',
107481
+ description: 'Path to CA certificate file or CA content (optional)',
107482
+ },
107483
+ rejectUnauthorized: {
107484
+ type: 'boolean',
107485
+ description: 'Reject unauthorized connections (default: true)',
107475
107486
  },
107476
- "rejectUnauthorized": {
107477
- "type": "boolean",
107478
- "description": "Reject unauthorized connections (default: true)"
107479
- }
107480
107487
  },
107481
- "required": [
107482
- "enabled"
107483
- ],
107484
- "additionalProperties": false,
107485
- "description": "TLS/SSL configuration for HTTPS server",
107486
- "patternProperties": {
107487
- "^x-": {}
107488
- }
107488
+ required: ['enabled'],
107489
+ additionalProperties: false,
107490
+ description: 'TLS/SSL configuration for HTTPS server',
107491
+ patternProperties: {
107492
+ '^x-': {},
107493
+ },
107489
107494
  },
107490
- "HttpAuthConfig": {
107491
- "type": "object",
107492
- "properties": {
107493
- "type": {
107494
- "type": "string",
107495
- "enum": [
107496
- "bearer_token",
107497
- "hmac",
107498
- "basic",
107499
- "none"
107500
- ],
107501
- "description": "Authentication type"
107495
+ HttpAuthConfig: {
107496
+ type: 'object',
107497
+ properties: {
107498
+ type: {
107499
+ type: 'string',
107500
+ enum: ['bearer_token', 'hmac', 'basic', 'none'],
107501
+ description: 'Authentication type',
107502
107502
  },
107503
- "secret": {
107504
- "type": "string",
107505
- "description": "Secret or token for authentication"
107503
+ secret: {
107504
+ type: 'string',
107505
+ description: 'Secret or token for authentication',
107506
107506
  },
107507
- "username": {
107508
- "type": "string",
107509
- "description": "Username for basic auth"
107507
+ username: {
107508
+ type: 'string',
107509
+ description: 'Username for basic auth',
107510
+ },
107511
+ password: {
107512
+ type: 'string',
107513
+ description: 'Password for basic auth',
107510
107514
  },
107511
- "password": {
107512
- "type": "string",
107513
- "description": "Password for basic auth"
107514
- }
107515
107515
  },
107516
- "required": [
107517
- "type"
107518
- ],
107519
- "additionalProperties": false,
107520
- "description": "HTTP server authentication configuration",
107521
- "patternProperties": {
107522
- "^x-": {}
107523
- }
107516
+ required: ['type'],
107517
+ additionalProperties: false,
107518
+ description: 'HTTP server authentication configuration',
107519
+ patternProperties: {
107520
+ '^x-': {},
107521
+ },
107524
107522
  },
107525
- "HttpEndpointConfig": {
107526
- "type": "object",
107527
- "properties": {
107528
- "path": {
107529
- "type": "string",
107530
- "description": "Path for the webhook endpoint"
107523
+ HttpEndpointConfig: {
107524
+ type: 'object',
107525
+ properties: {
107526
+ path: {
107527
+ type: 'string',
107528
+ description: 'Path for the webhook endpoint',
107531
107529
  },
107532
- "transform": {
107533
- "type": "string",
107534
- "description": "Optional transform template (Liquid) for the received data"
107530
+ transform: {
107531
+ type: 'string',
107532
+ description: 'Optional transform template (Liquid) for the received data',
107533
+ },
107534
+ name: {
107535
+ type: 'string',
107536
+ description: 'Optional name/ID for this endpoint',
107535
107537
  },
107536
- "name": {
107537
- "type": "string",
107538
- "description": "Optional name/ID for this endpoint"
107539
- }
107540
107538
  },
107541
- "required": [
107542
- "path"
107543
- ],
107544
- "additionalProperties": false,
107545
- "description": "HTTP server endpoint configuration",
107546
- "patternProperties": {
107547
- "^x-": {}
107548
- }
107539
+ required: ['path'],
107540
+ additionalProperties: false,
107541
+ description: 'HTTP server endpoint configuration',
107542
+ patternProperties: {
107543
+ '^x-': {},
107544
+ },
107549
107545
  },
107550
- "TagFilter": {
107551
- "type": "object",
107552
- "properties": {
107553
- "include": {
107554
- "type": "array",
107555
- "items": {
107556
- "type": "string"
107546
+ TagFilter: {
107547
+ type: 'object',
107548
+ properties: {
107549
+ include: {
107550
+ type: 'array',
107551
+ items: {
107552
+ type: 'string',
107557
107553
  },
107558
- "description": "Tags that checks must have to be included (ANY match)"
107554
+ description: 'Tags that checks must have to be included (ANY match)',
107559
107555
  },
107560
- "exclude": {
107561
- "type": "array",
107562
- "items": {
107563
- "type": "string"
107556
+ exclude: {
107557
+ type: 'array',
107558
+ items: {
107559
+ type: 'string',
107564
107560
  },
107565
- "description": "Tags that will exclude checks if present (ANY match)"
107566
- }
107561
+ description: 'Tags that will exclude checks if present (ANY match)',
107562
+ },
107563
+ },
107564
+ additionalProperties: false,
107565
+ description: 'Tag filter configuration for selective check execution',
107566
+ patternProperties: {
107567
+ '^x-': {},
107567
107568
  },
107568
- "additionalProperties": false,
107569
- "description": "Tag filter configuration for selective check execution",
107570
- "patternProperties": {
107571
- "^x-": {}
107572
- }
107573
107569
  },
107574
- "RoutingDefaults": {
107575
- "type": "object",
107576
- "properties": {
107577
- "max_loops": {
107578
- "type": "number",
107579
- "description": "Per-scope cap on routing transitions (success + failure)"
107570
+ RoutingDefaults: {
107571
+ type: 'object',
107572
+ properties: {
107573
+ max_loops: {
107574
+ type: 'number',
107575
+ description: 'Per-scope cap on routing transitions (success + failure)',
107580
107576
  },
107581
- "defaults": {
107582
- "type": "object",
107583
- "properties": {
107584
- "on_fail": {
107585
- "$ref": "#/definitions/OnFailConfig"
107586
- }
107577
+ defaults: {
107578
+ type: 'object',
107579
+ properties: {
107580
+ on_fail: {
107581
+ $ref: '#/definitions/OnFailConfig',
107582
+ },
107587
107583
  },
107588
- "additionalProperties": false,
107589
- "description": "Default policies applied to checks (step-level overrides take precedence)",
107590
- "patternProperties": {
107591
- "^x-": {}
107592
- }
107593
- }
107584
+ additionalProperties: false,
107585
+ description: 'Default policies applied to checks (step-level overrides take precedence)',
107586
+ patternProperties: {
107587
+ '^x-': {},
107588
+ },
107589
+ },
107594
107590
  },
107595
- "additionalProperties": false,
107596
- "description": "Global routing defaults",
107597
- "patternProperties": {
107598
- "^x-": {}
107599
- }
107600
- }
107601
- }
107591
+ additionalProperties: false,
107592
+ description: 'Global routing defaults',
107593
+ patternProperties: {
107594
+ '^x-': {},
107595
+ },
107596
+ },
107597
+ },
107602
107598
  };
107603
107599
  exports["default"] = exports.configSchema;
107604
107600
 
@@ -195762,13 +195758,14 @@ async function validateMermaidDiagram(diagram) {
195762
195758
  };
195763
195759
  }
195764
195760
  const result = validate(diagram);
195765
- if (result.errors && result.errors.length === 0) {
195761
+ const actualErrors = (result.errors || []).filter((err) => err.severity === "error");
195762
+ if (actualErrors.length === 0) {
195766
195763
  return {
195767
195764
  isValid: true,
195768
195765
  diagramType: result.type || "unknown"
195769
195766
  };
195770
195767
  } else {
195771
- const errorMessages = (result.errors || []).map((err) => {
195768
+ const errorMessages = actualErrors.map((err) => {
195772
195769
  const location = err.line ? `line ${err.line}${err.column ? `:${err.column}` : ""}` : "";
195773
195770
  return location ? `${location} - ${err.message}` : err.message;
195774
195771
  });
@@ -195777,8 +195774,8 @@ async function validateMermaidDiagram(diagram) {
195777
195774
  diagramType: result.type || "unknown",
195778
195775
  error: errorMessages[0] || "Validation failed",
195779
195776
  detailedError: errorMessages.join("\n"),
195780
- errors: result.errors || []
195781
- // Include raw maid errors for AI fixing
195777
+ errors: actualErrors
195778
+ // Include only actual errors for AI fixing
195782
195779
  };
195783
195780
  }
195784
195781
  } catch (error2) {
@@ -196666,10 +196663,19 @@ var init_client2 = __esm({
196666
196663
  if (this.debug) {
196667
196664
  console.error(`[MCP] Calling ${toolName} with args:`, args);
196668
196665
  }
196669
- const result = await clientInfo.client.callTool({
196670
- name: tool3.originalName,
196671
- arguments: args
196666
+ const timeout = this.config?.settings?.timeout || 3e4;
196667
+ const timeoutPromise = new Promise((_2, reject2) => {
196668
+ setTimeout(() => {
196669
+ reject2(new Error(`MCP tool call timeout after ${timeout}ms`));
196670
+ }, timeout);
196672
196671
  });
196672
+ const result = await Promise.race([
196673
+ clientInfo.client.callTool({
196674
+ name: tool3.originalName,
196675
+ arguments: args
196676
+ }),
196677
+ timeoutPromise
196678
+ ]);
196673
196679
  return result;
196674
196680
  } catch (error2) {
196675
196681
  console.error(`[MCP] Error calling tool ${toolName}:`, error2);
@@ -197083,11 +197089,39 @@ var init_ProbeAgent = __esm({
197083
197089
  this.mcpServers = options.mcpServers || null;
197084
197090
  this.mcpBridge = null;
197085
197091
  this.initializeModel();
197092
+ }
197093
+ /**
197094
+ * Initialize the agent asynchronously (must be called after constructor)
197095
+ * This method initializes MCP and merges MCP tools into the tool list
197096
+ */
197097
+ async initialize() {
197086
197098
  if (this.enableMcp) {
197087
- this.initializeMCP().catch((error2) => {
197099
+ try {
197100
+ await this.initializeMCP();
197101
+ if (this.mcpBridge) {
197102
+ const mcpTools = this.mcpBridge.mcpTools || {};
197103
+ for (const [toolName, toolImpl] of Object.entries(mcpTools)) {
197104
+ this.toolImplementations[toolName] = toolImpl;
197105
+ }
197106
+ }
197107
+ if (this.debug) {
197108
+ const allToolNames = Object.keys(this.toolImplementations);
197109
+ const nativeToolCount = allToolNames.filter((name14) => !this.mcpBridge?.mcpTools?.[name14]).length;
197110
+ const mcpToolCount = allToolNames.length - nativeToolCount;
197111
+ console.error("\n[DEBUG] ========================================");
197112
+ console.error("[DEBUG] All Tools Initialized");
197113
+ console.error(`[DEBUG] Native tools: ${nativeToolCount}, MCP tools: ${mcpToolCount}`);
197114
+ console.error("[DEBUG] Available tools:");
197115
+ for (const toolName of allToolNames) {
197116
+ const isMCP = this.mcpBridge?.mcpTools?.[toolName] ? " (MCP)" : "";
197117
+ console.error(`[DEBUG] - ${toolName}${isMCP}`);
197118
+ }
197119
+ console.error("[DEBUG] ========================================\n");
197120
+ }
197121
+ } catch (error2) {
197088
197122
  console.error("[MCP] Failed to initialize MCP:", error2);
197089
197123
  this.mcpBridge = null;
197090
- });
197124
+ }
197091
197125
  }
197092
197126
  }
197093
197127
  /**
@@ -197314,20 +197348,40 @@ var init_ProbeAgent = __esm({
197314
197348
  }
197315
197349
  }
197316
197350
  /**
197317
- * Extract directory paths from listFiles tool output
197351
+ * Extract directory paths from tool output (both listFiles and extract tool)
197318
197352
  * @param {string} content - Tool output content
197319
197353
  * @returns {string[]} - Array of directory paths
197320
197354
  */
197321
197355
  extractListFilesDirectories(content) {
197322
197356
  const directories = [];
197323
- const dirPattern = /^([^\n:]+):\s*$/gm;
197357
+ const fileHeaderPattern = /^File:\s+(.+)$/gm;
197324
197358
  let match;
197359
+ while ((match = fileHeaderPattern.exec(content)) !== null) {
197360
+ const filePath = match[1].trim();
197361
+ const dir = (0, import_path9.dirname)(filePath);
197362
+ if (dir && dir !== ".") {
197363
+ directories.push(dir);
197364
+ if (this.debug) {
197365
+ console.log(`[DEBUG] Extracted directory context from File header: ${dir}`);
197366
+ }
197367
+ }
197368
+ }
197369
+ const dirPattern = /^(\/[^\n:]+|[A-Z]:\\[^\n:]+|\.\.?(?:\/[^\n:]+)?):\s*$/gm;
197325
197370
  while ((match = dirPattern.exec(content)) !== null) {
197326
197371
  const dirPath = match[1].trim();
197327
- if (dirPath && dirPath.length > 0) {
197328
- directories.push(dirPath);
197329
- if (this.debug) {
197330
- console.log(`[DEBUG] Extracted directory context from listFiles: ${dirPath}`);
197372
+ const hasInvalidChars = /\s/.test(dirPath);
197373
+ const isValidPath = !hasInvalidChars && (dirPath.startsWith("/") || // Unix absolute path
197374
+ /^[A-Z]:\\/.test(dirPath) || // Windows absolute path (C:\)
197375
+ dirPath === "." || // Current directory
197376
+ dirPath === ".." || // Parent directory
197377
+ dirPath.startsWith("./") && dirPath.length > 2 && !dirPath.includes(" ") || // ./something (no spaces)
197378
+ dirPath.startsWith("../") && dirPath.length > 3 && !dirPath.includes(" "));
197379
+ if (isValidPath) {
197380
+ if (!directories.includes(dirPath)) {
197381
+ directories.push(dirPath);
197382
+ if (this.debug) {
197383
+ console.log(`[DEBUG] Extracted directory context from listFiles: ${dirPath}`);
197384
+ }
197331
197385
  }
197332
197386
  }
197333
197387
  }
@@ -228447,7 +228501,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"application/1d-interleaved-parityfec
228447
228501
  /***/ ((module) => {
228448
228502
 
228449
228503
  "use strict";
228450
- module.exports = {"rE":"0.1.76"};
228504
+ module.exports = {"rE":"0.1.78"};
228451
228505
 
228452
228506
  /***/ })
228453
228507