@rigour-labs/core 4.1.1 → 4.2.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.
@@ -399,6 +399,59 @@ export declare const GatesSchema: z.ZodObject<{
399
399
  check_assertion_free_async?: boolean | undefined;
400
400
  max_mocks_per_test?: number | undefined;
401
401
  }>>>;
402
+ governance: z.ZodDefault<z.ZodOptional<z.ZodObject<{
403
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
404
+ /** Enforce rigour_remember for all persistent storage — block native agent memory writes */
405
+ enforce_memory: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
406
+ /** Enforce rigour skills over native agent skills/rules files */
407
+ enforce_skills: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
408
+ /** Block writes and tell agent to use rigour_remember / rigour_recall */
409
+ block_native_memory: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
410
+ /** Agent-native MEMORY paths — where agents auto-save context (glob patterns) */
411
+ protected_memory_paths: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
412
+ /** Agent-native SKILLS/RULES paths — where agents store instructions/skills */
413
+ protected_skills_paths: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
414
+ /** Paths that are exempt from governance (e.g. Rigour's own hook configs) */
415
+ exempt_paths: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
416
+ }, "strip", z.ZodTypeAny, {
417
+ enabled: boolean;
418
+ enforce_memory: boolean;
419
+ enforce_skills: boolean;
420
+ block_native_memory: boolean;
421
+ protected_memory_paths: string[];
422
+ protected_skills_paths: string[];
423
+ exempt_paths: string[];
424
+ }, {
425
+ enabled?: boolean | undefined;
426
+ enforce_memory?: boolean | undefined;
427
+ enforce_skills?: boolean | undefined;
428
+ block_native_memory?: boolean | undefined;
429
+ protected_memory_paths?: string[] | undefined;
430
+ protected_skills_paths?: string[] | undefined;
431
+ exempt_paths?: string[] | undefined;
432
+ }>>>;
433
+ input_validation: z.ZodDefault<z.ZodOptional<z.ZodObject<{
434
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
435
+ block_on_detection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
436
+ min_secret_length: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
437
+ custom_patterns: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
438
+ ignore_patterns: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
439
+ audit_log: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
440
+ }, "strip", z.ZodTypeAny, {
441
+ enabled: boolean;
442
+ ignore_patterns: string[];
443
+ block_on_detection: boolean;
444
+ min_secret_length: number;
445
+ custom_patterns: string[];
446
+ audit_log: boolean;
447
+ }, {
448
+ enabled?: boolean | undefined;
449
+ ignore_patterns?: string[] | undefined;
450
+ block_on_detection?: boolean | undefined;
451
+ min_secret_length?: number | undefined;
452
+ custom_patterns?: string[] | undefined;
453
+ audit_log?: boolean | undefined;
454
+ }>>>;
402
455
  deep: z.ZodDefault<z.ZodOptional<z.ZodObject<{
403
456
  enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
404
457
  pro: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -655,6 +708,23 @@ export declare const GatesSchema: z.ZodObject<{
655
708
  check_assertion_free_async: boolean;
656
709
  max_mocks_per_test: number;
657
710
  };
711
+ governance: {
712
+ enabled: boolean;
713
+ enforce_memory: boolean;
714
+ enforce_skills: boolean;
715
+ block_native_memory: boolean;
716
+ protected_memory_paths: string[];
717
+ protected_skills_paths: string[];
718
+ exempt_paths: string[];
719
+ };
720
+ input_validation: {
721
+ enabled: boolean;
722
+ ignore_patterns: string[];
723
+ block_on_detection: boolean;
724
+ min_secret_length: number;
725
+ custom_patterns: string[];
726
+ audit_log: boolean;
727
+ };
658
728
  }, {
659
729
  deep?: {
660
730
  enabled?: boolean | undefined;
@@ -826,6 +896,23 @@ export declare const GatesSchema: z.ZodObject<{
826
896
  check_assertion_free_async?: boolean | undefined;
827
897
  max_mocks_per_test?: number | undefined;
828
898
  } | undefined;
899
+ governance?: {
900
+ enabled?: boolean | undefined;
901
+ enforce_memory?: boolean | undefined;
902
+ enforce_skills?: boolean | undefined;
903
+ block_native_memory?: boolean | undefined;
904
+ protected_memory_paths?: string[] | undefined;
905
+ protected_skills_paths?: string[] | undefined;
906
+ exempt_paths?: string[] | undefined;
907
+ } | undefined;
908
+ input_validation?: {
909
+ enabled?: boolean | undefined;
910
+ ignore_patterns?: string[] | undefined;
911
+ block_on_detection?: boolean | undefined;
912
+ min_secret_length?: number | undefined;
913
+ custom_patterns?: string[] | undefined;
914
+ audit_log?: boolean | undefined;
915
+ } | undefined;
829
916
  }>;
830
917
  export declare const CommandsSchema: z.ZodObject<{
831
918
  format: z.ZodOptional<z.ZodString>;
@@ -849,18 +936,22 @@ export declare const HooksSchema: z.ZodDefault<z.ZodOptional<z.ZodObject<{
849
936
  fast_gates: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
850
937
  timeout_ms: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
851
938
  block_on_failure: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
939
+ /** Enable DLP (Data Loss Prevention) pre-input hooks — default ON for security */
940
+ dlp: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
852
941
  }, "strip", z.ZodTypeAny, {
853
942
  enabled: boolean;
854
943
  tools: ("claude" | "cursor" | "cline" | "windsurf")[];
855
944
  timeout_ms: number;
856
945
  fast_gates: string[];
857
946
  block_on_failure: boolean;
947
+ dlp: boolean;
858
948
  }, {
859
949
  enabled?: boolean | undefined;
860
950
  tools?: ("claude" | "cursor" | "cline" | "windsurf")[] | undefined;
861
951
  timeout_ms?: number | undefined;
862
952
  fast_gates?: string[] | undefined;
863
953
  block_on_failure?: boolean | undefined;
954
+ dlp?: boolean | undefined;
864
955
  }>>>;
865
956
  export declare const ConfigSchema: z.ZodObject<{
866
957
  version: z.ZodDefault<z.ZodNumber>;
@@ -1282,6 +1373,59 @@ export declare const ConfigSchema: z.ZodObject<{
1282
1373
  check_assertion_free_async?: boolean | undefined;
1283
1374
  max_mocks_per_test?: number | undefined;
1284
1375
  }>>>;
1376
+ governance: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1377
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1378
+ /** Enforce rigour_remember for all persistent storage — block native agent memory writes */
1379
+ enforce_memory: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1380
+ /** Enforce rigour skills over native agent skills/rules files */
1381
+ enforce_skills: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1382
+ /** Block writes and tell agent to use rigour_remember / rigour_recall */
1383
+ block_native_memory: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1384
+ /** Agent-native MEMORY paths — where agents auto-save context (glob patterns) */
1385
+ protected_memory_paths: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1386
+ /** Agent-native SKILLS/RULES paths — where agents store instructions/skills */
1387
+ protected_skills_paths: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1388
+ /** Paths that are exempt from governance (e.g. Rigour's own hook configs) */
1389
+ exempt_paths: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1390
+ }, "strip", z.ZodTypeAny, {
1391
+ enabled: boolean;
1392
+ enforce_memory: boolean;
1393
+ enforce_skills: boolean;
1394
+ block_native_memory: boolean;
1395
+ protected_memory_paths: string[];
1396
+ protected_skills_paths: string[];
1397
+ exempt_paths: string[];
1398
+ }, {
1399
+ enabled?: boolean | undefined;
1400
+ enforce_memory?: boolean | undefined;
1401
+ enforce_skills?: boolean | undefined;
1402
+ block_native_memory?: boolean | undefined;
1403
+ protected_memory_paths?: string[] | undefined;
1404
+ protected_skills_paths?: string[] | undefined;
1405
+ exempt_paths?: string[] | undefined;
1406
+ }>>>;
1407
+ input_validation: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1408
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1409
+ block_on_detection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1410
+ min_secret_length: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1411
+ custom_patterns: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1412
+ ignore_patterns: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1413
+ audit_log: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1414
+ }, "strip", z.ZodTypeAny, {
1415
+ enabled: boolean;
1416
+ ignore_patterns: string[];
1417
+ block_on_detection: boolean;
1418
+ min_secret_length: number;
1419
+ custom_patterns: string[];
1420
+ audit_log: boolean;
1421
+ }, {
1422
+ enabled?: boolean | undefined;
1423
+ ignore_patterns?: string[] | undefined;
1424
+ block_on_detection?: boolean | undefined;
1425
+ min_secret_length?: number | undefined;
1426
+ custom_patterns?: string[] | undefined;
1427
+ audit_log?: boolean | undefined;
1428
+ }>>>;
1285
1429
  deep: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1286
1430
  enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1287
1431
  pro: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -1538,6 +1682,23 @@ export declare const ConfigSchema: z.ZodObject<{
1538
1682
  check_assertion_free_async: boolean;
1539
1683
  max_mocks_per_test: number;
1540
1684
  };
1685
+ governance: {
1686
+ enabled: boolean;
1687
+ enforce_memory: boolean;
1688
+ enforce_skills: boolean;
1689
+ block_native_memory: boolean;
1690
+ protected_memory_paths: string[];
1691
+ protected_skills_paths: string[];
1692
+ exempt_paths: string[];
1693
+ };
1694
+ input_validation: {
1695
+ enabled: boolean;
1696
+ ignore_patterns: string[];
1697
+ block_on_detection: boolean;
1698
+ min_secret_length: number;
1699
+ custom_patterns: string[];
1700
+ audit_log: boolean;
1701
+ };
1541
1702
  }, {
1542
1703
  deep?: {
1543
1704
  enabled?: boolean | undefined;
@@ -1709,6 +1870,23 @@ export declare const ConfigSchema: z.ZodObject<{
1709
1870
  check_assertion_free_async?: boolean | undefined;
1710
1871
  max_mocks_per_test?: number | undefined;
1711
1872
  } | undefined;
1873
+ governance?: {
1874
+ enabled?: boolean | undefined;
1875
+ enforce_memory?: boolean | undefined;
1876
+ enforce_skills?: boolean | undefined;
1877
+ block_native_memory?: boolean | undefined;
1878
+ protected_memory_paths?: string[] | undefined;
1879
+ protected_skills_paths?: string[] | undefined;
1880
+ exempt_paths?: string[] | undefined;
1881
+ } | undefined;
1882
+ input_validation?: {
1883
+ enabled?: boolean | undefined;
1884
+ ignore_patterns?: string[] | undefined;
1885
+ block_on_detection?: boolean | undefined;
1886
+ min_secret_length?: number | undefined;
1887
+ custom_patterns?: string[] | undefined;
1888
+ audit_log?: boolean | undefined;
1889
+ } | undefined;
1712
1890
  }>>>;
1713
1891
  hooks: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1714
1892
  enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -1716,18 +1894,22 @@ export declare const ConfigSchema: z.ZodObject<{
1716
1894
  fast_gates: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1717
1895
  timeout_ms: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1718
1896
  block_on_failure: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1897
+ /** Enable DLP (Data Loss Prevention) pre-input hooks — default ON for security */
1898
+ dlp: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1719
1899
  }, "strip", z.ZodTypeAny, {
1720
1900
  enabled: boolean;
1721
1901
  tools: ("claude" | "cursor" | "cline" | "windsurf")[];
1722
1902
  timeout_ms: number;
1723
1903
  fast_gates: string[];
1724
1904
  block_on_failure: boolean;
1905
+ dlp: boolean;
1725
1906
  }, {
1726
1907
  enabled?: boolean | undefined;
1727
1908
  tools?: ("claude" | "cursor" | "cline" | "windsurf")[] | undefined;
1728
1909
  timeout_ms?: number | undefined;
1729
1910
  fast_gates?: string[] | undefined;
1730
1911
  block_on_failure?: boolean | undefined;
1912
+ dlp?: boolean | undefined;
1731
1913
  }>>>;
1732
1914
  output: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1733
1915
  report_path: z.ZodDefault<z.ZodString>;
@@ -1918,6 +2100,23 @@ export declare const ConfigSchema: z.ZodObject<{
1918
2100
  check_assertion_free_async: boolean;
1919
2101
  max_mocks_per_test: number;
1920
2102
  };
2103
+ governance: {
2104
+ enabled: boolean;
2105
+ enforce_memory: boolean;
2106
+ enforce_skills: boolean;
2107
+ block_native_memory: boolean;
2108
+ protected_memory_paths: string[];
2109
+ protected_skills_paths: string[];
2110
+ exempt_paths: string[];
2111
+ };
2112
+ input_validation: {
2113
+ enabled: boolean;
2114
+ ignore_patterns: string[];
2115
+ block_on_detection: boolean;
2116
+ min_secret_length: number;
2117
+ custom_patterns: string[];
2118
+ audit_log: boolean;
2119
+ };
1921
2120
  };
