@vibecheck-ai/mcp 25.0.0 → 26.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import * as path2 from 'path';
5
5
  import path2__default, { dirname, win32, posix, join, extname, resolve, basename, normalize } from 'path';
6
6
  import { recordFeedback, evolve } from './chunk-J52EUKKW.js';
7
7
  import { require_braces, require_picomatch, require_utils, require_glob_parent } from './chunk-QGPX6H6L.js';
8
- import { SCAN_ENGINE_FOCUS_PRESET_NAMES, FEATURE_NAMES, getCheckoutUrl, DAILY_SCAN_LIMIT_UPGRADE_URL, formatDailyScanLimitMessage, dashboardFindingUrl, gateCanonicalScanReportFindings, getTrustScoreStatus, formatTrustScoreMcp, buildGatedScanResponse, formatFindingSeverityBreakdown, ENGINE_FOCUS_PRESETS, computeTrustScore, normalizeCanonicalScanReport, planHasApiSurface, canAccessFeature, getMinPlanForApiSurface, buildCliUpgradeBlock, getMinimumPlanForFeature, getQuotas, normalizePlanId, fetchCanonicalAccess } from './chunk-WUHPSW7M.js';
8
+ import { SCAN_ENGINE_FOCUS_PRESET_NAMES, FEATURE_NAMES, getCheckoutUrl, DAILY_SCAN_LIMIT_UPGRADE_URL, formatDailyScanLimitMessage, dashboardFindingUrl, gateCanonicalScanReportFindings, getTrustScoreStatus, formatTrustScoreMcp, buildGatedScanResponse, formatFindingSeverityBreakdown, ENGINE_FOCUS_PRESETS, computeTrustScore, normalizeCanonicalScanReport, planHasApiSurface, canAccessFeature, getMinPlanForApiSurface, buildCliUpgradeBlock, getMinimumPlanForFeature, getQuotas, normalizePlanId, fetchCanonicalAccess } from './chunk-PXXM6OHD.js';
9
9
  import './chunk-MUP4JXOF.js';
10
10
  import './chunk-DDTUTWRY.js';
11
11
  import { require_typescript } from './chunk-FRK2XZX5.js';
@@ -20,7 +20,7 @@ import './chunk-5DADZJ3D.js';
20
20
  import './chunk-43XAAYST.js';
21
21
  import './chunk-F34MHA6A.js';
22
22
  import { __commonJS, __require, __toESM } from './chunk-YWUMPN4Z.js';
23
- import * as fs7 from 'fs';
23
+ import * as fs6 from 'fs';
24
24
  import { realpathSync as realpathSync$1, readlinkSync, readdirSync, readdir as readdir$1, lstatSync, existsSync, mkdirSync, accessSync, statSync, readFileSync } from 'fs';
25
25
  import { execFile, spawn } from 'child_process';
26
26
  import { promisify } from 'util';
@@ -34,7 +34,7 @@ import * as crypto2 from 'crypto';
34
34
  import { createHash } from 'crypto';
35
35
  import { EventEmitter } from 'events';
36
36
  import Database from 'better-sqlite3';
37
- import * as os2 from 'os';
37
+ import * as os from 'os';
38
38
  import { homedir } from 'os';
39
39
  import Stream from 'stream';
40
40
  import { StringDecoder } from 'string_decoder';
