@rigour-labs/core 6.6.5 → 6.6.6
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/gates/frontend-secret-exposure.d.ts +1 -1
- package/dist/gates/frontend-secret-exposure.js +9 -3
- package/dist/gates/frontend-secret-exposure.test.js +4 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/stop-review.d.ts +6 -9
- package/dist/hooks/stop-review.js +5 -10
- package/dist/index.d.ts +5 -2
- package/dist/index.js +5 -2
- package/dist/review/backtest-init.d.ts +8 -0
- package/dist/review/backtest-init.js +87 -0
- package/dist/review/backtest-init.test.d.ts +1 -0
- package/dist/review/backtest-init.test.js +74 -0
- package/dist/review/backtest.d.ts +315 -0
- package/dist/review/backtest.js +197 -0
- package/dist/review/backtest.test.d.ts +1 -0
- package/dist/review/backtest.test.js +129 -0
- package/dist/review/dead-code.test.js +8 -0
- package/dist/review/lint-overlay.d.ts +21 -0
- package/dist/review/lint-overlay.js +89 -0
- package/dist/review/quiet.d.ts +6 -0
- package/dist/review/quiet.js +12 -2
- package/dist/review/quiet.test.js +11 -0
- package/dist/review/review.d.ts +6 -0
- package/dist/review/review.js +8 -1
- package/dist/review/reviewer/adapters.d.ts +35 -0
- package/dist/review/reviewer/adapters.js +156 -0
- package/dist/review/reviewer/background.d.ts +34 -0
- package/dist/review/reviewer/background.js +128 -0
- package/dist/review/reviewer/background.test.d.ts +1 -0
- package/dist/review/reviewer/background.test.js +104 -0
- package/dist/review/reviewer/exec.d.ts +17 -0
- package/dist/review/reviewer/exec.js +23 -0
- package/dist/review/reviewer/inputs.d.ts +37 -0
- package/dist/review/reviewer/inputs.js +103 -0
- package/dist/review/reviewer/merge-impact.d.ts +2 -0
- package/dist/review/reviewer/merge-impact.js +64 -0
- package/dist/review/reviewer/prompt.d.ts +21 -0
- package/dist/review/reviewer/prompt.js +123 -0
- package/dist/review/reviewer/store.d.ts +26 -0
- package/dist/review/reviewer/store.js +57 -0
- package/dist/review/reviewer/verdict.d.ts +127 -0
- package/dist/review/reviewer/verdict.js +156 -0
- package/dist/review/reviewer.d.ts +41 -49
- package/dist/review/reviewer.js +210 -202
- package/dist/review/reviewer.test.js +199 -48
- package/dist/review/toolchain.d.ts +5 -2
- package/dist/review/toolchain.js +81 -6
- package/dist/review/toolchain.test.js +39 -1
- package/dist/review/typed/program.d.ts +27 -0
- package/dist/review/typed/program.js +90 -0
- package/dist/review/typed/redundancy.d.ts +10 -0
- package/dist/review/typed/redundancy.js +339 -0
- package/dist/review/typed/redundancy.test.d.ts +1 -0
- package/dist/review/typed/redundancy.test.js +121 -0
- package/dist/review/unused-exports.js +8 -4
- package/dist/templates/universal-config.js +8 -1
- package/dist/types/index.d.ts +94 -8
- package/dist/types/index.js +24 -2
- package/package.json +6 -6
package/dist/types/index.d.ts
CHANGED
|
@@ -545,6 +545,22 @@ export declare const GatesSchema: z.ZodObject<{
|
|
|
545
545
|
}, {
|
|
546
546
|
enabled?: boolean | undefined;
|
|
547
547
|
}>>>;
|
|
548
|
+
/**
|
|
549
|
+
* What a change made redundant, from the project's own TypeScript (review/typed/redundancy.ts): a null filter beside a
|
|
550
|
+
* range on the same column, a nullable row type the query filters non-null, an optional member every host supplies, a
|
|
551
|
+
* property written and never read. Runs at push, in `rigour review` and in a backtest (the program takes seconds to build).
|
|
552
|
+
* `wire_contracts`: files whose types another service reads, so their members are never write-only here.
|
|
553
|
+
*/
|
|
554
|
+
redundancy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
555
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
556
|
+
wire_contracts: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
557
|
+
}, "strip", z.ZodTypeAny, {
|
|
558
|
+
enabled: boolean;
|
|
559
|
+
wire_contracts: string[];
|
|
560
|
+
}, {
|
|
561
|
+
enabled?: boolean | undefined;
|
|
562
|
+
wire_contracts?: string[] | undefined;
|
|
563
|
+
}>>>;
|
|
548
564
|
/** A parameter the change adds as optional that only tests omit (review/optional-params.ts). */
|
|
549
565
|
optional_params: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
550
566
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -1019,6 +1035,10 @@ export declare const GatesSchema: z.ZodObject<{
|
|
|
1019
1035
|
change_sweep: {
|
|
1020
1036
|
enabled: boolean;
|
|
1021
1037
|
};
|
|
1038
|
+
redundancy: {
|
|
1039
|
+
enabled: boolean;
|
|
1040
|
+
wire_contracts: string[];
|
|
1041
|
+
};
|
|
1022
1042
|
optional_params: {
|
|
1023
1043
|
enabled: boolean;
|
|
1024
1044
|
};
|
|
@@ -1294,6 +1314,10 @@ export declare const GatesSchema: z.ZodObject<{
|
|
|
1294
1314
|
change_sweep?: {
|
|
1295
1315
|
enabled?: boolean | undefined;
|
|
1296
1316
|
} | undefined;
|
|
1317
|
+
redundancy?: {
|
|
1318
|
+
enabled?: boolean | undefined;
|
|
1319
|
+
wire_contracts?: string[] | undefined;
|
|
1320
|
+
} | undefined;
|
|
1297
1321
|
optional_params?: {
|
|
1298
1322
|
enabled?: boolean | undefined;
|
|
1299
1323
|
} | undefined;
|
|
@@ -1947,6 +1971,22 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
1947
1971
|
}, {
|
|
1948
1972
|
enabled?: boolean | undefined;
|
|
1949
1973
|
}>>>;
|
|
1974
|
+
/**
|
|
1975
|
+
* What a change made redundant, from the project's own TypeScript (review/typed/redundancy.ts): a null filter beside a
|
|
1976
|
+
* range on the same column, a nullable row type the query filters non-null, an optional member every host supplies, a
|
|
1977
|
+
* property written and never read. Runs at push, in `rigour review` and in a backtest (the program takes seconds to build).
|
|
1978
|
+
* `wire_contracts`: files whose types another service reads, so their members are never write-only here.
|
|
1979
|
+
*/
|
|
1980
|
+
redundancy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
1981
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1982
|
+
wire_contracts: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
1983
|
+
}, "strip", z.ZodTypeAny, {
|
|
1984
|
+
enabled: boolean;
|
|
1985
|
+
wire_contracts: string[];
|
|
1986
|
+
}, {
|
|
1987
|
+
enabled?: boolean | undefined;
|
|
1988
|
+
wire_contracts?: string[] | undefined;
|
|
1989
|
+
}>>>;
|
|
1950
1990
|
/** A parameter the change adds as optional that only tests omit (review/optional-params.ts). */
|
|
1951
1991
|
optional_params: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
1952
1992
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -2421,6 +2461,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
2421
2461
|
change_sweep: {
|
|
2422
2462
|
enabled: boolean;
|
|
2423
2463
|
};
|
|
2464
|
+
redundancy: {
|
|
2465
|
+
enabled: boolean;
|
|
2466
|
+
wire_contracts: string[];
|
|
2467
|
+
};
|
|
2424
2468
|
optional_params: {
|
|
2425
2469
|
enabled: boolean;
|
|
2426
2470
|
};
|
|
@@ -2696,6 +2740,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
2696
2740
|
change_sweep?: {
|
|
2697
2741
|
enabled?: boolean | undefined;
|
|
2698
2742
|
} | undefined;
|
|
2743
|
+
redundancy?: {
|
|
2744
|
+
enabled?: boolean | undefined;
|
|
2745
|
+
wire_contracts?: string[] | undefined;
|
|
2746
|
+
} | undefined;
|
|
2699
2747
|
optional_params?: {
|
|
2700
2748
|
enabled?: boolean | undefined;
|
|
2701
2749
|
} | undefined;
|
|
@@ -2782,30 +2830,51 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
2782
2830
|
show_preexisting: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
2783
2831
|
/** The GitHub account whose token fetches the pull request's previous review (`gh auth token --user`). */
|
|
2784
2832
|
github_account: z.ZodOptional<z.ZodString>;
|
|
2785
|
-
/** The
|
|
2833
|
+
/** The reviewer (review/reviewer.ts): the person's own coding-agent CLIs, headless and read-only. `enabled` runs it at push; `rigour review --reviewer` runs it on request. */
|
|
2786
2834
|
reviewer: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
2787
2835
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
2788
|
-
|
|
2836
|
+
/**
|
|
2837
|
+
* At push, once the deterministic gates pass: `background` (default) starts the model review of the pushed
|
|
2838
|
+
* commit without holding the push; `wait` holds the push for it; `off` reviews only on request. Either way
|
|
2839
|
+
* a model is asked only when the branch has an open, non-draft pull request (someone will read the push).
|
|
2840
|
+
*/
|
|
2841
|
+
on_push: z.ZodDefault<z.ZodOptional<z.ZodEnum<["background", "wait", "off"]>>>;
|
|
2842
|
+
/** The adapters, in order: claude, cursor, codex. */
|
|
2843
|
+
reviewers: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
2844
|
+
/** single: the first installed reviewer. cross: prefer a vendor not on the commits' trailers. full: two vendors, verdicts merged. */
|
|
2845
|
+
mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["single", "cross", "full"]>>>;
|
|
2846
|
+
/** The model for the claude reviewer. */
|
|
2789
2847
|
model: z.ZodOptional<z.ZodString>;
|
|
2848
|
+
/** A model per reviewer name, e.g. { cursor: "auto" }. */
|
|
2849
|
+
models: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
2790
2850
|
timeout_ms: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
2791
2851
|
}, "strip", z.ZodTypeAny, {
|
|
2792
2852
|
enabled: boolean;
|
|
2853
|
+
mode: "single" | "cross" | "full";
|
|
2793
2854
|
timeout_ms: number;
|
|
2794
|
-
|
|
2855
|
+
on_push: "off" | "background" | "wait";
|
|
2856
|
+
reviewers: string[];
|
|
2857
|
+
models: Record<string, string>;
|
|
2795
2858
|
model?: string | undefined;
|
|
2796
2859
|
}, {
|
|
2797
2860
|
enabled?: boolean | undefined;
|
|
2861
|
+
mode?: "single" | "cross" | "full" | undefined;
|
|
2798
2862
|
timeout_ms?: number | undefined;
|
|
2799
|
-
|
|
2863
|
+
on_push?: "off" | "background" | "wait" | undefined;
|
|
2864
|
+
reviewers?: string[] | undefined;
|
|
2800
2865
|
model?: string | undefined;
|
|
2866
|
+
models?: Record<string, string> | undefined;
|
|
2801
2867
|
}>>>;
|
|
2802
2868
|
}, "strip", z.ZodTypeAny, {
|
|
2803
2869
|
include_heuristics: boolean;
|
|
2804
2870
|
show_preexisting: boolean;
|
|
2805
2871
|
reviewer: {
|
|
2806
2872
|
enabled: boolean;
|
|
2873
|
+
mode: "single" | "cross" | "full";
|
|
2807
2874
|
timeout_ms: number;
|
|
2808
|
-
|
|
2875
|
+
on_push: "off" | "background" | "wait";
|
|
2876
|
+
reviewers: string[];
|
|
2877
|
+
models: Record<string, string>;
|
|
2809
2878
|
model?: string | undefined;
|
|
2810
2879
|
};
|
|
2811
2880
|
github_account?: string | undefined;
|
|
@@ -2815,9 +2884,12 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
2815
2884
|
github_account?: string | undefined;
|
|
2816
2885
|
reviewer?: {
|
|
2817
2886
|
enabled?: boolean | undefined;
|
|
2887
|
+
mode?: "single" | "cross" | "full" | undefined;
|
|
2818
2888
|
timeout_ms?: number | undefined;
|
|
2819
|
-
|
|
2889
|
+
on_push?: "off" | "background" | "wait" | undefined;
|
|
2890
|
+
reviewers?: string[] | undefined;
|
|
2820
2891
|
model?: string | undefined;
|
|
2892
|
+
models?: Record<string, string> | undefined;
|
|
2821
2893
|
} | undefined;
|
|
2822
2894
|
}>>>;
|
|
2823
2895
|
planned: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -3063,6 +3135,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
3063
3135
|
change_sweep: {
|
|
3064
3136
|
enabled: boolean;
|
|
3065
3137
|
};
|
|
3138
|
+
redundancy: {
|
|
3139
|
+
enabled: boolean;
|
|
3140
|
+
wire_contracts: string[];
|
|
3141
|
+
};
|
|
3066
3142
|
optional_params: {
|
|
3067
3143
|
enabled: boolean;
|
|
3068
3144
|
};
|
|
@@ -3124,8 +3200,11 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
3124
3200
|
show_preexisting: boolean;
|
|
3125
3201
|
reviewer: {
|
|
3126
3202
|
enabled: boolean;
|
|
3203
|
+
mode: "single" | "cross" | "full";
|
|
3127
3204
|
timeout_ms: number;
|
|
3128
|
-
|
|
3205
|
+
on_push: "off" | "background" | "wait";
|
|
3206
|
+
reviewers: string[];
|
|
3207
|
+
models: Record<string, string>;
|
|
3129
3208
|
model?: string | undefined;
|
|
3130
3209
|
};
|
|
3131
3210
|
github_account?: string | undefined;
|
|
@@ -3376,6 +3455,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
3376
3455
|
change_sweep?: {
|
|
3377
3456
|
enabled?: boolean | undefined;
|
|
3378
3457
|
} | undefined;
|
|
3458
|
+
redundancy?: {
|
|
3459
|
+
enabled?: boolean | undefined;
|
|
3460
|
+
wire_contracts?: string[] | undefined;
|
|
3461
|
+
} | undefined;
|
|
3379
3462
|
optional_params?: {
|
|
3380
3463
|
enabled?: boolean | undefined;
|
|
3381
3464
|
} | undefined;
|
|
@@ -3438,9 +3521,12 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
3438
3521
|
github_account?: string | undefined;
|
|
3439
3522
|
reviewer?: {
|
|
3440
3523
|
enabled?: boolean | undefined;
|
|
3524
|
+
mode?: "single" | "cross" | "full" | undefined;
|
|
3441
3525
|
timeout_ms?: number | undefined;
|
|
3442
|
-
|
|
3526
|
+
on_push?: "off" | "background" | "wait" | undefined;
|
|
3527
|
+
reviewers?: string[] | undefined;
|
|
3443
3528
|
model?: string | undefined;
|
|
3529
|
+
models?: Record<string, string> | undefined;
|
|
3444
3530
|
} | undefined;
|
|
3445
3531
|
} | undefined;
|
|
3446
3532
|
planned?: string[] | undefined;
|
package/dist/types/index.js
CHANGED
|
@@ -290,6 +290,16 @@ export const GatesSchema = z.object({
|
|
|
290
290
|
query_patterns: z.object({ enabled: z.boolean().optional().default(true) }).optional().default({}),
|
|
291
291
|
/** What a fix leaves half done: the narrower condition still used elsewhere, a prop wired into some sibling mounts only, an accumulator copied every step (review/partial-fixes.ts, partial-wiring.ts, loop-copies.ts). */
|
|
292
292
|
change_sweep: z.object({ enabled: z.boolean().optional().default(true) }).optional().default({}),
|
|
293
|
+
/**
|
|
294
|
+
* What a change made redundant, from the project's own TypeScript (review/typed/redundancy.ts): a null filter beside a
|
|
295
|
+
* range on the same column, a nullable row type the query filters non-null, an optional member every host supplies, a
|
|
296
|
+
* property written and never read. Runs at push, in `rigour review` and in a backtest (the program takes seconds to build).
|
|
297
|
+
* `wire_contracts`: files whose types another service reads, so their members are never write-only here.
|
|
298
|
+
*/
|
|
299
|
+
redundancy: z.object({
|
|
300
|
+
enabled: z.boolean().optional().default(true),
|
|
301
|
+
wire_contracts: z.array(z.string()).optional().default([]),
|
|
302
|
+
}).optional().default({}),
|
|
293
303
|
/** A parameter the change adds as optional that only tests omit (review/optional-params.ts). */
|
|
294
304
|
optional_params: z.object({ enabled: z.boolean().optional().default(true) }).optional().default({}),
|
|
295
305
|
/** A changed function whose body duplicates another in the files the change touched (review/duplicate-functions.ts). */
|
|
@@ -415,11 +425,23 @@ export const ConfigSchema = z.object({
|
|
|
415
425
|
show_preexisting: z.boolean().optional().default(false),
|
|
416
426
|
/** The GitHub account whose token fetches the pull request's previous review (`gh auth token --user`). */
|
|
417
427
|
github_account: z.string().optional(),
|
|
418
|
-
/** The
|
|
428
|
+
/** The reviewer (review/reviewer.ts): the person's own coding-agent CLIs, headless and read-only. `enabled` runs it at push; `rigour review --reviewer` runs it on request. */
|
|
419
429
|
reviewer: z.object({
|
|
420
430
|
enabled: z.boolean().optional().default(false),
|
|
421
|
-
|
|
431
|
+
/**
|
|
432
|
+
* At push, once the deterministic gates pass: `background` (default) starts the model review of the pushed
|
|
433
|
+
* commit without holding the push; `wait` holds the push for it; `off` reviews only on request. Either way
|
|
434
|
+
* a model is asked only when the branch has an open, non-draft pull request (someone will read the push).
|
|
435
|
+
*/
|
|
436
|
+
on_push: z.enum(['background', 'wait', 'off']).optional().default('background'),
|
|
437
|
+
/** The adapters, in order: claude, cursor, codex. */
|
|
438
|
+
reviewers: z.array(z.string()).optional().default(['claude']),
|
|
439
|
+
/** single: the first installed reviewer. cross: prefer a vendor not on the commits' trailers. full: two vendors, verdicts merged. */
|
|
440
|
+
mode: z.enum(['single', 'cross', 'full']).optional().default('single'),
|
|
441
|
+
/** The model for the claude reviewer. */
|
|
422
442
|
model: z.string().optional(),
|
|
443
|
+
/** A model per reviewer name, e.g. { cursor: "auto" }. */
|
|
444
|
+
models: z.record(z.string()).optional().default({}),
|
|
423
445
|
timeout_ms: z.number().optional().default(15 * 60_000),
|
|
424
446
|
}).optional().default({}),
|
|
425
447
|
}).optional().default({}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rigour-labs/core",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.6",
|
|
4
4
|
"description": "Rigour's review engine: deterministic gates on changed lines, rules and lessons learned from your team's fixes, and per-check precision from what you fix versus dismiss, across TypeScript, JavaScript, Python, Go, Ruby and C#.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22"
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
"pg": "^8.16.3",
|
|
75
75
|
"sqlite3": "^5.1.7",
|
|
76
76
|
"openai": "^4.104.0",
|
|
77
|
-
"@rigour-labs/brain-darwin-
|
|
78
|
-
"@rigour-labs/brain-darwin-
|
|
79
|
-
"@rigour-labs/brain-
|
|
80
|
-
"@rigour-labs/brain-linux-x64": "6.6.
|
|
81
|
-
"@rigour-labs/brain-
|
|
77
|
+
"@rigour-labs/brain-darwin-x64": "6.6.6",
|
|
78
|
+
"@rigour-labs/brain-darwin-arm64": "6.6.6",
|
|
79
|
+
"@rigour-labs/brain-win-x64": "6.6.6",
|
|
80
|
+
"@rigour-labs/brain-linux-x64": "6.6.6",
|
|
81
|
+
"@rigour-labs/brain-linux-arm64": "6.6.6"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@types/fs-extra": "^11.0.4",
|