@aiready/core 0.19.2 → 0.19.3
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-D3D3NCRR.mjs +538 -0
- package/dist/chunk-OQ6IGDXG.mjs +535 -0
- package/dist/chunk-UTZOO4XO.mjs +537 -0
- package/dist/client.d.mts +245 -53
- package/dist/client.d.ts +245 -53
- package/dist/client.js +142 -0
- package/dist/client.mjs +29 -1
- package/dist/index.d.mts +10 -39
- package/dist/index.d.ts +10 -39
- package/dist/index.js +182 -24
- package/dist/index.mjs +67 -24
- package/package.json +3 -2
package/dist/client.d.mts
CHANGED
|
@@ -1,44 +1,244 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Severity levels for all AIReady issues.
|
|
5
|
+
*/
|
|
6
|
+
declare enum Severity {
|
|
7
|
+
Critical = "critical",
|
|
8
|
+
Major = "major",
|
|
9
|
+
Minor = "minor",
|
|
10
|
+
Info = "info"
|
|
11
|
+
}
|
|
12
|
+
declare const SeveritySchema: z.ZodEnum<typeof Severity>;
|
|
13
|
+
/**
|
|
14
|
+
* Standardized issue types across all AIReady tools.
|
|
15
|
+
*/
|
|
16
|
+
declare enum IssueType {
|
|
17
|
+
DuplicatePattern = "duplicate-pattern",
|
|
18
|
+
PatternInconsistency = "pattern-inconsistency",
|
|
19
|
+
ContextFragmentation = "context-fragmentation",
|
|
20
|
+
DependencyHealth = "dependency-health",
|
|
21
|
+
CircularDependency = "circular-dependency",
|
|
22
|
+
DocDrift = "doc-drift",
|
|
23
|
+
NamingInconsistency = "naming-inconsistency",
|
|
24
|
+
NamingQuality = "naming-quality",
|
|
25
|
+
ArchitectureInconsistency = "architecture-inconsistency",
|
|
26
|
+
DeadCode = "dead-code",
|
|
27
|
+
MissingTypes = "missing-types",
|
|
28
|
+
MagicLiteral = "magic-literal",
|
|
29
|
+
BooleanTrap = "boolean-trap",
|
|
30
|
+
AiSignalClarity = "ai-signal-clarity",
|
|
31
|
+
LowTestability = "low-testability",
|
|
32
|
+
AgentNavigationFailure = "agent-navigation-failure",
|
|
33
|
+
AmbiguousApi = "ambiguous-api",
|
|
34
|
+
ChangeAmplification = "change-amplification"
|
|
35
|
+
}
|
|
36
|
+
declare const IssueTypeSchema: z.ZodEnum<typeof IssueType>;
|
|
37
|
+
/**
|
|
38
|
+
* Analysis processing status.
|
|
39
|
+
*/
|
|
40
|
+
declare enum AnalysisStatus {
|
|
41
|
+
Processing = "processing",
|
|
42
|
+
Completed = "completed",
|
|
43
|
+
Failed = "failed"
|
|
44
|
+
}
|
|
45
|
+
declare const AnalysisStatusSchema: z.ZodEnum<typeof AnalysisStatus>;
|
|
46
|
+
/**
|
|
47
|
+
* AI Model Context Tiers.
|
|
48
|
+
*/
|
|
49
|
+
declare enum ModelTier {
|
|
50
|
+
Compact = "compact",
|
|
51
|
+
Standard = "standard",
|
|
52
|
+
Extended = "extended",
|
|
53
|
+
Frontier = "frontier"
|
|
54
|
+
}
|
|
55
|
+
declare const ModelTierSchema: z.ZodEnum<typeof ModelTier>;
|
|
56
|
+
/**
|
|
57
|
+
* Source code location schema.
|
|
58
|
+
*/
|
|
59
|
+
declare const LocationSchema: z.ZodObject<{
|
|
60
|
+
file: z.ZodString;
|
|
61
|
+
line: z.ZodNumber;
|
|
62
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
type Location = z.infer<typeof LocationSchema>;
|
|
67
|
+
/**
|
|
68
|
+
* Standard Issue schema.
|
|
69
|
+
*/
|
|
70
|
+
declare const IssueSchema: z.ZodObject<{
|
|
71
|
+
type: z.ZodEnum<typeof IssueType>;
|
|
72
|
+
severity: z.ZodEnum<typeof Severity>;
|
|
73
|
+
message: z.ZodString;
|
|
74
|
+
location: z.ZodObject<{
|
|
75
|
+
file: z.ZodString;
|
|
76
|
+
line: z.ZodNumber;
|
|
77
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
type Issue = z.infer<typeof IssueSchema>;
|
|
84
|
+
/**
|
|
85
|
+
* Standard Metrics schema.
|
|
86
|
+
*/
|
|
87
|
+
declare const MetricsSchema: z.ZodObject<{
|
|
88
|
+
tokenCost: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
complexityScore: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
consistencyScore: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
docFreshnessScore: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
agentGroundingScore: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
testabilityScore: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
docDriftScore: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
|
|
98
|
+
estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
totalSymbols: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
totalExports: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
type Metrics = z.infer<typeof MetricsSchema>;
|
|
105
|
+
/**
|
|
106
|
+
* Individual file/module analysis result.
|
|
107
|
+
*/
|
|
108
|
+
declare const AnalysisResultSchema: z.ZodObject<{
|
|
109
|
+
fileName: z.ZodString;
|
|
110
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
111
|
+
type: z.ZodEnum<typeof IssueType>;
|
|
112
|
+
severity: z.ZodEnum<typeof Severity>;
|
|
113
|
+
message: z.ZodString;
|
|
114
|
+
location: z.ZodObject<{
|
|
115
|
+
file: z.ZodString;
|
|
116
|
+
line: z.ZodNumber;
|
|
117
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strip>>;
|
|
123
|
+
metrics: z.ZodObject<{
|
|
124
|
+
tokenCost: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
complexityScore: z.ZodOptional<z.ZodNumber>;
|
|
126
|
+
consistencyScore: z.ZodOptional<z.ZodNumber>;
|
|
127
|
+
docFreshnessScore: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
agentGroundingScore: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
testabilityScore: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
docDriftScore: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
|
|
134
|
+
estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
totalSymbols: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
totalExports: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
}, z.core.$strip>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
type AnalysisResult = z.infer<typeof AnalysisResultSchema>;
|
|
142
|
+
/**
|
|
143
|
+
* Standard spoke tool output contract.
|
|
144
|
+
*/
|
|
145
|
+
declare const SpokeOutputSchema: z.ZodObject<{
|
|
146
|
+
results: z.ZodArray<z.ZodObject<{
|
|
147
|
+
fileName: z.ZodString;
|
|
148
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
149
|
+
type: z.ZodEnum<typeof IssueType>;
|
|
150
|
+
severity: z.ZodEnum<typeof Severity>;
|
|
151
|
+
message: z.ZodString;
|
|
152
|
+
location: z.ZodObject<{
|
|
153
|
+
file: z.ZodString;
|
|
154
|
+
line: z.ZodNumber;
|
|
155
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
}, z.core.$strip>;
|
|
159
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, z.core.$strip>>;
|
|
161
|
+
metrics: z.ZodObject<{
|
|
162
|
+
tokenCost: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
complexityScore: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
consistencyScore: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
docFreshnessScore: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
agentGroundingScore: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
testabilityScore: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
docDriftScore: z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
|
|
172
|
+
estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
totalSymbols: z.ZodOptional<z.ZodNumber>;
|
|
176
|
+
totalExports: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
}, z.core.$strip>>;
|
|
179
|
+
summary: z.ZodAny;
|
|
180
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
181
|
+
toolName: z.ZodString;
|
|
182
|
+
version: z.ZodString;
|
|
183
|
+
timestamp: z.ZodString;
|
|
184
|
+
}, z.core.$catchall<z.ZodAny>>>;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
type SpokeOutput = z.infer<typeof SpokeOutputSchema>;
|
|
187
|
+
/**
|
|
188
|
+
* Master Unified Report contract (CLI -> Platform).
|
|
189
|
+
*/
|
|
190
|
+
declare const UnifiedReportSchema: z.ZodObject<{
|
|
191
|
+
summary: z.ZodObject<{
|
|
192
|
+
totalFiles: z.ZodNumber;
|
|
193
|
+
totalIssues: z.ZodNumber;
|
|
194
|
+
criticalIssues: z.ZodNumber;
|
|
195
|
+
majorIssues: z.ZodNumber;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
results: z.ZodArray<z.ZodObject<{
|
|
198
|
+
fileName: z.ZodString;
|
|
199
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
200
|
+
type: z.ZodEnum<typeof IssueType>;
|
|
201
|
+
severity: z.ZodEnum<typeof Severity>;
|
|
202
|
+
message: z.ZodString;
|
|
203
|
+
location: z.ZodObject<{
|
|
204
|
+
file: z.ZodString;
|
|
205
|
+
line: z.ZodNumber;
|
|
206
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
207
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
208
|
+
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
209
|
+
}, z.core.$strip>;
|
|
210
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
211
|
+
}, z.core.$strip>>;
|
|
212
|
+
metrics: z.ZodObject<{
|
|
213
|
+
tokenCost: z.ZodOptional<z.ZodNumber>;
|
|
214
|
+
complexityScore: z.ZodOptional<z.ZodNumber>;
|
|
215
|
+
consistencyScore: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
docFreshnessScore: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
|
|
218
|
+
agentGroundingScore: z.ZodOptional<z.ZodNumber>;
|
|
219
|
+
testabilityScore: z.ZodOptional<z.ZodNumber>;
|
|
220
|
+
docDriftScore: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
|
|
222
|
+
modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
|
|
223
|
+
estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
|
|
224
|
+
estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
|
|
225
|
+
comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
|
|
226
|
+
totalSymbols: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
totalExports: z.ZodOptional<z.ZodNumber>;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
}, z.core.$strip>>;
|
|
230
|
+
scoring: z.ZodOptional<z.ZodObject<{
|
|
231
|
+
overall: z.ZodNumber;
|
|
232
|
+
rating: z.ZodString;
|
|
233
|
+
timestamp: z.ZodString;
|
|
234
|
+
breakdown: z.ZodArray<z.ZodObject<{
|
|
235
|
+
toolName: z.ZodString;
|
|
236
|
+
score: z.ZodNumber;
|
|
237
|
+
}, z.core.$catchall<z.ZodAny>>>;
|
|
238
|
+
}, z.core.$strip>>;
|
|
239
|
+
}, z.core.$catchall<z.ZodAny>>;
|
|
240
|
+
type UnifiedReport = z.infer<typeof UnifiedReportSchema>;
|
|
241
|
+
|
|
42
242
|
/**
|
|
43
243
|
* Cost estimation configuration
|
|
44
244
|
*/
|
|
@@ -87,15 +287,7 @@ interface ProductivityImpact {
|
|
|
87
287
|
totalCost: number;
|
|
88
288
|
/** Breakdown by severity */
|
|
89
289
|
bySeverity: {
|
|
90
|
-
|
|
91
|
-
hours: number;
|
|
92
|
-
cost: number;
|
|
93
|
-
};
|
|
94
|
-
major: {
|
|
95
|
-
hours: number;
|
|
96
|
-
cost: number;
|
|
97
|
-
};
|
|
98
|
-
minor: {
|
|
290
|
+
[K in Severity]: {
|
|
99
291
|
hours: number;
|
|
100
292
|
cost: number;
|
|
101
293
|
};
|
|
@@ -279,7 +471,7 @@ interface Report {
|
|
|
279
471
|
/**
|
|
280
472
|
* Severity levels for issues
|
|
281
473
|
*/
|
|
282
|
-
type GraphIssueSeverity =
|
|
474
|
+
type GraphIssueSeverity = Severity;
|
|
283
475
|
/**
|
|
284
476
|
* Base graph node
|
|
285
477
|
*/
|
|
@@ -333,7 +525,7 @@ interface GraphData {
|
|
|
333
525
|
issues?: {
|
|
334
526
|
id: string;
|
|
335
527
|
type: string;
|
|
336
|
-
severity:
|
|
528
|
+
severity: Severity;
|
|
337
529
|
nodeIds: string[];
|
|
338
530
|
message: string;
|
|
339
531
|
}[];
|
|
@@ -683,4 +875,4 @@ declare function formatToolScore(output: ToolScoringOutput): string;
|
|
|
683
875
|
*/
|
|
684
876
|
declare function generateHTML(graph: GraphData): string;
|
|
685
877
|
|
|
686
|
-
export { type AIReadyConfig, type AcceptancePrediction, type AnalysisResult, type BusinessReport, CONTEXT_TIER_THRESHOLDS, type CommonASTNode, type ComprehensionDifficulty, type CostConfig, DEFAULT_TOOL_WEIGHTS, type ExportInfo, type GraphData, type GraphEdge, type GraphIssueSeverity, type GraphMetadata, type GraphNode, type ImportInfo, type Issue,
|
|
878
|
+
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, 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, TOOL_NAME_MAP, type TechnicalValueChain, type TechnicalValueChainSummary, type TokenBudget, type ToolScoringOutput, type UnifiedReport, UnifiedReportSchema, calculateOverallScore, formatScore, formatToolScore, generateHTML, getProjectSizeTier, getRating, getRatingDisplay, getRatingWithContext, getRecommendedThreshold, getToolWeight, normalizeToolName, parseWeightString };
|
package/dist/client.d.ts
CHANGED
|
@@ -1,44 +1,244 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Severity levels for all AIReady issues.
|
|
5
|
+
*/
|
|
6
|
+
declare enum Severity {
|
|
7
|
+
Critical = "critical",
|
|
8
|
+
Major = "major",
|
|
9
|
+
Minor = "minor",
|
|
10
|
+
Info = "info"
|
|
11
|
+
}
|
|
12
|
+
declare const SeveritySchema: z.ZodEnum<typeof Severity>;
|
|
13
|
+
/**
|
|
14
|
+
* Standardized issue types across all AIReady tools.
|
|
15
|
+
*/
|
|
16
|
+
declare enum IssueType {
|
|
17
|
+
DuplicatePattern = "duplicate-pattern",
|
|
18
|
+
PatternInconsistency = "pattern-inconsistency",
|
|
19
|
+
ContextFragmentation = "context-fragmentation",
|
|
20
|
+
DependencyHealth = "dependency-health",
|
|
21
|
+
CircularDependency = "circular-dependency",
|
|
22
|
+
DocDrift = "doc-drift",
|
|
23
|
+
NamingInconsistency = "naming-inconsistency",
|
|
24
|
+
NamingQuality = "naming-quality",
|
|
25
|
+
ArchitectureInconsistency = "architecture-inconsistency",
|
|
26
|
+
DeadCode = "dead-code",
|
|
27
|
+
MissingTypes = "missing-types",
|
|
28
|
+
MagicLiteral = "magic-literal",
|
|
29
|
+
BooleanTrap = "boolean-trap",
|
|
30
|
+
AiSignalClarity = "ai-signal-clarity",
|
|
31
|
+
LowTestability = "low-testability",
|
|
32
|
+
AgentNavigationFailure = "agent-navigation-failure",
|
|
33
|
+
AmbiguousApi = "ambiguous-api",
|
|
34
|
+
ChangeAmplification = "change-amplification"
|
|
35
|
+
}
|
|
36
|
+
declare const IssueTypeSchema: z.ZodEnum<typeof IssueType>;
|
|
37
|
+
/**
|
|
38
|
+
* Analysis processing status.
|
|
39
|
+
*/
|
|
40
|
+
declare enum AnalysisStatus {
|
|
41
|
+
Processing = "processing",
|
|
42
|
+
Completed = "completed",
|
|
43
|
+
Failed = "failed"
|
|
44
|
+
}
|
|
45
|
+
declare const AnalysisStatusSchema: z.ZodEnum<typeof AnalysisStatus>;
|
|
46
|
+
/**
|
|
47
|
+
* AI Model Context Tiers.
|
|
48
|
+
*/
|
|
49
|
+
declare enum ModelTier {
|
|
50
|
+
Compact = "compact",
|
|
51
|
+
Standard = "standard",
|
|
52
|
+
Extended = "extended",
|
|
53
|
+
Frontier = "frontier"
|
|
54
|
+
}
|
|
55
|
+
declare const ModelTierSchema: z.ZodEnum<typeof ModelTier>;
|
|
56
|
+
/**
|
|
57
|
+
* Source code location schema.
|
|
58
|
+
*/
|
|
59
|
+
declare const LocationSchema: z.ZodObject<{
|
|
60
|
+
file: z.ZodString;
|
|
61
|
+
line: z.ZodNumber;
|
|
62
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
type Location = z.infer<typeof LocationSchema>;
|
|
67
|
+
/**
|
|
68
|
+
* Standard Issue schema.
|
|
69
|
+
*/
|
|
70
|
+
declare const IssueSchema: z.ZodObject<{
|
|
71
|
+
type: z.ZodEnum<typeof IssueType>;
|
|
72
|
+
severity: z.ZodEnum<typeof Severity>;
|
|
73
|
+
message: z.ZodString;
|
|
74
|
+
location: z.ZodObject<{
|
|
75
|
+
file: z.ZodString;
|
|
76
|
+
line: z.ZodNumber;
|
|
77
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
type Issue = z.infer<typeof IssueSchema>;
|
|
84
|
+
/**
|
|
85
|
+
* Standard Metrics schema.
|
|
86
|
+
*/
|
|
87
|
+
declare const MetricsSchema: z.ZodObject<{
|
|
88
|
+
tokenCost: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
complexityScore: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
consistencyScore: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
docFreshnessScore: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
agentGroundingScore: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
testabilityScore: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
docDriftScore: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
|
|
98
|
+
estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
totalSymbols: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
totalExports: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
type Metrics = z.infer<typeof MetricsSchema>;
|
|
105
|
+
/**
|
|
106
|
+
* Individual file/module analysis result.
|
|
107
|
+
*/
|
|
108
|
+
declare const AnalysisResultSchema: z.ZodObject<{
|
|
109
|
+
fileName: z.ZodString;
|
|
110
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
111
|
+
type: z.ZodEnum<typeof IssueType>;
|
|
112
|
+
severity: z.ZodEnum<typeof Severity>;
|
|
113
|
+
message: z.ZodString;
|
|
114
|
+
location: z.ZodObject<{
|
|
115
|
+
file: z.ZodString;
|
|
116
|
+
line: z.ZodNumber;
|
|
117
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strip>>;
|
|
123
|
+
metrics: z.ZodObject<{
|
|
124
|
+
tokenCost: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
complexityScore: z.ZodOptional<z.ZodNumber>;
|
|
126
|
+
consistencyScore: z.ZodOptional<z.ZodNumber>;
|
|
127
|
+
docFreshnessScore: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
agentGroundingScore: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
testabilityScore: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
docDriftScore: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
|
|
134
|
+
estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
totalSymbols: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
totalExports: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
}, z.core.$strip>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
type AnalysisResult = z.infer<typeof AnalysisResultSchema>;
|
|
142
|
+
/**
|
|
143
|
+
* Standard spoke tool output contract.
|
|
144
|
+
*/
|
|
145
|
+
declare const SpokeOutputSchema: z.ZodObject<{
|
|
146
|
+
results: z.ZodArray<z.ZodObject<{
|
|
147
|
+
fileName: z.ZodString;
|
|
148
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
149
|
+
type: z.ZodEnum<typeof IssueType>;
|
|
150
|
+
severity: z.ZodEnum<typeof Severity>;
|
|
151
|
+
message: z.ZodString;
|
|
152
|
+
location: z.ZodObject<{
|
|
153
|
+
file: z.ZodString;
|
|
154
|
+
line: z.ZodNumber;
|
|
155
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
}, z.core.$strip>;
|
|
159
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, z.core.$strip>>;
|
|
161
|
+
metrics: z.ZodObject<{
|
|
162
|
+
tokenCost: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
complexityScore: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
consistencyScore: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
docFreshnessScore: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
agentGroundingScore: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
testabilityScore: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
docDriftScore: z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
|
|
172
|
+
estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
totalSymbols: z.ZodOptional<z.ZodNumber>;
|
|
176
|
+
totalExports: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
}, z.core.$strip>>;
|
|
179
|
+
summary: z.ZodAny;
|
|
180
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
181
|
+
toolName: z.ZodString;
|
|
182
|
+
version: z.ZodString;
|
|
183
|
+
timestamp: z.ZodString;
|
|
184
|
+
}, z.core.$catchall<z.ZodAny>>>;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
type SpokeOutput = z.infer<typeof SpokeOutputSchema>;
|
|
187
|
+
/**
|
|
188
|
+
* Master Unified Report contract (CLI -> Platform).
|
|
189
|
+
*/
|
|
190
|
+
declare const UnifiedReportSchema: z.ZodObject<{
|
|
191
|
+
summary: z.ZodObject<{
|
|
192
|
+
totalFiles: z.ZodNumber;
|
|
193
|
+
totalIssues: z.ZodNumber;
|
|
194
|
+
criticalIssues: z.ZodNumber;
|
|
195
|
+
majorIssues: z.ZodNumber;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
results: z.ZodArray<z.ZodObject<{
|
|
198
|
+
fileName: z.ZodString;
|
|
199
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
200
|
+
type: z.ZodEnum<typeof IssueType>;
|
|
201
|
+
severity: z.ZodEnum<typeof Severity>;
|
|
202
|
+
message: z.ZodString;
|
|
203
|
+
location: z.ZodObject<{
|
|
204
|
+
file: z.ZodString;
|
|
205
|
+
line: z.ZodNumber;
|
|
206
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
207
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
208
|
+
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
209
|
+
}, z.core.$strip>;
|
|
210
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
211
|
+
}, z.core.$strip>>;
|
|
212
|
+
metrics: z.ZodObject<{
|
|
213
|
+
tokenCost: z.ZodOptional<z.ZodNumber>;
|
|
214
|
+
complexityScore: z.ZodOptional<z.ZodNumber>;
|
|
215
|
+
consistencyScore: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
docFreshnessScore: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
|
|
218
|
+
agentGroundingScore: z.ZodOptional<z.ZodNumber>;
|
|
219
|
+
testabilityScore: z.ZodOptional<z.ZodNumber>;
|
|
220
|
+
docDriftScore: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
|
|
222
|
+
modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
|
|
223
|
+
estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
|
|
224
|
+
estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
|
|
225
|
+
comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
|
|
226
|
+
totalSymbols: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
totalExports: z.ZodOptional<z.ZodNumber>;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
}, z.core.$strip>>;
|
|
230
|
+
scoring: z.ZodOptional<z.ZodObject<{
|
|
231
|
+
overall: z.ZodNumber;
|
|
232
|
+
rating: z.ZodString;
|
|
233
|
+
timestamp: z.ZodString;
|
|
234
|
+
breakdown: z.ZodArray<z.ZodObject<{
|
|
235
|
+
toolName: z.ZodString;
|
|
236
|
+
score: z.ZodNumber;
|
|
237
|
+
}, z.core.$catchall<z.ZodAny>>>;
|
|
238
|
+
}, z.core.$strip>>;
|
|
239
|
+
}, z.core.$catchall<z.ZodAny>>;
|
|
240
|
+
type UnifiedReport = z.infer<typeof UnifiedReportSchema>;
|
|
241
|
+
|
|
42
242
|
/**
|
|
43
243
|
* Cost estimation configuration
|
|
44
244
|
*/
|
|
@@ -87,15 +287,7 @@ interface ProductivityImpact {
|
|
|
87
287
|
totalCost: number;
|
|
88
288
|
/** Breakdown by severity */
|
|
89
289
|
bySeverity: {
|
|
90
|
-
|
|
91
|
-
hours: number;
|
|
92
|
-
cost: number;
|
|
93
|
-
};
|
|
94
|
-
major: {
|
|
95
|
-
hours: number;
|
|
96
|
-
cost: number;
|
|
97
|
-
};
|
|
98
|
-
minor: {
|
|
290
|
+
[K in Severity]: {
|
|
99
291
|
hours: number;
|
|
100
292
|
cost: number;
|
|
101
293
|
};
|
|
@@ -279,7 +471,7 @@ interface Report {
|
|
|
279
471
|
/**
|
|
280
472
|
* Severity levels for issues
|
|
281
473
|
*/
|
|
282
|
-
type GraphIssueSeverity =
|
|
474
|
+
type GraphIssueSeverity = Severity;
|
|
283
475
|
/**
|
|
284
476
|
* Base graph node
|
|
285
477
|
*/
|
|
@@ -333,7 +525,7 @@ interface GraphData {
|
|
|
333
525
|
issues?: {
|
|
334
526
|
id: string;
|
|
335
527
|
type: string;
|
|
336
|
-
severity:
|
|
528
|
+
severity: Severity;
|
|
337
529
|
nodeIds: string[];
|
|
338
530
|
message: string;
|
|
339
531
|
}[];
|
|
@@ -683,4 +875,4 @@ declare function formatToolScore(output: ToolScoringOutput): string;
|
|
|
683
875
|
*/
|
|
684
876
|
declare function generateHTML(graph: GraphData): string;
|
|
685
877
|
|
|
686
|
-
export { type AIReadyConfig, type AcceptancePrediction, type AnalysisResult, type BusinessReport, CONTEXT_TIER_THRESHOLDS, type CommonASTNode, type ComprehensionDifficulty, type CostConfig, DEFAULT_TOOL_WEIGHTS, type ExportInfo, type GraphData, type GraphEdge, type GraphIssueSeverity, type GraphMetadata, type GraphNode, type ImportInfo, type Issue,
|
|
878
|
+
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, 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, TOOL_NAME_MAP, type TechnicalValueChain, type TechnicalValueChainSummary, type TokenBudget, type ToolScoringOutput, type UnifiedReport, UnifiedReportSchema, calculateOverallScore, formatScore, formatToolScore, generateHTML, getProjectSizeTier, getRating, getRatingDisplay, getRatingWithContext, getRecommendedThreshold, getToolWeight, normalizeToolName, parseWeightString };
|