@rigour-labs/core 2.17.2 → 2.18.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.
- package/dist/context.test.js +15 -1
- package/dist/discovery.js +14 -1
- package/dist/discovery.test.js +23 -0
- package/dist/gates/agent-team.d.ts +50 -0
- package/dist/gates/agent-team.js +159 -0
- package/dist/gates/agent-team.test.d.ts +1 -0
- package/dist/gates/agent-team.test.js +113 -0
- package/dist/gates/checkpoint.d.ts +72 -0
- package/dist/gates/checkpoint.js +231 -0
- package/dist/gates/checkpoint.test.d.ts +1 -0
- package/dist/gates/checkpoint.test.js +102 -0
- package/dist/gates/context.d.ts +35 -0
- package/dist/gates/context.js +151 -2
- package/dist/gates/runner.js +15 -0
- package/dist/gates/security-patterns.d.ts +48 -0
- package/dist/gates/security-patterns.js +236 -0
- package/dist/gates/security-patterns.test.d.ts +1 -0
- package/dist/gates/security-patterns.test.js +133 -0
- package/dist/services/adaptive-thresholds.d.ts +63 -0
- package/dist/services/adaptive-thresholds.js +204 -0
- package/dist/services/adaptive-thresholds.test.d.ts +1 -0
- package/dist/services/adaptive-thresholds.test.js +129 -0
- package/dist/templates/index.d.ts +1 -0
- package/dist/templates/index.js +81 -0
- package/dist/types/fix-packet.d.ts +4 -4
- package/dist/types/index.d.ts +404 -0
- package/dist/types/index.js +36 -0
- package/package.json +1 -1
- package/src/context.test.ts +15 -1
- package/src/discovery.test.ts +27 -0
- package/src/discovery.ts +15 -2
- package/src/gates/agent-team.test.ts +134 -0
- package/src/gates/agent-team.ts +210 -0
- package/src/gates/checkpoint.test.ts +135 -0
- package/src/gates/checkpoint.ts +311 -0
- package/src/gates/context.ts +200 -2
- package/src/gates/runner.ts +18 -0
- package/src/gates/security-patterns.test.ts +162 -0
- package/src/gates/security-patterns.ts +303 -0
- package/src/services/adaptive-thresholds.test.ts +189 -0
- package/src/services/adaptive-thresholds.ts +275 -0
- package/src/templates/index.ts +82 -0
- package/src/types/index.ts +36 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -92,16 +92,28 @@ export declare const GatesSchema: z.ZodObject<{
|
|
|
92
92
|
sensitivity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
93
93
|
mining_depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
94
94
|
ignored_patterns: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
95
|
+
cross_file_patterns: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
96
|
+
naming_consistency: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
97
|
+
import_relationships: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
98
|
+
max_cross_file_depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
95
99
|
}, "strip", z.ZodTypeAny, {
|
|
96
100
|
enabled: boolean;
|
|
97
101
|
sensitivity: number;
|
|
98
102
|
mining_depth: number;
|
|
99
103
|
ignored_patterns: string[];
|
|
104
|
+
cross_file_patterns: boolean;
|
|
105
|
+
naming_consistency: boolean;
|
|
106
|
+
import_relationships: boolean;
|
|
107
|
+
max_cross_file_depth: number;
|
|
100
108
|
}, {
|
|
101
109
|
enabled?: boolean | undefined;
|
|
102
110
|
sensitivity?: number | undefined;
|
|
103
111
|
mining_depth?: number | undefined;
|
|
104
112
|
ignored_patterns?: string[] | undefined;
|
|
113
|
+
cross_file_patterns?: boolean | undefined;
|
|
114
|
+
naming_consistency?: boolean | undefined;
|
|
115
|
+
import_relationships?: boolean | undefined;
|
|
116
|
+
max_cross_file_depth?: number | undefined;
|
|
105
117
|
}>>>;
|
|
106
118
|
environment: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
107
119
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -135,6 +147,91 @@ export declare const GatesSchema: z.ZodObject<{
|
|
|
135
147
|
auto_classify?: boolean | undefined;
|
|
136
148
|
doc_sources?: Record<string, string> | undefined;
|
|
137
149
|
}>>>;
|
|
150
|
+
agent_team: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
151
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
152
|
+
max_concurrent_agents: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
153
|
+
cross_agent_pattern_check: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
154
|
+
handoff_verification: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
155
|
+
task_ownership: z.ZodDefault<z.ZodOptional<z.ZodEnum<["strict", "collaborative"]>>>;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
enabled: boolean;
|
|
158
|
+
max_concurrent_agents: number;
|
|
159
|
+
cross_agent_pattern_check: boolean;
|
|
160
|
+
handoff_verification: boolean;
|
|
161
|
+
task_ownership: "strict" | "collaborative";
|
|
162
|
+
}, {
|
|
163
|
+
enabled?: boolean | undefined;
|
|
164
|
+
max_concurrent_agents?: number | undefined;
|
|
165
|
+
cross_agent_pattern_check?: boolean | undefined;
|
|
166
|
+
handoff_verification?: boolean | undefined;
|
|
167
|
+
task_ownership?: "strict" | "collaborative" | undefined;
|
|
168
|
+
}>>>;
|
|
169
|
+
checkpoint: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
170
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
171
|
+
interval_minutes: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
172
|
+
quality_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
173
|
+
drift_detection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
174
|
+
auto_save_on_failure: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
175
|
+
}, "strip", z.ZodTypeAny, {
|
|
176
|
+
enabled: boolean;
|
|
177
|
+
interval_minutes: number;
|
|
178
|
+
quality_threshold: number;
|
|
179
|
+
drift_detection: boolean;
|
|
180
|
+
auto_save_on_failure: boolean;
|
|
181
|
+
}, {
|
|
182
|
+
enabled?: boolean | undefined;
|
|
183
|
+
interval_minutes?: number | undefined;
|
|
184
|
+
quality_threshold?: number | undefined;
|
|
185
|
+
drift_detection?: boolean | undefined;
|
|
186
|
+
auto_save_on_failure?: boolean | undefined;
|
|
187
|
+
}>>>;
|
|
188
|
+
security: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
189
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
190
|
+
sql_injection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
191
|
+
xss: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
192
|
+
path_traversal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
193
|
+
hardcoded_secrets: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
194
|
+
insecure_randomness: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
195
|
+
command_injection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
196
|
+
block_on_severity: z.ZodDefault<z.ZodOptional<z.ZodEnum<["critical", "high", "medium", "low"]>>>;
|
|
197
|
+
}, "strip", z.ZodTypeAny, {
|
|
198
|
+
enabled: boolean;
|
|
199
|
+
sql_injection: boolean;
|
|
200
|
+
xss: boolean;
|
|
201
|
+
path_traversal: boolean;
|
|
202
|
+
hardcoded_secrets: boolean;
|
|
203
|
+
insecure_randomness: boolean;
|
|
204
|
+
command_injection: boolean;
|
|
205
|
+
block_on_severity: "critical" | "high" | "medium" | "low";
|
|
206
|
+
}, {
|
|
207
|
+
enabled?: boolean | undefined;
|
|
208
|
+
sql_injection?: boolean | undefined;
|
|
209
|
+
xss?: boolean | undefined;
|
|
210
|
+
path_traversal?: boolean | undefined;
|
|
211
|
+
hardcoded_secrets?: boolean | undefined;
|
|
212
|
+
insecure_randomness?: boolean | undefined;
|
|
213
|
+
command_injection?: boolean | undefined;
|
|
214
|
+
block_on_severity?: "critical" | "high" | "medium" | "low" | undefined;
|
|
215
|
+
}>>>;
|
|
216
|
+
adaptive: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
217
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
218
|
+
base_coverage_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
219
|
+
base_quality_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
220
|
+
auto_detect_tier: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
221
|
+
forced_tier: z.ZodOptional<z.ZodEnum<["hobby", "startup", "enterprise"]>>;
|
|
222
|
+
}, "strip", z.ZodTypeAny, {
|
|
223
|
+
enabled: boolean;
|
|
224
|
+
base_coverage_threshold: number;
|
|
225
|
+
base_quality_threshold: number;
|
|
226
|
+
auto_detect_tier: boolean;
|
|
227
|
+
forced_tier?: "hobby" | "startup" | "enterprise" | undefined;
|
|
228
|
+
}, {
|
|
229
|
+
enabled?: boolean | undefined;
|
|
230
|
+
base_coverage_threshold?: number | undefined;
|
|
231
|
+
base_quality_threshold?: number | undefined;
|
|
232
|
+
auto_detect_tier?: boolean | undefined;
|
|
233
|
+
forced_tier?: "hobby" | "startup" | "enterprise" | undefined;
|
|
234
|
+
}>>>;
|
|
138
235
|
}, "strip", z.ZodTypeAny, {
|
|
139
236
|
max_file_lines: number;
|
|
140
237
|
forbid_todos: boolean;
|
|
@@ -174,6 +271,10 @@ export declare const GatesSchema: z.ZodObject<{
|
|
|
174
271
|
sensitivity: number;
|
|
175
272
|
mining_depth: number;
|
|
176
273
|
ignored_patterns: string[];
|
|
274
|
+
cross_file_patterns: boolean;
|
|
275
|
+
naming_consistency: boolean;
|
|
276
|
+
import_relationships: boolean;
|
|
277
|
+
max_cross_file_depth: number;
|
|
177
278
|
};
|
|
178
279
|
environment: {
|
|
179
280
|
enabled: boolean;
|
|
@@ -187,6 +288,37 @@ export declare const GatesSchema: z.ZodObject<{
|
|
|
187
288
|
auto_classify: boolean;
|
|
188
289
|
doc_sources: Record<string, string>;
|
|
189
290
|
};
|
|
291
|
+
agent_team: {
|
|
292
|
+
enabled: boolean;
|
|
293
|
+
max_concurrent_agents: number;
|
|
294
|
+
cross_agent_pattern_check: boolean;
|
|
295
|
+
handoff_verification: boolean;
|
|
296
|
+
task_ownership: "strict" | "collaborative";
|
|
297
|
+
};
|
|
298
|
+
checkpoint: {
|
|
299
|
+
enabled: boolean;
|
|
300
|
+
interval_minutes: number;
|
|
301
|
+
quality_threshold: number;
|
|
302
|
+
drift_detection: boolean;
|
|
303
|
+
auto_save_on_failure: boolean;
|
|
304
|
+
};
|
|
305
|
+
security: {
|
|
306
|
+
enabled: boolean;
|
|
307
|
+
sql_injection: boolean;
|
|
308
|
+
xss: boolean;
|
|
309
|
+
path_traversal: boolean;
|
|
310
|
+
hardcoded_secrets: boolean;
|
|
311
|
+
insecure_randomness: boolean;
|
|
312
|
+
command_injection: boolean;
|
|
313
|
+
block_on_severity: "critical" | "high" | "medium" | "low";
|
|
314
|
+
};
|
|
315
|
+
adaptive: {
|
|
316
|
+
enabled: boolean;
|
|
317
|
+
base_coverage_threshold: number;
|
|
318
|
+
base_quality_threshold: number;
|
|
319
|
+
auto_detect_tier: boolean;
|
|
320
|
+
forced_tier?: "hobby" | "startup" | "enterprise" | undefined;
|
|
321
|
+
};
|
|
190
322
|
}, {
|
|
191
323
|
max_file_lines?: number | undefined;
|
|
192
324
|
forbid_todos?: boolean | undefined;
|
|
@@ -226,6 +358,10 @@ export declare const GatesSchema: z.ZodObject<{
|
|
|
226
358
|
sensitivity?: number | undefined;
|
|
227
359
|
mining_depth?: number | undefined;
|
|
228
360
|
ignored_patterns?: string[] | undefined;
|
|
361
|
+
cross_file_patterns?: boolean | undefined;
|
|
362
|
+
naming_consistency?: boolean | undefined;
|
|
363
|
+
import_relationships?: boolean | undefined;
|
|
364
|
+
max_cross_file_depth?: number | undefined;
|
|
229
365
|
} | undefined;
|
|
230
366
|
environment?: {
|
|
231
367
|
enabled?: boolean | undefined;
|
|
@@ -239,6 +375,37 @@ export declare const GatesSchema: z.ZodObject<{
|
|
|
239
375
|
auto_classify?: boolean | undefined;
|
|
240
376
|
doc_sources?: Record<string, string> | undefined;
|
|
241
377
|
} | undefined;
|
|
378
|
+
agent_team?: {
|
|
379
|
+
enabled?: boolean | undefined;
|
|
380
|
+
max_concurrent_agents?: number | undefined;
|
|
381
|
+
cross_agent_pattern_check?: boolean | undefined;
|
|
382
|
+
handoff_verification?: boolean | undefined;
|
|
383
|
+
task_ownership?: "strict" | "collaborative" | undefined;
|
|
384
|
+
} | undefined;
|
|
385
|
+
checkpoint?: {
|
|
386
|
+
enabled?: boolean | undefined;
|
|
387
|
+
interval_minutes?: number | undefined;
|
|
388
|
+
quality_threshold?: number | undefined;
|
|
389
|
+
drift_detection?: boolean | undefined;
|
|
390
|
+
auto_save_on_failure?: boolean | undefined;
|
|
391
|
+
} | undefined;
|
|
392
|
+
security?: {
|
|
393
|
+
enabled?: boolean | undefined;
|
|
394
|
+
sql_injection?: boolean | undefined;
|
|
395
|
+
xss?: boolean | undefined;
|
|
396
|
+
path_traversal?: boolean | undefined;
|
|
397
|
+
hardcoded_secrets?: boolean | undefined;
|
|
398
|
+
insecure_randomness?: boolean | undefined;
|
|
399
|
+
command_injection?: boolean | undefined;
|
|
400
|
+
block_on_severity?: "critical" | "high" | "medium" | "low" | undefined;
|
|
401
|
+
} | undefined;
|
|
402
|
+
adaptive?: {
|
|
403
|
+
enabled?: boolean | undefined;
|
|
404
|
+
base_coverage_threshold?: number | undefined;
|
|
405
|
+
base_quality_threshold?: number | undefined;
|
|
406
|
+
auto_detect_tier?: boolean | undefined;
|
|
407
|
+
forced_tier?: "hobby" | "startup" | "enterprise" | undefined;
|
|
408
|
+
} | undefined;
|
|
242
409
|
}>;
|
|
243
410
|
export declare const CommandsSchema: z.ZodObject<{
|
|
244
411
|
format: z.ZodOptional<z.ZodString>;
|
|
@@ -369,16 +536,28 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
369
536
|
sensitivity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
370
537
|
mining_depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
371
538
|
ignored_patterns: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
539
|
+
cross_file_patterns: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
540
|
+
naming_consistency: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
541
|
+
import_relationships: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
542
|
+
max_cross_file_depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
372
543
|
}, "strip", z.ZodTypeAny, {
|
|
373
544
|
enabled: boolean;
|
|
374
545
|
sensitivity: number;
|
|
375
546
|
mining_depth: number;
|
|
376
547
|
ignored_patterns: string[];
|
|
548
|
+
cross_file_patterns: boolean;
|
|
549
|
+
naming_consistency: boolean;
|
|
550
|
+
import_relationships: boolean;
|
|
551
|
+
max_cross_file_depth: number;
|
|
377
552
|
}, {
|
|
378
553
|
enabled?: boolean | undefined;
|
|
379
554
|
sensitivity?: number | undefined;
|
|
380
555
|
mining_depth?: number | undefined;
|
|
381
556
|
ignored_patterns?: string[] | undefined;
|
|
557
|
+
cross_file_patterns?: boolean | undefined;
|
|
558
|
+
naming_consistency?: boolean | undefined;
|
|
559
|
+
import_relationships?: boolean | undefined;
|
|
560
|
+
max_cross_file_depth?: number | undefined;
|
|
382
561
|
}>>>;
|
|
383
562
|
environment: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
384
563
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -412,6 +591,91 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
412
591
|
auto_classify?: boolean | undefined;
|
|
413
592
|
doc_sources?: Record<string, string> | undefined;
|
|
414
593
|
}>>>;
|
|
594
|
+
agent_team: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
595
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
596
|
+
max_concurrent_agents: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
597
|
+
cross_agent_pattern_check: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
598
|
+
handoff_verification: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
599
|
+
task_ownership: z.ZodDefault<z.ZodOptional<z.ZodEnum<["strict", "collaborative"]>>>;
|
|
600
|
+
}, "strip", z.ZodTypeAny, {
|
|
601
|
+
enabled: boolean;
|
|
602
|
+
max_concurrent_agents: number;
|
|
603
|
+
cross_agent_pattern_check: boolean;
|
|
604
|
+
handoff_verification: boolean;
|
|
605
|
+
task_ownership: "strict" | "collaborative";
|
|
606
|
+
}, {
|
|
607
|
+
enabled?: boolean | undefined;
|
|
608
|
+
max_concurrent_agents?: number | undefined;
|
|
609
|
+
cross_agent_pattern_check?: boolean | undefined;
|
|
610
|
+
handoff_verification?: boolean | undefined;
|
|
611
|
+
task_ownership?: "strict" | "collaborative" | undefined;
|
|
612
|
+
}>>>;
|
|
613
|
+
checkpoint: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
614
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
615
|
+
interval_minutes: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
616
|
+
quality_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
617
|
+
drift_detection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
618
|
+
auto_save_on_failure: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
619
|
+
}, "strip", z.ZodTypeAny, {
|
|
620
|
+
enabled: boolean;
|
|
621
|
+
interval_minutes: number;
|
|
622
|
+
quality_threshold: number;
|
|
623
|
+
drift_detection: boolean;
|
|
624
|
+
auto_save_on_failure: boolean;
|
|
625
|
+
}, {
|
|
626
|
+
enabled?: boolean | undefined;
|
|
627
|
+
interval_minutes?: number | undefined;
|
|
628
|
+
quality_threshold?: number | undefined;
|
|
629
|
+
drift_detection?: boolean | undefined;
|
|
630
|
+
auto_save_on_failure?: boolean | undefined;
|
|
631
|
+
}>>>;
|
|
632
|
+
security: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
633
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
634
|
+
sql_injection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
635
|
+
xss: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
636
|
+
path_traversal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
637
|
+
hardcoded_secrets: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
638
|
+
insecure_randomness: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
639
|
+
command_injection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
640
|
+
block_on_severity: z.ZodDefault<z.ZodOptional<z.ZodEnum<["critical", "high", "medium", "low"]>>>;
|
|
641
|
+
}, "strip", z.ZodTypeAny, {
|
|
642
|
+
enabled: boolean;
|
|
643
|
+
sql_injection: boolean;
|
|
644
|
+
xss: boolean;
|
|
645
|
+
path_traversal: boolean;
|
|
646
|
+
hardcoded_secrets: boolean;
|
|
647
|
+
insecure_randomness: boolean;
|
|
648
|
+
command_injection: boolean;
|
|
649
|
+
block_on_severity: "critical" | "high" | "medium" | "low";
|
|
650
|
+
}, {
|
|
651
|
+
enabled?: boolean | undefined;
|
|
652
|
+
sql_injection?: boolean | undefined;
|
|
653
|
+
xss?: boolean | undefined;
|
|
654
|
+
path_traversal?: boolean | undefined;
|
|
655
|
+
hardcoded_secrets?: boolean | undefined;
|
|
656
|
+
insecure_randomness?: boolean | undefined;
|
|
657
|
+
command_injection?: boolean | undefined;
|
|
658
|
+
block_on_severity?: "critical" | "high" | "medium" | "low" | undefined;
|
|
659
|
+
}>>>;
|
|
660
|
+
adaptive: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
661
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
662
|
+
base_coverage_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
663
|
+
base_quality_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
664
|
+
auto_detect_tier: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
665
|
+
forced_tier: z.ZodOptional<z.ZodEnum<["hobby", "startup", "enterprise"]>>;
|
|
666
|
+
}, "strip", z.ZodTypeAny, {
|
|
667
|
+
enabled: boolean;
|
|
668
|
+
base_coverage_threshold: number;
|
|
669
|
+
base_quality_threshold: number;
|
|
670
|
+
auto_detect_tier: boolean;
|
|
671
|
+
forced_tier?: "hobby" | "startup" | "enterprise" | undefined;
|
|
672
|
+
}, {
|
|
673
|
+
enabled?: boolean | undefined;
|
|
674
|
+
base_coverage_threshold?: number | undefined;
|
|
675
|
+
base_quality_threshold?: number | undefined;
|
|
676
|
+
auto_detect_tier?: boolean | undefined;
|
|
677
|
+
forced_tier?: "hobby" | "startup" | "enterprise" | undefined;
|
|
678
|
+
}>>>;
|
|
415
679
|
}, "strip", z.ZodTypeAny, {
|
|
416
680
|
max_file_lines: number;
|
|
417
681
|
forbid_todos: boolean;
|
|
@@ -451,6 +715,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
451
715
|
sensitivity: number;
|
|
452
716
|
mining_depth: number;
|
|
453
717
|
ignored_patterns: string[];
|
|
718
|
+
cross_file_patterns: boolean;
|
|
719
|
+
naming_consistency: boolean;
|
|
720
|
+
import_relationships: boolean;
|
|
721
|
+
max_cross_file_depth: number;
|
|
454
722
|
};
|
|
455
723
|
environment: {
|
|
456
724
|
enabled: boolean;
|
|
@@ -464,6 +732,37 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
464
732
|
auto_classify: boolean;
|
|
465
733
|
doc_sources: Record<string, string>;
|
|
466
734
|
};
|
|
735
|
+
agent_team: {
|
|
736
|
+
enabled: boolean;
|
|
737
|
+
max_concurrent_agents: number;
|
|
738
|
+
cross_agent_pattern_check: boolean;
|
|
739
|
+
handoff_verification: boolean;
|
|
740
|
+
task_ownership: "strict" | "collaborative";
|
|
741
|
+
};
|
|
742
|
+
checkpoint: {
|
|
743
|
+
enabled: boolean;
|
|
744
|
+
interval_minutes: number;
|
|
745
|
+
quality_threshold: number;
|
|
746
|
+
drift_detection: boolean;
|
|
747
|
+
auto_save_on_failure: boolean;
|
|
748
|
+
};
|
|
749
|
+
security: {
|
|
750
|
+
enabled: boolean;
|
|
751
|
+
sql_injection: boolean;
|
|
752
|
+
xss: boolean;
|
|
753
|
+
path_traversal: boolean;
|
|
754
|
+
hardcoded_secrets: boolean;
|
|
755
|
+
insecure_randomness: boolean;
|
|
756
|
+
command_injection: boolean;
|
|
757
|
+
block_on_severity: "critical" | "high" | "medium" | "low";
|
|
758
|
+
};
|
|
759
|
+
adaptive: {
|
|
760
|
+
enabled: boolean;
|
|
761
|
+
base_coverage_threshold: number;
|
|
762
|
+
base_quality_threshold: number;
|
|
763
|
+
auto_detect_tier: boolean;
|
|
764
|
+
forced_tier?: "hobby" | "startup" | "enterprise" | undefined;
|
|
765
|
+
};
|
|
467
766
|
}, {
|
|
468
767
|
max_file_lines?: number | undefined;
|
|
469
768
|
forbid_todos?: boolean | undefined;
|
|
@@ -503,6 +802,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
503
802
|
sensitivity?: number | undefined;
|
|
504
803
|
mining_depth?: number | undefined;
|
|
505
804
|
ignored_patterns?: string[] | undefined;
|
|
805
|
+
cross_file_patterns?: boolean | undefined;
|
|
806
|
+
naming_consistency?: boolean | undefined;
|
|
807
|
+
import_relationships?: boolean | undefined;
|
|
808
|
+
max_cross_file_depth?: number | undefined;
|
|
506
809
|
} | undefined;
|
|
507
810
|
environment?: {
|
|
508
811
|
enabled?: boolean | undefined;
|
|
@@ -516,6 +819,37 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
516
819
|
auto_classify?: boolean | undefined;
|
|
517
820
|
doc_sources?: Record<string, string> | undefined;
|
|
518
821
|
} | undefined;
|
|
822
|
+
agent_team?: {
|
|
823
|
+
enabled?: boolean | undefined;
|
|
824
|
+
max_concurrent_agents?: number | undefined;
|
|
825
|
+
cross_agent_pattern_check?: boolean | undefined;
|
|
826
|
+
handoff_verification?: boolean | undefined;
|
|
827
|
+
task_ownership?: "strict" | "collaborative" | undefined;
|
|
828
|
+
} | undefined;
|
|
829
|
+
checkpoint?: {
|
|
830
|
+
enabled?: boolean | undefined;
|
|
831
|
+
interval_minutes?: number | undefined;
|
|
832
|
+
quality_threshold?: number | undefined;
|
|
833
|
+
drift_detection?: boolean | undefined;
|
|
834
|
+
auto_save_on_failure?: boolean | undefined;
|
|
835
|
+
} | undefined;
|
|
836
|
+
security?: {
|
|
837
|
+
enabled?: boolean | undefined;
|
|
838
|
+
sql_injection?: boolean | undefined;
|
|
839
|
+
xss?: boolean | undefined;
|
|
840
|
+
path_traversal?: boolean | undefined;
|
|
841
|
+
hardcoded_secrets?: boolean | undefined;
|
|
842
|
+
insecure_randomness?: boolean | undefined;
|
|
843
|
+
command_injection?: boolean | undefined;
|
|
844
|
+
block_on_severity?: "critical" | "high" | "medium" | "low" | undefined;
|
|
845
|
+
} | undefined;
|
|
846
|
+
adaptive?: {
|
|
847
|
+
enabled?: boolean | undefined;
|
|
848
|
+
base_coverage_threshold?: number | undefined;
|
|
849
|
+
base_quality_threshold?: number | undefined;
|
|
850
|
+
auto_detect_tier?: boolean | undefined;
|
|
851
|
+
forced_tier?: "hobby" | "startup" | "enterprise" | undefined;
|
|
852
|
+
} | undefined;
|
|
519
853
|
}>>>;
|
|
520
854
|
output: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
521
855
|
report_path: z.ZodDefault<z.ZodString>;
|
|
@@ -574,6 +908,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
574
908
|
sensitivity: number;
|
|
575
909
|
mining_depth: number;
|
|
576
910
|
ignored_patterns: string[];
|
|
911
|
+
cross_file_patterns: boolean;
|
|
912
|
+
naming_consistency: boolean;
|
|
913
|
+
import_relationships: boolean;
|
|
914
|
+
max_cross_file_depth: number;
|
|
577
915
|
};
|
|
578
916
|
environment: {
|
|
579
917
|
enabled: boolean;
|
|
@@ -587,6 +925,37 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
587
925
|
auto_classify: boolean;
|
|
588
926
|
doc_sources: Record<string, string>;
|
|
589
927
|
};
|
|
928
|
+
agent_team: {
|
|
929
|
+
enabled: boolean;
|
|
930
|
+
max_concurrent_agents: number;
|
|
931
|
+
cross_agent_pattern_check: boolean;
|
|
932
|
+
handoff_verification: boolean;
|
|
933
|
+
task_ownership: "strict" | "collaborative";
|
|
934
|
+
};
|
|
935
|
+
checkpoint: {
|
|
936
|
+
enabled: boolean;
|
|
937
|
+
interval_minutes: number;
|
|
938
|
+
quality_threshold: number;
|
|
939
|
+
drift_detection: boolean;
|
|
940
|
+
auto_save_on_failure: boolean;
|
|
941
|
+
};
|
|
942
|
+
security: {
|
|
943
|
+
enabled: boolean;
|
|
944
|
+
sql_injection: boolean;
|
|
945
|
+
xss: boolean;
|
|
946
|
+
path_traversal: boolean;
|
|
947
|
+
hardcoded_secrets: boolean;
|
|
948
|
+
insecure_randomness: boolean;
|
|
949
|
+
command_injection: boolean;
|
|
950
|
+
block_on_severity: "critical" | "high" | "medium" | "low";
|
|
951
|
+
};
|
|
952
|
+
adaptive: {
|
|
953
|
+
enabled: boolean;
|
|
954
|
+
base_coverage_threshold: number;
|
|
955
|
+
base_quality_threshold: number;
|
|
956
|
+
auto_detect_tier: boolean;
|
|
957
|
+
forced_tier?: "hobby" | "startup" | "enterprise" | undefined;
|
|
958
|
+
};
|
|
590
959
|
};
|
|
591
960
|
output: {
|
|
592
961
|
report_path: string;
|
|
@@ -644,6 +1013,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
644
1013
|
sensitivity?: number | undefined;
|
|
645
1014
|
mining_depth?: number | undefined;
|
|
646
1015
|
ignored_patterns?: string[] | undefined;
|
|
1016
|
+
cross_file_patterns?: boolean | undefined;
|
|
1017
|
+
naming_consistency?: boolean | undefined;
|
|
1018
|
+
import_relationships?: boolean | undefined;
|
|
1019
|
+
max_cross_file_depth?: number | undefined;
|
|
647
1020
|
} | undefined;
|
|
648
1021
|
environment?: {
|
|
649
1022
|
enabled?: boolean | undefined;
|
|
@@ -657,6 +1030,37 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
657
1030
|
auto_classify?: boolean | undefined;
|
|
658
1031
|
doc_sources?: Record<string, string> | undefined;
|
|
659
1032
|
} | undefined;
|
|
1033
|
+
agent_team?: {
|
|
1034
|
+
enabled?: boolean | undefined;
|
|
1035
|
+
max_concurrent_agents?: number | undefined;
|
|
1036
|
+
cross_agent_pattern_check?: boolean | undefined;
|
|
1037
|
+
handoff_verification?: boolean | undefined;
|
|
1038
|
+
task_ownership?: "strict" | "collaborative" | undefined;
|
|
1039
|
+
} | undefined;
|
|
1040
|
+
checkpoint?: {
|
|
1041
|
+
enabled?: boolean | undefined;
|
|
1042
|
+
interval_minutes?: number | undefined;
|
|
1043
|
+
quality_threshold?: number | undefined;
|
|
1044
|
+
drift_detection?: boolean | undefined;
|
|
1045
|
+
auto_save_on_failure?: boolean | undefined;
|
|
1046
|
+
} | undefined;
|
|
1047
|
+
security?: {
|
|
1048
|
+
enabled?: boolean | undefined;
|
|
1049
|
+
sql_injection?: boolean | undefined;
|
|
1050
|
+
xss?: boolean | undefined;
|
|
1051
|
+
path_traversal?: boolean | undefined;
|
|
1052
|
+
hardcoded_secrets?: boolean | undefined;
|
|
1053
|
+
insecure_randomness?: boolean | undefined;
|
|
1054
|
+
command_injection?: boolean | undefined;
|
|
1055
|
+
block_on_severity?: "critical" | "high" | "medium" | "low" | undefined;
|
|
1056
|
+
} | undefined;
|
|
1057
|
+
adaptive?: {
|
|
1058
|
+
enabled?: boolean | undefined;
|
|
1059
|
+
base_coverage_threshold?: number | undefined;
|
|
1060
|
+
base_quality_threshold?: number | undefined;
|
|
1061
|
+
auto_detect_tier?: boolean | undefined;
|
|
1062
|
+
forced_tier?: "hobby" | "startup" | "enterprise" | undefined;
|
|
1063
|
+
} | undefined;
|
|
660
1064
|
} | undefined;
|
|
661
1065
|
output?: {
|
|
662
1066
|
report_path?: string | undefined;
|
package/dist/types/index.js
CHANGED
|
@@ -53,6 +53,11 @@ export const GatesSchema = z.object({
|
|
|
53
53
|
sensitivity: z.number().min(0).max(1).optional().default(0.8), // 0.8 correlation threshold
|
|
54
54
|
mining_depth: z.number().optional().default(100), // Number of files to sample
|
|
55
55
|
ignored_patterns: z.array(z.string()).optional().default([]),
|
|
56
|
+
// v2.14+ Extended Context for frontier models
|
|
57
|
+
cross_file_patterns: z.boolean().optional().default(true),
|
|
58
|
+
naming_consistency: z.boolean().optional().default(true),
|
|
59
|
+
import_relationships: z.boolean().optional().default(true),
|
|
60
|
+
max_cross_file_depth: z.number().optional().default(50),
|
|
56
61
|
}).optional().default({}),
|
|
57
62
|
environment: z.object({
|
|
58
63
|
enabled: z.boolean().optional().default(true),
|
|
@@ -66,6 +71,37 @@ export const GatesSchema = z.object({
|
|
|
66
71
|
auto_classify: z.boolean().optional().default(true), // Auto-detect failure category from error message
|
|
67
72
|
doc_sources: z.record(z.string()).optional().default({}), // Custom doc URLs per category
|
|
68
73
|
}).optional().default({}),
|
|
74
|
+
agent_team: z.object({
|
|
75
|
+
enabled: z.boolean().optional().default(false),
|
|
76
|
+
max_concurrent_agents: z.number().optional().default(3),
|
|
77
|
+
cross_agent_pattern_check: z.boolean().optional().default(true),
|
|
78
|
+
handoff_verification: z.boolean().optional().default(true),
|
|
79
|
+
task_ownership: z.enum(['strict', 'collaborative']).optional().default('strict'),
|
|
80
|
+
}).optional().default({}),
|
|
81
|
+
checkpoint: z.object({
|
|
82
|
+
enabled: z.boolean().optional().default(false),
|
|
83
|
+
interval_minutes: z.number().optional().default(15),
|
|
84
|
+
quality_threshold: z.number().optional().default(80),
|
|
85
|
+
drift_detection: z.boolean().optional().default(true),
|
|
86
|
+
auto_save_on_failure: z.boolean().optional().default(true),
|
|
87
|
+
}).optional().default({}),
|
|
88
|
+
security: z.object({
|
|
89
|
+
enabled: z.boolean().optional().default(false),
|
|
90
|
+
sql_injection: z.boolean().optional().default(true),
|
|
91
|
+
xss: z.boolean().optional().default(true),
|
|
92
|
+
path_traversal: z.boolean().optional().default(true),
|
|
93
|
+
hardcoded_secrets: z.boolean().optional().default(true),
|
|
94
|
+
insecure_randomness: z.boolean().optional().default(true),
|
|
95
|
+
command_injection: z.boolean().optional().default(true),
|
|
96
|
+
block_on_severity: z.enum(['critical', 'high', 'medium', 'low']).optional().default('high'),
|
|
97
|
+
}).optional().default({}),
|
|
98
|
+
adaptive: z.object({
|
|
99
|
+
enabled: z.boolean().optional().default(false),
|
|
100
|
+
base_coverage_threshold: z.number().optional().default(80),
|
|
101
|
+
base_quality_threshold: z.number().optional().default(80),
|
|
102
|
+
auto_detect_tier: z.boolean().optional().default(true),
|
|
103
|
+
forced_tier: z.enum(['hobby', 'startup', 'enterprise']).optional(),
|
|
104
|
+
}).optional().default({}),
|
|
69
105
|
});
|
|
70
106
|
export const CommandsSchema = z.object({
|
|
71
107
|
format: z.string().optional(),
|
package/package.json
CHANGED
package/src/context.test.ts
CHANGED
|
@@ -34,6 +34,11 @@ describe('Context Awareness Engine', () => {
|
|
|
34
34
|
enabled: true,
|
|
35
35
|
sensitivity: 0.8,
|
|
36
36
|
mining_depth: 10,
|
|
37
|
+
ignored_patterns: [],
|
|
38
|
+
cross_file_patterns: true,
|
|
39
|
+
naming_consistency: true,
|
|
40
|
+
import_relationships: true,
|
|
41
|
+
max_cross_file_depth: 50,
|
|
37
42
|
},
|
|
38
43
|
},
|
|
39
44
|
output: { report_path: 'rigour-report.json' }
|
|
@@ -57,7 +62,16 @@ describe('Context Awareness Engine', () => {
|
|
|
57
62
|
version: 1,
|
|
58
63
|
commands: {},
|
|
59
64
|
gates: {
|
|
60
|
-
context: {
|
|
65
|
+
context: {
|
|
66
|
+
enabled: true,
|
|
67
|
+
sensitivity: 0.8,
|
|
68
|
+
mining_depth: 100,
|
|
69
|
+
ignored_patterns: [],
|
|
70
|
+
cross_file_patterns: true,
|
|
71
|
+
naming_consistency: true,
|
|
72
|
+
import_relationships: true,
|
|
73
|
+
max_cross_file_depth: 50,
|
|
74
|
+
},
|
|
61
75
|
},
|
|
62
76
|
output: { report_path: 'rigour-report.json' }
|
|
63
77
|
};
|
package/src/discovery.test.ts
CHANGED
|
@@ -58,4 +58,31 @@ describe('DiscoveryService', () => {
|
|
|
58
58
|
const result = await service.discover('/test');
|
|
59
59
|
expect(result.matches.paradigm?.name).toBe('oop');
|
|
60
60
|
});
|
|
61
|
+
|
|
62
|
+
it('should include project-type-aware ignore patterns for API preset', async () => {
|
|
63
|
+
const service = new DiscoveryService();
|
|
64
|
+
// Mock finding requirements.txt (Python API marker)
|
|
65
|
+
vi.mocked(fs.pathExists).mockImplementation(async (p: string) => p.includes('requirements.txt'));
|
|
66
|
+
vi.mocked(fs.readdir).mockResolvedValue(['requirements.txt'] as any);
|
|
67
|
+
vi.mocked(fs.readFile).mockResolvedValue('flask==2.0.0' as any);
|
|
68
|
+
|
|
69
|
+
const result = await service.discover('/test');
|
|
70
|
+
expect(result.matches.preset?.name).toBe('api');
|
|
71
|
+
expect(result.config.ignore).toContain('venv/**');
|
|
72
|
+
expect(result.config.ignore).toContain('__pycache__/**');
|
|
73
|
+
expect(result.config.ignore).toContain('*.pyc');
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it('should include project-type-aware ignore patterns for UI preset', async () => {
|
|
77
|
+
const service = new DiscoveryService();
|
|
78
|
+
// Mock finding next.config.js (UI marker)
|
|
79
|
+
vi.mocked(fs.pathExists).mockImplementation(async (p: string) => p.includes('next.config.js'));
|
|
80
|
+
vi.mocked(fs.readdir).mockResolvedValue(['next.config.js'] as any);
|
|
81
|
+
vi.mocked(fs.readFile).mockResolvedValue('module.exports = {}' as any);
|
|
82
|
+
|
|
83
|
+
const result = await service.discover('/test');
|
|
84
|
+
expect(result.matches.preset?.name).toBe('ui');
|
|
85
|
+
expect(result.config.ignore).toContain('node_modules/**');
|
|
86
|
+
expect(result.config.ignore).toContain('.next/**');
|
|
87
|
+
});
|
|
61
88
|
});
|