@probelabs/visor 0.1.113 → 0.1.122
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/defaults/workflow-builder.tests.yaml +363 -0
- package/defaults/workflow-builder.yaml +720 -0
- package/dist/ai-review-service.d.ts.map +1 -1
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/defaults/workflow-builder.tests.yaml +363 -0
- package/dist/defaults/workflow-builder.yaml +720 -0
- package/dist/docs/workflow-creation-guide.md +1274 -0
- package/dist/frontends/slack-frontend.d.ts +3 -0
- package/dist/frontends/slack-frontend.d.ts.map +1 -1
- package/dist/generated/config-schema.d.ts +14 -6
- package/dist/generated/config-schema.d.ts.map +1 -1
- package/dist/generated/config-schema.json +14 -6
- package/dist/index.js +36879 -13895
- package/dist/logger.d.ts +9 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/mcp-server.d.ts +4 -4
- package/dist/output/traces/{run-2026-01-21T12-31-10-108Z.ndjson → run-2026-01-28T13-56-32-263Z.ndjson} +84 -84
- package/dist/output/traces/run-2026-01-28T13-57-13-140Z.ndjson +1357 -0
- package/dist/providers/ai-check-provider.d.ts.map +1 -1
- package/dist/providers/check-provider.interface.d.ts +15 -1
- package/dist/providers/check-provider.interface.d.ts.map +1 -1
- package/dist/providers/command-check-provider.d.ts.map +1 -1
- package/dist/providers/git-checkout-provider.d.ts.map +1 -1
- package/dist/sdk/{check-provider-registry-534KL5HT.mjs → check-provider-registry-JMNLGIMJ.mjs} +11 -11
- package/dist/sdk/{chunk-AIVFBIS4.mjs → chunk-35NT3725.mjs} +30 -10
- package/dist/sdk/chunk-35NT3725.mjs.map +1 -0
- package/dist/sdk/{chunk-AGIZJ4UZ.mjs → chunk-3NMLT3YS.mjs} +42 -8
- package/dist/sdk/chunk-3NMLT3YS.mjs.map +1 -0
- package/dist/sdk/{chunk-AK6BVWIT.mjs → chunk-7GUAFV6L.mjs} +2 -2
- package/dist/sdk/{chunk-QY2XYPEV.mjs → chunk-CUNPH6TR.mjs} +18 -10
- package/dist/sdk/chunk-CUNPH6TR.mjs.map +1 -0
- package/dist/sdk/{chunk-HTOKWMPO.mjs → chunk-HQL734ZI.mjs} +2 -2
- package/dist/sdk/{chunk-7UK3NIIT.mjs → chunk-IHZOSIF4.mjs} +2 -2
- package/dist/sdk/{chunk-AUT26LHW.mjs → chunk-J2QWVDXK.mjs} +2 -2
- package/dist/sdk/{chunk-QR7MOMJH.mjs → chunk-J6EVEXC2.mjs} +2 -2
- package/dist/sdk/{chunk-SIWNBRTK.mjs → chunk-SWEEZ5D5.mjs} +3 -3
- package/dist/sdk/{chunk-23L3QRYX.mjs → chunk-VPEQOQ7G.mjs} +279 -70
- package/dist/sdk/chunk-VPEQOQ7G.mjs.map +1 -0
- package/dist/sdk/{command-executor-TYUV6HUS.mjs → command-executor-Q7MHJKZJ.mjs} +3 -3
- package/dist/sdk/{config-YNC2EOOT.mjs → config-MK4XTU45.mjs} +3 -3
- package/dist/sdk/{failure-condition-evaluator-YGTF2GHG.mjs → failure-condition-evaluator-HB35XRLZ.mjs} +4 -4
- package/dist/sdk/{github-frontend-SIAEOCON.mjs → github-frontend-6Q4BISZX.mjs} +4 -4
- package/dist/sdk/{host-DXUYTNMU.mjs → host-P5NQICP7.mjs} +3 -3
- package/dist/sdk/{liquid-extensions-PKWCKK7E.mjs → liquid-extensions-DFDEBMUI.mjs} +4 -4
- package/dist/sdk/{memory-store-XGBB7LX7.mjs → memory-store-RW5N2NGJ.mjs} +3 -3
- package/dist/sdk/{prompt-state-YRJY6QAL.mjs → prompt-state-EZYOUG75.mjs} +3 -3
- package/dist/sdk/{renderer-schema-LPKN5UJS.mjs → renderer-schema-CKFB5NDB.mjs} +2 -2
- package/dist/sdk/{routing-6N45MJ4F.mjs → routing-KZ345OFG.mjs} +5 -5
- package/dist/sdk/sdk.d.mts +19 -1
- package/dist/sdk/sdk.d.ts +19 -1
- package/dist/sdk/sdk.js +421 -75
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +35 -18
- package/dist/sdk/sdk.mjs.map +1 -1
- package/dist/sdk/{slack-frontend-BVKW3GD5.mjs → slack-frontend-J442FJWZ.mjs} +61 -3
- package/dist/sdk/slack-frontend-J442FJWZ.mjs.map +1 -0
- package/dist/sdk/{workflow-registry-R6KSACFR.mjs → workflow-registry-6LZKCWHP.mjs} +3 -3
- package/dist/state-machine/context/build-engine-context.d.ts.map +1 -1
- package/dist/state-machine/dispatch/history-snapshot.d.ts.map +1 -1
- package/dist/state-machine/runner.d.ts.map +1 -1
- package/dist/state-machine/states/level-dispatch.d.ts.map +1 -1
- package/dist/state-machine/states/routing.d.ts.map +1 -1
- package/dist/state-machine/states/wave-planning.d.ts.map +1 -1
- package/dist/ter-u14b.json +17826 -0
- package/dist/ter-u14n.json +17826 -0
- package/dist/test-runner/index.d.ts.map +1 -1
- package/dist/traces/{run-2026-01-21T12-31-10-108Z.ndjson → run-2026-01-28T13-56-32-263Z.ndjson} +84 -84
- package/dist/traces/run-2026-01-28T13-57-13-140Z.ndjson +1357 -0
- package/dist/tui.d.ts +51 -0
- package/dist/tui.d.ts.map +1 -0
- package/dist/types/cli.d.ts +10 -0
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/config.d.ts +4 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/engine.d.ts +3 -0
- package/dist/types/engine.d.ts.map +1 -1
- package/dist/usr/fonts/AUTHORS +1 -0
- package/dist/usr/fonts/LICENSE +94 -0
- package/dist/usr/fonts/README +340 -0
- package/dist/usr/fonts/ter-u14b.json +17826 -0
- package/dist/usr/fonts/ter-u14n.json +17826 -0
- package/dist/usr/linux +0 -0
- package/dist/usr/windows-ansi +0 -0
- package/dist/usr/xterm +0 -0
- package/dist/usr/xterm-256color +0 -0
- package/dist/usr/xterm.termcap +243 -0
- package/dist/usr/xterm.terminfo +1977 -0
- package/dist/utils/workspace-manager.d.ts +2 -0
- package/dist/utils/workspace-manager.d.ts.map +1 -1
- package/dist/utils/worktree-manager.d.ts +5 -0
- package/dist/utils/worktree-manager.d.ts.map +1 -1
- package/dist/xterm +0 -0
- package/dist/xterm.termcap +243 -0
- package/package.json +9 -7
- package/dist/output/traces/run-2026-01-21T12-32-04-510Z.ndjson +0 -1067
- package/dist/sdk/chunk-23L3QRYX.mjs.map +0 -1
- package/dist/sdk/chunk-AGIZJ4UZ.mjs.map +0 -1
- package/dist/sdk/chunk-AIVFBIS4.mjs.map +0 -1
- package/dist/sdk/chunk-QY2XYPEV.mjs.map +0 -1
- package/dist/sdk/slack-frontend-BVKW3GD5.mjs.map +0 -1
- package/dist/traces/run-2026-01-21T12-32-04-510Z.ndjson +0 -1067
- /package/dist/sdk/{check-provider-registry-534KL5HT.mjs.map → check-provider-registry-JMNLGIMJ.mjs.map} +0 -0
- /package/dist/sdk/{chunk-AK6BVWIT.mjs.map → chunk-7GUAFV6L.mjs.map} +0 -0
- /package/dist/sdk/{chunk-HTOKWMPO.mjs.map → chunk-HQL734ZI.mjs.map} +0 -0
- /package/dist/sdk/{chunk-7UK3NIIT.mjs.map → chunk-IHZOSIF4.mjs.map} +0 -0
- /package/dist/sdk/{chunk-AUT26LHW.mjs.map → chunk-J2QWVDXK.mjs.map} +0 -0
- /package/dist/sdk/{chunk-QR7MOMJH.mjs.map → chunk-J6EVEXC2.mjs.map} +0 -0
- /package/dist/sdk/{chunk-SIWNBRTK.mjs.map → chunk-SWEEZ5D5.mjs.map} +0 -0
- /package/dist/sdk/{command-executor-TYUV6HUS.mjs.map → command-executor-Q7MHJKZJ.mjs.map} +0 -0
- /package/dist/sdk/{config-YNC2EOOT.mjs.map → config-MK4XTU45.mjs.map} +0 -0
- /package/dist/sdk/{failure-condition-evaluator-YGTF2GHG.mjs.map → failure-condition-evaluator-HB35XRLZ.mjs.map} +0 -0
- /package/dist/sdk/{github-frontend-SIAEOCON.mjs.map → github-frontend-6Q4BISZX.mjs.map} +0 -0
- /package/dist/sdk/{host-DXUYTNMU.mjs.map → host-P5NQICP7.mjs.map} +0 -0
- /package/dist/sdk/{liquid-extensions-PKWCKK7E.mjs.map → liquid-extensions-DFDEBMUI.mjs.map} +0 -0
- /package/dist/sdk/{memory-store-XGBB7LX7.mjs.map → memory-store-RW5N2NGJ.mjs.map} +0 -0
- /package/dist/sdk/{prompt-state-YRJY6QAL.mjs.map → prompt-state-EZYOUG75.mjs.map} +0 -0
- /package/dist/sdk/{renderer-schema-LPKN5UJS.mjs.map → renderer-schema-CKFB5NDB.mjs.map} +0 -0
- /package/dist/sdk/{routing-6N45MJ4F.mjs.map → routing-KZ345OFG.mjs.map} +0 -0
- /package/dist/sdk/{workflow-registry-R6KSACFR.mjs.map → workflow-registry-6LZKCWHP.mjs.map} +0 -0
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
init_logger,
|
|
12
12
|
logger
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3NMLT3YS.mjs";
|
|
14
14
|
import {
|
|
15
15
|
__esm,
|
|
16
16
|
__export,
|
|
@@ -1116,7 +1116,7 @@ var init_config_schema = __esm({
|
|
|
1116
1116
|
description: "Arguments/inputs for the workflow"
|
|
1117
1117
|
},
|
|
1118
1118
|
overrides: {
|
|
1119
|
-
$ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-
|
|
1119
|
+
$ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-41044%3E%3E",
|
|
1120
1120
|
description: "Override specific step configurations in the workflow"
|
|
1121
1121
|
},
|
|
1122
1122
|
output_mapping: {
|
|
@@ -1132,7 +1132,7 @@ var init_config_schema = __esm({
|
|
|
1132
1132
|
description: "Config file path - alternative to workflow ID (loads a Visor config file as workflow)"
|
|
1133
1133
|
},
|
|
1134
1134
|
workflow_overrides: {
|
|
1135
|
-
$ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-
|
|
1135
|
+
$ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-41044%3E%3E",
|
|
1136
1136
|
description: "Alias for overrides - workflow step overrides (backward compatibility)"
|
|
1137
1137
|
},
|
|
1138
1138
|
ref: {
|
|
@@ -1762,7 +1762,7 @@ var init_config_schema = __esm({
|
|
|
1762
1762
|
description: "Custom output name (defaults to workflow name)"
|
|
1763
1763
|
},
|
|
1764
1764
|
overrides: {
|
|
1765
|
-
$ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-
|
|
1765
|
+
$ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-41044%3E%3E",
|
|
1766
1766
|
description: "Step overrides"
|
|
1767
1767
|
},
|
|
1768
1768
|
output_mapping: {
|
|
@@ -1777,13 +1777,13 @@ var init_config_schema = __esm({
|
|
|
1777
1777
|
"^x-": {}
|
|
1778
1778
|
}
|
|
1779
1779
|
},
|
|
1780
|
-
"Record<string,Partial<interface-src_types_config.ts-11359-23556-src_types_config.ts-0-
|
|
1780
|
+
"Record<string,Partial<interface-src_types_config.ts-11359-23556-src_types_config.ts-0-41044>>": {
|
|
1781
1781
|
type: "object",
|
|
1782
1782
|
additionalProperties: {
|
|
1783
|
-
$ref: "#/definitions/Partial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-
|
|
1783
|
+
$ref: "#/definitions/Partial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-41044%3E"
|
|
1784
1784
|
}
|
|
1785
1785
|
},
|
|
1786
|
-
"Partial<interface-src_types_config.ts-11359-23556-src_types_config.ts-0-
|
|
1786
|
+
"Partial<interface-src_types_config.ts-11359-23556-src_types_config.ts-0-41044>": {
|
|
1787
1787
|
type: "object",
|
|
1788
1788
|
additionalProperties: false
|
|
1789
1789
|
},
|
|
@@ -2354,6 +2354,14 @@ var init_config_schema = __esm({
|
|
|
2354
2354
|
type: "string",
|
|
2355
2355
|
description: "Base path for workspaces (default: /tmp/visor-workspaces)"
|
|
2356
2356
|
},
|
|
2357
|
+
name: {
|
|
2358
|
+
type: "string",
|
|
2359
|
+
description: "Workspace directory name (defaults to session id)"
|
|
2360
|
+
},
|
|
2361
|
+
main_project_name: {
|
|
2362
|
+
type: "string",
|
|
2363
|
+
description: "Main project folder name inside the workspace (defaults to original directory name)"
|
|
2364
|
+
},
|
|
2357
2365
|
cleanup_on_exit: {
|
|
2358
2366
|
type: "boolean",
|
|
2359
2367
|
description: "Clean up workspace on exit (default: true)"
|
|
@@ -2757,7 +2765,7 @@ var init_config = __esm({
|
|
|
2757
2765
|
* When a workflow YAML is run standalone, register the workflow and use its tests as checks
|
|
2758
2766
|
*/
|
|
2759
2767
|
async convertWorkflowToConfig(workflowData, _basePath) {
|
|
2760
|
-
const { WorkflowRegistry } = await import("./workflow-registry-
|
|
2768
|
+
const { WorkflowRegistry } = await import("./workflow-registry-6LZKCWHP.mjs");
|
|
2761
2769
|
const registry = WorkflowRegistry.getInstance();
|
|
2762
2770
|
const workflowId = workflowData.id;
|
|
2763
2771
|
logger.info(`Detected standalone workflow file: ${workflowId}`);
|
|
@@ -2799,7 +2807,7 @@ ${errors}`);
|
|
|
2799
2807
|
if (!config.imports || config.imports.length === 0) {
|
|
2800
2808
|
return;
|
|
2801
2809
|
}
|
|
2802
|
-
const { WorkflowRegistry } = await import("./workflow-registry-
|
|
2810
|
+
const { WorkflowRegistry } = await import("./workflow-registry-6LZKCWHP.mjs");
|
|
2803
2811
|
const registry = WorkflowRegistry.getInstance();
|
|
2804
2812
|
for (const source of config.imports) {
|
|
2805
2813
|
const results = await registry.import(source, { basePath, validate: true });
|
|
@@ -3553,4 +3561,4 @@ export {
|
|
|
3553
3561
|
config_exports,
|
|
3554
3562
|
init_config
|
|
3555
3563
|
};
|
|
3556
|
-
//# sourceMappingURL=chunk-
|
|
3564
|
+
//# sourceMappingURL=chunk-CUNPH6TR.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/config-loader.ts","../../src/generated/config-schema.ts","../../src/config.ts"],"sourcesContent":["import * as fs from 'fs';\nimport * as path from 'path';\nimport * as yaml from 'js-yaml';\nimport { VisorConfig } from '../types/config';\n\n/**\n * Configuration source types\n */\nexport enum ConfigSourceType {\n LOCAL = 'local',\n REMOTE = 'remote',\n DEFAULT = 'default',\n}\n\n/**\n * Cache entry for remote configurations\n */\ninterface CacheEntry {\n config: Partial<VisorConfig>;\n timestamp: number;\n ttl: number;\n}\n\n/**\n * Options for loading configurations\n */\nexport interface ConfigLoaderOptions {\n /** Base directory for resolving relative paths */\n baseDir?: string;\n /** Whether to allow remote extends (default: true) */\n allowRemote?: boolean;\n /** Cache TTL in milliseconds (default: 5 minutes) */\n cacheTTL?: number;\n /** Request timeout in milliseconds (default: 30 seconds) */\n timeout?: number;\n /** Maximum recursion depth (default: 10) */\n maxDepth?: number;\n /** Allowed remote URL patterns (default: ['https://github.com/', 'https://raw.githubusercontent.com/']) */\n allowedRemotePatterns?: string[];\n /** Project root directory for path traversal protection */\n projectRoot?: string;\n}\n\n/**\n * Utility class for loading configurations from various sources\n */\nexport class ConfigLoader {\n private cache: Map<string, CacheEntry> = new Map();\n private loadedConfigs: Set<string> = new Set();\n\n constructor(private options: ConfigLoaderOptions = {}) {\n this.options = {\n allowRemote: true,\n cacheTTL: 5 * 60 * 1000, // 5 minutes\n timeout: 30 * 1000, // 30 seconds\n maxDepth: 10,\n allowedRemotePatterns: [], // Empty by default for security\n projectRoot: this.findProjectRoot(),\n ...options,\n };\n }\n\n /**\n * Determine the source type from a string\n */\n private getSourceType(source: string): ConfigSourceType {\n if (source === 'default') {\n return ConfigSourceType.DEFAULT;\n }\n if (source.startsWith('http://') || source.startsWith('https://')) {\n return ConfigSourceType.REMOTE;\n }\n return ConfigSourceType.LOCAL;\n }\n\n /**\n * Fetch configuration from any source\n */\n public async fetchConfig(\n source: string,\n currentDepth: number = 0\n ): Promise<Partial<VisorConfig>> {\n // Check recursion depth\n if (currentDepth >= (this.options.maxDepth || 10)) {\n throw new Error(\n `Maximum extends depth (${this.options.maxDepth}) exceeded. Check for circular dependencies.`\n );\n }\n\n // Check for circular dependencies\n const normalizedSource = this.normalizeSource(source);\n if (this.loadedConfigs.has(normalizedSource)) {\n throw new Error(\n `Circular dependency detected: ${normalizedSource} is already in the extends chain`\n );\n }\n\n const sourceType = this.getSourceType(source);\n\n try {\n this.loadedConfigs.add(normalizedSource);\n\n switch (sourceType) {\n case ConfigSourceType.DEFAULT:\n return await this.fetchDefaultConfig();\n case ConfigSourceType.REMOTE:\n if (!this.options.allowRemote) {\n throw new Error(\n 'Remote extends are disabled. Enable with --allow-remote-extends or remove VISOR_NO_REMOTE_EXTENDS environment variable.'\n );\n }\n return await this.fetchRemoteConfig(source);\n case ConfigSourceType.LOCAL:\n return await this.fetchLocalConfig(source);\n default:\n throw new Error(`Unknown configuration source: ${source}`);\n }\n } finally {\n this.loadedConfigs.delete(normalizedSource);\n }\n }\n\n /**\n * Normalize source path/URL for comparison\n */\n private normalizeSource(source: string): string {\n const sourceType = this.getSourceType(source);\n\n switch (sourceType) {\n case ConfigSourceType.DEFAULT:\n return 'default';\n case ConfigSourceType.REMOTE:\n return source.toLowerCase();\n case ConfigSourceType.LOCAL:\n const basePath = this.options.baseDir || process.cwd();\n return path.resolve(basePath, source);\n default:\n return source;\n }\n }\n\n /**\n * Load configuration from local file system\n */\n private async fetchLocalConfig(filePath: string): Promise<Partial<VisorConfig>> {\n const basePath = this.options.baseDir || process.cwd();\n const resolvedPath = path.resolve(basePath, filePath);\n\n // Validate against path traversal attacks\n this.validateLocalPath(resolvedPath);\n\n try {\n const content = fs.readFileSync(resolvedPath, 'utf8');\n const config = yaml.load(content) as Partial<VisorConfig>;\n\n if (!config || typeof config !== 'object') {\n throw new Error(`Invalid YAML in configuration file: ${resolvedPath}`);\n }\n\n // Normalize 'include' (alias) to 'extends' for nested chains\n if ((config as any).include && !(config as any).extends) {\n const inc = (config as any).include;\n (config as any).extends = Array.isArray(inc) ? inc : [inc];\n delete (config as any).include;\n }\n\n // Update base directory for nested extends\n const previousBaseDir = this.options.baseDir;\n this.options.baseDir = path.dirname(resolvedPath);\n\n try {\n // Process extends if present\n if (config.extends) {\n const processedConfig = await this.processExtends(config);\n return processedConfig;\n }\n\n return config;\n } finally {\n // Restore previous base directory\n this.options.baseDir = previousBaseDir;\n }\n } catch (error: any) {\n if (error && (error.code === 'ENOENT' || error.code === 'ENOTDIR')) {\n throw new Error(`Configuration file not found: ${resolvedPath}`);\n }\n if (error instanceof Error) {\n throw new Error(`Failed to load configuration from ${resolvedPath}: ${error.message}`);\n }\n throw error;\n }\n }\n\n /**\n * Fetch configuration from remote URL\n */\n private async fetchRemoteConfig(url: string): Promise<Partial<VisorConfig>> {\n // Validate URL protocol\n if (!url.startsWith('http://') && !url.startsWith('https://')) {\n throw new Error(`Invalid URL: ${url}. Only HTTP and HTTPS protocols are supported.`);\n }\n\n // Validate against SSRF attacks\n this.validateRemoteURL(url);\n\n // Check cache\n const cacheEntry = this.cache.get(url);\n if (cacheEntry && Date.now() - cacheEntry.timestamp < cacheEntry.ttl) {\n // Use stderr to avoid contaminating JSON/SARIF output\n const outputFormat = process.env.VISOR_OUTPUT_FORMAT;\n const logFn =\n outputFormat === 'json' || outputFormat === 'sarif' ? console.error : console.log;\n logFn(`📦 Using cached configuration from: ${url}`);\n return cacheEntry.config;\n }\n\n // Use stderr to avoid contaminating JSON/SARIF output\n const outputFormat = process.env.VISOR_OUTPUT_FORMAT;\n const logFn = outputFormat === 'json' || outputFormat === 'sarif' ? console.error : console.log;\n logFn(`⬇️ Fetching remote configuration from: ${url}`);\n\n const controller = new AbortController();\n const timeoutMs = this.options.timeout ?? 30000;\n const timeoutId = setTimeout(() => controller.abort(), timeoutMs);\n\n try {\n const response = await fetch(url, {\n signal: controller.signal,\n headers: {\n 'User-Agent': 'Visor/1.0',\n },\n });\n\n if (!response.ok) {\n throw new Error(`Failed to fetch config: ${response.status} ${response.statusText}`);\n }\n\n const content = await response.text();\n const config = yaml.load(content) as Partial<VisorConfig>;\n\n if (!config || typeof config !== 'object') {\n throw new Error(`Invalid YAML in remote configuration: ${url}`);\n }\n\n // Cache the configuration\n this.cache.set(url, {\n config,\n timestamp: Date.now(),\n ttl: this.options.cacheTTL || 5 * 60 * 1000,\n });\n\n // Process extends if present\n if (config.extends) {\n return await this.processExtends(config);\n }\n\n return config;\n } catch (error) {\n if (error instanceof Error) {\n if (error.name === 'AbortError') {\n throw new Error(`Timeout fetching configuration from ${url} (${timeoutMs}ms)`);\n }\n throw new Error(`Failed to fetch remote configuration from ${url}: ${error.message}`);\n }\n throw error;\n } finally {\n clearTimeout(timeoutId);\n }\n }\n\n /**\n * Load bundled default configuration\n */\n private async fetchDefaultConfig(): Promise<Partial<VisorConfig>> {\n // Try different paths to find the bundled default config\n const possiblePaths = [\n // Only support new non-dot filename\n path.join(__dirname, 'defaults', 'visor.yaml'),\n // When running from source\n path.join(__dirname, '..', '..', 'defaults', 'visor.yaml'),\n // Try via package root\n this.findPackageRoot() ? path.join(this.findPackageRoot()!, 'defaults', 'visor.yaml') : '',\n // GitHub Action environment variable\n process.env.GITHUB_ACTION_PATH\n ? path.join(process.env.GITHUB_ACTION_PATH, 'defaults', 'visor.yaml')\n : '',\n process.env.GITHUB_ACTION_PATH\n ? path.join(process.env.GITHUB_ACTION_PATH, 'dist', 'defaults', 'visor.yaml')\n : '',\n ].filter(p => p); // Remove empty paths\n\n let defaultConfigPath: string | undefined;\n for (const possiblePath of possiblePaths) {\n if (fs.existsSync(possiblePath)) {\n defaultConfigPath = possiblePath;\n break;\n }\n }\n\n if (defaultConfigPath) {\n // Always log to stderr to avoid contaminating formatted output\n console.error(`📦 Loading bundled default configuration from ${defaultConfigPath}`);\n const content = fs.readFileSync(defaultConfigPath, 'utf8');\n let config = yaml.load(content) as Partial<VisorConfig>;\n\n if (!config || typeof config !== 'object') {\n throw new Error('Invalid default configuration');\n }\n\n // Alias: support 'include' as 'extends' in packaged defaults\n if ((config as any).include && !(config as any).extends) {\n const inc = (config as any).include;\n (config as any).extends = Array.isArray(inc) ? inc : [inc];\n delete (config as any).include;\n }\n\n // Normalize 'checks' and 'steps' for backward compatibility\n config = this.normalizeStepsAndChecks(config);\n\n // Default configs shouldn't have extends, but handle it just in case\n if (config.extends) {\n // Ensure relative paths (e.g., ./code-review.yaml) resolve from the defaults directory\n const previousBaseDir = this.options.baseDir;\n try {\n this.options.baseDir = path.dirname(defaultConfigPath);\n return await this.processExtends(config);\n } finally {\n this.options.baseDir = previousBaseDir;\n }\n }\n\n return config;\n }\n\n // Return minimal default if bundled config not found\n console.warn('⚠️ Bundled default configuration not found, using minimal defaults');\n return {\n version: '1.0',\n checks: {},\n output: {\n pr_comment: {\n format: 'markdown',\n group_by: 'check',\n collapse: true,\n },\n },\n };\n }\n\n /**\n * Process extends directive in a configuration\n */\n private async processExtends(config: Partial<VisorConfig>): Promise<Partial<VisorConfig>> {\n if (!config.extends) {\n return config;\n }\n\n const extends_ = Array.isArray(config.extends) ? config.extends : [config.extends];\n\n // Remove extends from the config to avoid infinite recursion\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { extends: _extendsField, ...configWithoutExtends } = config;\n\n // Load all parent configurations\n const parentConfigs: Partial<VisorConfig>[] = [];\n for (const source of extends_) {\n const parentConfig = await this.fetchConfig(source, this.loadedConfigs.size);\n parentConfigs.push(parentConfig);\n }\n\n // Merge configurations (will be implemented in config-merger.ts)\n // For now, we'll import it dynamically\n const { ConfigMerger } = await import('./config-merger');\n const merger = new ConfigMerger();\n\n // Merge all parent configs together first\n let mergedParents: Partial<VisorConfig> = {};\n for (const parentConfig of parentConfigs) {\n mergedParents = merger.merge(mergedParents, parentConfig);\n }\n\n // Then merge with the current config (child overrides parent)\n return merger.merge(mergedParents, configWithoutExtends);\n }\n\n /**\n * Find project root directory (for security validation)\n */\n private findProjectRoot(): string {\n // Try to find git root first\n try {\n const { execSync } = require('child_process');\n const gitRoot = execSync('git rev-parse --show-toplevel', { encoding: 'utf8' }).trim();\n if (gitRoot) return gitRoot;\n } catch {\n // Not a git repo, continue\n }\n\n // Fall back to finding package.json\n const packageRoot = this.findPackageRoot();\n if (packageRoot) return packageRoot;\n\n // Last resort: use current working directory\n return process.cwd();\n }\n\n /**\n * Validate remote URL against allowlist\n */\n private validateRemoteURL(url: string): void {\n // If allowlist is empty, allow all URLs (backward compatibility)\n const allowedPatterns = this.options.allowedRemotePatterns || [];\n if (allowedPatterns.length === 0) {\n return;\n }\n\n // Check if URL matches any allowed pattern\n const isAllowed = allowedPatterns.some(pattern => url.startsWith(pattern));\n if (!isAllowed) {\n throw new Error(\n `Security error: URL ${url} is not in the allowed list. Allowed patterns: ${allowedPatterns.join(', ')}`\n );\n }\n }\n\n /**\n * Validate local path against traversal attacks\n */\n private validateLocalPath(resolvedPath: string): void {\n const projectRoot = this.options.projectRoot || process.cwd();\n const normalizedPath = path.normalize(resolvedPath);\n const normalizedRoot = path.normalize(projectRoot);\n\n // Check if the resolved path is within the project root\n if (!normalizedPath.startsWith(normalizedRoot)) {\n throw new Error(\n `Security error: Path traversal detected. Cannot access files outside project root: ${projectRoot}`\n );\n }\n\n // Additional check for sensitive system files\n const sensitivePatterns = [\n '/etc/passwd',\n '/etc/shadow',\n '/.ssh/',\n '/.aws/',\n '/.env',\n '/private/',\n ];\n\n const lowerPath = normalizedPath.toLowerCase();\n for (const pattern of sensitivePatterns) {\n if (lowerPath.includes(pattern)) {\n throw new Error(`Security error: Cannot access potentially sensitive file: ${pattern}`);\n }\n }\n }\n\n /**\n * Find package root directory\n */\n private findPackageRoot(): string | null {\n let currentDir = __dirname;\n const root = path.parse(currentDir).root;\n\n while (currentDir !== root) {\n const packageJsonPath = path.join(currentDir, 'package.json');\n if (fs.existsSync(packageJsonPath)) {\n try {\n const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));\n // Check if this is the Visor package\n if (packageJson.name === '@probelabs/visor') {\n return currentDir;\n }\n } catch {\n // Continue searching\n }\n }\n currentDir = path.dirname(currentDir);\n }\n\n return null;\n }\n\n /**\n * Clear the configuration cache\n */\n public clearCache(): void {\n this.cache.clear();\n }\n\n /**\n * Reset the loaded configs tracking (for testing)\n */\n public reset(): void {\n this.loadedConfigs.clear();\n this.clearCache();\n }\n\n /**\n * Normalize 'checks' and 'steps' keys for backward compatibility\n * Ensures both keys are present and contain the same data\n */\n private normalizeStepsAndChecks(config: Partial<VisorConfig>): Partial<VisorConfig> {\n // If both are present, merge with 'steps' taking precedence on key conflicts\n if (config.steps && config.checks) {\n const merged = { ...(config.checks as Record<string, unknown>), ...(config.steps as any) };\n config.checks = merged as any;\n config.steps = merged as any;\n } else if (config.steps && !config.checks) {\n // Copy steps to checks for internal compatibility\n config.checks = config.steps;\n } else if (config.checks && !config.steps) {\n // Copy checks to steps for forward compatibility\n config.steps = config.checks;\n }\n\n return config;\n }\n}\n","// AUTO-GENERATED FILE. DO NOT EDIT.\n// Generated by scripts/generate-config-schema.js from src/types/config.ts\nexport const configSchema = {\n $schema: 'http://json-schema.org/draft-07/schema#',\n $ref: '#/definitions/VisorConfigSchema',\n definitions: {\n VisorConfigSchema: {\n type: 'object',\n additionalProperties: false,\n properties: {\n hooks: {\n $ref: '#/definitions/Record%3Cstring%2Cunknown%3E',\n },\n version: {\n type: 'string',\n description: 'Configuration version',\n },\n extends: {\n anyOf: [\n {\n type: 'string',\n },\n {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n ],\n description:\n 'Extends from other configurations - can be file path, HTTP(S) URL, or \"default\"',\n },\n include: {\n anyOf: [\n {\n type: 'string',\n },\n {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n ],\n description:\n 'Alias for extends - include from other configurations (backward compatibility)',\n },\n tools: {\n $ref: '#/definitions/Record%3Cstring%2CCustomToolDefinition%3E',\n description: 'Custom tool definitions that can be used in MCP blocks',\n },\n imports: {\n type: 'array',\n items: {\n type: 'string',\n },\n description: 'Import workflow definitions from external files or URLs',\n },\n inputs: {\n type: 'array',\n items: {\n $ref: '#/definitions/WorkflowInput',\n },\n description: 'Workflow inputs (for standalone reusable workflows)',\n },\n outputs: {\n type: 'array',\n items: {\n $ref: '#/definitions/WorkflowOutput',\n },\n description: 'Workflow outputs (for standalone reusable workflows)',\n },\n steps: {\n $ref: '#/definitions/Record%3Cstring%2CCheckConfig%3E',\n description: 'Step configurations (recommended)',\n },\n checks: {\n $ref: '#/definitions/Record%3Cstring%2CCheckConfig%3E',\n description:\n \"Check configurations (legacy, use 'steps' instead) - always populated after normalization\",\n },\n output: {\n $ref: '#/definitions/OutputConfig',\n description: 'Output configuration (optional - defaults provided)',\n },\n http_server: {\n $ref: '#/definitions/HttpServerConfig',\n description: 'HTTP server configuration for receiving webhooks',\n },\n memory: {\n $ref: '#/definitions/MemoryConfig',\n description: 'Memory storage configuration',\n },\n env: {\n $ref: '#/definitions/EnvConfig',\n description: 'Global environment variables',\n },\n ai_model: {\n type: 'string',\n description: 'Global AI model setting',\n },\n ai_provider: {\n type: 'string',\n description: 'Global AI provider setting',\n },\n ai_mcp_servers: {\n $ref: '#/definitions/Record%3Cstring%2CMcpServerConfig%3E',\n description: 'Global MCP servers configuration for AI checks',\n },\n max_parallelism: {\n type: 'number',\n description: 'Maximum number of checks to run in parallel (default: 3)',\n },\n fail_fast: {\n type: 'boolean',\n description: 'Stop execution when any check fails (default: false)',\n },\n fail_if: {\n type: 'string',\n description: 'Simple global fail condition - fails if expression evaluates to true',\n },\n failure_conditions: {\n $ref: '#/definitions/FailureConditions',\n description: 'Global failure conditions - optional (deprecated, use fail_if)',\n },\n tag_filter: {\n $ref: '#/definitions/TagFilter',\n description: 'Tag filter for selective check execution',\n },\n routing: {\n $ref: '#/definitions/RoutingDefaults',\n description: 'Optional routing defaults for retry/goto/run policies',\n },\n limits: {\n $ref: '#/definitions/LimitsConfig',\n description: 'Global execution limits',\n },\n frontends: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n description: \"Frontend name, e.g., 'ndjson-sink', 'github'\",\n },\n config: {\n description: 'Frontend-specific configuration',\n },\n },\n required: ['name'],\n additionalProperties: false,\n },\n description: 'Optional integrations: event-driven frontends (e.g., ndjson-sink, github)',\n },\n workspace: {\n $ref: '#/definitions/WorkspaceConfig',\n description: 'Workspace isolation configuration for sandboxed execution',\n },\n slack: {\n $ref: '#/definitions/SlackConfig',\n description: 'Slack configuration',\n },\n },\n required: ['version'],\n patternProperties: {\n '^x-': {},\n },\n },\n 'Record<string,unknown>': {\n type: 'object',\n additionalProperties: {},\n },\n 'Record<string,CustomToolDefinition>': {\n type: 'object',\n additionalProperties: {\n $ref: '#/definitions/CustomToolDefinition',\n },\n },\n CustomToolDefinition: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n description: 'Tool name - used to reference the tool in MCP blocks',\n },\n description: {\n type: 'string',\n description: 'Description of what the tool does',\n },\n inputSchema: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n const: 'object',\n },\n properties: {\n $ref: '#/definitions/Record%3Cstring%2Cunknown%3E',\n },\n required: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n additionalProperties: {\n type: 'boolean',\n },\n },\n required: ['type'],\n additionalProperties: false,\n description: 'Input schema for the tool (JSON Schema format)',\n patternProperties: {\n '^x-': {},\n },\n },\n exec: {\n type: 'string',\n description: 'Command to execute - supports Liquid template',\n },\n stdin: {\n type: 'string',\n description: 'Optional stdin input - supports Liquid template',\n },\n transform: {\n type: 'string',\n description: 'Transform the raw output - supports Liquid template',\n },\n transform_js: {\n type: 'string',\n description: 'Transform the output using JavaScript - alternative to transform',\n },\n cwd: {\n type: 'string',\n description: 'Working directory for command execution',\n },\n env: {\n $ref: '#/definitions/Record%3Cstring%2Cstring%3E',\n description: 'Environment variables for the command',\n },\n timeout: {\n type: 'number',\n description: 'Timeout in milliseconds',\n },\n parseJson: {\n type: 'boolean',\n description: 'Whether to parse output as JSON automatically',\n },\n outputSchema: {\n $ref: '#/definitions/Record%3Cstring%2Cunknown%3E',\n description: 'Expected output schema for validation',\n },\n },\n required: ['name', 'exec'],\n additionalProperties: false,\n description: 'Custom tool definition for use in MCP blocks',\n patternProperties: {\n '^x-': {},\n },\n },\n 'Record<string,string>': {\n type: 'object',\n additionalProperties: {\n type: 'string',\n },\n },\n WorkflowInput: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n description: 'Input parameter name',\n },\n schema: {\n $ref: '#/definitions/Record%3Cstring%2Cunknown%3E',\n description: 'JSON Schema for the input',\n },\n required: {\n type: 'boolean',\n description: 'Whether this input is required',\n },\n default: {\n description: 'Default value if not provided',\n },\n description: {\n type: 'string',\n description: 'Human-readable description',\n },\n },\n required: ['name'],\n additionalProperties: false,\n description: 'Workflow input definition for standalone reusable workflows',\n patternProperties: {\n '^x-': {},\n },\n },\n WorkflowOutput: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n description: 'Output name',\n },\n description: {\n type: 'string',\n description: 'Human-readable description',\n },\n value: {\n type: 'string',\n description: 'Value using Liquid template syntax (references step outputs)',\n },\n value_js: {\n type: 'string',\n description: 'Value using JavaScript expression (alternative to value)',\n },\n },\n required: ['name'],\n additionalProperties: false,\n description: 'Workflow output definition for standalone reusable workflows',\n patternProperties: {\n '^x-': {},\n },\n },\n 'Record<string,CheckConfig>': {\n type: 'object',\n additionalProperties: {\n $ref: '#/definitions/CheckConfig',\n },\n },\n CheckConfig: {\n type: 'object',\n properties: {\n type: {\n $ref: '#/definitions/ConfigCheckType',\n description: \"Type of check to perform (defaults to 'ai' if not specified)\",\n },\n prompt: {\n type: 'string',\n description:\n 'AI prompt for the check - can be inline string or file path (auto-detected) - required for AI checks',\n },\n appendPrompt: {\n type: 'string',\n description:\n 'Additional prompt to append when extending configurations - merged with parent prompt',\n },\n exec: {\n type: 'string',\n description:\n 'Command execution with Liquid template support - required for command checks',\n },\n stdin: {\n type: 'string',\n description:\n 'Stdin input for tools with Liquid template support - optional for tool checks',\n },\n url: {\n type: 'string',\n description: 'HTTP URL - required for http output checks',\n },\n body: {\n type: 'string',\n description: 'HTTP body template (Liquid) - required for http output checks',\n },\n method: {\n type: 'string',\n description: 'HTTP method (defaults to POST)',\n },\n headers: {\n $ref: '#/definitions/Record%3Cstring%2Cstring%3E',\n description: 'HTTP headers',\n },\n endpoint: {\n type: 'string',\n description: 'HTTP endpoint path - required for http_input checks',\n },\n transform: {\n type: 'string',\n description: 'Transform template for http_input data (Liquid) - optional',\n },\n transform_js: {\n type: 'string',\n description:\n 'Transform using JavaScript expressions (evaluated in secure sandbox) - optional',\n },\n content: {\n type: 'string',\n description: 'Script content to execute for script checks',\n },\n schedule: {\n type: 'string',\n description: 'Cron schedule expression (e.g., \"0 2 * * *\") - optional for any check type',\n },\n focus: {\n type: 'string',\n description:\n 'Focus area for the check (security/performance/style/architecture/all) - optional',\n },\n command: {\n type: 'string',\n description:\n 'Command that triggers this check (e.g., \"review\", \"security-scan\") - optional',\n },\n on: {\n type: 'array',\n items: {\n $ref: '#/definitions/EventTrigger',\n },\n description: \"Events that trigger this check (defaults to ['manual'] if not specified)\",\n },\n triggers: {\n type: 'array',\n items: {\n type: 'string',\n },\n description: 'File patterns that trigger this check (optional)',\n },\n ai: {\n $ref: '#/definitions/AIProviderConfig',\n description: 'AI provider configuration (optional)',\n },\n ai_model: {\n type: 'string',\n description: 'AI model to use for this check - overrides global setting',\n },\n ai_provider: {\n type: 'string',\n description: 'AI provider to use for this check - overrides global setting',\n },\n ai_persona: {\n type: 'string',\n description: \"Optional persona hint, prepended to the prompt as 'Persona: <value>'\",\n },\n ai_prompt_type: {\n type: 'string',\n description: 'Probe promptType for this check (underscore style)',\n },\n ai_system_prompt: {\n type: 'string',\n description: 'System prompt for this check (underscore style)',\n },\n ai_custom_prompt: {\n type: 'string',\n description: 'Legacy customPrompt (underscore style) — deprecated, use ai_system_prompt',\n },\n ai_mcp_servers: {\n $ref: '#/definitions/Record%3Cstring%2CMcpServerConfig%3E',\n description: 'MCP servers for this AI check - overrides global setting',\n },\n ai_custom_tools: {\n type: 'array',\n items: {\n type: 'string',\n },\n description:\n 'List of custom tool names to expose to this AI check via ephemeral SSE MCP server',\n },\n claude_code: {\n $ref: '#/definitions/ClaudeCodeConfig',\n description: 'Claude Code configuration (for claude-code type checks)',\n },\n env: {\n $ref: '#/definitions/EnvConfig',\n description: 'Environment variables for this check',\n },\n timeout: {\n type: 'number',\n description: 'Timeout in seconds for command execution (default: 60)',\n },\n depends_on: {\n anyOf: [\n {\n type: 'string',\n },\n {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n ],\n description:\n 'Check IDs that this check depends on (optional). Accepts single string or array.',\n },\n group: {\n type: 'string',\n description:\n 'Group name for comment separation (e.g., \"code-review\", \"pr-overview\") - optional',\n },\n schema: {\n anyOf: [\n {\n type: 'string',\n },\n {\n $ref: '#/definitions/Record%3Cstring%2Cunknown%3E',\n },\n ],\n description:\n 'Schema type for template rendering (e.g., \"code-review\", \"markdown\") or inline JSON schema object - optional',\n },\n output_schema: {\n $ref: '#/definitions/Record%3Cstring%2Cunknown%3E',\n description:\n \"Optional JSON Schema to validate the produced output. If omitted and `schema` is an object, the engine will treat that object as the output_schema for validation purposes while still using string schemas (e.g., 'code-review') for template selection.\",\n },\n template: {\n $ref: '#/definitions/CustomTemplateConfig',\n description: 'Custom template configuration - optional',\n },\n if: {\n type: 'string',\n description:\n 'Condition to determine if check should run - runs if expression evaluates to true',\n },\n reuse_ai_session: {\n type: ['string', 'boolean'],\n description:\n 'Check name to reuse AI session from, or true to use first dependency (only works with depends_on)',\n },\n session_mode: {\n type: 'string',\n enum: ['clone', 'append'],\n description:\n \"How to reuse AI session: 'clone' (default, copy history) or 'append' (share history)\",\n },\n fail_if: {\n type: 'string',\n description: 'Simple fail condition - fails check if expression evaluates to true',\n },\n failure_conditions: {\n $ref: '#/definitions/FailureConditions',\n description: 'Check-specific failure conditions - optional (deprecated, use fail_if)',\n },\n tags: {\n type: 'array',\n items: {\n type: 'string',\n },\n description:\n 'Tags for categorizing and filtering checks (e.g., [\"local\", \"fast\", \"security\"])',\n },\n criticality: {\n type: 'string',\n enum: ['external', 'internal', 'policy', 'info'],\n description:\n \"Operational criticality of this step. Drives default safety policies (contracts, retries, loop budgets) at load time. Behavior can still be overridden explicitly per step via on_*, fail_if, assume/guarantee, etc.\\n\\n- 'external': interacts with external systems (side effects). Highest safety.\\n- 'internal': modifies CI/config/state but not prod. High safety.\\n- 'policy': organizational checks (linting, style, doc). Moderate safety.\\n- 'info': informational checks. Lowest safety.\",\n },\n continue_on_failure: {\n type: 'boolean',\n description:\n \"Allow dependents to run even if this step fails. Defaults to false (dependents are gated when this step fails). Similar to GitHub Actions' continue-on-error.\",\n },\n forEach: {\n type: 'boolean',\n description: 'Process output as array and run dependent checks for each item',\n },\n fanout: {\n type: 'string',\n enum: ['map', 'reduce'],\n description:\n \"Control scheduling behavior when this check is triggered via routing (run/goto) from a forEach scope.\\n- 'map': schedule once per item (fan-out) using item scopes.\\n- 'reduce': schedule a single run at the parent scope (aggregation). If unset, the current default is a single run (reduce) for backward compatibility.\",\n },\n reduce: {\n type: 'boolean',\n description: \"Alias for fanout: 'reduce'\",\n },\n on_init: {\n $ref: '#/definitions/OnInitConfig',\n description:\n 'Init routing configuration for this check (runs before execution/preprocessing)',\n },\n on_fail: {\n $ref: '#/definitions/OnFailConfig',\n description: 'Failure routing configuration for this check (retry/goto/run)',\n },\n on_success: {\n $ref: '#/definitions/OnSuccessConfig',\n description:\n 'Success routing configuration for this check (post-actions and optional goto)',\n },\n on_finish: {\n $ref: '#/definitions/OnFinishConfig',\n description:\n 'Finish routing configuration for forEach checks (runs after ALL iterations complete)',\n },\n assume: {\n anyOf: [\n {\n type: 'string',\n },\n {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n ],\n description:\n \"Preconditions that must hold before executing the check. If any expression evaluates to false, the check is skipped (skipReason='assume').\",\n },\n guarantee: {\n anyOf: [\n {\n type: 'string',\n },\n {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n ],\n description:\n 'Postconditions that should hold after executing the check. Expressions are evaluated against the produced result/output; violations are recorded as error issues with ruleId \"contract/guarantee_failed\".',\n },\n max_runs: {\n type: 'number',\n description:\n 'Hard cap on how many times this check may execute within a single engine run. Overrides global limits.max_runs_per_check. Set to 0 or negative to disable for this step.',\n },\n message: {\n type: 'string',\n description: 'Message template for log checks',\n },\n level: {\n type: 'string',\n enum: ['debug', 'info', 'warn', 'error'],\n description: 'Log level for log checks',\n },\n include_pr_context: {\n type: 'boolean',\n description: 'Include PR context in log output',\n },\n include_dependencies: {\n type: 'boolean',\n description: 'Include dependency summaries in log output',\n },\n include_metadata: {\n type: 'boolean',\n description: 'Include execution metadata in log output',\n },\n output_format: {\n type: 'string',\n enum: ['json', 'text'],\n description:\n \"Output parsing hint for command provider (optional) When set to 'json', command stdout is expected to be JSON. When 'text', treat as plain text. Note: command provider attempts JSON parsing heuristically; this flag mainly suppresses schema warnings and may be used by providers to alter parsing behavior in the future.\",\n },\n operation: {\n type: 'string',\n enum: ['get', 'set', 'append', 'increment', 'delete', 'clear', 'list'],\n description: \"Memory operation to perform. Use `type: 'script'` for custom JavaScript.\",\n },\n key: {\n type: 'string',\n description: 'Key for memory operation',\n },\n value: {\n description: 'Value for set/append operations',\n },\n value_js: {\n type: 'string',\n description: 'JavaScript expression to compute value dynamically',\n },\n namespace: {\n type: 'string',\n description: 'Override namespace for this check',\n },\n op: {\n type: 'string',\n description:\n \"GitHub operation to perform (e.g., 'labels.add', 'labels.remove', 'comment.create')\",\n },\n values: {\n anyOf: [\n {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n {\n type: 'string',\n },\n ],\n description: 'Values for GitHub operations (can be array or single value)',\n },\n transport: {\n type: 'string',\n enum: ['stdio', 'sse', 'http'],\n description:\n 'Transport type for MCP: stdio (default), sse (legacy), or http (streamable HTTP)',\n },\n methodArgs: {\n $ref: '#/definitions/Record%3Cstring%2Cunknown%3E',\n description: 'Arguments to pass to the MCP method (supports Liquid templates)',\n },\n argsTransform: {\n type: 'string',\n description: 'Transform template for method arguments (Liquid)',\n },\n sessionId: {\n type: 'string',\n description: 'Session ID for HTTP transport (optional, server may generate one)',\n },\n command_args: {\n type: 'array',\n items: {\n type: 'string',\n },\n description: 'Command arguments (for stdio transport in MCP checks)',\n },\n workingDirectory: {\n type: 'string',\n description: 'Working directory (for stdio transport in MCP checks)',\n },\n placeholder: {\n type: 'string',\n description: 'Placeholder text to show in input field',\n },\n allow_empty: {\n type: 'boolean',\n description: 'Allow empty input (default: false)',\n },\n multiline: {\n type: 'boolean',\n description: 'Support multiline input (default: false)',\n },\n default: {\n type: 'string',\n description: 'Default value if timeout occurs or empty input when allow_empty is true',\n },\n workflow: {\n type: 'string',\n description: 'Workflow ID or path to workflow file',\n },\n args: {\n $ref: '#/definitions/Record%3Cstring%2Cunknown%3E',\n description: 'Arguments/inputs for the workflow',\n },\n overrides: {\n $ref: '#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-41044%3E%3E',\n description: 'Override specific step configurations in the workflow',\n },\n output_mapping: {\n $ref: '#/definitions/Record%3Cstring%2Cstring%3E',\n description: 'Map workflow outputs to check outputs',\n },\n workflow_inputs: {\n $ref: '#/definitions/Record%3Cstring%2Cunknown%3E',\n description: 'Alias for args - workflow inputs (backward compatibility)',\n },\n config: {\n type: 'string',\n description:\n 'Config file path - alternative to workflow ID (loads a Visor config file as workflow)',\n },\n workflow_overrides: {\n $ref: '#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-41044%3E%3E',\n description: 'Alias for overrides - workflow step overrides (backward compatibility)',\n },\n ref: {\n type: 'string',\n description: 'Git reference to checkout (branch, tag, commit SHA) - supports templates',\n },\n repository: {\n type: 'string',\n description: 'Repository URL or owner/repo format (defaults to current repository)',\n },\n token: {\n type: 'string',\n description: 'GitHub token for private repositories (defaults to GITHUB_TOKEN env)',\n },\n fetch_depth: {\n type: 'number',\n description: 'Number of commits to fetch (0 for full history, default: 1)',\n },\n fetch_tags: {\n type: 'boolean',\n description: 'Whether to fetch tags (default: false)',\n },\n submodules: {\n anyOf: [\n {\n type: 'boolean',\n },\n {\n type: 'string',\n const: 'recursive',\n },\n ],\n description: \"Checkout submodules: false, true, or 'recursive'\",\n },\n working_directory: {\n type: 'string',\n description: 'Working directory for the checkout (defaults to temp directory)',\n },\n use_worktree: {\n type: 'boolean',\n description: 'Use git worktree for efficient parallel checkouts (default: true)',\n },\n clean: {\n type: 'boolean',\n description: 'Clean the working directory before checkout (default: true)',\n },\n sparse_checkout: {\n type: 'array',\n items: {\n type: 'string',\n },\n description: 'Sparse checkout paths - only checkout specific directories/files',\n },\n lfs: {\n type: 'boolean',\n description: 'Enable Git LFS (Large File Storage)',\n },\n clone_timeout_ms: {\n type: 'number',\n description: 'Timeout in ms for cloning the bare repository (default: 300000 = 5 min)',\n },\n cleanup_on_failure: {\n type: 'boolean',\n description: 'Clean up worktree on failure (default: true)',\n },\n persist_worktree: {\n type: 'boolean',\n description: 'Keep worktree after workflow completion (default: false)',\n },\n },\n additionalProperties: false,\n description: 'Configuration for a single check',\n patternProperties: {\n '^x-': {},\n },\n },\n ConfigCheckType: {\n type: 'string',\n enum: [\n 'ai',\n 'command',\n 'script',\n 'http',\n 'http_input',\n 'http_client',\n 'noop',\n 'log',\n 'memory',\n 'github',\n 'claude-code',\n 'mcp',\n 'human-input',\n 'workflow',\n 'git-checkout',\n ],\n description: 'Valid check types in configuration',\n },\n EventTrigger: {\n type: 'string',\n enum: [\n 'pr_opened',\n 'pr_updated',\n 'pr_closed',\n 'issue_opened',\n 'issue_comment',\n 'manual',\n 'schedule',\n 'webhook_received',\n ],\n description: 'Valid event triggers for checks',\n },\n AIProviderConfig: {\n type: 'object',\n properties: {\n provider: {\n type: 'string',\n enum: ['google', 'anthropic', 'openai', 'bedrock', 'mock'],\n description: 'AI provider to use',\n },\n model: {\n type: 'string',\n description: 'Model name to use',\n },\n apiKey: {\n type: 'string',\n description: 'API key (usually from environment variables)',\n },\n timeout: {\n type: 'number',\n description: 'Request timeout in milliseconds',\n },\n debug: {\n type: 'boolean',\n description: 'Enable debug mode',\n },\n prompt_type: {\n type: 'string',\n description: 'Probe promptType to use (e.g., engineer, code-review, architect)',\n },\n system_prompt: {\n type: 'string',\n description: 'System prompt (baseline preamble). Replaces legacy custom_prompt.',\n },\n custom_prompt: {\n type: 'string',\n description:\n 'Probe customPrompt (baseline/system prompt) — deprecated, use system_prompt',\n },\n skip_code_context: {\n type: 'boolean',\n description: 'Skip adding code context (diffs, files, PR info) to the prompt',\n },\n skip_slack_context: {\n type: 'boolean',\n description:\n 'Skip adding Slack conversation context to the prompt (when running under Slack)',\n },\n skip_transport_context: {\n type: 'boolean',\n description:\n 'Skip adding transport-specific context (e.g., GitHub PR/issue XML, Slack conversation XML) to the prompt. When true, this behaves like setting both skip_code_context and skip_slack_context to true, unless those are explicitly overridden.',\n },\n mcpServers: {\n $ref: '#/definitions/Record%3Cstring%2CMcpServerConfig%3E',\n description: 'MCP servers configuration',\n },\n enableDelegate: {\n type: 'boolean',\n description: 'Enable the delegate tool for task distribution to subagents',\n },\n retry: {\n $ref: '#/definitions/AIRetryConfig',\n description: 'Retry configuration for this provider',\n },\n fallback: {\n $ref: '#/definitions/AIFallbackConfig',\n description: 'Fallback configuration for provider failures',\n },\n allowEdit: {\n type: 'boolean',\n description:\n 'Enable Edit and Create tools for file modification (disabled by default for security)',\n },\n allowedTools: {\n type: 'array',\n items: {\n type: 'string',\n },\n description:\n 'Filter allowed tools - supports whitelist, exclusion (!prefix), or raw AI mode (empty array)',\n },\n disableTools: {\n type: 'boolean',\n description: 'Disable all tools for raw AI mode (alternative to allowedTools: [])',\n },\n allowBash: {\n type: 'boolean',\n description: 'Enable bash command execution (shorthand for bashConfig.enabled)',\n },\n bashConfig: {\n $ref: '#/definitions/BashConfig',\n description: 'Advanced bash command execution configuration',\n },\n completion_prompt: {\n type: 'string',\n description:\n 'Completion prompt for post-completion validation/review (runs after attempt_completion)',\n },\n },\n additionalProperties: false,\n description: 'AI provider configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n 'Record<string,McpServerConfig>': {\n type: 'object',\n additionalProperties: {\n $ref: '#/definitions/McpServerConfig',\n },\n },\n McpServerConfig: {\n type: 'object',\n properties: {\n command: {\n type: 'string',\n description: 'Command to execute for the MCP server',\n },\n args: {\n type: 'array',\n items: {\n type: 'string',\n },\n description: 'Arguments to pass to the command',\n },\n env: {\n $ref: '#/definitions/Record%3Cstring%2Cstring%3E',\n description: 'Environment variables for the MCP server',\n },\n },\n required: ['command'],\n additionalProperties: false,\n description: 'MCP Server configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n AIRetryConfig: {\n type: 'object',\n properties: {\n maxRetries: {\n type: 'number',\n description: 'Maximum retry attempts (0-50)',\n },\n initialDelay: {\n type: 'number',\n description: 'Initial delay in milliseconds (0-60000)',\n },\n maxDelay: {\n type: 'number',\n description: 'Maximum delay cap in milliseconds (0-300000)',\n },\n backoffFactor: {\n type: 'number',\n description: 'Exponential backoff multiplier (1-10)',\n },\n retryableErrors: {\n type: 'array',\n items: {\n type: 'string',\n },\n description: 'Custom error patterns to retry on',\n },\n },\n additionalProperties: false,\n description: 'Retry configuration for AI provider calls',\n patternProperties: {\n '^x-': {},\n },\n },\n AIFallbackConfig: {\n type: 'object',\n properties: {\n strategy: {\n type: 'string',\n enum: ['same-model', 'same-provider', 'any', 'custom'],\n description: \"Fallback strategy: 'same-model', 'same-provider', 'any', or 'custom'\",\n },\n providers: {\n type: 'array',\n items: {\n $ref: '#/definitions/AIFallbackProviderConfig',\n },\n description: 'Array of fallback provider configurations',\n },\n maxTotalAttempts: {\n type: 'number',\n description: 'Maximum total attempts across all providers',\n },\n auto: {\n type: 'boolean',\n description: 'Enable automatic fallback using available environment variables',\n },\n },\n additionalProperties: false,\n description: 'Fallback configuration for AI providers',\n patternProperties: {\n '^x-': {},\n },\n },\n AIFallbackProviderConfig: {\n type: 'object',\n properties: {\n provider: {\n type: 'string',\n enum: ['google', 'anthropic', 'openai', 'bedrock'],\n description: 'AI provider to use',\n },\n model: {\n type: 'string',\n description: 'Model name to use',\n },\n apiKey: {\n type: 'string',\n description: 'API key for this provider',\n },\n maxRetries: {\n type: 'number',\n description: 'Per-provider retry override',\n },\n region: {\n type: 'string',\n description: 'AWS region (for Bedrock)',\n },\n accessKeyId: {\n type: 'string',\n description: 'AWS access key ID (for Bedrock)',\n },\n secretAccessKey: {\n type: 'string',\n description: 'AWS secret access key (for Bedrock)',\n },\n },\n required: ['provider', 'model'],\n additionalProperties: false,\n description: 'Fallback provider configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n BashConfig: {\n type: 'object',\n properties: {\n allow: {\n type: 'array',\n items: {\n type: 'string',\n },\n description: \"Array of permitted command patterns (e.g., ['ls', 'git status'])\",\n },\n deny: {\n type: 'array',\n items: {\n type: 'string',\n },\n description: \"Array of blocked command patterns (e.g., ['rm -rf', 'sudo'])\",\n },\n noDefaultAllow: {\n type: 'boolean',\n description: 'Disable default safe command list (use with caution)',\n },\n noDefaultDeny: {\n type: 'boolean',\n description: 'Disable default dangerous command blocklist (use with extreme caution)',\n },\n timeout: {\n type: 'number',\n description: 'Execution timeout in milliseconds',\n },\n workingDirectory: {\n type: 'string',\n description: 'Default working directory for command execution',\n },\n },\n additionalProperties: false,\n description:\n \"Bash command execution configuration for ProbeAgent Note: Use 'allowBash: true' in AIProviderConfig to enable bash execution\",\n patternProperties: {\n '^x-': {},\n },\n },\n ClaudeCodeConfig: {\n type: 'object',\n properties: {\n allowedTools: {\n type: 'array',\n items: {\n type: 'string',\n },\n description: 'List of allowed tools for Claude Code to use',\n },\n maxTurns: {\n type: 'number',\n description: 'Maximum number of turns in conversation',\n },\n systemPrompt: {\n type: 'string',\n description: 'System prompt for Claude Code',\n },\n mcpServers: {\n $ref: '#/definitions/Record%3Cstring%2CMcpServerConfig%3E',\n description: 'MCP servers configuration',\n },\n subagent: {\n type: 'string',\n description: 'Path to subagent script',\n },\n enableDelegate: {\n type: 'boolean',\n description: 'Enable the delegate tool for task distribution to subagents',\n },\n hooks: {\n type: 'object',\n properties: {\n onStart: {\n type: 'string',\n description: 'Called when check starts',\n },\n onEnd: {\n type: 'string',\n description: 'Called when check ends',\n },\n onError: {\n type: 'string',\n description: 'Called when check encounters an error',\n },\n },\n additionalProperties: false,\n description: 'Event hooks for lifecycle management',\n patternProperties: {\n '^x-': {},\n },\n },\n },\n additionalProperties: false,\n description: 'Claude Code configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n EnvConfig: {\n type: 'object',\n additionalProperties: {\n type: ['string', 'number', 'boolean'],\n },\n description: 'Environment variable reference configuration',\n },\n CustomTemplateConfig: {\n type: 'object',\n properties: {\n file: {\n type: 'string',\n description: 'Path to custom template file (relative to config file or absolute)',\n },\n content: {\n type: 'string',\n description: 'Raw template content as string',\n },\n },\n additionalProperties: false,\n description: 'Custom template configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n FailureConditions: {\n type: 'object',\n additionalProperties: {\n $ref: '#/definitions/FailureCondition',\n },\n description: 'Collection of failure conditions',\n },\n FailureCondition: {\n anyOf: [\n {\n $ref: '#/definitions/SimpleFailureCondition',\n },\n {\n $ref: '#/definitions/ComplexFailureCondition',\n },\n ],\n description: 'Failure condition - can be a simple expression string or complex object',\n },\n SimpleFailureCondition: {\n type: 'string',\n description: 'Simple failure condition - just an expression string',\n },\n ComplexFailureCondition: {\n type: 'object',\n properties: {\n condition: {\n type: 'string',\n description: 'Expression to evaluate using Function Constructor',\n },\n message: {\n type: 'string',\n description: 'Human-readable message when condition is met',\n },\n severity: {\n $ref: '#/definitions/FailureConditionSeverity',\n description: 'Severity level of the failure',\n },\n halt_execution: {\n type: 'boolean',\n description: 'Whether this condition should halt execution',\n },\n },\n required: ['condition'],\n additionalProperties: false,\n description: 'Complex failure condition with additional metadata',\n patternProperties: {\n '^x-': {},\n },\n },\n FailureConditionSeverity: {\n type: 'string',\n enum: ['error', 'warning', 'info'],\n description: 'Failure condition severity levels',\n },\n OnInitConfig: {\n type: 'object',\n properties: {\n run: {\n type: 'array',\n items: {\n $ref: '#/definitions/OnInitRunItem',\n },\n description: 'Items to run before this check executes',\n },\n run_js: {\n type: 'string',\n description: 'Dynamic init items: JS expression returning OnInitRunItem[]',\n },\n transitions: {\n type: 'array',\n items: {\n $ref: '#/definitions/TransitionRule',\n },\n description: 'Declarative transitions (optional, for advanced use cases)',\n },\n },\n additionalProperties: false,\n description:\n 'Init routing configuration per check Runs BEFORE the check executes (preprocessing/setup)',\n patternProperties: {\n '^x-': {},\n },\n },\n OnInitRunItem: {\n anyOf: [\n {\n $ref: '#/definitions/OnInitToolInvocation',\n },\n {\n $ref: '#/definitions/OnInitStepInvocation',\n },\n {\n $ref: '#/definitions/OnInitWorkflowInvocation',\n },\n {\n type: 'string',\n },\n ],\n description: 'Unified on_init run item - can be tool, step, workflow, or plain string',\n },\n OnInitToolInvocation: {\n type: 'object',\n properties: {\n tool: {\n type: 'string',\n description: 'Tool name (must exist in tools: section)',\n },\n with: {\n $ref: '#/definitions/Record%3Cstring%2Cunknown%3E',\n description: 'Arguments to pass to the tool (Liquid templates supported)',\n },\n as: {\n type: 'string',\n description: 'Custom output name (defaults to tool name)',\n },\n },\n required: ['tool'],\n additionalProperties: false,\n description: 'Invoke a custom tool (from tools: section)',\n patternProperties: {\n '^x-': {},\n },\n },\n OnInitStepInvocation: {\n type: 'object',\n properties: {\n step: {\n type: 'string',\n description: 'Step name (must exist in steps: section)',\n },\n with: {\n $ref: '#/definitions/Record%3Cstring%2Cunknown%3E',\n description: 'Arguments to pass to the step (Liquid templates supported)',\n },\n as: {\n type: 'string',\n description: 'Custom output name (defaults to step name)',\n },\n },\n required: ['step'],\n additionalProperties: false,\n description: 'Invoke a helper step (regular check)',\n patternProperties: {\n '^x-': {},\n },\n },\n OnInitWorkflowInvocation: {\n type: 'object',\n properties: {\n workflow: {\n type: 'string',\n description: 'Workflow ID or path',\n },\n with: {\n $ref: '#/definitions/Record%3Cstring%2Cunknown%3E',\n description: 'Workflow inputs (Liquid templates supported)',\n },\n as: {\n type: 'string',\n description: 'Custom output name (defaults to workflow name)',\n },\n overrides: {\n $ref: '#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-41044%3E%3E',\n description: 'Step overrides',\n },\n output_mapping: {\n $ref: '#/definitions/Record%3Cstring%2Cstring%3E',\n description: 'Output mapping',\n },\n },\n required: ['workflow'],\n additionalProperties: false,\n description: 'Invoke a reusable workflow',\n patternProperties: {\n '^x-': {},\n },\n },\n 'Record<string,Partial<interface-src_types_config.ts-11359-23556-src_types_config.ts-0-41044>>':\n {\n type: 'object',\n additionalProperties: {\n $ref: '#/definitions/Partial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-41044%3E',\n },\n },\n 'Partial<interface-src_types_config.ts-11359-23556-src_types_config.ts-0-41044>': {\n type: 'object',\n additionalProperties: false,\n },\n TransitionRule: {\n type: 'object',\n properties: {\n when: {\n type: 'string',\n description:\n 'JavaScript expression evaluated in the same sandbox as goto_js; truthy enables the rule.',\n },\n to: {\n type: ['string', 'null'],\n description: 'Target step ID, or null to explicitly prevent goto.',\n },\n goto_event: {\n $ref: '#/definitions/EventTrigger',\n description: 'Optional event override when performing goto.',\n },\n },\n required: ['when'],\n additionalProperties: false,\n description: 'Declarative transition rule for on_* blocks.',\n patternProperties: {\n '^x-': {},\n },\n },\n OnFailConfig: {\n type: 'object',\n properties: {\n retry: {\n $ref: '#/definitions/RetryPolicy',\n description: 'Retry policy',\n },\n run: {\n type: 'array',\n items: {\n type: 'string',\n },\n description: 'Remediation steps to run before reattempt',\n },\n goto: {\n type: 'string',\n description: 'Jump back to an ancestor step (by id)',\n },\n goto_event: {\n $ref: '#/definitions/EventTrigger',\n description: \"Simulate a different event when performing goto (e.g., 'pr_updated')\",\n },\n goto_js: {\n type: 'string',\n description: 'Dynamic goto: JS expression returning step id or null',\n },\n run_js: {\n type: 'string',\n description: 'Dynamic remediation list: JS expression returning string[]',\n },\n transitions: {\n type: 'array',\n items: {\n $ref: '#/definitions/TransitionRule',\n },\n description:\n \"Declarative transitions. Evaluated in order; first matching rule wins. If a rule's `to` is null, no goto occurs. When omitted or none match, the engine falls back to goto_js/goto for backward compatibility.\",\n },\n },\n additionalProperties: false,\n description: 'Failure routing configuration per check',\n patternProperties: {\n '^x-': {},\n },\n },\n RetryPolicy: {\n type: 'object',\n properties: {\n max: {\n type: 'number',\n description: 'Maximum retry attempts (excluding the first attempt)',\n },\n backoff: {\n $ref: '#/definitions/BackoffPolicy',\n description: 'Backoff policy',\n },\n },\n additionalProperties: false,\n description: 'Retry policy for a step',\n patternProperties: {\n '^x-': {},\n },\n },\n BackoffPolicy: {\n type: 'object',\n properties: {\n mode: {\n type: 'string',\n enum: ['fixed', 'exponential'],\n description: 'Backoff mode',\n },\n delay_ms: {\n type: 'number',\n description: 'Initial delay in milliseconds',\n },\n },\n additionalProperties: false,\n description: 'Backoff policy for retries',\n patternProperties: {\n '^x-': {},\n },\n },\n OnSuccessConfig: {\n type: 'object',\n properties: {\n run: {\n type: 'array',\n items: {\n type: 'string',\n },\n description: 'Post-success steps to run',\n },\n goto: {\n type: 'string',\n description: 'Optional jump back to ancestor step (by id)',\n },\n goto_event: {\n $ref: '#/definitions/EventTrigger',\n description: \"Simulate a different event when performing goto (e.g., 'pr_updated')\",\n },\n goto_js: {\n type: 'string',\n description: 'Dynamic goto: JS expression returning step id or null',\n },\n run_js: {\n type: 'string',\n description: 'Dynamic post-success steps: JS expression returning string[]',\n },\n transitions: {\n type: 'array',\n items: {\n $ref: '#/definitions/TransitionRule',\n },\n description: 'Declarative transitions (see OnFailConfig.transitions).',\n },\n },\n additionalProperties: false,\n description: 'Success routing configuration per check',\n patternProperties: {\n '^x-': {},\n },\n },\n OnFinishConfig: {\n type: 'object',\n properties: {\n run: {\n type: 'array',\n items: {\n type: 'string',\n },\n description: 'Post-finish steps to run',\n },\n goto: {\n type: 'string',\n description: 'Optional jump back to ancestor step (by id)',\n },\n goto_event: {\n $ref: '#/definitions/EventTrigger',\n description: \"Simulate a different event when performing goto (e.g., 'pr_updated')\",\n },\n goto_js: {\n type: 'string',\n description: 'Dynamic goto: JS expression returning step id or null',\n },\n run_js: {\n type: 'string',\n description: 'Dynamic post-finish steps: JS expression returning string[]',\n },\n transitions: {\n type: 'array',\n items: {\n $ref: '#/definitions/TransitionRule',\n },\n description: 'Declarative transitions (see OnFailConfig.transitions).',\n },\n },\n additionalProperties: false,\n description:\n 'Finish routing configuration for forEach checks Runs once after ALL iterations of forEach and ALL dependent checks complete',\n patternProperties: {\n '^x-': {},\n },\n },\n OutputConfig: {\n type: 'object',\n properties: {\n pr_comment: {\n $ref: '#/definitions/PrCommentOutput',\n description: 'PR comment configuration',\n },\n file_comment: {\n $ref: '#/definitions/FileCommentOutput',\n description: 'File comment configuration (optional)',\n },\n github_checks: {\n $ref: '#/definitions/GitHubCheckOutput',\n description: 'GitHub check runs configuration (optional)',\n },\n suppressionEnabled: {\n type: 'boolean',\n description:\n 'Whether to enable issue suppression via visor-disable comments (default: true)',\n },\n },\n required: ['pr_comment'],\n additionalProperties: false,\n description: 'Output configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n PrCommentOutput: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Whether PR comments are enabled',\n },\n format: {\n $ref: '#/definitions/ConfigOutputFormat',\n description: 'Format of the output',\n },\n group_by: {\n $ref: '#/definitions/GroupByOption',\n description: 'How to group the results',\n },\n collapse: {\n type: 'boolean',\n description: 'Whether to collapse sections by default',\n },\n debug: {\n $ref: '#/definitions/DebugConfig',\n description: 'Debug mode configuration (optional)',\n },\n },\n required: ['format', 'group_by', 'collapse'],\n additionalProperties: false,\n description: 'PR comment output configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n ConfigOutputFormat: {\n type: 'string',\n enum: ['table', 'json', 'markdown', 'sarif'],\n description: 'Valid output formats',\n },\n GroupByOption: {\n type: 'string',\n enum: ['check', 'file', 'severity', 'group'],\n description: 'Valid grouping options',\n },\n DebugConfig: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Enable debug mode',\n },\n includePrompts: {\n type: 'boolean',\n description: 'Include AI prompts in debug output',\n },\n includeRawResponses: {\n type: 'boolean',\n description: 'Include raw AI responses in debug output',\n },\n includeTiming: {\n type: 'boolean',\n description: 'Include timing information',\n },\n includeProviderInfo: {\n type: 'boolean',\n description: 'Include provider information',\n },\n },\n required: [\n 'enabled',\n 'includePrompts',\n 'includeRawResponses',\n 'includeTiming',\n 'includeProviderInfo',\n ],\n additionalProperties: false,\n description: 'Debug mode configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n FileCommentOutput: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Whether file comments are enabled',\n },\n inline: {\n type: 'boolean',\n description: 'Whether to show inline comments',\n },\n },\n required: ['enabled', 'inline'],\n additionalProperties: false,\n description: 'File comment output configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n GitHubCheckOutput: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Whether GitHub check runs are enabled',\n },\n per_check: {\n type: 'boolean',\n description: 'Whether to create individual check runs per configured check',\n },\n name_prefix: {\n type: 'string',\n description: 'Custom name prefix for check runs',\n },\n },\n required: ['enabled', 'per_check'],\n additionalProperties: false,\n description: 'GitHub Check Runs output configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n HttpServerConfig: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Whether HTTP server is enabled',\n },\n port: {\n type: 'number',\n description: 'Port to listen on',\n },\n host: {\n type: 'string',\n description: 'Host/IP to bind to (defaults to 0.0.0.0)',\n },\n tls: {\n $ref: '#/definitions/TlsConfig',\n description: 'TLS/SSL configuration for HTTPS',\n },\n auth: {\n $ref: '#/definitions/HttpAuthConfig',\n description: 'Authentication configuration',\n },\n endpoints: {\n type: 'array',\n items: {\n $ref: '#/definitions/HttpEndpointConfig',\n },\n description: 'HTTP endpoints configuration',\n },\n },\n required: ['enabled', 'port'],\n additionalProperties: false,\n description: 'HTTP server configuration for receiving webhooks',\n patternProperties: {\n '^x-': {},\n },\n },\n TlsConfig: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Enable TLS/HTTPS',\n },\n cert: {\n type: 'string',\n description: 'Path to TLS certificate file or certificate content',\n },\n key: {\n type: 'string',\n description: 'Path to TLS key file or key content',\n },\n ca: {\n type: 'string',\n description: 'Path to CA certificate file or CA content (optional)',\n },\n rejectUnauthorized: {\n type: 'boolean',\n description: 'Reject unauthorized connections (default: true)',\n },\n },\n required: ['enabled'],\n additionalProperties: false,\n description: 'TLS/SSL configuration for HTTPS server',\n patternProperties: {\n '^x-': {},\n },\n },\n HttpAuthConfig: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: ['bearer_token', 'hmac', 'basic', 'none'],\n description: 'Authentication type',\n },\n secret: {\n type: 'string',\n description: 'Secret or token for authentication',\n },\n username: {\n type: 'string',\n description: 'Username for basic auth',\n },\n password: {\n type: 'string',\n description: 'Password for basic auth',\n },\n },\n required: ['type'],\n additionalProperties: false,\n description: 'HTTP server authentication configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n HttpEndpointConfig: {\n type: 'object',\n properties: {\n path: {\n type: 'string',\n description: 'Path for the webhook endpoint',\n },\n transform: {\n type: 'string',\n description: 'Optional transform template (Liquid) for the received data',\n },\n name: {\n type: 'string',\n description: 'Optional name/ID for this endpoint',\n },\n },\n required: ['path'],\n additionalProperties: false,\n description: 'HTTP server endpoint configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n MemoryConfig: {\n type: 'object',\n properties: {\n storage: {\n type: 'string',\n enum: ['memory', 'file'],\n description: 'Storage mode: \"memory\" (in-memory, default) or \"file\" (persistent)',\n },\n format: {\n type: 'string',\n enum: ['json', 'csv'],\n description: 'Storage format (only for file storage, default: json)',\n },\n file: {\n type: 'string',\n description: 'File path (required if storage: file)',\n },\n namespace: {\n type: 'string',\n description: 'Default namespace (default: \"default\")',\n },\n auto_load: {\n type: 'boolean',\n description: 'Auto-load on startup (default: true if storage: file)',\n },\n auto_save: {\n type: 'boolean',\n description: 'Auto-save after operations (default: true if storage: file)',\n },\n },\n additionalProperties: false,\n description: 'Memory storage configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n TagFilter: {\n type: 'object',\n properties: {\n include: {\n type: 'array',\n items: {\n type: 'string',\n },\n description: 'Tags that checks must have to be included (ANY match)',\n },\n exclude: {\n type: 'array',\n items: {\n type: 'string',\n },\n description: 'Tags that will exclude checks if present (ANY match)',\n },\n },\n additionalProperties: false,\n description: 'Tag filter configuration for selective check execution',\n patternProperties: {\n '^x-': {},\n },\n },\n RoutingDefaults: {\n type: 'object',\n properties: {\n max_loops: {\n type: 'number',\n description: 'Per-scope cap on routing transitions (success + failure)',\n },\n defaults: {\n type: 'object',\n properties: {\n on_fail: {\n $ref: '#/definitions/OnFailConfig',\n },\n },\n additionalProperties: false,\n description: 'Default policies applied to checks (step-level overrides take precedence)',\n patternProperties: {\n '^x-': {},\n },\n },\n },\n additionalProperties: false,\n description: 'Global routing defaults',\n patternProperties: {\n '^x-': {},\n },\n },\n LimitsConfig: {\n type: 'object',\n properties: {\n max_runs_per_check: {\n type: 'number',\n description:\n 'Maximum number of executions per check within a single engine run. Applies to each distinct scope independently for forEach item executions. Set to 0 or negative to disable. Default: 50.',\n },\n max_workflow_depth: {\n type: 'number',\n description:\n 'Maximum nesting depth for workflows executed by the state machine engine. Nested workflows are invoked by the workflow provider; this limit prevents accidental infinite recursion. Default: 3.',\n },\n },\n additionalProperties: false,\n description: 'Global engine limits',\n patternProperties: {\n '^x-': {},\n },\n },\n WorkspaceConfig: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Enable workspace isolation (default: true when config present)',\n },\n base_path: {\n type: 'string',\n description: 'Base path for workspaces (default: /tmp/visor-workspaces)',\n },\n name: {\n type: 'string',\n description: 'Workspace directory name (defaults to session id)',\n },\n main_project_name: {\n type: 'string',\n description:\n 'Main project folder name inside the workspace (defaults to original directory name)',\n },\n cleanup_on_exit: {\n type: 'boolean',\n description: 'Clean up workspace on exit (default: true)',\n },\n },\n additionalProperties: false,\n description: 'Workspace isolation configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n SlackConfig: {\n type: 'object',\n properties: {\n version: {\n type: 'string',\n description: 'Slack API version',\n },\n mentions: {\n type: 'string',\n description: \"Mention handling: 'all', 'direct', etc.\",\n },\n threads: {\n type: 'string',\n description: \"Thread handling: 'required', 'optional', etc.\",\n },\n show_raw_output: {\n type: 'boolean',\n description: 'Show raw output in Slack responses',\n },\n telemetry: {\n $ref: '#/definitions/SlackTelemetryConfig',\n description: 'Append telemetry identifiers to Slack replies.',\n },\n },\n additionalProperties: false,\n description: 'Slack configuration',\n patternProperties: {\n '^x-': {},\n },\n },\n SlackTelemetryConfig: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Enable telemetry ID suffix in Slack messages',\n },\n },\n additionalProperties: false,\n patternProperties: {\n '^x-': {},\n },\n },\n },\n} as const;\nexport default configSchema;\n","import * as yaml from 'js-yaml';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { logger } from './logger';\nimport simpleGit from 'simple-git';\nimport {\n VisorConfig,\n CheckConfig,\n ConfigCheckType,\n EventTrigger,\n ConfigOutputFormat,\n GroupByOption,\n ConfigValidationError,\n EnvironmentOverrides,\n MergedConfig,\n ConfigLoadOptions,\n} from './types/config';\nimport { CliOptions } from './types/cli';\nimport { ConfigLoader, ConfigLoaderOptions } from './utils/config-loader';\nimport { ConfigMerger } from './utils/config-merger';\nimport Ajv from 'ajv';\nimport addFormats from 'ajv-formats';\nimport { validateJsSyntax } from './utils/sandbox';\n\n/**\n * Valid event triggers for checks\n * Exported as a constant to serve as the single source of truth for event validation\n */\nexport const VALID_EVENT_TRIGGERS: readonly EventTrigger[] = [\n 'pr_opened',\n 'pr_updated',\n 'pr_closed',\n 'issue_opened',\n 'issue_comment',\n 'manual',\n 'schedule',\n 'webhook_received',\n] as const;\n\n/**\n * Configuration manager for Visor\n */\nexport class ConfigManager {\n private validCheckTypes: ConfigCheckType[] = [\n 'ai',\n 'claude-code',\n 'mcp',\n 'command',\n 'script',\n 'http',\n 'http_input',\n 'http_client',\n 'memory',\n 'noop',\n 'log',\n 'github',\n 'human-input',\n 'workflow',\n 'git-checkout',\n ];\n private validEventTriggers: EventTrigger[] = [...VALID_EVENT_TRIGGERS];\n private validOutputFormats: ConfigOutputFormat[] = ['table', 'json', 'markdown', 'sarif'];\n private validGroupByOptions: GroupByOption[] = ['check', 'file', 'severity', 'group'];\n\n /**\n * Load configuration from a file\n */\n public async loadConfig(\n configPath: string,\n options: ConfigLoadOptions = {}\n ): Promise<VisorConfig> {\n const { validate = true, mergeDefaults = true, allowedRemotePatterns } = options;\n\n // Resolve relative paths to absolute paths based on current working directory\n const resolvedPath = path.isAbsolute(configPath)\n ? configPath\n : path.resolve(process.cwd(), configPath);\n\n try {\n let configContent: string;\n try {\n // Attempt to read directly; if not found or not accessible, an error will be thrown\n configContent = fs.readFileSync(resolvedPath, 'utf8');\n } catch (readErr: any) {\n if (readErr && (readErr.code === 'ENOENT' || readErr.code === 'ENOTDIR')) {\n throw new Error(`Configuration file not found: ${resolvedPath}`);\n }\n throw new Error(\n `Failed to read configuration file ${resolvedPath}: ${readErr?.message || String(readErr)}`\n );\n }\n let parsedConfig: Partial<VisorConfig>;\n\n try {\n parsedConfig = yaml.load(configContent) as Partial<VisorConfig>;\n } catch (yamlError) {\n const errorMessage = yamlError instanceof Error ? yamlError.message : String(yamlError);\n throw new Error(`Invalid YAML syntax in ${resolvedPath}: ${errorMessage}`);\n }\n\n if (!parsedConfig || typeof parsedConfig !== 'object') {\n throw new Error('Configuration file must contain a valid YAML object');\n }\n\n // Handle extends/include directive (include is an alias for extends)\n const extendsValue = parsedConfig.extends || (parsedConfig as any).include;\n if (extendsValue) {\n const loaderOptions: ConfigLoaderOptions = {\n baseDir: path.dirname(resolvedPath),\n allowRemote: this.isRemoteExtendsAllowed(),\n maxDepth: 10,\n allowedRemotePatterns,\n };\n\n const loader = new ConfigLoader(loaderOptions);\n const merger = new ConfigMerger();\n\n // Process extends/include\n const extends_ = Array.isArray(extendsValue) ? extendsValue : [extendsValue];\n\n // Remove extends and include fields from config\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { extends: _, include: __, ...configWithoutExtends } = parsedConfig as any;\n\n // Load and merge all parent configurations\n let mergedConfig: Partial<VisorConfig> = {};\n for (const source of extends_) {\n console.log(`📦 Extending from: ${source}`);\n const parentConfig = await loader.fetchConfig(source);\n mergedConfig = merger.merge(mergedConfig, parentConfig);\n }\n\n // Merge with current config (child overrides parent)\n parsedConfig = merger.merge(mergedConfig, configWithoutExtends);\n\n // Remove disabled checks (those with empty 'on' array)\n parsedConfig = merger.removeDisabledChecks(parsedConfig);\n }\n\n // Check if this is a workflow definition file (has 'id' field indicating it's a workflow)\n // Do this BEFORE normalizing to avoid copying workflow steps to checks\n if ((parsedConfig as any).id && typeof (parsedConfig as any).id === 'string') {\n parsedConfig = await this.convertWorkflowToConfig(parsedConfig, path.dirname(resolvedPath));\n }\n\n // Normalize 'checks' and 'steps'. Prefer checks when this config used extends/include\n // so child overrides win over bundled defaults that may live under steps.\n parsedConfig = this.normalizeStepsAndChecks(parsedConfig, !!extendsValue);\n\n // Load workflows if defined\n await this.loadWorkflows(parsedConfig, path.dirname(resolvedPath));\n\n if (validate) {\n this.validateConfig(parsedConfig);\n }\n\n let finalConfig = parsedConfig;\n if (mergeDefaults) {\n finalConfig = this.mergeWithDefaults(parsedConfig);\n }\n\n return finalConfig as VisorConfig;\n } catch (error) {\n if (error instanceof Error) {\n // Pass through detailed error messages unchanged\n if (\n error.message.includes('not found') ||\n error.message.includes('Invalid YAML') ||\n error.message.includes('extends') ||\n error.message.includes('EACCES') ||\n error.message.includes('EISDIR')\n ) {\n throw error;\n }\n // Add more context for generic errors\n if (error.message.includes('ENOENT')) {\n throw new Error(`Configuration file not found: ${resolvedPath}`);\n }\n if (error.message.includes('EPERM')) {\n throw new Error(`Permission denied reading configuration file: ${resolvedPath}`);\n }\n throw new Error(`Failed to read configuration file ${resolvedPath}: ${error.message}`);\n }\n throw error;\n }\n }\n\n /**\n * Load configuration from an in-memory object (used by the test runner to\n * handle co-located config + tests without writing temp files).\n */\n public async loadConfigFromObject(\n obj: Partial<VisorConfig>,\n options: ConfigLoadOptions & { baseDir?: string } = {}\n ): Promise<VisorConfig> {\n const { validate = true, mergeDefaults = true, allowedRemotePatterns, baseDir } = options;\n try {\n let parsedConfig: Partial<VisorConfig> = JSON.parse(JSON.stringify(obj || {}));\n if (!parsedConfig || typeof parsedConfig !== 'object') {\n throw new Error('Configuration must be a YAML/JSON object');\n }\n\n const extendsValue = (parsedConfig as any).extends || (parsedConfig as any).include;\n if (extendsValue) {\n const loaderOptions: ConfigLoaderOptions = {\n baseDir: baseDir || process.cwd(),\n allowRemote: this.isRemoteExtendsAllowed(),\n maxDepth: 10,\n allowedRemotePatterns,\n };\n const loader = new ConfigLoader(loaderOptions);\n const extends_ = Array.isArray(extendsValue) ? extendsValue : [extendsValue];\n // Remove extends/include\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { extends: _, include: __, ...configWithoutExtends } = parsedConfig as any;\n let mergedConfig: Partial<VisorConfig> = {};\n for (const source of extends_) {\n console.log(`📦 Extending from: ${source}`);\n const parentConfig = await loader.fetchConfig(String(source));\n mergedConfig = new ConfigMerger().merge(mergedConfig, parentConfig);\n }\n parsedConfig = new ConfigMerger().merge(mergedConfig, configWithoutExtends);\n parsedConfig = new ConfigMerger().removeDisabledChecks(parsedConfig);\n }\n\n // Convert workflow definition to runnable config if needed\n if ((parsedConfig as any).id && typeof (parsedConfig as any).id === 'string') {\n parsedConfig = await this.convertWorkflowToConfig(parsedConfig, baseDir || process.cwd());\n }\n\n parsedConfig = this.normalizeStepsAndChecks(parsedConfig, !!extendsValue);\n await this.loadWorkflows(parsedConfig, baseDir || process.cwd());\n\n if (validate) this.validateConfig(parsedConfig);\n\n let finalConfig = parsedConfig as VisorConfig;\n if (mergeDefaults) finalConfig = this.mergeWithDefaults(parsedConfig) as VisorConfig;\n return finalConfig;\n } catch (error) {\n if (error instanceof Error) throw new Error(`Failed to load configuration: ${error.message}`);\n throw error;\n }\n }\n\n /**\n * Find and load configuration from default locations\n */\n public async findAndLoadConfig(options: ConfigLoadOptions = {}): Promise<VisorConfig> {\n // Try to find the git repository root first, fall back to current directory\n const gitRoot = await this.findGitRepositoryRoot();\n const searchDirs = [gitRoot, process.cwd()].filter(Boolean) as string[];\n\n for (const baseDir of searchDirs) {\n const candidates = ['visor.yaml', 'visor.yml', '.visor.yaml', '.visor.yml'].map(p =>\n path.join(baseDir, p)\n );\n\n for (const p of candidates) {\n try {\n const st = fs.statSync(p);\n if (!st.isFile()) continue;\n const isLegacy = path.basename(p).startsWith('.');\n if (isLegacy) {\n // Allow legacy dotfile unless strict mode enabled\n if (process.env.VISOR_STRICT_CONFIG_NAME === 'true') {\n const rel = path.relative(baseDir, p);\n throw new Error(\n `Legacy config detected: ${rel}. Please rename to visor.yaml (or visor.yml).`\n );\n }\n return this.loadConfig(p, options);\n }\n return this.loadConfig(p, options);\n } catch (e: any) {\n if (e && e.code === 'ENOENT') continue; // try next\n // Surface unexpected errors\n if (e) throw e;\n }\n }\n }\n\n // Try to load bundled default config\n const bundledConfig = this.loadBundledDefaultConfig();\n if (bundledConfig) {\n return bundledConfig;\n }\n\n // Return minimal default config if no bundled config found\n return this.getDefaultConfig();\n }\n\n /**\n * Find the git repository root directory\n */\n private async findGitRepositoryRoot(): Promise<string | null> {\n try {\n const git = simpleGit();\n const isRepo = await git.checkIsRepo();\n if (!isRepo) {\n return null;\n }\n\n // Get the repository root directory\n const rootDir = await git.revparse(['--show-toplevel']);\n return rootDir.trim();\n } catch {\n // Not in a git repository or git not available\n return null;\n }\n }\n\n /**\n * Get default configuration\n */\n public async getDefaultConfig(): Promise<VisorConfig> {\n return {\n version: '1.0',\n steps: {},\n checks: {}, // Keep for backward compatibility\n max_parallelism: 3,\n output: {\n pr_comment: {\n format: 'markdown',\n group_by: 'check',\n collapse: true,\n },\n },\n };\n }\n\n /**\n * Load bundled default configuration from the package\n */\n public loadBundledDefaultConfig(): VisorConfig | null {\n try {\n // Try different paths to find the bundled default config (support CJS and ESM)\n const possiblePaths: string[] = [];\n\n // __dirname is available in CJS; guard for ESM builds\n if (typeof __dirname !== 'undefined') {\n // Only support new non-dot filename\n possiblePaths.push(\n path.join(__dirname, 'defaults', 'visor.yaml'),\n path.join(__dirname, '..', 'defaults', 'visor.yaml')\n );\n }\n\n // Try via package root\n const pkgRoot = this.findPackageRoot();\n if (pkgRoot) {\n possiblePaths.push(path.join(pkgRoot, 'defaults', 'visor.yaml'));\n }\n\n // GitHub Action environment variable\n if (process.env.GITHUB_ACTION_PATH) {\n possiblePaths.push(\n path.join(process.env.GITHUB_ACTION_PATH, 'defaults', 'visor.yaml'),\n path.join(process.env.GITHUB_ACTION_PATH, 'dist', 'defaults', 'visor.yaml')\n );\n }\n\n let bundledConfigPath: string | undefined;\n for (const possiblePath of possiblePaths) {\n if (fs.existsSync(possiblePath)) {\n bundledConfigPath = possiblePath;\n break;\n }\n }\n\n if (bundledConfigPath) {\n // Always log to stderr to avoid contaminating formatted output\n console.error(`📦 Loading bundled default configuration from ${bundledConfigPath}`);\n // Synchronous loader for bundled defaults with shallow extends support\n const readAndParse = (p: string): Partial<VisorConfig> => {\n const raw = fs.readFileSync(p, 'utf8');\n const obj = yaml.load(raw) as Partial<VisorConfig>;\n if (!obj || typeof obj !== 'object') return {};\n // Alias: support 'include' as 'extends' in packaged defaults\n if ((obj as any).include && !(obj as any).extends) {\n const inc = (obj as any).include;\n (obj as any).extends = Array.isArray(inc) ? inc : [inc];\n delete (obj as any).include;\n }\n return obj;\n };\n const baseDir = path.dirname(bundledConfigPath);\n const merger = new (require('./utils/config-merger').ConfigMerger)();\n\n const loadWithExtendsSync = (p: string): Partial<VisorConfig> => {\n const current = readAndParse(p);\n const extVal: any = (current as any).extends || (current as any).include;\n // Strip extends/include to prevent re-processing\n if ((current as any).extends !== undefined) delete (current as any).extends;\n if ((current as any).include !== undefined) delete (current as any).include;\n if (!extVal) return current;\n const list = Array.isArray(extVal) ? extVal : [extVal];\n let acc: Partial<VisorConfig> = {};\n for (const src of list) {\n const rel = typeof src === 'string' ? src : String(src);\n const abs = path.isAbsolute(rel) ? rel : path.resolve(baseDir, rel);\n const parentCfg = loadWithExtendsSync(abs);\n acc = merger.merge(acc, parentCfg);\n }\n return merger.merge(acc, current);\n };\n\n let parsedConfig = loadWithExtendsSync(bundledConfigPath);\n // Normalize and validate as usual\n parsedConfig = this.normalizeStepsAndChecks(parsedConfig);\n this.validateConfig(parsedConfig);\n return this.mergeWithDefaults(parsedConfig) as VisorConfig;\n }\n } catch (error) {\n // Silently fail and return null - will fall back to minimal default\n console.warn(\n 'Failed to load bundled default config:',\n error instanceof Error ? error.message : String(error)\n );\n }\n\n return null;\n }\n\n /**\n * Find the root directory of the Visor package\n */\n private findPackageRoot(): string | null {\n let currentDir = __dirname;\n\n // Walk up the directory tree to find package.json\n while (currentDir !== path.dirname(currentDir)) {\n const packageJsonPath = path.join(currentDir, 'package.json');\n if (fs.existsSync(packageJsonPath)) {\n try {\n const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));\n // Check if this is the Visor package\n if (packageJson.name === '@probelabs/visor') {\n return currentDir;\n }\n } catch {\n // Continue searching if package.json is invalid\n }\n }\n currentDir = path.dirname(currentDir);\n }\n\n return null;\n }\n\n /**\n * Convert a workflow definition file to a visor config\n * When a workflow YAML is run standalone, register the workflow and use its tests as checks\n */\n private async convertWorkflowToConfig(\n workflowData: any,\n _basePath: string\n ): Promise<Partial<VisorConfig>> {\n const { WorkflowRegistry } = await import('./workflow-registry');\n const registry = WorkflowRegistry.getInstance();\n\n // Register the workflow\n const workflowId = workflowData.id;\n logger.info(`Detected standalone workflow file: ${workflowId}`);\n\n // Extract tests before modifying workflowData\n const tests = workflowData.tests || {};\n\n // Create a clean workflow definition (without tests)\n const workflowDefinition = { ...workflowData };\n delete workflowDefinition.tests;\n\n // Register the workflow itself\n const result = registry.register(workflowDefinition, 'standalone', { override: true });\n if (!result.valid && result.errors) {\n const errors = result.errors.map(e => ` ${e.path}: ${e.message}`).join('\\n');\n throw new Error(`Failed to register workflow '${workflowId}':\\n${errors}`);\n }\n\n logger.info(`Registered workflow '${workflowId}' for standalone execution`);\n\n // For standalone workflow testing, use the workflow's steps as checks\n // This allows the test runner to execute the workflow steps directly\n const workflowSteps = workflowData.steps || {};\n\n // Create a config that includes the workflow steps as checks,\n // plus the tests section and workflow metadata for output computation\n const visorConfig: Partial<VisorConfig> & { tests?: any; outputs?: any; inputs?: any } = {\n version: '1.0',\n steps: workflowSteps,\n checks: workflowSteps,\n tests: tests, // Preserve test harness config (may be empty if stripped by test runner)\n };\n\n // Preserve workflow metadata for output computation during tests\n if (workflowData.outputs) {\n visorConfig.outputs = workflowData.outputs;\n }\n if (workflowData.inputs) {\n visorConfig.inputs = workflowData.inputs;\n }\n\n logger.debug(\n `Standalone workflow config has ${Object.keys(workflowSteps).length} workflow steps as checks`\n );\n logger.debug(`Workflow step names: ${Object.keys(workflowSteps).join(', ')}`);\n logger.debug(`Config keys after conversion: ${Object.keys(visorConfig).join(', ')}`);\n\n return visorConfig;\n }\n\n /**\n * Load and register workflows from configuration\n */\n private async loadWorkflows(config: Partial<VisorConfig>, basePath: string): Promise<void> {\n // Only import workflows from external files\n if (!config.imports || config.imports.length === 0) {\n return;\n }\n\n const { WorkflowRegistry } = await import('./workflow-registry');\n const registry = WorkflowRegistry.getInstance();\n\n // Import workflow files\n for (const source of config.imports) {\n const results = await registry.import(source, { basePath, validate: true });\n for (const result of results) {\n if (!result.valid && result.errors) {\n const errors = result.errors.map(e => ` ${e.path}: ${e.message}`).join('\\n');\n throw new Error(`Failed to import workflow from '${source}':\\n${errors}`);\n }\n }\n logger.info(`Imported workflows from: ${source}`);\n }\n }\n\n /**\n * Normalize 'checks' and 'steps' keys for backward compatibility\n * Ensures both keys are present and contain the same data\n */\n private normalizeStepsAndChecks(\n config: Partial<VisorConfig>,\n preferChecks: boolean = false\n ): Partial<VisorConfig> {\n // If both are present, merge with CHECKS taking precedence on key conflicts.\n // Rationale: user overrides typically land in 'checks' while bundled defaults\n // may come in via 'steps' (e.g., included workflows). We want user overrides\n // (e.g., appendPrompt) to win over defaults.\n if (config.steps && config.checks) {\n if (preferChecks) {\n // Union with checks winning over steps (child overrides)\n const merged = { ...(config.steps as any), ...(config.checks as Record<string, any>) };\n config.steps = merged as any;\n config.checks = merged as any;\n } else {\n // Back-compat: when both present in a single file, honor steps exclusively\n // (ignore extra keys under checks)\n config.checks = config.steps;\n // Ensure steps remains authoritative\n config.steps = config.steps;\n }\n } else if (config.steps && !config.checks) {\n // Copy steps to checks for internal compatibility\n config.checks = config.steps;\n } else if (config.checks && !config.steps) {\n // Copy checks to steps for forward compatibility\n config.steps = config.checks;\n }\n\n return config;\n }\n\n /**\n * Merge configuration with CLI options\n */\n public mergeWithCliOptions(config: Partial<VisorConfig>, cliOptions: CliOptions): MergedConfig {\n // Apply CLI overrides to the config\n const mergedConfig = { ...config };\n\n // Override max_parallelism if specified in CLI\n if (cliOptions.maxParallelism !== undefined) {\n mergedConfig.max_parallelism = cliOptions.maxParallelism;\n }\n\n // Override fail_fast if specified in CLI\n if (cliOptions.failFast !== undefined) {\n mergedConfig.fail_fast = cliOptions.failFast;\n }\n\n return {\n config: mergedConfig,\n cliChecks: cliOptions.checks || [],\n cliOutput: cliOptions.output || 'table',\n };\n }\n\n /**\n * Load configuration with environment variable overrides\n */\n public async loadConfigWithEnvOverrides(): Promise<{\n config?: VisorConfig;\n environmentOverrides: EnvironmentOverrides;\n }> {\n const environmentOverrides: EnvironmentOverrides = {};\n\n // Check for environment variable overrides\n if (process.env.VISOR_CONFIG_PATH) {\n environmentOverrides.configPath = process.env.VISOR_CONFIG_PATH;\n }\n if (process.env.VISOR_OUTPUT_FORMAT) {\n environmentOverrides.outputFormat = process.env.VISOR_OUTPUT_FORMAT;\n }\n\n let config: VisorConfig | undefined;\n\n if (environmentOverrides.configPath) {\n try {\n config = await this.loadConfig(environmentOverrides.configPath);\n } catch {\n // If environment config fails, fall back to default discovery\n config = await this.findAndLoadConfig();\n }\n } else {\n config = await this.findAndLoadConfig();\n }\n\n return { config, environmentOverrides };\n }\n\n /**\n * Validate configuration against schema\n * @param config The config to validate\n * @param strict If true, treat warnings as errors (default: false)\n */\n public validateConfig(config: Partial<VisorConfig>, strict = false): void {\n const errors: ConfigValidationError[] = [];\n const warnings: ConfigValidationError[] = [];\n\n // First, run schema-based validation (runtime-generated).\n // Unknown keys become schema errors (we convert additionalProperties to warnings by default).\n this.validateWithAjvSchema(config, errors, warnings);\n\n // Validate required fields\n if (!config.version) {\n errors.push({\n field: 'version',\n message: 'Missing required field: version',\n });\n }\n\n // Unknown key warnings are produced by Ajv using the pre-generated schema.\n\n // Validate that either 'checks' or 'steps' is present\n if (!config.checks && !config.steps) {\n errors.push({\n field: 'checks/steps',\n message:\n 'Missing required field: either \"checks\" or \"steps\" must be defined. \"steps\" is recommended for new configurations.',\n });\n }\n\n // Use normalized checks for validation (both should be present after normalization)\n const checksToValidate = config.checks || config.steps;\n if (checksToValidate) {\n // Validate each check configuration\n for (const [checkName, checkConfig] of Object.entries(checksToValidate)) {\n // Default type to 'ai' if not specified\n if (!checkConfig.type) {\n checkConfig.type = 'ai';\n }\n // 'on' field is optional - if not specified, check can run on any event\n this.validateCheckConfig(checkName, checkConfig, errors, config, warnings);\n\n // Unknown/typo keys at the check level are produced by Ajv.\n\n // Validate MCP servers at check-level (basic shape only)\n if (checkConfig.ai_mcp_servers) {\n this.validateMcpServersObject(\n checkConfig.ai_mcp_servers,\n `checks.${checkName}.ai_mcp_servers`,\n errors,\n warnings\n );\n }\n if ((checkConfig as CheckConfig).ai?.mcpServers) {\n this.validateMcpServersObject(\n (checkConfig as CheckConfig).ai!.mcpServers as Record<string, unknown>,\n `checks.${checkName}.ai.mcpServers`,\n errors,\n warnings\n );\n }\n // 3) Precedence warning if both are provided\n if (checkConfig.ai_mcp_servers && (checkConfig as CheckConfig).ai?.mcpServers) {\n const lower = Object.keys(checkConfig.ai_mcp_servers);\n const higher = Object.keys((checkConfig as CheckConfig).ai!.mcpServers!);\n const overridden = lower.filter(k => higher.includes(k));\n warnings.push({\n field: `checks.${checkName}.ai.mcpServers`,\n message:\n overridden.length > 0\n ? `Both ai_mcp_servers and ai.mcpServers are set; ai.mcpServers overrides these servers: ${overridden.join(\n ', '\n )}`\n : 'Both ai_mcp_servers and ai.mcpServers are set; ai.mcpServers takes precedence for this check.',\n });\n }\n\n // Type-specific guidance for MCP placement to avoid silent ignores\n try {\n const anyCheck = checkConfig as unknown as Record<string, unknown>;\n const aiObj = (anyCheck.ai as Record<string, unknown>) || undefined;\n const hasBareMcpAtCheck = Object.prototype.hasOwnProperty.call(anyCheck, 'mcpServers');\n const hasAiMcp = aiObj && Object.prototype.hasOwnProperty.call(aiObj, 'mcpServers');\n const hasClaudeCodeMcp =\n anyCheck.claude_code &&\n typeof anyCheck.claude_code === 'object' &&\n Object.prototype.hasOwnProperty.call(\n anyCheck.claude_code as Record<string, unknown>,\n 'mcpServers'\n );\n\n if (checkConfig.type === 'ai') {\n if (hasBareMcpAtCheck) {\n warnings.push({\n field: `checks.${checkName}.mcpServers`,\n message:\n \"'mcpServers' at the check root is ignored for type 'ai'. Use 'ai.mcpServers' or 'ai_mcp_servers' instead.\",\n value: (anyCheck as any).mcpServers,\n });\n }\n if (hasClaudeCodeMcp) {\n warnings.push({\n field: `checks.${checkName}.claude_code.mcpServers`,\n message:\n \"'claude_code.mcpServers' is ignored for type 'ai'. Use 'ai.mcpServers' or 'ai_mcp_servers' instead.\",\n });\n }\n }\n\n if (checkConfig.type === 'claude-code') {\n if (hasAiMcp || checkConfig.ai_mcp_servers) {\n warnings.push({\n field: hasAiMcp\n ? `checks.${checkName}.ai.mcpServers`\n : `checks.${checkName}.ai_mcp_servers`,\n message:\n \"For type 'claude-code', MCP must be configured under 'claude_code.mcpServers'. 'ai.mcpServers' and 'ai_mcp_servers' are ignored for this check.\",\n });\n }\n }\n } catch {\n // best-effort hints; never fail validation here\n }\n }\n }\n\n // Validate global MCP servers if present\n if (config.ai_mcp_servers) {\n this.validateMcpServersObject(config.ai_mcp_servers, 'ai_mcp_servers', errors, warnings);\n }\n\n // Validate output configuration if present\n if (config.output) {\n this.validateOutputConfig(config.output as unknown as Record<string, unknown>, errors);\n }\n\n // Validate HTTP server configuration if present\n if (config.http_server) {\n this.validateHttpServerConfig(\n config.http_server as unknown as Record<string, unknown>,\n errors\n );\n }\n\n // Validate max_parallelism if present\n if (config.max_parallelism !== undefined) {\n if (\n typeof config.max_parallelism !== 'number' ||\n config.max_parallelism < 1 ||\n !Number.isInteger(config.max_parallelism)\n ) {\n errors.push({\n field: 'max_parallelism',\n message: 'max_parallelism must be a positive integer (minimum 1)',\n value: config.max_parallelism,\n });\n }\n }\n\n // Validate tag_filter if present\n if (config.tag_filter) {\n this.validateTagFilter(config.tag_filter as unknown as Record<string, unknown>, errors);\n }\n\n // In strict mode, treat warnings as errors\n if (strict && warnings.length > 0) {\n errors.push(...warnings);\n }\n\n if (errors.length > 0) {\n throw new Error(errors[0].message);\n }\n\n // Emit warnings (do not block execution) - only in non-strict mode\n if (!strict && warnings.length > 0) {\n for (const w of warnings) {\n logger.warn(`⚠️ Config warning [${w.field}]: ${w.message}`);\n }\n }\n }\n\n /**\n * Validate individual check configuration\n */\n private validateCheckConfig(\n checkName: string,\n checkConfig: CheckConfig,\n errors: ConfigValidationError[],\n config?: Partial<VisorConfig>,\n _warnings?: ConfigValidationError[]\n ): void {\n // Default to 'ai' if no type specified\n if (!checkConfig.type) {\n checkConfig.type = 'ai';\n }\n // Backward-compat alias: accept 'logger' as 'log'\n if ((checkConfig as any).type === 'logger') {\n (checkConfig as any).type = 'log';\n }\n\n if (!this.validCheckTypes.includes(checkConfig.type)) {\n errors.push({\n field: `checks.${checkName}.type`,\n message: `Invalid check type \"${checkConfig.type}\". Must be: ${this.validCheckTypes.join(', ')}`,\n value: checkConfig.type,\n });\n }\n\n // Only AI checks require prompts\n if (checkConfig.type === 'ai' && !checkConfig.prompt) {\n errors.push({\n field: `checks.${checkName}.prompt`,\n message: `Invalid check configuration for \"${checkName}\": missing prompt (required for AI checks)`,\n });\n }\n\n // Require specifying criticality for external-effect providers\n try {\n const externalTypes = new Set(['github', 'http', 'http_client', 'http_input', 'workflow']);\n if (externalTypes.has(checkConfig.type as string) && !checkConfig.criticality) {\n errors.push({\n field: `checks.${checkName}.criticality`,\n message: `Missing required criticality for step \"${checkName}\" (type: ${checkConfig.type}). Set criticality: 'external' or 'internal' to enable safe defaults for side-effecting steps.`,\n });\n }\n } catch {\n // best-effort hint only\n }\n\n // Criticality-driven contract requirements (lint-time)\n // For higher-safety modes, require a pre-run guard (assume or if) and,\n // for output-producing providers, a post-run contract (schema or guarantee).\n try {\n const crit = (checkConfig.criticality || 'policy') as string;\n const isCritical = crit === 'external' || crit === 'internal';\n\n if (isCritical) {\n // 1) Pre-run guard: either assume (string or non-empty array) or if\n const hasAssume =\n typeof (checkConfig as any).assume === 'string' ||\n (Array.isArray((checkConfig as any).assume) && (checkConfig as any).assume.length > 0);\n const hasIf =\n typeof (checkConfig as any).if === 'string' && (checkConfig as any).if.trim().length > 0;\n if (!hasAssume && !hasIf) {\n errors.push({\n field: `checks.${checkName}.assume`,\n message: `Critical step \"${checkName}\" (criticality: ${crit}) requires a precondition: set 'assume:' (preferred) or 'if:' to guard execution.`,\n });\n }\n\n // 2) Post-run contract for output-producing providers\n const outputProviders = new Set([\n 'ai',\n 'script',\n 'command',\n 'http',\n 'http_client',\n 'http_input',\n ]);\n if (outputProviders.has(checkConfig.type as string)) {\n const hasSchema = typeof (checkConfig as any).schema !== 'undefined';\n const hasGuarantee =\n typeof (checkConfig as any).guarantee === 'string' &&\n (checkConfig as any).guarantee.trim().length > 0;\n if (!hasSchema && !hasGuarantee) {\n errors.push({\n field: `checks.${checkName}.schema/guarantee`,\n message: `Critical step \"${checkName}\" (type: ${checkConfig.type}) requires an output contract: provide 'schema:' (renderer name or JSON Schema) or 'guarantee:' expression.`,\n });\n }\n }\n }\n } catch {\n // lint-only; never throw from here\n }\n\n // Command checks require exec field\n if (checkConfig.type === 'command' && !checkConfig.exec) {\n errors.push({\n field: `checks.${checkName}.exec`,\n message: `Invalid check configuration for \"${checkName}\": missing exec field (required for command checks)`,\n });\n }\n\n // HTTP output checks require url and body fields\n if (checkConfig.type === 'http') {\n if (!checkConfig.url) {\n errors.push({\n field: `checks.${checkName}.url`,\n message: `Invalid check configuration for \"${checkName}\": missing url field (required for http checks)`,\n });\n }\n if (!checkConfig.body) {\n errors.push({\n field: `checks.${checkName}.body`,\n message: `Invalid check configuration for \"${checkName}\": missing body field (required for http checks)`,\n });\n }\n }\n\n // Note: Do not add special-case validation for log 'message' here.\n // Schema (Ajv) permits 'message' and related keys; provider enforces at execution time.\n\n // HTTP input checks require endpoint field\n if (checkConfig.type === 'http_input' && !checkConfig.endpoint) {\n errors.push({\n field: `checks.${checkName}.endpoint`,\n message: `Invalid check configuration for \"${checkName}\": missing endpoint field (required for http_input checks)`,\n });\n }\n\n // Prefer single-field schema: if both schema (object) and output_schema are present, warn\n try {\n const hasObjSchema =\n (checkConfig as any)?.schema && typeof (checkConfig as any).schema === 'object';\n const hasOutputSchema =\n (checkConfig as any)?.output_schema &&\n typeof (checkConfig as any).output_schema === 'object';\n if (hasObjSchema && hasOutputSchema) {\n (_warnings || errors).push({\n field: `checks.${checkName}.schema`,\n message: `Both 'schema' (object) and 'output_schema' are set; 'schema' will be used for validation. 'output_schema' is deprecated.`,\n });\n }\n } catch {}\n\n // HTTP client checks require url field\n if (checkConfig.type === 'http_client' && !checkConfig.url) {\n errors.push({\n field: `checks.${checkName}.url`,\n message: `Invalid check configuration for \"${checkName}\": missing url field (required for http_client checks)`,\n });\n }\n\n // Validate cron schedule if specified\n if (checkConfig.schedule) {\n // Basic cron validation - could use node-cron.validate() for better validation\n const cronParts = checkConfig.schedule.split(' ');\n if (cronParts.length < 5 || cronParts.length > 6) {\n errors.push({\n field: `checks.${checkName}.schedule`,\n message: `Invalid cron expression for \"${checkName}\": ${checkConfig.schedule}`,\n value: checkConfig.schedule,\n });\n }\n }\n\n // 'on' field is optional - if not specified, check can be triggered by any event\n if (checkConfig.on) {\n if (!Array.isArray(checkConfig.on)) {\n errors.push({\n field: `checks.${checkName}.on`,\n message: `Invalid check configuration for \"${checkName}\": 'on' field must be an array`,\n });\n } else {\n // Validate event triggers\n for (const event of checkConfig.on) {\n if (!this.validEventTriggers.includes(event)) {\n errors.push({\n field: `checks.${checkName}.on`,\n message: `Invalid event \"${event}\". Must be one of: ${this.validEventTriggers.join(', ')}`,\n value: event,\n });\n }\n }\n }\n }\n\n // Validate reuse_ai_session configuration\n if (checkConfig.reuse_ai_session !== undefined) {\n const reuseValue = checkConfig.reuse_ai_session as unknown;\n const isString = typeof reuseValue === 'string';\n const isBoolean = typeof reuseValue === 'boolean';\n const isSelf = reuseValue === 'self';\n\n if (!isString && !isBoolean) {\n errors.push({\n field: `checks.${checkName}.reuse_ai_session`,\n message: `Invalid reuse_ai_session value for \"${checkName}\": must be string (check name) or boolean`,\n value: reuseValue,\n });\n } else if (isString && !isSelf) {\n // When reuse_ai_session is a string (other than the special 'self' value),\n // it must refer to a valid check name\n const targetCheckName = reuseValue as string;\n if (!config?.checks || !config.checks[targetCheckName]) {\n errors.push({\n field: `checks.${checkName}.reuse_ai_session`,\n message: `Check \"${checkName}\" references non-existent check \"${targetCheckName}\" for session reuse`,\n value: reuseValue,\n });\n }\n } else if (reuseValue === true) {\n // When reuse_ai_session is true, depends_on must be specified and non-empty\n if (\n !checkConfig.depends_on ||\n !Array.isArray(checkConfig.depends_on) ||\n checkConfig.depends_on.length === 0\n ) {\n errors.push({\n field: `checks.${checkName}.reuse_ai_session`,\n message: `Check \"${checkName}\" has reuse_ai_session=true but missing or empty depends_on. Session reuse requires dependency on another check.`,\n value: reuseValue,\n });\n }\n }\n }\n\n // Validate session_mode configuration\n if (checkConfig.session_mode !== undefined) {\n if (checkConfig.session_mode !== 'clone' && checkConfig.session_mode !== 'append') {\n errors.push({\n field: `checks.${checkName}.session_mode`,\n message: `Invalid session_mode value for \"${checkName}\": must be 'clone' or 'append'`,\n value: checkConfig.session_mode,\n });\n }\n\n // session_mode only makes sense with reuse_ai_session\n if (!checkConfig.reuse_ai_session) {\n errors.push({\n field: `checks.${checkName}.session_mode`,\n message: `Check \"${checkName}\" has session_mode but no reuse_ai_session. session_mode requires reuse_ai_session to be set.`,\n value: checkConfig.session_mode,\n });\n }\n }\n\n // Validate tags configuration\n if (checkConfig.tags !== undefined) {\n if (!Array.isArray(checkConfig.tags)) {\n errors.push({\n field: `checks.${checkName}.tags`,\n message: `Invalid tags value for \"${checkName}\": must be an array of strings`,\n value: checkConfig.tags,\n });\n } else {\n // Validate each tag\n const validTagPattern = /^[a-zA-Z0-9][a-zA-Z0-9-_]*$/;\n checkConfig.tags.forEach((tag, index) => {\n if (typeof tag !== 'string') {\n errors.push({\n field: `checks.${checkName}.tags[${index}]`,\n message: `Invalid tag at index ${index} for \"${checkName}\": must be a string`,\n value: tag,\n });\n } else if (!validTagPattern.test(tag)) {\n errors.push({\n field: `checks.${checkName}.tags[${index}]`,\n message: `Invalid tag \"${tag}\" for \"${checkName}\": tags must be alphanumeric with hyphens or underscores (start with alphanumeric)`,\n value: tag,\n });\n }\n });\n }\n }\n\n // Validate on_finish configuration\n if (checkConfig.on_finish !== undefined) {\n if (!checkConfig.forEach) {\n errors.push({\n field: `checks.${checkName}.on_finish`,\n message: `Check \"${checkName}\" has on_finish but forEach is not true. on_finish is only valid on forEach checks.`,\n value: checkConfig.on_finish,\n });\n }\n }\n\n // Validate JavaScript syntax in transform_js and script content\n try {\n // Validate transform_js if present\n const transformJs = (checkConfig as any).transform_js;\n if (typeof transformJs === 'string' && transformJs.trim().length > 0) {\n const result = validateJsSyntax(transformJs);\n if (!result.valid) {\n errors.push({\n field: `checks.${checkName}.transform_js`,\n message: `JavaScript syntax error in \"${checkName}\" transform_js: ${result.error}`,\n value: transformJs.slice(0, 100) + (transformJs.length > 100 ? '...' : ''),\n });\n }\n }\n\n // Validate script content if type is 'script'\n if (checkConfig.type === 'script') {\n const content = (checkConfig as any).content;\n if (typeof content === 'string' && content.trim().length > 0) {\n const result = validateJsSyntax(content);\n if (!result.valid) {\n errors.push({\n field: `checks.${checkName}.content`,\n message: `JavaScript syntax error in \"${checkName}\" script: ${result.error}`,\n value: content.slice(0, 100) + (content.length > 100 ? '...' : ''),\n });\n }\n }\n }\n } catch {\n // Syntax validation is best-effort; don't fail the whole config on validation errors\n }\n }\n\n /**\n * Validate MCP servers object shape and values (basic shape only)\n */\n private validateMcpServersObject(\n mcpServers: unknown,\n fieldPrefix: string,\n errors: ConfigValidationError[],\n _warnings: ConfigValidationError[]\n ): void {\n if (typeof mcpServers !== 'object' || mcpServers === null) {\n errors.push({\n field: fieldPrefix,\n message: `${fieldPrefix} must be an object mapping server names to { command, args?, env? }`,\n value: mcpServers,\n });\n return;\n }\n\n for (const [serverName, cfg] of Object.entries(mcpServers as Record<string, unknown>)) {\n const pathStr = `${fieldPrefix}.${serverName}`;\n if (!cfg || typeof cfg !== 'object') {\n errors.push({ field: pathStr, message: `${pathStr} must be an object`, value: cfg });\n continue;\n }\n const { command, args, env } = cfg as { command?: unknown; args?: unknown; env?: unknown };\n if (typeof command !== 'string' || command.trim() === '') {\n errors.push({\n field: `${pathStr}.command`,\n message: `${pathStr}.command must be a non-empty string`,\n value: command,\n });\n }\n if (args !== undefined && !Array.isArray(args)) {\n errors.push({\n field: `${pathStr}.args`,\n message: `${pathStr}.args must be an array of strings`,\n value: args,\n });\n }\n if (env !== undefined) {\n if (typeof env !== 'object' || env === null) {\n errors.push({\n field: `${pathStr}.env`,\n message: `${pathStr}.env must be an object of string values`,\n value: env,\n });\n } else {\n for (const [k, v] of Object.entries(env as Record<string, unknown>)) {\n if (typeof v !== 'string') {\n errors.push({\n field: `${pathStr}.env.${k}`,\n message: `${pathStr}.env.${k} must be a string`,\n value: v,\n });\n }\n }\n }\n }\n }\n }\n\n /**\n * Validate configuration using generated JSON Schema via Ajv, if available.\n * Adds to errors/warnings but does not throw directly.\n */\n private validateWithAjvSchema(\n config: Partial<VisorConfig>,\n errors: ConfigValidationError[],\n warnings: ConfigValidationError[]\n ): void {\n try {\n if (!__ajvValidate) {\n // Preferred fast path: try plain JSON in dist/generated first\n try {\n const jsonPath = path.resolve(__dirname, 'generated', 'config-schema.json');\n\n const jsonSchema = require(jsonPath);\n if (jsonSchema) {\n const ajv = new Ajv({ allErrors: true, allowUnionTypes: true, strict: false });\n addFormats(ajv);\n const validate = ajv.compile(jsonSchema);\n __ajvValidate = (data: unknown) => validate(data);\n __ajvErrors = () => validate.errors;\n }\n } catch {}\n // Fallback: use embedded TS module (bundled by ncc)\n if (!__ajvValidate) {\n try {\n const mod = require('./generated/config-schema');\n const schema = mod?.configSchema || mod?.default || mod;\n if (schema) {\n const ajv = new Ajv({ allErrors: true, allowUnionTypes: true, strict: false });\n addFormats(ajv);\n const validate = ajv.compile(schema);\n __ajvValidate = (data: unknown) => validate(data);\n __ajvErrors = () => validate.errors;\n } else {\n return;\n }\n } catch {\n return;\n }\n }\n }\n\n const ok = __ajvValidate(config);\n const errs = __ajvErrors ? __ajvErrors() : null;\n if (!ok && Array.isArray(errs)) {\n for (const e of errs) {\n const pathStr = e.instancePath\n ? e.instancePath.replace(/^\\//, '').replace(/\\//g, '.')\n : '';\n const msg = e.message || 'Invalid configuration';\n if (e.keyword === 'additionalProperties') {\n const addl = (e.params && (e.params as any).additionalProperty) || 'unknown';\n const fullField = pathStr ? `${pathStr}.${addl}` : addl;\n const topLevel = !pathStr;\n // Gracefully allow certain known top-level keys that may appear in\n // specific execution contexts but are not part of the core schema.\n // - 'tests' is used by the YAML test runner and can legitimately\n // be present when loading a suite file.\n // - 'slack' holds inbound Slack settings (socket/webhook); older\n // schema snapshots may not include it yet.\n if (topLevel && (addl === 'tests' || addl === 'slack')) {\n // Do not warn for these keys.\n continue;\n }\n warnings.push({\n field: fullField || 'config',\n message: topLevel\n ? `Unknown top-level key '${addl}' will be ignored.`\n : `Unknown key '${addl}' will be ignored`,\n });\n } else {\n // Defer to our existing programmatic validators for required/type errors\n // to preserve friendly, stable error messages and avoid duplication.\n logger.debug(`Ajv note [${pathStr || 'config'}]: ${msg}`);\n }\n }\n }\n } catch (err) {\n logger.debug(`Ajv validation skipped: ${err instanceof Error ? err.message : String(err)}`);\n }\n }\n\n // Unknown-key warnings are fully handled by Ajv using the generated schema\n // Unknown-key hints are produced by Ajv (additionalProperties=false)\n\n /**\n * Validate tag filter configuration\n */\n private validateTagFilter(\n tagFilter: Record<string, unknown>,\n errors: ConfigValidationError[]\n ): void {\n const validTagPattern = /^[a-zA-Z0-9][a-zA-Z0-9-_]*$/;\n\n // Validate include tags\n if (tagFilter.include !== undefined) {\n if (!Array.isArray(tagFilter.include)) {\n errors.push({\n field: 'tag_filter.include',\n message: 'tag_filter.include must be an array of strings',\n value: tagFilter.include,\n });\n } else {\n tagFilter.include.forEach((tag: unknown, index: number) => {\n if (typeof tag !== 'string') {\n errors.push({\n field: `tag_filter.include[${index}]`,\n message: `Invalid tag at index ${index}: must be a string`,\n value: tag,\n });\n } else if (!validTagPattern.test(tag as string)) {\n errors.push({\n field: `tag_filter.include[${index}]`,\n message: `Invalid tag \"${tag}\": tags must be alphanumeric with hyphens or underscores`,\n value: tag,\n });\n }\n });\n }\n }\n\n // Validate exclude tags\n if (tagFilter.exclude !== undefined) {\n if (!Array.isArray(tagFilter.exclude)) {\n errors.push({\n field: 'tag_filter.exclude',\n message: 'tag_filter.exclude must be an array of strings',\n value: tagFilter.exclude,\n });\n } else {\n tagFilter.exclude.forEach((tag: unknown, index: number) => {\n if (typeof tag !== 'string') {\n errors.push({\n field: `tag_filter.exclude[${index}]`,\n message: `Invalid tag at index ${index}: must be a string`,\n value: tag,\n });\n } else if (!validTagPattern.test(tag as string)) {\n errors.push({\n field: `tag_filter.exclude[${index}]`,\n message: `Invalid tag \"${tag}\": tags must be alphanumeric with hyphens or underscores`,\n value: tag,\n });\n }\n });\n }\n }\n }\n\n /**\n * Validate HTTP server configuration\n */\n private validateHttpServerConfig(\n httpServerConfig: Record<string, unknown>,\n errors: ConfigValidationError[]\n ): void {\n if (typeof httpServerConfig.enabled !== 'boolean') {\n errors.push({\n field: 'http_server.enabled',\n message: 'http_server.enabled must be a boolean',\n value: httpServerConfig.enabled,\n });\n }\n\n if (httpServerConfig.enabled === true) {\n // Port is required when enabled\n if (\n typeof httpServerConfig.port !== 'number' ||\n httpServerConfig.port < 1 ||\n httpServerConfig.port > 65535\n ) {\n errors.push({\n field: 'http_server.port',\n message: 'http_server.port must be a number between 1 and 65535',\n value: httpServerConfig.port,\n });\n }\n\n // Validate auth if present\n if (httpServerConfig.auth) {\n const auth = httpServerConfig.auth as Record<string, unknown>;\n const validAuthTypes = ['bearer_token', 'hmac', 'basic', 'none'];\n\n if (!auth.type || !validAuthTypes.includes(auth.type as string)) {\n errors.push({\n field: 'http_server.auth.type',\n message: `Invalid auth type. Must be one of: ${validAuthTypes.join(', ')}`,\n value: auth.type,\n });\n }\n }\n\n // Validate TLS configuration if present\n if (httpServerConfig.tls && typeof httpServerConfig.tls === 'object') {\n const tls = httpServerConfig.tls as Record<string, unknown>;\n\n if (tls.enabled === true) {\n // Cert and key are required when TLS is enabled\n if (!tls.cert) {\n errors.push({\n field: 'http_server.tls.cert',\n message: 'TLS certificate is required when TLS is enabled',\n });\n }\n if (!tls.key) {\n errors.push({\n field: 'http_server.tls.key',\n message: 'TLS key is required when TLS is enabled',\n });\n }\n }\n }\n\n // Validate endpoints if present\n if (httpServerConfig.endpoints && Array.isArray(httpServerConfig.endpoints)) {\n for (let i = 0; i < httpServerConfig.endpoints.length; i++) {\n const endpoint = httpServerConfig.endpoints[i] as Record<string, unknown>;\n if (!endpoint.path || typeof endpoint.path !== 'string') {\n errors.push({\n field: `http_server.endpoints[${i}].path`,\n message: 'Endpoint path must be a string',\n value: endpoint.path,\n });\n }\n }\n }\n }\n }\n\n /**\n * Validate output configuration\n */\n private validateOutputConfig(\n outputConfig: Record<string, unknown>,\n errors: ConfigValidationError[]\n ): void {\n if (outputConfig.pr_comment) {\n const prComment = outputConfig.pr_comment as Record<string, unknown>;\n\n if (\n typeof prComment.format === 'string' &&\n !this.validOutputFormats.includes(prComment.format as ConfigOutputFormat)\n ) {\n errors.push({\n field: 'output.pr_comment.format',\n message: `Invalid output format \"${prComment.format}\". Must be one of: ${this.validOutputFormats.join(', ')}`,\n value: prComment.format as string,\n });\n }\n\n if (\n typeof prComment.group_by === 'string' &&\n !this.validGroupByOptions.includes(prComment.group_by as GroupByOption)\n ) {\n errors.push({\n field: 'output.pr_comment.group_by',\n message: `Invalid group_by option \"${prComment.group_by}\". Must be one of: ${this.validGroupByOptions.join(', ')}`,\n value: prComment.group_by as string,\n });\n }\n }\n }\n\n /**\n * Check if remote extends are allowed\n */\n private isRemoteExtendsAllowed(): boolean {\n // Check environment variable first\n if (\n process.env.VISOR_NO_REMOTE_EXTENDS === 'true' ||\n process.env.VISOR_NO_REMOTE_EXTENDS === '1'\n ) {\n return false;\n }\n // Default to allowing remote extends\n return true;\n }\n\n /**\n * Merge configuration with default values\n */\n private mergeWithDefaults(config: Partial<VisorConfig>): Partial<VisorConfig> {\n const defaultConfig = {\n version: '1.0',\n checks: {},\n max_parallelism: 3,\n output: {\n pr_comment: {\n format: 'markdown' as ConfigOutputFormat,\n group_by: 'check' as GroupByOption,\n collapse: true,\n },\n },\n };\n\n // Deep merge with defaults\n const merged = { ...defaultConfig, ...config };\n\n // Ensure output has default values\n if (merged.output) {\n merged.output.pr_comment = {\n ...defaultConfig.output.pr_comment,\n ...merged.output.pr_comment,\n };\n } else {\n merged.output = defaultConfig.output;\n }\n\n return merged;\n }\n}\n\n// Cache Ajv validator across loads to avoid repeated heavy generation\nlet __ajvValidate: ((data: unknown) => boolean) | null = null;\nlet __ajvErrors: (() => import('ajv').ErrorObject[] | null | undefined) | null = null;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,YAAY,UAAU;AAFtB,IA8Ca;AA9Cb;AAAA;AAAA;AA8CO,IAAM,eAAN,MAAmB;AAAA,MAIxB,YAAoB,UAA+B,CAAC,GAAG;AAAnC;AAClB,aAAK,UAAU;AAAA,UACb,aAAa;AAAA,UACb,UAAU,IAAI,KAAK;AAAA;AAAA,UACnB,SAAS,KAAK;AAAA;AAAA,UACd,UAAU;AAAA,UACV,uBAAuB,CAAC;AAAA;AAAA,UACxB,aAAa,KAAK,gBAAgB;AAAA,UAClC,GAAG;AAAA,QACL;AAAA,MACF;AAAA,MAbQ,QAAiC,oBAAI,IAAI;AAAA,MACzC,gBAA6B,oBAAI,IAAI;AAAA;AAAA;AAAA;AAAA,MAiBrC,cAAc,QAAkC;AACtD,YAAI,WAAW,WAAW;AACxB,iBAAO;AAAA,QACT;AACA,YAAI,OAAO,WAAW,SAAS,KAAK,OAAO,WAAW,UAAU,GAAG;AACjE,iBAAO;AAAA,QACT;AACA,eAAO;AAAA,MACT;AAAA;AAAA;AAAA;AAAA,MAKA,MAAa,YACX,QACA,eAAuB,GACQ;AAE/B,YAAI,iBAAiB,KAAK,QAAQ,YAAY,KAAK;AACjD,gBAAM,IAAI;AAAA,YACR,0BAA0B,KAAK,QAAQ,QAAQ;AAAA,UACjD;AAAA,QACF;AAGA,cAAM,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