@aiready/core 0.23.5 → 0.23.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/{client-BF9NjhE8.d.mts → client-CKcjnPXt.d.mts} +1 -0
- package/dist/{client-BF9NjhE8.d.ts → client-CKcjnPXt.d.ts} +1 -0
- package/dist/client.d.mts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/index.d.mts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +74 -13
- package/dist/index.mjs +74 -13
- package/package.json +1 -1
- package/dist/__tests__/parser-factory.test.d.ts +0 -5
- package/dist/__tests__/parser-factory.test.d.ts.map +0 -1
- package/dist/__tests__/parser-factory.test.js +0 -70
- package/dist/__tests__/parser-factory.test.js.map +0 -1
- package/dist/__tests__/python-parser.test.d.ts +0 -5
- package/dist/__tests__/python-parser.test.d.ts.map +0 -1
- package/dist/__tests__/python-parser.test.js +0 -194
- package/dist/__tests__/python-parser.test.js.map +0 -1
- package/dist/__tests__/scoring.test.d.ts +0 -2
- package/dist/__tests__/scoring.test.d.ts.map +0 -1
- package/dist/__tests__/scoring.test.js +0 -197
- package/dist/__tests__/scoring.test.js.map +0 -1
- package/dist/chunk-3YI4IS3D.mjs +0 -601
- package/dist/chunk-5HIXDC3X.mjs +0 -716
- package/dist/chunk-5V3L53AE.mjs +0 -805
- package/dist/chunk-CKVKHN3G.mjs +0 -660
- package/dist/chunk-COHIBX3Q.mjs +0 -635
- package/dist/chunk-CWRCDSKZ.mjs +0 -417
- package/dist/chunk-D3D3NCRR.mjs +0 -556
- package/dist/chunk-HCFYP7UD.mjs +0 -805
- package/dist/chunk-HFLFBA6F.mjs +0 -417
- package/dist/chunk-HKSARRCD.mjs +0 -365
- package/dist/chunk-JJ5JL5FX.mjs +0 -417
- package/dist/chunk-KDSTXVLQ.mjs +0 -724
- package/dist/chunk-KI7XORTN.mjs +0 -417
- package/dist/chunk-LTMHFNFK.mjs +0 -690
- package/dist/chunk-LTNXTXRI.mjs +0 -659
- package/dist/chunk-M22BXHBR.mjs +0 -805
- package/dist/chunk-MH3A3LX6.mjs +0 -615
- package/dist/chunk-NGHT7JOG.mjs +0 -697
- package/dist/chunk-OQ6IGDXG.mjs +0 -553
- package/dist/chunk-QAFB3HXQ.mjs +0 -590
- package/dist/chunk-QQBKXHLU.mjs +0 -678
- package/dist/chunk-RDHYGES7.mjs +0 -678
- package/dist/chunk-SWTDBVYJ.mjs +0 -660
- package/dist/chunk-UIWL5JQB.mjs +0 -417
- package/dist/chunk-UQGI67WR.mjs +0 -417
- package/dist/chunk-UTZOO4XO.mjs +0 -553
- package/dist/chunk-X4F46I5L.mjs +0 -635
- package/dist/chunk-XKK7YHPX.mjs +0 -619
- package/dist/chunk-YCA4FTEK.mjs +0 -600
- package/dist/chunk-ZSZRRTJM.mjs +0 -719
- package/dist/client-BgmiMoil.d.mts +0 -1344
- package/dist/client-BgmiMoil.d.ts +0 -1344
- package/dist/client-BxGrPuuN.d.mts +0 -1191
- package/dist/client-BxGrPuuN.d.ts +0 -1191
- package/dist/client-D-cn9ydj.d.mts +0 -1136
- package/dist/client-D-cn9ydj.d.ts +0 -1136
- package/dist/client-D9seCH4K.d.mts +0 -1334
- package/dist/client-D9seCH4K.d.ts +0 -1334
- package/dist/client-DIXIh7rw.d.mts +0 -1193
- package/dist/client-DIXIh7rw.d.ts +0 -1193
- package/dist/client-DVHXWOHw.d.mts +0 -1245
- package/dist/client-DVHXWOHw.d.ts +0 -1245
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/parsers/parser-factory.d.ts +0 -69
- package/dist/parsers/parser-factory.d.ts.map +0 -1
- package/dist/parsers/parser-factory.js +0 -116
- package/dist/parsers/parser-factory.js.map +0 -1
- package/dist/parsers/python-parser.d.ts +0 -47
- package/dist/parsers/python-parser.d.ts.map +0 -1
- package/dist/parsers/python-parser.js +0 -243
- package/dist/parsers/python-parser.js.map +0 -1
- package/dist/parsers/typescript-parser.d.ts +0 -22
- package/dist/parsers/typescript-parser.d.ts.map +0 -1
- package/dist/parsers/typescript-parser.js +0 -242
- package/dist/parsers/typescript-parser.js.map +0 -1
- package/dist/scoring.d.ts +0 -120
- package/dist/scoring.d.ts.map +0 -1
- package/dist/scoring.js +0 -197
- package/dist/scoring.js.map +0 -1
- package/dist/types/language.d.ts +0 -172
- package/dist/types/language.d.ts.map +0 -1
- package/dist/types/language.js +0 -45
- package/dist/types/language.js.map +0 -1
- package/dist/types.d.ts +0 -122
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/utils/ast-parser.d.ts +0 -59
- package/dist/utils/ast-parser.d.ts.map +0 -1
- package/dist/utils/ast-parser.js +0 -213
- package/dist/utils/ast-parser.js.map +0 -1
- package/dist/utils/cli-helpers.d.ts +0 -54
- package/dist/utils/cli-helpers.d.ts.map +0 -1
- package/dist/utils/cli-helpers.js +0 -78
- package/dist/utils/cli-helpers.js.map +0 -1
- package/dist/utils/config.d.ts +0 -9
- package/dist/utils/config.d.ts.map +0 -1
- package/dist/utils/config.js +0 -80
- package/dist/utils/config.js.map +0 -1
- package/dist/utils/file-scanner.d.ts +0 -16
- package/dist/utils/file-scanner.d.ts.map +0 -1
- package/dist/utils/file-scanner.js +0 -104
- package/dist/utils/file-scanner.js.map +0 -1
- package/dist/utils/metrics.d.ts +0 -6
- package/dist/utils/metrics.d.ts.map +0 -1
- package/dist/utils/metrics.js +0 -8
- package/dist/utils/metrics.js.map +0 -1
package/dist/chunk-5HIXDC3X.mjs
DELETED
|
@@ -1,716 +0,0 @@
|
|
|
1
|
-
// src/types/schema.ts
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
var Severity = /* @__PURE__ */ ((Severity2) => {
|
|
4
|
-
Severity2['Critical'] = 'critical';
|
|
5
|
-
Severity2['Major'] = 'major';
|
|
6
|
-
Severity2['Minor'] = 'minor';
|
|
7
|
-
Severity2['Info'] = 'info';
|
|
8
|
-
return Severity2;
|
|
9
|
-
})(Severity || {});
|
|
10
|
-
var SeveritySchema = z.nativeEnum(Severity);
|
|
11
|
-
var ToolName = /* @__PURE__ */ ((ToolName2) => {
|
|
12
|
-
ToolName2['PatternDetect'] = 'pattern-detect';
|
|
13
|
-
ToolName2['ContextAnalyzer'] = 'context-analyzer';
|
|
14
|
-
ToolName2['NamingConsistency'] = 'naming-consistency';
|
|
15
|
-
ToolName2['AiSignalClarity'] = 'ai-signal-clarity';
|
|
16
|
-
ToolName2['AgentGrounding'] = 'agent-grounding';
|
|
17
|
-
ToolName2['TestabilityIndex'] = 'testability-index';
|
|
18
|
-
ToolName2['DocDrift'] = 'doc-drift';
|
|
19
|
-
ToolName2['DependencyHealth'] = 'dependency-health';
|
|
20
|
-
ToolName2['ChangeAmplification'] = 'change-amplification';
|
|
21
|
-
ToolName2['CognitiveLoad'] = 'cognitive-load';
|
|
22
|
-
ToolName2['PatternEntropy'] = 'pattern-entropy';
|
|
23
|
-
ToolName2['ConceptCohesion'] = 'concept-cohesion';
|
|
24
|
-
ToolName2['SemanticDistance'] = 'semantic-distance';
|
|
25
|
-
return ToolName2;
|
|
26
|
-
})(ToolName || {});
|
|
27
|
-
var ToolNameSchema = z.nativeEnum(ToolName);
|
|
28
|
-
var FRIENDLY_TOOL_NAMES = {
|
|
29
|
-
['pattern-detect' /* PatternDetect */]: 'Semantic Duplicates',
|
|
30
|
-
['context-analyzer' /* ContextAnalyzer */]: 'Context Fragmentation',
|
|
31
|
-
['naming-consistency' /* NamingConsistency */]: 'Naming Consistency',
|
|
32
|
-
['ai-signal-clarity' /* AiSignalClarity */]: 'AI Signal Clarity',
|
|
33
|
-
['agent-grounding' /* AgentGrounding */]: 'Agent Grounding',
|
|
34
|
-
['testability-index' /* TestabilityIndex */]: 'Testability Index',
|
|
35
|
-
['doc-drift' /* DocDrift */]: 'Documentation Health',
|
|
36
|
-
['dependency-health' /* DependencyHealth */]: 'Dependency Health',
|
|
37
|
-
['change-amplification' /* ChangeAmplification */]: 'Change Amplification',
|
|
38
|
-
['cognitive-load' /* CognitiveLoad */]: 'Cognitive Load',
|
|
39
|
-
['pattern-entropy' /* PatternEntropy */]: 'Pattern Entropy',
|
|
40
|
-
['concept-cohesion' /* ConceptCohesion */]: 'Concept Cohesion',
|
|
41
|
-
['semantic-distance' /* SemanticDistance */]: 'Semantic Distance',
|
|
42
|
-
};
|
|
43
|
-
var IssueType = /* @__PURE__ */ ((IssueType2) => {
|
|
44
|
-
IssueType2['DuplicatePattern'] = 'duplicate-pattern';
|
|
45
|
-
IssueType2['PatternInconsistency'] = 'pattern-inconsistency';
|
|
46
|
-
IssueType2['ContextFragmentation'] = 'context-fragmentation';
|
|
47
|
-
IssueType2['DependencyHealth'] = 'dependency-health';
|
|
48
|
-
IssueType2['CircularDependency'] = 'circular-dependency';
|
|
49
|
-
IssueType2['DocDrift'] = 'doc-drift';
|
|
50
|
-
IssueType2['NamingInconsistency'] = 'naming-inconsistency';
|
|
51
|
-
IssueType2['NamingQuality'] = 'naming-quality';
|
|
52
|
-
IssueType2['ArchitectureInconsistency'] = 'architecture-inconsistency';
|
|
53
|
-
IssueType2['DeadCode'] = 'dead-code';
|
|
54
|
-
IssueType2['MissingTypes'] = 'missing-types';
|
|
55
|
-
IssueType2['MagicLiteral'] = 'magic-literal';
|
|
56
|
-
IssueType2['BooleanTrap'] = 'boolean-trap';
|
|
57
|
-
IssueType2['AiSignalClarity'] = 'ai-signal-clarity';
|
|
58
|
-
IssueType2['LowTestability'] = 'low-testability';
|
|
59
|
-
IssueType2['AgentNavigationFailure'] = 'agent-navigation-failure';
|
|
60
|
-
IssueType2['AmbiguousApi'] = 'ambiguous-api';
|
|
61
|
-
IssueType2['ChangeAmplification'] = 'change-amplification';
|
|
62
|
-
return IssueType2;
|
|
63
|
-
})(IssueType || {});
|
|
64
|
-
var IssueTypeSchema = z.nativeEnum(IssueType);
|
|
65
|
-
var AnalysisStatus = /* @__PURE__ */ ((AnalysisStatus2) => {
|
|
66
|
-
AnalysisStatus2['Processing'] = 'processing';
|
|
67
|
-
AnalysisStatus2['Completed'] = 'completed';
|
|
68
|
-
AnalysisStatus2['Failed'] = 'failed';
|
|
69
|
-
return AnalysisStatus2;
|
|
70
|
-
})(AnalysisStatus || {});
|
|
71
|
-
var AnalysisStatusSchema = z.nativeEnum(AnalysisStatus);
|
|
72
|
-
var ModelTier = /* @__PURE__ */ ((ModelTier2) => {
|
|
73
|
-
ModelTier2['Compact'] = 'compact';
|
|
74
|
-
ModelTier2['Standard'] = 'standard';
|
|
75
|
-
ModelTier2['Extended'] = 'extended';
|
|
76
|
-
ModelTier2['Frontier'] = 'frontier';
|
|
77
|
-
return ModelTier2;
|
|
78
|
-
})(ModelTier || {});
|
|
79
|
-
var ModelTierSchema = z.nativeEnum(ModelTier);
|
|
80
|
-
var LocationSchema = z.object({
|
|
81
|
-
file: z.string(),
|
|
82
|
-
line: z.number(),
|
|
83
|
-
column: z.number().optional(),
|
|
84
|
-
endLine: z.number().optional(),
|
|
85
|
-
endColumn: z.number().optional(),
|
|
86
|
-
});
|
|
87
|
-
var IssueSchema = z.object({
|
|
88
|
-
type: IssueTypeSchema,
|
|
89
|
-
severity: SeveritySchema,
|
|
90
|
-
message: z.string(),
|
|
91
|
-
location: LocationSchema,
|
|
92
|
-
suggestion: z.string().optional(),
|
|
93
|
-
});
|
|
94
|
-
var MetricsSchema = z.object({
|
|
95
|
-
tokenCost: z.number().optional(),
|
|
96
|
-
complexityScore: z.number().optional(),
|
|
97
|
-
consistencyScore: z.number().optional(),
|
|
98
|
-
docFreshnessScore: z.number().optional(),
|
|
99
|
-
// AI agent readiness metrics (v0.12+)
|
|
100
|
-
aiSignalClarityScore: z.number().optional(),
|
|
101
|
-
agentGroundingScore: z.number().optional(),
|
|
102
|
-
testabilityScore: z.number().optional(),
|
|
103
|
-
docDriftScore: z.number().optional(),
|
|
104
|
-
dependencyHealthScore: z.number().optional(),
|
|
105
|
-
modelContextTier: ModelTierSchema.optional(),
|
|
106
|
-
// Business value metrics
|
|
107
|
-
estimatedMonthlyCost: z.number().optional(),
|
|
108
|
-
estimatedDeveloperHours: z.number().optional(),
|
|
109
|
-
comprehensionDifficultyIndex: z.number().optional(),
|
|
110
|
-
// Extended metrics for specific spokes
|
|
111
|
-
totalSymbols: z.number().optional(),
|
|
112
|
-
totalExports: z.number().optional(),
|
|
113
|
-
});
|
|
114
|
-
var AnalysisResultSchema = z.object({
|
|
115
|
-
fileName: z.string(),
|
|
116
|
-
issues: z.array(IssueSchema),
|
|
117
|
-
metrics: MetricsSchema,
|
|
118
|
-
});
|
|
119
|
-
var SpokeSummarySchema = z
|
|
120
|
-
.object({
|
|
121
|
-
totalFiles: z.number().optional(),
|
|
122
|
-
totalIssues: z.number().optional(),
|
|
123
|
-
criticalIssues: z.number().optional(),
|
|
124
|
-
majorIssues: z.number().optional(),
|
|
125
|
-
score: z.number().optional(),
|
|
126
|
-
})
|
|
127
|
-
.catchall(z.any());
|
|
128
|
-
var SpokeOutputSchema = z.object({
|
|
129
|
-
results: z.array(AnalysisResultSchema),
|
|
130
|
-
summary: SpokeSummarySchema,
|
|
131
|
-
metadata: z
|
|
132
|
-
.object({
|
|
133
|
-
toolName: z.string(),
|
|
134
|
-
version: z.string().optional(),
|
|
135
|
-
timestamp: z.string().optional(),
|
|
136
|
-
config: z.any().optional(),
|
|
137
|
-
})
|
|
138
|
-
.catchall(z.any())
|
|
139
|
-
.optional(),
|
|
140
|
-
});
|
|
141
|
-
var UnifiedReportSchema = z
|
|
142
|
-
.object({
|
|
143
|
-
summary: z.object({
|
|
144
|
-
totalFiles: z.number(),
|
|
145
|
-
totalIssues: z.number(),
|
|
146
|
-
criticalIssues: z.number(),
|
|
147
|
-
majorIssues: z.number(),
|
|
148
|
-
businessImpact: z
|
|
149
|
-
.object({
|
|
150
|
-
estimatedMonthlyWaste: z.number().optional(),
|
|
151
|
-
potentialSavings: z.number().optional(),
|
|
152
|
-
productivityHours: z.number().optional(),
|
|
153
|
-
})
|
|
154
|
-
.optional(),
|
|
155
|
-
}),
|
|
156
|
-
results: z.array(AnalysisResultSchema),
|
|
157
|
-
scoring: z
|
|
158
|
-
.object({
|
|
159
|
-
overall: z.number(),
|
|
160
|
-
rating: z.string(),
|
|
161
|
-
timestamp: z.string(),
|
|
162
|
-
breakdown: z.array(
|
|
163
|
-
z
|
|
164
|
-
.object({
|
|
165
|
-
toolName: z.union([ToolNameSchema, z.string()]),
|
|
166
|
-
score: z.number(),
|
|
167
|
-
})
|
|
168
|
-
.catchall(z.any())
|
|
169
|
-
),
|
|
170
|
-
})
|
|
171
|
-
.optional(),
|
|
172
|
-
})
|
|
173
|
-
.catchall(z.any());
|
|
174
|
-
|
|
175
|
-
// src/types.ts
|
|
176
|
-
var GLOBAL_INFRA_OPTIONS = [
|
|
177
|
-
'rootDir',
|
|
178
|
-
// Essential for every tool
|
|
179
|
-
'include',
|
|
180
|
-
'exclude',
|
|
181
|
-
'onProgress',
|
|
182
|
-
'progressCallback',
|
|
183
|
-
'includeTests',
|
|
184
|
-
'useSmartDefaults',
|
|
185
|
-
'streamResults',
|
|
186
|
-
'batchSize',
|
|
187
|
-
'costConfig',
|
|
188
|
-
'tools',
|
|
189
|
-
'toolConfigs',
|
|
190
|
-
];
|
|
191
|
-
var COMMON_FINE_TUNING_OPTIONS = [
|
|
192
|
-
'maxDepth',
|
|
193
|
-
'minSimilarity',
|
|
194
|
-
'minLines',
|
|
195
|
-
'minCohesion',
|
|
196
|
-
// AI Signal Clarity options
|
|
197
|
-
'checkMagicLiterals',
|
|
198
|
-
'checkBooleanTraps',
|
|
199
|
-
'checkAmbiguousNames',
|
|
200
|
-
'checkUndocumentedExports',
|
|
201
|
-
'checkImplicitSideEffects',
|
|
202
|
-
'checkDeepCallbacks',
|
|
203
|
-
];
|
|
204
|
-
var GLOBAL_SCAN_OPTIONS = [...GLOBAL_INFRA_OPTIONS];
|
|
205
|
-
|
|
206
|
-
// src/types/language.ts
|
|
207
|
-
var Language = /* @__PURE__ */ ((Language2) => {
|
|
208
|
-
Language2['TypeScript'] = 'typescript';
|
|
209
|
-
Language2['JavaScript'] = 'javascript';
|
|
210
|
-
Language2['Python'] = 'python';
|
|
211
|
-
Language2['Java'] = 'java';
|
|
212
|
-
Language2['Go'] = 'go';
|
|
213
|
-
Language2['Rust'] = 'rust';
|
|
214
|
-
Language2['CSharp'] = 'csharp';
|
|
215
|
-
return Language2;
|
|
216
|
-
})(Language || {});
|
|
217
|
-
var LANGUAGE_EXTENSIONS = {
|
|
218
|
-
'.ts': 'typescript' /* TypeScript */,
|
|
219
|
-
'.tsx': 'typescript' /* TypeScript */,
|
|
220
|
-
'.js': 'javascript' /* JavaScript */,
|
|
221
|
-
'.jsx': 'javascript' /* JavaScript */,
|
|
222
|
-
'.py': 'python' /* Python */,
|
|
223
|
-
'.java': 'java' /* Java */,
|
|
224
|
-
'.go': 'go' /* Go */,
|
|
225
|
-
'.rs': 'rust' /* Rust */,
|
|
226
|
-
'.cs': 'csharp' /* CSharp */,
|
|
227
|
-
};
|
|
228
|
-
var ParseError = class extends Error {
|
|
229
|
-
constructor(message, filePath, loc) {
|
|
230
|
-
super(message);
|
|
231
|
-
this.filePath = filePath;
|
|
232
|
-
this.loc = loc;
|
|
233
|
-
this.name = 'ParseError';
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
// src/scoring.ts
|
|
238
|
-
var RecommendationPriority = /* @__PURE__ */ ((RecommendationPriority2) => {
|
|
239
|
-
RecommendationPriority2['High'] = 'high';
|
|
240
|
-
RecommendationPriority2['Medium'] = 'medium';
|
|
241
|
-
RecommendationPriority2['Low'] = 'low';
|
|
242
|
-
return RecommendationPriority2;
|
|
243
|
-
})(RecommendationPriority || {});
|
|
244
|
-
var ReadinessRating = /* @__PURE__ */ ((ReadinessRating2) => {
|
|
245
|
-
ReadinessRating2['Excellent'] = 'Excellent';
|
|
246
|
-
ReadinessRating2['Good'] = 'Good';
|
|
247
|
-
ReadinessRating2['Fair'] = 'Fair';
|
|
248
|
-
ReadinessRating2['NeedsWork'] = 'Needs Work';
|
|
249
|
-
ReadinessRating2['Critical'] = 'Critical';
|
|
250
|
-
return ReadinessRating2;
|
|
251
|
-
})(ReadinessRating || {});
|
|
252
|
-
var DEFAULT_TOOL_WEIGHTS = {
|
|
253
|
-
['pattern-detect' /* PatternDetect */]: 22,
|
|
254
|
-
['context-analyzer' /* ContextAnalyzer */]: 19,
|
|
255
|
-
['naming-consistency' /* NamingConsistency */]: 14,
|
|
256
|
-
['ai-signal-clarity' /* AiSignalClarity */]: 11,
|
|
257
|
-
['agent-grounding' /* AgentGrounding */]: 10,
|
|
258
|
-
['testability-index' /* TestabilityIndex */]: 10,
|
|
259
|
-
['doc-drift' /* DocDrift */]: 8,
|
|
260
|
-
['dependency-health' /* DependencyHealth */]: 6,
|
|
261
|
-
['change-amplification' /* ChangeAmplification */]: 8,
|
|
262
|
-
};
|
|
263
|
-
var TOOL_NAME_MAP = {
|
|
264
|
-
patterns: 'pattern-detect' /* PatternDetect */,
|
|
265
|
-
'pattern-detect': 'pattern-detect' /* PatternDetect */,
|
|
266
|
-
context: 'context-analyzer' /* ContextAnalyzer */,
|
|
267
|
-
'context-analyzer': 'context-analyzer' /* ContextAnalyzer */,
|
|
268
|
-
consistency: 'naming-consistency' /* NamingConsistency */,
|
|
269
|
-
'naming-consistency': 'naming-consistency' /* NamingConsistency */,
|
|
270
|
-
'ai-signal': 'ai-signal-clarity' /* AiSignalClarity */,
|
|
271
|
-
'ai-signal-clarity': 'ai-signal-clarity' /* AiSignalClarity */,
|
|
272
|
-
grounding: 'agent-grounding' /* AgentGrounding */,
|
|
273
|
-
'agent-grounding': 'agent-grounding' /* AgentGrounding */,
|
|
274
|
-
testability: 'testability-index' /* TestabilityIndex */,
|
|
275
|
-
'testability-index': 'testability-index' /* TestabilityIndex */,
|
|
276
|
-
'doc-drift': 'doc-drift' /* DocDrift */,
|
|
277
|
-
'deps-health': 'dependency-health' /* DependencyHealth */,
|
|
278
|
-
'dependency-health': 'dependency-health' /* DependencyHealth */,
|
|
279
|
-
'change-amp': 'change-amplification' /* ChangeAmplification */,
|
|
280
|
-
'change-amplification': 'change-amplification' /* ChangeAmplification */,
|
|
281
|
-
};
|
|
282
|
-
var ScoringProfile = /* @__PURE__ */ ((ScoringProfile2) => {
|
|
283
|
-
ScoringProfile2['Default'] = 'default';
|
|
284
|
-
ScoringProfile2['Agentic'] = 'agentic';
|
|
285
|
-
ScoringProfile2['Logic'] = 'logic';
|
|
286
|
-
ScoringProfile2['UI'] = 'ui';
|
|
287
|
-
ScoringProfile2['Cost'] = 'cost';
|
|
288
|
-
ScoringProfile2['Security'] = 'security';
|
|
289
|
-
return ScoringProfile2;
|
|
290
|
-
})(ScoringProfile || {});
|
|
291
|
-
var SCORING_PROFILES = {
|
|
292
|
-
['default' /* Default */]: DEFAULT_TOOL_WEIGHTS,
|
|
293
|
-
['agentic' /* Agentic */]: {
|
|
294
|
-
['ai-signal-clarity' /* AiSignalClarity */]: 30,
|
|
295
|
-
['agent-grounding' /* AgentGrounding */]: 30,
|
|
296
|
-
['testability-index' /* TestabilityIndex */]: 20,
|
|
297
|
-
['context-analyzer' /* ContextAnalyzer */]: 10,
|
|
298
|
-
['naming-consistency' /* NamingConsistency */]: 10,
|
|
299
|
-
},
|
|
300
|
-
['logic' /* Logic */]: {
|
|
301
|
-
['testability-index' /* TestabilityIndex */]: 40,
|
|
302
|
-
['naming-consistency' /* NamingConsistency */]: 20,
|
|
303
|
-
['context-analyzer' /* ContextAnalyzer */]: 20,
|
|
304
|
-
['pattern-detect' /* PatternDetect */]: 10,
|
|
305
|
-
['change-amplification' /* ChangeAmplification */]: 10,
|
|
306
|
-
},
|
|
307
|
-
['ui' /* UI */]: {
|
|
308
|
-
['naming-consistency' /* NamingConsistency */]: 30,
|
|
309
|
-
['context-analyzer' /* ContextAnalyzer */]: 30,
|
|
310
|
-
['pattern-detect' /* PatternDetect */]: 20,
|
|
311
|
-
['doc-drift' /* DocDrift */]: 10,
|
|
312
|
-
['ai-signal-clarity' /* AiSignalClarity */]: 10,
|
|
313
|
-
},
|
|
314
|
-
['cost' /* Cost */]: {
|
|
315
|
-
['pattern-detect' /* PatternDetect */]: 50,
|
|
316
|
-
['context-analyzer' /* ContextAnalyzer */]: 30,
|
|
317
|
-
['change-amplification' /* ChangeAmplification */]: 10,
|
|
318
|
-
['dependency-health' /* DependencyHealth */]: 10,
|
|
319
|
-
},
|
|
320
|
-
['security' /* Security */]: {
|
|
321
|
-
['naming-consistency' /* NamingConsistency */]: 40,
|
|
322
|
-
['testability-index' /* TestabilityIndex */]: 30,
|
|
323
|
-
['dependency-health' /* DependencyHealth */]: 20,
|
|
324
|
-
['context-analyzer' /* ContextAnalyzer */]: 10,
|
|
325
|
-
},
|
|
326
|
-
};
|
|
327
|
-
var CONTEXT_TIER_THRESHOLDS = {
|
|
328
|
-
compact: { idealTokens: 3e3, criticalTokens: 1e4, idealDepth: 4 },
|
|
329
|
-
standard: { idealTokens: 5e3, criticalTokens: 15e3, idealDepth: 5 },
|
|
330
|
-
extended: { idealTokens: 15e3, criticalTokens: 5e4, idealDepth: 7 },
|
|
331
|
-
frontier: { idealTokens: 5e4, criticalTokens: 15e4, idealDepth: 10 },
|
|
332
|
-
};
|
|
333
|
-
var SIZE_ADJUSTED_THRESHOLDS = {
|
|
334
|
-
xs: 80,
|
|
335
|
-
// < 50 files
|
|
336
|
-
small: 75,
|
|
337
|
-
// 50-200 files
|
|
338
|
-
medium: 70,
|
|
339
|
-
// 200-500 files
|
|
340
|
-
large: 65,
|
|
341
|
-
// 500-2000 files
|
|
342
|
-
enterprise: 58,
|
|
343
|
-
// 2000+ files
|
|
344
|
-
};
|
|
345
|
-
function getProjectSizeTier(fileCount) {
|
|
346
|
-
if (fileCount < 50) return 'xs';
|
|
347
|
-
if (fileCount < 200) return 'small';
|
|
348
|
-
if (fileCount < 500) return 'medium';
|
|
349
|
-
if (fileCount < 2e3) return 'large';
|
|
350
|
-
return 'enterprise';
|
|
351
|
-
}
|
|
352
|
-
function getRecommendedThreshold(fileCount, modelTier = 'standard') {
|
|
353
|
-
const sizeTier = getProjectSizeTier(fileCount);
|
|
354
|
-
const base = SIZE_ADJUSTED_THRESHOLDS[sizeTier];
|
|
355
|
-
const modelBonus =
|
|
356
|
-
modelTier === 'frontier' ? -3 : modelTier === 'extended' ? -2 : 0;
|
|
357
|
-
return base + modelBonus;
|
|
358
|
-
}
|
|
359
|
-
function normalizeToolName(shortName) {
|
|
360
|
-
return TOOL_NAME_MAP[shortName.toLowerCase()] || shortName;
|
|
361
|
-
}
|
|
362
|
-
function getToolWeight(
|
|
363
|
-
toolName,
|
|
364
|
-
toolConfig,
|
|
365
|
-
cliOverride,
|
|
366
|
-
profile = 'default' /* Default */
|
|
367
|
-
) {
|
|
368
|
-
if (cliOverride !== void 0) return cliOverride;
|
|
369
|
-
if (toolConfig?.scoreWeight !== void 0) return toolConfig.scoreWeight;
|
|
370
|
-
const profileWeights = SCORING_PROFILES[profile] || DEFAULT_TOOL_WEIGHTS;
|
|
371
|
-
return profileWeights[toolName] ?? DEFAULT_TOOL_WEIGHTS[toolName] ?? 5;
|
|
372
|
-
}
|
|
373
|
-
function parseWeightString(weightStr) {
|
|
374
|
-
const weights = /* @__PURE__ */ new Map();
|
|
375
|
-
if (!weightStr) return weights;
|
|
376
|
-
const pairs = weightStr.split(',');
|
|
377
|
-
for (const pair of pairs) {
|
|
378
|
-
const [toolShortName, weightValueStr] = pair.split(':');
|
|
379
|
-
if (toolShortName && weightValueStr) {
|
|
380
|
-
const toolName = normalizeToolName(toolShortName.trim());
|
|
381
|
-
const weight = parseInt(weightValueStr.trim(), 10);
|
|
382
|
-
if (!isNaN(weight) && weight > 0) {
|
|
383
|
-
weights.set(toolName, weight);
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
return weights;
|
|
388
|
-
}
|
|
389
|
-
function calculateOverallScore(toolOutputs, config, cliWeights) {
|
|
390
|
-
if (toolOutputs.size === 0) {
|
|
391
|
-
throw new Error('No tool outputs provided for scoring');
|
|
392
|
-
}
|
|
393
|
-
const profile = config?.scoring?.profile || 'default'; /* Default */
|
|
394
|
-
const weights = /* @__PURE__ */ new Map();
|
|
395
|
-
for (const [toolName] of toolOutputs.entries()) {
|
|
396
|
-
const cliWeight = cliWeights?.get(toolName);
|
|
397
|
-
const configWeight = config?.tools?.[toolName]?.scoreWeight;
|
|
398
|
-
const weight =
|
|
399
|
-
cliWeight ??
|
|
400
|
-
configWeight ??
|
|
401
|
-
getToolWeight(toolName, void 0, void 0, profile);
|
|
402
|
-
weights.set(toolName, weight);
|
|
403
|
-
}
|
|
404
|
-
let weightedSum = 0;
|
|
405
|
-
let totalWeight = 0;
|
|
406
|
-
const breakdown = [];
|
|
407
|
-
const toolsUsed = [];
|
|
408
|
-
const calculationWeights = {};
|
|
409
|
-
for (const [toolName, output] of toolOutputs.entries()) {
|
|
410
|
-
const weight = weights.get(toolName) || 5;
|
|
411
|
-
weightedSum += output.score * weight;
|
|
412
|
-
totalWeight += weight;
|
|
413
|
-
toolsUsed.push(toolName);
|
|
414
|
-
calculationWeights[toolName] = weight;
|
|
415
|
-
breakdown.push(output);
|
|
416
|
-
}
|
|
417
|
-
const overall = Math.round(weightedSum / totalWeight);
|
|
418
|
-
const rating = getRating(overall);
|
|
419
|
-
const formulaParts = Array.from(toolOutputs.entries()).map(
|
|
420
|
-
([name, output]) => {
|
|
421
|
-
const w = weights.get(name) || 5;
|
|
422
|
-
return `(${output.score} \xD7 ${w})`;
|
|
423
|
-
}
|
|
424
|
-
);
|
|
425
|
-
const formulaStr = `[${formulaParts.join(' + ')}] / ${totalWeight} = ${overall}`;
|
|
426
|
-
return {
|
|
427
|
-
overall,
|
|
428
|
-
rating,
|
|
429
|
-
timestamp: /* @__PURE__ */ new Date().toISOString(),
|
|
430
|
-
toolsUsed,
|
|
431
|
-
breakdown,
|
|
432
|
-
calculation: {
|
|
433
|
-
formula: formulaStr,
|
|
434
|
-
weights: calculationWeights,
|
|
435
|
-
normalized: formulaStr,
|
|
436
|
-
},
|
|
437
|
-
};
|
|
438
|
-
}
|
|
439
|
-
function getRating(score) {
|
|
440
|
-
if (score >= 90) return 'Excellent' /* Excellent */;
|
|
441
|
-
if (score >= 75) return 'Good' /* Good */;
|
|
442
|
-
if (score >= 60) return 'Fair' /* Fair */;
|
|
443
|
-
if (score >= 40) return 'Needs Work' /* NeedsWork */;
|
|
444
|
-
return 'Critical' /* Critical */;
|
|
445
|
-
}
|
|
446
|
-
function getRatingWithContext(score, fileCount, modelTier = 'standard') {
|
|
447
|
-
const threshold = getRecommendedThreshold(fileCount, modelTier);
|
|
448
|
-
const normalized = score - threshold + 70;
|
|
449
|
-
return getRating(normalized);
|
|
450
|
-
}
|
|
451
|
-
function getRatingDisplay(rating) {
|
|
452
|
-
switch (rating) {
|
|
453
|
-
case 'Excellent' /* Excellent */:
|
|
454
|
-
return { emoji: '\u2705', color: 'green' };
|
|
455
|
-
case 'Good' /* Good */:
|
|
456
|
-
return { emoji: '\u{1F44D}', color: 'blue' };
|
|
457
|
-
case 'Fair' /* Fair */:
|
|
458
|
-
return { emoji: '\u26A0\uFE0F', color: 'yellow' };
|
|
459
|
-
case 'Needs Work' /* NeedsWork */:
|
|
460
|
-
return { emoji: '\u{1F528}', color: 'orange' };
|
|
461
|
-
case 'Critical' /* Critical */:
|
|
462
|
-
return { emoji: '\u274C', color: 'red' };
|
|
463
|
-
default:
|
|
464
|
-
return { emoji: '\u2753', color: 'gray' };
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
function formatScore(result) {
|
|
468
|
-
const { emoji } = getRatingDisplay(result.rating);
|
|
469
|
-
return `${result.overall}/100 (${result.rating}) ${emoji}`;
|
|
470
|
-
}
|
|
471
|
-
function formatToolScore(output) {
|
|
472
|
-
let result = ` Score: ${output.score}/100
|
|
473
|
-
|
|
474
|
-
`;
|
|
475
|
-
if (output.factors && output.factors.length > 0) {
|
|
476
|
-
result += ` Factors:
|
|
477
|
-
`;
|
|
478
|
-
output.factors.forEach((factor) => {
|
|
479
|
-
const impactSign = factor.impact > 0 ? '+' : '';
|
|
480
|
-
result += ` \u2022 ${factor.name}: ${impactSign}${factor.impact} - ${factor.description}
|
|
481
|
-
`;
|
|
482
|
-
});
|
|
483
|
-
result += '\n';
|
|
484
|
-
}
|
|
485
|
-
if (output.recommendations && output.recommendations.length > 0) {
|
|
486
|
-
result += ` Recommendations:
|
|
487
|
-
`;
|
|
488
|
-
output.recommendations.forEach((rec, i) => {
|
|
489
|
-
let priorityIcon = '\u{1F535}';
|
|
490
|
-
const prio = rec.priority;
|
|
491
|
-
if (prio === 'high' /* High */ || prio === 'high')
|
|
492
|
-
priorityIcon = '\u{1F534}';
|
|
493
|
-
else if (prio === 'medium' /* Medium */ || prio === 'medium')
|
|
494
|
-
priorityIcon = '\u{1F7E1}';
|
|
495
|
-
result += ` ${i + 1}. ${priorityIcon} ${rec.action}
|
|
496
|
-
`;
|
|
497
|
-
result += ` Impact: +${rec.estimatedImpact} points
|
|
498
|
-
|
|
499
|
-
`;
|
|
500
|
-
});
|
|
501
|
-
}
|
|
502
|
-
return result;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
// src/utils/visualization.ts
|
|
506
|
-
function generateHTML(graph) {
|
|
507
|
-
const payload = JSON.stringify(graph, null, 2);
|
|
508
|
-
return `<!doctype html>
|
|
509
|
-
<html>
|
|
510
|
-
<head>
|
|
511
|
-
<meta charset="utf-8" />
|
|
512
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
513
|
-
<title>AIReady Visualization</title>
|
|
514
|
-
<style>
|
|
515
|
-
html,body { height: 100%; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #0f172a; color: #e2e8f0 }
|
|
516
|
-
#container { display:flex; height:100vh }
|
|
517
|
-
#panel { width: 320px; padding: 16px; background: #071130; box-shadow: -2px 0 8px rgba(0,0,0,0.3); overflow:auto }
|
|
518
|
-
#canvasWrap { flex:1; display:flex; align-items:center; justify-content:center }
|
|
519
|
-
canvas { background: #0b1220; border-radius:8px }
|
|
520
|
-
.stat { margin-bottom:12px }
|
|
521
|
-
</style>
|
|
522
|
-
</head>
|
|
523
|
-
<body>
|
|
524
|
-
<div id="container">
|
|
525
|
-
<div id="canvasWrap"><canvas id="canvas" width="1200" height="800"></canvas></div>
|
|
526
|
-
<div id="panel">
|
|
527
|
-
<h2>AIReady Visualization</h2>
|
|
528
|
-
<div class="stat"><strong>Files:</strong> <span id="stat-files"></span></div>
|
|
529
|
-
<div class="stat"><strong>Dependencies:</strong> <span id="stat-deps"></span></div>
|
|
530
|
-
<div class="stat"><strong>Legend</strong></div>
|
|
531
|
-
<div style="font-size:13px;line-height:1.3;color:#cbd5e1;margin-top:8px">
|
|
532
|
-
<div style="margin-bottom:8px"><span style="display:inline-block;width:12px;height:12px;background:#ff4d4f;margin-right:8px;border:1px solid rgba(255,255,255,0.06)"></span><strong>Critical</strong>: highest severity issues.</div>
|
|
533
|
-
<div style="margin-bottom:8px"><span style="display:inline-block;width:12px;height:12px;background:#ff9900;margin-right:8px;border:1px solid rgba(255,255,255,0.06)"></span><strong>Major</strong>: important issues.</div>
|
|
534
|
-
<div style="margin-bottom:8px"><span style="display:inline-block;width:12px;height:12px;background:#ffd666;margin-right:8px;border:1px solid rgba(255,255,255,0.06)"></span><strong>Minor</strong>: low priority issues.</div>
|
|
535
|
-
<div style="margin-bottom:8px"><span style="display:inline-block;width:12px;height:12px;background:#91d5ff;margin-right:8px;border:1px solid rgba(255,255,255,0.06)"></span><strong>Info</strong>: informational notes.</div>
|
|
536
|
-
<div style="margin-top:10px;color:#94a3b8"><strong>Node size</strong>: larger = higher token cost, more issues or dependency weight.</div>
|
|
537
|
-
<div style="margin-top:6px;color:#94a3b8"><strong>Proximity</strong>: nodes that are spatially close are more contextually related; relatedness is represented by distance and size rather than explicit edges.</div>
|
|
538
|
-
<div style="margin-top:6px;color:#94a3b8"><strong>Edge colors</strong>: <span style="color:#fb7e81">Similarity</span>, <span style="color:#84c1ff">Dependency</span>, <span style="color:#ffa500">Reference</span>, default <span style="color:#334155">Other</span>.</div>
|
|
539
|
-
</div>
|
|
540
|
-
</div>
|
|
541
|
-
</div>
|
|
542
|
-
|
|
543
|
-
<script>
|
|
544
|
-
const graphData = ${payload};
|
|
545
|
-
document.getElementById('stat-files').textContent = graphData.metadata.totalFiles;
|
|
546
|
-
document.getElementById('stat-deps').textContent = graphData.metadata.totalDependencies;
|
|
547
|
-
|
|
548
|
-
const canvas = document.getElementById('canvas');
|
|
549
|
-
const ctx = canvas.getContext('2d');
|
|
550
|
-
|
|
551
|
-
const nodes = graphData.nodes.map((n, i) => ({
|
|
552
|
-
...n,
|
|
553
|
-
x: canvas.width / 2 + Math.cos(i / graphData.nodes.length * Math.PI * 2) * (Math.min(canvas.width, canvas.height) / 3),
|
|
554
|
-
y: canvas.height / 2 + Math.sin(i / graphData.nodes.length * Math.PI * 2) * (Math.min(canvas.width, canvas.height) / 3),
|
|
555
|
-
}));
|
|
556
|
-
|
|
557
|
-
function draw() {
|
|
558
|
-
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
559
|
-
|
|
560
|
-
graphData.edges.forEach(edge => {
|
|
561
|
-
const s = nodes.find(n => n.id === edge.source);
|
|
562
|
-
const t = nodes.find(n => n.id === edge.target);
|
|
563
|
-
if (!s || !t) return;
|
|
564
|
-
if (edge.type === 'related') return;
|
|
565
|
-
if (edge.type === 'similarity') {
|
|
566
|
-
ctx.strokeStyle = '#fb7e81';
|
|
567
|
-
ctx.lineWidth = 1.2;
|
|
568
|
-
} else if (edge.type === 'dependency') {
|
|
569
|
-
ctx.strokeStyle = '#84c1ff';
|
|
570
|
-
ctx.lineWidth = 1.0;
|
|
571
|
-
} else if (edge.type === 'reference') {
|
|
572
|
-
ctx.strokeStyle = '#ffa500';
|
|
573
|
-
ctx.lineWidth = 0.9;
|
|
574
|
-
} else {
|
|
575
|
-
ctx.strokeStyle = '#334155';
|
|
576
|
-
ctx.lineWidth = 0.8;
|
|
577
|
-
}
|
|
578
|
-
ctx.beginPath();
|
|
579
|
-
ctx.moveTo(s.x, s.y);
|
|
580
|
-
ctx.lineTo(t.x, t.y);
|
|
581
|
-
ctx.stroke();
|
|
582
|
-
});
|
|
583
|
-
|
|
584
|
-
const groups = {};
|
|
585
|
-
nodes.forEach(n => {
|
|
586
|
-
const g = n.group || '__default';
|
|
587
|
-
if (!groups[g]) groups[g] = { minX: n.x, minY: n.y, maxX: n.x, maxY: n.y };
|
|
588
|
-
groups[g].minX = Math.min(groups[g].minX, n.x);
|
|
589
|
-
groups[g].minY = Math.min(groups[g].minY, n.y);
|
|
590
|
-
groups[g].maxX = Math.max(groups[g].maxX, n.x);
|
|
591
|
-
groups[g].maxY = Math.max(groups[g].maxY, n.y);
|
|
592
|
-
});
|
|
593
|
-
|
|
594
|
-
const groupRelations = {};
|
|
595
|
-
graphData.edges.forEach(edge => {
|
|
596
|
-
const sNode = nodes.find(n => n.id === edge.source);
|
|
597
|
-
const tNode = nodes.find(n => n.id === edge.target);
|
|
598
|
-
if (!sNode || !tNode) return;
|
|
599
|
-
const g1 = sNode.group || '__default';
|
|
600
|
-
const g2 = tNode.group || '__default';
|
|
601
|
-
if (g1 === g2) return;
|
|
602
|
-
const key = g1 < g2 ? g1 + '::' + g2 : g2 + '::' + g1;
|
|
603
|
-
groupRelations[key] = (groupRelations[key] || 0) + 1;
|
|
604
|
-
});
|
|
605
|
-
|
|
606
|
-
Object.keys(groupRelations).forEach(k => {
|
|
607
|
-
const count = groupRelations[k];
|
|
608
|
-
const [ga, gb] = k.split('::');
|
|
609
|
-
if (!groups[ga] || !groups[gb]) return;
|
|
610
|
-
const ax = (groups[ga].minX + groups[ga].maxX) / 2;
|
|
611
|
-
const ay = (groups[ga].minY + groups[ga].maxY) / 2;
|
|
612
|
-
const bx = (groups[gb].minX + groups[gb].maxX) / 2;
|
|
613
|
-
const by = (groups[gb].minY + groups[gb].maxY) / 2;
|
|
614
|
-
ctx.beginPath();
|
|
615
|
-
ctx.strokeStyle = 'rgba(148,163,184,0.25)';
|
|
616
|
-
ctx.lineWidth = Math.min(6, 0.6 + Math.sqrt(count));
|
|
617
|
-
ctx.moveTo(ax, ay);
|
|
618
|
-
ctx.lineTo(bx, by);
|
|
619
|
-
ctx.stroke();
|
|
620
|
-
});
|
|
621
|
-
|
|
622
|
-
Object.keys(groups).forEach(g => {
|
|
623
|
-
if (g === '__default') return;
|
|
624
|
-
const box = groups[g];
|
|
625
|
-
const pad = 16;
|
|
626
|
-
const x = box.minX - pad;
|
|
627
|
-
const y = box.minY - pad;
|
|
628
|
-
const w = (box.maxX - box.minX) + pad * 2;
|
|
629
|
-
const h = (box.maxY - box.minY) + pad * 2;
|
|
630
|
-
ctx.save();
|
|
631
|
-
ctx.fillStyle = 'rgba(30,64,175,0.04)';
|
|
632
|
-
ctx.strokeStyle = 'rgba(30,64,175,0.12)';
|
|
633
|
-
ctx.lineWidth = 1.2;
|
|
634
|
-
const r = 8;
|
|
635
|
-
ctx.beginPath();
|
|
636
|
-
ctx.moveTo(x + r, y);
|
|
637
|
-
ctx.arcTo(x + w, y, x + w, y + h, r);
|
|
638
|
-
ctx.arcTo(x + w, y + h, x, y + h, r);
|
|
639
|
-
ctx.arcTo(x, y + h, x, y, r);
|
|
640
|
-
ctx.arcTo(x, y, x + w, y, r);
|
|
641
|
-
ctx.closePath();
|
|
642
|
-
ctx.fill();
|
|
643
|
-
ctx.stroke();
|
|
644
|
-
ctx.restore();
|
|
645
|
-
ctx.fillStyle = '#94a3b8';
|
|
646
|
-
ctx.font = '11px sans-serif';
|
|
647
|
-
ctx.fillText(g, x + 8, y + 14);
|
|
648
|
-
});
|
|
649
|
-
|
|
650
|
-
nodes.forEach(n => {
|
|
651
|
-
const sizeVal = (n.size || n.value || 1);
|
|
652
|
-
const r = 6 + (sizeVal / 2);
|
|
653
|
-
ctx.beginPath();
|
|
654
|
-
ctx.fillStyle = n.color || '#60a5fa';
|
|
655
|
-
ctx.arc(n.x, n.y, r, 0, Math.PI * 2);
|
|
656
|
-
ctx.fill();
|
|
657
|
-
|
|
658
|
-
ctx.fillStyle = '#e2e8f0';
|
|
659
|
-
ctx.font = '11px sans-serif';
|
|
660
|
-
ctx.textAlign = 'center';
|
|
661
|
-
ctx.fillText(n.label || n.id.split('/').slice(-1)[0], n.x, n.y + r + 12);
|
|
662
|
-
});
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
draw();
|
|
666
|
-
</script>
|
|
667
|
-
</body>
|
|
668
|
-
</html>`;
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
export {
|
|
672
|
-
Severity,
|
|
673
|
-
SeveritySchema,
|
|
674
|
-
ToolName,
|
|
675
|
-
ToolNameSchema,
|
|
676
|
-
FRIENDLY_TOOL_NAMES,
|
|
677
|
-
IssueType,
|
|
678
|
-
IssueTypeSchema,
|
|
679
|
-
AnalysisStatus,
|
|
680
|
-
AnalysisStatusSchema,
|
|
681
|
-
ModelTier,
|
|
682
|
-
ModelTierSchema,
|
|
683
|
-
LocationSchema,
|
|
684
|
-
IssueSchema,
|
|
685
|
-
MetricsSchema,
|
|
686
|
-
AnalysisResultSchema,
|
|
687
|
-
SpokeSummarySchema,
|
|
688
|
-
SpokeOutputSchema,
|
|
689
|
-
UnifiedReportSchema,
|
|
690
|
-
GLOBAL_INFRA_OPTIONS,
|
|
691
|
-
COMMON_FINE_TUNING_OPTIONS,
|
|
692
|
-
GLOBAL_SCAN_OPTIONS,
|
|
693
|
-
Language,
|
|
694
|
-
LANGUAGE_EXTENSIONS,
|
|
695
|
-
ParseError,
|
|
696
|
-
RecommendationPriority,
|
|
697
|
-
ReadinessRating,
|
|
698
|
-
DEFAULT_TOOL_WEIGHTS,
|
|
699
|
-
TOOL_NAME_MAP,
|
|
700
|
-
ScoringProfile,
|
|
701
|
-
SCORING_PROFILES,
|
|
702
|
-
CONTEXT_TIER_THRESHOLDS,
|
|
703
|
-
SIZE_ADJUSTED_THRESHOLDS,
|
|
704
|
-
getProjectSizeTier,
|
|
705
|
-
getRecommendedThreshold,
|
|
706
|
-
normalizeToolName,
|
|
707
|
-
getToolWeight,
|
|
708
|
-
parseWeightString,
|
|
709
|
-
calculateOverallScore,
|
|
710
|
-
getRating,
|
|
711
|
-
getRatingWithContext,
|
|
712
|
-
getRatingDisplay,
|
|
713
|
-
formatScore,
|
|
714
|
-
formatToolScore,
|
|
715
|
-
generateHTML,
|
|
716
|
-
};
|