@rigour-labs/core 5.0.0 → 5.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.
@@ -275,7 +275,7 @@ function checkGovernance(content, relPath, config, failures) {
275
275
  const isMemoryPath = memoryPaths.some(pattern => simpleGlob(normalizedPath, pattern));
276
276
  // ── Check skills paths ──
277
277
  const skillsPaths = gov.protected_skills_paths ?? [];
278
- const isSkillsPath = skillsPaths.some((pattern) => simpleGlob(normalizedPath, pattern));
278
+ const isSkillsPath = skillsPaths.some(pattern => simpleGlob(normalizedPath, pattern));
279
279
  if (!isMemoryPath && !isSkillsPath)
280
280
  return;
281
281
  // ── Enforcement: block memory writes ──
@@ -7,6 +7,12 @@
7
7
  * - Cline: .clinerules/hooks/PostToolUse (executable script)
8
8
  * - Windsurf: .windsurf/hooks.json (post_write_code event)
9
9
  *
10
+ * NOTE: These templates use `require('@rigour-labs/core/...')` for direct library
11
+ * invocation (used by MCP `handleHooksInit`). The CLI `rigour hooks init` has its
12
+ * own generators in `packages/rigour-cli/src/commands/hooks.ts` that shell out to
13
+ * `rigour hooks check` instead — more portable but requires the CLI binary.
14
+ * Both produce functionally equivalent hook configs for each tool.
15
+ *
10
16
  * @since v3.0.0
11
17
  */
12
18
  import type { HookTool } from './types.js';
@@ -7,6 +7,12 @@
7
7
  * - Cline: .clinerules/hooks/PostToolUse (executable script)
8
8
  * - Windsurf: .windsurf/hooks.json (post_write_code event)
9
9
  *
10
+ * NOTE: These templates use `require('@rigour-labs/core/...')` for direct library
11
+ * invocation (used by MCP `handleHooksInit`). The CLI `rigour hooks init` has its
12
+ * own generators in `packages/rigour-cli/src/commands/hooks.ts` that shell out to
13
+ * `rigour hooks check` instead — more portable but requires the CLI binary.
14
+ * Both produce functionally equivalent hook configs for each tool.
15
+ *
10
16
  * @since v3.0.0
11
17
  */
12
18
  /**
@@ -18,7 +18,7 @@ export interface HookConfig {
18
18
  block_on_failure: boolean;
19
19
  }
20
20
  /** The fast gates that can run per-file in <200ms */
21
- export declare const FAST_GATE_IDS: readonly ["hallucinated-imports", "promise-safety", "security-patterns", "file-size"];
21
+ export declare const FAST_GATE_IDS: readonly ["governance", "hallucinated-imports", "promise-safety", "security-patterns", "file-size"];
22
22
  export declare const DEFAULT_HOOK_CONFIG: HookConfig;
23
23
  export type FastGateId = typeof FAST_GATE_IDS[number];
24
24
  export interface HookCheckerResult {
@@ -8,6 +8,7 @@
8
8
  */
9
9
  /** The fast gates that can run per-file in <200ms */
10
10
  export const FAST_GATE_IDS = [
11
+ 'governance',
11
12
  'hallucinated-imports',
12
13
  'promise-safety',
13
14
  'security-patterns',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rigour-labs/core",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "Deterministic quality gate engine for AI-generated code. AST analysis, drift detection, and Fix Packet generation across TypeScript, JavaScript, Python, Go, Ruby, and C#.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://rigour.run",
@@ -59,11 +59,11 @@
59
59
  "@xenova/transformers": "^2.17.2",
60
60
  "better-sqlite3": "^11.0.0",
61
61
  "openai": "^4.104.0",
62
- "@rigour-labs/brain-darwin-arm64": "5.0.0",
63
- "@rigour-labs/brain-linux-arm64": "5.0.0",
64
- "@rigour-labs/brain-darwin-x64": "5.0.0",
65
- "@rigour-labs/brain-linux-x64": "5.0.0",
66
- "@rigour-labs/brain-win-x64": "5.0.0"
62
+ "@rigour-labs/brain-darwin-arm64": "5.0.1",
63
+ "@rigour-labs/brain-linux-arm64": "5.0.1",
64
+ "@rigour-labs/brain-linux-x64": "5.0.1",
65
+ "@rigour-labs/brain-win-x64": "5.0.1",
66
+ "@rigour-labs/brain-darwin-x64": "5.0.1"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/better-sqlite3": "^7.6.12",