1922
2121
  hooks: {
1923
2122
  enabled: boolean;
@@ -1925,6 +2124,7 @@ export declare const ConfigSchema: z.ZodObject<{
1925
2124
  timeout_ms: number;
1926
2125
  fast_gates: string[];
1927
2126
  block_on_failure: boolean;
2127
+ dlp: boolean;
1928
2128
  };
1929
2129
  output: {
1930
2130
  report_path: string;
@@ -2114,6 +2314,23 @@ export declare const ConfigSchema: z.ZodObject<{
2114
2314
  check_assertion_free_async?: boolean | undefined;
2115
2315
  max_mocks_per_test?: number | undefined;
2116
2316
  } | undefined;
2317
+ governance?: {
2318
+ enabled?: boolean | undefined;
2319
+ enforce_memory?: boolean | undefined;
2320
+ enforce_skills?: boolean | undefined;
2321
+ block_native_memory?: boolean | undefined;
2322
+ protected_memory_paths?: string[] | undefined;
2323
+ protected_skills_paths?: string[] | undefined;
2324
+ exempt_paths?: string[] | undefined;
2325
+ } | undefined;
2326
+ input_validation?: {
2327
+ enabled?: boolean | undefined;
2328
+ ignore_patterns?: string[] | undefined;
2329
+ block_on_detection?: boolean | undefined;
2330
+ min_secret_length?: number | undefined;
2331
+ custom_patterns?: string[] | undefined;
2332
+ audit_log?: boolean | undefined;
2333
+ } | undefined;
2117
2334
  } | undefined;
2118
2335
  hooks?: {
2119
2336
  enabled?: boolean | undefined;
@@ -2121,6 +2338,7 @@ export declare const ConfigSchema: z.ZodObject<{
2121
2338
  timeout_ms?: number | undefined;
2122
2339
  fast_gates?: string[] | undefined;
2123
2340
  block_on_failure?: boolean | undefined;
2341
+ dlp?: boolean | undefined;
2124
2342
  } | undefined;
2125
2343
  output?: {
2126
2344
  report_path?: string | undefined;
@@ -2163,7 +2381,7 @@ export declare const FailureSchema: z.ZodObject<{
2163
2381
  title: string;
2164
2382
  details: string;
2165
2383
  severity?: "critical" | "high" | "medium" | "low" | "info" | undefined;
2166
- provenance?: "security" | "ai-drift" | "traditional" | "governance" | "deep-analysis" | undefined;
2384
+ provenance?: "security" | "governance" | "ai-drift" | "traditional" | "deep-analysis" | undefined;
2167
2385
  files?: string[] | undefined;
2168
2386
  line?: number | undefined;
2169
2387
  endLine?: number | undefined;
@@ -2177,7 +2395,7 @@ export declare const FailureSchema: z.ZodObject<{
2177
2395
  title: string;
2178
2396
  details: string;
2179
2397
  severity?: "critical" | "high" | "medium" | "low" | "info" | undefined;
2180
- provenance?: "security" | "ai-drift" | "traditional" | "governance" | "deep-analysis" | undefined;
2398
+ provenance?: "security" | "governance" | "ai-drift" | "traditional" | "deep-analysis" | undefined;
2181
2399
  files?: string[] | undefined;
2182
2400
  line?: number | undefined;
2183
2401
  endLine?: number | undefined;
@@ -2210,7 +2428,7 @@ export declare const ReportSchema: z.ZodObject<{
2210
2428
  title: string;
2211
2429
  details: string;
2212
2430
  severity?: "critical" | "high" | "medium" | "low" | "info" | undefined;
2213
- provenance?: "security" | "ai-drift" | "traditional" | "governance" | "deep-analysis" | undefined;
2431
+ provenance?: "security" | "governance" | "ai-drift" | "traditional" | "deep-analysis" | undefined;
2214
2432
  files?: string[] | undefined;
2215
2433
  line?: number | undefined;
2216
2434
  endLine?: number | undefined;
@@ -2224,7 +2442,7 @@ export declare const ReportSchema: z.ZodObject<{
2224
2442
  title: string;
2225
2443
  details: string;
2226
2444
  severity?: "critical" | "high" | "medium" | "low" | "info" | undefined;
2227
- provenance?: "security" | "ai-drift" | "traditional" | "governance" | "deep-analysis" | undefined;
2445
+ provenance?: "security" | "governance" | "ai-drift" | "traditional" | "deep-analysis" | undefined;
2228
2446
  files?: string[] | undefined;
2229
2447
  line?: number | undefined;
2230
2448
  endLine?: number | undefined;
@@ -2249,15 +2467,15 @@ export declare const ReportSchema: z.ZodObject<{
2249
2467
  'deep-analysis': z.ZodNumber;
2250
2468
  }, "strip", z.ZodTypeAny, {
2251
2469
  security: number;
2470
+ governance: number;
2252
2471
  'ai-drift': number;
2253
2472
  traditional: number;
2254
- governance: number;
2255
2473
  'deep-analysis': number;
2256
2474
  }, {
2257
2475
  security: number;
2476
+ governance: number;
2258
2477
  'ai-drift': number;
2259
2478
  traditional: number;
2260
- governance: number;
2261
2479
  'deep-analysis': number;
2262
2480
  }>>;
2263
2481
  deep: z.ZodOptional<z.ZodObject<{
@@ -2303,9 +2521,9 @@ export declare const ReportSchema: z.ZodObject<{
2303
2521
  severity_breakdown?: Record<string, number> | undefined;
2304
2522
  provenance_breakdown?: {
2305
2523
  security: number;
2524
+ governance: number;
2306
2525
  'ai-drift': number;
2307
2526
  traditional: number;
2308
- governance: number;
2309
2527
  'deep-analysis': number;
2310
2528
  } | undefined;
2311
2529
  }, {
@@ -2326,9 +2544,9 @@ export declare const ReportSchema: z.ZodObject<{
2326
2544
  severity_breakdown?: Record<string, number> | undefined;
2327
2545
  provenance_breakdown?: {
2328
2546
  security: number;
2547
+ governance: number;
2329
2548
  'ai-drift': number;
2330
2549
  traditional: number;
2331
- governance: number;
2332
2550
  'deep-analysis': number;
2333
2551
  } | undefined;
2334
2552
  }>;
@@ -2351,9 +2569,9 @@ export declare const ReportSchema: z.ZodObject<{
2351
2569
  severity_breakdown?: Record<string, number> | undefined;
2352
2570
  provenance_breakdown?: {
2353
2571
  security: number;
2572
+ governance: number;
2354
2573
  'ai-drift': number;
2355
2574
  traditional: number;
2356
- governance: number;
2357
2575
  'deep-analysis': number;
2358
2576
  } | undefined;
2359
2577
  };
@@ -2364,7 +2582,7 @@ export declare const ReportSchema: z.ZodObject<{
2364
2582
  title: string;
2365
2583
  details: string;
2366
2584
  severity?: "critical" | "high" | "medium" | "low" | "info" | undefined;
2367
- provenance?: "security" | "ai-drift" | "traditional" | "governance" | "deep-analysis" | undefined;
2585
+ provenance?: "security" | "governance" | "ai-drift" | "traditional" | "deep-analysis" | undefined;
2368
2586
  files?: string[] | undefined;
2369
2587
  line?: number | undefined;
2370
2588
  endLine?: number | undefined;
@@ -2393,9 +2611,9 @@ export declare const ReportSchema: z.ZodObject<{
2393
2611
  severity_breakdown?: Record<string, number> | undefined;
2394
2612
  provenance_breakdown?: {
2395
2613
  security: number;
2614
+ governance: number;
2396
2615
  'ai-drift': number;
2397
2616
  traditional: number;
2398
- governance: number;
2399
2617
  'deep-analysis': number;
2400
2618
  } | undefined;
2401
2619
  };
@@ -2406,7 +2624,7 @@ export declare const ReportSchema: z.ZodObject<{
2406
2624
  title: string;
2407
2625
  details: string;
2408
2626
  severity?: "critical" | "high" | "medium" | "low" | "info" | undefined;
2409
- provenance?: "security" | "ai-drift" | "traditional" | "governance" | "deep-analysis" | undefined;
2627
+ provenance?: "security" | "governance" | "ai-drift" | "traditional" | "deep-analysis" | undefined;
2410
2628
  files?: string[] | undefined;
2411
2629
  line?: number | undefined;
2412
2630
  endLine?: number | undefined;
@@ -168,6 +168,63 @@ export const GatesSchema = z.object({
168
168
  max_mocks_per_test: z.number().optional().default(5),
169
169
  ignore_patterns: z.array(z.string()).optional().default([]),
170
170
  }).optional().default({}),
171
+ // v4.2+ Memory & Skills Governance
172
+ governance: z.object({
173
+ enabled: z.boolean().optional().default(true),
174
+ /** Enforce rigour_remember for all persistent storage — block native agent memory writes */
175
+ enforce_memory: z.boolean().optional().default(true),
176
+ /** Enforce rigour skills over native agent skills/rules files */
177
+ enforce_skills: z.boolean().optional().default(true),
178
+ /** Block writes and tell agent to use rigour_remember / rigour_recall */
179
+ block_native_memory: z.boolean().optional().default(true),
180
+ /** Agent-native MEMORY paths — where agents auto-save context (glob patterns) */
181
+ protected_memory_paths: z.array(z.string()).optional().default([
182
+ // Claude Code — auto-memory
183
+ 'CLAUDE.md',
184
+ '.claude/CLAUDE.md',
185
+ // Cline — editable rules (agent can write)
186
+ '.clinerules',
187
+ '.clinerules/**',
188
+ // Windsurf — auto-generated memories
189
+ '.windsurf/memories/**',
190
+ // Generic
191
+ '.github/copilot-instructions.md',
192
+ ]),
193
+ /** Agent-native SKILLS/RULES paths — where agents store instructions/skills */
194
+ protected_skills_paths: z.array(z.string()).optional().default([
195
+ // Claude Code — skills, rules, commands
196
+ '.claude/skills/**',
197
+ '.claude/rules/**',
198
+ '.claude/commands/**',
199
+ // Cursor — rules and prompts
200
+ '.cursorrules',
201
+ '.cursor/rules/**',
202
+ '.cursor/prompts/**',
203
+ // Cline — rules directory
204
+ '.cline/rules/**',
205
+ // Windsurf — rules
206
+ '.windsurf/rules/**',
207
+ '.windsurfrules',
208
+ // Copilot — instructions
209
+ '.github/instructions/**',
210
+ 'copilot-instructions.md',
211
+ ]),
212
+ /** Paths that are exempt from governance (e.g. Rigour's own hook configs) */
213
+ exempt_paths: z.array(z.string()).optional().default([
214
+ '.claude/settings.json', // Rigour's own hook config
215
+ '.cursor/hooks.json', // Rigour's own hook config
216
+ '.windsurf/hooks.json', // Rigour's own hook config
217
+ ]),
218
+ }).optional().default({}),
219
+ // v4.2+ AI Agent DLP (Data Loss Prevention)
220
+ input_validation: z.object({
221
+ enabled: z.boolean().optional().default(true),
222
+ block_on_detection: z.boolean().optional().default(true),
223
+ min_secret_length: z.number().optional().default(8),
224
+ custom_patterns: z.array(z.string()).optional().default([]),
225
+ ignore_patterns: z.array(z.string()).optional().default([]),
226
+ audit_log: z.boolean().optional().default(true),
227
+ }).optional().default({}),
171
228
  // v4.0+ Deep Analysis (LLM-powered)
172
229
  deep: z.object({
173
230
  enabled: z.boolean().optional().default(false),
@@ -212,6 +269,8 @@ export const HooksSchema = z.object({
212
269
  ]),
213
270
  timeout_ms: z.number().optional().default(5000),
214
271
  block_on_failure: z.boolean().optional().default(false),
272
+ /** Enable DLP (Data Loss Prevention) pre-input hooks — default ON for security */
273
+ dlp: z.boolean().optional().default(true),
215
274
  }).optional().default({});
216
275
  export const ConfigSchema = z.object({
217
276
  version: z.number().default(1),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rigour-labs/core",
3
- "version": "4.1.1",
3
+ "version": "4.2.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-linux-arm64": "4.1.1",
63
- "@rigour-labs/brain-darwin-arm64": "4.1.1",
64
- "@rigour-labs/brain-linux-x64": "4.1.1",
65
- "@rigour-labs/brain-win-x64": "4.1.1",
66
- "@rigour-labs/brain-darwin-x64": "4.1.1"
62
+ "@rigour-labs/brain-darwin-x64": "4.2.1",
63
+ "@rigour-labs/brain-linux-arm64": "4.2.1",
64
+ "@rigour-labs/brain-linux-x64": "4.2.1",
65
+ "@rigour-labs/brain-darwin-arm64": "4.2.1",
66
+ "@rigour-labs/brain-win-x64": "4.2.1"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/better-sqlite3": "^7.6.12",