@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.
Files changed (39) hide show
  1. package/dist/cli-main.d.ts.map +1 -1
  2. package/dist/config/config-watcher.d.ts +3 -1
  3. package/dist/config/config-watcher.d.ts.map +1 -1
  4. package/dist/index.js +177 -69
  5. package/dist/providers/ai-check-provider.d.ts.map +1 -1
  6. package/dist/runners/config-reload-runtime.d.ts +13 -0
  7. package/dist/runners/config-reload-runtime.d.ts.map +1 -0
  8. package/dist/sdk/{check-provider-registry-ZZ6N4GDP.mjs → check-provider-registry-7T2AEWLU.mjs} +3 -3
  9. package/dist/sdk/{check-provider-registry-RITJW67U.mjs → check-provider-registry-TQR32QBD.mjs} +2 -2
  10. package/dist/sdk/{chunk-YYFSAAD6.mjs → chunk-LWH6CVLZ.mjs} +12 -9
  11. package/dist/sdk/chunk-LWH6CVLZ.mjs.map +1 -0
  12. package/dist/sdk/{chunk-ZYDRR6PZ.mjs → chunk-TAOGXCWT.mjs} +10 -7
  13. package/dist/sdk/chunk-TAOGXCWT.mjs.map +1 -0
  14. package/dist/sdk/chunk-XX6WT332.mjs +6118 -0
  15. package/dist/sdk/chunk-XX6WT332.mjs.map +1 -0
  16. package/dist/sdk/config-BCYAVJ5S.mjs +16 -0
  17. package/dist/sdk/{schedule-tool-EMNF3FPQ.mjs → schedule-tool-25C5NMDG.mjs} +3 -3
  18. package/dist/sdk/{schedule-tool-ADZ2ON4I.mjs → schedule-tool-7IQI6MID.mjs} +2 -2
  19. package/dist/sdk/{schedule-tool-handler-3R3IC6VA.mjs → schedule-tool-handler-IYBNJLTV.mjs} +2 -2
  20. package/dist/sdk/{schedule-tool-handler-F76ZD2WU.mjs → schedule-tool-handler-VWGTVSB6.mjs} +3 -3
  21. package/dist/sdk/sdk.js +89 -19
  22. package/dist/sdk/sdk.js.map +1 -1
  23. package/dist/sdk/sdk.mjs +2 -2
  24. package/dist/sdk/{workflow-check-provider-TC2G33WF.mjs → workflow-check-provider-FOWDJUO3.mjs} +2 -2
  25. package/dist/sdk/{workflow-check-provider-U4UXZ5YS.mjs → workflow-check-provider-MRP3C2NC.mjs} +3 -3
  26. package/dist/sdk/workflow-check-provider-MRP3C2NC.mjs.map +1 -0
  27. package/dist/utils/config-loader.d.ts +12 -0
  28. package/dist/utils/config-loader.d.ts.map +1 -1
  29. package/package.json +1 -1
  30. package/dist/sdk/chunk-YYFSAAD6.mjs.map +0 -1
  31. package/dist/sdk/chunk-ZYDRR6PZ.mjs.map +0 -1
  32. /package/dist/sdk/{check-provider-registry-RITJW67U.mjs.map → check-provider-registry-7T2AEWLU.mjs.map} +0 -0
  33. /package/dist/sdk/{check-provider-registry-ZZ6N4GDP.mjs.map → check-provider-registry-TQR32QBD.mjs.map} +0 -0
  34. /package/dist/sdk/{schedule-tool-ADZ2ON4I.mjs.map → config-BCYAVJ5S.mjs.map} +0 -0
  35. /package/dist/sdk/{schedule-tool-EMNF3FPQ.mjs.map → schedule-tool-25C5NMDG.mjs.map} +0 -0
  36. /package/dist/sdk/{schedule-tool-handler-3R3IC6VA.mjs.map → schedule-tool-7IQI6MID.mjs.map} +0 -0
  37. /package/dist/sdk/{schedule-tool-handler-F76ZD2WU.mjs.map → schedule-tool-handler-IYBNJLTV.mjs.map} +0 -0
  38. /package/dist/sdk/{workflow-check-provider-TC2G33WF.mjs.map → schedule-tool-handler-VWGTVSB6.mjs.map} +0 -0
  39. /package/dist/sdk/{workflow-check-provider-U4UXZ5YS.mjs.map → workflow-check-provider-FOWDJUO3.mjs.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/cli-main.ts"],"names":[],"mappings":"AA2qCA;;GAEG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAmmD1C"}
1
+ {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/cli-main.ts"],"names":[],"mappings":"AA2qCA;;GAEG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CA+kD1C"}
@@ -14,7 +14,9 @@ export declare class ConfigWatcher {
14
14
  private signalHandler;
15
15
  private lastProcessedMtimes;
16
16
  constructor(configPath: string, reloader: ConfigReloader, debounceMs?: number);
17
- start(): void;
17
+ start(options?: {
18
+ listenForSignals?: boolean;
19
+ }): void;
18
20
  stop(): void;
19
21
  /**
20
22
  * Refresh the set of watched files after a successful reload.
@@ -1 +1 @@
1
- {"version":3,"file":"config-watcher.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/config/config-watcher.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAInD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAwE1F;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAiB;IACjC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAiD;IACjE,OAAO,CAAC,aAAa,CAA8C;IACnE,OAAO,CAAC,aAAa,CAA6B;IAClD,OAAO,CAAC,mBAAmB,CAA6B;gBAE5C,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,CAAC,EAAE,MAAM;IAM7E,KAAK,IAAI,IAAI;IAyBb,IAAI,IAAI,IAAI;IAqBZ;;;OAGG;IACH,OAAO,CAAC,cAAc;IAsBtB,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,SAAS;IAyCjB,OAAO,CAAC,eAAe;IAqCvB;;;;OAIG;IACH,OAAO,CAAC,UAAU;CAYnB"}
1
+ {"version":3,"file":"config-watcher.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/config/config-watcher.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAInD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAwE1F;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAiB;IACjC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAiD;IACjE,OAAO,CAAC,aAAa,CAA8C;IACnE,OAAO,CAAC,aAAa,CAA6B;IAClD,OAAO,CAAC,mBAAmB,CAA6B;gBAE5C,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,CAAC,EAAE,MAAM;IAM7E,KAAK,CAAC,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI;IA0BrD,IAAI,IAAI,IAAI;IAqBZ;;;OAGG;IACH,OAAO,CAAC,cAAc;IAsBtB,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,SAAS;IAyCjB,OAAO,CAAC,eAAe;IAqCvB;;;;OAIG;IACH,OAAO,CAAC,UAAU;CAYnB"}
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- process.env.VISOR_VERSION = '0.1.185';
2
+ process.env.VISOR_VERSION = '0.1.186';
3
3
  process.env.PROBE_VERSION = '0.6.0-rc311';
4
- process.env.VISOR_COMMIT_SHA = 'f9abecd13dcbb0020e419e5dd40b6bd276eee07c';
5
- process.env.VISOR_COMMIT_SHORT = 'f9abecd';
4
+ process.env.VISOR_COMMIT_SHA = '1bef66a97de39c41b4bc6cf02e9dfd63f1ba81f0';
5
+ process.env.VISOR_COMMIT_SHORT = '1bef66a';
6
6
  /******/ (() => { // webpackBootstrap
7
7
  /******/ var __webpack_modules__ = ({
8
8
 
@@ -304334,40 +304334,21 @@ async function main() {
304334
304334
  await host.startAll();
304335
304335
  const names = requestedRunners.join(', ');
304336
304336
  console.log(`✅ Runner(s) started: ${names}. Press Ctrl+C to exit.`);
304337
- // Config watcher (shared, broadcasts to all runners)
304338
- let configWatcher;
304339
- let configWatchStore;
304340
- if (options.watch) {
304341
- if (!options.configPath) {
304342
- console.error('❌ --watch requires --config <path>');
304343
- process.exit(1);
304344
- }
304345
- try {
304346
- const { ConfigSnapshotStore } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(23147)));
304347
- const { ConfigReloader } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(75773)));
304348
- const { ConfigWatcher } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(39995)));
304349
- const watchStore = new ConfigSnapshotStore();
304350
- await watchStore.initialize();
304351
- const reloader = new ConfigReloader({
304352
- configPath: options.configPath,
304353
- configManager,
304354
- snapshotStore: watchStore,
304355
- onSwap: newConfig => {
304356
- config = newConfig;
304357
- host.broadcastConfigUpdate(newConfig);
304358
- logger_1.logger.info('[Watch] Config updated');
304359
- },
304360
- });
304361
- const watcher = new ConfigWatcher(options.configPath, reloader);
304362
- watcher.start();
304363
- configWatcher = watcher;
304364
- configWatchStore = watchStore;
304365
- logger_1.logger.info('Config watching enabled');
304366
- }
304367
- catch (watchErr) {
304368
- logger_1.logger.warn(`Config watch setup failed (runners continue without it): ${watchErr}`);
304369
- }
304337
+ if (options.watch && !options.configPath) {
304338
+ console.error('❌ --watch requires --config <path>');
304339
+ process.exit(1);
304370
304340
  }
304341
+ const { setupRunnerConfigReloadRuntime } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(94822)));
304342
+ const configReloadRuntime = await setupRunnerConfigReloadRuntime({
304343
+ configPath: options.configPath,
304344
+ watch: Boolean(options.watch),
304345
+ configManager,
304346
+ onSwap: newConfig => {
304347
+ config = newConfig;
304348
+ host.broadcastConfigUpdate(newConfig);
304349
+ logger_1.logger.info('[Watch] Config updated');
304350
+ },
304351
+ });
304371
304352
  // Unified graceful shutdown
304372
304353
  let shuttingDown = false;
304373
304354
  const onShutdown = async (sig) => {
@@ -304383,10 +304364,7 @@ async function main() {
304383
304364
  }, 5000);
304384
304365
  forceTimer.unref();
304385
304366
  try {
304386
- if (configWatcher)
304387
- configWatcher.stop();
304388
- if (configWatchStore)
304389
- configWatchStore.shutdown().catch(() => { });
304367
+ await configReloadRuntime.cleanup();
304390
304368
  await host.stopAll();
304391
304369
  if (sharedTaskStore) {
304392
304370
  try {
@@ -304412,10 +304390,7 @@ async function main() {
304412
304390
  const restartManager = new GracefulRestartManager(host, config.graceful_restart);
304413
304391
  // Register cleanup callbacks for resources outside RunnerHost
304414
304392
  restartManager.onCleanup(async () => {
304415
- if (configWatcher)
304416
- configWatcher.stop();
304417
- if (configWatchStore)
304418
- await configWatchStore.shutdown().catch(() => { });
304393
+ await configReloadRuntime.cleanup();
304419
304394
  if (sharedTaskStore)
304420
304395
  await sharedTaskStore.shutdown().catch(() => { });
304421
304396
  });
@@ -308268,7 +308243,8 @@ class ConfigWatcher {
308268
308243
  this.reloader = reloader;
308269
308244
  this.debounceMs = debounceMs ?? DEFAULT_DEBOUNCE_MS;
308270
308245
  }
308271
- start() {
308246
+ start(options) {
308247
+ const listenForSignals = options?.listenForSignals !== false;
308272
308248
  // Remove any previous listeners in case start() is called after stop()
308273
308249
  this.stop();
308274
308250
  // Collect all files to watch: main config + dependencies
@@ -308277,7 +308253,7 @@ class ConfigWatcher {
308277
308253
  this.watchFile(filePath);
308278
308254
  }
308279
308255
  // Listen for SIGUSR2 (non-Windows)
308280
- if (process.platform !== 'win32') {
308256
+ if (listenForSignals && process.platform !== 'win32') {
308281
308257
  this.signalHandler = () => {
308282
308258
  logger_1.logger.info('[ConfigWatcher] Received SIGUSR2, triggering config reload');
308283
308259
  this.safeReload();
@@ -328879,6 +328855,13 @@ class AICheckProvider extends check_provider_interface_1.CheckProvider {
328879
328855
  auth: entry.config.auth,
328880
328856
  headers: entry.config.headers,
328881
328857
  timeout: entry.config.timeout || 30000,
328858
+ // Preserve transform_js and rate_limit from the original tool config
328859
+ ...(entry.config.transform_js
328860
+ ? { transform_js: entry.config.transform_js }
328861
+ : {}),
328862
+ ...(entry.config.rate_limit
328863
+ ? { rate_limit: entry.config.rate_limit }
328864
+ : {}),
328882
328865
  inputSchema: {
328883
328866
  type: 'object',
328884
328867
  properties: {
@@ -341086,6 +341069,73 @@ class PRReviewer {
341086
341069
  exports.PRReviewer = PRReviewer;
341087
341070
 
341088
341071
 
341072
+ /***/ }),
341073
+
341074
+ /***/ 94822:
341075
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
341076
+
341077
+ "use strict";
341078
+
341079
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
341080
+ exports.setupRunnerConfigReloadRuntime = setupRunnerConfigReloadRuntime;
341081
+ const logger_1 = __nccwpck_require__(86999);
341082
+ const config_snapshot_store_1 = __nccwpck_require__(23147);
341083
+ const config_reloader_1 = __nccwpck_require__(75773);
341084
+ const config_watcher_1 = __nccwpck_require__(39995);
341085
+ async function setupRunnerConfigReloadRuntime(options) {
341086
+ let snapshotStore;
341087
+ let watcher;
341088
+ let signalHandler;
341089
+ if (process.platform !== 'win32') {
341090
+ if (options.configPath) {
341091
+ try {
341092
+ snapshotStore = new config_snapshot_store_1.ConfigSnapshotStore();
341093
+ await snapshotStore.initialize();
341094
+ const reloader = new config_reloader_1.ConfigReloader({
341095
+ configPath: options.configPath,
341096
+ configManager: options.configManager,
341097
+ snapshotStore,
341098
+ onSwap: options.onSwap,
341099
+ });
341100
+ signalHandler = () => {
341101
+ logger_1.logger.info('[ConfigReload] Received SIGUSR2, triggering config reload');
341102
+ void reloader.reload();
341103
+ };
341104
+ process.on('SIGUSR2', signalHandler);
341105
+ logger_1.logger.info('[ConfigReload] Send SIGUSR2 to hot-reload configuration');
341106
+ if (options.watch) {
341107
+ watcher = new config_watcher_1.ConfigWatcher(options.configPath, reloader);
341108
+ watcher.start({ listenForSignals: false });
341109
+ logger_1.logger.info('Config watching enabled');
341110
+ }
341111
+ }
341112
+ catch (err) {
341113
+ logger_1.logger.warn(`Config reload setup failed (runners continue without it): ${err}`);
341114
+ }
341115
+ }
341116
+ else {
341117
+ signalHandler = () => {
341118
+ logger_1.logger.warn('[ConfigReload] Ignoring SIGUSR2: no --config path configured');
341119
+ };
341120
+ process.on('SIGUSR2', signalHandler);
341121
+ logger_1.logger.info('[ConfigReload] Send SIGUSR2 to hot-reload configuration (will be ignored without --config)');
341122
+ }
341123
+ }
341124
+ return {
341125
+ async cleanup() {
341126
+ if (watcher)
341127
+ watcher.stop();
341128
+ if (signalHandler && process.platform !== 'win32') {
341129
+ process.removeListener('SIGUSR2', signalHandler);
341130
+ }
341131
+ if (snapshotStore) {
341132
+ await snapshotStore.shutdown().catch(() => { });
341133
+ }
341134
+ },
341135
+ };
341136
+ }
341137
+
341138
+
341089
341139
  /***/ }),
341090
341140
 
341091
341141
  /***/ 12118:
@@ -375304,31 +375354,10 @@ class ConfigLoader {
375304
375354
  if (defaultConfigPath) {
375305
375355
  // Always log to stderr to avoid contaminating formatted output
375306
375356
  console.error(`📦 Loading bundled default configuration from ${defaultConfigPath}`);
375307
- const content = fs.readFileSync(defaultConfigPath, 'utf8');
375308
- let config = yaml.load(content);
375309
- if (!config || typeof config !== 'object') {
375310
- throw new Error('Invalid default configuration');
375311
- }
375312
- // Alias: support 'include' as 'extends' in packaged defaults
375313
- if (config.include && !config.extends) {
375314
- const inc = config.include;
375315
- config.extends = Array.isArray(inc) ? inc : [inc];
375316
- delete config.include;
375317
- }
375357
+ const defaultConfigDir = path.dirname(defaultConfigPath);
375358
+ let config = await this.fetchBundledConfigFile(defaultConfigPath, defaultConfigDir);
375318
375359
  // Normalize 'checks' and 'steps' for backward compatibility
375319
375360
  config = this.normalizeStepsAndChecks(config);
375320
- // Default configs shouldn't have extends, but handle it just in case
375321
- if (config.extends) {
375322
- // Ensure relative paths (e.g., ./code-review.yaml) resolve from the defaults directory
375323
- const previousBaseDir = this.options.baseDir;
375324
- try {
375325
- this.options.baseDir = path.dirname(defaultConfigPath);
375326
- return await this.processExtends(config);
375327
- }
375328
- finally {
375329
- this.options.baseDir = previousBaseDir;
375330
- }
375331
- }
375332
375361
  return config;
375333
375362
  }
375334
375363
  // Return minimal default if bundled config not found
@@ -375345,6 +375374,65 @@ class ConfigLoader {
375345
375374
  },
375346
375375
  };
375347
375376
  }
375377
+ /**
375378
+ * Load a bundled config and its includes without using project-local path resolution.
375379
+ *
375380
+ * `extends: default` is a built-in source. Its sibling includes are part of the Visor
375381
+ * package/action bundle, so they must resolve inside that bundle rather than inside the
375382
+ * caller's repository root.
375383
+ */
375384
+ async fetchBundledConfigFile(filePath, bundledRoot, currentDepth = 0, seen = new Set()) {
375385
+ if (currentDepth >= (this.options.maxDepth || 10)) {
375386
+ throw new Error(`Maximum bundled default include depth (${this.options.maxDepth}) exceeded. Check for circular dependencies.`);
375387
+ }
375388
+ const resolvedPath = path.resolve(filePath);
375389
+ this.validateBundledPath(resolvedPath, bundledRoot);
375390
+ if (seen.has(resolvedPath)) {
375391
+ throw new Error(`Circular dependency detected in bundled defaults: ${resolvedPath}`);
375392
+ }
375393
+ seen.add(resolvedPath);
375394
+ try {
375395
+ const content = fs.readFileSync(resolvedPath, 'utf8');
375396
+ const config = yaml.load(content);
375397
+ if (!config || typeof config !== 'object') {
375398
+ throw new Error(`Invalid default configuration: ${resolvedPath}`);
375399
+ }
375400
+ const extendsValue = config.extends || config.include;
375401
+ delete config.extends;
375402
+ delete config.include;
375403
+ this.annotateToolsBaseDir(config, path.dirname(resolvedPath));
375404
+ if (!extendsValue) {
375405
+ return config;
375406
+ }
375407
+ const { ConfigMerger } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(20730)));
375408
+ const merger = new ConfigMerger();
375409
+ const sources = Array.isArray(extendsValue) ? extendsValue : [extendsValue];
375410
+ let mergedParents = {};
375411
+ for (const source of sources) {
375412
+ if (typeof source !== 'string' || this.getSourceType(source) !== ConfigSourceType.LOCAL) {
375413
+ throw new Error(`Bundled default configuration can only include local bundled files: ${String(source)}`);
375414
+ }
375415
+ const parentPath = path.isAbsolute(source)
375416
+ ? source
375417
+ : path.resolve(path.dirname(resolvedPath), source);
375418
+ const parentConfig = await this.fetchBundledConfigFile(parentPath, bundledRoot, currentDepth + 1, seen);
375419
+ mergedParents = merger.merge(mergedParents, parentConfig);
375420
+ }
375421
+ return merger.merge(mergedParents, config);
375422
+ }
375423
+ catch (error) {
375424
+ if (error && (error.code === 'ENOENT' || error.code === 'ENOTDIR')) {
375425
+ throw new Error(`Bundled default configuration file not found: ${resolvedPath}`);
375426
+ }
375427
+ if (error instanceof Error) {
375428
+ throw error;
375429
+ }
375430
+ throw error;
375431
+ }
375432
+ finally {
375433
+ seen.delete(resolvedPath);
375434
+ }
375435
+ }
375348
375436
  /**
375349
375437
  * Process extends directive in a configuration
375350
375438
  */
@@ -375447,6 +375535,26 @@ class ConfigLoader {
375447
375535
  }
375448
375536
  }
375449
375537
  }
375538
+ /**
375539
+ * Validate that bundled default includes stay inside the Visor package/action bundle.
375540
+ */
375541
+ validateBundledPath(resolvedPath, bundledRoot) {
375542
+ const canonicalize = (p) => {
375543
+ const resolved = path.resolve(p);
375544
+ try {
375545
+ return path.normalize(fs.realpathSync.native(resolved));
375546
+ }
375547
+ catch {
375548
+ return path.normalize(resolved);
375549
+ }
375550
+ };
375551
+ const normalizedPath = canonicalize(resolvedPath);
375552
+ const normalizedRoot = canonicalize(bundledRoot);
375553
+ if (normalizedPath !== normalizedRoot &&
375554
+ !normalizedPath.startsWith(`${normalizedRoot}${path.sep}`)) {
375555
+ throw new Error(`Security error: Bundled default include resolves outside bundled defaults directory: ${bundledRoot}`);
375556
+ }
375557
+ }
375450
375558
  /**
375451
375559
  * Find package root directory
375452
375560
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ai-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/ai-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA8B5C;;GAEG;AACH,qBAAa,eAAgB,SAAQ,aAAa;IAChD,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,YAAY,CAA0C;IAC9D,OAAO,CAAC,OAAO,CAAwB;;IAQvC,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIxB,8DAA8D;IAC9D,OAAO,CAAC,QAAQ;IAWhB,uFAAuF;IACvF,OAAO,CAAC,sBAAsB;IA4CxB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAkDvD;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAqB1B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAiB7B;;OAEG;YACW,aAAa;IA8B3B;;OAEG;YACW,UAAU;IAsExB;;OAEG;YACW,kBAAkB;IA0ChC;;OAEG;YACW,oBAAoB;IA6QlC;;;OAGG;YACW,YAAY;IA6IpB,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAC/C,WAAW,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GACjE,OAAO,CAAC,aAAa,CAAC;YAiBX,iBAAiB;IAi2C/B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IA0B3B;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAsE7B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IA2G5B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IA8F5B;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAmE9B;;;OAGG;IACH,OAAO,CAAC,YAAY;IAuBpB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAUvB;;;;;OAKG;IACH,MAAM,CAAC,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAWhG,sBAAsB,IAAI,MAAM,EAAE;IA4C5B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAYrC,eAAe,IAAI,MAAM,EAAE;CAQ5B"}
1
+ {"version":3,"file":"ai-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/ai-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA8B5C;;GAEG;AACH,qBAAa,eAAgB,SAAQ,aAAa;IAChD,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,YAAY,CAA0C;IAC9D,OAAO,CAAC,OAAO,CAAwB;;IAQvC,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIxB,8DAA8D;IAC9D,OAAO,CAAC,QAAQ;IAWhB,uFAAuF;IACvF,OAAO,CAAC,sBAAsB;IA4CxB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAkDvD;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAqB1B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAiB7B;;OAEG;YACW,aAAa;IA8B3B;;OAEG;YACW,UAAU;IAsExB;;OAEG;YACW,kBAAkB;IA0ChC;;OAEG;YACW,oBAAoB;IA6QlC;;;OAGG;YACW,YAAY;IA6IpB,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAC/C,WAAW,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GACjE,OAAO,CAAC,aAAa,CAAC;YAiBX,iBAAiB;IAw2C/B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IA0B3B;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAsE7B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IA2G5B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IA8F5B;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAmE9B;;;OAGG;IACH,OAAO,CAAC,YAAY;IAuBpB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAUvB;;;;;OAKG;IACH,MAAM,CAAC,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAWhG,sBAAsB,IAAI,MAAM,EAAE;IA4C5B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAYrC,eAAe,IAAI,MAAM,EAAE;CAQ5B"}
@@ -0,0 +1,13 @@
1
+ import { ConfigManager } from '../config';
2
+ import type { VisorConfig } from '../types/config';
3
+ export interface RunnerConfigReloadRuntimeOptions {
4
+ configPath?: string;
5
+ watch: boolean;
6
+ configManager: ConfigManager;
7
+ onSwap: (newConfig: VisorConfig) => void;
8
+ }
9
+ export interface RunnerConfigReloadRuntime {
10
+ cleanup(): Promise<void>;
11
+ }
12
+ export declare function setupRunnerConfigReloadRuntime(options: RunnerConfigReloadRuntimeOptions): Promise<RunnerConfigReloadRuntime>;
13
+ //# sourceMappingURL=config-reload-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-reload-runtime.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/runners/config-reload-runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAKnD,MAAM,WAAW,gCAAgC;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,aAAa,CAAC;IAC7B,MAAM,EAAE,CAAC,SAAS,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAED,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,yBAAyB,CAAC,CAuDpC"}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CheckProviderRegistry,
3
3
  init_check_provider_registry
4
- } from "./chunk-ZYDRR6PZ.mjs";
4
+ } from "./chunk-LWH6CVLZ.mjs";
5
5
  import "./chunk-YSOIR46P.mjs";
6
6
  import "./chunk-PDQTEBOJ.mjs";
7
7
  import "./chunk-WZQMTD7W.mjs";
@@ -11,7 +11,7 @@ import "./chunk-B7BVQM5K.mjs";
11
11
  import "./chunk-XXAEN5KU.mjs";
12
12
  import "./chunk-ZNKL6ESZ.mjs";
13
13
  import "./chunk-4ZLYHSN4.mjs";
14
- import "./chunk-YBXNG75V.mjs";
14
+ import "./chunk-XX6WT332.mjs";
15
15
  import "./chunk-KWTCTEFT.mjs";
16
16
  import "./chunk-UM7LGO2P.mjs";
17
17
  import "./chunk-7XKHFRPN.mjs";
@@ -29,4 +29,4 @@ init_check_provider_registry();
29
29
  export {
30
30
  CheckProviderRegistry
31
31
  };
32
- //# sourceMappingURL=check-provider-registry-ZZ6N4GDP.mjs.map
32
+ //# sourceMappingURL=check-provider-registry-7T2AEWLU.mjs.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CheckProviderRegistry,
3
3
  init_check_provider_registry
4
- } from "./chunk-YYFSAAD6.mjs";
4
+ } from "./chunk-TAOGXCWT.mjs";
5
5
  import "./chunk-YSOIR46P.mjs";
6
6
  import "./chunk-PDQTEBOJ.mjs";
7
7
  import "./chunk-WZQMTD7W.mjs";
@@ -29,4 +29,4 @@ init_check_provider_registry();
29
29
  export {
30
30
  CheckProviderRegistry
31
31
  };
32
- //# sourceMappingURL=check-provider-registry-RITJW67U.mjs.map
32
+ //# sourceMappingURL=check-provider-registry-TQR32QBD.mjs.map
@@ -62,7 +62,7 @@ import {
62
62
  import {
63
63
  config_exports,
64
64
  init_config
65
- } from "./chunk-YBXNG75V.mjs";
65
+ } from "./chunk-XX6WT332.mjs";
66
66
  import {
67
67
  ExecutionJournal,
68
68
  checkLoopBudget,
@@ -4538,7 +4538,7 @@ async function executeWorkflowAsTool(workflowId, args, context2, argsOverrides)
4538
4538
  ...args,
4539
4539
  ...argsOverrides
4540
4540
  };
4541
- const { WorkflowCheckProvider: WorkflowCheckProvider2 } = await import("./workflow-check-provider-U4UXZ5YS.mjs");
4541
+ const { WorkflowCheckProvider: WorkflowCheckProvider2 } = await import("./workflow-check-provider-MRP3C2NC.mjs");
4542
4542
  const provider = new WorkflowCheckProvider2();
4543
4543
  const checkConfig = {
4544
4544
  type: "workflow",
@@ -14624,7 +14624,7 @@ var init_state_machine_execution_engine = __esm({
14624
14624
  try {
14625
14625
  const map = options?.webhookContext?.webhookData;
14626
14626
  if (map) {
14627
- const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-RITJW67U.mjs");
14627
+ const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-7T2AEWLU.mjs");
14628
14628
  const reg = CheckProviderRegistry2.getInstance();
14629
14629
  const p = reg.getProvider("http_input");
14630
14630
  if (p && typeof p.setWebhookContext === "function") p.setWebhookContext(map);
@@ -14737,7 +14737,7 @@ var init_state_machine_execution_engine = __esm({
14737
14737
  logger.info("[StateMachine] Using state machine engine");
14738
14738
  }
14739
14739
  if (!config) {
14740
- const { ConfigManager } = await import("./config-TVU5RWR5.mjs");
14740
+ const { ConfigManager } = await import("./config-BCYAVJ5S.mjs");
14741
14741
  const configManager = new ConfigManager();
14742
14742
  config = await configManager.getDefaultConfig();
14743
14743
  logger.debug("[StateMachine] Using default configuration (no config provided)");
@@ -14747,7 +14747,7 @@ var init_state_machine_execution_engine = __esm({
14747
14747
  tag_filter: tagFilter
14748
14748
  } : config;
14749
14749
  try {
14750
- const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-RITJW67U.mjs");
14750
+ const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-7T2AEWLU.mjs");
14751
14751
  const registry = CheckProviderRegistry2.getInstance();
14752
14752
  registry.setCustomTools(configWithTagFilter.tools || {});
14753
14753
  } catch (error) {
@@ -14811,7 +14811,7 @@ var init_state_machine_execution_engine = __esm({
14811
14811
  try {
14812
14812
  const webhookData = this.executionContext?.webhookContext?.webhookData;
14813
14813
  if (webhookData instanceof Map) {
14814
- const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-3R3IC6VA.mjs");
14814
+ const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-VWGTVSB6.mjs");
14815
14815
  const slackCtx = extractSlackContext2(webhookData);
14816
14816
  if (slackCtx) {
14817
14817
  const payload = Array.from(webhookData.values())[0];
@@ -19865,6 +19865,9 @@ ${preview}`);
19865
19865
  auth: entry.config.auth,
19866
19866
  headers: entry.config.headers,
19867
19867
  timeout: entry.config.timeout || 3e4,
19868
+ // Preserve transform_js and rate_limit from the original tool config
19869
+ ...entry.config.transform_js ? { transform_js: entry.config.transform_js } : {},
19870
+ ...entry.config.rate_limit ? { rate_limit: entry.config.rate_limit } : {},
19868
19871
  inputSchema: {
19869
19872
  type: "object",
19870
19873
  properties: {
@@ -43318,8 +43321,8 @@ function buildBuiltinGlobals(opts) {
43318
43321
  const asyncFunctionNames = /* @__PURE__ */ new Set();
43319
43322
  const scheduleFn = async (args = {}) => {
43320
43323
  try {
43321
- const { handleScheduleAction: handleScheduleAction2, buildScheduleToolContext: buildScheduleToolContext2 } = await import("./schedule-tool-EMNF3FPQ.mjs");
43322
- const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-3R3IC6VA.mjs");
43324
+ const { handleScheduleAction: handleScheduleAction2, buildScheduleToolContext: buildScheduleToolContext2 } = await import("./schedule-tool-25C5NMDG.mjs");
43325
+ const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-VWGTVSB6.mjs");
43323
43326
  const parentCtx = opts.sessionInfo?._parentContext;
43324
43327
  const webhookData = parentCtx?.prInfo?.eventContext?.webhookData;
43325
43328
  const webhookEventType = parentCtx?.webhookContext?.eventType || parentCtx?.prInfo?.eventContext?.eventType;
@@ -47058,4 +47061,4 @@ undici/lib/fetch/body.js:
47058
47061
  undici/lib/websocket/frame.js:
47059
47062
  (*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
47060
47063
  */
47061
- //# sourceMappingURL=chunk-YYFSAAD6.mjs.map
47064
+ //# sourceMappingURL=chunk-LWH6CVLZ.mjs.map