@rigour-labs/mcp 6.5.2 → 6.5.3
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/README.md +8 -10
- package/dist/advertised-tools.d.ts +49 -0
- package/dist/dashboard/html.d.ts +1 -1
- package/dist/dashboard/html.js +16 -13
- package/dist/dashboard/index.d.ts +2 -1
- package/dist/dashboard/index.js +2 -1
- package/dist/dashboard/knowledge.d.ts +15 -0
- package/dist/dashboard/knowledge.js +47 -0
- package/dist/dashboard/state.d.ts +17 -3
- package/dist/dashboard/state.js +19 -6
- package/dist/index.js +23 -17
- package/dist/tools/definitions.d.ts +49 -0
- package/dist/tools/definitions.js +9 -4
- package/dist/tools/index-handlers.js +6 -5
- package/dist/tools/memory-handlers.d.ts +27 -4
- package/dist/tools/memory-handlers.js +34 -125
- package/dist/tools/memory-recall.d.ts +6 -0
- package/dist/tools/memory-recall.js +105 -0
- package/dist/tools/pattern-handlers.d.ts +1 -1
- package/dist/tools/pattern-handlers.js +26 -59
- package/dist/tools/review-handler.js +4 -2
- package/dist/utils/config.d.ts +19 -3
- package/dist/utils/config.js +11 -6
- package/package.json +3 -3
package/dist/utils/config.js
CHANGED
|
@@ -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
|
-
|
|
37
|
-
|
|
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.
|
|
4
|
-
"description": "MCP server + live dashboard for AI code governance — OWASP LLM Top 10 (10/10), real-time MCP App UI, 25+ security patterns,
|
|
3
|
+
"version": "6.5.3",
|
|
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.
|
|
68
|
+
"@rigour-labs/core": "6.5.3"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@types/node": "^25.0.3",
|