@aiready/core 0.24.18 → 0.24.20
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-3NEZ5M7Y.mjs +937 -0
- package/dist/chunk-5IVDH26E.mjs +142 -88
- package/dist/chunk-BE52N7T2.mjs +892 -0
- package/dist/chunk-GQMKSUA4.mjs +381 -336
- package/dist/chunk-LRM26BOB.mjs +381 -336
- package/dist/chunk-MOM3IXCA.mjs +362 -0
- package/dist/chunk-OT6FOHL4.mjs +144 -88
- package/dist/chunk-OVWWYI75.mjs +307 -0
- package/dist/chunk-U3IY2CFC.mjs +18 -22
- package/dist/chunk-WPFXQH5F.mjs +307 -0
- package/dist/chunk-WUDUSXUE.mjs +366 -0
- package/dist/chunk-YQATXOKD.mjs +36 -0
- package/dist/chunk-YVPVNRFQ.mjs +937 -0
- package/dist/client/index.js +5 -1
- package/dist/client/index.mjs +2 -2
- package/dist/csharp-parser-JE5MWHQS.mjs +9 -0
- package/dist/csharp-parser-XW7WHE77.mjs +5 -9
- package/dist/go-parser-KTG4CGF5.mjs +5 -9
- package/dist/go-parser-T7PR6WJI.mjs +9 -0
- package/dist/index-CcP12wb-.d.mts +996 -693
- package/dist/index-CcP12wb-.d.ts +996 -693
- package/dist/index-DGbarGnr.d.mts +996 -693
- package/dist/index-DGbarGnr.d.ts +996 -693
- package/dist/index-slasaNzr.d.mts +1612 -0
- package/dist/index-slasaNzr.d.ts +1612 -0
- package/dist/index.d.mts +32 -1
- package/dist/index.d.ts +32 -1
- package/dist/index.js +61 -7
- package/dist/index.mjs +58 -12
- package/dist/java-parser-EOKMGQ6B.mjs +5 -9
- package/dist/java-parser-WGOXKULP.mjs +9 -0
- package/dist/python-parser-7NCR7VCQ.mjs +8 -0
- package/dist/python-parser-BCI7JVLF.mjs +4 -8
- package/dist/typescript-parser-3KYGSSY5.mjs +3 -0
- package/dist/typescript-parser-4BA4VYAF.mjs +3 -7
- package/dist/typescript-parser-FOUPHVFI.mjs +3 -0
- package/dist/typescript-parser-G3TSNR7O.mjs +7 -0
- package/dist/typescript-parser-RMNCTHRD.mjs +3 -7
- package/dist/typescript-parser-WALISXF4.mjs +7 -0
- package/package.json +14 -11
|
@@ -4,10 +4,10 @@ import { z } from 'zod';
|
|
|
4
4
|
* Severity levels for all AIReady issues.
|
|
5
5
|
*/
|
|
6
6
|
declare enum Severity {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
Critical = 'critical',
|
|
8
|
+
Major = 'major',
|
|
9
|
+
Minor = 'minor',
|
|
10
|
+
Info = 'info',
|
|
11
11
|
}
|
|
12
12
|
/** Zod schema for Severity enum */
|
|
13
13
|
declare const SeveritySchema: z.ZodEnum<typeof Severity>;
|
|
@@ -16,20 +16,20 @@ declare const SeveritySchema: z.ZodEnum<typeof Severity>;
|
|
|
16
16
|
* Used everywhere as the single source of truth for tool identification.
|
|
17
17
|
*/
|
|
18
18
|
declare enum ToolName {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
PatternDetect = 'pattern-detect',
|
|
20
|
+
ContextAnalyzer = 'context-analyzer',
|
|
21
|
+
NamingConsistency = 'naming-consistency',
|
|
22
|
+
AiSignalClarity = 'ai-signal-clarity',
|
|
23
|
+
AgentGrounding = 'agent-grounding',
|
|
24
|
+
TestabilityIndex = 'testability-index',
|
|
25
|
+
DocDrift = 'doc-drift',
|
|
26
|
+
DependencyHealth = 'dependency-health',
|
|
27
|
+
ChangeAmplification = 'change-amplification',
|
|
28
|
+
CognitiveLoad = 'cognitive-load',
|
|
29
|
+
PatternEntropy = 'pattern-entropy',
|
|
30
|
+
ConceptCohesion = 'concept-cohesion',
|
|
31
|
+
SemanticDistance = 'semantic-distance',
|
|
32
|
+
ContractEnforcement = 'contract-enforcement',
|
|
33
33
|
}
|
|
34
34
|
/** Zod schema for ToolName enum */
|
|
35
35
|
declare const ToolNameSchema: z.ZodEnum<typeof ToolName>;
|
|
@@ -41,25 +41,25 @@ declare const FRIENDLY_TOOL_NAMES: Record<ToolName, string>;
|
|
|
41
41
|
* Standardized issue types across all AIReady tools.
|
|
42
42
|
*/
|
|
43
43
|
declare enum IssueType {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
44
|
+
DuplicatePattern = 'duplicate-pattern',
|
|
45
|
+
PatternInconsistency = 'pattern-inconsistency',
|
|
46
|
+
ContextFragmentation = 'context-fragmentation',
|
|
47
|
+
DependencyHealth = 'dependency-health',
|
|
48
|
+
CircularDependency = 'circular-dependency',
|
|
49
|
+
DocDrift = 'doc-drift',
|
|
50
|
+
NamingInconsistency = 'naming-inconsistency',
|
|
51
|
+
NamingQuality = 'naming-quality',
|
|
52
|
+
ArchitectureInconsistency = 'architecture-inconsistency',
|
|
53
|
+
DeadCode = 'dead-code',
|
|
54
|
+
MissingTypes = 'missing-types',
|
|
55
|
+
MagicLiteral = 'magic-literal',
|
|
56
|
+
BooleanTrap = 'boolean-trap',
|
|
57
|
+
AiSignalClarity = 'ai-signal-clarity',
|
|
58
|
+
LowTestability = 'low-testability',
|
|
59
|
+
AgentNavigationFailure = 'agent-navigation-failure',
|
|
60
|
+
AmbiguousApi = 'ambiguous-api',
|
|
61
|
+
ChangeAmplification = 'change-amplification',
|
|
62
|
+
ContractGap = 'contract-gap',
|
|
63
63
|
}
|
|
64
64
|
/** Zod schema for IssueType enum */
|
|
65
65
|
declare const IssueTypeSchema: z.ZodEnum<typeof IssueType>;
|
|
@@ -67,9 +67,9 @@ declare const IssueTypeSchema: z.ZodEnum<typeof IssueType>;
|
|
|
67
67
|
* Analysis processing status.
|
|
68
68
|
*/
|
|
69
69
|
declare enum AnalysisStatus {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
Processing = 'processing',
|
|
71
|
+
Completed = 'completed',
|
|
72
|
+
Failed = 'failed',
|
|
73
73
|
}
|
|
74
74
|
/** Zod schema for AnalysisStatus enum */
|
|
75
75
|
declare const AnalysisStatusSchema: z.ZodEnum<typeof AnalysisStatus>;
|
|
@@ -77,10 +77,10 @@ declare const AnalysisStatusSchema: z.ZodEnum<typeof AnalysisStatus>;
|
|
|
77
77
|
* AI Model Context Tiers.
|
|
78
78
|
*/
|
|
79
79
|
declare enum ModelTier {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
Compact = 'compact',
|
|
81
|
+
Standard = 'standard',
|
|
82
|
+
Extended = 'extended',
|
|
83
|
+
Frontier = 'frontier',
|
|
84
84
|
}
|
|
85
85
|
/** Zod schema for ModelTier enum */
|
|
86
86
|
declare const ModelTierSchema: z.ZodEnum<typeof ModelTier>;
|
|
@@ -89,80 +89,92 @@ declare const ModelTierSchema: z.ZodEnum<typeof ModelTier>;
|
|
|
89
89
|
* Common tool options
|
|
90
90
|
*/
|
|
91
91
|
interface ToolOptions {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
92
|
+
/** Maximum number of results to return */
|
|
93
|
+
maxResults?: number;
|
|
94
|
+
/** Severity filter */
|
|
95
|
+
severity?: 'info' | 'warning' | 'error' | 'critical';
|
|
96
|
+
/** Output format */
|
|
97
|
+
outputFormat?: 'json' | 'text' | 'html';
|
|
98
|
+
/** Additional configuration */
|
|
99
|
+
config?: Record<string, unknown>;
|
|
100
|
+
/** Custom key-value pairs */
|
|
101
|
+
[key: string]: any;
|
|
102
102
|
}
|
|
103
103
|
/**
|
|
104
104
|
* Source code location schema.
|
|
105
105
|
*/
|
|
106
106
|
/** Zod schema for Location object */
|
|
107
|
-
declare const LocationSchema: z.ZodObject<
|
|
107
|
+
declare const LocationSchema: z.ZodObject<
|
|
108
|
+
{
|
|
108
109
|
file: z.ZodString;
|
|
109
110
|
line: z.ZodNumber;
|
|
110
111
|
column: z.ZodOptional<z.ZodNumber>;
|
|
111
112
|
endLine: z.ZodOptional<z.ZodNumber>;
|
|
112
113
|
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
113
|
-
},
|
|
114
|
+
},
|
|
115
|
+
z.core.$strip
|
|
116
|
+
>;
|
|
114
117
|
type Location = z.infer<typeof LocationSchema>;
|
|
115
118
|
/**
|
|
116
119
|
* Scan options for tool providers
|
|
117
120
|
*/
|
|
118
121
|
interface ScanOptions extends ToolOptions {
|
|
119
|
-
|
|
120
|
-
|
|
122
|
+
/** Target output format */
|
|
123
|
+
output?:
|
|
124
|
+
| string
|
|
125
|
+
| {
|
|
121
126
|
format: string;
|
|
122
127
|
file?: string;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
};
|
|
129
|
+
/** Visual format (json/console/html) */
|
|
130
|
+
format?: 'json' | 'console' | 'html';
|
|
131
|
+
/** Whether to run in parallel */
|
|
132
|
+
parallel?: boolean;
|
|
128
133
|
}
|
|
129
134
|
|
|
130
135
|
/**
|
|
131
136
|
* Standard Issue schema used across all tools.
|
|
132
137
|
*/
|
|
133
138
|
/** Zod schema for Issue object */
|
|
134
|
-
declare const IssueSchema: z.ZodObject<
|
|
139
|
+
declare const IssueSchema: z.ZodObject<
|
|
140
|
+
{
|
|
135
141
|
type: z.ZodEnum<typeof IssueType>;
|
|
136
142
|
severity: z.ZodEnum<typeof Severity>;
|
|
137
143
|
message: z.ZodString;
|
|
138
|
-
location: z.ZodObject<
|
|
144
|
+
location: z.ZodObject<
|
|
145
|
+
{
|
|
139
146
|
file: z.ZodString;
|
|
140
147
|
line: z.ZodNumber;
|
|
141
148
|
column: z.ZodOptional<z.ZodNumber>;
|
|
142
149
|
endLine: z.ZodOptional<z.ZodNumber>;
|
|
143
150
|
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
144
|
-
|
|
151
|
+
},
|
|
152
|
+
z.core.$strip
|
|
153
|
+
>;
|
|
145
154
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
146
|
-
},
|
|
155
|
+
},
|
|
156
|
+
z.core.$strip
|
|
157
|
+
>;
|
|
147
158
|
type Issue = z.infer<typeof IssueSchema>;
|
|
148
159
|
/**
|
|
149
160
|
* Issue overlay on the graph
|
|
150
161
|
*/
|
|
151
162
|
interface IssueOverlay {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
163
|
+
id: string;
|
|
164
|
+
type: string;
|
|
165
|
+
severity: string;
|
|
166
|
+
nodeIds: string[];
|
|
167
|
+
edgeIds?: string[];
|
|
168
|
+
message: string;
|
|
169
|
+
details?: string;
|
|
159
170
|
}
|
|
160
171
|
|
|
161
172
|
/**
|
|
162
173
|
* Standard Metrics schema.
|
|
163
174
|
*/
|
|
164
175
|
/** Zod schema for Metrics object */
|
|
165
|
-
declare const MetricsSchema: z.ZodObject<
|
|
176
|
+
declare const MetricsSchema: z.ZodObject<
|
|
177
|
+
{
|
|
166
178
|
tokenCost: z.ZodOptional<z.ZodNumber>;
|
|
167
179
|
complexityScore: z.ZodOptional<z.ZodNumber>;
|
|
168
180
|
consistencyScore: z.ZodOptional<z.ZodNumber>;
|
|
@@ -178,28 +190,40 @@ declare const MetricsSchema: z.ZodObject<{
|
|
|
178
190
|
comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
|
|
179
191
|
totalSymbols: z.ZodOptional<z.ZodNumber>;
|
|
180
192
|
totalExports: z.ZodOptional<z.ZodNumber>;
|
|
181
|
-
},
|
|
193
|
+
},
|
|
194
|
+
z.core.$strip
|
|
195
|
+
>;
|
|
182
196
|
type Metrics = z.infer<typeof MetricsSchema>;
|
|
183
197
|
|
|
184
198
|
/**
|
|
185
199
|
* Individual file/module analysis result.
|
|
186
200
|
*/
|
|
187
|
-
declare const AnalysisResultSchema: z.ZodObject<
|
|
201
|
+
declare const AnalysisResultSchema: z.ZodObject<
|
|
202
|
+
{
|
|
188
203
|
fileName: z.ZodString;
|
|
189
|
-
issues: z.ZodArray<
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
204
|
+
issues: z.ZodArray<
|
|
205
|
+
z.ZodObject<
|
|
206
|
+
{
|
|
207
|
+
type: z.ZodEnum<typeof IssueType>;
|
|
208
|
+
severity: z.ZodEnum<typeof Severity>;
|
|
209
|
+
message: z.ZodString;
|
|
210
|
+
location: z.ZodObject<
|
|
211
|
+
{
|
|
212
|
+
file: z.ZodString;
|
|
213
|
+
line: z.ZodNumber;
|
|
214
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
215
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
},
|
|
218
|
+
z.core.$strip
|
|
219
|
+
>;
|
|
220
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
221
|
+
},
|
|
222
|
+
z.core.$strip
|
|
223
|
+
>
|
|
224
|
+
>;
|
|
225
|
+
metrics: z.ZodObject<
|
|
226
|
+
{
|
|
203
227
|
tokenCost: z.ZodOptional<z.ZodNumber>;
|
|
204
228
|
complexityScore: z.ZodOptional<z.ZodNumber>;
|
|
205
229
|
consistencyScore: z.ZodOptional<z.ZodNumber>;
|
|
@@ -215,176 +239,281 @@ declare const AnalysisResultSchema: z.ZodObject<{
|
|
|
215
239
|
comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
|
|
216
240
|
totalSymbols: z.ZodOptional<z.ZodNumber>;
|
|
217
241
|
totalExports: z.ZodOptional<z.ZodNumber>;
|
|
218
|
-
|
|
219
|
-
|
|
242
|
+
},
|
|
243
|
+
z.core.$strip
|
|
244
|
+
>;
|
|
245
|
+
},
|
|
246
|
+
z.core.$strip
|
|
247
|
+
>;
|
|
220
248
|
type AnalysisResult = z.infer<typeof AnalysisResultSchema>;
|
|
221
249
|
/**
|
|
222
250
|
* Standard spoke tool summary schema.
|
|
223
251
|
*/
|
|
224
|
-
declare const SpokeSummarySchema: z.ZodObject<
|
|
252
|
+
declare const SpokeSummarySchema: z.ZodObject<
|
|
253
|
+
{
|
|
225
254
|
totalFiles: z.ZodOptional<z.ZodNumber>;
|
|
226
255
|
totalIssues: z.ZodOptional<z.ZodNumber>;
|
|
227
256
|
criticalIssues: z.ZodOptional<z.ZodNumber>;
|
|
228
257
|
majorIssues: z.ZodOptional<z.ZodNumber>;
|
|
229
258
|
score: z.ZodOptional<z.ZodNumber>;
|
|
230
|
-
},
|
|
259
|
+
},
|
|
260
|
+
z.core.$catchall<z.ZodAny>
|
|
261
|
+
>;
|
|
231
262
|
type SpokeSummary = z.infer<typeof SpokeSummarySchema>;
|
|
232
263
|
/**
|
|
233
264
|
* Standard spoke tool output contract.
|
|
234
265
|
*/
|
|
235
|
-
declare const SpokeOutputSchema: z.ZodObject<
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
266
|
+
declare const SpokeOutputSchema: z.ZodObject<
|
|
267
|
+
{
|
|
268
|
+
results: z.ZodArray<
|
|
269
|
+
z.ZodObject<
|
|
270
|
+
{
|
|
271
|
+
fileName: z.ZodString;
|
|
272
|
+
issues: z.ZodArray<
|
|
273
|
+
z.ZodObject<
|
|
274
|
+
{
|
|
275
|
+
type: z.ZodEnum<typeof IssueType>;
|
|
276
|
+
severity: z.ZodEnum<typeof Severity>;
|
|
277
|
+
message: z.ZodString;
|
|
278
|
+
location: z.ZodObject<
|
|
279
|
+
{
|
|
280
|
+
file: z.ZodString;
|
|
281
|
+
line: z.ZodNumber;
|
|
282
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
283
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
284
|
+
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
285
|
+
},
|
|
286
|
+
z.core.$strip
|
|
287
|
+
>;
|
|
288
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
289
|
+
},
|
|
290
|
+
z.core.$strip
|
|
291
|
+
>
|
|
292
|
+
>;
|
|
293
|
+
metrics: z.ZodObject<
|
|
294
|
+
{
|
|
295
|
+
tokenCost: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
complexityScore: z.ZodOptional<z.ZodNumber>;
|
|
297
|
+
consistencyScore: z.ZodOptional<z.ZodNumber>;
|
|
298
|
+
docFreshnessScore: z.ZodOptional<z.ZodNumber>;
|
|
299
|
+
aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
|
|
300
|
+
agentGroundingScore: z.ZodOptional<z.ZodNumber>;
|
|
301
|
+
testabilityScore: z.ZodOptional<z.ZodNumber>;
|
|
302
|
+
docDriftScore: z.ZodOptional<z.ZodNumber>;
|
|
303
|
+
dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
|
|
304
|
+
modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
|
|
305
|
+
estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
|
|
306
|
+
estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
|
|
307
|
+
comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
|
|
308
|
+
totalSymbols: z.ZodOptional<z.ZodNumber>;
|
|
309
|
+
totalExports: z.ZodOptional<z.ZodNumber>;
|
|
310
|
+
},
|
|
311
|
+
z.core.$strip
|
|
312
|
+
>;
|
|
313
|
+
},
|
|
314
|
+
z.core.$strip
|
|
315
|
+
>
|
|
316
|
+
>;
|
|
317
|
+
summary: z.ZodObject<
|
|
318
|
+
{
|
|
270
319
|
totalFiles: z.ZodOptional<z.ZodNumber>;
|
|
271
320
|
totalIssues: z.ZodOptional<z.ZodNumber>;
|
|
272
321
|
criticalIssues: z.ZodOptional<z.ZodNumber>;
|
|
273
322
|
majorIssues: z.ZodOptional<z.ZodNumber>;
|
|
274
323
|
score: z.ZodOptional<z.ZodNumber>;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
324
|
+
},
|
|
325
|
+
z.core.$catchall<z.ZodAny>
|
|
326
|
+
>;
|
|
327
|
+
metadata: z.ZodOptional<
|
|
328
|
+
z.ZodObject<
|
|
329
|
+
{
|
|
330
|
+
toolName: z.ZodString;
|
|
331
|
+
version: z.ZodOptional<z.ZodString>;
|
|
332
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
333
|
+
config: z.ZodOptional<z.ZodAny>;
|
|
334
|
+
},
|
|
335
|
+
z.core.$catchall<z.ZodAny>
|
|
336
|
+
>
|
|
337
|
+
>;
|
|
338
|
+
},
|
|
339
|
+
z.core.$strip
|
|
340
|
+
>;
|
|
283
341
|
type SpokeOutput = z.infer<typeof SpokeOutputSchema>;
|
|
284
342
|
/**
|
|
285
343
|
* Master Unified Report contract (CLI -> Platform).
|
|
286
344
|
*/
|
|
287
|
-
declare const UnifiedReportSchema: z.ZodObject<
|
|
288
|
-
|
|
345
|
+
declare const UnifiedReportSchema: z.ZodObject<
|
|
346
|
+
{
|
|
347
|
+
summary: z.ZodObject<
|
|
348
|
+
{
|
|
289
349
|
totalFiles: z.ZodNumber;
|
|
290
350
|
totalIssues: z.ZodNumber;
|
|
291
351
|
criticalIssues: z.ZodNumber;
|
|
292
352
|
majorIssues: z.ZodNumber;
|
|
293
|
-
businessImpact: z.ZodOptional<
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
353
|
+
businessImpact: z.ZodOptional<
|
|
354
|
+
z.ZodObject<
|
|
355
|
+
{
|
|
356
|
+
estimatedMonthlyWaste: z.ZodOptional<z.ZodNumber>;
|
|
357
|
+
potentialSavings: z.ZodOptional<z.ZodNumber>;
|
|
358
|
+
productivityHours: z.ZodOptional<z.ZodNumber>;
|
|
359
|
+
},
|
|
360
|
+
z.core.$strip
|
|
361
|
+
>
|
|
362
|
+
>;
|
|
363
|
+
},
|
|
364
|
+
z.core.$strip
|
|
365
|
+
>;
|
|
366
|
+
results: z.ZodArray<
|
|
367
|
+
z.ZodObject<
|
|
368
|
+
{
|
|
369
|
+
fileName: z.ZodString;
|
|
370
|
+
issues: z.ZodArray<
|
|
371
|
+
z.ZodObject<
|
|
372
|
+
{
|
|
373
|
+
type: z.ZodEnum<typeof IssueType>;
|
|
374
|
+
severity: z.ZodEnum<typeof Severity>;
|
|
375
|
+
message: z.ZodString;
|
|
376
|
+
location: z.ZodObject<
|
|
377
|
+
{
|
|
378
|
+
file: z.ZodString;
|
|
379
|
+
line: z.ZodNumber;
|
|
380
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
381
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
382
|
+
endColumn: z.ZodOptional<z.ZodNumber>;
|
|
383
|
+
},
|
|
384
|
+
z.core.$strip
|
|
385
|
+
>;
|
|
386
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
387
|
+
},
|
|
388
|
+
z.core.$strip
|
|
389
|
+
>
|
|
390
|
+
>;
|
|
391
|
+
metrics: z.ZodObject<
|
|
392
|
+
{
|
|
393
|
+
tokenCost: z.ZodOptional<z.ZodNumber>;
|
|
394
|
+
complexityScore: z.ZodOptional<z.ZodNumber>;
|
|
395
|
+
consistencyScore: z.ZodOptional<z.ZodNumber>;
|
|
396
|
+
docFreshnessScore: z.ZodOptional<z.ZodNumber>;
|
|
397
|
+
aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
|
|
398
|
+
agentGroundingScore: z.ZodOptional<z.ZodNumber>;
|
|
399
|
+
testabilityScore: z.ZodOptional<z.ZodNumber>;
|
|
400
|
+
docDriftScore: z.ZodOptional<z.ZodNumber>;
|
|
401
|
+
dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
|
|
402
|
+
modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
|
|
403
|
+
estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
|
|
404
|
+
estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
|
|
405
|
+
comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
|
|
406
|
+
totalSymbols: z.ZodOptional<z.ZodNumber>;
|
|
407
|
+
totalExports: z.ZodOptional<z.ZodNumber>;
|
|
408
|
+
},
|
|
409
|
+
z.core.$strip
|
|
410
|
+
>;
|
|
411
|
+
},
|
|
412
|
+
z.core.$strip
|
|
413
|
+
>
|
|
414
|
+
>;
|
|
415
|
+
scoring: z.ZodOptional<
|
|
416
|
+
z.ZodObject<
|
|
417
|
+
{
|
|
418
|
+
overall: z.ZodNumber;
|
|
419
|
+
rating: z.ZodString;
|
|
420
|
+
timestamp: z.ZodString;
|
|
421
|
+
breakdown: z.ZodArray<
|
|
422
|
+
z.ZodObject<
|
|
423
|
+
{
|
|
424
|
+
toolName: z.ZodUnion<
|
|
425
|
+
readonly [z.ZodEnum<typeof ToolName>, z.ZodString]
|
|
426
|
+
>;
|
|
427
|
+
score: z.ZodNumber;
|
|
428
|
+
},
|
|
429
|
+
z.core.$catchall<z.ZodAny>
|
|
430
|
+
>
|
|
431
|
+
>;
|
|
432
|
+
},
|
|
433
|
+
z.core.$strip
|
|
434
|
+
>
|
|
435
|
+
>;
|
|
436
|
+
},
|
|
437
|
+
z.core.$catchall<z.ZodAny>
|
|
438
|
+
>;
|
|
342
439
|
type UnifiedReport = z.infer<typeof UnifiedReportSchema>;
|
|
343
440
|
|
|
344
441
|
/**
|
|
345
442
|
* Global AIReady Configuration Schema.
|
|
346
443
|
* Strict definition for aiready.json and related config files.
|
|
347
444
|
*/
|
|
348
|
-
declare const AIReadyConfigSchema: z.ZodObject<
|
|
445
|
+
declare const AIReadyConfigSchema: z.ZodObject<
|
|
446
|
+
{
|
|
349
447
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
350
448
|
threshold: z.ZodOptional<z.ZodNumber>;
|
|
351
|
-
failOn: z.ZodOptional<
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
449
|
+
failOn: z.ZodOptional<
|
|
450
|
+
z.ZodEnum<{
|
|
451
|
+
critical: 'critical';
|
|
452
|
+
major: 'major';
|
|
453
|
+
any: 'any';
|
|
454
|
+
none: 'none';
|
|
455
|
+
}>
|
|
456
|
+
>;
|
|
457
|
+
scan: z.ZodOptional<
|
|
458
|
+
z.ZodObject<
|
|
459
|
+
{
|
|
460
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
461
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
462
|
+
parallel: z.ZodOptional<z.ZodBoolean>;
|
|
463
|
+
deep: z.ZodOptional<z.ZodBoolean>;
|
|
464
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
465
|
+
},
|
|
466
|
+
z.core.$strip
|
|
467
|
+
>
|
|
468
|
+
>;
|
|
469
|
+
output: z.ZodOptional<
|
|
470
|
+
z.ZodObject<
|
|
471
|
+
{
|
|
472
|
+
format: z.ZodOptional<
|
|
473
|
+
z.ZodEnum<{
|
|
474
|
+
json: 'json';
|
|
475
|
+
html: 'html';
|
|
476
|
+
console: 'console';
|
|
477
|
+
}>
|
|
478
|
+
>;
|
|
479
|
+
path: z.ZodOptional<z.ZodString>;
|
|
480
|
+
saveTo: z.ZodOptional<z.ZodString>;
|
|
481
|
+
showBreakdown: z.ZodOptional<z.ZodBoolean>;
|
|
482
|
+
compareBaseline: z.ZodOptional<z.ZodString>;
|
|
483
|
+
},
|
|
484
|
+
z.core.$strip
|
|
485
|
+
>
|
|
486
|
+
>;
|
|
375
487
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
376
|
-
scoring: z.ZodOptional<
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
488
|
+
scoring: z.ZodOptional<
|
|
489
|
+
z.ZodObject<
|
|
490
|
+
{
|
|
491
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
492
|
+
weights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
493
|
+
},
|
|
494
|
+
z.core.$strip
|
|
495
|
+
>
|
|
496
|
+
>;
|
|
497
|
+
visualizer: z.ZodOptional<
|
|
498
|
+
z.ZodObject<
|
|
499
|
+
{
|
|
500
|
+
groupingDirs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
501
|
+
graph: z.ZodOptional<
|
|
502
|
+
z.ZodObject<
|
|
503
|
+
{
|
|
504
|
+
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
505
|
+
maxEdges: z.ZodOptional<z.ZodNumber>;
|
|
506
|
+
},
|
|
507
|
+
z.core.$strip
|
|
508
|
+
>
|
|
509
|
+
>;
|
|
510
|
+
},
|
|
511
|
+
z.core.$strip
|
|
512
|
+
>
|
|
513
|
+
>;
|
|
514
|
+
},
|
|
515
|
+
z.core.$catchall<z.ZodAny>
|
|
516
|
+
>;
|
|
388
517
|
|
|
389
518
|
/**
|
|
390
519
|
* Shared types for graph-based visualizations
|
|
@@ -394,102 +523,103 @@ declare const AIReadyConfigSchema: z.ZodObject<{
|
|
|
394
523
|
* Base graph node compatible with d3-force simulation
|
|
395
524
|
*/
|
|
396
525
|
interface BaseGraphNode {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
526
|
+
id: string;
|
|
527
|
+
x?: number;
|
|
528
|
+
y?: number;
|
|
529
|
+
vx?: number;
|
|
530
|
+
vy?: number;
|
|
531
|
+
fx?: number | null;
|
|
532
|
+
fy?: number | null;
|
|
404
533
|
}
|
|
405
534
|
/**
|
|
406
535
|
* Base graph link compatible with d3-force simulation
|
|
407
536
|
*/
|
|
408
537
|
interface BaseGraphLink {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
538
|
+
source: string | BaseGraphNode;
|
|
539
|
+
target: string | BaseGraphNode;
|
|
540
|
+
index?: number;
|
|
412
541
|
}
|
|
413
542
|
/**
|
|
414
543
|
* Full graph node with all metadata
|
|
415
544
|
*/
|
|
416
545
|
interface GraphNode extends BaseGraphNode {
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
546
|
+
label: string;
|
|
547
|
+
path?: string;
|
|
548
|
+
size?: number;
|
|
549
|
+
value?: number;
|
|
550
|
+
color?: string;
|
|
551
|
+
group?: string;
|
|
552
|
+
title?: string;
|
|
553
|
+
duplicates?: number;
|
|
554
|
+
tokenCost?: number;
|
|
555
|
+
severity?: string;
|
|
427
556
|
}
|
|
428
557
|
interface GraphEdge {
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
558
|
+
source: string;
|
|
559
|
+
target: string;
|
|
560
|
+
type?: string;
|
|
561
|
+
weight?: number;
|
|
433
562
|
}
|
|
434
563
|
interface GraphData {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
564
|
+
nodes: GraphNode[];
|
|
565
|
+
edges: GraphEdge[];
|
|
566
|
+
clusters?: {
|
|
567
|
+
id: string;
|
|
568
|
+
name: string;
|
|
569
|
+
nodeIds: string[];
|
|
570
|
+
}[];
|
|
571
|
+
issues?: IssueOverlay[];
|
|
572
|
+
metadata?: GraphMetadata$1;
|
|
573
|
+
/** Whether the graph was truncated due to size limits */
|
|
574
|
+
truncated?: {
|
|
575
|
+
nodes: boolean;
|
|
576
|
+
edges: boolean;
|
|
577
|
+
nodeCount?: number;
|
|
578
|
+
edgeCount?: number;
|
|
579
|
+
nodeLimit?: number;
|
|
580
|
+
edgeLimit?: number;
|
|
581
|
+
};
|
|
453
582
|
}
|
|
454
583
|
/**
|
|
455
584
|
* Metadata about the graph
|
|
456
585
|
*/
|
|
457
586
|
interface GraphMetadata$1 {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
587
|
+
projectName?: string;
|
|
588
|
+
timestamp?: string;
|
|
589
|
+
totalFiles?: number;
|
|
590
|
+
totalDependencies?: number;
|
|
591
|
+
analysisTypes?: string[];
|
|
592
|
+
totalLinesOfCode?: number;
|
|
593
|
+
totalTokenCost?: number;
|
|
594
|
+
averageComplexity?: number;
|
|
595
|
+
criticalIssues?: number;
|
|
596
|
+
majorIssues?: number;
|
|
597
|
+
minorIssues?: number;
|
|
598
|
+
infoIssues?: number;
|
|
599
|
+
estimatedMonthlyCost?: number;
|
|
600
|
+
estimatedDeveloperHours?: number;
|
|
601
|
+
aiAcceptanceRate?: number;
|
|
602
|
+
aiReadinessScore?: number;
|
|
603
|
+
/** AI token budget unit economics (v0.13+) */
|
|
604
|
+
tokenBudget?: any;
|
|
476
605
|
}
|
|
477
606
|
|
|
478
607
|
/**
|
|
479
608
|
* Lead Source identifiers.
|
|
480
609
|
*/
|
|
481
610
|
declare enum LeadSource {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
611
|
+
ClawMoreHero = 'clawmore-hero',
|
|
612
|
+
ClawMoreWaitlist = 'clawmore-waitlist',
|
|
613
|
+
ClawMoreBeta = 'clawmore-beta',
|
|
614
|
+
AiReadyPlatform = 'aiready-platform',
|
|
486
615
|
}
|
|
487
616
|
/** Zod schema for LeadSource enum */
|
|
488
617
|
declare const LeadSourceSchema: z.ZodEnum<typeof LeadSource>;
|
|
489
618
|
/**
|
|
490
619
|
* Business Lead schema for waitlists and beta signups.
|
|
491
620
|
*/
|
|
492
|
-
declare const LeadSchema: z.ZodObject<
|
|
621
|
+
declare const LeadSchema: z.ZodObject<
|
|
622
|
+
{
|
|
493
623
|
id: z.ZodString;
|
|
494
624
|
email: z.ZodString;
|
|
495
625
|
name: z.ZodString;
|
|
@@ -497,118 +627,146 @@ declare const LeadSchema: z.ZodObject<{
|
|
|
497
627
|
notes: z.ZodOptional<z.ZodString>;
|
|
498
628
|
timestamp: z.ZodString;
|
|
499
629
|
source: z.ZodEnum<typeof LeadSource>;
|
|
500
|
-
status: z.ZodDefault<
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
}
|
|
630
|
+
status: z.ZodDefault<
|
|
631
|
+
z.ZodEnum<{
|
|
632
|
+
new: 'new';
|
|
633
|
+
contacted: 'contacted';
|
|
634
|
+
qualified: 'qualified';
|
|
635
|
+
converted: 'converted';
|
|
636
|
+
archived: 'archived';
|
|
637
|
+
}>
|
|
638
|
+
>;
|
|
639
|
+
},
|
|
640
|
+
z.core.$strip
|
|
641
|
+
>;
|
|
508
642
|
type Lead = z.infer<typeof LeadSchema>;
|
|
509
643
|
/**
|
|
510
644
|
* Lead Submission (input from form)
|
|
511
645
|
*/
|
|
512
|
-
declare const LeadSubmissionSchema: z.ZodObject<
|
|
646
|
+
declare const LeadSubmissionSchema: z.ZodObject<
|
|
647
|
+
{
|
|
513
648
|
source: z.ZodEnum<typeof LeadSource>;
|
|
514
649
|
email: z.ZodString;
|
|
515
650
|
name: z.ZodString;
|
|
516
651
|
interest: z.ZodDefault<z.ZodString>;
|
|
517
652
|
notes: z.ZodOptional<z.ZodString>;
|
|
518
|
-
},
|
|
653
|
+
},
|
|
654
|
+
z.core.$strip
|
|
655
|
+
>;
|
|
519
656
|
type LeadSubmission = z.infer<typeof LeadSubmissionSchema>;
|
|
520
657
|
/**
|
|
521
658
|
* Managed AWS Account metadata for the Account Vending Machine.
|
|
522
659
|
*/
|
|
523
|
-
declare const ManagedAccountSchema: z.ZodObject<
|
|
660
|
+
declare const ManagedAccountSchema: z.ZodObject<
|
|
661
|
+
{
|
|
524
662
|
id: z.ZodString;
|
|
525
663
|
accountId: z.ZodString;
|
|
526
664
|
userId: z.ZodString;
|
|
527
665
|
stripeSubscriptionId: z.ZodString;
|
|
528
|
-
tokenStrategy: z.ZodDefault<
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
666
|
+
tokenStrategy: z.ZodDefault<
|
|
667
|
+
z.ZodEnum<{
|
|
668
|
+
managed: 'managed';
|
|
669
|
+
byok: 'byok';
|
|
670
|
+
}>
|
|
671
|
+
>;
|
|
672
|
+
byokConfig: z.ZodOptional<
|
|
673
|
+
z.ZodObject<
|
|
674
|
+
{
|
|
675
|
+
openaiKey: z.ZodOptional<z.ZodString>;
|
|
676
|
+
anthropicKey: z.ZodOptional<z.ZodString>;
|
|
677
|
+
openrouterKey: z.ZodOptional<z.ZodString>;
|
|
678
|
+
},
|
|
679
|
+
z.core.$strip
|
|
680
|
+
>
|
|
681
|
+
>;
|
|
537
682
|
baseFeeCents: z.ZodDefault<z.ZodNumber>;
|
|
538
683
|
includedComputeCents: z.ZodDefault<z.ZodNumber>;
|
|
539
684
|
includedTokenCents: z.ZodDefault<z.ZodNumber>;
|
|
540
685
|
prepaidTokenBalanceCents: z.ZodDefault<z.ZodNumber>;
|
|
541
686
|
currentMonthlyTokenSpendCents: z.ZodDefault<z.ZodNumber>;
|
|
542
|
-
status: z.ZodDefault<
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
687
|
+
status: z.ZodDefault<
|
|
688
|
+
z.ZodEnum<{
|
|
689
|
+
warning: 'warning';
|
|
690
|
+
provisioning: 'provisioning';
|
|
691
|
+
active: 'active';
|
|
692
|
+
quarantined: 'quarantined';
|
|
693
|
+
suspended: 'suspended';
|
|
694
|
+
}>
|
|
695
|
+
>;
|
|
549
696
|
lastCostSyncAt: z.ZodOptional<z.ZodString>;
|
|
550
697
|
region: z.ZodDefault<z.ZodString>;
|
|
551
698
|
alertThresholds: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
552
|
-
},
|
|
699
|
+
},
|
|
700
|
+
z.core.$strip
|
|
701
|
+
>;
|
|
553
702
|
type ManagedAccount = z.infer<typeof ManagedAccountSchema>;
|
|
554
703
|
|
|
555
704
|
/**
|
|
556
705
|
* Location information in source code
|
|
557
706
|
*/
|
|
558
707
|
interface SourceLocation {
|
|
559
|
-
|
|
560
|
-
|
|
708
|
+
line: number;
|
|
709
|
+
column: number;
|
|
561
710
|
}
|
|
562
711
|
/**
|
|
563
712
|
* Range information in source code
|
|
564
713
|
*/
|
|
565
714
|
interface SourceRange {
|
|
566
|
-
|
|
567
|
-
|
|
715
|
+
start: SourceLocation;
|
|
716
|
+
end: SourceLocation;
|
|
568
717
|
}
|
|
569
|
-
type ExportType =
|
|
718
|
+
type ExportType =
|
|
719
|
+
| 'function'
|
|
720
|
+
| 'class'
|
|
721
|
+
| 'interface'
|
|
722
|
+
| 'type'
|
|
723
|
+
| 'const'
|
|
724
|
+
| 'var'
|
|
725
|
+
| 'enum'
|
|
726
|
+
| 'module'
|
|
727
|
+
| 'unknown';
|
|
570
728
|
interface ExportWithImports {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
729
|
+
name: string;
|
|
730
|
+
type: ExportType;
|
|
731
|
+
source?: string;
|
|
732
|
+
imports: string[];
|
|
733
|
+
dependencies: string[];
|
|
734
|
+
typeReferences: string[];
|
|
735
|
+
loc?: SourceRange;
|
|
578
736
|
}
|
|
579
737
|
/**
|
|
580
738
|
* Information about a single import declaration
|
|
581
739
|
*/
|
|
582
740
|
interface FileImport {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
741
|
+
/** Module being imported from */
|
|
742
|
+
source: string;
|
|
743
|
+
/** What's being imported */
|
|
744
|
+
specifiers: string[];
|
|
745
|
+
/** Is this a type-only import (TypeScript) */
|
|
746
|
+
isTypeOnly?: boolean;
|
|
747
|
+
/** Location in source */
|
|
748
|
+
loc?: SourceRange;
|
|
591
749
|
}
|
|
592
750
|
interface ASTNode {
|
|
593
|
-
|
|
594
|
-
|
|
751
|
+
type: string;
|
|
752
|
+
loc?: SourceRange;
|
|
595
753
|
}
|
|
596
754
|
/**
|
|
597
755
|
* AI token budget unit economics (v0.13+)
|
|
598
756
|
*/
|
|
599
757
|
interface TokenBudget {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
};
|
|
758
|
+
totalContextTokens: number;
|
|
759
|
+
estimatedResponseTokens?: number;
|
|
760
|
+
wastedTokens: {
|
|
761
|
+
total: number;
|
|
762
|
+
bySource: {
|
|
763
|
+
duplication: number;
|
|
764
|
+
fragmentation: number;
|
|
765
|
+
chattiness: number;
|
|
609
766
|
};
|
|
610
|
-
|
|
611
|
-
|
|
767
|
+
};
|
|
768
|
+
efficiencyRatio: number;
|
|
769
|
+
potentialRetrievableTokens: number;
|
|
612
770
|
}
|
|
613
771
|
|
|
614
772
|
/**
|
|
@@ -623,119 +781,122 @@ type Config = AIReadyConfig;
|
|
|
623
781
|
* Result of a single tool execution
|
|
624
782
|
*/
|
|
625
783
|
interface ToolOutput {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
784
|
+
/** Unique name/ID of the tool */
|
|
785
|
+
toolName: ToolName | string;
|
|
786
|
+
/** Whether the tool ran successfully */
|
|
787
|
+
success: boolean;
|
|
788
|
+
/** List of issues found by the tool */
|
|
789
|
+
issues: IssueType[] | any[];
|
|
790
|
+
/** Numeric metrics produced by the tool */
|
|
791
|
+
metrics: Metrics;
|
|
792
|
+
/** Execution duration in milliseconds */
|
|
793
|
+
duration?: number;
|
|
636
794
|
}
|
|
637
795
|
/**
|
|
638
796
|
* Overall scan result
|
|
639
797
|
*/
|
|
640
798
|
interface ScanResult {
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
799
|
+
/** ISO timestamp of the scan */
|
|
800
|
+
timestamp: string;
|
|
801
|
+
/** Root directory analyzed */
|
|
802
|
+
rootDir: string;
|
|
803
|
+
/** Number of files processed */
|
|
804
|
+
filesAnalyzed: number;
|
|
805
|
+
/** Total issues found across all tools */
|
|
806
|
+
totalIssues: number;
|
|
807
|
+
/** Breakdown of issue counts by type */
|
|
808
|
+
issuesByType: Record<string, number>;
|
|
809
|
+
/** Breakdown of issue counts by severity */
|
|
810
|
+
issuesBySeverity: Record<Severity | string, number>;
|
|
811
|
+
/** Final calculated AIReady score (0-100) */
|
|
812
|
+
score: number;
|
|
813
|
+
/** Individual tool outputs */
|
|
814
|
+
tools: ToolOutput[];
|
|
657
815
|
}
|
|
658
816
|
/**
|
|
659
817
|
* Cost configuration for business impact analysis
|
|
660
818
|
*/
|
|
661
819
|
interface CostConfig {
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
820
|
+
/** Price in USD per 1,000 tokens */
|
|
821
|
+
pricePer1KTokens: number;
|
|
822
|
+
/** Average number of AI queries per developer per day */
|
|
823
|
+
queriesPerDevPerDay: number;
|
|
824
|
+
/** Total number of developers in the team */
|
|
825
|
+
developerCount: number;
|
|
826
|
+
/** Working days per month */
|
|
827
|
+
daysPerMonth: number;
|
|
670
828
|
}
|
|
671
829
|
/**
|
|
672
830
|
* Productivity impact metrics
|
|
673
831
|
*/
|
|
674
832
|
interface ProductivityImpact {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
833
|
+
/** Estimated developer hours wasted on quality issues */
|
|
834
|
+
totalHours: number;
|
|
835
|
+
/** Developer hourly rate used for calculation */
|
|
836
|
+
hourlyRate: number;
|
|
837
|
+
/** Estimated total monthly cost of productivity loss */
|
|
838
|
+
totalCost: number;
|
|
839
|
+
/** Impact breakdown by severity */
|
|
840
|
+
bySeverity: Record<
|
|
841
|
+
Severity | string,
|
|
842
|
+
{
|
|
843
|
+
/** Hours lost for this severity level */
|
|
844
|
+
hours: number;
|
|
845
|
+
/** Cost associated with these hours */
|
|
846
|
+
cost: number;
|
|
847
|
+
}
|
|
848
|
+
>;
|
|
688
849
|
}
|
|
689
850
|
/**
|
|
690
851
|
* AI suggestion acceptance prediction
|
|
691
852
|
*/
|
|
692
853
|
interface AcceptancePrediction {
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
854
|
+
/** Predicted acceptance rate (0-1) */
|
|
855
|
+
rate: number;
|
|
856
|
+
/** Confidence level of the prediction (0-1) */
|
|
857
|
+
confidence: number;
|
|
858
|
+
/** Qualitative factors influencing the prediction */
|
|
859
|
+
factors: Array<{
|
|
860
|
+
/** Factor name */
|
|
861
|
+
name: string;
|
|
862
|
+
/** Impact weight (-100 to 100) */
|
|
863
|
+
impact: number;
|
|
864
|
+
}>;
|
|
704
865
|
}
|
|
705
866
|
/**
|
|
706
867
|
* Technical Value Chain summary
|
|
707
868
|
*/
|
|
708
869
|
interface TechnicalValueChain {
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
870
|
+
/** Overall business value score for the component */
|
|
871
|
+
score?: number;
|
|
872
|
+
/** Business logic density (e.g. core vs boilerplate) */
|
|
873
|
+
density?: number;
|
|
874
|
+
/** Data access layer complexity */
|
|
875
|
+
complexity?: number;
|
|
876
|
+
/** API surface area and exposure */
|
|
877
|
+
surface?: number;
|
|
878
|
+
/** Issue type associated with this chain */
|
|
879
|
+
issueType?: string;
|
|
880
|
+
/** Name of the leading technical metric */
|
|
881
|
+
technicalMetric?: string;
|
|
882
|
+
/** Raw value of the technical metric */
|
|
883
|
+
technicalValue?: number;
|
|
884
|
+
/** Impact on AI agents */
|
|
885
|
+
aiImpact?: {
|
|
886
|
+
description: string;
|
|
887
|
+
scoreImpact: number;
|
|
888
|
+
};
|
|
889
|
+
/** Impact on developer experience */
|
|
890
|
+
developerImpact?: {
|
|
891
|
+
description: string;
|
|
892
|
+
productivityLoss: number;
|
|
893
|
+
};
|
|
894
|
+
/** Predicted business outcome */
|
|
895
|
+
businessOutcome?: {
|
|
896
|
+
directCost: number;
|
|
897
|
+
opportunityCost: number;
|
|
898
|
+
riskLevel: 'low' | 'moderate' | 'high' | 'critical';
|
|
899
|
+
};
|
|
739
900
|
}
|
|
740
901
|
/**
|
|
741
902
|
* Compatibility alias
|
|
@@ -745,41 +906,41 @@ type TechnicalValueChainSummary = TechnicalValueChain;
|
|
|
745
906
|
* Code comprehension difficulty metrics
|
|
746
907
|
*/
|
|
747
908
|
interface ComprehensionDifficulty {
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
909
|
+
/** Overall difficulty score (0-100) */
|
|
910
|
+
score: number;
|
|
911
|
+
/** Descriptive rating of difficulty */
|
|
912
|
+
rating: 'trivial' | 'easy' | 'moderate' | 'difficult' | 'expert';
|
|
913
|
+
/** Ratios and factors contributing to difficulty */
|
|
914
|
+
factors: {
|
|
915
|
+
/** Ratio of file tokens to model context limit */
|
|
916
|
+
budgetRatio: number;
|
|
917
|
+
/** Relative depth of dependency tree */
|
|
918
|
+
depthRatio: number;
|
|
919
|
+
/** Level of logical fragmentation */
|
|
920
|
+
fragmentation: number;
|
|
921
|
+
};
|
|
761
922
|
}
|
|
762
923
|
/**
|
|
763
924
|
* Business impact metrics (v0.10+)
|
|
764
925
|
*/
|
|
765
926
|
interface BusinessMetrics {
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
927
|
+
/** Predicted monthly cost of technical waste */
|
|
928
|
+
estimatedMonthlyCost?: number;
|
|
929
|
+
/** Estimated developer hours lost per month */
|
|
930
|
+
estimatedDeveloperHours?: number;
|
|
931
|
+
/** Predicted rate of AI suggestion acceptance */
|
|
932
|
+
aiAcceptanceRate?: number;
|
|
933
|
+
/** Overall AI readiness score */
|
|
934
|
+
aiReadinessScore?: number;
|
|
774
935
|
}
|
|
775
936
|
/**
|
|
776
937
|
* Canonical file content structure
|
|
777
938
|
*/
|
|
778
939
|
interface FileContent {
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
940
|
+
/** Absolute or relative file path */
|
|
941
|
+
file: string;
|
|
942
|
+
/** UTF-8 file content */
|
|
943
|
+
content: string;
|
|
783
944
|
}
|
|
784
945
|
/**
|
|
785
946
|
* Constants for tests and configuration stability
|
|
@@ -796,28 +957,28 @@ type GraphIssueSeverity = Severity;
|
|
|
796
957
|
* Graph metadata
|
|
797
958
|
*/
|
|
798
959
|
interface GraphMetadata {
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
960
|
+
/** Project name if available */
|
|
961
|
+
projectName?: string;
|
|
962
|
+
/** ISO timestamp of analysis */
|
|
963
|
+
timestamp: string;
|
|
964
|
+
/** Total number of files in the graph */
|
|
965
|
+
totalFiles: number;
|
|
966
|
+
/** Total dependency edges in the graph */
|
|
967
|
+
totalDependencies: number;
|
|
968
|
+
/** Types of analysis performed */
|
|
969
|
+
analysisTypes: string[];
|
|
970
|
+
/** Count of critical issues in graph nodes */
|
|
971
|
+
criticalIssues: number;
|
|
972
|
+
/** Count of major issues in graph nodes */
|
|
973
|
+
majorIssues: number;
|
|
974
|
+
/** Count of minor issues in graph nodes */
|
|
975
|
+
minorIssues: number;
|
|
976
|
+
/** Count of informational issues in graph nodes */
|
|
977
|
+
infoIssues: number;
|
|
978
|
+
/** AI token budget unit economics (v0.13+) */
|
|
979
|
+
tokenBudget?: TokenBudget;
|
|
980
|
+
/** Execution time in milliseconds */
|
|
981
|
+
executionTime?: number;
|
|
821
982
|
}
|
|
822
983
|
|
|
823
984
|
/**
|
|
@@ -831,13 +992,13 @@ interface GraphMetadata {
|
|
|
831
992
|
* Supported programming languages
|
|
832
993
|
*/
|
|
833
994
|
declare enum Language {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
995
|
+
TypeScript = 'typescript',
|
|
996
|
+
JavaScript = 'javascript',
|
|
997
|
+
Python = 'python',
|
|
998
|
+
Java = 'java',
|
|
999
|
+
Go = 'go',
|
|
1000
|
+
Rust = 'rust',
|
|
1001
|
+
CSharp = 'csharp',
|
|
841
1002
|
}
|
|
842
1003
|
/**
|
|
843
1004
|
* File extensions mapped to languages
|
|
@@ -847,154 +1008,166 @@ declare const LANGUAGE_EXTENSIONS: Record<string, Language>;
|
|
|
847
1008
|
* Common AST node type (language-agnostic)
|
|
848
1009
|
*/
|
|
849
1010
|
interface CommonASTNode {
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
1011
|
+
type: string;
|
|
1012
|
+
loc?: SourceRange;
|
|
1013
|
+
raw?: unknown;
|
|
853
1014
|
}
|
|
854
1015
|
/**
|
|
855
1016
|
* Export information (function, class, variable, etc.)
|
|
856
1017
|
*/
|
|
857
1018
|
interface ExportInfo {
|
|
858
|
-
|
|
859
|
-
|
|
1019
|
+
name: string;
|
|
1020
|
+
type:
|
|
1021
|
+
| 'function'
|
|
1022
|
+
| 'class'
|
|
1023
|
+
| 'const'
|
|
1024
|
+
| 'type'
|
|
1025
|
+
| 'interface'
|
|
1026
|
+
| 'default'
|
|
1027
|
+
| 'variable'
|
|
1028
|
+
| 'all';
|
|
1029
|
+
loc?: SourceRange;
|
|
1030
|
+
/** Imports used within this export */
|
|
1031
|
+
imports?: string[];
|
|
1032
|
+
/** Dependencies on other exports in same file */
|
|
1033
|
+
dependencies?: string[];
|
|
1034
|
+
/** TypeScript types referenced */
|
|
1035
|
+
typeReferences?: string[];
|
|
1036
|
+
/** For methods: parent class name */
|
|
1037
|
+
parentClass?: string;
|
|
1038
|
+
/** For functions/methods: parameters */
|
|
1039
|
+
parameters?: string[];
|
|
1040
|
+
/** For classes/interfaces: number of methods and properties */
|
|
1041
|
+
methodCount?: number;
|
|
1042
|
+
propertyCount?: number;
|
|
1043
|
+
/** Visibility (public, private, protected) */
|
|
1044
|
+
visibility?: 'public' | 'private' | 'protected';
|
|
1045
|
+
/** Whether the value is a primitive (string, number, boolean) */
|
|
1046
|
+
isPrimitive?: boolean;
|
|
1047
|
+
/** Behavioral metadata for advanced metrics */
|
|
1048
|
+
isPure?: boolean;
|
|
1049
|
+
hasSideEffects?: boolean;
|
|
1050
|
+
/** Whether the export has explicit type annotations (TS only) */
|
|
1051
|
+
isTyped?: boolean;
|
|
1052
|
+
/** Inferred domain/area this export belongs to (e.g., "auth", "database") */
|
|
1053
|
+
inferredDomain?: string;
|
|
1054
|
+
/** Associated documentation */
|
|
1055
|
+
documentation?: {
|
|
1056
|
+
content: string;
|
|
1057
|
+
type: 'jsdoc' | 'docstring' | 'comment' | 'xml-doc';
|
|
860
1058
|
loc?: SourceRange;
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
/** Dependencies on other exports in same file */
|
|
864
|
-
dependencies?: string[];
|
|
865
|
-
/** TypeScript types referenced */
|
|
866
|
-
typeReferences?: string[];
|
|
867
|
-
/** For methods: parent class name */
|
|
868
|
-
parentClass?: string;
|
|
869
|
-
/** For functions/methods: parameters */
|
|
870
|
-
parameters?: string[];
|
|
871
|
-
/** For classes/interfaces: number of methods and properties */
|
|
872
|
-
methodCount?: number;
|
|
873
|
-
propertyCount?: number;
|
|
874
|
-
/** Visibility (public, private, protected) */
|
|
875
|
-
visibility?: 'public' | 'private' | 'protected';
|
|
876
|
-
/** Whether the value is a primitive (string, number, boolean) */
|
|
877
|
-
isPrimitive?: boolean;
|
|
878
|
-
/** Behavioral metadata for advanced metrics */
|
|
879
|
-
isPure?: boolean;
|
|
880
|
-
hasSideEffects?: boolean;
|
|
881
|
-
/** Whether the export has explicit type annotations (TS only) */
|
|
882
|
-
isTyped?: boolean;
|
|
883
|
-
/** Inferred domain/area this export belongs to (e.g., "auth", "database") */
|
|
884
|
-
inferredDomain?: string;
|
|
885
|
-
/** Associated documentation */
|
|
886
|
-
documentation?: {
|
|
887
|
-
content: string;
|
|
888
|
-
type: 'jsdoc' | 'docstring' | 'comment' | 'xml-doc';
|
|
889
|
-
loc?: SourceRange;
|
|
890
|
-
isStale?: boolean;
|
|
891
|
-
};
|
|
1059
|
+
isStale?: boolean;
|
|
1060
|
+
};
|
|
892
1061
|
}
|
|
893
1062
|
/**
|
|
894
1063
|
* Parse result containing exports and imports
|
|
895
1064
|
*/
|
|
896
1065
|
interface ParseResult {
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
1066
|
+
exports: ExportInfo[];
|
|
1067
|
+
imports: FileImport[];
|
|
1068
|
+
/** Language of the parsed file */
|
|
1069
|
+
language: Language;
|
|
1070
|
+
/** Any parse warnings (non-fatal) */
|
|
1071
|
+
warnings?: string[];
|
|
903
1072
|
}
|
|
904
1073
|
/**
|
|
905
1074
|
* Naming convention rules per language
|
|
906
1075
|
*/
|
|
907
1076
|
interface NamingConvention {
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
1077
|
+
/** Allowed variable naming patterns */
|
|
1078
|
+
variablePattern: RegExp;
|
|
1079
|
+
/** Allowed function naming patterns */
|
|
1080
|
+
functionPattern: RegExp;
|
|
1081
|
+
/** Allowed class naming patterns */
|
|
1082
|
+
classPattern: RegExp;
|
|
1083
|
+
/** Allowed constant naming patterns */
|
|
1084
|
+
constantPattern: RegExp;
|
|
1085
|
+
/** Allowed type naming patterns */
|
|
1086
|
+
typePattern?: RegExp;
|
|
1087
|
+
/** Allowed interface naming patterns */
|
|
1088
|
+
interfacePattern?: RegExp;
|
|
1089
|
+
/** Language-specific exceptions (e.g., __init__ in Python) */
|
|
1090
|
+
exceptions?: string[];
|
|
922
1091
|
}
|
|
923
1092
|
/**
|
|
924
1093
|
* Language-specific configuration
|
|
925
1094
|
*/
|
|
926
1095
|
interface LanguageConfig {
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
1096
|
+
language: Language;
|
|
1097
|
+
/** File extensions for this language */
|
|
1098
|
+
extensions: string[];
|
|
1099
|
+
/** Naming conventions */
|
|
1100
|
+
namingConventions: NamingConvention;
|
|
1101
|
+
/** Common abbreviations allowed */
|
|
1102
|
+
allowedAbbreviations?: string[];
|
|
1103
|
+
/** Language-specific keywords to ignore */
|
|
1104
|
+
keywords?: string[];
|
|
936
1105
|
}
|
|
937
1106
|
/**
|
|
938
1107
|
* Abstract interface for language parsers
|
|
939
1108
|
* Each language implementation should implement this interface
|
|
940
1109
|
*/
|
|
941
1110
|
interface LanguageParser {
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1111
|
+
/** Language this parser handles */
|
|
1112
|
+
readonly language: Language;
|
|
1113
|
+
/** File extensions this parser supports */
|
|
1114
|
+
readonly extensions: string[];
|
|
1115
|
+
/**
|
|
1116
|
+
* Parse source code and extract structure
|
|
1117
|
+
* @param code - Source code to parse
|
|
1118
|
+
* @param filePath - Path to the file (for context)
|
|
1119
|
+
* @returns Parse result with exports and imports
|
|
1120
|
+
* @throws ParseError if code has syntax errors
|
|
1121
|
+
*/
|
|
1122
|
+
parse(code: string, filePath: string): ParseResult;
|
|
1123
|
+
/**
|
|
1124
|
+
* Get naming conventions for this language
|
|
1125
|
+
*/
|
|
1126
|
+
getNamingConventions(): NamingConvention;
|
|
1127
|
+
/**
|
|
1128
|
+
* Initialize the parser (e.g. load WASM)
|
|
1129
|
+
*/
|
|
1130
|
+
initialize(): Promise<void>;
|
|
1131
|
+
/**
|
|
1132
|
+
* Check if this parser can handle a file
|
|
1133
|
+
* @param filePath - File path to check
|
|
1134
|
+
*/
|
|
1135
|
+
canHandle(filePath: string): boolean;
|
|
1136
|
+
/**
|
|
1137
|
+
* Parse the source code into a language-specific AST
|
|
1138
|
+
* @param code - Source code to parse
|
|
1139
|
+
* @param filePath - Path to the file
|
|
1140
|
+
*/
|
|
1141
|
+
getAST(code: string, filePath: string): Promise<any>;
|
|
1142
|
+
/**
|
|
1143
|
+
* Analyze structural metadata for a node (e.g. purity)
|
|
1144
|
+
* @param node - The AST node to analyze (language specific)
|
|
1145
|
+
* @param code - The original source code
|
|
1146
|
+
*/
|
|
1147
|
+
analyzeMetadata(node: any, code: string): Partial<ExportInfo>;
|
|
979
1148
|
}
|
|
980
1149
|
/**
|
|
981
1150
|
* Parser error with location information
|
|
982
1151
|
*/
|
|
983
1152
|
declare class ParseError extends Error {
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
1153
|
+
readonly filePath: string;
|
|
1154
|
+
readonly loc?: SourceLocation | undefined;
|
|
1155
|
+
constructor(
|
|
1156
|
+
message: string,
|
|
1157
|
+
filePath: string,
|
|
1158
|
+
loc?: SourceLocation | undefined
|
|
1159
|
+
);
|
|
987
1160
|
}
|
|
988
1161
|
/**
|
|
989
1162
|
* Statistics about parsed code
|
|
990
1163
|
*/
|
|
991
1164
|
interface ParseStatistics {
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
1165
|
+
language: Language;
|
|
1166
|
+
filesAnalyzed: number;
|
|
1167
|
+
totalExports: number;
|
|
1168
|
+
totalImports: number;
|
|
1169
|
+
parseErrors: number;
|
|
1170
|
+
warnings: number;
|
|
998
1171
|
}
|
|
999
1172
|
|
|
1000
1173
|
/**
|
|
@@ -1006,20 +1179,20 @@ interface ParseStatistics {
|
|
|
1006
1179
|
* Provides a high-level qualitative assessment based on the numeric score.
|
|
1007
1180
|
*/
|
|
1008
1181
|
declare enum ReadinessRating {
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1182
|
+
Excellent = 'Excellent',
|
|
1183
|
+
Good = 'Good',
|
|
1184
|
+
Fair = 'Fair',
|
|
1185
|
+
NeedsWork = 'Needs Work',
|
|
1186
|
+
Critical = 'Critical',
|
|
1014
1187
|
}
|
|
1015
1188
|
/**
|
|
1016
1189
|
* Metadata for a given score range.
|
|
1017
1190
|
*/
|
|
1018
1191
|
interface RatingMetadata {
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1192
|
+
label: string;
|
|
1193
|
+
slug: string;
|
|
1194
|
+
emoji: string;
|
|
1195
|
+
rating: ReadinessRating;
|
|
1023
1196
|
}
|
|
1024
1197
|
/**
|
|
1025
1198
|
* Get all metadata for a specific score.
|
|
@@ -1071,83 +1244,86 @@ declare function getRating(score: number): ReadinessRating;
|
|
|
1071
1244
|
* Used to sort and display fixes for the user.
|
|
1072
1245
|
*/
|
|
1073
1246
|
declare enum RecommendationPriority {
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1247
|
+
High = 'high',
|
|
1248
|
+
Medium = 'medium',
|
|
1249
|
+
Low = 'low',
|
|
1077
1250
|
}
|
|
1078
1251
|
/**
|
|
1079
1252
|
* Output structure for a single tool's scoring analysis.
|
|
1080
1253
|
*/
|
|
1081
1254
|
interface ToolScoringOutput {
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1255
|
+
/** Unique tool identifier (e.g., "pattern-detect") */
|
|
1256
|
+
toolName: string;
|
|
1257
|
+
/** Normalized 0-100 score for this tool */
|
|
1258
|
+
score: number;
|
|
1259
|
+
/** AI token budget unit economics (v0.13+) */
|
|
1260
|
+
tokenBudget?: any;
|
|
1261
|
+
/** Raw metrics used to calculate the score */
|
|
1262
|
+
rawMetrics: Record<string, any>;
|
|
1263
|
+
/** Factors that influenced the score */
|
|
1264
|
+
factors: Array<{
|
|
1265
|
+
/** Human-readable name of the factor */
|
|
1266
|
+
name: string;
|
|
1267
|
+
/** Points contribution (positive or negative) */
|
|
1268
|
+
impact: number;
|
|
1269
|
+
/** Explanation of the factor's impact */
|
|
1270
|
+
description: string;
|
|
1271
|
+
}>;
|
|
1272
|
+
/** Actionable recommendations with estimated impact */
|
|
1273
|
+
recommendations: Array<{
|
|
1274
|
+
/** The recommended action to take */
|
|
1275
|
+
action: string;
|
|
1276
|
+
/** Potential points increase if implemented */
|
|
1277
|
+
estimatedImpact: number;
|
|
1278
|
+
/** Implementation priority */
|
|
1279
|
+
priority: RecommendationPriority | 'high' | 'medium' | 'low';
|
|
1280
|
+
}>;
|
|
1108
1281
|
}
|
|
1109
1282
|
/**
|
|
1110
1283
|
* Consolidated scoring result across all tools.
|
|
1111
1284
|
*/
|
|
1112
1285
|
interface ScoringResult {
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1286
|
+
/** Overall AI Readiness Score (0-100) */
|
|
1287
|
+
overall: number;
|
|
1288
|
+
/** Rating category representing the overall readiness */
|
|
1289
|
+
rating: string;
|
|
1290
|
+
/** Timestamp of score calculation */
|
|
1291
|
+
timestamp: string;
|
|
1292
|
+
/** Tools that contributed to this score */
|
|
1293
|
+
toolsUsed: string[];
|
|
1294
|
+
/** Breakdown by individual tool */
|
|
1295
|
+
breakdown: ToolScoringOutput[];
|
|
1296
|
+
/** Internal calculation details for transparency */
|
|
1297
|
+
calculation: {
|
|
1298
|
+
/** Textual representation of the calculation formula */
|
|
1299
|
+
formula: string;
|
|
1300
|
+
/** Weights applied to each tool */
|
|
1301
|
+
weights: Record<string, number>;
|
|
1302
|
+
/** Simplified normalized formula output */
|
|
1303
|
+
normalized: string;
|
|
1304
|
+
};
|
|
1132
1305
|
}
|
|
1133
1306
|
/**
|
|
1134
1307
|
* Configuration options for the scoring system.
|
|
1135
1308
|
*/
|
|
1136
1309
|
interface ScoringConfig {
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1310
|
+
/** Minimum passing score (CLI will exit with non-zero if below) */
|
|
1311
|
+
threshold?: number;
|
|
1312
|
+
/** Whether to show the detailed tool-by-tool breakdown */
|
|
1313
|
+
showBreakdown?: boolean;
|
|
1314
|
+
/** Path to a baseline report JSON for trend comparison */
|
|
1315
|
+
compareBaseline?: string;
|
|
1316
|
+
/** Target file path to persist the calculated score */
|
|
1317
|
+
saveTo?: string;
|
|
1318
|
+
/** Scoring profile to use for weighting */
|
|
1319
|
+
profile?: string;
|
|
1320
|
+
/** Tool-specific configurations (e.g., weights) */
|
|
1321
|
+
tools?: Record<
|
|
1322
|
+
string,
|
|
1323
|
+
{
|
|
1324
|
+
scoreWeight?: number;
|
|
1325
|
+
}
|
|
1326
|
+
>;
|
|
1151
1327
|
}
|
|
1152
1328
|
|
|
1153
1329
|
/**
|
|
@@ -1170,12 +1346,12 @@ type ModelContextTier = 'compact' | 'standard' | 'extended' | 'frontier';
|
|
|
1170
1346
|
* on the project's primary focus.
|
|
1171
1347
|
*/
|
|
1172
1348
|
declare enum ScoringProfile {
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1349
|
+
Default = 'default',
|
|
1350
|
+
Agentic = 'agentic', // Focus on AI agent navigation and signal
|
|
1351
|
+
Logic = 'logic', // Focus on testability and complexity
|
|
1352
|
+
UI = 'ui', // Focus on consistency and context
|
|
1353
|
+
Cost = 'cost', // Focus on token waste reduction
|
|
1354
|
+
Security = 'security',
|
|
1179
1355
|
}
|
|
1180
1356
|
/**
|
|
1181
1357
|
* Project-type-aware tool weight presets for different profiles.
|
|
@@ -1186,11 +1362,14 @@ declare const SCORING_PROFILES: Record<ScoringProfile, Record<string, number>>;
|
|
|
1186
1362
|
*
|
|
1187
1363
|
* "Ideal" represents target state. "Critical" represents failure state.
|
|
1188
1364
|
*/
|
|
1189
|
-
declare const CONTEXT_TIER_THRESHOLDS: Record<
|
|
1365
|
+
declare const CONTEXT_TIER_THRESHOLDS: Record<
|
|
1366
|
+
ModelContextTier,
|
|
1367
|
+
{
|
|
1190
1368
|
idealTokens: number;
|
|
1191
1369
|
criticalTokens: number;
|
|
1192
1370
|
idealDepth: number;
|
|
1193
|
-
}
|
|
1371
|
+
}
|
|
1372
|
+
>;
|
|
1194
1373
|
/**
|
|
1195
1374
|
* Project-size-adjusted minimum thresholds.
|
|
1196
1375
|
*
|
|
@@ -1203,7 +1382,9 @@ declare const SIZE_ADJUSTED_THRESHOLDS: Record<string, number>;
|
|
|
1203
1382
|
* @param fileCount Total number of files in the project
|
|
1204
1383
|
* @returns A string identifier for the project size tier (xs, small, medium, large, enterprise)
|
|
1205
1384
|
*/
|
|
1206
|
-
declare function getProjectSizeTier(
|
|
1385
|
+
declare function getProjectSizeTier(
|
|
1386
|
+
fileCount: number
|
|
1387
|
+
): keyof typeof SIZE_ADJUSTED_THRESHOLDS;
|
|
1207
1388
|
/**
|
|
1208
1389
|
* Calculate the recommended minimum AI readiness threshold for a project.
|
|
1209
1390
|
*
|
|
@@ -1213,7 +1394,10 @@ declare function getProjectSizeTier(fileCount: number): keyof typeof SIZE_ADJUST
|
|
|
1213
1394
|
* @param modelTier The model context tier targeted (compact, standard, extended, frontier)
|
|
1214
1395
|
* @returns The recommended score threshold (0-100)
|
|
1215
1396
|
*/
|
|
1216
|
-
declare function getRecommendedThreshold(
|
|
1397
|
+
declare function getRecommendedThreshold(
|
|
1398
|
+
fileCount: number,
|
|
1399
|
+
modelTier?: ModelContextTier
|
|
1400
|
+
): number;
|
|
1217
1401
|
/**
|
|
1218
1402
|
* Normalize a tool name from a shorthand or alias to its canonical ID.
|
|
1219
1403
|
*
|
|
@@ -1230,9 +1414,14 @@ declare function normalizeToolName(shortName: string): string;
|
|
|
1230
1414
|
* @param profile Optional scoring profile to use
|
|
1231
1415
|
* @returns The weight to be used for this tool in overall scoring
|
|
1232
1416
|
*/
|
|
1233
|
-
declare function getToolWeight(
|
|
1417
|
+
declare function getToolWeight(
|
|
1418
|
+
toolName: string,
|
|
1419
|
+
toolConfig?: {
|
|
1234
1420
|
scoreWeight?: number;
|
|
1235
|
-
},
|
|
1421
|
+
},
|
|
1422
|
+
cliOverride?: number,
|
|
1423
|
+
profile?: ScoringProfile
|
|
1424
|
+
): number;
|
|
1236
1425
|
/**
|
|
1237
1426
|
* Parse a comma-separated weight string from the CLI.
|
|
1238
1427
|
*
|
|
@@ -1252,7 +1441,11 @@ declare function parseWeightString(weightStr?: string): Map<string, number>;
|
|
|
1252
1441
|
* @param cliWeights Optional weight overrides from the CLI
|
|
1253
1442
|
* @returns Consolidate ScoringResult including overall score and rating
|
|
1254
1443
|
*/
|
|
1255
|
-
declare function calculateOverallScore(
|
|
1444
|
+
declare function calculateOverallScore(
|
|
1445
|
+
toolOutputs: Map<string, ToolScoringOutput>,
|
|
1446
|
+
config?: ScoringConfig,
|
|
1447
|
+
cliWeights?: Map<string, number>
|
|
1448
|
+
): ScoringResult;
|
|
1256
1449
|
/**
|
|
1257
1450
|
* Convert score to rating with project-size and model awareness.
|
|
1258
1451
|
*
|
|
@@ -1263,7 +1456,11 @@ declare function calculateOverallScore(toolOutputs: Map<string, ToolScoringOutpu
|
|
|
1263
1456
|
* @param modelTier The model context tier being targeted
|
|
1264
1457
|
* @returns The size-aware ReadinessRating
|
|
1265
1458
|
*/
|
|
1266
|
-
declare function getRatingWithContext(
|
|
1459
|
+
declare function getRatingWithContext(
|
|
1460
|
+
score: number,
|
|
1461
|
+
fileCount: number,
|
|
1462
|
+
modelTier?: ModelContextTier
|
|
1463
|
+
): ReadinessRating;
|
|
1267
1464
|
/**
|
|
1268
1465
|
* Get display properties (emoji and color) for a given rating.
|
|
1269
1466
|
*
|
|
@@ -1271,8 +1468,8 @@ declare function getRatingWithContext(score: number, fileCount: number, modelTie
|
|
|
1271
1468
|
* @returns Object containing display emoji and color string
|
|
1272
1469
|
*/
|
|
1273
1470
|
declare function getRatingDisplay(rating: ReadinessRating | string): {
|
|
1274
|
-
|
|
1275
|
-
|
|
1471
|
+
emoji: string;
|
|
1472
|
+
color: string;
|
|
1276
1473
|
};
|
|
1277
1474
|
/**
|
|
1278
1475
|
* Format overall score for compact console display.
|
|
@@ -1304,4 +1501,110 @@ declare function formatToolScore(output: ToolScoringOutput): string;
|
|
|
1304
1501
|
*/
|
|
1305
1502
|
declare function generateHTML(graph: GraphData): string;
|
|
1306
1503
|
|
|
1307
|
-
export {
|
|
1504
|
+
export {
|
|
1505
|
+
LeadSource as $,
|
|
1506
|
+
type AnalysisResult as A,
|
|
1507
|
+
type BusinessMetrics as B,
|
|
1508
|
+
type CostConfig as C,
|
|
1509
|
+
DEFAULT_TOOL_WEIGHTS as D,
|
|
1510
|
+
type ExportWithImports as E,
|
|
1511
|
+
type FileImport as F,
|
|
1512
|
+
GLOBAL_INFRA_OPTIONS as G,
|
|
1513
|
+
type GraphData as H,
|
|
1514
|
+
type Issue as I,
|
|
1515
|
+
type GraphEdge as J,
|
|
1516
|
+
type GraphIssueSeverity as K,
|
|
1517
|
+
Language as L,
|
|
1518
|
+
type Metrics as M,
|
|
1519
|
+
type NamingConvention as N,
|
|
1520
|
+
type GraphMetadata as O,
|
|
1521
|
+
type ProductivityImpact as P,
|
|
1522
|
+
type GraphNode as Q,
|
|
1523
|
+
type IssueOverlay as R,
|
|
1524
|
+
type ScanOptions as S,
|
|
1525
|
+
ToolName as T,
|
|
1526
|
+
IssueSchema as U,
|
|
1527
|
+
IssueType as V,
|
|
1528
|
+
IssueTypeSchema as W,
|
|
1529
|
+
LANGUAGE_EXTENSIONS as X,
|
|
1530
|
+
type LanguageConfig as Y,
|
|
1531
|
+
type Lead as Z,
|
|
1532
|
+
LeadSchema as _,
|
|
1533
|
+
type SpokeOutput as a,
|
|
1534
|
+
LeadSourceSchema as a0,
|
|
1535
|
+
type LeadSubmission as a1,
|
|
1536
|
+
LeadSubmissionSchema as a2,
|
|
1537
|
+
type Location as a3,
|
|
1538
|
+
LocationSchema as a4,
|
|
1539
|
+
type ManagedAccount as a5,
|
|
1540
|
+
ManagedAccountSchema as a6,
|
|
1541
|
+
MetricsSchema as a7,
|
|
1542
|
+
ModelTier as a8,
|
|
1543
|
+
ModelTierSchema as a9,
|
|
1544
|
+
getProjectSizeTier as aA,
|
|
1545
|
+
getRating as aB,
|
|
1546
|
+
getRatingDisplay as aC,
|
|
1547
|
+
getRatingEmoji as aD,
|
|
1548
|
+
getRatingLabel as aE,
|
|
1549
|
+
getRatingMetadata as aF,
|
|
1550
|
+
getRatingSlug as aG,
|
|
1551
|
+
getRatingWithContext as aH,
|
|
1552
|
+
getRecommendedThreshold as aI,
|
|
1553
|
+
getToolEmoji as aJ,
|
|
1554
|
+
getToolWeight as aK,
|
|
1555
|
+
normalizeToolName as aL,
|
|
1556
|
+
parseWeightString as aM,
|
|
1557
|
+
type BaseGraphLink as aN,
|
|
1558
|
+
type BaseGraphNode as aO,
|
|
1559
|
+
ParseError as aa,
|
|
1560
|
+
type ParseStatistics as ab,
|
|
1561
|
+
ReadinessRating as ac,
|
|
1562
|
+
RecommendationPriority as ad,
|
|
1563
|
+
SCORING_PROFILES as ae,
|
|
1564
|
+
SIZE_ADJUSTED_THRESHOLDS as af,
|
|
1565
|
+
type ScanResult as ag,
|
|
1566
|
+
type ScoringConfig as ah,
|
|
1567
|
+
ScoringProfile as ai,
|
|
1568
|
+
type ScoringResult as aj,
|
|
1569
|
+
SeveritySchema as ak,
|
|
1570
|
+
type SourceLocation as al,
|
|
1571
|
+
type SourceRange as am,
|
|
1572
|
+
SpokeOutputSchema as an,
|
|
1573
|
+
type SpokeSummary as ao,
|
|
1574
|
+
SpokeSummarySchema as ap,
|
|
1575
|
+
TOOL_NAME_MAP as aq,
|
|
1576
|
+
ToolNameSchema as ar,
|
|
1577
|
+
type ToolOutput as as,
|
|
1578
|
+
type UnifiedReport as at,
|
|
1579
|
+
UnifiedReportSchema as au,
|
|
1580
|
+
calculateOverallScore as av,
|
|
1581
|
+
formatScore as aw,
|
|
1582
|
+
formatToolScore as ax,
|
|
1583
|
+
generateHTML as ay,
|
|
1584
|
+
getPriorityIcon as az,
|
|
1585
|
+
type ToolScoringOutput as b,
|
|
1586
|
+
Severity as c,
|
|
1587
|
+
type ToolOptions as d,
|
|
1588
|
+
type AIReadyConfig as e,
|
|
1589
|
+
type TechnicalValueChain as f,
|
|
1590
|
+
type ModelContextTier as g,
|
|
1591
|
+
type TokenBudget as h,
|
|
1592
|
+
type AcceptancePrediction as i,
|
|
1593
|
+
type ComprehensionDifficulty as j,
|
|
1594
|
+
type TechnicalValueChainSummary as k,
|
|
1595
|
+
type LanguageParser as l,
|
|
1596
|
+
type ParseResult as m,
|
|
1597
|
+
type ExportInfo as n,
|
|
1598
|
+
AIReadyConfigSchema as o,
|
|
1599
|
+
type ASTNode as p,
|
|
1600
|
+
AnalysisResultSchema as q,
|
|
1601
|
+
AnalysisStatus as r,
|
|
1602
|
+
AnalysisStatusSchema as s,
|
|
1603
|
+
COMMON_FINE_TUNING_OPTIONS as t,
|
|
1604
|
+
CONTEXT_TIER_THRESHOLDS as u,
|
|
1605
|
+
type CommonASTNode as v,
|
|
1606
|
+
type Config as w,
|
|
1607
|
+
FRIENDLY_TOOL_NAMES as x,
|
|
1608
|
+
type FileContent as y,
|
|
1609
|
+
GLOBAL_SCAN_OPTIONS as z,
|
|
1610
|
+
};
|