@aiready/core 0.21.10 → 0.21.13
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/chunk-COHIBX3Q.mjs +617 -0
- package/dist/chunk-MH3A3LX6.mjs +597 -0
- package/dist/chunk-X4F46I5L.mjs +617 -0
- package/dist/client.d.mts +12 -2
- package/dist/client.d.ts +12 -2
- package/dist/client.js +23 -5
- package/dist/client.mjs +5 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +31 -10
- package/dist/index.mjs +13 -6
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -433,8 +433,15 @@ interface ScanOptions {
|
|
|
433
433
|
includeTests?: boolean;
|
|
434
434
|
}
|
|
435
435
|
/**
|
|
436
|
-
* Global options that
|
|
436
|
+
* Global infrastructure options that apply to the whole scan process.
|
|
437
|
+
* These are passed to all tools but usually omitted from tool-specific audit logs
|
|
438
|
+
* to avoid redundancy.
|
|
437
439
|
*/
|
|
440
|
+
declare const GLOBAL_INFRA_OPTIONS: string[];
|
|
441
|
+
/**
|
|
442
|
+
* Common fine-tuning options that might be passed globally but are actually tool-specific.
|
|
443
|
+
*/
|
|
444
|
+
declare const COMMON_FINE_TUNING_OPTIONS: string[];
|
|
438
445
|
declare const GLOBAL_SCAN_OPTIONS: string[];
|
|
439
446
|
interface AIReadyConfig {
|
|
440
447
|
scan?: {
|
|
@@ -551,6 +558,7 @@ interface Report {
|
|
|
551
558
|
overallScore: number;
|
|
552
559
|
tokenCostTotal: number;
|
|
553
560
|
avgConsistency: number;
|
|
561
|
+
executionTime?: number;
|
|
554
562
|
};
|
|
555
563
|
}
|
|
556
564
|
/**
|
|
@@ -595,6 +603,8 @@ interface GraphMetadata {
|
|
|
595
603
|
infoIssues: number;
|
|
596
604
|
/** AI token budget unit economics (v0.13+) */
|
|
597
605
|
tokenBudget?: TokenBudget;
|
|
606
|
+
/** Execution time in milliseconds */
|
|
607
|
+
executionTime?: number;
|
|
598
608
|
}
|
|
599
609
|
/**
|
|
600
610
|
* Complete graph data structure for visualization
|
|
@@ -923,4 +933,4 @@ declare function formatToolScore(output: ToolScoringOutput): string;
|
|
|
923
933
|
*/
|
|
924
934
|
declare function generateHTML(graph: GraphData): string;
|
|
925
935
|
|
|
926
|
-
export { type AIReadyConfig, type AcceptancePrediction, type AnalysisResult, AnalysisResultSchema, AnalysisStatus, AnalysisStatusSchema, type BusinessReport, CONTEXT_TIER_THRESHOLDS, type CommonASTNode, type ComprehensionDifficulty, type CostConfig, DEFAULT_TOOL_WEIGHTS, type ExportInfo, FRIENDLY_TOOL_NAMES, GLOBAL_SCAN_OPTIONS, type GraphData, type GraphEdge, type GraphIssueSeverity, type GraphMetadata, type GraphNode, type ImportInfo, type Issue, IssueSchema, IssueType, IssueTypeSchema, LANGUAGE_EXTENSIONS, Language, type LanguageConfig, type LanguageParser, type Location, LocationSchema, type Metrics, MetricsSchema, type ModelContextTier, ModelTier, ModelTierSchema, type NamingConvention, ParseError, type ParseResult, type ParseStatistics, type ProductivityImpact, type Report, SIZE_ADJUSTED_THRESHOLDS, type ScanOptions, type ScoringConfig, type ScoringResult, Severity, SeveritySchema, type SourceLocation, type SourceRange, type SpokeOutput, SpokeOutputSchema, type SpokeSummary, SpokeSummarySchema, TOOL_NAME_MAP, type TechnicalValueChain, type TechnicalValueChainSummary, type TokenBudget, ToolName, ToolNameSchema, type ToolScoringOutput, type UnifiedReport, UnifiedReportSchema, calculateOverallScore, formatScore, formatToolScore, generateHTML, getProjectSizeTier, getRating, getRatingDisplay, getRatingWithContext, getRecommendedThreshold, getToolWeight, normalizeToolName, parseWeightString };
|
|
936
|
+
export { type AIReadyConfig, type AcceptancePrediction, type AnalysisResult, AnalysisResultSchema, AnalysisStatus, AnalysisStatusSchema, type BusinessReport, COMMON_FINE_TUNING_OPTIONS, CONTEXT_TIER_THRESHOLDS, type CommonASTNode, type ComprehensionDifficulty, type CostConfig, DEFAULT_TOOL_WEIGHTS, type ExportInfo, FRIENDLY_TOOL_NAMES, GLOBAL_INFRA_OPTIONS, GLOBAL_SCAN_OPTIONS, type GraphData, type GraphEdge, type GraphIssueSeverity, type GraphMetadata, type GraphNode, type ImportInfo, type Issue, IssueSchema, IssueType, IssueTypeSchema, LANGUAGE_EXTENSIONS, Language, type LanguageConfig, type LanguageParser, type Location, LocationSchema, type Metrics, MetricsSchema, type ModelContextTier, ModelTier, ModelTierSchema, type NamingConvention, ParseError, type ParseResult, type ParseStatistics, type ProductivityImpact, type Report, SIZE_ADJUSTED_THRESHOLDS, type ScanOptions, type ScoringConfig, type ScoringResult, Severity, SeveritySchema, type SourceLocation, type SourceRange, type SpokeOutput, SpokeOutputSchema, type SpokeSummary, SpokeSummarySchema, TOOL_NAME_MAP, type TechnicalValueChain, type TechnicalValueChainSummary, type TokenBudget, ToolName, ToolNameSchema, type ToolScoringOutput, type UnifiedReport, UnifiedReportSchema, calculateOverallScore, formatScore, formatToolScore, generateHTML, getProjectSizeTier, getRating, getRatingDisplay, getRatingWithContext, getRecommendedThreshold, getToolWeight, normalizeToolName, parseWeightString };
|
package/dist/client.js
CHANGED
|
@@ -23,9 +23,11 @@ __export(client_exports, {
|
|
|
23
23
|
AnalysisResultSchema: () => AnalysisResultSchema,
|
|
24
24
|
AnalysisStatus: () => AnalysisStatus,
|
|
25
25
|
AnalysisStatusSchema: () => AnalysisStatusSchema,
|
|
26
|
+
COMMON_FINE_TUNING_OPTIONS: () => COMMON_FINE_TUNING_OPTIONS,
|
|
26
27
|
CONTEXT_TIER_THRESHOLDS: () => CONTEXT_TIER_THRESHOLDS,
|
|
27
28
|
DEFAULT_TOOL_WEIGHTS: () => DEFAULT_TOOL_WEIGHTS,
|
|
28
29
|
FRIENDLY_TOOL_NAMES: () => FRIENDLY_TOOL_NAMES,
|
|
30
|
+
GLOBAL_INFRA_OPTIONS: () => GLOBAL_INFRA_OPTIONS,
|
|
29
31
|
GLOBAL_SCAN_OPTIONS: () => GLOBAL_SCAN_OPTIONS,
|
|
30
32
|
IssueSchema: () => IssueSchema,
|
|
31
33
|
IssueType: () => IssueType,
|
|
@@ -218,21 +220,35 @@ var UnifiedReportSchema = import_zod.z.object({
|
|
|
218
220
|
}).catchall(import_zod.z.any());
|
|
219
221
|
|
|
220
222
|
// src/types.ts
|
|
221
|
-
var
|
|
223
|
+
var GLOBAL_INFRA_OPTIONS = [
|
|
222
224
|
"rootDir",
|
|
223
|
-
|
|
224
|
-
"toolConfigs",
|
|
225
|
+
// Essential for every tool
|
|
225
226
|
"include",
|
|
226
227
|
"exclude",
|
|
227
228
|
"onProgress",
|
|
228
229
|
"progressCallback",
|
|
229
230
|
"includeTests",
|
|
230
231
|
"useSmartDefaults",
|
|
231
|
-
"maxDepth",
|
|
232
232
|
"streamResults",
|
|
233
233
|
"batchSize",
|
|
234
|
-
"costConfig"
|
|
234
|
+
"costConfig",
|
|
235
|
+
"tools",
|
|
236
|
+
"toolConfigs"
|
|
237
|
+
];
|
|
238
|
+
var COMMON_FINE_TUNING_OPTIONS = [
|
|
239
|
+
"maxDepth",
|
|
240
|
+
"minSimilarity",
|
|
241
|
+
"minLines",
|
|
242
|
+
"minCohesion",
|
|
243
|
+
// AI Signal Clarity options
|
|
244
|
+
"checkMagicLiterals",
|
|
245
|
+
"checkBooleanTraps",
|
|
246
|
+
"checkAmbiguousNames",
|
|
247
|
+
"checkUndocumentedExports",
|
|
248
|
+
"checkImplicitSideEffects",
|
|
249
|
+
"checkDeepCallbacks"
|
|
235
250
|
];
|
|
251
|
+
var GLOBAL_SCAN_OPTIONS = [...GLOBAL_INFRA_OPTIONS];
|
|
236
252
|
|
|
237
253
|
// src/types/language.ts
|
|
238
254
|
var Language = /* @__PURE__ */ ((Language2) => {
|
|
@@ -626,9 +642,11 @@ function generateHTML(graph) {
|
|
|
626
642
|
AnalysisResultSchema,
|
|
627
643
|
AnalysisStatus,
|
|
628
644
|
AnalysisStatusSchema,
|
|
645
|
+
COMMON_FINE_TUNING_OPTIONS,
|
|
629
646
|
CONTEXT_TIER_THRESHOLDS,
|
|
630
647
|
DEFAULT_TOOL_WEIGHTS,
|
|
631
648
|
FRIENDLY_TOOL_NAMES,
|
|
649
|
+
GLOBAL_INFRA_OPTIONS,
|
|
632
650
|
GLOBAL_SCAN_OPTIONS,
|
|
633
651
|
IssueSchema,
|
|
634
652
|
IssueType,
|
package/dist/client.mjs
CHANGED
|
@@ -2,9 +2,11 @@ import {
|
|
|
2
2
|
AnalysisResultSchema,
|
|
3
3
|
AnalysisStatus,
|
|
4
4
|
AnalysisStatusSchema,
|
|
5
|
+
COMMON_FINE_TUNING_OPTIONS,
|
|
5
6
|
CONTEXT_TIER_THRESHOLDS,
|
|
6
7
|
DEFAULT_TOOL_WEIGHTS,
|
|
7
8
|
FRIENDLY_TOOL_NAMES,
|
|
9
|
+
GLOBAL_INFRA_OPTIONS,
|
|
8
10
|
GLOBAL_SCAN_OPTIONS,
|
|
9
11
|
IssueSchema,
|
|
10
12
|
IssueType,
|
|
@@ -37,14 +39,16 @@ import {
|
|
|
37
39
|
getToolWeight,
|
|
38
40
|
normalizeToolName,
|
|
39
41
|
parseWeightString
|
|
40
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-COHIBX3Q.mjs";
|
|
41
43
|
export {
|
|
42
44
|
AnalysisResultSchema,
|
|
43
45
|
AnalysisStatus,
|
|
44
46
|
AnalysisStatusSchema,
|
|
47
|
+
COMMON_FINE_TUNING_OPTIONS,
|
|
45
48
|
CONTEXT_TIER_THRESHOLDS,
|
|
46
49
|
DEFAULT_TOOL_WEIGHTS,
|
|
47
50
|
FRIENDLY_TOOL_NAMES,
|
|
51
|
+
GLOBAL_INFRA_OPTIONS,
|
|
48
52
|
GLOBAL_SCAN_OPTIONS,
|
|
49
53
|
IssueSchema,
|
|
50
54
|
IssueType,
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ToolName, ScanOptions, SpokeOutput, ToolScoringOutput, AIReadyConfig, ModelContextTier, CostConfig, TokenBudget, ProductivityImpact, AcceptancePrediction, ComprehensionDifficulty, TechnicalValueChainSummary, TechnicalValueChain, LanguageParser, Language, ParseResult, NamingConvention } from './client.mjs';
|
|
2
|
-
export { AnalysisResult, AnalysisResultSchema, AnalysisStatus, AnalysisStatusSchema, BusinessReport, CONTEXT_TIER_THRESHOLDS, CommonASTNode, DEFAULT_TOOL_WEIGHTS, ExportInfo, FRIENDLY_TOOL_NAMES, GLOBAL_SCAN_OPTIONS, GraphData, GraphEdge, GraphIssueSeverity, GraphMetadata, GraphNode, ImportInfo, Issue, IssueSchema, IssueType, IssueTypeSchema, LANGUAGE_EXTENSIONS, LanguageConfig, Location, LocationSchema, Metrics, MetricsSchema, ModelTier, ModelTierSchema, ParseError, ParseStatistics, Report, SIZE_ADJUSTED_THRESHOLDS, ScoringConfig, ScoringResult, Severity, SeveritySchema, SourceLocation, SourceRange, SpokeOutputSchema, SpokeSummary, SpokeSummarySchema, TOOL_NAME_MAP, ToolNameSchema, UnifiedReport, UnifiedReportSchema, calculateOverallScore, formatScore, formatToolScore, generateHTML, getProjectSizeTier, getRating, getRatingDisplay, getRatingWithContext, getRecommendedThreshold, getToolWeight, normalizeToolName, parseWeightString } from './client.mjs';
|
|
2
|
+
export { AnalysisResult, AnalysisResultSchema, AnalysisStatus, AnalysisStatusSchema, BusinessReport, COMMON_FINE_TUNING_OPTIONS, CONTEXT_TIER_THRESHOLDS, CommonASTNode, DEFAULT_TOOL_WEIGHTS, ExportInfo, FRIENDLY_TOOL_NAMES, GLOBAL_INFRA_OPTIONS, GLOBAL_SCAN_OPTIONS, GraphData, GraphEdge, GraphIssueSeverity, GraphMetadata, GraphNode, ImportInfo, Issue, IssueSchema, IssueType, IssueTypeSchema, LANGUAGE_EXTENSIONS, LanguageConfig, Location, LocationSchema, Metrics, MetricsSchema, ModelTier, ModelTierSchema, ParseError, ParseStatistics, Report, SIZE_ADJUSTED_THRESHOLDS, ScoringConfig, ScoringResult, Severity, SeveritySchema, SourceLocation, SourceRange, SpokeOutputSchema, SpokeSummary, SpokeSummarySchema, TOOL_NAME_MAP, ToolNameSchema, UnifiedReport, UnifiedReportSchema, calculateOverallScore, formatScore, formatToolScore, generateHTML, getProjectSizeTier, getRating, getRatingDisplay, getRatingWithContext, getRecommendedThreshold, getToolWeight, normalizeToolName, parseWeightString } from './client.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ToolName, ScanOptions, SpokeOutput, ToolScoringOutput, AIReadyConfig, ModelContextTier, CostConfig, TokenBudget, ProductivityImpact, AcceptancePrediction, ComprehensionDifficulty, TechnicalValueChainSummary, TechnicalValueChain, LanguageParser, Language, ParseResult, NamingConvention } from './client.js';
|
|
2
|
-
export { AnalysisResult, AnalysisResultSchema, AnalysisStatus, AnalysisStatusSchema, BusinessReport, CONTEXT_TIER_THRESHOLDS, CommonASTNode, DEFAULT_TOOL_WEIGHTS, ExportInfo, FRIENDLY_TOOL_NAMES, GLOBAL_SCAN_OPTIONS, GraphData, GraphEdge, GraphIssueSeverity, GraphMetadata, GraphNode, ImportInfo, Issue, IssueSchema, IssueType, IssueTypeSchema, LANGUAGE_EXTENSIONS, LanguageConfig, Location, LocationSchema, Metrics, MetricsSchema, ModelTier, ModelTierSchema, ParseError, ParseStatistics, Report, SIZE_ADJUSTED_THRESHOLDS, ScoringConfig, ScoringResult, Severity, SeveritySchema, SourceLocation, SourceRange, SpokeOutputSchema, SpokeSummary, SpokeSummarySchema, TOOL_NAME_MAP, ToolNameSchema, UnifiedReport, UnifiedReportSchema, calculateOverallScore, formatScore, formatToolScore, generateHTML, getProjectSizeTier, getRating, getRatingDisplay, getRatingWithContext, getRecommendedThreshold, getToolWeight, normalizeToolName, parseWeightString } from './client.js';
|
|
2
|
+
export { AnalysisResult, AnalysisResultSchema, AnalysisStatus, AnalysisStatusSchema, BusinessReport, COMMON_FINE_TUNING_OPTIONS, CONTEXT_TIER_THRESHOLDS, CommonASTNode, DEFAULT_TOOL_WEIGHTS, ExportInfo, FRIENDLY_TOOL_NAMES, GLOBAL_INFRA_OPTIONS, GLOBAL_SCAN_OPTIONS, GraphData, GraphEdge, GraphIssueSeverity, GraphMetadata, GraphNode, ImportInfo, Issue, IssueSchema, IssueType, IssueTypeSchema, LANGUAGE_EXTENSIONS, LanguageConfig, Location, LocationSchema, Metrics, MetricsSchema, ModelTier, ModelTierSchema, ParseError, ParseStatistics, Report, SIZE_ADJUSTED_THRESHOLDS, ScoringConfig, ScoringResult, Severity, SeveritySchema, SourceLocation, SourceRange, SpokeOutputSchema, SpokeSummary, SpokeSummarySchema, TOOL_NAME_MAP, ToolNameSchema, UnifiedReport, UnifiedReportSchema, calculateOverallScore, formatScore, formatToolScore, generateHTML, getProjectSizeTier, getRating, getRatingDisplay, getRatingWithContext, getRecommendedThreshold, getToolWeight, normalizeToolName, parseWeightString } from './client.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/index.js
CHANGED
|
@@ -33,11 +33,13 @@ __export(index_exports, {
|
|
|
33
33
|
AnalysisResultSchema: () => AnalysisResultSchema,
|
|
34
34
|
AnalysisStatus: () => AnalysisStatus,
|
|
35
35
|
AnalysisStatusSchema: () => AnalysisStatusSchema,
|
|
36
|
+
COMMON_FINE_TUNING_OPTIONS: () => COMMON_FINE_TUNING_OPTIONS,
|
|
36
37
|
CONTEXT_TIER_THRESHOLDS: () => CONTEXT_TIER_THRESHOLDS,
|
|
37
38
|
DEFAULT_COST_CONFIG: () => DEFAULT_COST_CONFIG,
|
|
38
39
|
DEFAULT_EXCLUDE: () => DEFAULT_EXCLUDE,
|
|
39
40
|
DEFAULT_TOOL_WEIGHTS: () => DEFAULT_TOOL_WEIGHTS,
|
|
40
41
|
FRIENDLY_TOOL_NAMES: () => FRIENDLY_TOOL_NAMES,
|
|
42
|
+
GLOBAL_INFRA_OPTIONS: () => GLOBAL_INFRA_OPTIONS,
|
|
41
43
|
GLOBAL_SCAN_OPTIONS: () => GLOBAL_SCAN_OPTIONS,
|
|
42
44
|
IssueSchema: () => IssueSchema,
|
|
43
45
|
IssueType: () => IssueType,
|
|
@@ -299,21 +301,35 @@ var UnifiedReportSchema = import_zod.z.object({
|
|
|
299
301
|
}).catchall(import_zod.z.any());
|
|
300
302
|
|
|
301
303
|
// src/types.ts
|
|
302
|
-
var
|
|
304
|
+
var GLOBAL_INFRA_OPTIONS = [
|
|
303
305
|
"rootDir",
|
|
304
|
-
|
|
305
|
-
"toolConfigs",
|
|
306
|
+
// Essential for every tool
|
|
306
307
|
"include",
|
|
307
308
|
"exclude",
|
|
308
309
|
"onProgress",
|
|
309
310
|
"progressCallback",
|
|
310
311
|
"includeTests",
|
|
311
312
|
"useSmartDefaults",
|
|
312
|
-
"maxDepth",
|
|
313
313
|
"streamResults",
|
|
314
314
|
"batchSize",
|
|
315
|
-
"costConfig"
|
|
315
|
+
"costConfig",
|
|
316
|
+
"tools",
|
|
317
|
+
"toolConfigs"
|
|
316
318
|
];
|
|
319
|
+
var COMMON_FINE_TUNING_OPTIONS = [
|
|
320
|
+
"maxDepth",
|
|
321
|
+
"minSimilarity",
|
|
322
|
+
"minLines",
|
|
323
|
+
"minCohesion",
|
|
324
|
+
// AI Signal Clarity options
|
|
325
|
+
"checkMagicLiterals",
|
|
326
|
+
"checkBooleanTraps",
|
|
327
|
+
"checkAmbiguousNames",
|
|
328
|
+
"checkUndocumentedExports",
|
|
329
|
+
"checkImplicitSideEffects",
|
|
330
|
+
"checkDeepCallbacks"
|
|
331
|
+
];
|
|
332
|
+
var GLOBAL_SCAN_OPTIONS = [...GLOBAL_INFRA_OPTIONS];
|
|
317
333
|
|
|
318
334
|
// src/types/language.ts
|
|
319
335
|
var Language = /* @__PURE__ */ ((Language2) => {
|
|
@@ -1010,13 +1026,16 @@ function mergeConfigWithDefaults(userConfig, defaults) {
|
|
|
1010
1026
|
if (userConfig.scan.include) result.include = userConfig.scan.include;
|
|
1011
1027
|
if (userConfig.scan.exclude) result.exclude = userConfig.scan.exclude;
|
|
1012
1028
|
}
|
|
1013
|
-
|
|
1014
|
-
|
|
1029
|
+
const toolOverrides = userConfig.tools && !Array.isArray(userConfig.tools) && typeof userConfig.tools === "object" ? userConfig.tools : userConfig.toolConfigs;
|
|
1030
|
+
if (toolOverrides) {
|
|
1031
|
+
if (!result.toolConfigs) result.toolConfigs = {};
|
|
1032
|
+
for (const [toolName, toolConfig] of Object.entries(toolOverrides)) {
|
|
1015
1033
|
if (typeof toolConfig === "object" && toolConfig !== null) {
|
|
1016
|
-
if (toolName === "pattern-detect" || toolName === "context-analyzer") {
|
|
1017
|
-
Object.assign(result, toolConfig);
|
|
1018
|
-
}
|
|
1019
1034
|
result[toolName] = { ...result[toolName], ...toolConfig };
|
|
1035
|
+
result.toolConfigs[toolName] = {
|
|
1036
|
+
...result.toolConfigs[toolName],
|
|
1037
|
+
...toolConfig
|
|
1038
|
+
};
|
|
1020
1039
|
}
|
|
1021
1040
|
}
|
|
1022
1041
|
}
|
|
@@ -3285,11 +3304,13 @@ function getRepoMetadata(directory) {
|
|
|
3285
3304
|
AnalysisResultSchema,
|
|
3286
3305
|
AnalysisStatus,
|
|
3287
3306
|
AnalysisStatusSchema,
|
|
3307
|
+
COMMON_FINE_TUNING_OPTIONS,
|
|
3288
3308
|
CONTEXT_TIER_THRESHOLDS,
|
|
3289
3309
|
DEFAULT_COST_CONFIG,
|
|
3290
3310
|
DEFAULT_EXCLUDE,
|
|
3291
3311
|
DEFAULT_TOOL_WEIGHTS,
|
|
3292
3312
|
FRIENDLY_TOOL_NAMES,
|
|
3313
|
+
GLOBAL_INFRA_OPTIONS,
|
|
3293
3314
|
GLOBAL_SCAN_OPTIONS,
|
|
3294
3315
|
IssueSchema,
|
|
3295
3316
|
IssueType,
|
package/dist/index.mjs
CHANGED
|
@@ -2,9 +2,11 @@ import {
|
|
|
2
2
|
AnalysisResultSchema,
|
|
3
3
|
AnalysisStatus,
|
|
4
4
|
AnalysisStatusSchema,
|
|
5
|
+
COMMON_FINE_TUNING_OPTIONS,
|
|
5
6
|
CONTEXT_TIER_THRESHOLDS,
|
|
6
7
|
DEFAULT_TOOL_WEIGHTS,
|
|
7
8
|
FRIENDLY_TOOL_NAMES,
|
|
9
|
+
GLOBAL_INFRA_OPTIONS,
|
|
8
10
|
GLOBAL_SCAN_OPTIONS,
|
|
9
11
|
IssueSchema,
|
|
10
12
|
IssueType,
|
|
@@ -37,7 +39,7 @@ import {
|
|
|
37
39
|
getToolWeight,
|
|
38
40
|
normalizeToolName,
|
|
39
41
|
parseWeightString
|
|
40
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-COHIBX3Q.mjs";
|
|
41
43
|
|
|
42
44
|
// src/types/contract.ts
|
|
43
45
|
function validateSpokeOutput(toolName, output) {
|
|
@@ -703,13 +705,16 @@ function mergeConfigWithDefaults(userConfig, defaults) {
|
|
|
703
705
|
if (userConfig.scan.include) result.include = userConfig.scan.include;
|
|
704
706
|
if (userConfig.scan.exclude) result.exclude = userConfig.scan.exclude;
|
|
705
707
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
+
const toolOverrides = userConfig.tools && !Array.isArray(userConfig.tools) && typeof userConfig.tools === "object" ? userConfig.tools : userConfig.toolConfigs;
|
|
709
|
+
if (toolOverrides) {
|
|
710
|
+
if (!result.toolConfigs) result.toolConfigs = {};
|
|
711
|
+
for (const [toolName, toolConfig] of Object.entries(toolOverrides)) {
|
|
708
712
|
if (typeof toolConfig === "object" && toolConfig !== null) {
|
|
709
|
-
if (toolName === "pattern-detect" || toolName === "context-analyzer") {
|
|
710
|
-
Object.assign(result, toolConfig);
|
|
711
|
-
}
|
|
712
713
|
result[toolName] = { ...result[toolName], ...toolConfig };
|
|
714
|
+
result.toolConfigs[toolName] = {
|
|
715
|
+
...result.toolConfigs[toolName],
|
|
716
|
+
...toolConfig
|
|
717
|
+
};
|
|
713
718
|
}
|
|
714
719
|
}
|
|
715
720
|
}
|
|
@@ -2620,11 +2625,13 @@ export {
|
|
|
2620
2625
|
AnalysisResultSchema,
|
|
2621
2626
|
AnalysisStatus,
|
|
2622
2627
|
AnalysisStatusSchema,
|
|
2628
|
+
COMMON_FINE_TUNING_OPTIONS,
|
|
2623
2629
|
CONTEXT_TIER_THRESHOLDS,
|
|
2624
2630
|
DEFAULT_COST_CONFIG,
|
|
2625
2631
|
DEFAULT_EXCLUDE,
|
|
2626
2632
|
DEFAULT_TOOL_WEIGHTS,
|
|
2627
2633
|
FRIENDLY_TOOL_NAMES,
|
|
2634
|
+
GLOBAL_INFRA_OPTIONS,
|
|
2628
2635
|
GLOBAL_SCAN_OPTIONS,
|
|
2629
2636
|
IssueSchema,
|
|
2630
2637
|
IssueType,
|