@rigour-labs/mcp 4.1.0 → 4.1.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.
@@ -15,6 +15,9 @@ function resolveDeepExecution(args) {
15
15
  provider: isLocal ? 'local' : (args.provider || 'claude'),
16
16
  };
17
17
  }
18
+ function isTestRuntime() {
19
+ return !!(process.env.VITEST || process.env.VITEST_POOL_ID || process.env.NODE_ENV === 'test');
20
+ }
18
21
  /**
19
22
  * Run quality gates with deep LLM-powered analysis.
20
23
  */
@@ -29,22 +32,24 @@ export async function handleCheckDeep(runner, cwd, config, args) {
29
32
  modelName: args.modelName,
30
33
  };
31
34
  const report = await runner.run(cwd, undefined, deepOpts);
32
- // Persist to SQLite (best-effort)
33
- try {
34
- const { openDatabase, insertScan, insertFindings } = await import('@rigour-labs/core');
35
- const db = openDatabase();
36
- if (db) {
37
- const repoName = path.basename(cwd);
38
- const scanId = insertScan(db, repoName, report, {
39
- deepTier: args.pro ? 'pro' : (execution.isLocal ? 'deep' : 'cloud'),
40
- deepModel: report.stats.deep?.model,
41
- });
42
- insertFindings(db, scanId, report.failures);
43
- db.close();
35
+ // Persist to SQLite (best-effort). Skip during tests to avoid CI timing flakes.
36
+ if (!isTestRuntime()) {
37
+ try {
38
+ const { openDatabase, insertScan, insertFindings } = await import('@rigour-labs/core');
39
+ const db = openDatabase();
40
+ if (db) {
41
+ const repoName = path.basename(cwd);
42
+ const scanId = insertScan(db, repoName, report, {
43
+ deepTier: args.pro ? 'pro' : (execution.isLocal ? 'deep' : 'cloud'),
44
+ deepModel: report.stats.deep?.model,
45
+ });
46
+ insertFindings(db, scanId, report.failures);
47
+ db.close();
48
+ }
49
+ }
50
+ catch {
51
+ // SQLite persistence is best-effort
44
52
  }
45
- }
46
- catch {
47
- // SQLite persistence is best-effort
48
53
  }
49
54
  // Format response
50
55
  const stats = report.stats;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rigour-labs/mcp",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "MCP server for AI code governance — OWASP LLM Top 10 (10/10), real-time hooks, 25+ security patterns, hallucinated import detection, multi-agent governance. Works with Claude, Cursor, Cline, Windsurf, Gemini. Industry presets for HIPAA, SOC2, FedRAMP.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://rigour.run",
@@ -48,7 +48,7 @@
48
48
  "execa": "^8.0.1",
49
49
  "fs-extra": "^11.2.0",
50
50
  "yaml": "^2.8.2",
51
- "@rigour-labs/core": "4.1.0"
51
+ "@rigour-labs/core": "4.1.1"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/node": "^25.0.3",