@rigour-labs/mcp 6.5.2 → 6.5.4

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.
@@ -226,6 +226,18 @@ export declare function loadConfig(cwd: string): Promise<{
226
226
  custom_patterns: string[];
227
227
  audit_log: boolean;
228
228
  };
229
+ unindexed_reads: {
230
+ enabled: boolean;
231
+ migrations: string[];
232
+ };
233
+ deprecated_dependencies: {
234
+ enabled: boolean;
235
+ registry?: string | undefined;
236
+ };
237
+ migration_order: {
238
+ enabled: boolean;
239
+ dirs: string[];
240
+ };
229
241
  semantic_bugs: {
230
242
  enabled: boolean;
231
243
  rules?: string[] | undefined;
@@ -281,9 +293,13 @@ export interface MemoryStore {
281
293
  timestamp: string;
282
294
  }>;
283
295
  }
284
- export declare function getMemoryPath(cwd: string): Promise<string>;
285
- export declare function loadMemory(cwd: string): Promise<MemoryStore>;
286
- export declare function saveMemory(cwd: string, store: MemoryStore): Promise<void>;
296
+ /** The home whose .rigour/ holds user-scope memory: RIGOUR_HOME when set (tests, sandboxes), else the OS home. */
297
+ export declare function userHome(): string;
298
+ /** Where memories live: `repo` in this checkout's .rigour/, `user` in ~/.rigour/ for every repository. */
299
+ export type LocalMemoryScope = 'repo' | 'user';
300
+ export declare function getMemoryPath(cwd: string, scope?: LocalMemoryScope): Promise<string>;
301
+ export declare function loadMemory(cwd: string, scope?: LocalMemoryScope): Promise<MemoryStore>;
302
+ export declare function saveMemory(cwd: string, store: MemoryStore, scope?: LocalMemoryScope): Promise<void>;
287
303
  export interface McpSettings {
288
304
  deep_default_mode: 'off' | 'quick' | 'full';
289
305
  }
@@ -8,6 +8,7 @@
8
8
  */
9
9
  import fs from "fs-extra";
10
10
  import path from "path";
11
+ import os from "os";
11
12
  import yaml from "yaml";
12
13
  import { randomUUID } from "crypto";
13
14
  import { ConfigSchema } from "@rigour-labs/core";
@@ -33,13 +34,17 @@ function noteMissingConfig(cwd) {
33
34
  notedMissingConfig.add(cwd);
34
35
  console.error(`[RIGOUR] No rigour.yml in ${cwd}; using defaults. Run \`npx rigour init\` to configure gates and hooks.`);
35
36
  }
36
- export async function getMemoryPath(cwd) {
37
- const rigourDir = path.join(cwd, ".rigour");
37
+ /** The home whose .rigour/ holds user-scope memory: RIGOUR_HOME when set (tests, sandboxes), else the OS home. */
38
+ export function userHome() {
39
+ return process.env.RIGOUR_HOME || os.homedir();
40
+ }
41
+ export async function getMemoryPath(cwd, scope = 'repo') {
42
+ const rigourDir = scope === 'user' ? path.join(userHome(), ".rigour") : path.join(cwd, ".rigour");
38
43
  await fs.ensureDir(rigourDir);
39
44
  return path.join(rigourDir, "memory.json");
40
45
  }
41
- export async function loadMemory(cwd) {
42
- const memPath = await getMemoryPath(cwd);
46
+ export async function loadMemory(cwd, scope = 'repo') {
47
+ const memPath = await getMemoryPath(cwd, scope);
43
48
  if (await fs.pathExists(memPath)) {
44
49
  const content = await fs.readFile(memPath, "utf-8");
45
50
  try {
@@ -54,8 +59,8 @@ export async function loadMemory(cwd) {
54
59
  }
55
60
  return { memories: {} };
56
61
  }
57
- export async function saveMemory(cwd, store) {
58
- const memPath = await getMemoryPath(cwd);
62
+ export async function saveMemory(cwd, store, scope = 'repo') {
63
+ const memPath = await getMemoryPath(cwd, scope);
59
64
  await fs.writeFile(memPath, JSON.stringify(store, null, 2));
60
65
  }
61
66
  const DEFAULT_MCP_SETTINGS = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rigour-labs/mcp",
3
- "version": "6.5.2",
4
- "description": "MCP server + live dashboard for AI code governance — OWASP LLM Top 10 (10/10), real-time MCP App UI, 25+ security patterns, Bayesian learning Brain, hallucinated import detection, multi-agent governance. Works with Claude, Cursor, VS Code, ChatGPT, Goose, Windsurf. Industry presets for HIPAA, SOC2, FedRAMP.",
3
+ "version": "6.5.4",
4
+ "description": "MCP server + live dashboard for AI code governance — OWASP LLM Top 10 (10/10), real-time MCP App UI, 25+ security patterns, memory and lessons recalled by meaning, hallucinated import detection, multi-agent governance. Works with Claude, Cursor, VS Code, ChatGPT, Goose, Windsurf. Industry presets for HIPAA, SOC2, FedRAMP.",
5
5
  "engines": {
6
6
  "node": ">=22"
7
7
  },
@@ -65,7 +65,7 @@
65
65
  "execa": "^8.0.1",
66
66
  "fs-extra": "^11.4.0",
67
67
  "yaml": "^2.8.2",
68
- "@rigour-labs/core": "6.5.2"
68
+ "@rigour-labs/core": "6.5.4"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@types/node": "^25.0.3",