@rigour-labs/mcp 2.17.0 → 2.17.2

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
@@ -19,7 +19,16 @@ const server = new Server({
19
19
  async function loadConfig(cwd) {
20
20
  const configPath = path.join(cwd, "rigour.yml");
21
21
  if (!(await fs.pathExists(configPath))) {
22
- throw new Error("Rigour configuration (rigour.yml) not found. The agent must run `rigour init` first to establish engineering standards.");
22
+ // Auto-initialize Rigour if config doesn't exist
23
+ console.error(`[RIGOUR] rigour.yml not found in ${cwd}, auto-initializing...`);
24
+ const { execa } = await import("execa");
25
+ try {
26
+ await execa("npx", ["rigour", "init"], { cwd, shell: true });
27
+ console.error(`[RIGOUR] Auto-initialization complete.`);
28
+ }
29
+ catch (initError) {
30
+ throw new Error(`Rigour auto-initialization failed: ${initError.message}. Please run 'npx rigour init' manually.`);
31
+ }
23
32
  }
24
33
  const configContent = await fs.readFile(configPath, "utf-8");
25
34
  return ConfigSchema.parse(yaml.parse(configContent));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rigour-labs/mcp",
3
- "version": "2.17.0",
3
+ "version": "2.17.2",
4
4
  "type": "module",
5
5
  "mcpName": "io.github.rigour-labs/rigour",
6
6
  "description": "Quality gates for AI-generated code. Forces AI agents to meet strict engineering standards with PASS/FAIL enforcement.",
@@ -20,7 +20,7 @@
20
20
  "execa": "^8.0.1",
21
21
  "fs-extra": "^11.2.0",
22
22
  "yaml": "^2.8.2",
23
- "@rigour-labs/core": "2.17.0"
23
+ "@rigour-labs/core": "2.17.2"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^25.0.3"
package/src/index.ts CHANGED
@@ -37,7 +37,15 @@ const server = new Server(
37
37
  async function loadConfig(cwd: string) {
38
38
  const configPath = path.join(cwd, "rigour.yml");
39
39
  if (!(await fs.pathExists(configPath))) {
40
- throw new Error("Rigour configuration (rigour.yml) not found. The agent must run `rigour init` first to establish engineering standards.");
40
+ // Auto-initialize Rigour if config doesn't exist
41
+ console.error(`[RIGOUR] rigour.yml not found in ${cwd}, auto-initializing...`);
42
+ const { execa } = await import("execa");
43
+ try {
44
+ await execa("npx", ["rigour", "init"], { cwd, shell: true });
45
+ console.error(`[RIGOUR] Auto-initialization complete.`);
46
+ } catch (initError: any) {
47
+ throw new Error(`Rigour auto-initialization failed: ${initError.message}. Please run 'npx rigour init' manually.`);
48
+ }
41
49
  }
42
50
  const configContent = await fs.readFile(configPath, "utf-8");
43
51
  return ConfigSchema.parse(yaml.parse(configContent));