@@ -112,9 +112,9 @@ var require_path = __commonJS({
112
112
  "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js"(exports$1) {
113
113
  Object.defineProperty(exports$1, "__esModule", { value: true });
114
114
  exports$1.convertPosixPathToPattern = exports$1.convertWindowsPathToPattern = exports$1.convertPathToPattern = exports$1.escapePosixPath = exports$1.escapeWindowsPath = exports$1.escape = exports$1.removeLeadingDotSegment = exports$1.makeAbsolute = exports$1.unixify = void 0;
115
- var os3 = __require("os");
116
- var path13 = __require("path");
117
- var IS_WINDOWS_PLATFORM = os3.platform() === "win32";
115
+ var os2 = __require("os");
116
+ var path12 = __require("path");
117
+ var IS_WINDOWS_PLATFORM = os2.platform() === "win32";
118
118
  var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
119
119
  var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
120
120
  var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g;
@@ -125,7 +125,7 @@ var require_path = __commonJS({
125
125
  }
126
126
  exports$1.unixify = unixify;
127
127
  function makeAbsolute(cwd, filepath) {
128
- return path13.resolve(cwd, filepath);
128
+ return path12.resolve(cwd, filepath);
129
129
  }
130
130
  exports$1.makeAbsolute = makeAbsolute;
131
131
  function removeLeadingDotSegment(entry) {
@@ -324,7 +324,7 @@ var require_pattern = __commonJS({
324
324
  "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js"(exports$1) {
325
325
  Object.defineProperty(exports$1, "__esModule", { value: true });
326
326
  exports$1.isAbsolute = exports$1.partitionAbsoluteAndRelative = exports$1.removeDuplicateSlashes = exports$1.matchAny = exports$1.convertPatternsToRe = exports$1.makeRe = exports$1.getPatternParts = exports$1.expandBraceExpansion = exports$1.expandPatternsWithBraceExpansion = exports$1.isAffectDepthOfReadingPattern = exports$1.endsWithSlashGlobStar = exports$1.hasGlobStar = exports$1.getBaseDirectory = exports$1.isPatternRelatedToParentDirectory = exports$1.getPatternsOutsideCurrentDirectory = exports$1.getPatternsInsideCurrentDirectory = exports$1.getPositivePatterns = exports$1.getNegativePatterns = exports$1.isPositivePattern = exports$1.isNegativePattern = exports$1.convertToNegativePattern = exports$1.convertToPositivePattern = exports$1.isDynamicPattern = exports$1.isStaticPattern = void 0;
327
- var path13 = __require("path");
327
+ var path12 = __require("path");
328
328
  var globParent = require_glob_parent();
329
329
  var micromatch = require_micromatch();
330
330
  var GLOBSTAR2 = "**";
@@ -419,7 +419,7 @@ var require_pattern = __commonJS({
419
419
  }
420
420
  exports$1.endsWithSlashGlobStar = endsWithSlashGlobStar;
421
421
  function isAffectDepthOfReadingPattern(pattern) {
422
- const basename8 = path13.basename(pattern);
422
+ const basename8 = path12.basename(pattern);
423
423
  return endsWithSlashGlobStar(pattern) || isStaticPattern(basename8);
424
424
  }
425
425
  exports$1.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
@@ -477,7 +477,7 @@ var require_pattern = __commonJS({
477
477
  }
478
478
  exports$1.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
479
479
  function isAbsolute5(pattern) {
480
- return path13.isAbsolute(pattern);
480
+ return path12.isAbsolute(pattern);
481
481
  }
482
482
  exports$1.isAbsolute = isAbsolute5;
483
483
  }
@@ -644,14 +644,14 @@ var require_utils2 = __commonJS({
644
644
  "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/index.js"(exports$1) {
645
645
  Object.defineProperty(exports$1, "__esModule", { value: true });
646
646
  exports$1.string = exports$1.stream = exports$1.pattern = exports$1.path = exports$1.fs = exports$1.errno = exports$1.array = void 0;
647
- var array2 = require_array();
648
- exports$1.array = array2;
647
+ var array = require_array();
648
+ exports$1.array = array;
649
649
  var errno = require_errno();
650
650
  exports$1.errno = errno;
651
- var fs8 = require_fs();
652
- exports$1.fs = fs8;
653
- var path13 = require_path();
654
- exports$1.path = path13;
651
+ var fs7 = require_fs();
652
+ exports$1.fs = fs7;
653
+ var path12 = require_path();
654
+ exports$1.path = path12;
655
655
  var pattern = require_pattern();
656
656
  exports$1.pattern = pattern;
657
657
  var stream2 = require_stream();
@@ -761,8 +761,8 @@ var require_async = __commonJS({
761
761
  "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js"(exports$1) {
762
762
  Object.defineProperty(exports$1, "__esModule", { value: true });
763
763
  exports$1.read = void 0;
764
- function read(path13, settings, callback) {
765
- settings.fs.lstat(path13, (lstatError, lstat2) => {
764
+ function read(path12, settings, callback) {
765
+ settings.fs.lstat(path12, (lstatError, lstat2) => {
766
766
  if (lstatError !== null) {
767
767
  callFailureCallback(callback, lstatError);
768
768
  return;
@@ -771,7 +771,7 @@ var require_async = __commonJS({
771
771
  callSuccessCallback(callback, lstat2);
772
772
  return;
773
773
  }
774
- settings.fs.stat(path13, (statError, stat3) => {
774
+ settings.fs.stat(path12, (statError, stat3) => {
775
775
  if (statError !== null) {
776
776
  if (settings.throwErrorOnBrokenSymbolicLink) {
777
777
  callFailureCallback(callback, statError);
@@ -802,13 +802,13 @@ var require_sync = __commonJS({
802
802
  "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports$1) {
803
803
  Object.defineProperty(exports$1, "__esModule", { value: true });
804
804
  exports$1.read = void 0;
805
- function read(path13, settings) {
806
- const lstat2 = settings.fs.lstatSync(path13);
805
+ function read(path12, settings) {
806
+ const lstat2 = settings.fs.lstatSync(path12);
807
807
  if (!lstat2.isSymbolicLink() || !settings.followSymbolicLink) {
808
808
  return lstat2;
809
809
  }
810
810
  try {
811
- const stat3 = settings.fs.statSync(path13);
811
+ const stat3 = settings.fs.statSync(path12);
812
812
  if (settings.markSymbolicLink) {
813
813
  stat3.isSymbolicLink = () => true;
814
814
  }
@@ -829,12 +829,12 @@ var require_fs2 = __commonJS({
829
829
  "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports$1) {
830
830
  Object.defineProperty(exports$1, "__esModule", { value: true });
831
831
  exports$1.createFileSystemAdapter = exports$1.FILE_SYSTEM_ADAPTER = void 0;
832
- var fs8 = __require("fs");
832
+ var fs7 = __require("fs");
833
833
  exports$1.FILE_SYSTEM_ADAPTER = {
834
- lstat: fs8.lstat,
835
- stat: fs8.stat,
836
- lstatSync: fs8.lstatSync,
837
- statSync: fs8.statSync
834
+ lstat: fs7.lstat,
835
+ stat: fs7.stat,
836
+ lstatSync: fs7.lstatSync,
837
+ statSync: fs7.statSync
838
838
  };
839
839
  function createFileSystemAdapter(fsMethods) {
840
840
  if (fsMethods === void 0) {
@@ -850,12 +850,12 @@ var require_fs2 = __commonJS({
850
850
  var require_settings = __commonJS({
851
851
  "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js"(exports$1) {
852
852
  Object.defineProperty(exports$1, "__esModule", { value: true });
853
- var fs8 = require_fs2();
853
+ var fs7 = require_fs2();
854
854
  var Settings = class {
855
855
  constructor(_options = {}) {
856
856
  this._options = _options;
857
857
  this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
858
- this.fs = fs8.createFileSystemAdapter(this._options.fs);
858
+ this.fs = fs7.createFileSystemAdapter(this._options.fs);
859
859
  this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
860
860
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
861
861
  }
@@ -876,17 +876,17 @@ var require_out = __commonJS({
876
876
  var sync2 = require_sync();
877
877
  var settings_1 = require_settings();
878
878
  exports$1.Settings = settings_1.default;
879
- function stat3(path13, optionsOrSettingsOrCallback, callback) {
879
+ function stat3(path12, optionsOrSettingsOrCallback, callback) {
880
880
  if (typeof optionsOrSettingsOrCallback === "function") {
881
- async.read(path13, getSettings(), optionsOrSettingsOrCallback);
881
+ async.read(path12, getSettings(), optionsOrSettingsOrCallback);
882
882
  return;
883
883
  }
884
- async.read(path13, getSettings(optionsOrSettingsOrCallback), callback);
884
+ async.read(path12, getSettings(optionsOrSettingsOrCallback), callback);
885
885
  }
886
886
  exports$1.stat = stat3;
887
- function statSync4(path13, optionsOrSettings) {
887
+ function statSync4(path12, optionsOrSettings) {
888
888
  const settings = getSettings(optionsOrSettings);
889
- return sync2.read(path13, settings);
889
+ return sync2.read(path12, settings);
890
890
  }
891
891
  exports$1.statSync = statSync4;
892
892
  function getSettings(settingsOrOptions = {}) {
@@ -1006,8 +1006,8 @@ var require_utils3 = __commonJS({
1006
1006
  "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports$1) {
1007
1007
  Object.defineProperty(exports$1, "__esModule", { value: true });
1008
1008
  exports$1.fs = void 0;
1009
- var fs8 = require_fs3();
1010
- exports$1.fs = fs8;
1009
+ var fs7 = require_fs3();
1010
+ exports$1.fs = fs7;
1011
1011
  }
1012
1012
  });
1013
1013
 
@@ -1097,16 +1097,16 @@ var require_async2 = __commonJS({
1097
1097
  return;
1098
1098
  }
1099
1099
  const tasks = names.map((name) => {
1100
- const path13 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
1100
+ const path12 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
1101
1101
  return (done) => {
1102
- fsStat.stat(path13, settings.fsStatSettings, (error, stats) => {
1102
+ fsStat.stat(path12, settings.fsStatSettings, (error, stats) => {
1103
1103
  if (error !== null) {
1104
1104
  done(error);
1105
1105
  return;
1106
1106
  }
1107
1107
  const entry = {
1108
1108
  name,
1109
- path: path13,
1109
+ path: path12,
1110
1110
  dirent: utils.fs.createDirentFromStats(name, stats)
1111
1111
  };
1112
1112
  if (settings.stats) {
@@ -1198,14 +1198,14 @@ var require_fs4 = __commonJS({
1198
1198
  "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports$1) {
1199
1199
  Object.defineProperty(exports$1, "__esModule", { value: true });
1200
1200
  exports$1.createFileSystemAdapter = exports$1.FILE_SYSTEM_ADAPTER = void 0;
1201
- var fs8 = __require("fs");
1201
+ var fs7 = __require("fs");
1202
1202
  exports$1.FILE_SYSTEM_ADAPTER = {
1203
- lstat: fs8.lstat,
1204
- stat: fs8.stat,
1205
- lstatSync: fs8.lstatSync,
1206
- statSync: fs8.statSync,
1207
- readdir: fs8.readdir,
1208
- readdirSync: fs8.readdirSync
1203
+ lstat: fs7.lstat,
1204
+ stat: fs7.stat,
1205
+ lstatSync: fs7.lstatSync,
1206
+ statSync: fs7.statSync,
1207
+ readdir: fs7.readdir,
1208
+ readdirSync: fs7.readdirSync
1209
1209
  };
1210
1210
  function createFileSystemAdapter(fsMethods) {
1211
1211
  if (fsMethods === void 0) {
@@ -1221,15 +1221,15 @@ var require_fs4 = __commonJS({
1221
1221
  var require_settings2 = __commonJS({
1222
1222
  "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports$1) {
1223
1223
  Object.defineProperty(exports$1, "__esModule", { value: true });
1224
- var path13 = __require("path");
1224
+ var path12 = __require("path");
1225
1225
  var fsStat = require_out();
1226
- var fs8 = require_fs4();
1226
+ var fs7 = require_fs4();
1227
1227
  var Settings = class {
1228
1228
  constructor(_options = {}) {
1229
1229
  this._options = _options;
1230
1230
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
1231
- this.fs = fs8.createFileSystemAdapter(this._options.fs);
1232
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path13.sep);
1231
+ this.fs = fs7.createFileSystemAdapter(this._options.fs);
1232
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path12.sep);
1233
1233
  this.stats = this._getValue(this._options.stats, false);
1234
1234
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
1235
1235
  this.fsStatSettings = new fsStat.Settings({
@@ -1255,17 +1255,17 @@ var require_out2 = __commonJS({
1255
1255
  var sync2 = require_sync2();
1256
1256
  var settings_1 = require_settings2();
1257
1257
  exports$1.Settings = settings_1.default;
1258
- function scandir(path13, optionsOrSettingsOrCallback, callback) {
1258
+ function scandir(path12, optionsOrSettingsOrCallback, callback) {
1259
1259
  if (typeof optionsOrSettingsOrCallback === "function") {
1260
- async.read(path13, getSettings(), optionsOrSettingsOrCallback);
1260
+ async.read(path12, getSettings(), optionsOrSettingsOrCallback);
1261
1261
  return;
1262
1262
  }
1263
- async.read(path13, getSettings(optionsOrSettingsOrCallback), callback);
1263
+ async.read(path12, getSettings(optionsOrSettingsOrCallback), callback);
1264
1264
  }
1265
1265
  exports$1.scandir = scandir;
1266
- function scandirSync(path13, optionsOrSettings) {
1266
+ function scandirSync(path12, optionsOrSettings) {
1267
1267
  const settings = getSettings(optionsOrSettings);
1268
- return sync2.read(path13, settings);
1268
+ return sync2.read(path12, settings);
1269
1269
  }
1270
1270
  exports$1.scandirSync = scandirSync;
1271
1271
  function getSettings(settingsOrOptions = {}) {
@@ -1902,7 +1902,7 @@ var require_sync4 = __commonJS({
1902
1902
  var require_settings3 = __commonJS({
1903
1903
  "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js"(exports$1) {
1904
1904
  Object.defineProperty(exports$1, "__esModule", { value: true });
1905
- var path13 = __require("path");
1905
+ var path12 = __require("path");
1906
1906
  var fsScandir = require_out2();
1907
1907
  var Settings = class {
1908
1908
  constructor(_options = {}) {
@@ -1912,7 +1912,7 @@ var require_settings3 = __commonJS({
1912
1912
  this.deepFilter = this._getValue(this._options.deepFilter, null);
1913
1913
  this.entryFilter = this._getValue(this._options.entryFilter, null);
1914
1914
  this.errorFilter = this._getValue(this._options.errorFilter, null);
1915
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path13.sep);
1915
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path12.sep);
1916
1916
  this.fsScandirSettings = new fsScandir.Settings({
1917
1917
  followSymbolicLinks: this._options.followSymbolicLinks,
1918
1918
  fs: this._options.fs,
@@ -1972,7 +1972,7 @@ var require_out3 = __commonJS({
1972
1972
  var require_reader2 = __commonJS({
1973
1973
  "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js"(exports$1) {
1974
1974
  Object.defineProperty(exports$1, "__esModule", { value: true });
1975
- var path13 = __require("path");
1975
+ var path12 = __require("path");
1976
1976
  var fsStat = require_out();
1977
1977
  var utils = require_utils2();
1978
1978
  var Reader = class {
@@ -1985,7 +1985,7 @@ var require_reader2 = __commonJS({
1985
1985
  });
1986
1986
  }
1987
1987
  _getFullEntryPath(filepath) {
1988
- return path13.resolve(this._settings.cwd, filepath);
1988
+ return path12.resolve(this._settings.cwd, filepath);
1989
1989
  }
1990
1990
  _makeEntry(stats, pattern) {
1991
1991
  const entry = {
@@ -2392,7 +2392,7 @@ var require_entry2 = __commonJS({
2392
2392
  var require_provider = __commonJS({
2393
2393
  "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js"(exports$1) {
2394
2394
  Object.defineProperty(exports$1, "__esModule", { value: true });
2395
- var path13 = __require("path");
2395
+ var path12 = __require("path");
2396
2396
  var deep_1 = require_deep();
2397
2397
  var entry_1 = require_entry();
2398
2398
  var error_1 = require_error();
@@ -2406,7 +2406,7 @@ var require_provider = __commonJS({
2406
2406
  this.entryTransformer = new entry_2.default(this._settings);
2407
2407
  }
2408
2408
  _getRootDirectory(task) {
2409
- return path13.resolve(this._settings.cwd, task.base);
2409
+ return path12.resolve(this._settings.cwd, task.base);
2410
2410
  }
2411
2411
  _getReaderOptions(task) {
2412
2412
  const basePath = task.base === "." ? "" : task.base;
@@ -2582,16 +2582,16 @@ var require_settings4 = __commonJS({
2582
2582
  "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/settings.js"(exports$1) {
2583
2583
  Object.defineProperty(exports$1, "__esModule", { value: true });
2584
2584
  exports$1.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
2585
- var fs8 = __require("fs");
2586
- var os3 = __require("os");
2587
- var CPU_COUNT = Math.max(os3.cpus().length, 1);
2585
+ var fs7 = __require("fs");
2586
+ var os2 = __require("os");
2587
+ var CPU_COUNT = Math.max(os2.cpus().length, 1);
2588
2588
  exports$1.DEFAULT_FILE_SYSTEM_ADAPTER = {
2589
- lstat: fs8.lstat,
2590
- lstatSync: fs8.lstatSync,
2591
- stat: fs8.stat,
2592
- statSync: fs8.statSync,
2593
- readdir: fs8.readdir,
2594
- readdirSync: fs8.readdirSync
2589
+ lstat: fs7.lstat,
2590
+ lstatSync: fs7.lstatSync,
2591
+ stat: fs7.stat,
2592
+ statSync: fs7.statSync,
2593
+ readdir: fs7.readdir,
2594
+ readdirSync: fs7.readdirSync
2595
2595
  };
2596
2596
  var Settings = class {
2597
2597
  constructor(_options = {}) {
@@ -3212,7 +3212,7 @@ var require_has_flag = __commonJS({
3212
3212
  // ../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js
3213
3213
  var require_supports_color = __commonJS({
3214
3214
  "../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports$1, module) {
3215
- var os3 = __require("os");
3215
+ var os2 = __require("os");
3216
3216
  var tty = __require("tty");
3217
3217
  var hasFlag = require_has_flag();
3218
3218
  var { env } = process;
@@ -3269,7 +3269,7 @@ var require_supports_color = __commonJS({
3269
3269
  return min;
3270
3270
  }
3271
3271
  if (process.platform === "win32") {
3272
- const osRelease = os3.release().split(".");
3272
+ const osRelease = os2.release().split(".");
3273
3273
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
3274
3274
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
3275
3275
  }
@@ -3517,10 +3517,10 @@ var require_src2 = __commonJS({
3517
3517
  var fs_1 = __require("fs");
3518
3518
  var debug_1 = __importDefault(require_src());
3519
3519
  var log = debug_1.default("@kwsites/file-exists");
3520
- function check(path13, isFile, isDirectory) {
3521
- log(`checking %s`, path13);
3520
+ function check(path12, isFile, isDirectory) {
3521
+ log(`checking %s`, path12);
3522
3522
  try {
3523
- const stat3 = fs_1.statSync(path13);
3523
+ const stat3 = fs_1.statSync(path12);
3524
3524
  if (stat3.isFile() && isFile) {
3525
3525
  log(`[OK] path represents a file`);
3526
3526
  return true;
@@ -3540,8 +3540,8 @@ var require_src2 = __commonJS({
3540
3540
  throw e;
3541
3541
  }
3542
3542
  }
3543
- function exists2(path13, type = exports$1.READABLE) {
3544
- return check(path13, (type & exports$1.FILE) > 0, (type & exports$1.FOLDER) > 0);
3543
+ function exists2(path12, type = exports$1.READABLE) {
3544
+ return check(path12, (type & exports$1.FILE) > 0, (type & exports$1.FOLDER) > 0);
3545
3545
  }
3546
3546
  exports$1.exists = exists2;
3547
3547
  exports$1.FILE = 1;
@@ -8452,8 +8452,8 @@ function toLinesWithContent(input = "", trimmed2 = true, separator = "\n") {
8452
8452
  function forEachLineWithContent(input, callback) {
8453
8453
  return toLinesWithContent(input, true).map((line) => callback(line));
8454
8454
  }
8455
- function folderExists(path13) {
8456
- return (0, import_file_exists.exists)(path13, import_file_exists.FOLDER);
8455
+ function folderExists(path12) {
8456
+ return (0, import_file_exists.exists)(path12, import_file_exists.FOLDER);
8457
8457
  }
8458
8458
  function append(target, item) {
8459
8459
  if (Array.isArray(target)) {
@@ -8846,8 +8846,8 @@ function checkIsRepoRootTask() {
8846
8846
  commands,
8847
8847
  format: "utf-8",
8848
8848
  onError,
8849
- parser(path13) {
8850
- return /^\.(git)?$/.test(path13.trim());
8849
+ parser(path12) {
8850
+ return /^\.(git)?$/.test(path12.trim());
8851
8851
  }
8852
8852
  };
8853
8853
  }
@@ -9274,11 +9274,11 @@ function parseGrep(grep) {
9274
9274
  const paths = /* @__PURE__ */ new Set();
9275
9275
  const results = {};
9276
9276
  forEachLineWithContent(grep, (input) => {
9277
- const [path13, line, preview] = input.split(NULL);
9278
- paths.add(path13);
9279
- (results[path13] = results[path13] || []).push({
9277
+ const [path12, line, preview] = input.split(NULL);
9278
+ paths.add(path12);
9279
+ (results[path12] = results[path12] || []).push({
9280
9280
  line: asNumber(line),
9281
- path: path13,
9281
+ path: path12,
9282
9282
  preview
9283
9283
  });
9284
9284
  });
@@ -10028,14 +10028,14 @@ var init_hash_object = __esm({
10028
10028
  init_task();
10029
10029
  }
10030
10030
  });
10031
- function parseInit(bare, path13, text) {
10031
+ function parseInit(bare, path12, text) {
10032
10032
  const response = String(text).trim();
10033
10033
  let result;
10034
10034
  if (result = initResponseRegex.exec(response)) {
10035
- return new InitSummary(bare, path13, false, result[1]);
10035
+ return new InitSummary(bare, path12, false, result[1]);
10036
10036
  }
10037
10037
  if (result = reInitResponseRegex.exec(response)) {
10038
- return new InitSummary(bare, path13, true, result[1]);
10038
+ return new InitSummary(bare, path12, true, result[1]);
10039
10039
  }
10040
10040
  let gitDir = "";
10041
10041
  const tokens = response.split(" ");
@@ -10046,7 +10046,7 @@ function parseInit(bare, path13, text) {
10046
10046
  break;
10047
10047
  }
10048
10048
  }
10049
- return new InitSummary(bare, path13, /^re/i.test(response), gitDir);
10049
+ return new InitSummary(bare, path12, /^re/i.test(response), gitDir);
10050
10050
  }
10051
10051
  var InitSummary;
10052
10052
  var initResponseRegex;
@@ -10054,9 +10054,9 @@ var reInitResponseRegex;
10054
10054
  var init_InitSummary = __esm({
10055
10055
  "src/lib/responses/InitSummary.ts"() {
10056
10056
  InitSummary = class {
10057
- constructor(bare, path13, existing, gitDir) {
10057
+ constructor(bare, path12, existing, gitDir) {
10058
10058
  this.bare = bare;
10059
- this.path = path13;
10059
+ this.path = path12;
10060
10060
  this.existing = existing;
10061
10061
  this.gitDir = gitDir;
10062
10062
  }
@@ -10068,7 +10068,7 @@ var init_InitSummary = __esm({
10068
10068
  function hasBareCommand(command) {
10069
10069
  return command.includes(bareCommand);
10070
10070
  }
10071
- function initTask(bare = false, path13, customArgs) {
10071
+ function initTask(bare = false, path12, customArgs) {
10072
10072
  const commands = ["init", ...customArgs];
10073
10073
  if (bare && !hasBareCommand(commands)) {
10074
10074
  commands.splice(1, 0, bareCommand);
@@ -10077,7 +10077,7 @@ function initTask(bare = false, path13, customArgs) {
10077
10077
  commands,
10078
10078
  format: "utf-8",
10079
10079
  parser(text) {
10080
- return parseInit(commands.includes("--bare"), path13, text);
10080
+ return parseInit(commands.includes("--bare"), path12, text);
10081
10081
  }
10082
10082
  };
10083
10083
  }
@@ -10874,12 +10874,12 @@ var init_FileStatusSummary = __esm({
10874
10874
  "src/lib/responses/FileStatusSummary.ts"() {
10875
10875
  fromPathRegex = /^(.+)\0(.+)$/;
10876
10876
  FileStatusSummary = class {
10877
- constructor(path13, index, working_dir) {
10878
- this.path = path13;
10877
+ constructor(path12, index, working_dir) {
10878
+ this.path = path12;
10879
10879
  this.index = index;
10880
10880
  this.working_dir = working_dir;
10881
10881
  if (index === "R" || working_dir === "R") {
10882
- const detail = fromPathRegex.exec(path13) || [null, path13, path13];
10882
+ const detail = fromPathRegex.exec(path12) || [null, path12, path12];
10883
10883
  this.from = detail[2] || "";
10884
10884
  this.path = detail[1] || "";
10885
10885
  }
@@ -10910,14 +10910,14 @@ function splitLine(result, lineStr) {
10910
10910
  default:
10911
10911
  return;
10912
10912
  }
10913
- function data(index, workingDir, path13) {
10913
+ function data(index, workingDir, path12) {
10914
10914
  const raw = `${index}${workingDir}`;
10915
10915
  const handler = parsers6.get(raw);
10916
10916
  if (handler) {
10917
- handler(result, path13);
10917
+ handler(result, path12);
10918
10918
  }
10919
10919
  if (raw !== "##" && raw !== "!!") {
10920
- result.files.push(new FileStatusSummary(path13, index, workingDir));
10920
+ result.files.push(new FileStatusSummary(path12, index, workingDir));
10921
10921
  }
10922
10922
  }
10923
10923
  }
@@ -11263,9 +11263,9 @@ var init_simple_git_api = __esm({
11263
11263
  next
11264
11264
  );
11265
11265
  }
11266
- hashObject(path13, write) {
11266
+ hashObject(path12, write) {
11267
11267
  return this._runTask(
11268
- hashObjectTask(path13, write === true),
11268
+ hashObjectTask(path12, write === true),
11269
11269
  trailingFunctionArgument(arguments)
11270
11270
  );
11271
11271
  }
@@ -11612,8 +11612,8 @@ var init_branch = __esm({
11612
11612
  }
11613
11613
  });
11614
11614
  function toPath(input) {
11615
- const path13 = input.trim().replace(/^["']|["']$/g, "");
11616
- return path13 && normalize(path13);
11615
+ const path12 = input.trim().replace(/^["']|["']$/g, "");
11616
+ return path12 && normalize(path12);
11617
11617
  }
11618
11618
  var parseCheckIgnore;
11619
11619
  var init_CheckIgnore = __esm({
@@ -11888,8 +11888,8 @@ __export(sub_module_exports, {
11888
11888
  subModuleTask: () => subModuleTask,
11889
11889
  updateSubModuleTask: () => updateSubModuleTask
11890
11890
  });
11891
- function addSubModuleTask(repo, path13) {
11892
- return subModuleTask(["add", repo, path13]);
11891
+ function addSubModuleTask(repo, path12) {
11892
+ return subModuleTask(["add", repo, path12]);
11893
11893
  }
11894
11894
  function initSubModuleTask(customArgs) {
11895
11895
  return subModuleTask(["init", ...customArgs]);
@@ -12199,8 +12199,8 @@ var require_git = __commonJS2({
12199
12199
  }
12200
12200
  return this._runTask(straightThroughStringTask2(command, this._trimmed), next);
12201
12201
  };
12202
- Git2.prototype.submoduleAdd = function(repo, path13, then) {
12203
- return this._runTask(addSubModuleTask2(repo, path13), trailingFunctionArgument2(arguments));
12202
+ Git2.prototype.submoduleAdd = function(repo, path12, then) {
12203
+ return this._runTask(addSubModuleTask2(repo, path12), trailingFunctionArgument2(arguments));
12204
12204
  };
12205
12205
  Git2.prototype.submoduleUpdate = function(args, then) {
12206
12206
  return this._runTask(
@@ -14544,24 +14544,24 @@ var PersistentIndex = class {
14544
14544
  /**
14545
14545
  * Store a chunk embedding (file-level, function-level, etc.)
14546
14546
  */
14547
- storeEmbedding(path13, chunkId, chunkType, contentHash, vector, metadata) {
14547
+ storeEmbedding(path12, chunkId, chunkType, contentHash, vector, metadata) {
14548
14548
  const vectorBuf = Buffer.from(new Float32Array(vector).buffer);
14549
14549
  this.db.prepare(`
14550
14550
  INSERT OR REPLACE INTO embeddings (path, chunk_id, chunk_type, content_hash, vector, metadata)
14551
14551
  VALUES (?, ?, ?, ?, ?, ?)
14552
- `).run(path13, chunkId, chunkType, contentHash, vectorBuf, JSON.stringify(metadata ?? {}));
14552
+ `).run(path12, chunkId, chunkType, contentHash, vectorBuf, JSON.stringify(metadata ?? {}));
14553
14553
  }
14554
14554
  /**
14555
14555
  * Load embedding for a specific chunk.
14556
14556
  */
14557
- loadEmbedding(path13, chunkId) {
14558
- const row = this.db.prepare("SELECT vector, content_hash, metadata FROM embeddings WHERE path = ? AND chunk_id = ?").get(path13, chunkId);
14557
+ loadEmbedding(path12, chunkId) {
14558
+ const row = this.db.prepare("SELECT vector, content_hash, metadata FROM embeddings WHERE path = ? AND chunk_id = ?").get(path12, chunkId);
14559
14559
  if (!row) return null;
14560
14560
  let metadata;
14561
14561
  try {
14562
14562
  metadata = JSON.parse(row.metadata);
14563
14563
  } catch {
14564
- console.warn(`[PersistentIndex] Corrupted metadata JSON for embedding ${path13}:${chunkId} \u2014 returning null`);
14564
+ console.warn(`[PersistentIndex] Corrupted metadata JSON for embedding ${path12}:${chunkId} \u2014 returning null`);
14565
14565
  return null;
14566
14566
  }
14567
14567
  return {
@@ -15293,13 +15293,13 @@ var MAX_READ_BYTES = 48e4;
15293
15293
  function loadAiEditorChatsMemoryFromDisk(rootPath) {
15294
15294
  const abs = path2.join(rootPath, ...REL_SEGMENTS);
15295
15295
  try {
15296
- const st = fs7.statSync(abs);
15296
+ const st = fs6.statSync(abs);
15297
15297
  if (!st.isFile()) return null;
15298
- const fd = fs7.openSync(abs, "r");
15298
+ const fd = fs6.openSync(abs, "r");
15299
15299
  try {
15300
15300
  const toRead = Math.min(st.size, MAX_READ_BYTES);
15301
15301
  const buf = Buffer.alloc(toRead);
15302
- fs7.readSync(fd, buf, 0, toRead, 0);
15302
+ fs6.readSync(fd, buf, 0, toRead, 0);
15303
15303
  const markdown = buf.toString("utf8").trim();
15304
15304
  if (!markdown) return null;
15305
15305
  return {
@@ -15309,7 +15309,7 @@ function loadAiEditorChatsMemoryFromDisk(rootPath) {
15309
15309
  fileMtimeMs: Math.floor(st.mtimeMs)
15310
15310
  };
15311
15311
  } finally {
15312
- fs7.closeSync(fd);
15312
+ fs6.closeSync(fd);
15313
15313
  }
15314
15314
  } catch {
15315
15315
  return null;
@@ -16937,8 +16937,8 @@ var EnhancedRuleEvaluator = class {
16937
16937
  };
16938
16938
  var RuleParser = class _RuleParser {
16939
16939
  static parseFile(filePath2) {
16940
- if (!fs7.existsSync(filePath2)) throw new Error(`Rule file not found: ${filePath2}`);
16941
- const content = fs7.readFileSync(filePath2, "utf-8");
16940
+ if (!fs6.existsSync(filePath2)) throw new Error(`Rule file not found: ${filePath2}`);
16941
+ const content = fs6.readFileSync(filePath2, "utf-8");
16942
16942
  return _RuleParser.parse(content);
16943
16943
  }
16944
16944
  static parse(yamlContent) {
@@ -17014,7 +17014,7 @@ var RuleParser = class _RuleParser {
17014
17014
  static createDefaultConfig(workspaceRoot, template) {
17015
17015
  const configPath = path2.join(workspaceRoot, ".vibecheck-rules.yaml");
17016
17016
  const content = template ? _RuleParser.getTemplate(template) : DEFAULT_CONFIG;
17017
- fs7.writeFileSync(configPath, content);
17017
+ fs6.writeFileSync(configPath, content);
17018
17018
  return configPath;
17019
17019
  }
17020
17020
  static simpleYamlParse(content) {
@@ -18377,7 +18377,7 @@ var DEFAULT_CAPABILITIES = {
18377
18377
  semanticIntentQuery: "deferred"
18378
18378
  };
18379
18379
  var defaultCollaborators = {
18380
- fileExists: fs7.existsSync,
18380
+ fileExists: fs6.existsSync,
18381
18381
  parseRulesFile: RuleParser.parseFile,
18382
18382
  createDependencyGraphAnalyzer: (rootPath, data) => new DependencyGraphAnalyzer(rootPath, data),
18383
18383
  createDNAAnalyzer: (rootPath, data) => new CodebaseDNAAnalyzer(rootPath, data),
@@ -18439,85 +18439,111 @@ var ContextEngine = class {
18439
18439
  this.degradations = [];
18440
18440
  this.capabilities = { ...DEFAULT_CAPABILITIES };
18441
18441
  const fingerprint = this.buildFingerprint(data);
18442
- await this.runPhase("rules-load", async () => {
18443
- if (!this.config.rulesPath || !this.collaborators.fileExists(this.config.rulesPath)) {
18444
- return "skipped";
18442
+ await this.runPhase(
18443
+ "rules-load",
18444
+ async () => {
18445
+ if (!this.config.rulesPath || !this.collaborators.fileExists(this.config.rulesPath)) {
18446
+ return "skipped";
18447
+ }
18448
+ this.ruleConfig = this.collaborators.parseRulesFile(this.config.rulesPath);
18449
+ return "completed";
18450
+ },
18451
+ (error) => {
18452
+ this.recordDegradation({
18453
+ scope: "rules",
18454
+ phase: "rules-load",
18455
+ message: `Failed to parse rules: ${this.stringifyError(error)}`,
18456
+ fallback: "Continue without rule configuration",
18457
+ recoverable: true
18458
+ });
18459
+ this.ruleConfig = null;
18445
18460
  }
18446
- this.ruleConfig = this.collaborators.parseRulesFile(this.config.rulesPath);
18447
- return "completed";
18448
- }, (error) => {
18449
- this.recordDegradation({
18450
- scope: "rules",
18451
- phase: "rules-load",
18452
- message: `Failed to parse rules: ${this.stringifyError(error)}`,
18453
- fallback: "Continue without rule configuration",
18454
- recoverable: true
18455
- });
18456
- this.ruleConfig = null;
18457
- });
18458
- await this.runPhase("graph-build", async () => {
18459
- const graphAnalyzer = this.collaborators.createDependencyGraphAnalyzer(this.config.rootPath, data);
18460
- this.graph = graphAnalyzer.build(this.ruleConfig?.layers || this.config.layerDefinitions);
18461
- return "completed";
18462
- }, (error) => {
18463
- this.recordDegradation({
18464
- scope: "graph",
18465
- phase: "graph-build",
18466
- message: `Failed to build dependency graph: ${this.stringifyError(error)}`,
18467
- fallback: "Use deterministic fallback graph built from import records",
18468
- recoverable: true
18469
- });
18470
- this.graph = this.createFallbackGraph(data, this.ruleConfig?.layers || this.config.layerDefinitions);
18471
- });
18472
- await this.runPhase("dna-analyze", async () => {
18473
- const dnaAnalyzer = this.collaborators.createDNAAnalyzer(this.config.rootPath, data);
18474
- this.dna = await dnaAnalyzer.analyze(fingerprint);
18475
- return "completed";
18476
- }, (error) => {
18477
- this.recordDegradation({
18478
- scope: "dna",
18479
- phase: "dna-analyze",
18480
- message: `Failed to analyze codebase DNA: ${this.stringifyError(error)}`,
18481
- fallback: "Use minimal DNA derived from fingerprint only",
18482
- recoverable: true
18483
- });
18484
- this.dna = this.createFallbackDNA(fingerprint);
18485
- });
18486
- await this.runPhase("rules-evaluate", async () => {
18487
- if (!this.ruleConfig || this.ruleConfig.rules.length === 0) {
18488
- return "skipped";
18461
+ );
18462
+ await this.runPhase(
18463
+ "graph-build",
18464
+ async () => {
18465
+ const graphAnalyzer = this.collaborators.createDependencyGraphAnalyzer(
18466
+ this.config.rootPath,
18467
+ data
18468
+ );
18469
+ this.graph = graphAnalyzer.build(this.ruleConfig?.layers || this.config.layerDefinitions);
18470
+ return "completed";
18471
+ },
18472
+ (error) => {
18473
+ this.recordDegradation({
18474
+ scope: "graph",
18475
+ phase: "graph-build",
18476
+ message: `Failed to build dependency graph: ${this.stringifyError(error)}`,
18477
+ fallback: "Use deterministic fallback graph built from import records",
18478
+ recoverable: true
18479
+ });
18480
+ this.graph = this.createFallbackGraph(
18481
+ data,
18482
+ this.ruleConfig?.layers || this.config.layerDefinitions
18483
+ );
18489
18484
  }
18490
- const evaluator = this.collaborators.createRuleEvaluator(
18491
- data,
18492
- this.config.rootPath,
18493
- this.ruleConfig.layers || this.config.layerDefinitions
18494
- );
18495
- this.ruleResult = evaluator.evaluate(this.ruleConfig.rules);
18496
- return "completed";
18497
- }, (error) => {
18498
- this.recordDegradation({
18499
- scope: "rules",
18500
- phase: "rules-evaluate",
18501
- message: `Failed to evaluate rules: ${this.stringifyError(error)}`,
18502
- fallback: "Continue with synthesis and impact analysis but omit active rule violations",
18503
- recoverable: true
18504
- });
18505
- this.ruleResult = null;
18506
- });
18507
- await this.runPhase("synthesizer-build", async () => {
18508
- const nexus = this.buildNexusSummary();
18509
- this.synthesizer = this.collaborators.createSynthesizer(
18510
- this.config.rootPath,
18511
- data,
18512
- this.dna,
18513
- this.graph,
18514
- this.ruleResult || void 0,
18515
- nexus
18516
- );
18517
- return "completed";
18518
- }, (error) => {
18519
- throw new Error(`Failed to build synthesizer: ${this.stringifyError(error)}`);
18520
- });
18485
+ );
18486
+ await this.runPhase(
18487
+ "dna-analyze",
18488
+ async () => {
18489
+ const dnaAnalyzer = this.collaborators.createDNAAnalyzer(this.config.rootPath, data);
18490
+ this.dna = await dnaAnalyzer.analyze(fingerprint);
18491
+ return "completed";
18492
+ },
18493
+ (error) => {
18494
+ this.recordDegradation({
18495
+ scope: "dna",
18496
+ phase: "dna-analyze",
18497
+ message: `Failed to analyze codebase DNA: ${this.stringifyError(error)}`,
18498
+ fallback: "Use minimal DNA derived from fingerprint only",
18499
+ recoverable: true
18500
+ });
18501
+ this.dna = this.createFallbackDNA(fingerprint);
18502
+ }
18503
+ );
18504
+ await this.runPhase(
18505
+ "rules-evaluate",
18506
+ async () => {
18507
+ if (!this.ruleConfig || this.ruleConfig.rules.length === 0) {
18508
+ return "skipped";
18509
+ }
18510
+ const evaluator = this.collaborators.createRuleEvaluator(
18511
+ data,
18512
+ this.config.rootPath,
18513
+ this.ruleConfig.layers || this.config.layerDefinitions
18514
+ );
18515
+ this.ruleResult = evaluator.evaluate(this.ruleConfig.rules);
18516
+ return "completed";
18517
+ },
18518
+ (error) => {
18519
+ this.recordDegradation({
18520
+ scope: "rules",
18521
+ phase: "rules-evaluate",
18522
+ message: `Failed to evaluate rules: ${this.stringifyError(error)}`,
18523
+ fallback: "Continue with synthesis and impact analysis but omit active rule violations",
18524
+ recoverable: true
18525
+ });
18526
+ this.ruleResult = null;
18527
+ }
18528
+ );
18529
+ await this.runPhase(
18530
+ "synthesizer-build",
18531
+ async () => {
18532
+ const nexus = this.buildNexusSummary();
18533
+ this.synthesizer = this.collaborators.createSynthesizer(
18534
+ this.config.rootPath,
18535
+ data,
18536
+ this.dna,
18537
+ this.graph,
18538
+ this.ruleResult || void 0,
18539
+ nexus
18540
+ );
18541
+ return "completed";
18542
+ },
18543
+ (error) => {
18544
+ throw new Error(`Failed to build synthesizer: ${this.stringifyError(error)}`);
18545
+ }
18546
+ );
18521
18547
  this.initialized = true;
18522
18548
  this.capabilities = {
18523
18549
  canSynthesize: this.synthesizer !== null,
@@ -18697,7 +18723,12 @@ var ContextEngine = class {
18697
18723
  */
18698
18724
  async intentQuery(query, options) {
18699
18725
  this.assertInitialized();
18700
- const result = await this.collaborators.intentQuery(this.config.rootPath, this.data, query, options ?? {});
18726
+ const result = await this.collaborators.intentQuery(
18727
+ this.config.rootPath,
18728
+ this.data,
18729
+ query,
18730
+ options ?? {}
18731
+ );
18701
18732
  if (result.execution.degradations.length > 0) {
18702
18733
  for (const degradation of result.execution.degradations) {
18703
18734
  this.recordDegradation(degradation);
@@ -18714,7 +18745,10 @@ var ContextEngine = class {
18714
18745
  analyzeImpact(changedFile) {
18715
18746
  this.assertInitialized();
18716
18747
  try {
18717
- const graphAnalyzer = this.collaborators.createDependencyGraphAnalyzer(this.config.rootPath, this.data);
18748
+ const graphAnalyzer = this.collaborators.createDependencyGraphAnalyzer(
18749
+ this.config.rootPath,
18750
+ this.data
18751
+ );
18718
18752
  graphAnalyzer.build(this.ruleConfig?.layers || this.config.layerDefinitions);
18719
18753
  return graphAnalyzer.analyzeImpact(changedFile, this.ruleResult?.violations);
18720
18754
  } catch {
@@ -18916,7 +18950,13 @@ var ContextEngine = class {
18916
18950
  }
18917
18951
  }
18918
18952
  const affected = [normalizedPath, ...directlyAffected, ...transitivelyAffected];
18919
- const testsToRun = this.data.files.filter((file) => file.relativePath.includes(".test.") || file.relativePath.includes(".spec.")).filter((file) => affected.some((candidate) => file.relativePath.includes(path2.basename(candidate, path2.extname(candidate))))).map((file) => file.relativePath);
18953
+ const testsToRun = this.data.files.filter(
18954
+ (file) => file.relativePath.includes(".test.") || file.relativePath.includes(".spec.")
18955
+ ).filter(
18956
+ (file) => affected.some(
18957
+ (candidate) => file.relativePath.includes(path2.basename(candidate, path2.extname(candidate)))
18958
+ )
18959
+ ).map((file) => file.relativePath);
18920
18960
  const brokenRules = (this.ruleResult?.violations || []).filter(
18921
18961
  (violation) => affected.some(
18922
18962
  (candidate) => violation.sourceSymbol.filePath.includes(candidate) || violation.targetSymbol && violation.targetSymbol.filePath.includes(candidate)
@@ -18936,11 +18976,14 @@ var ContextEngine = class {
18936
18976
  }
18937
18977
  resolveFallbackLayer(filePath2, layerDefs) {
18938
18978
  if (!layerDefs || layerDefs.length === 0) return void 0;
18939
- return layerDefs.find((layer) => filePath2.startsWith(layer.match.replace("/**", "").replace("**", "")))?.name;
18979
+ return layerDefs.find(
18980
+ (layer) => filePath2.startsWith(layer.match.replace("/**", "").replace("**", ""))
18981
+ )?.name;
18940
18982
  }
18941
18983
  classifyFallbackNodeKind(filePath2) {
18942
18984
  const rel = filePath2.toLowerCase();
18943
- if (rel.includes(".test.") || rel.includes(".spec.") || rel.includes("__tests__")) return "test";
18985
+ if (rel.includes(".test.") || rel.includes(".spec.") || rel.includes("__tests__"))
18986
+ return "test";
18944
18987
  if (rel.includes("service")) return "service";
18945
18988
  if (rel.includes("config")) return "config";
18946
18989
  if (rel.endsWith(".tsx")) return "component";
@@ -18978,18 +19021,28 @@ var ContextEngine = class {
18978
19021
  const ext2 = path2.extname(file.relativePath);
18979
19022
  extCounts.set(ext2, (extCounts.get(ext2) || 0) + 1);
18980
19023
  }
18981
- const dominantFileTypes = [...extCounts.entries()].map(([ext2, count]) => ({ ext: ext2, count, percentage: Math.round(count / data.files.length * 100) })).sort((a, b2) => b2.count - a.count).slice(0, 5);
19024
+ const dominantFileTypes = [...extCounts.entries()].map(([ext2, count]) => ({
19025
+ ext: ext2,
19026
+ count,
19027
+ percentage: Math.round(count / data.files.length * 100)
19028
+ })).sort((a, b2) => b2.count - a.count).slice(0, 5);
18982
19029
  const totalLines = data.files.reduce((sum, f) => sum + f.lineCount, 0);
18983
19030
  const monorepo = this.collaborators.fileExists(path2.join(this.config.rootPath, "pnpm-workspace.yaml")) || this.collaborators.fileExists(path2.join(this.config.rootPath, "lerna.json"));
18984
19031
  let packageManager = "npm";
18985
- if (this.collaborators.fileExists(path2.join(this.config.rootPath, "pnpm-lock.yaml"))) packageManager = "pnpm";
18986
- else if (this.collaborators.fileExists(path2.join(this.config.rootPath, "yarn.lock"))) packageManager = "yarn";
18987
- else if (this.collaborators.fileExists(path2.join(this.config.rootPath, "bun.lockb"))) packageManager = "bun";
19032
+ if (this.collaborators.fileExists(path2.join(this.config.rootPath, "pnpm-lock.yaml")))
19033
+ packageManager = "pnpm";
19034
+ else if (this.collaborators.fileExists(path2.join(this.config.rootPath, "yarn.lock")))
19035
+ packageManager = "yarn";
19036
+ else if (this.collaborators.fileExists(path2.join(this.config.rootPath, "bun.lockb")))
19037
+ packageManager = "bun";
18988
19038
  const hasDocker = this.collaborators.fileExists(path2.join(this.config.rootPath, "Dockerfile")) || this.collaborators.fileExists(path2.join(this.config.rootPath, "docker-compose.yml"));
18989
- const hasCI = this.collaborators.fileExists(path2.join(this.config.rootPath, ".github", "workflows"));
19039
+ const hasCI = this.collaborators.fileExists(
19040
+ path2.join(this.config.rootPath, ".github", "workflows")
19041
+ );
18990
19042
  const entryPoints = [];
18991
19043
  const checkEntry = (rel) => {
18992
- if (this.collaborators.fileExists(path2.join(this.config.rootPath, rel))) entryPoints.push(rel);
19044
+ if (this.collaborators.fileExists(path2.join(this.config.rootPath, rel)))
19045
+ entryPoints.push(rel);
18993
19046
  };
18994
19047
  checkEntry("src/index.ts");
18995
19048
  checkEntry("src/main.ts");
@@ -19016,7 +19069,8 @@ var ContextEngine = class {
19016
19069
  };
19017
19070
  }
19018
19071
  detectFramework(imports) {
19019
- if (imports.has("next") || imports.has("next/server") || imports.has("next/navigation")) return "Next.js";
19072
+ if (imports.has("next") || imports.has("next/server") || imports.has("next/navigation"))
19073
+ return "Next.js";
19020
19074
  if (imports.has("nuxt") || imports.has("#app")) return "Nuxt.js";
19021
19075
  if (imports.has("@sveltejs/kit")) return "SvelteKit";
19022
19076
  if (imports.has("@remix-run/react")) return "Remix";
@@ -19213,14 +19267,18 @@ var ContextEngine = class {
19213
19267
  if (!this.codeGraph) return null;
19214
19268
  let orchestratorMod = null;
19215
19269
  try {
19216
- orchestratorMod = await loadOptionalModule("@vibecheck/nexus-orchestrator");
19270
+ orchestratorMod = await loadOptionalModule(
19271
+ "@vibecheck/nexus-orchestrator"
19272
+ );
19217
19273
  } catch {
19218
19274
  return null;
19219
19275
  }
19220
19276
  if (!orchestratorMod?.NexusOrchestrator) return null;
19221
19277
  let truthpack = void 0;
19222
19278
  try {
19223
- const truthpackMod = await loadOptionalModule("@vibecheck/truthpack");
19279
+ const truthpackMod = await loadOptionalModule(
19280
+ "@vibecheck/truthpack"
19281
+ );
19224
19282
  if (truthpackMod && typeof truthpackMod.loadTruthpack === "function") {
19225
19283
  truthpack = await truthpackMod.loadTruthpack(
19226
19284
  this.config.truthpackPath ?? path2.join(this.config.rootPath, ".vibecheck", "truthpack")
@@ -19247,7 +19305,9 @@ var ContextEngine = class {
19247
19305
  async getNexusSentinelStatus() {
19248
19306
  let sentinelMod = null;
19249
19307
  try {
19250
- sentinelMod = await loadOptionalModule("@vibecheck/nexus-sentinel");
19308
+ sentinelMod = await loadOptionalModule(
19309
+ "@vibecheck/nexus-sentinel"
19310
+ );
19251
19311
  } catch {
19252
19312
  return null;
19253
19313
  }
@@ -20302,7 +20362,7 @@ var NexusWatcher = class {
20302
20362
  async function loadChokidar() {
20303
20363
  const mod = await import(
20304
20364
  /* @vite-ignore */
20305
- './chokidar-CI5VJY5M.js'
20365
+ './chokidar-UOK5UIOF.js'
20306
20366
  );
20307
20367
  if (mod.default?.watch) return mod.default;
20308
20368
  if (mod.watch) return { watch: mod.watch };
@@ -20443,7 +20503,7 @@ var SentinelStateStore = class {
20443
20503
  load() {
20444
20504
  let raw;
20445
20505
  try {
20446
- raw = fs7.readFileSync(this.statePath, { encoding: "utf-8" });
20506
+ raw = fs6.readFileSync(this.statePath, { encoding: "utf-8" });
20447
20507
  } catch {
20448
20508
  return structuredClone(DEFAULT_STATE);
20449
20509
  }
@@ -20457,10 +20517,10 @@ var SentinelStateStore = class {
20457
20517
  /** Atomically write state. Creates parent directory on first write. */
20458
20518
  save(state) {
20459
20519
  const dir = path2.dirname(this.statePath);
20460
- if (dir) fs7.mkdirSync(dir, { recursive: true });
20520
+ if (dir) fs6.mkdirSync(dir, { recursive: true });
20461
20521
  const tmp = `${this.statePath}.tmp`;
20462
- fs7.writeFileSync(tmp, JSON.stringify(state, null, 2), { encoding: "utf-8" });
20463
- fs7.renameSync(tmp, this.statePath);
20522
+ fs6.writeFileSync(tmp, JSON.stringify(state, null, 2), { encoding: "utf-8" });
20523
+ fs6.renameSync(tmp, this.statePath);
20464
20524
  }
20465
20525
  };
20466
20526
  var DEFAULT_STATE_PATH = ".vibecheck/nexus/sentinel.json";
@@ -22034,7 +22094,7 @@ var defaultFS = {
22034
22094
  realpath
22035
22095
  }
22036
22096
  };
22037
- var fsFromOption = (fsOption) => !fsOption || fsOption === defaultFS || fsOption === fs7 ? defaultFS : {
22097
+ var fsFromOption = (fsOption) => !fsOption || fsOption === defaultFS || fsOption === fs6 ? defaultFS : {
22038
22098
  ...defaultFS,
22039
22099
  ...fsOption,
22040
22100
  promises: {
@@ -22286,12 +22346,12 @@ var PathBase = class {
22286
22346
  /**
22287
22347
  * Get the Path object referenced by the string path, resolved from this Path
22288
22348
  */
22289
- resolve(path13) {
22290
- if (!path13) {
22349
+ resolve(path12) {
22350
+ if (!path12) {
22291
22351
  return this;
22292
22352
  }
22293
- const rootPath = this.getRootString(path13);
22294
- const dir = path13.substring(rootPath.length);
22353
+ const rootPath = this.getRootString(path12);
22354
+ const dir = path12.substring(rootPath.length);
22295
22355
  const dirParts = dir.split(this.splitSep);
22296
22356
  const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
22297
22357
  return result;
@@ -23043,8 +23103,8 @@ var PathWin32 = class _PathWin32 extends PathBase {
23043
23103
  /**
23044
23104
  * @internal
23045
23105
  */
23046
- getRootString(path13) {
23047
- return win32.parse(path13).root;
23106
+ getRootString(path12) {
23107
+ return win32.parse(path12).root;
23048
23108
  }
23049
23109
  /**
23050
23110
  * @internal
@@ -23090,8 +23150,8 @@ var PathPosix = class _PathPosix extends PathBase {
23090
23150
  /**
23091
23151
  * @internal
23092
23152
  */
23093
- getRootString(path13) {
23094
- return path13.startsWith("/") ? "/" : "";
23153
+ getRootString(path12) {
23154
+ return path12.startsWith("/") ? "/" : "";
23095
23155
  }
23096
23156
  /**
23097
23157
  * @internal
@@ -23140,8 +23200,8 @@ var PathScurryBase = class {
23140
23200
  *
23141
23201
  * @internal
23142
23202
  */
23143
- constructor(cwd = process.cwd(), pathImpl, sep3, { nocase, childrenCacheSize = 16 * 1024, fs: fs8 = defaultFS } = {}) {
23144
- this.#fs = fsFromOption(fs8);
23203
+ constructor(cwd = process.cwd(), pathImpl, sep3, { nocase, childrenCacheSize = 16 * 1024, fs: fs7 = defaultFS } = {}) {
23204
+ this.#fs = fsFromOption(fs7);
23145
23205
  if (cwd instanceof URL || cwd.startsWith("file://")) {
23146
23206
  cwd = fileURLToPath(cwd);
23147
23207
  }
@@ -23180,11 +23240,11 @@ var PathScurryBase = class {
23180
23240
  /**
23181
23241
  * Get the depth of a provided path, string, or the cwd
23182
23242
  */
23183
- depth(path13 = this.cwd) {
23184
- if (typeof path13 === "string") {
23185
- path13 = this.cwd.resolve(path13);
23243
+ depth(path12 = this.cwd) {
23244
+ if (typeof path12 === "string") {
23245
+ path12 = this.cwd.resolve(path12);
23186
23246
  }
23187
- return path13.depth();
23247
+ return path12.depth();
23188
23248
  }
23189
23249
  /**
23190
23250
  * Return the cache of child entries. Exposed so subclasses can create
@@ -23671,9 +23731,9 @@ var PathScurryBase = class {
23671
23731
  process2();
23672
23732
  return results;
23673
23733
  }
23674
- chdir(path13 = this.cwd) {
23734
+ chdir(path12 = this.cwd) {
23675
23735
  const oldCwd = this.cwd;
23676
- this.cwd = typeof path13 === "string" ? this.cwd.resolve(path13) : path13;
23736
+ this.cwd = typeof path12 === "string" ? this.cwd.resolve(path12) : path12;
23677
23737
  this.cwd[setAsCwd](oldCwd);
23678
23738
  }
23679
23739
  };
@@ -23699,8 +23759,8 @@ var PathScurryWin32 = class extends PathScurryBase {
23699
23759
  /**
23700
23760
  * @internal
23701
23761
  */
23702
- newRoot(fs8) {
23703
- return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs8 });
23762
+ newRoot(fs7) {
23763
+ return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs7 });
23704
23764
  }
23705
23765
  /**
23706
23766
  * Return true if the provided path string is an absolute path
@@ -23728,8 +23788,8 @@ var PathScurryPosix = class extends PathScurryBase {
23728
23788
  /**
23729
23789
  * @internal
23730
23790
  */
23731
- newRoot(fs8) {
23732
- return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs8 });
23791
+ newRoot(fs7) {
23792
+ return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs7 });
23733
23793
  }
23734
23794
  /**
23735
23795
  * Return true if the provided path string is an absolute path
@@ -24029,8 +24089,8 @@ var MatchRecord = class {
24029
24089
  }
24030
24090
  // match, absolute, ifdir
24031
24091
  entries() {
24032
- return [...this.store.entries()].map(([path13, n]) => [
24033
- path13,
24092
+ return [...this.store.entries()].map(([path12, n]) => [
24093
+ path12,
24034
24094
  !!(n & 2),
24035
24095
  !!(n & 1)
24036
24096
  ]);
@@ -24235,9 +24295,9 @@ var GlobUtil = class {
24235
24295
  signal;
24236
24296
  maxDepth;
24237
24297
  includeChildMatches;
24238
- constructor(patterns, path13, opts) {
24298
+ constructor(patterns, path12, opts) {
24239
24299
  this.patterns = patterns;
24240
- this.path = path13;
24300
+ this.path = path12;
24241
24301
  this.opts = opts;
24242
24302
  this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
24243
24303
  this.includeChildMatches = opts.includeChildMatches !== false;
@@ -24256,11 +24316,11 @@ var GlobUtil = class {
24256
24316
  });
24257
24317
  }
24258
24318
  }
24259
- #ignored(path13) {
24260
- return this.seen.has(path13) || !!this.#ignore?.ignored?.(path13);
24319
+ #ignored(path12) {
24320
+ return this.seen.has(path12) || !!this.#ignore?.ignored?.(path12);
24261
24321
  }
24262
- #childrenIgnored(path13) {
24263
- return !!this.#ignore?.childrenIgnored?.(path13);
24322
+ #childrenIgnored(path12) {
24323
+ return !!this.#ignore?.childrenIgnored?.(path12);
24264
24324
  }
24265
24325
  // backpressure mechanism
24266
24326
  pause() {
@@ -24475,8 +24535,8 @@ var GlobUtil = class {
24475
24535
  };
24476
24536
  var GlobWalker = class extends GlobUtil {
24477
24537
  matches = /* @__PURE__ */ new Set();
24478
- constructor(patterns, path13, opts) {
24479
- super(patterns, path13, opts);
24538
+ constructor(patterns, path12, opts) {
24539
+ super(patterns, path12, opts);
24480
24540
  }
24481
24541
  matchEmit(e) {
24482
24542
  this.matches.add(e);
@@ -24513,8 +24573,8 @@ var GlobWalker = class extends GlobUtil {
24513
24573
  };
24514
24574
  var GlobStream = class extends GlobUtil {
24515
24575
  results;
24516
- constructor(patterns, path13, opts) {
24517
- super(patterns, path13, opts);
24576
+ constructor(patterns, path12, opts) {
24577
+ super(patterns, path12, opts);
24518
24578
  this.results = new Minipass({
24519
24579
  signal: this.signal,
24520
24580
  objectMode: true
@@ -25117,6 +25177,17 @@ async function loadTruthpack2(projectRoot) {
25117
25177
  return null;
25118
25178
  }
25119
25179
  }
25180
+ var mcpSemverModuleDir = dirname(fileURLToPath(import.meta.url));
25181
+ function getMcpPackageSemver() {
25182
+ try {
25183
+ const pkgPath = join(mcpSemverModuleDir, "..", "package.json");
25184
+ const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
25185
+ const v = pkg.version?.trim();
25186
+ if (v && /^\d+\.\d+\.\d+/.test(v)) return v;
25187
+ } catch {
25188
+ }
25189
+ return "25.0.0";
25190
+ }
25120
25191
 
25121
25192
  // src/plan-resolver.ts
25122
25193
  var MCP_LOG = {
@@ -25150,6 +25221,12 @@ function getCached() {
25150
25221
  function setCache(user) {
25151
25222
  _cached = { user, expiresAt: Date.now() + CACHE_TTL_MS };
25152
25223
  }
25224
+ function shouldHonorMcpDevTierOverride() {
25225
+ if (process.env.NODE_ENV === "production") return false;
25226
+ if (process.env.VIBECHECK_DISABLE_DEV_TIER === "1") return false;
25227
+ const allow = process.env.VIBECHECK_ALLOW_DEV_TIER?.trim().toLowerCase();
25228
+ return allow === "1" || allow === "true" || allow === "yes" || allow === "on";
25229
+ }
25153
25230
  async function resolveUserPlan() {
25154
25231
  const resolved = await resolveUser();
25155
25232
  return resolved.plan;
@@ -25158,14 +25235,16 @@ async function resolveUser() {
25158
25235
  const cached = getCached();
25159
25236
  if (cached) return cached;
25160
25237
  const devTier = process.env.VIBECHECK_DEV_TIER?.trim();
25161
- if (devTier && process.env.NODE_ENV !== "production" && process.env.VIBECHECK_DISABLE_DEV_TIER !== "1") {
25238
+ if (devTier && shouldHonorMcpDevTierOverride()) {
25162
25239
  const plan = normalizePlanId(devTier);
25163
25240
  const result = {
25164
25241
  plan: plan ?? "free",
25165
25242
  userId: "dev-user",
25166
25243
  authenticated: true
25167
25244
  };
25168
- console.error(`[${MCP_LOG.DEV_OVERRIDE}] VIBECHECK_DEV_TIER="${devTier}" \u2192 plan=${result.plan}`);
25245
+ console.error(
25246
+ `[${MCP_LOG.DEV_OVERRIDE}] VIBECHECK_DEV_TIER="${devTier}" \u2192 plan=${result.plan}`
25247
+ );
25169
25248
  setCache(result);
25170
25249
  return result;
25171
25250
  }
@@ -25178,7 +25257,8 @@ async function resolveUser() {
25178
25257
  const response = await fetchCanonicalAccess({
25179
25258
  apiBaseUrl: getApiBaseUrl(),
25180
25259
  token,
25181
- signal: AbortSignal.timeout(1e4)
25260
+ signal: AbortSignal.timeout(1e4),
25261
+ clientIdentity: { clientType: "mcp", clientVersion: getMcpPackageSemver() }
25182
25262
  });
25183
25263
  if (!response.ok || !response.data) {
25184
25264
  console.error(`[${MCP_LOG.DENIED}] API returned status=${response.status}`);
@@ -25188,7 +25268,9 @@ async function resolveUser() {
25188
25268
  const userId = response.data.user?.id ?? null;
25189
25269
  const plan = rawPlan ? normalizePlanId(rawPlan) ?? "free" : "free";
25190
25270
  const result = { plan, userId, authenticated: true };
25191
- console.error(`[${MCP_LOG.RESOLVED}] userId=${userId} plan=${plan} status=${response.data.subscriptionStatus}`);
25271
+ console.error(
25272
+ `[${MCP_LOG.RESOLVED}] userId=${userId} plan=${plan} status=${response.data.subscriptionStatus}`
25273
+ );
25192
25274
  setCache(result);
25193
25275
  return result;
25194
25276
  } catch (error) {
@@ -25844,6 +25926,7 @@ var TOOL_FEATURE_MAP = {
25844
25926
  vibecheck_ship: FEATURE_NAMES.VERIFIED_BADGE,
25845
25927
  vibecheck_firewall: FEATURE_NAMES.FIREWALL_ENFORCE,
25846
25928
  vibecheck_isl: FEATURE_NAMES.ISL_STUDIO,
25929
+ vibecheck_isl_build: FEATURE_NAMES.ISL_STUDIO,
25847
25930
  vibecheck_docguard: FEATURE_NAMES.DOCGUARD,
25848
25931
  vibecheck_commitshield: FEATURE_NAMES.COMMIT_SHIELD,
25849
25932
  vibecheck_polish: FEATURE_NAMES.POLISH,
@@ -26066,6 +26149,43 @@ var MCP_TOOLS = [
26066
26149
  required: ["action"]
26067
26150
  }
26068
26151
  },
26152
+ {
26153
+ name: "vibecheck_isl_build",
26154
+ description: 'Full ISL build pipeline: natural-language prompt \u2192 ISL spec \u2192 @isl-lang/generator \u2192 gate verification \u2192 optional file injection into the workspace. Pro tier. Use when the user asks the agent to "build" or "scaffold" a feature (e.g. "login platform with Google + GitHub OAuth and a database") and you want verified, deterministic TypeScript instead of free-form LLM code.',
26155
+ inputSchema: {
26156
+ type: "object",
26157
+ properties: {
26158
+ prompt: {
26159
+ type: "string",
26160
+ description: "Natural-language feature description."
26161
+ },
26162
+ framework: {
26163
+ type: "string",
26164
+ enum: ["nextjs", "express", "fastify", "nestjs", "hono", "unknown"],
26165
+ description: "Target framework. Defaults to nextjs."
26166
+ },
26167
+ authLib: { type: "string", description: "Auth library (clerk, nextauth, passport, jwt)." },
26168
+ validationLib: {
26169
+ type: "string",
26170
+ description: "Validation library (zod, yup, joi). Defaults to zod."
26171
+ },
26172
+ dbLib: { type: "string", description: "DB library (prisma, drizzle, typeorm)." },
26173
+ targetDir: {
26174
+ type: "string",
26175
+ description: "Output directory (relative to workspace). Defaults to ./generated."
26176
+ },
26177
+ apply: {
26178
+ type: "boolean",
26179
+ description: "When true, the generated files are written into the workspace. When false (default), a dry-run plan + diffs are returned without touching disk."
26180
+ },
26181
+ threshold: {
26182
+ type: "number",
26183
+ description: "Minimum gate score required to permit apply. Defaults to 70."
26184
+ }
26185
+ },
26186
+ required: ["prompt"]
26187
+ }
26188
+ },
26069
26189
  {
26070
26190
  name: "vibecheck_ghost",
26071
26191
  description: "Ghost Mode \u2014 symbolic execution trace showing how AI-generated code will break at runtime without running it. Returns a line-by-line trace with verdicts.",
@@ -26331,7 +26451,10 @@ var MCP_TOOLS = [
26331
26451
  enum: ["assistant", "system"],
26332
26452
  description: "Display role for the message."
26333
26453
  },
26334
- content: { type: "string", description: "Message body. Markdown is rendered as plain text but fenced code blocks become applyable." }
26454
+ content: {
26455
+ type: "string",
26456
+ description: "Message body. Markdown is rendered as plain text but fenced code blocks become applyable."
26457
+ }
26335
26458
  },
26336
26459
  required: ["content"]
26337
26460
  }
@@ -26370,8 +26493,14 @@ var MCP_TOOLS = [
26370
26493
  description: "upstream = what depends on this; downstream = what does this depend on. Default upstream."
26371
26494
  },
26372
26495
  maxDepth: { type: "number", description: "Maximum traversal depth. Default 3." },
26373
- minConfidence: { type: "number", description: "Minimum edge confidence (0-1). Default 0.5." },
26374
- includeTests: { type: "boolean", description: "Include test files in the result. Default false." }
26496
+ minConfidence: {
26497
+ type: "number",
26498
+ description: "Minimum edge confidence (0-1). Default 0.5."
26499
+ },
26500
+ includeTests: {
26501
+ type: "boolean",
26502
+ description: "Include test files in the result. Default false."
26503
+ }
26375
26504
  },
26376
26505
  required: ["target"]
26377
26506
  }
@@ -26415,7 +26544,10 @@ var MCP_TOOLS = [
26415
26544
  type: "object",
26416
26545
  properties: {
26417
26546
  path: { type: "string", description: "Workspace root. Defaults to cwd." },
26418
- name: { type: "string", description: "Optional process name. If omitted, lists all processes." }
26547
+ name: {
26548
+ type: "string",
26549
+ description: "Optional process name. If omitted, lists all processes."
26550
+ }
26419
26551
  }
26420
26552
  }
26421
26553
  },
@@ -26536,7 +26668,11 @@ async function authorizeToolAccessWithX402(input) {
26536
26668
  proof: input.paymentProof
26537
26669
  });
26538
26670
  if (decision.allow) {
26539
- return { allowed: true, featureName: tierResult.featureName, requiredPlan: tierResult.requiredPlan };
26671
+ return {
26672
+ allowed: true,
26673
+ featureName: tierResult.featureName,
26674
+ requiredPlan: tierResult.requiredPlan
26675
+ };
26540
26676
  }
26541
26677
  if (decision.reason === "payment_required") {
26542
26678
  return {
@@ -26549,7 +26685,7 @@ async function authorizeToolAccessWithX402(input) {
26549
26685
  x402VerificationFailure: decision.verification
26550
26686
  };
26551
26687
  }
26552
- var VIBECHECK_DIR = path2.join(os2.homedir(), ".vibecheck");
26688
+ var VIBECHECK_DIR = path2.join(os.homedir(), ".vibecheck");
26553
26689
  path2.join(VIBECHECK_DIR, "scan-usage.json");
26554
26690
  path2.join(VIBECHECK_DIR, "scan-usage.lock");
26555
26691
  function apiBaseUrl() {
@@ -26570,7 +26706,14 @@ function scanMeterIdentityHeaders(client) {
26570
26706
  "X-Client-Version": client.version
26571
26707
  };
26572
26708
  }
26709
+ function explicitVcPreviewOptIn() {
26710
+ const v = process.env.VIBECHECK_ALLOW_DEV_TIER?.trim().toLowerCase();
26711
+ return v === "1" || v === "true" || v === "yes" || v === "on";
26712
+ }
26573
26713
  function shouldSkipServerScanMetering() {
26714
+ if (process.env.NODE_ENV === "production") return false;
26715
+ if (process.env.VIBECHECK_DISABLE_DEV_TIER === "1") return false;
26716
+ if (!explicitVcPreviewOptIn()) return false;
26574
26717
  return Boolean(process.env.VIBECHECK_DEV_TIER?.trim());
26575
26718
  }
26576
26719
  function isUnlimitedDailyScansPlan(plan) {
@@ -26651,7 +26794,7 @@ function createScanIdempotencyKey(prefix) {
26651
26794
  // src/mcp-scan-meter-client.ts
26652
26795
  var MCP_SCAN_METER_CLIENT = {
26653
26796
  type: "mcp",
26654
- version: "25.0.0"
26797
+ version: "26.0.1"
26655
26798
  };
26656
26799
 
26657
26800
  // ../shared/dist/chunk-YYSV5CG4.js
@@ -26747,7 +26890,7 @@ async function uploadScanToApi(report, options) {
26747
26890
  var execFileAsync = promisify(execFile);
26748
26891
  async function executeScan(targetPath, engineToggles = null) {
26749
26892
  const resolved = path2.resolve(targetPath);
26750
- const stat3 = fs7.statSync(resolved);
26893
+ const stat3 = fs6.statSync(resolved);
26751
26894
  const workspaceRoot = stat3.isDirectory() ? resolved : path2.dirname(resolved);
26752
26895
  const targets = [resolved];
26753
26896
  const result = await runOnFiles(targets, {
@@ -26939,7 +27082,9 @@ function formatImpactResult(result) {
26939
27082
  lines.push("|---|---|---|---|");
26940
27083
  for (const r2 of rows.slice(0, 50)) {
26941
27084
  const via = r2.via.length > 0 ? r2.via.join(" \u2192 ") : "\u2014";
26942
- lines.push(`| \`${r2.symbolId}\` | ${r2.depth} | ${pctFromScaled0to100(r2.confidence)} | ${via} |`);
27085
+ lines.push(
27086
+ `| \`${r2.symbolId}\` | ${r2.depth} | ${pctFromScaled0to100(r2.confidence)} | ${via} |`
27087
+ );
26943
27088
  }
26944
27089
  if (rows.length > 50) lines.push(`_+${rows.length - 50} more omitted._`);
26945
27090
  };
@@ -26978,12 +27123,16 @@ function formatProcessList(processes) {
26978
27123
  const lines = [];
26979
27124
  lines.push(`## Execution Flows (${processes.length})`);
26980
27125
  lines.push("");
26981
- lines.push("Each flow starts at an entry-point root and traces through calls, route wires, and CLI wires. Higher priority = more important to understand.");
27126
+ lines.push(
27127
+ "Each flow starts at an entry-point root and traces through calls, route wires, and CLI wires. Higher priority = more important to understand."
27128
+ );
26982
27129
  lines.push("");
26983
27130
  lines.push("| Process | Priority | Fan-Out | Depth | Steps |");
26984
27131
  lines.push("|---|---|---|---|---|");
26985
27132
  for (const p2 of processes.slice(0, 40)) {
26986
- lines.push(`| \`${p2.name}\` | ${p2.priority.toFixed(2)} | ${p2.fanOut} | ${p2.depth} | ${p2.steps.length} |`);
27133
+ lines.push(
27134
+ `| \`${p2.name}\` | ${p2.priority.toFixed(2)} | ${p2.fanOut} | ${p2.depth} | ${p2.steps.length} |`
27135
+ );
26987
27136
  }
26988
27137
  if (processes.length > 40) lines.push(`
26989
27138
  _+${processes.length - 40} more processes omitted._`);
@@ -26994,13 +27143,17 @@ function formatProcessDetail(proc2) {
26994
27143
  lines.push(`## Process: \`${proc2.name}\``);
26995
27144
  lines.push("");
26996
27145
  lines.push(`**Root:** \`${proc2.rootId}\``);
26997
- lines.push(`**Priority:** ${proc2.priority.toFixed(2)} \xB7 **Fan-Out:** ${proc2.fanOut} \xB7 **Depth:** ${proc2.depth}`);
27146
+ lines.push(
27147
+ `**Priority:** ${proc2.priority.toFixed(2)} \xB7 **Fan-Out:** ${proc2.fanOut} \xB7 **Depth:** ${proc2.depth}`
27148
+ );
26998
27149
  lines.push("");
26999
27150
  if (proc2.steps.length === 0) {
27000
27151
  lines.push("_No steps \u2014 this root doesn't dispatch to any indexed symbols._");
27001
27152
  return lines.join("\n");
27002
27153
  }
27003
- lines.push(`### Execution Trace (${proc2.steps.length} step${proc2.steps.length === 1 ? "" : "s"})`);
27154
+ lines.push(
27155
+ `### Execution Trace (${proc2.steps.length} step${proc2.steps.length === 1 ? "" : "s"})`
27156
+ );
27004
27157
  lines.push("");
27005
27158
  for (const step of proc2.steps.slice(0, 100)) {
27006
27159
  const indent = " ".repeat(Math.min(step.depth, 8));
@@ -27065,7 +27218,9 @@ function formatContextBundle(symbol, incoming, outgoing, processes, cluster) {
27065
27218
  lines.push("");
27066
27219
  lines.push("### Cluster");
27067
27220
  if (cluster) {
27068
- lines.push(`\`${cluster.id}\` \u2014 **${cluster.label}** (${cluster.size} members, cohesion ${cluster.cohesion.toFixed(2)})`);
27221
+ lines.push(
27222
+ `\`${cluster.id}\` \u2014 **${cluster.label}** (${cluster.size} members, cohesion ${cluster.cohesion.toFixed(2)})`
27223
+ );
27069
27224
  } else {
27070
27225
  lines.push("_Not assigned to any cluster._");
27071
27226
  }
@@ -27284,14 +27439,14 @@ function buildErrorResponse(text) {
27284
27439
  }
27285
27440
  function resolveWorkspaceRoot(cwd) {
27286
27441
  const resolvedRoot = path2.resolve(cwd);
27287
- return fs7.existsSync(resolvedRoot) ? fs7.realpathSync(resolvedRoot) : resolvedRoot;
27442
+ return fs6.existsSync(resolvedRoot) ? fs6.realpathSync(resolvedRoot) : resolvedRoot;
27288
27443
  }
27289
27444
  async function appendIslStudioInbox(workspaceRoot, jsonLine) {
27290
27445
  try {
27291
27446
  const dir = path2.join(workspaceRoot, ".vibecheck");
27292
- await fs7.promises.mkdir(dir, { recursive: true });
27447
+ await fs6.promises.mkdir(dir, { recursive: true });
27293
27448
  const target = path2.join(dir, "isl-studio-inbox.jsonl");
27294
- await fs7.promises.appendFile(target, jsonLine + "\n", "utf-8");
27449
+ await fs6.promises.appendFile(target, jsonLine + "\n", "utf-8");
27295
27450
  return { ok: true };
27296
27451
  } catch (err) {
27297
27452
  return { ok: false, message: err instanceof Error ? err.message : String(err) };
@@ -27300,7 +27455,7 @@ async function appendIslStudioInbox(workspaceRoot, jsonLine) {
27300
27455
  async function readIslStudioState(workspaceRoot) {
27301
27456
  try {
27302
27457
  const target = path2.join(workspaceRoot, ".vibecheck", "isl-studio", "editor-state.json");
27303
- const raw = await fs7.promises.readFile(target, "utf-8");
27458
+ const raw = await fs6.promises.readFile(target, "utf-8");
27304
27459
  const parsed = JSON.parse(raw);
27305
27460
  return {
27306
27461
  available: true,
@@ -27318,7 +27473,7 @@ async function readIslStudioState(workspaceRoot) {
27318
27473
  }
27319
27474
  function resolveWorkspaceTargetPath(workspaceRoot, requestedPath) {
27320
27475
  const resolvedTarget = path2.resolve(workspaceRoot, requestedPath);
27321
- const normalizedTarget = fs7.existsSync(resolvedTarget) ? fs7.realpathSync(resolvedTarget) : path2.normalize(resolvedTarget);
27476
+ const normalizedTarget = fs6.existsSync(resolvedTarget) ? fs6.realpathSync(resolvedTarget) : path2.normalize(resolvedTarget);
27322
27477
  const relative5 = path2.relative(workspaceRoot, normalizedTarget);
27323
27478
  if (relative5 === "" || !relative5.startsWith("..") && !path2.isAbsolute(relative5)) {
27324
27479
  return normalizedTarget;
@@ -27370,7 +27525,30 @@ function extractX402Proof(args) {
27370
27525
  async function handleCallToolRequest(request, runtimeOverrides = {}) {
27371
27526
  const runtime = getRuntime(runtimeOverrides);
27372
27527
  const { name, arguments: rawArgs } = request.params;
27528
+ const toolStartMs = Date.now();
27529
+ try {
27530
+ const { isMcpBelowMinimum } = await import('./version-gate-DWV5M7WC.js');
27531
+ const gate = await isMcpBelowMinimum("26.0.1");
27532
+ if (gate.belowMin) {
27533
+ return buildErrorResponse(
27534
+ `VibeCheck MCP ${"26.0.1"} is below the minimum supported version (${gate.minVersion}). Upgrade with: npm install -g @vibecheck-ai/mcp@latest`
27535
+ );
27536
+ }
27537
+ } catch {
27538
+ }
27539
+ try {
27540
+ const { trackToolCall } = await import('./analytics-P4AUZXCQ.js');
27541
+ trackToolCall(name);
27542
+ } catch {
27543
+ }
27373
27544
  if (!isKnownToolName(name)) {
27545
+ void (async () => {
27546
+ try {
27547
+ const { trackToolResult } = await import('./analytics-P4AUZXCQ.js');
27548
+ trackToolResult(name, false, Date.now() - toolStartMs, { reason: "unknown_tool" });
27549
+ } catch {
27550
+ }
27551
+ })();
27374
27552
  return buildErrorResponse(`Unknown tool: ${name}`);
27375
27553
  }
27376
27554
  if (rawArgs !== void 0 && (typeof rawArgs !== "object" || rawArgs === null || Array.isArray(rawArgs))) {
@@ -27710,10 +27888,10 @@ ${validation.errors.join("\n")}`);
27710
27888
  return buildErrorResponse(e instanceof Error ? e.message : "Invalid file path");
27711
27889
  }
27712
27890
  const absFile = path2.join(targetPath, relFile);
27713
- if (!fs7.existsSync(absFile) || !fs7.statSync(absFile).isFile()) {
27891
+ if (!fs6.existsSync(absFile) || !fs6.statSync(absFile).isFile()) {
27714
27892
  return buildErrorResponse(`Not a file: ${relFile}`);
27715
27893
  }
27716
- const { runGhostTrace } = await import('./dist-Y2Z46SBD.js');
27894
+ const { runGhostTrace } = await import('./dist-ZTADJLYH.js');
27717
27895
  const trace = await withTimeout(
27718
27896
  runGhostTrace({ workspaceRoot: targetPath, filePath: absFile }),
27719
27897
  MCP_TOOL_TIMEOUT_MS,
@@ -27951,6 +28129,89 @@ This change is synced across all surfaces.`
27951
28129
  ].join("\n");
27952
28130
  return { content: [{ type: "text", text }] };
27953
28131
  }
28132
+ case "vibecheck_isl_build": {
28133
+ const prompt = typeof args?.prompt === "string" ? args.prompt.trim() : "";
28134
+ if (!prompt) {
28135
+ return buildErrorResponse('vibecheck_isl_build requires "prompt" (non-empty string)');
28136
+ }
28137
+ const framework = typeof args?.framework === "string" ? args.framework : "nextjs";
28138
+ const repoContext = {
28139
+ framework,
28140
+ ...typeof args?.authLib === "string" ? { authLib: args.authLib } : {},
28141
+ ...typeof args?.validationLib === "string" ? { validationLib: args.validationLib } : { validationLib: "zod" },
28142
+ ...typeof args?.dbLib === "string" ? { dbLib: args.dbLib } : {},
28143
+ routingStyle: framework === "nextjs" ? "file-based" : "explicit",
28144
+ conventions: { apiPrefix: "/api" }
28145
+ };
28146
+ const targetDir = typeof args?.targetDir === "string" && args.targetDir.length > 0 ? args.targetDir : "./generated";
28147
+ const apply = args?.apply === true;
28148
+ const threshold = typeof args?.threshold === "number" ? args.threshold : 70;
28149
+ const workDir = targetPath || workspaceRoot;
28150
+ try {
28151
+ const pipelineMod = await import('@isl-lang/pipeline');
28152
+ const result = await pipelineMod.runPipeline(prompt, repoContext, targetDir);
28153
+ const files = (result.generation?.diffs ?? []).map(
28154
+ (d) => ({
28155
+ path: d.path,
28156
+ content: d.hunks.map((h2) => h2.content).join("\n"),
28157
+ status: d.status
28158
+ })
28159
+ );
28160
+ let written = [];
28161
+ let appliedBlocked;
28162
+ const gateScore = result.gate?.score ?? 0;
28163
+ if (apply) {
28164
+ if (result.verdict !== "SHIP") {
28165
+ appliedBlocked = `Apply refused: pipeline verdict=${result.verdict} (gate=${gateScore}/100, threshold=${threshold}). Returning plan only.`;
28166
+ } else if (gateScore < threshold) {
28167
+ appliedBlocked = `Apply refused: gate score ${gateScore} < threshold ${threshold}.`;
28168
+ } else {
28169
+ for (const file of files) {
28170
+ const abs = path2.isAbsolute(file.path) ? file.path : path2.join(workDir, file.path);
28171
+ const rel = path2.relative(workDir, abs);
28172
+ if (rel.startsWith("..") || path2.isAbsolute(rel)) {
28173
+ appliedBlocked = `Apply refused: ${file.path} resolves outside the workspace.`;
28174
+ break;
28175
+ }
28176
+ await fs6.promises.mkdir(path2.dirname(abs), { recursive: true });
28177
+ await fs6.promises.writeFile(abs, file.content, "utf-8");
28178
+ written.push(path2.relative(workDir, abs));
28179
+ }
28180
+ }
28181
+ }
28182
+ const summary = {
28183
+ verdict: result.verdict,
28184
+ translation: {
28185
+ success: result.translation.success,
28186
+ confidence: result.translation.confidence,
28187
+ matchedPattern: result.translation.matchedPattern,
28188
+ openQuestions: result.translation.openQuestions,
28189
+ assumptions: result.translation.assumptions
28190
+ },
28191
+ gate: result.gate ? {
28192
+ score: result.gate.score,
28193
+ verdict: result.gate.verdict,
28194
+ violations: result.gate.violations
28195
+ } : void 0,
28196
+ proof: result.proof ? {
28197
+ bundleId: result.proof.bundleId,
28198
+ verdict: result.proof.verdict,
28199
+ evidenceCount: result.proof.evidence.length,
28200
+ testCount: result.proof.tests.length
28201
+ } : void 0,
28202
+ files,
28203
+ written,
28204
+ appliedBlocked,
28205
+ warnings: result.warnings,
28206
+ errors: result.errors
28207
+ };
28208
+ return { content: [{ type: "text", text: JSON.stringify(summary, null, 2) }] };
28209
+ } catch (err) {
28210
+ return buildErrorResponse(
28211
+ `ISL build pipeline failed: ${err instanceof Error ? err.message : String(err)}`
28212
+ );
28213
+ }
28214
+ }
27954
28215
  case "vibecheck_forge":
27955
28216
  case "vibecheck_reality":
27956
28217
  case "vibecheck_ship":
@@ -27973,7 +28234,7 @@ This change is synced across all surfaces.`
27973
28234
  }
27974
28235
  const workDir = targetPath || workspaceRoot;
27975
28236
  const vibecheckBin = new URL("../node_modules/.bin/vibecheck", import.meta.url).pathname;
27976
- const binPath = fs7.existsSync(vibecheckBin) ? vibecheckBin : "vibecheck";
28237
+ const binPath = fs6.existsSync(vibecheckBin) ? vibecheckBin : "vibecheck";
27977
28238
  try {
27978
28239
  const { stdout, stderr } = await execFileAsync(binPath, cliArgv, { cwd: workDir });
27979
28240
  return {
@@ -28208,7 +28469,7 @@ function createMcpServer(runtimeOverrides = {}) {
28208
28469
  const server = new Server(
28209
28470
  {
28210
28471
  name: "vibecheck-mcp",
28211
- version: "25.0.0"
28472
+ version: "26.0.1"
28212
28473
  },
28213
28474
  {
28214
28475
  capabilities: {
@@ -28224,9 +28485,23 @@ function createMcpServer(runtimeOverrides = {}) {
28224
28485
  return server;
28225
28486
  }
28226
28487
  async function startStdioServer(runtimeOverrides = {}) {
28488
+ try {
28489
+ const { initAnalytics } = await import('./analytics-P4AUZXCQ.js');
28490
+ await initAnalytics("26.0.1");
28491
+ } catch {
28492
+ }
28227
28493
  const server = createMcpServer(runtimeOverrides);
28228
28494
  const transport = new StdioServerTransport();
28229
28495
  await server.connect(transport);
28496
+ const flush = async () => {
28497
+ try {
28498
+ const { shutdownAnalytics } = await import('./analytics-P4AUZXCQ.js');
28499
+ await shutdownAnalytics();
28500
+ } catch {
28501
+ }
28502
+ };
28503
+ process.once("SIGINT", () => void flush().then(() => process.exit(130)));
28504
+ process.once("SIGTERM", () => void flush().then(() => process.exit(143)));
28230
28505
  return server;
28231
28506
  }
28232
28507