@probelabs/visor 0.1.146 → 0.1.147

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 (91) hide show
  1. package/dist/ai-review-service.d.ts.map +1 -1
  2. package/dist/cli-main.d.ts.map +1 -1
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/github-auth.d.ts +40 -0
  5. package/dist/github-auth.d.ts.map +1 -1
  6. package/dist/index.js +719 -329
  7. package/dist/output/traces/{run-2026-02-26T07-50-40-741Z.ndjson → run-2026-02-27T11-27-22-261Z.ndjson} +84 -84
  8. package/dist/{traces/run-2026-02-26T07-51-32-586Z.ndjson → output/traces/run-2026-02-27T11-28-08-546Z.ndjson} +1090 -1090
  9. package/dist/sandbox/bubblewrap-sandbox.d.ts +2 -1
  10. package/dist/sandbox/bubblewrap-sandbox.d.ts.map +1 -1
  11. package/dist/sandbox/seatbelt-sandbox.d.ts +2 -1
  12. package/dist/sandbox/seatbelt-sandbox.d.ts.map +1 -1
  13. package/dist/scheduler/scheduler.d.ts.map +1 -1
  14. package/dist/sdk/{check-provider-registry-TSAMMJ7Q.mjs → check-provider-registry-CDL5AJSI.mjs} +7 -7
  15. package/dist/sdk/{check-provider-registry-WSFL2SVQ.mjs → check-provider-registry-CTZA3EVE.mjs} +7 -7
  16. package/dist/sdk/{check-provider-registry-HK6M4PDQ.mjs → check-provider-registry-SCPM6DIT.mjs} +7 -7
  17. package/dist/sdk/{chunk-LSCWRTSY.mjs → chunk-2NFKN6CY.mjs} +2 -2
  18. package/dist/sdk/{chunk-OM3WYVFI.mjs → chunk-4F5UVWAN.mjs} +2 -2
  19. package/dist/sdk/{chunk-OM3WYVFI.mjs.map → chunk-4F5UVWAN.mjs.map} +1 -1
  20. package/dist/sdk/{chunk-74YJMONB.mjs → chunk-EWGX7LI7.mjs} +69 -27
  21. package/dist/sdk/chunk-EWGX7LI7.mjs.map +1 -0
  22. package/dist/sdk/{chunk-LVOWWALU.mjs → chunk-FBJ7MC7R.mjs} +3 -3
  23. package/dist/sdk/{chunk-4SYQL5UQ.mjs → chunk-H23T7J6Y.mjs} +69 -27
  24. package/dist/sdk/chunk-H23T7J6Y.mjs.map +1 -0
  25. package/dist/sdk/{chunk-I42ZCVA5.mjs → chunk-JKWLGLDR.mjs} +3 -3
  26. package/dist/sdk/{chunk-E6SMU2Z4.mjs → chunk-R77LN3OE.mjs} +69 -27
  27. package/dist/sdk/chunk-R77LN3OE.mjs.map +1 -0
  28. package/dist/sdk/{chunk-L3XPYQ6I.mjs → chunk-V2QW6ECX.mjs} +2 -2
  29. package/dist/sdk/{chunk-YOKAA4IU.mjs → chunk-XNTBSV6M.mjs} +2 -7
  30. package/dist/sdk/{chunk-YOKAA4IU.mjs.map → chunk-XNTBSV6M.mjs.map} +1 -1
  31. package/dist/sdk/{chunk-Y4DBNDLQ.mjs → chunk-YQZW3D2V.mjs} +3 -3
  32. package/dist/sdk/{chunk-Y4DBNDLQ.mjs.map → chunk-YQZW3D2V.mjs.map} +1 -1
  33. package/dist/sdk/{config-AAB2FL22.mjs → config-G5UU4WXT.mjs} +2 -2
  34. package/dist/sdk/{failure-condition-evaluator-O464EJMD.mjs → failure-condition-evaluator-2B5WY7QN.mjs} +3 -3
  35. package/dist/sdk/{failure-condition-evaluator-SMOVMMES.mjs → failure-condition-evaluator-FHNZL2US.mjs} +3 -3
  36. package/dist/sdk/github-auth-UPBBBOME.mjs +196 -0
  37. package/dist/sdk/github-auth-UPBBBOME.mjs.map +1 -0
  38. package/dist/sdk/{github-frontend-4L5YDHM4.mjs → github-frontend-47EU2HBY.mjs} +3 -3
  39. package/dist/sdk/{github-frontend-MSX6Q2WL.mjs → github-frontend-V3WUHL6E.mjs} +3 -3
  40. package/dist/sdk/{host-5BJ25CUZ.mjs → host-GVR4UGZ3.mjs} +2 -2
  41. package/dist/sdk/{host-GYZ7XCLI.mjs → host-UQUQIYFG.mjs} +2 -2
  42. package/dist/sdk/{routing-CQDKRPTO.mjs → routing-CZ36LVVS.mjs} +4 -4
  43. package/dist/sdk/{routing-RIHVCEIU.mjs → routing-THIWDEYY.mjs} +4 -4
  44. package/dist/sdk/{schedule-tool-handler-4YUM6Z5F.mjs → schedule-tool-handler-GEH62OUM.mjs} +7 -7
  45. package/dist/sdk/{schedule-tool-handler-62K3NGH6.mjs → schedule-tool-handler-KFYNV7HL.mjs} +7 -7
  46. package/dist/sdk/{schedule-tool-handler-4O2VKNG2.mjs → schedule-tool-handler-QUMAF2DJ.mjs} +7 -7
  47. package/dist/sdk/sdk.js +52 -15
  48. package/dist/sdk/sdk.js.map +1 -1
  49. package/dist/sdk/sdk.mjs +6 -6
  50. package/dist/sdk/{trace-helpers-QQSTZGDT.mjs → trace-helpers-EHDZ42HH.mjs} +2 -2
  51. package/dist/sdk/{trace-helpers-AWCFW5KG.mjs → trace-helpers-W7TF5ZKF.mjs} +2 -2
  52. package/dist/sdk/{workflow-check-provider-OM62QYHF.mjs → workflow-check-provider-3K7732MW.mjs} +7 -7
  53. package/dist/sdk/{workflow-check-provider-XC7E5OFH.mjs → workflow-check-provider-5453TW65.mjs} +7 -7
  54. package/dist/sdk/{workflow-check-provider-3N7HDIN6.mjs → workflow-check-provider-HMABCGB5.mjs} +7 -7
  55. package/dist/slack/socket-runner.d.ts.map +1 -1
  56. package/dist/test-runner/core/flow-stage.d.ts +2 -1
  57. package/dist/test-runner/core/flow-stage.d.ts.map +1 -1
  58. package/dist/test-runner/index.d.ts.map +1 -1
  59. package/dist/test-runner/validator.d.ts.map +1 -1
  60. package/dist/traces/{run-2026-02-26T07-50-40-741Z.ndjson → run-2026-02-27T11-27-22-261Z.ndjson} +84 -84
  61. package/dist/{output/traces/run-2026-02-26T07-51-32-586Z.ndjson → traces/run-2026-02-27T11-28-08-546Z.ndjson} +1090 -1090
  62. package/dist/utils/worktree-manager.d.ts +11 -1
  63. package/dist/utils/worktree-manager.d.ts.map +1 -1
  64. package/package.json +2 -2
  65. package/dist/sdk/chunk-4SYQL5UQ.mjs.map +0 -1
  66. package/dist/sdk/chunk-74YJMONB.mjs.map +0 -1
  67. package/dist/sdk/chunk-E6SMU2Z4.mjs.map +0 -1
  68. /package/dist/sdk/{check-provider-registry-HK6M4PDQ.mjs.map → check-provider-registry-CDL5AJSI.mjs.map} +0 -0
  69. /package/dist/sdk/{check-provider-registry-TSAMMJ7Q.mjs.map → check-provider-registry-CTZA3EVE.mjs.map} +0 -0
  70. /package/dist/sdk/{check-provider-registry-WSFL2SVQ.mjs.map → check-provider-registry-SCPM6DIT.mjs.map} +0 -0
  71. /package/dist/sdk/{chunk-L3XPYQ6I.mjs.map → chunk-2NFKN6CY.mjs.map} +0 -0
  72. /package/dist/sdk/{chunk-I42ZCVA5.mjs.map → chunk-FBJ7MC7R.mjs.map} +0 -0
  73. /package/dist/sdk/{chunk-LVOWWALU.mjs.map → chunk-JKWLGLDR.mjs.map} +0 -0
  74. /package/dist/sdk/{chunk-LSCWRTSY.mjs.map → chunk-V2QW6ECX.mjs.map} +0 -0
  75. /package/dist/sdk/{config-AAB2FL22.mjs.map → config-G5UU4WXT.mjs.map} +0 -0
  76. /package/dist/sdk/{failure-condition-evaluator-O464EJMD.mjs.map → failure-condition-evaluator-2B5WY7QN.mjs.map} +0 -0
  77. /package/dist/sdk/{failure-condition-evaluator-SMOVMMES.mjs.map → failure-condition-evaluator-FHNZL2US.mjs.map} +0 -0
  78. /package/dist/sdk/{github-frontend-4L5YDHM4.mjs.map → github-frontend-47EU2HBY.mjs.map} +0 -0
  79. /package/dist/sdk/{github-frontend-MSX6Q2WL.mjs.map → github-frontend-V3WUHL6E.mjs.map} +0 -0
  80. /package/dist/sdk/{host-5BJ25CUZ.mjs.map → host-GVR4UGZ3.mjs.map} +0 -0
  81. /package/dist/sdk/{host-GYZ7XCLI.mjs.map → host-UQUQIYFG.mjs.map} +0 -0
  82. /package/dist/sdk/{routing-CQDKRPTO.mjs.map → routing-CZ36LVVS.mjs.map} +0 -0
  83. /package/dist/sdk/{routing-RIHVCEIU.mjs.map → routing-THIWDEYY.mjs.map} +0 -0
  84. /package/dist/sdk/{schedule-tool-handler-4O2VKNG2.mjs.map → schedule-tool-handler-GEH62OUM.mjs.map} +0 -0
  85. /package/dist/sdk/{schedule-tool-handler-4YUM6Z5F.mjs.map → schedule-tool-handler-KFYNV7HL.mjs.map} +0 -0
  86. /package/dist/sdk/{schedule-tool-handler-62K3NGH6.mjs.map → schedule-tool-handler-QUMAF2DJ.mjs.map} +0 -0
  87. /package/dist/sdk/{trace-helpers-AWCFW5KG.mjs.map → trace-helpers-EHDZ42HH.mjs.map} +0 -0
  88. /package/dist/sdk/{trace-helpers-QQSTZGDT.mjs.map → trace-helpers-W7TF5ZKF.mjs.map} +0 -0
  89. /package/dist/sdk/{workflow-check-provider-3N7HDIN6.mjs.map → workflow-check-provider-3K7732MW.mjs.map} +0 -0
  90. /package/dist/sdk/{workflow-check-provider-OM62QYHF.mjs.map → workflow-check-provider-5453TW65.mjs.map} +0 -0
  91. /package/dist/sdk/{workflow-check-provider-XC7E5OFH.mjs.map → workflow-check-provider-HMABCGB5.mjs.map} +0 -0
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- process.env.VISOR_VERSION = '0.1.146';
3
- process.env.PROBE_VERSION = '0.6.0-rc260';
4
- process.env.VISOR_COMMIT_SHA = 'd2ab098a3650d6798ede2306a8ed4b5fdb6214fb';
5
- process.env.VISOR_COMMIT_SHORT = 'd2ab098';
2
+ process.env.VISOR_VERSION = '0.1.147';
3
+ process.env.PROBE_VERSION = '0.6.0-rc262';
4
+ process.env.VISOR_COMMIT_SHA = '986bd9df126dcf4c0564d12701994e4bad407897';
5
+ process.env.VISOR_COMMIT_SHORT = '986bd9d';
6
6
  /******/ (() => { // webpackBootstrap
7
7
  /******/ var __webpack_modules__ = ({
8
8
 
@@ -160001,6 +160001,7 @@ ${'='.repeat(60)}
160001
160001
  if (!systemPrompt && schema !== 'code-review') {
160002
160002
  systemPrompt = 'You are general assistant, follow user instructions.';
160003
160003
  }
160004
+ log(`🔧 AIReviewService config: allowEdit=${this.config.allowEdit}, allowBash=${this.config.allowBash}, promptType=${this.config.promptType}`);
160004
160005
  const options = {
160005
160006
  sessionId: sessionId,
160006
160007
  // Prefer config promptType, then env override, else fallback to code-review when schema is set
@@ -160011,7 +160012,7 @@ ${'='.repeat(60)}
160011
160012
  : schema === 'code-review'
160012
160013
  ? 'code-review-template'
160013
160014
  : undefined,
160014
- allowEdit: false, // We don't want the agent to modify files
160015
+ allowEdit: false, // Default: don't allow file modifications
160015
160016
  debug: this.config.debug || false,
160016
160017
  // Use systemPrompt (native in rc168+) with fallback to customPrompt for backward compat
160017
160018
  systemPrompt: systemPrompt || this.config.systemPrompt || this.config.customPrompt,
@@ -160059,6 +160060,7 @@ ${'='.repeat(60)}
160059
160060
  options.fallback = this.config.fallback;
160060
160061
  }
160061
160062
  // Enable Edit and Create tools if configured
160063
+ // Enable Edit and Create tools if configured
160062
160064
  if (this.config.allowEdit !== undefined) {
160063
160065
  options.allowEdit = this.config.allowEdit;
160064
160066
  }
@@ -160134,6 +160136,7 @@ ${'='.repeat(60)}
160134
160136
  if (this.config.model) {
160135
160137
  options.model = this.config.model;
160136
160138
  }
160139
+ log(`🔧 ProbeAgent options: allowEdit=${options.allowEdit}, enableBash=${options.enableBash}, promptType=${options.promptType}`);
160137
160140
  const agent = new probe_1.ProbeAgent(options);
160138
160141
  // Initialize agent to enable CLI fallback detection (claude-code/codex)
160139
160142
  // This must be called before agent.answer() for auto-fallback to work.
@@ -161380,6 +161383,15 @@ async function handleTestCommand(argv) {
161380
161383
  // Respect --debug flag if present, or VISOR_DEBUG from environment
161381
161384
  const debugFlag = hasFlag('--debug') || process.env.VISOR_DEBUG === 'true';
161382
161385
  (0, logger_1.configureLoggerFromCli)({ output: 'table', debug: debugFlag, verbose: false, quiet: false });
161386
+ // Initialize telemetry for test runs (auto-enabled in --no-mocks mode)
161387
+ const telemetryEnabled = noMocks || process.env.VISOR_TELEMETRY_ENABLED === 'true';
161388
+ if (telemetryEnabled) {
161389
+ await (0, opentelemetry_1.initTelemetry)({
161390
+ enabled: true,
161391
+ sink: process.env.VISOR_TELEMETRY_SINK || 'file',
161392
+ file: { dir: process.env.VISOR_TRACE_DIR },
161393
+ });
161394
+ }
161383
161395
  console.log('🧪 Visor Test Runner');
161384
161396
  try {
161385
161397
  const { discoverAndPrint, validateTestsOnly, VisorTestRunner, discoverSuites, runSuites } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(41585)));
@@ -161658,9 +161670,21 @@ async function handleTestCommand(argv) {
161658
161670
  }
161659
161671
  }
161660
161672
  catch { }
161673
+ if (telemetryEnabled) {
161674
+ try {
161675
+ await (0, opentelemetry_1.shutdownTelemetry)();
161676
+ }
161677
+ catch { }
161678
+ }
161661
161679
  process.exit(failures > 0 ? 1 : 0);
161662
161680
  }
161663
161681
  catch (err) {
161682
+ if (telemetryEnabled) {
161683
+ try {
161684
+ await (0, opentelemetry_1.shutdownTelemetry)();
161685
+ }
161686
+ catch { }
161687
+ }
161664
161688
  console.error('❌ test: ' + (err instanceof Error ? err.message : String(err)));
161665
161689
  process.exit(1);
161666
161690
  }
@@ -161905,6 +161929,11 @@ async function main() {
161905
161929
  if (authResult) {
161906
161930
  // Inject token + git credentials into process.env for child processes
161907
161931
  (0, github_auth_1.injectGitHubCredentials)(authResult.token);
161932
+ // Mark as fresh so long-running modes (Slack, scheduler) don't regenerate immediately
161933
+ if (authResult.authType === 'github-app') {
161934
+ const { markTokenFresh } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(11347)));
161935
+ markTokenFresh();
161936
+ }
161908
161937
  // Set Octokit on execution context for in-process API calls
161909
161938
  executionContext.octokit = authResult.octokit;
161910
161939
  logger_1.logger.info(`🔑 GitHub auth: ${authResult.authType}`);
@@ -164046,17 +164075,11 @@ class ConfigManager {
164046
164075
  const { WorkflowRegistry } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(82824)));
164047
164076
  const registry = WorkflowRegistry.getInstance();
164048
164077
  // Import workflow files
164078
+ // Use override: true so config reloads pick up changes to workflow definitions
164049
164079
  for (const source of config.imports) {
164050
- const results = await registry.import(source, { basePath, validate: true });
164080
+ const results = await registry.import(source, { basePath, validate: true, override: true });
164051
164081
  for (const result of results) {
164052
164082
  if (!result.valid && result.errors) {
164053
- // Check if error is just "already exists" - skip silently
164054
- // This allows multiple workflows to import the same dependency
164055
- const isAlreadyExists = result.errors.every(e => e.message.includes('already exists'));
164056
- if (isAlreadyExists) {
164057
- logger_1.logger.debug(`Workflow from '${source}' already imported, skipping`);
164058
- continue;
164059
- }
164060
164083
  const errors = result.errors.map(e => ` ${e.path}: ${e.message}`).join('\n');
164061
164084
  throw new Error(`Failed to import workflow from '${source}':\n${errors}`);
164062
164085
  }
@@ -172580,9 +172603,16 @@ exports.createAuthenticatedOctokit = createAuthenticatedOctokit;
172580
172603
  exports.resolveAuthFromEnvironment = resolveAuthFromEnvironment;
172581
172604
  exports.resolvePrivateKey = resolvePrivateKey;
172582
172605
  exports.injectGitHubCredentials = injectGitHubCredentials;
172606
+ exports.markTokenFresh = markTokenFresh;
172607
+ exports.refreshGitHubCredentials = refreshGitHubCredentials;
172608
+ exports.startTokenRefreshTimer = startTokenRefreshTimer;
172609
+ exports.stopTokenRefreshTimer = stopTokenRefreshTimer;
172610
+ exports._testSetCachedToken = _testSetCachedToken;
172611
+ exports._testGetCachedToken = _testGetCachedToken;
172583
172612
  const rest_1 = __nccwpck_require__(47432);
172584
172613
  const fs = __importStar(__nccwpck_require__(79896));
172585
172614
  const path = __importStar(__nccwpck_require__(16928));
172615
+ const logger_1 = __nccwpck_require__(86999);
172586
172616
  /**
172587
172617
  * Create an authenticated Octokit instance.
172588
172618
  * Returns undefined if no credentials are provided (auth is optional in CLI mode).
@@ -172681,6 +172711,11 @@ function resolvePrivateKey(keyOrPath) {
172681
172711
  // Return as-is and let the auth library handle errors
172682
172712
  return keyOrPath;
172683
172713
  }
172714
+ // Track our auth entries position so repeated calls replace instead of stacking.
172715
+ // _authBase: the GIT_CONFIG index where our 2 auth entries start.
172716
+ // _lastWrittenCount: what we last set GIT_CONFIG_COUNT to (detects external changes).
172717
+ let _authBase;
172718
+ let _lastWrittenCount;
172684
172719
  /**
172685
172720
  * Inject GitHub credentials into process.env for child processes.
172686
172721
  *
@@ -172692,22 +172727,148 @@ function resolvePrivateKey(keyOrPath) {
172692
172727
  * - No temp files or global config mutation
172693
172728
  * - Inherited by all child processes automatically
172694
172729
  * - Works regardless of local git configuration
172730
+ *
172731
+ * Safe to call multiple times (e.g. on token refresh) — replaces previous entries.
172695
172732
  */
172696
172733
  function injectGitHubCredentials(token) {
172697
172734
  // Set for gh CLI and general GitHub API usage
172698
172735
  process.env.GITHUB_TOKEN = token;
172699
172736
  process.env.GH_TOKEN = token;
172737
+ const currentCount = parseInt(process.env.GIT_CONFIG_COUNT || '0', 10);
172738
+ // Determine where to write our 2 auth entries:
172739
+ // - First call: append after any pre-existing entries
172740
+ // - Subsequent calls with unchanged count: overwrite at same position
172741
+ // - If count changed externally: someone added entries, append after them
172742
+ let base;
172743
+ if (_authBase === undefined) {
172744
+ base = currentCount;
172745
+ }
172746
+ else if (_lastWrittenCount !== undefined && currentCount !== _lastWrittenCount) {
172747
+ base = currentCount;
172748
+ }
172749
+ else {
172750
+ base = _authBase;
172751
+ }
172752
+ _authBase = base;
172700
172753
  // Configure git HTTPS auth via url.<base>.insteadOf
172701
- // This rewrites all github.com URLs to include the access token
172702
- const existingCount = parseInt(process.env.GIT_CONFIG_COUNT || '0', 10);
172703
172754
  const authUrl = `https://x-access-token:${token}@github.com/`;
172704
172755
  // Rewrite HTTPS URLs
172705
- process.env[`GIT_CONFIG_KEY_${existingCount}`] = `url.${authUrl}.insteadOf`;
172706
- process.env[`GIT_CONFIG_VALUE_${existingCount}`] = 'https://github.com/';
172756
+ process.env[`GIT_CONFIG_KEY_${base}`] = `url.${authUrl}.insteadOf`;
172757
+ process.env[`GIT_CONFIG_VALUE_${base}`] = 'https://github.com/';
172707
172758
  // Rewrite SSH-style URLs (git@github.com:org/repo)
172708
- process.env[`GIT_CONFIG_KEY_${existingCount + 1}`] = `url.${authUrl}.insteadOf`;
172709
- process.env[`GIT_CONFIG_VALUE_${existingCount + 1}`] = 'git@github.com:';
172710
- process.env.GIT_CONFIG_COUNT = String(existingCount + 2);
172759
+ process.env[`GIT_CONFIG_KEY_${base + 1}`] = `url.${authUrl}.insteadOf`;
172760
+ process.env[`GIT_CONFIG_VALUE_${base + 1}`] = 'git@github.com:';
172761
+ const newCount = base + 2;
172762
+ process.env.GIT_CONFIG_COUNT = String(newCount);
172763
+ _lastWrittenCount = newCount;
172764
+ }
172765
+ /**
172766
+ * Mark the current token as freshly generated (for use after initial startup auth).
172767
+ * Prevents the first refreshGitHubCredentials() call from unnecessarily regenerating.
172768
+ */
172769
+ function markTokenFresh() {
172770
+ const token = process.env.GITHUB_TOKEN || process.env.GH_TOKEN;
172771
+ if (token) {
172772
+ _cachedAppToken = { token, generatedAt: Date.now() };
172773
+ }
172774
+ }
172775
+ // Cached token with generation timestamp for expiry checks
172776
+ let _cachedAppToken;
172777
+ // Installation tokens live 1 hour; refresh after 45 minutes.
172778
+ // Using 45 min (not 50) leaves a 15-minute buffer for long-running tasks
172779
+ // that start right before a refresh cycle.
172780
+ const TOKEN_REFRESH_MS = 45 * 60 * 1000;
172781
+ // Background refresh timer
172782
+ let _refreshTimer;
172783
+ // How often the background timer checks (30 minutes)
172784
+ const TIMER_INTERVAL_MS = 30 * 60 * 1000;
172785
+ /**
172786
+ * Refresh GitHub App installation credentials if they are about to expire.
172787
+ *
172788
+ * No-op when:
172789
+ * - No GitHub App credentials are configured (GITHUB_APP_ID + GITHUB_APP_PRIVATE_KEY)
172790
+ * - The current token was generated less than 45 minutes ago
172791
+ *
172792
+ * Call this before each execution in long-running processes (Slack bot, scheduler)
172793
+ * to ensure child processes always have a valid token for git/gh operations.
172794
+ */
172795
+ async function refreshGitHubCredentials() {
172796
+ // Quick check: do we have App credentials?
172797
+ const appId = process.env.GITHUB_APP_ID;
172798
+ const privateKey = process.env.GITHUB_APP_PRIVATE_KEY;
172799
+ if (!appId || !privateKey)
172800
+ return;
172801
+ // Skip if cached token is still fresh
172802
+ const now = Date.now();
172803
+ if (_cachedAppToken && now - _cachedAppToken.generatedAt < TOKEN_REFRESH_MS) {
172804
+ return;
172805
+ }
172806
+ try {
172807
+ const opts = resolveAuthFromEnvironment();
172808
+ const result = await createAuthenticatedOctokit(opts);
172809
+ if (result && result.authType === 'github-app') {
172810
+ injectGitHubCredentials(result.token);
172811
+ _cachedAppToken = { token: result.token, generatedAt: now };
172812
+ logger_1.logger.debug('[github-auth] Refreshed GitHub App installation token');
172813
+ }
172814
+ }
172815
+ catch (err) {
172816
+ const age = _cachedAppToken
172817
+ ? `${Math.round((now - _cachedAppToken.generatedAt) / 60000)}min old`
172818
+ : 'no cached token';
172819
+ logger_1.logger.warn(`[github-auth] Failed to refresh GitHub App token (${age}): ${err instanceof Error ? err.message : String(err)}. ` +
172820
+ 'Child processes may fail with authentication errors.');
172821
+ }
172822
+ }
172823
+ /**
172824
+ * Start a background timer that refreshes GitHub App tokens every 30 minutes.
172825
+ *
172826
+ * This ensures tokens stay fresh even during long-running tasks (e.g., an engineer
172827
+ * task that takes 40+ minutes). Without this, a token generated at startup could
172828
+ * expire mid-execution of a child process.
172829
+ *
172830
+ * The timer is unref'd so it doesn't prevent Node from exiting.
172831
+ * Call stopTokenRefreshTimer() on shutdown.
172832
+ */
172833
+ function startTokenRefreshTimer() {
172834
+ if (_refreshTimer)
172835
+ return; // Already running
172836
+ // Only start if we have App credentials
172837
+ const appId = process.env.GITHUB_APP_ID;
172838
+ const privateKey = process.env.GITHUB_APP_PRIVATE_KEY;
172839
+ if (!appId || !privateKey)
172840
+ return;
172841
+ _refreshTimer = setInterval(() => {
172842
+ refreshGitHubCredentials().catch(err => {
172843
+ logger_1.logger.warn(`[github-auth] Background token refresh failed: ${err instanceof Error ? err.message : String(err)}`);
172844
+ });
172845
+ }, TIMER_INTERVAL_MS);
172846
+ // Don't prevent Node from exiting
172847
+ _refreshTimer.unref();
172848
+ logger_1.logger.debug('[github-auth] Background token refresh timer started (every 30 min)');
172849
+ }
172850
+ /**
172851
+ * Stop the background token refresh timer.
172852
+ */
172853
+ function stopTokenRefreshTimer() {
172854
+ if (_refreshTimer) {
172855
+ clearInterval(_refreshTimer);
172856
+ _refreshTimer = undefined;
172857
+ logger_1.logger.debug('[github-auth] Background token refresh timer stopped');
172858
+ }
172859
+ }
172860
+ /** Visible for testing: override the cached token state. */
172861
+ function _testSetCachedToken(token, generatedAt) {
172862
+ if (token) {
172863
+ _cachedAppToken = { token, generatedAt: generatedAt ?? Date.now() };
172864
+ }
172865
+ else {
172866
+ _cachedAppToken = undefined;
172867
+ }
172868
+ }
172869
+ /** Visible for testing: get the current cached token info. */
172870
+ function _testGetCachedToken() {
172871
+ return _cachedAppToken;
172711
172872
  }
172712
172873
 
172713
172874
 
@@ -190216,10 +190377,12 @@ class BubblewrapSandbox {
190216
190377
  name;
190217
190378
  config;
190218
190379
  repoPath;
190219
- constructor(name, config, repoPath) {
190380
+ visorDistPath;
190381
+ constructor(name, config, repoPath, visorDistPath) {
190220
190382
  this.name = name;
190221
190383
  this.config = config;
190222
190384
  this.repoPath = (0, path_1.resolve)(repoPath);
190385
+ this.visorDistPath = (0, path_1.resolve)(visorDistPath);
190223
190386
  }
190224
190387
  /**
190225
190388
  * Check if bwrap binary is available on the system.
@@ -190308,6 +190471,9 @@ class BubblewrapSandbox {
190308
190471
  else {
190309
190472
  args.push('--bind', this.repoPath, workdir);
190310
190473
  }
190474
+ // Visor dist mount (read-only) — required for child visor process
190475
+ const visorPath = this.config.visor_path || '/opt/visor';
190476
+ args.push('--ro-bind', this.visorDistPath, visorPath);
190311
190477
  // Working directory inside sandbox
190312
190478
  args.push('--chdir', workdir);
190313
190479
  // Namespace isolation
@@ -191229,14 +191395,14 @@ class SandboxManager {
191229
191395
  // Bubblewrap engine: ephemeral per-exec, no persistent container
191230
191396
  if (config.engine === 'bubblewrap') {
191231
191397
  const { BubblewrapSandbox } = __nccwpck_require__(11207);
191232
- const instance = new BubblewrapSandbox(name, config, this.repoPath);
191398
+ const instance = new BubblewrapSandbox(name, config, this.repoPath, this.visorDistPath);
191233
191399
  this.instances.set(name, instance);
191234
191400
  return instance;
191235
191401
  }
191236
191402
  // Seatbelt engine: macOS sandbox-exec, ephemeral per-exec
191237
191403
  if (config.engine === 'seatbelt') {
191238
191404
  const { SeatbeltSandbox } = __nccwpck_require__(46429);
191239
- const instance = new SeatbeltSandbox(name, config, this.repoPath);
191405
+ const instance = new SeatbeltSandbox(name, config, this.repoPath, this.visorDistPath);
191240
191406
  this.instances.set(name, instance);
191241
191407
  return instance;
191242
191408
  }
@@ -191395,12 +191561,14 @@ class SeatbeltSandbox {
191395
191561
  name;
191396
191562
  config;
191397
191563
  repoPath;
191398
- constructor(name, config, repoPath) {
191564
+ visorDistPath;
191565
+ constructor(name, config, repoPath, visorDistPath) {
191399
191566
  this.name = name;
191400
191567
  this.config = config;
191401
191568
  // Resolve symlinks — macOS has /var → /private/var, /tmp → /private/tmp etc.
191402
191569
  // sandbox-exec operates on real paths, so we must resolve before building profiles.
191403
191570
  this.repoPath = (0, fs_1.realpathSync)((0, path_1.resolve)(repoPath));
191571
+ this.visorDistPath = (0, fs_1.realpathSync)((0, path_1.resolve)(visorDistPath));
191404
191572
  }
191405
191573
  /**
191406
191574
  * Check if sandbox-exec binary is available on the system.
@@ -191513,6 +191681,9 @@ class SeatbeltSandbox {
191513
191681
  if (!this.config.read_only) {
191514
191682
  lines.push(`(allow file-write* (subpath "${repoPath}"))`);
191515
191683
  }
191684
+ // Visor dist read access — required for child visor process
191685
+ const visorDistPath = this.escapePath(this.visorDistPath);
191686
+ lines.push(`(allow file-read* (subpath "${visorDistPath}"))`);
191516
191687
  // Network access (unless explicitly disabled)
191517
191688
  if (this.config.network !== false) {
191518
191689
  lines.push('(allow network*)');
@@ -193714,6 +193885,39 @@ function buildScheduleToolContext(sources, availableWorkflows, permissions, outp
193714
193885
 
193715
193886
  "use strict";
193716
193887
 
193888
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
193889
+ if (k2 === undefined) k2 = k;
193890
+ var desc = Object.getOwnPropertyDescriptor(m, k);
193891
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
193892
+ desc = { enumerable: true, get: function() { return m[k]; } };
193893
+ }
193894
+ Object.defineProperty(o, k2, desc);
193895
+ }) : (function(o, m, k, k2) {
193896
+ if (k2 === undefined) k2 = k;
193897
+ o[k2] = m[k];
193898
+ }));
193899
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
193900
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
193901
+ }) : function(o, v) {
193902
+ o["default"] = v;
193903
+ });
193904
+ var __importStar = (this && this.__importStar) || (function () {
193905
+ var ownKeys = function(o) {
193906
+ ownKeys = Object.getOwnPropertyNames || function (o) {
193907
+ var ar = [];
193908
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
193909
+ return ar;
193910
+ };
193911
+ return ownKeys(o);
193912
+ };
193913
+ return function (mod) {
193914
+ if (mod && mod.__esModule) return mod;
193915
+ var result = {};
193916
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
193917
+ __setModuleDefault(result, mod);
193918
+ return result;
193919
+ };
193920
+ })();
193717
193921
  var __importDefault = (this && this.__importDefault) || function (mod) {
193718
193922
  return (mod && mod.__esModule) ? mod : { "default": mod };
193719
193923
  };
@@ -194305,6 +194509,12 @@ class Scheduler {
194305
194509
  const webhookData = new Map();
194306
194510
  const endpoint = '/scheduler/trigger';
194307
194511
  webhookData.set(endpoint, syntheticPayload);
194512
+ // Refresh GitHub App installation token (no-op if not using App auth or still fresh)
194513
+ try {
194514
+ const { refreshGitHubCredentials } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(11347)));
194515
+ await refreshGitHubCredentials();
194516
+ }
194517
+ catch { }
194308
194518
  // Use common preparation helper
194309
194519
  const { engine: runEngine, config: cfgForRun } = this.prepareExecution(schedule);
194310
194520
  // Execute the workflow
@@ -194419,6 +194629,12 @@ Please provide an updated response based on the reminder above. You may referenc
194419
194629
  logger_1.logger.warn(`[Scheduler] Execution preparation failed: ${error instanceof Error ? error.message : error}`);
194420
194630
  }
194421
194631
  }
194632
+ // Refresh GitHub App installation token (no-op if not using App auth or still fresh)
194633
+ try {
194634
+ const { refreshGitHubCredentials } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(11347)));
194635
+ await refreshGitHubCredentials();
194636
+ }
194637
+ catch { }
194422
194638
  // Use common execution helper
194423
194639
  const { engine: runEngine, config: cfgForRun, responseRef, } = this.prepareExecution(schedule, reminderText);
194424
194640
  try {
@@ -197230,6 +197446,12 @@ class SlackSocketRunner {
197230
197446
  catch (e) {
197231
197447
  logger_1.logger.warn(`[SlackSocket] Scheduler init failed: ${e instanceof Error ? e.message : e}`);
197232
197448
  }
197449
+ // Start background GitHub App token refresh timer (no-op if no App credentials)
197450
+ try {
197451
+ const { startTokenRefreshTimer } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(11347)));
197452
+ startTokenRefreshTimer();
197453
+ }
197454
+ catch { }
197233
197455
  const url = await this.openConnection();
197234
197456
  await this.connect(url);
197235
197457
  // Clean up stale workspace directories from previous runs
@@ -197559,6 +197781,13 @@ class SlackSocketRunner {
197559
197781
  mgr.setFirstMessage(ch, rootTs, cleaned);
197560
197782
  }
197561
197783
  catch { }
197784
+ // Refresh GitHub App installation token before each run.
197785
+ // Installation tokens expire after 1 hour; this is a no-op if still fresh.
197786
+ try {
197787
+ const { refreshGitHubCredentials } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(11347)));
197788
+ await refreshGitHubCredentials();
197789
+ }
197790
+ catch { }
197562
197791
  logger_1.logger.info('[SlackSocket] Dispatching engine run for Slack event');
197563
197792
  try {
197564
197793
  // Rate limiting (optional)
@@ -197651,6 +197880,12 @@ class SlackSocketRunner {
197651
197880
  * Stop the socket runner and clean up resources
197652
197881
  */
197653
197882
  async stop() {
197883
+ // Stop background GitHub App token refresh
197884
+ try {
197885
+ const { stopTokenRefreshTimer } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(11347)));
197886
+ stopTokenRefreshTimer();
197887
+ }
197888
+ catch { }
197654
197889
  // Stop the generic scheduler if active
197655
197890
  if (this.genericScheduler) {
197656
197891
  try {
@@ -209831,7 +210066,8 @@ class FlowStage {
209831
210066
  defaultIncludeTags;
209832
210067
  defaultExcludeTags;
209833
210068
  defaultFrontends;
209834
- constructor(flowName, engine, recorder, cfg, prompts, promptCap, mapEventFromFixtureName, computeChecksToRun, printStageHeader, printSelectedChecks, warnUnmockedProviders, defaultIncludeTags, defaultExcludeTags, defaultFrontends) {
210069
+ noMocks;
210070
+ constructor(flowName, engine, recorder, cfg, prompts, promptCap, mapEventFromFixtureName, computeChecksToRun, printStageHeader, printSelectedChecks, warnUnmockedProviders, defaultIncludeTags, defaultExcludeTags, defaultFrontends, noMocks) {
209835
210071
  this.flowName = flowName;
209836
210072
  this.engine = engine;
209837
210073
  this.recorder = recorder;
@@ -209846,6 +210082,7 @@ class FlowStage {
209846
210082
  this.defaultIncludeTags = defaultIncludeTags;
209847
210083
  this.defaultExcludeTags = defaultExcludeTags;
209848
210084
  this.defaultFrontends = defaultFrontends;
210085
+ this.noMocks = noMocks;
209849
210086
  }
209850
210087
  async run(stage, flowCase, strict) {
209851
210088
  const fixtureInput = typeof stage.fixture === 'object' && stage.fixture
@@ -209886,7 +210123,17 @@ class FlowStage {
209886
210123
  this.prompts[k].push(p);
209887
210124
  // prompts are captured for assertions only — no ad-hoc console/file output
209888
210125
  },
209889
- mockForStep: (step) => mockMgr.get(step),
210126
+ mockForStep: (step) => {
210127
+ if (this.noMocks)
210128
+ return undefined;
210129
+ const raw = mockMgr.get(step);
210130
+ // Strip tool_calls from mock value — handled separately for stageHist injection
210131
+ if (raw && typeof raw === 'object' && 'tool_calls' in raw) {
210132
+ const { tool_calls: _unused, ...rest } = raw; // eslint-disable-line @typescript-eslint/no-unused-vars
210133
+ return rest;
210134
+ }
210135
+ return raw;
210136
+ },
209890
210137
  },
209891
210138
  });
209892
210139
  // (debug cleanup) removed stage-debug prints
@@ -210052,6 +210299,26 @@ class FlowStage {
210052
210299
  for (const [k, arr] of Object.entries(outHistory || {})) {
210053
210300
  stageHist[k] = Array.isArray(arr) ? arr : [];
210054
210301
  }
210302
+ // Inject synthetic outputHistory entries for tool_calls declared in mocks.
210303
+ // When a mock (e.g. generate-response) declares tool_calls, the AI never runs
210304
+ // and no workflow tools are invoked. This injects entries so the evaluator
210305
+ // counts them as executed steps, enabling at_least assertions in mock mode.
210306
+ if (!this.noMocks) {
210307
+ for (const [, mockVal] of Object.entries(mergedMocks)) {
210308
+ if (mockVal && typeof mockVal === 'object' && 'tool_calls' in mockVal) {
210309
+ const toolCalls = mockVal.tool_calls;
210310
+ if (Array.isArray(toolCalls)) {
210311
+ for (const tc of toolCalls) {
210312
+ if (tc && typeof tc === 'object' && typeof tc.step === 'string') {
210313
+ if (!stageHist[tc.step])
210314
+ stageHist[tc.step] = [];
210315
+ stageHist[tc.step].push(tc.output !== undefined ? tc.output : {});
210316
+ }
210317
+ }
210318
+ }
210319
+ }
210320
+ }
210321
+ }
210055
210322
  try {
210056
210323
  if (process.env.VISOR_DEBUG === 'true') {
210057
210324
  const parts = Object.entries(stageHist)
@@ -211062,6 +211329,7 @@ exports.runMvp = runMvp;
211062
211329
  exports.validateTestsOnly = validateTestsOnly;
211063
211330
  const fs_1 = __importDefault(__nccwpck_require__(79896));
211064
211331
  const path_1 = __importDefault(__nccwpck_require__(16928));
211332
+ const child_process_1 = __nccwpck_require__(35317);
211065
211333
  const yaml = __importStar(__nccwpck_require__(74281));
211066
211334
  const config_1 = __nccwpck_require__(22973);
211067
211335
  const state_machine_execution_engine_1 = __nccwpck_require__(39004);
@@ -211291,6 +211559,36 @@ async function runSuites(files, options) {
211291
211559
  function isObject(v) {
211292
211560
  return !!v && typeof v === 'object' && !Array.isArray(v);
211293
211561
  }
211562
+ function checkRequirements(requires) {
211563
+ if (!requires)
211564
+ return { met: true };
211565
+ const reqs = Array.isArray(requires) ? requires : [requires];
211566
+ for (const req of reqs) {
211567
+ switch (req.toLowerCase()) {
211568
+ case 'linux':
211569
+ if (process.platform !== 'linux')
211570
+ return { met: false, reason: `requires linux (got ${process.platform})` };
211571
+ break;
211572
+ case 'darwin':
211573
+ if (process.platform !== 'darwin')
211574
+ return { met: false, reason: `requires darwin (got ${process.platform})` };
211575
+ break;
211576
+ case 'windows':
211577
+ if (process.platform !== 'win32')
211578
+ return { met: false, reason: `requires windows (got ${process.platform})` };
211579
+ break;
211580
+ default:
211581
+ // Treat as tool name — check availability via `which`
211582
+ try {
211583
+ (0, child_process_1.execFileSync)('which', [req], { timeout: 5000, stdio: 'ignore' });
211584
+ }
211585
+ catch {
211586
+ return { met: false, reason: `'${req}' not found in PATH` };
211587
+ }
211588
+ }
211589
+ }
211590
+ return { met: true };
211591
+ }
211294
211592
  class VisorTestRunner {
211295
211593
  cwd;
211296
211594
  constructor(cwd = process.cwd()) {
@@ -211807,7 +212105,11 @@ class VisorTestRunner {
211807
212105
  const defaultIncludeTags = parseTags(defaultsAny?.tags);
211808
212106
  const defaultExcludeTags = parseTags(defaultsAny?.exclude_tags);
211809
212107
  // Test overrides: force AI provider to 'mock' when requested (default: mock per RFC)
212108
+ // In --no-mocks mode, skip the mock provider override so real AI providers execute.
211810
212109
  const cfg = JSON.parse(JSON.stringify(config));
212110
+ const noMocksAll = options.noMocks || false;
212111
+ const noMocksForAi = !noMocksAll && options.noMocksFor ? options.noMocksFor.includes('ai') : false;
212112
+ const skipAiMockOverride = noMocksAll || noMocksForAi;
211811
212113
  const allowCtxEnv = String(process.env.VISOR_TEST_ALLOW_CODE_CONTEXT || '').toLowerCase() === 'true';
211812
212114
  const forceNoCtxEnv = String(process.env.VISOR_TEST_FORCE_NO_CODE_CONTEXT || '').toLowerCase() === 'true';
211813
212115
  for (const name of Object.keys(cfg.checks || {})) {
@@ -211821,13 +212123,23 @@ class VisorTestRunner {
211821
212123
  : allowCtxEnv
211822
212124
  ? false
211823
212125
  : prev.skip_code_context;
211824
- chk.ai = {
211825
- ...prev,
211826
- provider: aiProviderDefault,
211827
- ...(skipCtx === undefined ? {} : { skip_code_context: skipCtx }),
211828
- disable_tools: true,
211829
- timeout: Math.min(15000, prev.timeout || 15000),
211830
- };
212126
+ if (skipAiMockOverride) {
212127
+ // --no-mocks or --no-mocks-for ai: keep the original provider/timeout/tools,
212128
+ // only apply code-context overrides if requested.
212129
+ chk.ai = {
212130
+ ...prev,
212131
+ ...(skipCtx === undefined ? {} : { skip_code_context: skipCtx }),
212132
+ };
212133
+ }
212134
+ else {
212135
+ chk.ai = {
212136
+ ...prev,
212137
+ provider: aiProviderDefault,
212138
+ ...(skipCtx === undefined ? {} : { skip_code_context: skipCtx }),
212139
+ disable_tools: true,
212140
+ timeout: Math.min(15000, prev.timeout || 15000),
212141
+ };
212142
+ }
211831
212143
  cfg.checks[name] = chk;
211832
212144
  }
211833
212145
  }
@@ -211847,7 +212159,12 @@ class VisorTestRunner {
211847
212159
  console.log(`Suite: ${__suiteRel}`);
211848
212160
  if (noMocksMode) {
211849
212161
  console.log(this.color('🔴 NO-MOCKS MODE: Running with real providers (no mock injection)', '33'));
211850
- console.log(this.gray(' Step outputs will be captured and printed as suggested mocks\n'));
212162
+ console.log(this.gray(' Step outputs will be captured and printed as suggested mocks'));
212163
+ if (process.env.VISOR_TELEMETRY_ENABLED === 'true') {
212164
+ const traceDir = process.env.VISOR_TRACE_DIR || 'output/traces';
212165
+ console.log(this.gray(` Tracing enabled → ${traceDir}`));
212166
+ }
212167
+ console.log();
211851
212168
  }
211852
212169
  else if (noMocksForTypes && noMocksForTypes.length > 0) {
211853
212170
  console.log(this.color(`🟡 PARTIAL-MOCK MODE: Real providers for: ${noMocksForTypes.join(', ')}`, '33'));
@@ -211865,8 +212182,14 @@ class VisorTestRunner {
211865
212182
  caseResults.push({ name: _case.name, passed: true, /* annotate skip */ errors: [] });
211866
212183
  return { name: _case.name, failed: 0 };
211867
212184
  }
212185
+ const reqResult = checkRequirements(_case.requires);
212186
+ if (!reqResult.met) {
212187
+ console.log(`⏭ SKIP ${_case.name} (${reqResult.reason})`);
212188
+ caseResults.push({ name: _case.name, passed: true, errors: [] });
212189
+ return { name: _case.name, failed: 0 };
212190
+ }
211868
212191
  if (Array.isArray(_case.flow) && _case.flow.length > 0) {
211869
- const flowRes = await this.runFlowCase(_case, cfg, defaultStrict, options.bail || false, defaultPromptCap, stageFilter);
212192
+ const flowRes = await this.runFlowCase(_case, cfg, defaultStrict, options.bail || false, defaultPromptCap, stageFilter, noMocksMode);
211870
212193
  const failed = flowRes.failures;
211871
212194
  caseResults.push({ name: _case.name, passed: failed === 0, stages: flowRes.stages });
211872
212195
  return { name: _case.name, failed };
@@ -212259,7 +212582,7 @@ class VisorTestRunner {
212259
212582
  clearInterval(__keepAlive);
212260
212583
  return { failures, results: caseResults };
212261
212584
  }
212262
- async runFlowCase(flowCase, cfg, defaultStrict, bail, promptCap, stageFilter) {
212585
+ async runFlowCase(flowCase, cfg, defaultStrict, bail, promptCap, stageFilter, noMocks) {
212263
212586
  const suiteDefaults = this.suiteDefaults || {};
212264
212587
  const ghRec = suiteDefaults.github_recorder;
212265
212588
  const ghRecCase = typeof flowCase.github_recorder === 'object' && flowCase.github_recorder
@@ -212319,7 +212642,7 @@ class VisorTestRunner {
212319
212642
  const suiteDefaults = this.suiteDefaults || {};
212320
212643
  const defaultIncludeTags = parseTags(suiteDefaults?.tags);
212321
212644
  const defaultExcludeTags = parseTags(suiteDefaults?.exclude_tags);
212322
- const stageRunner = new flow_stage_1.FlowStage(flowName, engine, recorder, cfg, prompts, promptCap, this.mapEventFromFixtureName.bind(this), this.computeChecksToRun.bind(this), this.printStageHeader.bind(this), this.printSelectedChecks.bind(this), this.warnUnmockedProviders.bind(this), defaultIncludeTags, defaultExcludeTags, (suiteDefaults.frontends || undefined));
212645
+ const stageRunner = new flow_stage_1.FlowStage(flowName, engine, recorder, cfg, prompts, promptCap, this.mapEventFromFixtureName.bind(this), this.computeChecksToRun.bind(this), this.printStageHeader.bind(this), this.printSelectedChecks.bind(this), this.warnUnmockedProviders.bind(this), defaultIncludeTags, defaultExcludeTags, (suiteDefaults.frontends || undefined), noMocks);
212323
212646
  const outcome = await stageRunner.run(stage, flowCase, strict);
212324
212647
  const expect = stage.expect || {};
212325
212648
  if (outcome.stats)
@@ -212973,6 +213296,8 @@ const schema = {
212973
213296
  frontends: { type: 'array' },
212974
213297
  workspace: { type: 'object' },
212975
213298
  scheduler: { type: 'object' },
213299
+ sandboxes: { type: 'object' },
213300
+ sandbox: { type: 'string' },
212976
213301
  // Workflow definition fields (for workflow files with co-located tests)
212977
213302
  id: { type: 'string' },
212978
213303
  name: { type: 'string' },
@@ -213062,6 +213387,9 @@ const schema = {
213062
213387
  name: { type: 'string' },
213063
213388
  description: { type: 'string' },
213064
213389
  skip: { type: 'boolean' },
213390
+ requires: {
213391
+ oneOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
213392
+ },
213065
213393
  strict: { type: 'boolean' },
213066
213394
  ai_include_code_context: { type: 'boolean' },
213067
213395
  tags: {
@@ -213354,6 +213682,7 @@ const knownKeys = new Set([
213354
213682
  'name',
213355
213683
  'description',
213356
213684
  'skip',
213685
+ 'requires',
213357
213686
  'strict',
213358
213687
  'event',
213359
213688
  'fixture',
@@ -221164,7 +221493,7 @@ class WorktreeManager {
221164
221493
  /**
221165
221494
  * Get or create bare repository
221166
221495
  */
221167
- async getOrCreateBareRepo(repository, repoUrl, token, fetchDepth, cloneTimeoutMs) {
221496
+ async getOrCreateBareRepo(repository, repoUrl, _token, fetchDepth, cloneTimeoutMs) {
221168
221497
  const reposDir = this.getReposDir();
221169
221498
  const repoName = repository.replace(/\//g, '-');
221170
221499
  const bareRepoPath = path.join(reposDir, `${repoName}.git`);
@@ -221184,13 +221513,25 @@ class WorktreeManager {
221184
221513
  // Fall through to clone below
221185
221514
  }
221186
221515
  else {
221516
+ // Refresh the remote URL with the current token so that fetch/push
221517
+ // use valid credentials. The bare repo may have been cloned with a
221518
+ // token that has since expired (GitHub App installation tokens live
221519
+ // only 1 hour). Without this, git operations inside worktrees
221520
+ // derived from this bare repo will fail with "Authentication failed".
221521
+ // If the bare repo was cloned with a token embedded in the URL,
221522
+ // reset it to the plain URL so git uses GIT_CONFIG insteadOf rules
221523
+ // for auth (which always have the freshest token).
221524
+ await this.resetBareRepoRemoteUrl(bareRepoPath, repoUrl);
221187
221525
  // Update remote refs
221188
221526
  await this.updateBareRepo(bareRepoPath);
221189
221527
  return bareRepoPath;
221190
221528
  }
221191
221529
  }
221192
- // Clone as bare repository
221193
- const cloneUrl = this.buildAuthenticatedUrl(repoUrl, token);
221530
+ // Clone as bare repository — use the plain URL, not buildAuthenticatedUrl().
221531
+ // Auth is handled by GIT_CONFIG insteadOf rules (set by injectGitHubCredentials),
221532
+ // which keeps the stored origin URL token-free. This prevents stale tokens from
221533
+ // being baked into the bare repo's remote config.
221534
+ const cloneUrl = repoUrl;
221194
221535
  const redactedUrl = this.redactUrl(cloneUrl);
221195
221536
  logger_1.logger.info(`Cloning bare repository: ${redactedUrl}${fetchDepth ? ` (depth: ${fetchDepth})` : ''}`);
221196
221537
  // Build clone command with optional depth
@@ -221289,6 +221630,33 @@ class WorktreeManager {
221289
221630
  return false;
221290
221631
  }
221291
221632
  }
221633
+ /**
221634
+ * Ensure the origin remote URL of a bare repo is a plain URL (no embedded token).
221635
+ *
221636
+ * Older bare repos may have been cloned with a token in the URL
221637
+ * (https://x-access-token:TOKEN@github.com/...). This causes stale-token
221638
+ * failures because GIT_CONFIG insteadOf rules can't rewrite URLs that
221639
+ * already have credentials. Resetting to the plain URL lets insteadOf
221640
+ * handle auth with the freshest token.
221641
+ */
221642
+ async resetBareRepoRemoteUrl(bareRepoPath, plainRepoUrl) {
221643
+ try {
221644
+ const cmd = `git -C ${this.escapeShellArg(bareRepoPath)} remote set-url origin ${this.escapeShellArg(plainRepoUrl)}`;
221645
+ const result = await this.executeGitCommand(cmd, { timeout: 10000 });
221646
+ if (result.exitCode !== 0) {
221647
+ logger_1.logger.warn(`Failed to reset bare repo remote URL: ${result.stderr}. ` +
221648
+ 'Git operations may fail with stale token if the URL has embedded credentials.');
221649
+ }
221650
+ else {
221651
+ logger_1.logger.debug(`Reset bare repo remote URL to plain URL for ${bareRepoPath}`);
221652
+ }
221653
+ }
221654
+ catch (error) {
221655
+ const msg = error instanceof Error ? error.message : String(error);
221656
+ logger_1.logger.warn(`Error resetting bare repo remote URL: ${msg}. ` +
221657
+ 'Git operations may fail with stale token if the URL has embedded credentials.');
221658
+ }
221659
+ }
221292
221660
  /**
221293
221661
  * Create a new worktree for the given repository/ref.
221294
221662
  *
@@ -245474,7 +245842,7 @@ async function getPackageBinDir() {
245474
245842
  }
245475
245843
  async function findPackageRoot() {
245476
245844
  const debug = process.env.DEBUG === "1" || process.env.VERBOSE === "1";
245477
- let currentDir = __dirname;
245845
+ let currentDir = __dirname2;
245478
245846
  const rootDir = import_path.default.parse(currentDir).root;
245479
245847
  if (debug) {
245480
245848
  console.log(`DEBUG: Starting package root search from: ${currentDir}`);
@@ -245548,7 +245916,7 @@ async function canWriteToDirectory(dirPath) {
245548
245916
  return false;
245549
245917
  }
245550
245918
  }
245551
- var import_path, import_os, import_fs_extra, import_url, __filename, __dirname;
245919
+ var import_path, import_os, import_fs_extra, import_url, __filename, __dirname2;
245552
245920
  var init_directory_resolver = __esm({
245553
245921
  "src/directory-resolver.js"() {
245554
245922
  "use strict";
@@ -245557,7 +245925,7 @@ var init_directory_resolver = __esm({
245557
245925
  import_fs_extra = __toESM(__nccwpck_require__(61455), 1);
245558
245926
  import_url = __nccwpck_require__(87016);
245559
245927
  __filename = (0, import_url.fileURLToPath)("file:///");
245560
- __dirname = import_path.default.dirname(__filename);
245928
+ __dirname2 = import_path.default.dirname(__filename);
245561
245929
  }
245562
245930
  });
245563
245931
 
@@ -246180,9 +246548,9 @@ async function saveVersionInfo(version2, binDir) {
246180
246548
  async function getPackageVersion() {
246181
246549
  try {
246182
246550
  const possiblePaths = [
246183
- import_path2.default.resolve(__dirname2, "..", "package.json"),
246551
+ import_path2.default.resolve(__dirname3, "..", "package.json"),
246184
246552
  // When installed from npm: src/../package.json
246185
- import_path2.default.resolve(__dirname2, "..", "..", "package.json")
246553
+ import_path2.default.resolve(__dirname3, "..", "..", "package.json")
246186
246554
  // In development: src/../../package.json
246187
246555
  ];
246188
246556
  for (const packageJsonPath of possiblePaths) {
@@ -246319,7 +246687,7 @@ async function downloadProbeBinary(version2) {
246319
246687
  throw sanitizeError(error2);
246320
246688
  }
246321
246689
  }
246322
- var import_axios, import_fs_extra2, import_path2, import_crypto, import_util, import_child_process, import_tar, import_os2, import_url2, exec, REPO_OWNER, REPO_NAME, BINARY_NAME, __filename2, __dirname2, downloadLocks, LOCK_TIMEOUT_MS, LOCK_POLL_INTERVAL_MS, MAX_LOCK_WAIT_MS;
246690
+ var import_axios, import_fs_extra2, import_path2, import_crypto, import_util, import_child_process, import_tar, import_os2, import_url2, exec, REPO_OWNER, REPO_NAME, BINARY_NAME, __filename2, __dirname3, downloadLocks, LOCK_TIMEOUT_MS, LOCK_POLL_INTERVAL_MS, MAX_LOCK_WAIT_MS;
246323
246691
  var init_downloader = __esm({
246324
246692
  "src/downloader.js"() {
246325
246693
  "use strict";
@@ -246340,7 +246708,7 @@ var init_downloader = __esm({
246340
246708
  REPO_NAME = "probe";
246341
246709
  BINARY_NAME = "probe";
246342
246710
  __filename2 = (0, import_url2.fileURLToPath)("file:///");
246343
- __dirname2 = import_path2.default.dirname(__filename2);
246711
+ __dirname3 = import_path2.default.dirname(__filename2);
246344
246712
  downloadLocks = /* @__PURE__ */ new Map();
246345
246713
  LOCK_TIMEOUT_MS = 5 * 60 * 1e3;
246346
246714
  LOCK_POLL_INTERVAL_MS = 1e3;
@@ -246362,7 +246730,7 @@ async function getBinaryPath(options = {}) {
246362
246730
  }
246363
246731
  const isWindows = process.platform === "win32";
246364
246732
  const binaryName = isWindows ? "probe.exe" : "probe-binary";
246365
- const localPackageBin = import_path3.default.resolve(__dirname3, "..", "bin");
246733
+ const localPackageBin = import_path3.default.resolve(__dirname4, "..", "bin");
246366
246734
  const localBinaryPath = import_path3.default.join(localPackageBin, binaryName);
246367
246735
  if (import_fs_extra3.default.existsSync(localBinaryPath) && !forceDownload) {
246368
246736
  probeBinaryPath = localBinaryPath;
@@ -246411,7 +246779,7 @@ function escapeString(str) {
246411
246779
  return `'${str.replace(/'/g, "'\\''")}'`;
246412
246780
  }
246413
246781
  }
246414
- var import_path3, import_fs_extra3, import_url3, __filename3, __dirname3, probeBinaryPath;
246782
+ var import_path3, import_fs_extra3, import_url3, __filename3, __dirname4, probeBinaryPath;
246415
246783
  var init_utils = __esm({
246416
246784
  "src/utils.js"() {
246417
246785
  "use strict";
@@ -246421,7 +246789,7 @@ var init_utils = __esm({
246421
246789
  init_downloader();
246422
246790
  init_directory_resolver();
246423
246791
  __filename3 = (0, import_url3.fileURLToPath)("file:///");
246424
- __dirname3 = import_path3.default.dirname(__filename3);
246792
+ __dirname4 = import_path3.default.dirname(__filename3);
246425
246793
  probeBinaryPath = "";
246426
246794
  }
246427
246795
  });
@@ -264361,7 +264729,7 @@ var require_package2 = __commonJS({
264361
264729
  module2.exports = {
264362
264730
  name: "@aws-sdk/client-bedrock-runtime",
264363
264731
  description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
264364
- version: "3.998.0",
264732
+ version: "3.999.0",
264365
264733
  scripts: {
264366
264734
  build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
264367
264735
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
@@ -264381,21 +264749,21 @@ var require_package2 = __commonJS({
264381
264749
  dependencies: {
264382
264750
  "@aws-crypto/sha256-browser": "5.2.0",
264383
264751
  "@aws-crypto/sha256-js": "5.2.0",
264384
- "@aws-sdk/core": "^3.973.14",
264385
- "@aws-sdk/credential-provider-node": "^3.972.13",
264386
- "@aws-sdk/eventstream-handler-node": "^3.972.8",
264387
- "@aws-sdk/middleware-eventstream": "^3.972.5",
264388
- "@aws-sdk/middleware-host-header": "^3.972.5",
264389
- "@aws-sdk/middleware-logger": "^3.972.5",
264390
- "@aws-sdk/middleware-recursion-detection": "^3.972.5",
264391
- "@aws-sdk/middleware-user-agent": "^3.972.14",
264392
- "@aws-sdk/middleware-websocket": "^3.972.9",
264393
- "@aws-sdk/region-config-resolver": "^3.972.5",
264394
- "@aws-sdk/token-providers": "3.998.0",
264395
- "@aws-sdk/types": "^3.973.3",
264396
- "@aws-sdk/util-endpoints": "^3.996.2",
264397
- "@aws-sdk/util-user-agent-browser": "^3.972.5",
264398
- "@aws-sdk/util-user-agent-node": "^3.972.13",
264752
+ "@aws-sdk/core": "^3.973.15",
264753
+ "@aws-sdk/credential-provider-node": "^3.972.14",
264754
+ "@aws-sdk/eventstream-handler-node": "^3.972.9",
264755
+ "@aws-sdk/middleware-eventstream": "^3.972.6",
264756
+ "@aws-sdk/middleware-host-header": "^3.972.6",
264757
+ "@aws-sdk/middleware-logger": "^3.972.6",
264758
+ "@aws-sdk/middleware-recursion-detection": "^3.972.6",
264759
+ "@aws-sdk/middleware-user-agent": "^3.972.15",
264760
+ "@aws-sdk/middleware-websocket": "^3.972.10",
264761
+ "@aws-sdk/region-config-resolver": "^3.972.6",
264762
+ "@aws-sdk/token-providers": "3.999.0",
264763
+ "@aws-sdk/types": "^3.973.4",
264764
+ "@aws-sdk/util-endpoints": "^3.996.3",
264765
+ "@aws-sdk/util-user-agent-browser": "^3.972.6",
264766
+ "@aws-sdk/util-user-agent-node": "^3.973.0",
264399
264767
  "@smithy/config-resolver": "^4.4.9",
264400
264768
  "@smithy/core": "^3.23.6",
264401
264769
  "@smithy/eventstream-serde-browser": "^4.2.10",
@@ -264989,7 +265357,7 @@ var require_fromHttp = __commonJS({
264989
265357
  var client_1 = (init_client(), __toCommonJS(client_exports));
264990
265358
  var node_http_handler_1 = require_dist_cjs15();
264991
265359
  var property_provider_1 = require_dist_cjs24();
264992
- var promises_1 = tslib_1.__importDefault(__nccwpck_require__(91943));
265360
+ var promises_1 = tslib_1.__importDefault(__nccwpck_require__(73836));
264993
265361
  var checkUrl_1 = require_checkUrl();
264994
265362
  var requestHelpers_1 = require_requestHelpers();
264995
265363
  var retry_wrapper_1 = require_retry_wrapper();
@@ -265142,7 +265510,7 @@ var init_package = __esm({
265142
265510
  "node_modules/@aws-sdk/nested-clients/package.json"() {
265143
265511
  package_default = {
265144
265512
  name: "@aws-sdk/nested-clients",
265145
- version: "3.996.2",
265513
+ version: "3.996.3",
265146
265514
  description: "Nested clients for AWS SDK packages.",
265147
265515
  main: "./dist-cjs/index.js",
265148
265516
  module: "./dist-es/index.js",
@@ -265171,16 +265539,16 @@ var init_package = __esm({
265171
265539
  dependencies: {
265172
265540
  "@aws-crypto/sha256-browser": "5.2.0",
265173
265541
  "@aws-crypto/sha256-js": "5.2.0",
265174
- "@aws-sdk/core": "^3.973.14",
265175
- "@aws-sdk/middleware-host-header": "^3.972.5",
265176
- "@aws-sdk/middleware-logger": "^3.972.5",
265177
- "@aws-sdk/middleware-recursion-detection": "^3.972.5",
265178
- "@aws-sdk/middleware-user-agent": "^3.972.14",
265179
- "@aws-sdk/region-config-resolver": "^3.972.5",
265180
- "@aws-sdk/types": "^3.973.3",
265181
- "@aws-sdk/util-endpoints": "^3.996.2",
265182
- "@aws-sdk/util-user-agent-browser": "^3.972.5",
265183
- "@aws-sdk/util-user-agent-node": "^3.972.13",
265542
+ "@aws-sdk/core": "^3.973.15",
265543
+ "@aws-sdk/middleware-host-header": "^3.972.6",
265544
+ "@aws-sdk/middleware-logger": "^3.972.6",
265545
+ "@aws-sdk/middleware-recursion-detection": "^3.972.6",
265546
+ "@aws-sdk/middleware-user-agent": "^3.972.15",
265547
+ "@aws-sdk/region-config-resolver": "^3.972.6",
265548
+ "@aws-sdk/types": "^3.973.4",
265549
+ "@aws-sdk/util-endpoints": "^3.996.3",
265550
+ "@aws-sdk/util-user-agent-browser": "^3.972.6",
265551
+ "@aws-sdk/util-user-agent-node": "^3.973.0",
265184
265552
  "@smithy/config-resolver": "^4.4.9",
265185
265553
  "@smithy/core": "^3.23.6",
265186
265554
  "@smithy/fetch-http-handler": "^5.3.11",
@@ -265292,17 +265660,51 @@ var init_package = __esm({
265292
265660
  var require_dist_cjs51 = __commonJS({
265293
265661
  "node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js"(exports2) {
265294
265662
  "use strict";
265295
- var os4 = __nccwpck_require__(70857);
265296
- var process2 = __nccwpck_require__(932);
265663
+ var node_os = __nccwpck_require__(48161);
265664
+ var node_process = __nccwpck_require__(1708);
265665
+ var promises = __nccwpck_require__(73836);
265666
+ var node_path = __nccwpck_require__(76760);
265297
265667
  var middlewareUserAgent = require_dist_cjs29();
265298
265668
  var getRuntimeUserAgentPair = () => {
265299
265669
  const runtimesToCheck = ["deno", "bun", "llrt"];
265300
265670
  for (const runtime of runtimesToCheck) {
265301
- if (process2.versions[runtime]) {
265302
- return [`md/${runtime}`, process2.versions[runtime]];
265671
+ if (node_process.versions[runtime]) {
265672
+ return [`md/${runtime}`, node_process.versions[runtime]];
265673
+ }
265674
+ }
265675
+ return ["md/nodejs", node_process.versions.node];
265676
+ };
265677
+ var getTypeScriptPackageJsonPath = (dirname6 = "") => {
265678
+ let nodeModulesPath;
265679
+ const normalizedPath = node_path.normalize(dirname6);
265680
+ const parts = normalizedPath.split(node_path.sep);
265681
+ const nodeModulesIndex = parts.indexOf("node_modules");
265682
+ if (nodeModulesIndex !== -1) {
265683
+ nodeModulesPath = parts.slice(0, nodeModulesIndex).join(node_path.sep);
265684
+ } else {
265685
+ nodeModulesPath = dirname6;
265686
+ }
265687
+ return node_path.join(nodeModulesPath, "node_modules", "typescript", "package.json");
265688
+ };
265689
+ var tscVersion;
265690
+ var getTypeScriptUserAgentPair = async () => {
265691
+ if (tscVersion === null) {
265692
+ return void 0;
265693
+ } else if (typeof tscVersion === "string") {
265694
+ return ["md/tsc", tscVersion];
265695
+ }
265696
+ try {
265697
+ const packageJson = await promises.readFile(getTypeScriptPackageJsonPath(__dirname), "utf-8");
265698
+ const { version: version2 } = JSON.parse(packageJson);
265699
+ if (typeof version2 !== "string") {
265700
+ tscVersion = null;
265701
+ return void 0;
265303
265702
  }
265703
+ tscVersion = version2;
265704
+ return ["md/tsc", tscVersion];
265705
+ } catch {
265706
+ tscVersion = null;
265304
265707
  }
265305
- return ["md/nodejs", process2.versions.node];
265306
265708
  };
265307
265709
  var crtAvailability = {
265308
265710
  isCrtAvailable: false
@@ -265319,10 +265721,14 @@ var require_dist_cjs51 = __commonJS({
265319
265721
  const sections = [
265320
265722
  ["aws-sdk-js", clientVersion],
265321
265723
  ["ua", "2.1"],
265322
- [`os/${os4.platform()}`, os4.release()],
265724
+ [`os/${node_os.platform()}`, node_os.release()],
265323
265725
  ["lang/js"],
265324
265726
  runtimeUserAgentPair
265325
265727
  ];
265728
+ const typescriptUserAgentPair = await getTypeScriptUserAgentPair();
265729
+ if (typescriptUserAgentPair) {
265730
+ sections.push(typescriptUserAgentPair);
265731
+ }
265326
265732
  const crtAvailable = isCrtAvailable();
265327
265733
  if (crtAvailable) {
265328
265734
  sections.push(crtAvailable);
@@ -265330,8 +265736,8 @@ var require_dist_cjs51 = __commonJS({
265330
265736
  if (serviceId) {
265331
265737
  sections.push([`api/${serviceId}`, clientVersion]);
265332
265738
  }
265333
- if (process2.env.AWS_EXECUTION_ENV) {
265334
- sections.push([`exec-env/${process2.env.AWS_EXECUTION_ENV}`]);
265739
+ if (node_process.env.AWS_EXECUTION_ENV) {
265740
+ sections.push([`exec-env/${node_process.env.AWS_EXECUTION_ENV}`]);
265335
265741
  }
265336
265742
  const appId = await config?.userAgentAppId?.();
265337
265743
  const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
@@ -266405,7 +266811,7 @@ var require_dist_cjs56 = __commonJS({
266405
266811
  var httpAuthSchemes = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
266406
266812
  var propertyProvider = require_dist_cjs24();
266407
266813
  var sharedIniFileLoader = require_dist_cjs42();
266408
- var fs10 = __nccwpck_require__(79896);
266814
+ var node_fs = __nccwpck_require__(73024);
266409
266815
  var fromEnvSigningName = ({ logger: logger2, signingName } = {}) => async () => {
266410
266816
  logger2?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
266411
266817
  if (!signingName) {
@@ -266451,7 +266857,7 @@ var require_dist_cjs56 = __commonJS({
266451
266857
  throw new propertyProvider.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
266452
266858
  }
266453
266859
  };
266454
- var { writeFile: writeFile2 } = fs10.promises;
266860
+ var { writeFile: writeFile2 } = node_fs.promises;
266455
266861
  var writeSSOTokenToFile = (id, ssoToken) => {
266456
266862
  const tokenFilepath = sharedIniFileLoader.getSSOTokenFilepath(id);
266457
266863
  const tokenString = JSON.stringify(ssoToken, null, 2);
@@ -269573,8 +269979,8 @@ var require_dist_cjs59 = __commonJS({
269573
269979
  "use strict";
269574
269980
  var sharedIniFileLoader = require_dist_cjs42();
269575
269981
  var propertyProvider = require_dist_cjs24();
269576
- var child_process = __nccwpck_require__(35317);
269577
- var util2 = __nccwpck_require__(39023);
269982
+ var node_child_process = __nccwpck_require__(31421);
269983
+ var node_util = __nccwpck_require__(57975);
269578
269984
  var client = (init_client(), __toCommonJS(client_exports));
269579
269985
  var getValidatedProcessCredentials = (profileName, data3, profiles) => {
269580
269986
  if (data3.Version !== 1) {
@@ -269610,7 +270016,7 @@ var require_dist_cjs59 = __commonJS({
269610
270016
  if (profiles[profileName]) {
269611
270017
  const credentialProcess = profile["credential_process"];
269612
270018
  if (credentialProcess !== void 0) {
269613
- const execPromise = util2.promisify(sharedIniFileLoader.externalDataInterceptor?.getTokenRecord?.().exec ?? child_process.exec);
270019
+ const execPromise = node_util.promisify(sharedIniFileLoader.externalDataInterceptor?.getTokenRecord?.().exec ?? node_child_process.exec);
269614
270020
  try {
269615
270021
  const { stdout } = await execPromise(credentialProcess);
269616
270022
  let data3;
@@ -269724,7 +270130,7 @@ var require_fromTokenFile = __commonJS({
269724
270130
  var client_1 = (init_client(), __toCommonJS(client_exports));
269725
270131
  var property_provider_1 = require_dist_cjs24();
269726
270132
  var shared_ini_file_loader_1 = require_dist_cjs42();
269727
- var fs_1 = __nccwpck_require__(79896);
270133
+ var node_fs_1 = __nccwpck_require__(73024);
269728
270134
  var fromWebToken_1 = require_fromWebToken();
269729
270135
  var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
269730
270136
  var ENV_ROLE_ARN = "AWS_ROLE_ARN";
@@ -269741,7 +270147,7 @@ var require_fromTokenFile = __commonJS({
269741
270147
  }
269742
270148
  const credentials = await (0, fromWebToken_1.fromWebToken)({
269743
270149
  ...init,
269744
- webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
270150
+ webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? (0, node_fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
269745
270151
  roleArn,
269746
270152
  roleSessionName
269747
270153
  })(awsIdentityProperties);
@@ -282616,13 +283022,13 @@ Capabilities:
282616
283022
  });
282617
283023
 
282618
283024
  // src/agent/xmlParsingUtils.js
282619
- function removeThinkingTags(xmlString) {
283025
+ function removeThinkingTags(xmlString, validTools = DEFAULT_VALID_TOOLS) {
282620
283026
  let result = xmlString;
282621
283027
  result = result.replace(/<thinking>[\s\S]*?<\/thinking>/g, "");
282622
283028
  const thinkingIndex = result.indexOf("<thinking>");
282623
283029
  if (thinkingIndex !== -1) {
282624
283030
  const afterThinking = result.substring(thinkingIndex + "<thinking>".length);
282625
- const toolPattern = buildToolTagPattern(DEFAULT_VALID_TOOLS);
283031
+ const toolPattern = buildToolTagPattern(validTools);
282626
283032
  const toolMatch = afterThinking.match(toolPattern);
282627
283033
  if (toolMatch) {
282628
283034
  const toolStart = thinkingIndex + "<thinking>".length + toolMatch.index;
@@ -282721,7 +283127,7 @@ function hasOtherToolTags(xmlString, validTools = []) {
282721
283127
  }
282722
283128
  function processXmlWithThinkingAndRecovery(xmlString, validTools = []) {
282723
283129
  const thinkingContent = extractThinkingContent(xmlString);
282724
- const cleanedXmlString = removeThinkingTags(xmlString);
283130
+ const cleanedXmlString = removeThinkingTags(xmlString, validTools.length > 0 ? validTools : void 0);
282725
283131
  const recoveryResult = checkAttemptCompleteRecovery(cleanedXmlString, validTools);
282726
283132
  if (process.env.DEBUG === "1" && thinkingContent) {
282727
283133
  console.log(`[DEBUG] AI Thinking Process:
@@ -283671,31 +284077,33 @@ var init_fileTracker = __esm({
283671
284077
  }
283672
284078
  });
283673
284079
 
283674
- // node_modules/balanced-match/dist/esm/index.js
283675
- var balanced, maybeMatch, range2;
283676
- var init_esm = __esm({
283677
- "node_modules/balanced-match/dist/esm/index.js"() {
283678
- balanced = (a5, b5, str) => {
283679
- const ma = a5 instanceof RegExp ? maybeMatch(a5, str) : a5;
283680
- const mb = b5 instanceof RegExp ? maybeMatch(b5, str) : b5;
283681
- const r5 = ma !== null && mb != null && range2(ma, mb, str);
284080
+ // node_modules/balanced-match/index.js
284081
+ var require_balanced_match = __commonJS({
284082
+ "node_modules/balanced-match/index.js"(exports2, module2) {
284083
+ "use strict";
284084
+ module2.exports = balanced;
284085
+ function balanced(a5, b5, str) {
284086
+ if (a5 instanceof RegExp) a5 = maybeMatch(a5, str);
284087
+ if (b5 instanceof RegExp) b5 = maybeMatch(b5, str);
284088
+ var r5 = range2(a5, b5, str);
283682
284089
  return r5 && {
283683
284090
  start: r5[0],
283684
284091
  end: r5[1],
283685
284092
  pre: str.slice(0, r5[0]),
283686
- body: str.slice(r5[0] + ma.length, r5[1]),
283687
- post: str.slice(r5[1] + mb.length)
284093
+ body: str.slice(r5[0] + a5.length, r5[1]),
284094
+ post: str.slice(r5[1] + b5.length)
283688
284095
  };
283689
- };
283690
- maybeMatch = (reg, str) => {
283691
- const m5 = str.match(reg);
284096
+ }
284097
+ function maybeMatch(reg, str) {
284098
+ var m5 = str.match(reg);
283692
284099
  return m5 ? m5[0] : null;
283693
- };
283694
- range2 = (a5, b5, str) => {
283695
- let begs, beg, left, right = void 0, result;
283696
- let ai = str.indexOf(a5);
283697
- let bi = str.indexOf(b5, ai + 1);
283698
- let i5 = ai;
284100
+ }
284101
+ balanced.range = range2;
284102
+ function range2(a5, b5, str) {
284103
+ var begs, beg, left, right, result;
284104
+ var ai = str.indexOf(a5);
284105
+ var bi = str.indexOf(b5, ai + 1);
284106
+ var i5 = ai;
283699
284107
  if (ai >= 0 && bi > 0) {
283700
284108
  if (a5 === b5) {
283701
284109
  return [ai, bi];
@@ -283703,16 +284111,14 @@ var init_esm = __esm({
283703
284111
  begs = [];
283704
284112
  left = str.length;
283705
284113
  while (i5 >= 0 && !result) {
283706
- if (i5 === ai) {
284114
+ if (i5 == ai) {
283707
284115
  begs.push(i5);
283708
284116
  ai = str.indexOf(a5, i5 + 1);
283709
- } else if (begs.length === 1) {
283710
- const r5 = begs.pop();
283711
- if (r5 !== void 0)
283712
- result = [r5, bi];
284117
+ } else if (begs.length == 1) {
284118
+ result = [begs.pop(), bi];
283713
284119
  } else {
283714
284120
  beg = begs.pop();
283715
- if (beg !== void 0 && beg < left) {
284121
+ if (beg < left) {
283716
284122
  left = beg;
283717
284123
  right = bi;
283718
284124
  }
@@ -283720,179 +284126,163 @@ var init_esm = __esm({
283720
284126
  }
283721
284127
  i5 = ai < bi && ai >= 0 ? ai : bi;
283722
284128
  }
283723
- if (begs.length && right !== void 0) {
284129
+ if (begs.length) {
283724
284130
  result = [left, right];
283725
284131
  }
283726
284132
  }
283727
284133
  return result;
283728
- };
284134
+ }
283729
284135
  }
283730
284136
  });
283731
284137
 
283732
- // node_modules/brace-expansion/dist/esm/index.js
283733
- function numeric(str) {
283734
- return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
283735
- }
283736
- function escapeBraces(str) {
283737
- return str.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod);
283738
- }
283739
- function unescapeBraces(str) {
283740
- return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
283741
- }
283742
- function parseCommaParts(str) {
283743
- if (!str) {
283744
- return [""];
283745
- }
283746
- const parts = [];
283747
- const m5 = balanced("{", "}", str);
283748
- if (!m5) {
283749
- return str.split(",");
283750
- }
283751
- const { pre, body, post } = m5;
283752
- const p5 = pre.split(",");
283753
- p5[p5.length - 1] += "{" + body + "}";
283754
- const postParts = parseCommaParts(post);
283755
- if (post.length) {
283756
- ;
283757
- p5[p5.length - 1] += postParts.shift();
283758
- p5.push.apply(p5, postParts);
283759
- }
283760
- parts.push.apply(parts, p5);
283761
- return parts;
283762
- }
283763
- function expand(str, options = {}) {
283764
- if (!str) {
283765
- return [];
283766
- }
283767
- const { max = EXPANSION_MAX } = options;
283768
- if (str.slice(0, 2) === "{}") {
283769
- str = "\\{\\}" + str.slice(2);
283770
- }
283771
- return expand_(escapeBraces(str), max, true).map(unescapeBraces);
283772
- }
283773
- function embrace(str) {
283774
- return "{" + str + "}";
283775
- }
283776
- function isPadded(el) {
283777
- return /^-?0\d/.test(el);
283778
- }
283779
- function lte(i5, y2) {
283780
- return i5 <= y2;
283781
- }
283782
- function gte(i5, y2) {
283783
- return i5 >= y2;
283784
- }
283785
- function expand_(str, max, isTop) {
283786
- const expansions = [];
283787
- const m5 = balanced("{", "}", str);
283788
- if (!m5)
283789
- return [str];
283790
- const pre = m5.pre;
283791
- const post = m5.post.length ? expand_(m5.post, max, false) : [""];
283792
- if (/\$$/.test(m5.pre)) {
283793
- for (let k5 = 0; k5 < post.length && k5 < max; k5++) {
283794
- const expansion = pre + "{" + m5.body + "}" + post[k5];
283795
- expansions.push(expansion);
284138
+ // node_modules/brace-expansion/index.js
284139
+ var require_brace_expansion = __commonJS({
284140
+ "node_modules/brace-expansion/index.js"(exports2, module2) {
284141
+ var balanced = require_balanced_match();
284142
+ module2.exports = expandTop;
284143
+ var escSlash = "\0SLASH" + Math.random() + "\0";
284144
+ var escOpen = "\0OPEN" + Math.random() + "\0";
284145
+ var escClose = "\0CLOSE" + Math.random() + "\0";
284146
+ var escComma = "\0COMMA" + Math.random() + "\0";
284147
+ var escPeriod = "\0PERIOD" + Math.random() + "\0";
284148
+ function numeric(str) {
284149
+ return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
284150
+ }
284151
+ function escapeBraces(str) {
284152
+ return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
284153
+ }
284154
+ function unescapeBraces(str) {
284155
+ return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
284156
+ }
284157
+ function parseCommaParts(str) {
284158
+ if (!str)
284159
+ return [""];
284160
+ var parts = [];
284161
+ var m5 = balanced("{", "}", str);
284162
+ if (!m5)
284163
+ return str.split(",");
284164
+ var pre = m5.pre;
284165
+ var body = m5.body;
284166
+ var post = m5.post;
284167
+ var p5 = pre.split(",");
284168
+ p5[p5.length - 1] += "{" + body + "}";
284169
+ var postParts = parseCommaParts(post);
284170
+ if (post.length) {
284171
+ p5[p5.length - 1] += postParts.shift();
284172
+ p5.push.apply(p5, postParts);
284173
+ }
284174
+ parts.push.apply(parts, p5);
284175
+ return parts;
284176
+ }
284177
+ function expandTop(str) {
284178
+ if (!str)
284179
+ return [];
284180
+ if (str.substr(0, 2) === "{}") {
284181
+ str = "\\{\\}" + str.substr(2);
284182
+ }
284183
+ return expand2(escapeBraces(str), true).map(unescapeBraces);
283796
284184
  }
283797
- } else {
283798
- const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m5.body);
283799
- const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m5.body);
283800
- const isSequence = isNumericSequence || isAlphaSequence;
283801
- const isOptions = m5.body.indexOf(",") >= 0;
283802
- if (!isSequence && !isOptions) {
283803
- if (m5.post.match(/,(?!,).*\}/)) {
283804
- str = m5.pre + "{" + m5.body + escClose + m5.post;
283805
- return expand_(str, max, true);
283806
- }
283807
- return [str];
283808
- }
283809
- let n5;
283810
- if (isSequence) {
283811
- n5 = m5.body.split(/\.\./);
283812
- } else {
283813
- n5 = parseCommaParts(m5.body);
283814
- if (n5.length === 1 && n5[0] !== void 0) {
283815
- n5 = expand_(n5[0], max, false).map(embrace);
283816
- if (n5.length === 1) {
283817
- return post.map((p5) => m5.pre + n5[0] + p5);
283818
- }
283819
- }
283820
- }
283821
- let N;
283822
- if (isSequence && n5[0] !== void 0 && n5[1] !== void 0) {
283823
- const x5 = numeric(n5[0]);
283824
- const y2 = numeric(n5[1]);
283825
- const width = Math.max(n5[0].length, n5[1].length);
283826
- let incr = n5.length === 3 && n5[2] !== void 0 ? Math.abs(numeric(n5[2])) : 1;
283827
- let test = lte;
283828
- const reverse = y2 < x5;
283829
- if (reverse) {
283830
- incr *= -1;
283831
- test = gte;
283832
- }
283833
- const pad = n5.some(isPadded);
283834
- N = [];
283835
- for (let i5 = x5; test(i5, y2); i5 += incr) {
283836
- let c5;
283837
- if (isAlphaSequence) {
283838
- c5 = String.fromCharCode(i5);
283839
- if (c5 === "\\") {
283840
- c5 = "";
284185
+ function embrace(str) {
284186
+ return "{" + str + "}";
284187
+ }
284188
+ function isPadded(el) {
284189
+ return /^-?0\d/.test(el);
284190
+ }
284191
+ function lte(i5, y2) {
284192
+ return i5 <= y2;
284193
+ }
284194
+ function gte(i5, y2) {
284195
+ return i5 >= y2;
284196
+ }
284197
+ function expand2(str, isTop) {
284198
+ var expansions = [];
284199
+ var m5 = balanced("{", "}", str);
284200
+ if (!m5) return [str];
284201
+ var pre = m5.pre;
284202
+ var post = m5.post.length ? expand2(m5.post, false) : [""];
284203
+ if (/\$$/.test(m5.pre)) {
284204
+ for (var k5 = 0; k5 < post.length; k5++) {
284205
+ var expansion = pre + "{" + m5.body + "}" + post[k5];
284206
+ expansions.push(expansion);
284207
+ }
284208
+ } else {
284209
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m5.body);
284210
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m5.body);
284211
+ var isSequence = isNumericSequence || isAlphaSequence;
284212
+ var isOptions = m5.body.indexOf(",") >= 0;
284213
+ if (!isSequence && !isOptions) {
284214
+ if (m5.post.match(/,(?!,).*\}/)) {
284215
+ str = m5.pre + "{" + m5.body + escClose + m5.post;
284216
+ return expand2(str);
283841
284217
  }
284218
+ return [str];
284219
+ }
284220
+ var n5;
284221
+ if (isSequence) {
284222
+ n5 = m5.body.split(/\.\./);
283842
284223
  } else {
283843
- c5 = String(i5);
283844
- if (pad) {
283845
- const need = width - c5.length;
283846
- if (need > 0) {
283847
- const z2 = new Array(need + 1).join("0");
283848
- if (i5 < 0) {
283849
- c5 = "-" + z2 + c5.slice(1);
283850
- } else {
283851
- c5 = z2 + c5;
284224
+ n5 = parseCommaParts(m5.body);
284225
+ if (n5.length === 1) {
284226
+ n5 = expand2(n5[0], false).map(embrace);
284227
+ if (n5.length === 1) {
284228
+ return post.map(function(p5) {
284229
+ return m5.pre + n5[0] + p5;
284230
+ });
284231
+ }
284232
+ }
284233
+ }
284234
+ var N;
284235
+ if (isSequence) {
284236
+ var x5 = numeric(n5[0]);
284237
+ var y2 = numeric(n5[1]);
284238
+ var width = Math.max(n5[0].length, n5[1].length);
284239
+ var incr = n5.length == 3 ? Math.abs(numeric(n5[2])) : 1;
284240
+ var test = lte;
284241
+ var reverse = y2 < x5;
284242
+ if (reverse) {
284243
+ incr *= -1;
284244
+ test = gte;
284245
+ }
284246
+ var pad = n5.some(isPadded);
284247
+ N = [];
284248
+ for (var i5 = x5; test(i5, y2); i5 += incr) {
284249
+ var c5;
284250
+ if (isAlphaSequence) {
284251
+ c5 = String.fromCharCode(i5);
284252
+ if (c5 === "\\")
284253
+ c5 = "";
284254
+ } else {
284255
+ c5 = String(i5);
284256
+ if (pad) {
284257
+ var need = width - c5.length;
284258
+ if (need > 0) {
284259
+ var z2 = new Array(need + 1).join("0");
284260
+ if (i5 < 0)
284261
+ c5 = "-" + z2 + c5.slice(1);
284262
+ else
284263
+ c5 = z2 + c5;
284264
+ }
283852
284265
  }
283853
284266
  }
284267
+ N.push(c5);
284268
+ }
284269
+ } else {
284270
+ N = [];
284271
+ for (var j5 = 0; j5 < n5.length; j5++) {
284272
+ N.push.apply(N, expand2(n5[j5], false));
283854
284273
  }
283855
284274
  }
283856
- N.push(c5);
283857
- }
283858
- } else {
283859
- N = [];
283860
- for (let j5 = 0; j5 < n5.length; j5++) {
283861
- N.push.apply(N, expand_(n5[j5], max, false));
283862
- }
283863
- }
283864
- for (let j5 = 0; j5 < N.length; j5++) {
283865
- for (let k5 = 0; k5 < post.length && expansions.length < max; k5++) {
283866
- const expansion = pre + N[j5] + post[k5];
283867
- if (!isTop || isSequence || expansion) {
283868
- expansions.push(expansion);
284275
+ for (var j5 = 0; j5 < N.length; j5++) {
284276
+ for (var k5 = 0; k5 < post.length; k5++) {
284277
+ var expansion = pre + N[j5] + post[k5];
284278
+ if (!isTop || isSequence || expansion)
284279
+ expansions.push(expansion);
284280
+ }
283869
284281
  }
283870
284282
  }
284283
+ return expansions;
283871
284284
  }
283872
284285
  }
283873
- return expansions;
283874
- }
283875
- var escSlash, escOpen, escClose, escComma, escPeriod, escSlashPattern, escOpenPattern, escClosePattern, escCommaPattern, escPeriodPattern, slashPattern, openPattern, closePattern, commaPattern, periodPattern, EXPANSION_MAX;
283876
- var init_esm2 = __esm({
283877
- "node_modules/brace-expansion/dist/esm/index.js"() {
283878
- init_esm();
283879
- escSlash = "\0SLASH" + Math.random() + "\0";
283880
- escOpen = "\0OPEN" + Math.random() + "\0";
283881
- escClose = "\0CLOSE" + Math.random() + "\0";
283882
- escComma = "\0COMMA" + Math.random() + "\0";
283883
- escPeriod = "\0PERIOD" + Math.random() + "\0";
283884
- escSlashPattern = new RegExp(escSlash, "g");
283885
- escOpenPattern = new RegExp(escOpen, "g");
283886
- escClosePattern = new RegExp(escClose, "g");
283887
- escCommaPattern = new RegExp(escComma, "g");
283888
- escPeriodPattern = new RegExp(escPeriod, "g");
283889
- slashPattern = /\\\\/g;
283890
- openPattern = /\\{/g;
283891
- closePattern = /\\}/g;
283892
- commaPattern = /\\,/g;
283893
- periodPattern = /\\./g;
283894
- EXPANSION_MAX = 1e5;
283895
- }
283896
284286
  });
283897
284287
 
283898
284288
  // node_modules/minimatch/dist/esm/assert-valid-pattern.js
@@ -284664,10 +285054,10 @@ var init_escape = __esm({
284664
285054
  });
284665
285055
 
284666
285056
  // node_modules/minimatch/dist/esm/index.js
284667
- var minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path5, sep2, GLOBSTAR, qmark2, star2, twoStarDot, twoStarNoDot, filter, ext, defaults, braceExpand, makeRe, match, globMagic, regExpEscape2, Minimatch;
284668
- var init_esm3 = __esm({
285057
+ var import_brace_expansion, minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path5, sep2, GLOBSTAR, qmark2, star2, twoStarDot, twoStarNoDot, filter, ext, defaults, braceExpand, makeRe, match, globMagic, regExpEscape2, Minimatch;
285058
+ var init_esm = __esm({
284669
285059
  "node_modules/minimatch/dist/esm/index.js"() {
284670
- init_esm2();
285060
+ import_brace_expansion = __toESM(require_brace_expansion(), 1);
284671
285061
  init_assert_valid_pattern();
284672
285062
  init_ast();
284673
285063
  init_escape();
@@ -284790,7 +285180,7 @@ var init_esm3 = __esm({
284790
285180
  if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
284791
285181
  return [pattern];
284792
285182
  }
284793
- return expand(pattern);
285183
+ return (0, import_brace_expansion.default)(pattern);
284794
285184
  };
284795
285185
  minimatch.braceExpand = braceExpand;
284796
285186
  makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
@@ -285466,7 +285856,7 @@ var init_esm3 = __esm({
285466
285856
 
285467
285857
  // node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js
285468
285858
  var perf, warned, PROCESS, emitWarning, AC, AS, shouldWarn, TYPE, isPosInt, getUintArray, ZeroArray, Stack, LRUCache;
285469
- var init_esm4 = __esm({
285859
+ var init_esm2 = __esm({
285470
285860
  "node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js"() {
285471
285861
  perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
285472
285862
  warned = /* @__PURE__ */ new Set();
@@ -286840,7 +287230,7 @@ var init_esm4 = __esm({
286840
287230
 
286841
287231
  // node_modules/minipass/dist/esm/index.js
286842
287232
  var import_node_events, import_node_stream, import_node_string_decoder, proc, isStream, isReadable, isWritable, EOF, MAYBE_EMIT_END, EMITTED_END, EMITTING_END, EMITTED_ERROR, CLOSED, READ, FLUSH, FLUSHCHUNK, ENCODING, DECODER, FLOWING, PAUSED, RESUME, BUFFER, PIPES, BUFFERLENGTH, BUFFERPUSH, BUFFERSHIFT, OBJECTMODE, DESTROYED, ERROR, EMITDATA, EMITEND, EMITEND2, ASYNC, ABORT, ABORTED, SIGNAL, DATALISTENERS, DISCARDED, defer, nodefer, isEndish, isArrayBufferLike, isArrayBufferView, Pipe, PipeProxyErrors, isObjectModeOptions, isEncodingOptions, Minipass;
286843
- var init_esm5 = __esm({
287233
+ var init_esm3 = __esm({
286844
287234
  "node_modules/minipass/dist/esm/index.js"() {
286845
287235
  import_node_events = __nccwpck_require__(78474);
286846
287236
  import_node_stream = __toESM(__nccwpck_require__(57075), 1);
@@ -287727,15 +288117,15 @@ var init_esm5 = __esm({
287727
288117
 
287728
288118
  // node_modules/path-scurry/dist/esm/index.js
287729
288119
  var import_node_path, import_node_url, import_fs6, actualFS, import_promises, realpathSync2, defaultFS, fsFromOption, uncDriveRegexp, uncToDrive, eitherSep, UNKNOWN, IFIFO, IFCHR, IFDIR, IFBLK, IFREG, IFLNK, IFSOCK, IFMT, IFMT_UNKNOWN, READDIR_CALLED, LSTAT_CALLED, ENOTDIR, ENOENT, ENOREADLINK, ENOREALPATH, ENOCHILD, TYPEMASK, entToType, normalizeCache, normalize, normalizeNocaseCache, normalizeNocase, ResolveCache, ChildrenCache, setAsCwd, PathBase, PathWin32, PathPosix, PathScurryBase, PathScurryWin32, PathScurryPosix, PathScurryDarwin, Path, PathScurry;
287730
- var init_esm6 = __esm({
288120
+ var init_esm4 = __esm({
287731
288121
  "node_modules/path-scurry/dist/esm/index.js"() {
287732
- init_esm4();
288122
+ init_esm2();
287733
288123
  import_node_path = __nccwpck_require__(76760);
287734
288124
  import_node_url = __nccwpck_require__(73136);
287735
288125
  import_fs6 = __nccwpck_require__(79896);
287736
288126
  actualFS = __toESM(__nccwpck_require__(73024), 1);
287737
288127
  import_promises = __nccwpck_require__(73836);
287738
- init_esm5();
288128
+ init_esm3();
287739
288129
  realpathSync2 = import_fs6.realpathSync.native;
287740
288130
  defaultFS = {
287741
288131
  lstatSync: import_fs6.lstatSync,
@@ -289465,7 +289855,7 @@ var init_esm6 = __esm({
289465
289855
  var isPatternList, isGlobList, Pattern;
289466
289856
  var init_pattern = __esm({
289467
289857
  "node_modules/glob/dist/esm/pattern.js"() {
289468
- init_esm3();
289858
+ init_esm();
289469
289859
  isPatternList = (pl) => pl.length >= 1;
289470
289860
  isGlobList = (gl) => gl.length >= 1;
289471
289861
  Pattern = class _Pattern {
@@ -289636,7 +290026,7 @@ var init_pattern = __esm({
289636
290026
  var defaultPlatform2, Ignore;
289637
290027
  var init_ignore = __esm({
289638
290028
  "node_modules/glob/dist/esm/ignore.js"() {
289639
- init_esm3();
290029
+ init_esm();
289640
290030
  init_pattern();
289641
290031
  defaultPlatform2 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
289642
290032
  Ignore = class {
@@ -289730,7 +290120,7 @@ var init_ignore = __esm({
289730
290120
  var HasWalkedCache, MatchRecord, SubWalks, Processor;
289731
290121
  var init_processor = __esm({
289732
290122
  "node_modules/glob/dist/esm/processor.js"() {
289733
- init_esm3();
290123
+ init_esm();
289734
290124
  HasWalkedCache = class _HasWalkedCache {
289735
290125
  store;
289736
290126
  constructor(store = /* @__PURE__ */ new Map()) {
@@ -289957,7 +290347,7 @@ var init_processor = __esm({
289957
290347
  var makeIgnore, GlobUtil, GlobWalker, GlobStream;
289958
290348
  var init_walker = __esm({
289959
290349
  "node_modules/glob/dist/esm/walker.js"() {
289960
- init_esm5();
290350
+ init_esm3();
289961
290351
  init_ignore();
289962
290352
  init_processor();
289963
290353
  makeIgnore = (ignore2, opts) => typeof ignore2 === "string" ? new Ignore([ignore2], opts) : Array.isArray(ignore2) ? new Ignore(ignore2, opts) : ignore2;
@@ -290292,9 +290682,9 @@ var init_walker = __esm({
290292
290682
  var import_node_url2, defaultPlatform3, Glob;
290293
290683
  var init_glob = __esm({
290294
290684
  "node_modules/glob/dist/esm/glob.js"() {
290295
- init_esm3();
290685
+ init_esm();
290296
290686
  import_node_url2 = __nccwpck_require__(73136);
290297
- init_esm6();
290687
+ init_esm4();
290298
290688
  init_pattern();
290299
290689
  init_walker();
290300
290690
  defaultPlatform3 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
@@ -290502,7 +290892,7 @@ var init_glob = __esm({
290502
290892
  var hasMagic;
290503
290893
  var init_has_magic = __esm({
290504
290894
  "node_modules/glob/dist/esm/has-magic.js"() {
290505
- init_esm3();
290895
+ init_esm();
290506
290896
  hasMagic = (pattern, options = {}) => {
290507
290897
  if (!Array.isArray(pattern)) {
290508
290898
  pattern = [pattern];
@@ -290536,12 +290926,12 @@ function globIterate(pattern, options = {}) {
290536
290926
  return new Glob(pattern, options).iterate();
290537
290927
  }
290538
290928
  var streamSync, stream, iterateSync, iterate, sync, glob;
290539
- var init_esm7 = __esm({
290929
+ var init_esm5 = __esm({
290540
290930
  "node_modules/glob/dist/esm/index.js"() {
290541
- init_esm3();
290931
+ init_esm();
290542
290932
  init_glob();
290543
290933
  init_has_magic();
290544
- init_esm3();
290934
+ init_esm();
290545
290935
  init_glob();
290546
290936
  init_has_magic();
290547
290937
  init_ignore();
@@ -290690,7 +291080,7 @@ var init_probeTool = __esm({
290690
291080
  import_fs7 = __toESM(__nccwpck_require__(79896), 1);
290691
291081
  import_fs8 = __nccwpck_require__(79896);
290692
291082
  import_path8 = __toESM(__nccwpck_require__(16928), 1);
290693
- init_esm7();
291083
+ init_esm5();
290694
291084
  init_symlink_utils();
290695
291085
  toolCallEmitter = new import_events.EventEmitter();
290696
291086
  activeToolExecutions = /* @__PURE__ */ new Map();
@@ -296101,23 +296491,23 @@ var init_regexp_parser = __esm({
296101
296491
  return ASSERT_NEVER_REACH_HERE();
296102
296492
  }
296103
296493
  quantifier(isBacktracking = false) {
296104
- let range3 = void 0;
296494
+ let range2 = void 0;
296105
296495
  const begin = this.idx;
296106
296496
  switch (this.popChar()) {
296107
296497
  case "*":
296108
- range3 = {
296498
+ range2 = {
296109
296499
  atLeast: 0,
296110
296500
  atMost: Infinity
296111
296501
  };
296112
296502
  break;
296113
296503
  case "+":
296114
- range3 = {
296504
+ range2 = {
296115
296505
  atLeast: 1,
296116
296506
  atMost: Infinity
296117
296507
  };
296118
296508
  break;
296119
296509
  case "?":
296120
- range3 = {
296510
+ range2 = {
296121
296511
  atLeast: 0,
296122
296512
  atMost: 1
296123
296513
  };
@@ -296126,7 +296516,7 @@ var init_regexp_parser = __esm({
296126
296516
  const atLeast = this.integerIncludingZero();
296127
296517
  switch (this.popChar()) {
296128
296518
  case "}":
296129
- range3 = {
296519
+ range2 = {
296130
296520
  atLeast,
296131
296521
  atMost: atLeast
296132
296522
  };
@@ -296135,12 +296525,12 @@ var init_regexp_parser = __esm({
296135
296525
  let atMost;
296136
296526
  if (this.isDigit()) {
296137
296527
  atMost = this.integerIncludingZero();
296138
- range3 = {
296528
+ range2 = {
296139
296529
  atLeast,
296140
296530
  atMost
296141
296531
  };
296142
296532
  } else {
296143
- range3 = {
296533
+ range2 = {
296144
296534
  atLeast,
296145
296535
  atMost: Infinity
296146
296536
  };
@@ -296148,25 +296538,25 @@ var init_regexp_parser = __esm({
296148
296538
  this.consumeChar("}");
296149
296539
  break;
296150
296540
  }
296151
- if (isBacktracking === true && range3 === void 0) {
296541
+ if (isBacktracking === true && range2 === void 0) {
296152
296542
  return void 0;
296153
296543
  }
296154
- ASSERT_EXISTS(range3);
296544
+ ASSERT_EXISTS(range2);
296155
296545
  break;
296156
296546
  }
296157
- if (isBacktracking === true && range3 === void 0) {
296547
+ if (isBacktracking === true && range2 === void 0) {
296158
296548
  return void 0;
296159
296549
  }
296160
- if (ASSERT_EXISTS(range3)) {
296550
+ if (ASSERT_EXISTS(range2)) {
296161
296551
  if (this.peekChar(0) === "?") {
296162
296552
  this.consumeChar("?");
296163
- range3.greedy = false;
296553
+ range2.greedy = false;
296164
296554
  } else {
296165
- range3.greedy = true;
296555
+ range2.greedy = true;
296166
296556
  }
296167
- range3.type = "Quantifier";
296168
- range3.loc = this.loc(begin);
296169
- return range3;
296557
+ range2.type = "Quantifier";
296558
+ range2.loc = this.loc(begin);
296559
+ return range2;
296170
296560
  }
296171
296561
  }
296172
296562
  atom() {
@@ -296868,18 +297258,18 @@ function firstCharOptimizedIndices(ast, result, ignoreCase) {
296868
297258
  if (typeof code === "number") {
296869
297259
  addOptimizedIdxToResult(code, result, ignoreCase);
296870
297260
  } else {
296871
- const range3 = code;
297261
+ const range2 = code;
296872
297262
  if (ignoreCase === true) {
296873
- for (let rangeCode = range3.from; rangeCode <= range3.to; rangeCode++) {
297263
+ for (let rangeCode = range2.from; rangeCode <= range2.to; rangeCode++) {
296874
297264
  addOptimizedIdxToResult(rangeCode, result, ignoreCase);
296875
297265
  }
296876
297266
  } else {
296877
- for (let rangeCode = range3.from; rangeCode <= range3.to && rangeCode < minOptimizationVal; rangeCode++) {
297267
+ for (let rangeCode = range2.from; rangeCode <= range2.to && rangeCode < minOptimizationVal; rangeCode++) {
296878
297268
  addOptimizedIdxToResult(rangeCode, result, ignoreCase);
296879
297269
  }
296880
- if (range3.to >= minOptimizationVal) {
296881
- const minUnOptVal = range3.from >= minOptimizationVal ? range3.from : minOptimizationVal;
296882
- const maxUnOptVal = range3.to;
297270
+ if (range2.to >= minOptimizationVal) {
297271
+ const minUnOptVal = range2.from >= minOptimizationVal ? range2.from : minOptimizationVal;
297272
+ const maxUnOptVal = range2.to;
296883
297273
  const minOptIdx = charCodeToOptimizedIndex(minUnOptVal);
296884
297274
  const maxOptIdx = charCodeToOptimizedIndex(maxUnOptVal);
296885
297275
  for (let currOptIdx = minOptIdx; currOptIdx <= maxOptIdx; currOptIdx++) {
@@ -296940,8 +297330,8 @@ function findCode(setNode, targetCharCodes) {
296940
297330
  if (typeof codeOrRange === "number") {
296941
297331
  return includes_default(targetCharCodes, codeOrRange);
296942
297332
  } else {
296943
- const range3 = codeOrRange;
296944
- return find_default(targetCharCodes, (targetCode) => range3.from <= targetCode && targetCode <= range3.to) !== void 0;
297333
+ const range2 = codeOrRange;
297334
+ return find_default(targetCharCodes, (targetCode) => range2.from <= targetCode && targetCode <= range2.to) !== void 0;
296945
297335
  }
296946
297336
  });
296947
297337
  }
@@ -314846,8 +315236,8 @@ var require_createRange = __commonJS({
314846
315236
  var require_range = __commonJS({
314847
315237
  "node_modules/lodash/range.js"(exports2, module2) {
314848
315238
  var createRange = require_createRange();
314849
- var range3 = createRange();
314850
- module2.exports = range3;
315239
+ var range2 = createRange();
315240
+ module2.exports = range2;
314851
315241
  }
314852
315242
  });
314853
315243
 
@@ -329700,7 +330090,7 @@ function parseEnabledServers(config) {
329700
330090
  }
329701
330091
  return servers;
329702
330092
  }
329703
- var import_fs9, import_path9, import_os3, import_url4, __filename4, __dirname4, DEFAULT_TIMEOUT, MAX_TIMEOUT, DEFAULT_CONFIG;
330093
+ var import_fs9, import_path9, import_os3, import_url4, __filename4, __dirname5, DEFAULT_TIMEOUT, MAX_TIMEOUT, DEFAULT_CONFIG;
329704
330094
  var init_config = __esm({
329705
330095
  "src/agent/mcp/config.js"() {
329706
330096
  "use strict";
@@ -329709,7 +330099,7 @@ var init_config = __esm({
329709
330099
  import_os3 = __nccwpck_require__(70857);
329710
330100
  import_url4 = __nccwpck_require__(87016);
329711
330101
  __filename4 = (0, import_url4.fileURLToPath)("file:///");
329712
- __dirname4 = (0, import_path9.dirname)(__filename4);
330102
+ __dirname5 = (0, import_path9.dirname)(__filename4);
329713
330103
  DEFAULT_TIMEOUT = 3e4;
329714
330104
  MAX_TIMEOUT = (() => {
329715
330105
  if (process.env.MCP_MAX_TIMEOUT) {
@@ -329723,7 +330113,7 @@ var init_config = __esm({
329723
330113
  // Example probe server configuration
329724
330114
  "probe-local": {
329725
330115
  command: "node",
329726
- args: [(0, import_path9.join)(__dirname4, "../../../examples/chat/mcpServer.js")],
330116
+ args: [(0, import_path9.join)(__dirname5, "../../../examples/chat/mcpServer.js")],
329727
330117
  transport: "stdio",
329728
330118
  enabled: false
329729
330119
  },
@@ -335307,7 +335697,7 @@ var require_compose_scalar = __commonJS({
335307
335697
  var resolveBlockScalar = require_resolve_block_scalar();
335308
335698
  var resolveFlowScalar = require_resolve_flow_scalar();
335309
335699
  function composeScalar(ctx, token, tagToken, onError) {
335310
- const { value, type, comment, range: range3 } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError);
335700
+ const { value, type, comment, range: range2 } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError);
335311
335701
  const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)) : null;
335312
335702
  let tag2;
335313
335703
  if (ctx.options.stringKeys && ctx.atKey) {
@@ -335327,7 +335717,7 @@ var require_compose_scalar = __commonJS({
335327
335717
  onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg);
335328
335718
  scalar = new Scalar.Scalar(value);
335329
335719
  }
335330
- scalar.range = range3;
335720
+ scalar.range = range2;
335331
335721
  scalar.source = value;
335332
335722
  if (type)
335333
335723
  scalar.type = type;
@@ -351581,7 +351971,7 @@ var init_executePlan = __esm({
351581
351971
  init_query();
351582
351972
  init_extract();
351583
351973
  init_delegate();
351584
- init_esm7();
351974
+ init_esm5();
351585
351975
  init_bash();
351586
351976
  RAW_OUTPUT_START = "<<<RAW_OUTPUT>>>";
351587
351977
  RAW_OUTPUT_END = "<<<END_RAW_OUTPUT>>>";
@@ -394863,7 +395253,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"100":"Continue","101":"Switching Pro
394863
395253
  /***/ ((module) => {
394864
395254
 
394865
395255
  "use strict";
394866
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@probelabs/visor","version":"0.1.146","main":"dist/index.js","bin":{"visor":"./dist/index.js"},"exports":{".":{"require":"./dist/index.js","import":"./dist/index.js"},"./sdk":{"types":"./dist/sdk/sdk.d.ts","import":"./dist/sdk/sdk.mjs","require":"./dist/sdk/sdk.js"},"./cli":{"require":"./dist/index.js"}},"files":["dist/","defaults/","action.yml","README.md","LICENSE"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build:cli":"ncc build src/index.ts -o dist && cp -r defaults dist/ && cp -r output dist/ && cp -r docs dist/ && cp -r examples dist/ && cp -r src/debug-visualizer/ui dist/debug-visualizer/ && node scripts/inject-version.js && echo \'#!/usr/bin/env node\' | cat - dist/index.js > temp && mv temp dist/index.js && chmod +x dist/index.js","build:sdk":"tsup src/sdk.ts --dts --sourcemap --format esm,cjs --out-dir dist/sdk","build":"./scripts/build-oss.sh","build:ee":"npm run build:cli && npm run build:sdk","test":"jest && npm run test:yaml","test:unit":"jest","prepublishOnly":"npm run build","test:watch":"jest --watch","test:coverage":"jest --coverage","test:ee":"jest --testPathPatterns=\'tests/ee\' --testPathIgnorePatterns=\'/node_modules/\' --no-coverage","test:manual:bash":"RUN_MANUAL_TESTS=true jest tests/manual/bash-config-manual.test.ts","lint":"eslint src tests --ext .ts","lint:fix":"eslint src tests --ext .ts --fix","format":"prettier --write src tests","format:check":"prettier --check src tests","clean":"","clean:traces":"node scripts/clean-traces.js","prebuild":"npm run clean && node scripts/generate-config-schema.js","pretest":"npm run clean:traces && node scripts/generate-config-schema.js && npm run build:cli","pretest:unit":"npm run clean:traces && node scripts/generate-config-schema.js && npm run build:cli","test:with-build":"npm run build:cli && jest","test:yaml":"node dist/index.js test --progress compact","test:yaml:parallel":"node dist/index.js test --progress compact --max-parallel 4","prepare":"husky","pre-commit":"lint-staged","deploy:site":"cd site && npx wrangler pages deploy . --project-name=visor-site --commit-dirty=true","deploy:worker":"npx wrangler deploy","deploy":"npm run deploy:site && npm run deploy:worker","publish:ee":"./scripts/publish-ee.sh","release":"./scripts/release.sh","release:patch":"./scripts/release.sh patch","release:minor":"./scripts/release.sh minor","release:major":"./scripts/release.sh major","release:prerelease":"./scripts/release.sh prerelease","docs:validate":"node scripts/validate-readme-links.js","workshop:setup":"npm install -D reveal-md@6.1.2","workshop:serve":"cd workshop && reveal-md slides.md -w","workshop:export":"reveal-md workshop/slides.md --static workshop/build","workshop:pdf":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter","workshop:pdf:ci":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter --puppeteer-launch-args=\\"--no-sandbox --disable-dev-shm-usage\\"","workshop:pdf:a4":"reveal-md workshop/slides.md --print workshop/Visor-Workshop-A4.pdf --print-size A4","workshop:build":"npm run workshop:export && npm run workshop:pdf","simulate:issue":"TS_NODE_TRANSPILE_ONLY=1 ts-node scripts/simulate-gh-run.ts --event issues --action opened --debug","simulate:comment":"TS_NODE_TRANSPILE_ONLY=1 ts-node scripts/simulate-gh-run.ts --event issue_comment --action created --debug"},"keywords":["code-review","ai","github-action","cli","pr-review","visor"],"author":"Probe Labs","license":"MIT","description":"AI workflow engine for code review, assistants, and automation — orchestrate checks, MCP tools, and AI providers with YAML-driven pipelines","repository":{"type":"git","url":"git+https://github.com/probelabs/visor.git"},"bugs":{"url":"https://github.com/probelabs/visor/issues"},"homepage":"https://github.com/probelabs/visor#readme","dependencies":{"@actions/core":"^1.11.1","@apidevtools/swagger-parser":"^12.1.0","@modelcontextprotocol/sdk":"^1.25.3","@nyariv/sandboxjs":"github:probelabs/SandboxJS#f1c13b8eee98734a8ea024061eada4aa9a9ff2e9","@octokit/action":"^8.0.2","@octokit/auth-app":"^8.1.0","@octokit/core":"^7.0.3","@octokit/rest":"^22.0.0","@opentelemetry/api":"^1.9.0","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-trace-otlp-grpc":"^0.203.0","@opentelemetry/exporter-trace-otlp-http":"^0.203.0","@opentelemetry/instrumentation":"^0.203.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-node":"^0.203.0","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/semantic-conventions":"^1.30.1","@probelabs/probe":"^0.6.0-rc260","@types/commander":"^2.12.0","@types/uuid":"^10.0.0","acorn":"^8.16.0","acorn-walk":"^8.3.5","ajv":"^8.17.1","ajv-formats":"^3.0.1","better-sqlite3":"^11.0.0","blessed":"^0.1.81","cli-table3":"^0.6.5","commander":"^14.0.0","deepmerge":"^4.3.1","dotenv":"^17.2.3","ignore":"^7.0.5","js-yaml":"^4.1.0","jsonpath-plus":"^10.4.0","liquidjs":"^10.21.1","minimatch":"^10.2.2","node-cron":"^3.0.3","open":"^9.1.0","simple-git":"^3.28.0","uuid":"^11.1.0","ws":"^8.18.3"},"optionalDependencies":{"@anthropic/claude-code-sdk":"npm:null@*","@open-policy-agent/opa-wasm":"^1.10.0","knex":"^3.1.0","mysql2":"^3.11.0","pg":"^8.13.0","tedious":"^19.0.0"},"devDependencies":{"@eslint/js":"^9.34.0","@kie/act-js":"^2.6.2","@kie/mock-github":"^2.0.1","@swc/core":"^1.13.2","@swc/jest":"^0.2.37","@types/better-sqlite3":"^7.6.0","@types/blessed":"^0.1.27","@types/jest":"^30.0.0","@types/js-yaml":"^4.0.9","@types/node":"^24.3.0","@types/node-cron":"^3.0.11","@types/ws":"^8.18.1","@typescript-eslint/eslint-plugin":"^8.42.0","@typescript-eslint/parser":"^8.42.0","@vercel/ncc":"^0.38.4","eslint":"^9.34.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","husky":"^9.1.7","jest":"^30.1.3","lint-staged":"^16.1.6","prettier":"^3.6.2","reveal-md":"^6.1.2","ts-json-schema-generator":"^1.5.1","ts-node":"^10.9.2","tsup":"^8.5.0","typescript":"^5.9.2","wrangler":"^3.0.0"},"peerDependenciesMeta":{"@anthropic/claude-code-sdk":{"optional":true}},"directories":{"test":"tests"},"lint-staged":{"src/**/*.{ts,js}":["eslint --fix","prettier --write"],"tests/**/*.{ts,js}":["eslint --fix","prettier --write"],"*.{json,md,yml,yaml}":["prettier --write"]}}');
395256
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@probelabs/visor","version":"0.1.147","main":"dist/index.js","bin":{"visor":"./dist/index.js"},"exports":{".":{"require":"./dist/index.js","import":"./dist/index.js"},"./sdk":{"types":"./dist/sdk/sdk.d.ts","import":"./dist/sdk/sdk.mjs","require":"./dist/sdk/sdk.js"},"./cli":{"require":"./dist/index.js"}},"files":["dist/","defaults/","action.yml","README.md","LICENSE"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build:cli":"ncc build src/index.ts -o dist && cp -r defaults dist/ && cp -r output dist/ && cp -r docs dist/ && cp -r examples dist/ && cp -r src/debug-visualizer/ui dist/debug-visualizer/ && node scripts/inject-version.js && echo \'#!/usr/bin/env node\' | cat - dist/index.js > temp && mv temp dist/index.js && chmod +x dist/index.js","build:sdk":"tsup src/sdk.ts --dts --sourcemap --format esm,cjs --out-dir dist/sdk","build":"./scripts/build-oss.sh","build:ee":"npm run build:cli && npm run build:sdk","test":"jest && npm run test:yaml","test:unit":"jest","prepublishOnly":"npm run build","test:watch":"jest --watch","test:coverage":"jest --coverage","test:ee":"jest --testPathPatterns=\'tests/ee\' --testPathIgnorePatterns=\'/node_modules/\' --no-coverage","test:manual:bash":"RUN_MANUAL_TESTS=true jest tests/manual/bash-config-manual.test.ts","lint":"eslint src tests --ext .ts","lint:fix":"eslint src tests --ext .ts --fix","format":"prettier --write src tests","format:check":"prettier --check src tests","clean":"","clean:traces":"node scripts/clean-traces.js","prebuild":"npm run clean && node scripts/generate-config-schema.js","pretest":"npm run clean:traces && node scripts/generate-config-schema.js && npm run build:cli","pretest:unit":"npm run clean:traces && node scripts/generate-config-schema.js && npm run build:cli","test:with-build":"npm run build:cli && jest","test:yaml":"node dist/index.js test --progress compact","test:yaml:parallel":"node dist/index.js test --progress compact --max-parallel 4","prepare":"husky","pre-commit":"lint-staged","deploy:site":"cd site && npx wrangler pages deploy . --project-name=visor-site --commit-dirty=true","deploy:worker":"npx wrangler deploy","deploy":"npm run deploy:site && npm run deploy:worker","publish:ee":"./scripts/publish-ee.sh","release":"./scripts/release.sh","release:patch":"./scripts/release.sh patch","release:minor":"./scripts/release.sh minor","release:major":"./scripts/release.sh major","release:prerelease":"./scripts/release.sh prerelease","docs:validate":"node scripts/validate-readme-links.js","workshop:setup":"npm install -D reveal-md@6.1.2","workshop:serve":"cd workshop && reveal-md slides.md -w","workshop:export":"reveal-md workshop/slides.md --static workshop/build","workshop:pdf":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter","workshop:pdf:ci":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter --puppeteer-launch-args=\\"--no-sandbox --disable-dev-shm-usage\\"","workshop:pdf:a4":"reveal-md workshop/slides.md --print workshop/Visor-Workshop-A4.pdf --print-size A4","workshop:build":"npm run workshop:export && npm run workshop:pdf","simulate:issue":"TS_NODE_TRANSPILE_ONLY=1 ts-node scripts/simulate-gh-run.ts --event issues --action opened --debug","simulate:comment":"TS_NODE_TRANSPILE_ONLY=1 ts-node scripts/simulate-gh-run.ts --event issue_comment --action created --debug"},"keywords":["code-review","ai","github-action","cli","pr-review","visor"],"author":"Probe Labs","license":"MIT","description":"AI workflow engine for code review, assistants, and automation — orchestrate checks, MCP tools, and AI providers with YAML-driven pipelines","repository":{"type":"git","url":"git+https://github.com/probelabs/visor.git"},"bugs":{"url":"https://github.com/probelabs/visor/issues"},"homepage":"https://github.com/probelabs/visor#readme","dependencies":{"@actions/core":"^1.11.1","@apidevtools/swagger-parser":"^12.1.0","@modelcontextprotocol/sdk":"^1.25.3","@nyariv/sandboxjs":"github:probelabs/SandboxJS#f1c13b8eee98734a8ea024061eada4aa9a9ff2e9","@octokit/action":"^8.0.2","@octokit/auth-app":"^8.1.0","@octokit/core":"^7.0.3","@octokit/rest":"^22.0.0","@opentelemetry/api":"^1.9.0","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-trace-otlp-grpc":"^0.203.0","@opentelemetry/exporter-trace-otlp-http":"^0.203.0","@opentelemetry/instrumentation":"^0.203.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-node":"^0.203.0","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/semantic-conventions":"^1.30.1","@probelabs/probe":"^0.6.0-rc262","@types/commander":"^2.12.0","@types/uuid":"^10.0.0","acorn":"^8.16.0","acorn-walk":"^8.3.5","ajv":"^8.17.1","ajv-formats":"^3.0.1","better-sqlite3":"^11.0.0","blessed":"^0.1.81","cli-table3":"^0.6.5","commander":"^14.0.0","deepmerge":"^4.3.1","dotenv":"^17.2.3","ignore":"^7.0.5","js-yaml":"^4.1.0","jsonpath-plus":"^10.4.0","liquidjs":"^10.21.1","minimatch":"^10.2.2","node-cron":"^3.0.3","open":"^9.1.0","simple-git":"^3.28.0","uuid":"^11.1.0","ws":"^8.18.3"},"optionalDependencies":{"@anthropic/claude-code-sdk":"npm:null@*","@open-policy-agent/opa-wasm":"^1.10.0","knex":"^3.1.0","mysql2":"^3.11.0","pg":"^8.13.0","tedious":"^19.0.0"},"devDependencies":{"@eslint/js":"^9.34.0","@kie/act-js":"^2.6.2","@kie/mock-github":"^2.0.1","@swc/core":"^1.13.2","@swc/jest":"^0.2.37","@types/better-sqlite3":"^7.6.0","@types/blessed":"^0.1.27","@types/jest":"^30.0.0","@types/js-yaml":"^4.0.9","@types/node":"^24.3.0","@types/node-cron":"^3.0.11","@types/ws":"^8.18.1","@typescript-eslint/eslint-plugin":"^8.42.0","@typescript-eslint/parser":"^8.42.0","@vercel/ncc":"^0.38.4","eslint":"^9.34.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","husky":"^9.1.7","jest":"^30.1.3","lint-staged":"^16.1.6","prettier":"^3.6.2","reveal-md":"^6.1.2","ts-json-schema-generator":"^1.5.1","ts-node":"^10.9.2","tsup":"^8.5.0","typescript":"^5.9.2","wrangler":"^3.0.0"},"peerDependenciesMeta":{"@anthropic/claude-code-sdk":{"optional":true}},"directories":{"test":"tests"},"lint-staged":{"src/**/*.{ts,js}":["eslint --fix","prettier --write"],"tests/**/*.{ts,js}":["eslint --fix","prettier --write"],"*.{json,md,yml,yaml}":["prettier --write"]}}');
394867
395257
 
394868
395258
  /***/ })
394869
395259