@probelabs/visor 0.1.185-ee → 0.1.186-ee
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/config/config-watcher.d.ts +3 -1
- package/dist/config/config-watcher.d.ts.map +1 -1
- package/dist/index.js +177 -69
- package/dist/providers/ai-check-provider.d.ts.map +1 -1
- package/dist/runners/config-reload-runtime.d.ts +13 -0
- package/dist/runners/config-reload-runtime.d.ts.map +1 -0
- package/dist/sdk/{check-provider-registry-ZZ6N4GDP.mjs → check-provider-registry-7T2AEWLU.mjs} +3 -3
- package/dist/sdk/{check-provider-registry-RITJW67U.mjs → check-provider-registry-TQR32QBD.mjs} +2 -2
- package/dist/sdk/{chunk-YYFSAAD6.mjs → chunk-LWH6CVLZ.mjs} +12 -9
- package/dist/sdk/chunk-LWH6CVLZ.mjs.map +1 -0
- package/dist/sdk/{chunk-ZYDRR6PZ.mjs → chunk-TAOGXCWT.mjs} +10 -7
- package/dist/sdk/chunk-TAOGXCWT.mjs.map +1 -0
- package/dist/sdk/chunk-XX6WT332.mjs +6118 -0
- package/dist/sdk/chunk-XX6WT332.mjs.map +1 -0
- package/dist/sdk/config-BCYAVJ5S.mjs +16 -0
- package/dist/sdk/{schedule-tool-EMNF3FPQ.mjs → schedule-tool-25C5NMDG.mjs} +3 -3
- package/dist/sdk/{schedule-tool-ADZ2ON4I.mjs → schedule-tool-7IQI6MID.mjs} +2 -2
- package/dist/sdk/{schedule-tool-handler-3R3IC6VA.mjs → schedule-tool-handler-IYBNJLTV.mjs} +2 -2
- package/dist/sdk/{schedule-tool-handler-F76ZD2WU.mjs → schedule-tool-handler-VWGTVSB6.mjs} +3 -3
- package/dist/sdk/sdk.js +89 -19
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +2 -2
- package/dist/sdk/{workflow-check-provider-TC2G33WF.mjs → workflow-check-provider-FOWDJUO3.mjs} +2 -2
- package/dist/sdk/{workflow-check-provider-U4UXZ5YS.mjs → workflow-check-provider-MRP3C2NC.mjs} +3 -3
- package/dist/sdk/workflow-check-provider-MRP3C2NC.mjs.map +1 -0
- package/dist/utils/config-loader.d.ts +12 -0
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/sdk/chunk-YYFSAAD6.mjs.map +0 -1
- package/dist/sdk/chunk-ZYDRR6PZ.mjs.map +0 -1
- /package/dist/sdk/{check-provider-registry-RITJW67U.mjs.map → check-provider-registry-7T2AEWLU.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-ZZ6N4GDP.mjs.map → check-provider-registry-TQR32QBD.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-ADZ2ON4I.mjs.map → config-BCYAVJ5S.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-EMNF3FPQ.mjs.map → schedule-tool-25C5NMDG.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-3R3IC6VA.mjs.map → schedule-tool-7IQI6MID.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-F76ZD2WU.mjs.map → schedule-tool-handler-IYBNJLTV.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-TC2G33WF.mjs.map → schedule-tool-handler-VWGTVSB6.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-U4UXZ5YS.mjs.map → workflow-check-provider-FOWDJUO3.mjs.map} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ConfigManager,
|
|
3
|
+
VALID_EVENT_TRIGGERS,
|
|
4
|
+
init_config
|
|
5
|
+
} from "./chunk-XX6WT332.mjs";
|
|
6
|
+
import "./chunk-KWTCTEFT.mjs";
|
|
7
|
+
import "./chunk-LW3INISN.mjs";
|
|
8
|
+
import "./chunk-6E625R3C.mjs";
|
|
9
|
+
import "./chunk-B2OUZAWY.mjs";
|
|
10
|
+
import "./chunk-J7LXIPZS.mjs";
|
|
11
|
+
init_config();
|
|
12
|
+
export {
|
|
13
|
+
ConfigManager,
|
|
14
|
+
VALID_EVENT_TRIGGERS
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=config-BCYAVJ5S.mjs.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
handleScheduleAction,
|
|
5
5
|
init_schedule_tool,
|
|
6
6
|
isScheduleTool
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LWH6CVLZ.mjs";
|
|
8
8
|
import "./chunk-YSOIR46P.mjs";
|
|
9
9
|
import "./chunk-PDQTEBOJ.mjs";
|
|
10
10
|
import "./chunk-WZQMTD7W.mjs";
|
|
@@ -14,7 +14,7 @@ import "./chunk-B7BVQM5K.mjs";
|
|
|
14
14
|
import "./chunk-XXAEN5KU.mjs";
|
|
15
15
|
import "./chunk-ZNKL6ESZ.mjs";
|
|
16
16
|
import "./chunk-4ZLYHSN4.mjs";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-XX6WT332.mjs";
|
|
18
18
|
import "./chunk-KWTCTEFT.mjs";
|
|
19
19
|
import "./chunk-UM7LGO2P.mjs";
|
|
20
20
|
import "./chunk-7XKHFRPN.mjs";
|
|
@@ -35,4 +35,4 @@ export {
|
|
|
35
35
|
handleScheduleAction,
|
|
36
36
|
isScheduleTool
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=schedule-tool-
|
|
38
|
+
//# sourceMappingURL=schedule-tool-25C5NMDG.mjs.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
handleScheduleAction,
|
|
5
5
|
init_schedule_tool,
|
|
6
6
|
isScheduleTool
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TAOGXCWT.mjs";
|
|
8
8
|
import "./chunk-YSOIR46P.mjs";
|
|
9
9
|
import "./chunk-PDQTEBOJ.mjs";
|
|
10
10
|
import "./chunk-WZQMTD7W.mjs";
|
|
@@ -35,4 +35,4 @@ export {
|
|
|
35
35
|
handleScheduleAction,
|
|
36
36
|
isScheduleTool
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=schedule-tool-
|
|
38
|
+
//# sourceMappingURL=schedule-tool-7IQI6MID.mjs.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
extractSlackContext,
|
|
7
7
|
init_schedule_tool_handler,
|
|
8
8
|
isScheduleToolCall
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TAOGXCWT.mjs";
|
|
10
10
|
import "./chunk-YSOIR46P.mjs";
|
|
11
11
|
import "./chunk-PDQTEBOJ.mjs";
|
|
12
12
|
import "./chunk-WZQMTD7W.mjs";
|
|
@@ -39,4 +39,4 @@ export {
|
|
|
39
39
|
extractSlackContext,
|
|
40
40
|
isScheduleToolCall
|
|
41
41
|
};
|
|
42
|
-
//# sourceMappingURL=schedule-tool-handler-
|
|
42
|
+
//# sourceMappingURL=schedule-tool-handler-IYBNJLTV.mjs.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
extractSlackContext,
|
|
7
7
|
init_schedule_tool_handler,
|
|
8
8
|
isScheduleToolCall
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LWH6CVLZ.mjs";
|
|
10
10
|
import "./chunk-YSOIR46P.mjs";
|
|
11
11
|
import "./chunk-PDQTEBOJ.mjs";
|
|
12
12
|
import "./chunk-WZQMTD7W.mjs";
|
|
@@ -16,7 +16,7 @@ import "./chunk-B7BVQM5K.mjs";
|
|
|
16
16
|
import "./chunk-XXAEN5KU.mjs";
|
|
17
17
|
import "./chunk-ZNKL6ESZ.mjs";
|
|
18
18
|
import "./chunk-4ZLYHSN4.mjs";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-XX6WT332.mjs";
|
|
20
20
|
import "./chunk-KWTCTEFT.mjs";
|
|
21
21
|
import "./chunk-UM7LGO2P.mjs";
|
|
22
22
|
import "./chunk-7XKHFRPN.mjs";
|
|
@@ -39,4 +39,4 @@ export {
|
|
|
39
39
|
extractSlackContext,
|
|
40
40
|
isScheduleToolCall
|
|
41
41
|
};
|
|
42
|
-
//# sourceMappingURL=schedule-tool-handler-
|
|
42
|
+
//# sourceMappingURL=schedule-tool-handler-VWGTVSB6.mjs.map
|
package/dist/sdk/sdk.js
CHANGED
|
@@ -15349,26 +15349,9 @@ var init_config_loader = __esm({
|
|
|
15349
15349
|
}
|
|
15350
15350
|
if (defaultConfigPath) {
|
|
15351
15351
|
console.error(`\u{1F4E6} Loading bundled default configuration from ${defaultConfigPath}`);
|
|
15352
|
-
const
|
|
15353
|
-
let config =
|
|
15354
|
-
if (!config || typeof config !== "object") {
|
|
15355
|
-
throw new Error("Invalid default configuration");
|
|
15356
|
-
}
|
|
15357
|
-
if (config.include && !config.extends) {
|
|
15358
|
-
const inc = config.include;
|
|
15359
|
-
config.extends = Array.isArray(inc) ? inc : [inc];
|
|
15360
|
-
delete config.include;
|
|
15361
|
-
}
|
|
15352
|
+
const defaultConfigDir = path13.dirname(defaultConfigPath);
|
|
15353
|
+
let config = await this.fetchBundledConfigFile(defaultConfigPath, defaultConfigDir);
|
|
15362
15354
|
config = this.normalizeStepsAndChecks(config);
|
|
15363
|
-
if (config.extends) {
|
|
15364
|
-
const previousBaseDir = this.options.baseDir;
|
|
15365
|
-
try {
|
|
15366
|
-
this.options.baseDir = path13.dirname(defaultConfigPath);
|
|
15367
|
-
return await this.processExtends(config);
|
|
15368
|
-
} finally {
|
|
15369
|
-
this.options.baseDir = previousBaseDir;
|
|
15370
|
-
}
|
|
15371
|
-
}
|
|
15372
15355
|
return config;
|
|
15373
15356
|
}
|
|
15374
15357
|
console.warn("\u26A0\uFE0F Bundled default configuration not found, using minimal defaults");
|
|
@@ -15384,6 +15367,70 @@ var init_config_loader = __esm({
|
|
|
15384
15367
|
}
|
|
15385
15368
|
};
|
|
15386
15369
|
}
|
|
15370
|
+
/**
|
|
15371
|
+
* Load a bundled config and its includes without using project-local path resolution.
|
|
15372
|
+
*
|
|
15373
|
+
* `extends: default` is a built-in source. Its sibling includes are part of the Visor
|
|
15374
|
+
* package/action bundle, so they must resolve inside that bundle rather than inside the
|
|
15375
|
+
* caller's repository root.
|
|
15376
|
+
*/
|
|
15377
|
+
async fetchBundledConfigFile(filePath, bundledRoot, currentDepth = 0, seen = /* @__PURE__ */ new Set()) {
|
|
15378
|
+
if (currentDepth >= (this.options.maxDepth || 10)) {
|
|
15379
|
+
throw new Error(
|
|
15380
|
+
`Maximum bundled default include depth (${this.options.maxDepth}) exceeded. Check for circular dependencies.`
|
|
15381
|
+
);
|
|
15382
|
+
}
|
|
15383
|
+
const resolvedPath = path13.resolve(filePath);
|
|
15384
|
+
this.validateBundledPath(resolvedPath, bundledRoot);
|
|
15385
|
+
if (seen.has(resolvedPath)) {
|
|
15386
|
+
throw new Error(`Circular dependency detected in bundled defaults: ${resolvedPath}`);
|
|
15387
|
+
}
|
|
15388
|
+
seen.add(resolvedPath);
|
|
15389
|
+
try {
|
|
15390
|
+
const content = fs11.readFileSync(resolvedPath, "utf8");
|
|
15391
|
+
const config = yaml3.load(content);
|
|
15392
|
+
if (!config || typeof config !== "object") {
|
|
15393
|
+
throw new Error(`Invalid default configuration: ${resolvedPath}`);
|
|
15394
|
+
}
|
|
15395
|
+
const extendsValue = config.extends || config.include;
|
|
15396
|
+
delete config.extends;
|
|
15397
|
+
delete config.include;
|
|
15398
|
+
this.annotateToolsBaseDir(config, path13.dirname(resolvedPath));
|
|
15399
|
+
if (!extendsValue) {
|
|
15400
|
+
return config;
|
|
15401
|
+
}
|
|
15402
|
+
const { ConfigMerger: ConfigMerger2 } = await Promise.resolve().then(() => (init_config_merger(), config_merger_exports));
|
|
15403
|
+
const merger = new ConfigMerger2();
|
|
15404
|
+
const sources = Array.isArray(extendsValue) ? extendsValue : [extendsValue];
|
|
15405
|
+
let mergedParents = {};
|
|
15406
|
+
for (const source of sources) {
|
|
15407
|
+
if (typeof source !== "string" || this.getSourceType(source) !== "local" /* LOCAL */) {
|
|
15408
|
+
throw new Error(
|
|
15409
|
+
`Bundled default configuration can only include local bundled files: ${String(source)}`
|
|
15410
|
+
);
|
|
15411
|
+
}
|
|
15412
|
+
const parentPath = path13.isAbsolute(source) ? source : path13.resolve(path13.dirname(resolvedPath), source);
|
|
15413
|
+
const parentConfig = await this.fetchBundledConfigFile(
|
|
15414
|
+
parentPath,
|
|
15415
|
+
bundledRoot,
|
|
15416
|
+
currentDepth + 1,
|
|
15417
|
+
seen
|
|
15418
|
+
);
|
|
15419
|
+
mergedParents = merger.merge(mergedParents, parentConfig);
|
|
15420
|
+
}
|
|
15421
|
+
return merger.merge(mergedParents, config);
|
|
15422
|
+
} catch (error) {
|
|
15423
|
+
if (error && (error.code === "ENOENT" || error.code === "ENOTDIR")) {
|
|
15424
|
+
throw new Error(`Bundled default configuration file not found: ${resolvedPath}`);
|
|
15425
|
+
}
|
|
15426
|
+
if (error instanceof Error) {
|
|
15427
|
+
throw error;
|
|
15428
|
+
}
|
|
15429
|
+
throw error;
|
|
15430
|
+
} finally {
|
|
15431
|
+
seen.delete(resolvedPath);
|
|
15432
|
+
}
|
|
15433
|
+
}
|
|
15387
15434
|
/**
|
|
15388
15435
|
* Process extends directive in a configuration
|
|
15389
15436
|
*/
|
|
@@ -15470,6 +15517,26 @@ var init_config_loader = __esm({
|
|
|
15470
15517
|
}
|
|
15471
15518
|
}
|
|
15472
15519
|
}
|
|
15520
|
+
/**
|
|
15521
|
+
* Validate that bundled default includes stay inside the Visor package/action bundle.
|
|
15522
|
+
*/
|
|
15523
|
+
validateBundledPath(resolvedPath, bundledRoot) {
|
|
15524
|
+
const canonicalize = (p) => {
|
|
15525
|
+
const resolved = path13.resolve(p);
|
|
15526
|
+
try {
|
|
15527
|
+
return path13.normalize(fs11.realpathSync.native(resolved));
|
|
15528
|
+
} catch {
|
|
15529
|
+
return path13.normalize(resolved);
|
|
15530
|
+
}
|
|
15531
|
+
};
|
|
15532
|
+
const normalizedPath = canonicalize(resolvedPath);
|
|
15533
|
+
const normalizedRoot = canonicalize(bundledRoot);
|
|
15534
|
+
if (normalizedPath !== normalizedRoot && !normalizedPath.startsWith(`${normalizedRoot}${path13.sep}`)) {
|
|
15535
|
+
throw new Error(
|
|
15536
|
+
`Security error: Bundled default include resolves outside bundled defaults directory: ${bundledRoot}`
|
|
15537
|
+
);
|
|
15538
|
+
}
|
|
15539
|
+
}
|
|
15473
15540
|
/**
|
|
15474
15541
|
* Find package root directory
|
|
15475
15542
|
*/
|
|
@@ -31623,6 +31690,9 @@ ${preview}`);
|
|
|
31623
31690
|
auth: entry.config.auth,
|
|
31624
31691
|
headers: entry.config.headers,
|
|
31625
31692
|
timeout: entry.config.timeout || 3e4,
|
|
31693
|
+
// Preserve transform_js and rate_limit from the original tool config
|
|
31694
|
+
...entry.config.transform_js ? { transform_js: entry.config.transform_js } : {},
|
|
31695
|
+
...entry.config.rate_limit ? { rate_limit: entry.config.rate_limit } : {},
|
|
31626
31696
|
inputSchema: {
|
|
31627
31697
|
type: "object",
|
|
31628
31698
|
properties: {
|