@aiready/core 0.23.19 → 0.23.21

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.
Files changed (96) hide show
  1. package/dist/chunk-2N7ISIKE.mjs +158 -0
  2. package/dist/chunk-ARUIZO7M.mjs +297 -0
  3. package/dist/chunk-CYC5EGEI.mjs +297 -0
  4. package/dist/{chunk-ZB3EHHAG.mjs → chunk-DBOPSRBC.mjs} +88 -26
  5. package/dist/chunk-EZ7ECLAZ.mjs +299 -0
  6. package/dist/chunk-FNPULWG7.mjs +248 -0
  7. package/dist/chunk-FZTFKZUQ.mjs +250 -0
  8. package/dist/chunk-GTS642BQ.mjs +262 -0
  9. package/dist/chunk-IXPY5J4K.mjs +248 -0
  10. package/dist/chunk-JJQLYW6Z.mjs +111 -0
  11. package/dist/chunk-L6BKANJC.mjs +130 -0
  12. package/dist/chunk-LXEO5PG3.mjs +292 -0
  13. package/dist/chunk-LZHO636W.mjs +501 -0
  14. package/dist/chunk-MTK2IIDZ.mjs +262 -0
  15. package/dist/chunk-QDCQETSI.mjs +262 -0
  16. package/dist/chunk-QZNY7B2N.mjs +248 -0
  17. package/dist/chunk-RCZSMGCX.mjs +250 -0
  18. package/dist/chunk-SWZOT67M.mjs +250 -0
  19. package/dist/chunk-U3IY2CFC.mjs +36 -0
  20. package/dist/chunk-UBCM5Y6R.mjs +275 -0
  21. package/dist/chunk-UTCRW3N7.mjs +301 -0
  22. package/dist/{chunk-RMH2TPAT.mjs → chunk-UYLH35LA.mjs} +88 -26
  23. package/dist/{chunk-TJXR2CHZ.mjs → chunk-WVNVC2PP.mjs} +266 -213
  24. package/dist/chunk-WYOW6O3P.mjs +114 -0
  25. package/dist/{chunk-CGOS2J6T.mjs → chunk-YRSSR4KN.mjs} +260 -217
  26. package/dist/client-2xbeKnrg.d.mts +1291 -0
  27. package/dist/client-2xbeKnrg.d.ts +1291 -0
  28. package/dist/client-4HLAGzFg.d.mts +1291 -0
  29. package/dist/client-4HLAGzFg.d.ts +1291 -0
  30. package/dist/client-B4TQwNa7.d.mts +1290 -0
  31. package/dist/client-B4TQwNa7.d.ts +1290 -0
  32. package/dist/client-Bdi4ty0v.d.mts +1294 -0
  33. package/dist/client-Bdi4ty0v.d.ts +1294 -0
  34. package/dist/client-BsKpUH3H.d.mts +1339 -0
  35. package/dist/client-BsKpUH3H.d.ts +1339 -0
  36. package/dist/client-Bv1zOaWF.d.mts +1291 -0
  37. package/dist/client-Bv1zOaWF.d.ts +1291 -0
  38. package/dist/client-Bz9YJMIX.d.mts +1290 -0
  39. package/dist/client-Bz9YJMIX.d.ts +1290 -0
  40. package/dist/client-CBpzm34X.d.mts +1291 -0
  41. package/dist/client-CBpzm34X.d.ts +1291 -0
  42. package/dist/client-CNu_tCZZ.d.mts +1305 -0
  43. package/dist/client-CNu_tCZZ.d.ts +1305 -0
  44. package/dist/client-CmEvxxQu.d.mts +1339 -0
  45. package/dist/client-CmEvxxQu.d.ts +1339 -0
  46. package/dist/client-DGMAxkZc.d.mts +1339 -0
  47. package/dist/client-DGMAxkZc.d.ts +1339 -0
  48. package/dist/client-DZq-CqcD.d.mts +1292 -0
  49. package/dist/client-DZq-CqcD.d.ts +1292 -0
  50. package/dist/{client-WVCAIWdJ.d.mts → client-DcqGfDTt.d.mts} +318 -226
  51. package/dist/{client-WVCAIWdJ.d.ts → client-DcqGfDTt.d.ts} +318 -226
  52. package/dist/{client-DLvFR2qA.d.mts → client-O8RvSRm0.d.mts} +89 -25
  53. package/dist/{client-DLvFR2qA.d.ts → client-O8RvSRm0.d.ts} +89 -25
  54. package/dist/client.d.mts +1 -1
  55. package/dist/client.d.ts +1 -1
  56. package/dist/client.js +53 -27
  57. package/dist/client.mjs +6 -6
  58. package/dist/csharp-parser-4ZKCSX5B.mjs +9 -0
  59. package/dist/csharp-parser-5HKICCRR.mjs +9 -0
  60. package/dist/csharp-parser-JCKXIAJW.mjs +9 -0
  61. package/dist/go-parser-J4KIH4RG.mjs +9 -0
  62. package/dist/go-parser-TKXL3DVH.mjs +9 -0
  63. package/dist/go-parser-XOM232XZ.mjs +9 -0
  64. package/dist/index.d.mts +332 -54
  65. package/dist/index.d.ts +332 -54
  66. package/dist/index.js +3930 -3064
  67. package/dist/index.mjs +933 -2036
  68. package/dist/java-parser-3KHXOXRQ.mjs +9 -0
  69. package/dist/java-parser-MASGS4WB.mjs +9 -0
  70. package/dist/java-parser-T5LXD63J.mjs +9 -0
  71. package/dist/python-parser-FNFK2473.mjs +8 -0
  72. package/dist/typescript-parser-2GGNRNB5.mjs +7 -0
  73. package/dist/typescript-parser-3ENJ6C7H.mjs +7 -0
  74. package/dist/typescript-parser-4GI7DPSW.mjs +7 -0
  75. package/dist/typescript-parser-4H3HUBO4.mjs +7 -0
  76. package/dist/typescript-parser-K63IVZMF.mjs +7 -0
  77. package/dist/typescript-parser-ZJKROMQG.mjs +7 -0
  78. package/package.json +1 -1
  79. package/dist/chunk-5SHLHMH7.mjs +0 -760
  80. package/dist/chunk-Q55AMEFV.mjs +0 -760
  81. package/dist/client-BEoUYNLp.d.mts +0 -1191
  82. package/dist/client-BEoUYNLp.d.ts +0 -1191
  83. package/dist/client-BrIMPk89.d.mts +0 -1214
  84. package/dist/client-BrIMPk89.d.ts +0 -1214
  85. package/dist/client-C5BuGX4F.d.mts +0 -1205
  86. package/dist/client-C5BuGX4F.d.ts +0 -1205
  87. package/dist/client-CKcjnPXt.d.mts +0 -1214
  88. package/dist/client-CKcjnPXt.d.ts +0 -1214
  89. package/dist/client-CLulBnie.d.mts +0 -1182
  90. package/dist/client-CLulBnie.d.ts +0 -1182
  91. package/dist/client-CQwvp8ep.d.mts +0 -1182
  92. package/dist/client-CQwvp8ep.d.ts +0 -1182
  93. package/dist/client-PFPdeo-z.d.mts +0 -1186
  94. package/dist/client-PFPdeo-z.d.ts +0 -1186
  95. package/dist/client-wk2fgk1q.d.mts +0 -1184
  96. package/dist/client-wk2fgk1q.d.ts +0 -1184
@@ -1,1186 +0,0 @@
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
- /**
13
- * Common tool options
14
- */
15
- interface ToolOptions {
16
- /** Root directory of the project */
17
- rootDir: string;
18
- /** Files to include in this tool's analysis */
19
- include?: string[];
20
- /** Files to exclude from this tool's analysis */
21
- exclude?: string[];
22
- /** Tool-specific configuration values */
23
- config?: any;
24
- /** Any other dynamic options */
25
- [key: string]: any;
26
- }
27
- /** Zod schema for Severity enum */
28
- declare const SeveritySchema: z.ZodEnum<typeof Severity>;
29
- /**
30
- * Canonical Tool Names (IDs)
31
- * Used everywhere as the single source of truth for tool identification.
32
- */
33
- declare enum ToolName {
34
- PatternDetect = "pattern-detect",
35
- ContextAnalyzer = "context-analyzer",
36
- NamingConsistency = "naming-consistency",
37
- AiSignalClarity = "ai-signal-clarity",
38
- AgentGrounding = "agent-grounding",
39
- TestabilityIndex = "testability-index",
40
- DocDrift = "doc-drift",
41
- DependencyHealth = "dependency-health",
42
- ChangeAmplification = "change-amplification",
43
- CognitiveLoad = "cognitive-load",
44
- PatternEntropy = "pattern-entropy",
45
- ConceptCohesion = "concept-cohesion",
46
- SemanticDistance = "semantic-distance"
47
- }
48
- /** Zod schema for ToolName enum */
49
- declare const ToolNameSchema: z.ZodEnum<typeof ToolName>;
50
- /**
51
- * Friendly labels for UI display
52
- */
53
- declare const FRIENDLY_TOOL_NAMES: Record<ToolName, string>;
54
- /**
55
- * Standardized issue types across all AIReady tools.
56
- */
57
- declare enum IssueType {
58
- DuplicatePattern = "duplicate-pattern",
59
- PatternInconsistency = "pattern-inconsistency",
60
- ContextFragmentation = "context-fragmentation",
61
- DependencyHealth = "dependency-health",
62
- CircularDependency = "circular-dependency",
63
- DocDrift = "doc-drift",
64
- NamingInconsistency = "naming-inconsistency",
65
- NamingQuality = "naming-quality",
66
- ArchitectureInconsistency = "architecture-inconsistency",
67
- DeadCode = "dead-code",
68
- MissingTypes = "missing-types",
69
- MagicLiteral = "magic-literal",
70
- BooleanTrap = "boolean-trap",
71
- AiSignalClarity = "ai-signal-clarity",
72
- LowTestability = "low-testability",
73
- AgentNavigationFailure = "agent-navigation-failure",
74
- AmbiguousApi = "ambiguous-api",
75
- ChangeAmplification = "change-amplification"
76
- }
77
- /** Zod schema for IssueType enum */
78
- declare const IssueTypeSchema: z.ZodEnum<typeof IssueType>;
79
- /**
80
- * Analysis processing status.
81
- */
82
- declare enum AnalysisStatus {
83
- Processing = "processing",
84
- Completed = "completed",
85
- Failed = "failed"
86
- }
87
- /** Zod schema for AnalysisStatus enum */
88
- declare const AnalysisStatusSchema: z.ZodEnum<typeof AnalysisStatus>;
89
- /**
90
- * AI Model Context Tiers.
91
- */
92
- declare enum ModelTier {
93
- Compact = "compact",
94
- Standard = "standard",
95
- Extended = "extended",
96
- Frontier = "frontier"
97
- }
98
- /** Zod schema for ModelTier enum */
99
- declare const ModelTierSchema: z.ZodEnum<typeof ModelTier>;
100
- /**
101
- * Source code location schema.
102
- */
103
- /** Zod schema for Location object */
104
- declare const LocationSchema: z.ZodObject<{
105
- file: z.ZodString;
106
- line: z.ZodNumber;
107
- column: z.ZodOptional<z.ZodNumber>;
108
- endLine: z.ZodOptional<z.ZodNumber>;
109
- endColumn: z.ZodOptional<z.ZodNumber>;
110
- }, z.core.$strip>;
111
- type Location = z.infer<typeof LocationSchema>;
112
- /**
113
- * Standard Issue schema.
114
- */
115
- /** Zod schema for Issue object */
116
- declare const IssueSchema: z.ZodObject<{
117
- type: z.ZodEnum<typeof IssueType>;
118
- severity: z.ZodEnum<typeof Severity>;
119
- message: z.ZodString;
120
- location: z.ZodObject<{
121
- file: z.ZodString;
122
- line: z.ZodNumber;
123
- column: z.ZodOptional<z.ZodNumber>;
124
- endLine: z.ZodOptional<z.ZodNumber>;
125
- endColumn: z.ZodOptional<z.ZodNumber>;
126
- }, z.core.$strip>;
127
- suggestion: z.ZodOptional<z.ZodString>;
128
- }, z.core.$strip>;
129
- type Issue = z.infer<typeof IssueSchema>;
130
- /**
131
- * Standard Metrics schema.
132
- */
133
- /** Zod schema for Metrics object */
134
- declare const MetricsSchema: z.ZodObject<{
135
- tokenCost: z.ZodOptional<z.ZodNumber>;
136
- complexityScore: z.ZodOptional<z.ZodNumber>;
137
- consistencyScore: z.ZodOptional<z.ZodNumber>;
138
- docFreshnessScore: z.ZodOptional<z.ZodNumber>;
139
- aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
140
- agentGroundingScore: z.ZodOptional<z.ZodNumber>;
141
- testabilityScore: z.ZodOptional<z.ZodNumber>;
142
- docDriftScore: z.ZodOptional<z.ZodNumber>;
143
- dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
144
- modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
145
- estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
146
- estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
147
- comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
148
- totalSymbols: z.ZodOptional<z.ZodNumber>;
149
- totalExports: z.ZodOptional<z.ZodNumber>;
150
- }, z.core.$strip>;
151
- type Metrics = z.infer<typeof MetricsSchema>;
152
- /**
153
- * Individual file/module analysis result.
154
- */
155
- declare const AnalysisResultSchema: z.ZodObject<{
156
- fileName: z.ZodString;
157
- issues: z.ZodArray<z.ZodObject<{
158
- type: z.ZodEnum<typeof IssueType>;
159
- severity: z.ZodEnum<typeof Severity>;
160
- message: z.ZodString;
161
- location: z.ZodObject<{
162
- file: z.ZodString;
163
- line: z.ZodNumber;
164
- column: z.ZodOptional<z.ZodNumber>;
165
- endLine: z.ZodOptional<z.ZodNumber>;
166
- endColumn: z.ZodOptional<z.ZodNumber>;
167
- }, z.core.$strip>;
168
- suggestion: z.ZodOptional<z.ZodString>;
169
- }, z.core.$strip>>;
170
- metrics: z.ZodObject<{
171
- tokenCost: z.ZodOptional<z.ZodNumber>;
172
- complexityScore: z.ZodOptional<z.ZodNumber>;
173
- consistencyScore: z.ZodOptional<z.ZodNumber>;
174
- docFreshnessScore: z.ZodOptional<z.ZodNumber>;
175
- aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
176
- agentGroundingScore: z.ZodOptional<z.ZodNumber>;
177
- testabilityScore: z.ZodOptional<z.ZodNumber>;
178
- docDriftScore: z.ZodOptional<z.ZodNumber>;
179
- dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
180
- modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
181
- estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
182
- estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
183
- comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
184
- totalSymbols: z.ZodOptional<z.ZodNumber>;
185
- totalExports: z.ZodOptional<z.ZodNumber>;
186
- }, z.core.$strip>;
187
- }, z.core.$strip>;
188
- type AnalysisResult = z.infer<typeof AnalysisResultSchema>;
189
- /**
190
- * Standard spoke tool summary schema.
191
- */
192
- declare const SpokeSummarySchema: z.ZodObject<{
193
- totalFiles: z.ZodOptional<z.ZodNumber>;
194
- totalIssues: z.ZodOptional<z.ZodNumber>;
195
- criticalIssues: z.ZodOptional<z.ZodNumber>;
196
- majorIssues: z.ZodOptional<z.ZodNumber>;
197
- score: z.ZodOptional<z.ZodNumber>;
198
- }, z.core.$catchall<z.ZodAny>>;
199
- type SpokeSummary = z.infer<typeof SpokeSummarySchema>;
200
- /**
201
- * Standard spoke tool output contract.
202
- */
203
- declare const SpokeOutputSchema: z.ZodObject<{
204
- results: z.ZodArray<z.ZodObject<{
205
- fileName: z.ZodString;
206
- issues: z.ZodArray<z.ZodObject<{
207
- type: z.ZodEnum<typeof IssueType>;
208
- severity: z.ZodEnum<typeof Severity>;
209
- message: z.ZodString;
210
- location: z.ZodObject<{
211
- file: z.ZodString;
212
- line: z.ZodNumber;
213
- column: z.ZodOptional<z.ZodNumber>;
214
- endLine: z.ZodOptional<z.ZodNumber>;
215
- endColumn: z.ZodOptional<z.ZodNumber>;
216
- }, z.core.$strip>;
217
- suggestion: z.ZodOptional<z.ZodString>;
218
- }, z.core.$strip>>;
219
- metrics: z.ZodObject<{
220
- tokenCost: z.ZodOptional<z.ZodNumber>;
221
- complexityScore: z.ZodOptional<z.ZodNumber>;
222
- consistencyScore: z.ZodOptional<z.ZodNumber>;
223
- docFreshnessScore: z.ZodOptional<z.ZodNumber>;
224
- aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
225
- agentGroundingScore: z.ZodOptional<z.ZodNumber>;
226
- testabilityScore: z.ZodOptional<z.ZodNumber>;
227
- docDriftScore: z.ZodOptional<z.ZodNumber>;
228
- dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
229
- modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
230
- estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
231
- estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
232
- comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
233
- totalSymbols: z.ZodOptional<z.ZodNumber>;
234
- totalExports: z.ZodOptional<z.ZodNumber>;
235
- }, z.core.$strip>;
236
- }, z.core.$strip>>;
237
- summary: z.ZodObject<{
238
- totalFiles: z.ZodOptional<z.ZodNumber>;
239
- totalIssues: z.ZodOptional<z.ZodNumber>;
240
- criticalIssues: z.ZodOptional<z.ZodNumber>;
241
- majorIssues: z.ZodOptional<z.ZodNumber>;
242
- score: z.ZodOptional<z.ZodNumber>;
243
- }, z.core.$catchall<z.ZodAny>>;
244
- metadata: z.ZodOptional<z.ZodObject<{
245
- toolName: z.ZodString;
246
- version: z.ZodOptional<z.ZodString>;
247
- timestamp: z.ZodOptional<z.ZodString>;
248
- config: z.ZodOptional<z.ZodAny>;
249
- }, z.core.$catchall<z.ZodAny>>>;
250
- }, z.core.$strip>;
251
- type SpokeOutput = z.infer<typeof SpokeOutputSchema>;
252
- /**
253
- * Master Unified Report contract (CLI -> Platform).
254
- */
255
- declare const UnifiedReportSchema: z.ZodObject<{
256
- summary: z.ZodObject<{
257
- totalFiles: z.ZodNumber;
258
- totalIssues: z.ZodNumber;
259
- criticalIssues: z.ZodNumber;
260
- majorIssues: z.ZodNumber;
261
- businessImpact: z.ZodOptional<z.ZodObject<{
262
- estimatedMonthlyWaste: z.ZodOptional<z.ZodNumber>;
263
- potentialSavings: z.ZodOptional<z.ZodNumber>;
264
- productivityHours: z.ZodOptional<z.ZodNumber>;
265
- }, z.core.$strip>>;
266
- }, z.core.$strip>;
267
- results: z.ZodArray<z.ZodObject<{
268
- fileName: z.ZodString;
269
- issues: z.ZodArray<z.ZodObject<{
270
- type: z.ZodEnum<typeof IssueType>;
271
- severity: z.ZodEnum<typeof Severity>;
272
- message: z.ZodString;
273
- location: z.ZodObject<{
274
- file: z.ZodString;
275
- line: z.ZodNumber;
276
- column: z.ZodOptional<z.ZodNumber>;
277
- endLine: z.ZodOptional<z.ZodNumber>;
278
- endColumn: z.ZodOptional<z.ZodNumber>;
279
- }, z.core.$strip>;
280
- suggestion: z.ZodOptional<z.ZodString>;
281
- }, z.core.$strip>>;
282
- metrics: z.ZodObject<{
283
- tokenCost: z.ZodOptional<z.ZodNumber>;
284
- complexityScore: z.ZodOptional<z.ZodNumber>;
285
- consistencyScore: z.ZodOptional<z.ZodNumber>;
286
- docFreshnessScore: z.ZodOptional<z.ZodNumber>;
287
- aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
288
- agentGroundingScore: z.ZodOptional<z.ZodNumber>;
289
- testabilityScore: z.ZodOptional<z.ZodNumber>;
290
- docDriftScore: z.ZodOptional<z.ZodNumber>;
291
- dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
292
- modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
293
- estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
294
- estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
295
- comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
296
- totalSymbols: z.ZodOptional<z.ZodNumber>;
297
- totalExports: z.ZodOptional<z.ZodNumber>;
298
- }, z.core.$strip>;
299
- }, z.core.$strip>>;
300
- scoring: z.ZodOptional<z.ZodObject<{
301
- overall: z.ZodNumber;
302
- rating: z.ZodString;
303
- timestamp: z.ZodString;
304
- breakdown: z.ZodArray<z.ZodObject<{
305
- toolName: z.ZodUnion<readonly [z.ZodEnum<typeof ToolName>, z.ZodString]>;
306
- score: z.ZodNumber;
307
- }, z.core.$catchall<z.ZodAny>>>;
308
- }, z.core.$strip>>;
309
- }, z.core.$catchall<z.ZodAny>>;
310
- type UnifiedReport = z.infer<typeof UnifiedReportSchema>;
311
-
312
- /**
313
- * AST Parsing and Export Extraction Types
314
- */
315
- /**
316
- * Location information in source code
317
- */
318
- interface SourceLocation {
319
- line: number;
320
- column: number;
321
- }
322
- /**
323
- * Range information in source code
324
- */
325
- interface SourceRange {
326
- start: SourceLocation;
327
- end: SourceLocation;
328
- }
329
- interface ExportWithImports {
330
- name: string;
331
- type: 'function' | 'class' | 'const' | 'type' | 'interface' | 'default';
332
- imports: string[];
333
- dependencies: string[];
334
- typeReferences: string[];
335
- loc?: SourceRange;
336
- }
337
- /**
338
- * Information about a single import declaration
339
- */
340
- interface FileImport {
341
- /** Module being imported from */
342
- source: string;
343
- /** What's being imported */
344
- specifiers: string[];
345
- /** Is this a type-only import (TypeScript) */
346
- isTypeOnly?: boolean;
347
- /** Location in source */
348
- loc?: SourceRange;
349
- }
350
- interface ASTNode {
351
- type: string;
352
- loc?: SourceRange;
353
- }
354
- /**
355
- * AI token budget unit economics (v0.13+)
356
- */
357
- interface TokenBudget {
358
- totalContextTokens: number;
359
- estimatedResponseTokens?: number;
360
- wastedTokens: {
361
- total: number;
362
- bySource: {
363
- duplication: number;
364
- fragmentation: number;
365
- chattiness: number;
366
- };
367
- };
368
- efficiencyRatio: number;
369
- potentialRetrievableTokens: number;
370
- }
371
-
372
- /**
373
- * Shared types for graph-based visualizations
374
- */
375
- interface GraphNode {
376
- id: string;
377
- label: string;
378
- path?: string;
379
- size?: number;
380
- value?: number;
381
- color?: string;
382
- group?: string;
383
- title?: string;
384
- x?: number;
385
- y?: number;
386
- duplicates?: number;
387
- tokenCost?: number;
388
- severity?: string;
389
- }
390
- interface GraphEdge {
391
- source: string;
392
- target: string;
393
- type?: string;
394
- weight?: number;
395
- }
396
- interface GraphData {
397
- nodes: GraphNode[];
398
- edges: GraphEdge[];
399
- clusters?: {
400
- id: string;
401
- name: string;
402
- nodeIds: string[];
403
- }[];
404
- issues?: {
405
- id: string;
406
- type: string;
407
- severity: string;
408
- nodeIds: string[];
409
- message: string;
410
- }[];
411
- metadata?: any;
412
- /** Whether the graph was truncated due to size limits */
413
- truncated?: {
414
- nodes: boolean;
415
- edges: boolean;
416
- nodeCount?: number;
417
- edgeCount?: number;
418
- nodeLimit?: number;
419
- edgeLimit?: number;
420
- };
421
- }
422
-
423
- /**
424
- * Lead Source identifiers.
425
- */
426
- declare enum LeadSource {
427
- ClawMoreHero = "clawmore-hero",
428
- ClawMoreWaitlist = "clawmore-waitlist",
429
- ClawMoreBeta = "clawmore-beta",
430
- AiReadyPlatform = "aiready-platform"
431
- }
432
- /** Zod schema for LeadSource enum */
433
- declare const LeadSourceSchema: z.ZodEnum<typeof LeadSource>;
434
- /**
435
- * Business Lead schema for waitlists and beta signups.
436
- */
437
- declare const LeadSchema: z.ZodObject<{
438
- id: z.ZodString;
439
- email: z.ZodString;
440
- name: z.ZodString;
441
- interest: z.ZodDefault<z.ZodString>;
442
- notes: z.ZodOptional<z.ZodString>;
443
- timestamp: z.ZodString;
444
- source: z.ZodEnum<typeof LeadSource>;
445
- status: z.ZodDefault<z.ZodEnum<{
446
- new: "new";
447
- contacted: "contacted";
448
- qualified: "qualified";
449
- converted: "converted";
450
- archived: "archived";
451
- }>>;
452
- }, z.core.$strip>;
453
- type Lead = z.infer<typeof LeadSchema>;
454
- /**
455
- * Lead Submission (input from form)
456
- */
457
- declare const LeadSubmissionSchema: z.ZodObject<{
458
- source: z.ZodEnum<typeof LeadSource>;
459
- email: z.ZodString;
460
- name: z.ZodString;
461
- interest: z.ZodDefault<z.ZodString>;
462
- notes: z.ZodOptional<z.ZodString>;
463
- }, z.core.$strip>;
464
- type LeadSubmission = z.infer<typeof LeadSubmissionSchema>;
465
- /**
466
- * Managed AWS Account metadata for the Account Vending Machine.
467
- */
468
- declare const ManagedAccountSchema: z.ZodObject<{
469
- id: z.ZodString;
470
- accountId: z.ZodString;
471
- userId: z.ZodString;
472
- stripeSubscriptionId: z.ZodString;
473
- tokenStrategy: z.ZodDefault<z.ZodEnum<{
474
- managed: "managed";
475
- byok: "byok";
476
- }>>;
477
- byokConfig: z.ZodOptional<z.ZodObject<{
478
- openaiKey: z.ZodOptional<z.ZodString>;
479
- anthropicKey: z.ZodOptional<z.ZodString>;
480
- openrouterKey: z.ZodOptional<z.ZodString>;
481
- }, z.core.$strip>>;
482
- baseFeeCents: z.ZodDefault<z.ZodNumber>;
483
- includedComputeCents: z.ZodDefault<z.ZodNumber>;
484
- includedTokenCents: z.ZodDefault<z.ZodNumber>;
485
- prepaidTokenBalanceCents: z.ZodDefault<z.ZodNumber>;
486
- currentMonthlyTokenSpendCents: z.ZodDefault<z.ZodNumber>;
487
- status: z.ZodDefault<z.ZodEnum<{
488
- provisioning: "provisioning";
489
- active: "active";
490
- warning: "warning";
491
- quarantined: "quarantined";
492
- suspended: "suspended";
493
- }>>;
494
- lastCostSyncAt: z.ZodOptional<z.ZodString>;
495
- region: z.ZodDefault<z.ZodString>;
496
- alertThresholds: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
497
- }, z.core.$strip>;
498
- type ManagedAccount = z.infer<typeof ManagedAccountSchema>;
499
-
500
- /**
501
- * AI readiness configuration
502
- */
503
- interface AIReadyConfig {
504
- /** Target score threshold (0-100) */
505
- threshold?: number;
506
- /** Files or directories to include in scan */
507
- include?: string[];
508
- /** Files or directories to exclude from scan */
509
- exclude?: string[];
510
- /** Scan-specific configuration */
511
- scan?: {
512
- include?: string[];
513
- exclude?: string[];
514
- parallel?: boolean;
515
- deep?: boolean;
516
- };
517
- /** Output-specific configuration */
518
- output?: {
519
- /** Output format (json, console, html) */
520
- format?: 'json' | 'console' | 'html';
521
- /** Output file path */
522
- path?: string;
523
- /** Output directory */
524
- saveTo?: string;
525
- /** Whether to show score breakdown in console */
526
- showBreakdown?: boolean;
527
- /** Baseline report to compare against */
528
- compareBaseline?: string;
529
- };
530
- /** Tool-specific configuration overrides */
531
- tools?: Record<string, any>;
532
- /** Scoring profile and weights */
533
- scoring?: {
534
- /** Name of the scoring profile (e.g. "strict", "balanced") */
535
- profile?: string;
536
- /** Custom weights for tools and metrics */
537
- weights?: Record<string, number>;
538
- };
539
- }
540
- /**
541
- * Legacy alias for Config
542
- */
543
- type Config = AIReadyConfig;
544
- /**
545
- * Scan options for tool providers
546
- */
547
- interface ScanOptions extends ToolOptions {
548
- /** Target output format */
549
- output?: string | {
550
- format: string;
551
- file?: string;
552
- };
553
- /** Visual format (json/console/html) */
554
- format?: 'json' | 'console' | 'html';
555
- /** Whether to run in parallel */
556
- parallel?: boolean;
557
- }
558
- /**
559
- * Result of a single tool execution
560
- */
561
- interface ToolOutput {
562
- /** Unique name/ID of the tool */
563
- toolName: ToolName | string;
564
- /** Whether the tool ran successfully */
565
- success: boolean;
566
- /** List of issues found by the tool */
567
- issues: IssueType[] | any[];
568
- /** Numeric metrics produced by the tool */
569
- metrics: Metrics;
570
- /** Execution duration in milliseconds */
571
- duration?: number;
572
- }
573
- /**
574
- * Overall scan result
575
- */
576
- interface ScanResult {
577
- /** ISO timestamp of the scan */
578
- timestamp: string;
579
- /** Root directory analyzed */
580
- rootDir: string;
581
- /** Number of files processed */
582
- filesAnalyzed: number;
583
- /** Total issues found across all tools */
584
- totalIssues: number;
585
- /** Breakdown of issue counts by type */
586
- issuesByType: Record<string, number>;
587
- /** Breakdown of issue counts by severity */
588
- issuesBySeverity: Record<Severity | string, number>;
589
- /** Final calculated AIReady score (0-100) */
590
- score: number;
591
- /** Individual tool outputs */
592
- tools: ToolOutput[];
593
- }
594
- /**
595
- * Cost configuration for business impact analysis
596
- */
597
- interface CostConfig {
598
- /** Price in USD per 1,000 tokens */
599
- pricePer1KTokens: number;
600
- /** Average number of AI queries per developer per day */
601
- queriesPerDevPerDay: number;
602
- /** Total number of developers in the team */
603
- developerCount: number;
604
- /** Working days per month */
605
- daysPerMonth: number;
606
- }
607
- /**
608
- * Productivity impact metrics
609
- */
610
- interface ProductivityImpact {
611
- /** Estimated developer hours wasted on quality issues */
612
- totalHours: number;
613
- /** Developer hourly rate used for calculation */
614
- hourlyRate: number;
615
- /** Estimated total monthly cost of productivity loss */
616
- totalCost: number;
617
- /** Impact breakdown by severity */
618
- bySeverity: Record<Severity | string, {
619
- /** Hours lost for this severity level */
620
- hours: number;
621
- /** Cost associated with these hours */
622
- cost: number;
623
- }>;
624
- }
625
- /**
626
- * AI suggestion acceptance prediction
627
- */
628
- interface AcceptancePrediction {
629
- /** Predicted acceptance rate (0-1) */
630
- rate: number;
631
- /** Confidence level of the prediction (0-1) */
632
- confidence: number;
633
- /** Qualitative factors influencing the prediction */
634
- factors: Array<{
635
- /** Factor name */
636
- name: string;
637
- /** Impact weight (-100 to 100) */
638
- impact: number;
639
- }>;
640
- }
641
- /**
642
- * Technical Value Chain summary
643
- */
644
- interface TechnicalValueChain {
645
- /** Overall business value score for the component */
646
- score?: number;
647
- /** Business logic density (e.g. core vs boilerplate) */
648
- density?: number;
649
- /** Data access layer complexity */
650
- complexity?: number;
651
- /** API surface area and exposure */
652
- surface?: number;
653
- /** Issue type associated with this chain */
654
- issueType?: string;
655
- /** Name of the leading technical metric */
656
- technicalMetric?: string;
657
- /** Raw value of the technical metric */
658
- technicalValue?: number;
659
- /** Impact on AI agents */
660
- aiImpact?: {
661
- description: string;
662
- scoreImpact: number;
663
- };
664
- /** Impact on developer experience */
665
- developerImpact?: {
666
- description: string;
667
- productivityLoss: number;
668
- };
669
- /** Predicted business outcome */
670
- businessOutcome?: {
671
- directCost: number;
672
- opportunityCost: number;
673
- riskLevel: 'low' | 'moderate' | 'high' | 'critical';
674
- };
675
- }
676
- /**
677
- * Compatibility alias
678
- */
679
- type TechnicalValueChainSummary = TechnicalValueChain;
680
- /**
681
- * Code comprehension difficulty metrics
682
- */
683
- interface ComprehensionDifficulty {
684
- /** Overall difficulty score (0-100) */
685
- score: number;
686
- /** Descriptive rating of difficulty */
687
- rating: 'trivial' | 'easy' | 'moderate' | 'difficult' | 'expert';
688
- /** Ratios and factors contributing to difficulty */
689
- factors: {
690
- /** Ratio of file tokens to model context limit */
691
- budgetRatio: number;
692
- /** Relative depth of dependency tree */
693
- depthRatio: number;
694
- /** Level of logical fragmentation */
695
- fragmentation: number;
696
- };
697
- }
698
- /**
699
- * Business impact metrics (v0.10+)
700
- */
701
- interface BusinessMetrics {
702
- /** Predicted monthly cost of technical waste */
703
- estimatedMonthlyCost?: number;
704
- /** Estimated developer hours lost per month */
705
- estimatedDeveloperHours?: number;
706
- /** Predicted rate of AI suggestion acceptance */
707
- aiAcceptanceRate?: number;
708
- /** Overall AI readiness score */
709
- aiReadinessScore?: number;
710
- }
711
- /**
712
- * Canonical file content structure
713
- */
714
- interface FileContent {
715
- /** Absolute or relative file path */
716
- file: string;
717
- /** UTF-8 file content */
718
- content: string;
719
- }
720
- /**
721
- * Constants for tests and configuration stability
722
- */
723
- declare const GLOBAL_INFRA_OPTIONS: string[];
724
- declare const GLOBAL_SCAN_OPTIONS: string[];
725
- declare const COMMON_FINE_TUNING_OPTIONS: string[];
726
-
727
- /**
728
- * Analysis issue mapping to graph
729
- */
730
- type GraphIssueSeverity = Severity;
731
- /**
732
- * Graph metadata
733
- */
734
- interface GraphMetadata {
735
- /** Project name if available */
736
- projectName?: string;
737
- /** ISO timestamp of analysis */
738
- timestamp: string;
739
- /** Total number of files in the graph */
740
- totalFiles: number;
741
- /** Total dependency edges in the graph */
742
- totalDependencies: number;
743
- /** Types of analysis performed */
744
- analysisTypes: string[];
745
- /** Count of critical issues in graph nodes */
746
- criticalIssues: number;
747
- /** Count of major issues in graph nodes */
748
- majorIssues: number;
749
- /** Count of minor issues in graph nodes */
750
- minorIssues: number;
751
- /** Count of informational issues in graph nodes */
752
- infoIssues: number;
753
- /** AI token budget unit economics (v0.13+) */
754
- tokenBudget?: TokenBudget;
755
- /** Execution time in milliseconds */
756
- executionTime?: number;
757
- }
758
-
759
- /**
760
- * Language-agnostic AST and parser interfaces for multi-language support
761
- *
762
- * This module provides abstractions for parsing different programming languages
763
- * while maintaining a consistent interface for analysis tools.
764
- */
765
-
766
- /**
767
- * Supported programming languages
768
- */
769
- declare enum Language {
770
- TypeScript = "typescript",
771
- JavaScript = "javascript",
772
- Python = "python",
773
- Java = "java",
774
- Go = "go",
775
- Rust = "rust",
776
- CSharp = "csharp"
777
- }
778
- /**
779
- * File extensions mapped to languages
780
- */
781
- declare const LANGUAGE_EXTENSIONS: Record<string, Language>;
782
- /**
783
- * Common AST node type (language-agnostic)
784
- */
785
- interface CommonASTNode {
786
- type: string;
787
- loc?: SourceRange;
788
- raw?: any;
789
- }
790
- /**
791
- * Export information (function, class, variable, etc.)
792
- */
793
- interface ExportInfo {
794
- name: string;
795
- type: 'function' | 'class' | 'const' | 'type' | 'interface' | 'default' | 'variable';
796
- loc?: SourceRange;
797
- /** Imports used within this export */
798
- imports?: string[];
799
- /** Dependencies on other exports in same file */
800
- dependencies?: string[];
801
- /** TypeScript types referenced */
802
- typeReferences?: string[];
803
- /** For methods: parent class name */
804
- parentClass?: string;
805
- /** For functions/methods: parameters */
806
- parameters?: string[];
807
- /** For classes/interfaces: number of methods and properties */
808
- methodCount?: number;
809
- propertyCount?: number;
810
- /** Visibility (public, private, protected) */
811
- visibility?: 'public' | 'private' | 'protected';
812
- /** Behavioral metadata for advanced metrics */
813
- isPure?: boolean;
814
- hasSideEffects?: boolean;
815
- /** Associated documentation */
816
- documentation?: {
817
- content: string;
818
- type: 'jsdoc' | 'docstring' | 'comment' | 'xml-doc';
819
- loc?: SourceRange;
820
- isStale?: boolean;
821
- };
822
- }
823
- /**
824
- * Parse result containing exports and imports
825
- */
826
- interface ParseResult {
827
- exports: ExportInfo[];
828
- imports: FileImport[];
829
- /** Language of the parsed file */
830
- language: Language;
831
- /** Any parse warnings (non-fatal) */
832
- warnings?: string[];
833
- }
834
- /**
835
- * Naming convention rules per language
836
- */
837
- interface NamingConvention {
838
- /** Allowed variable naming patterns */
839
- variablePattern: RegExp;
840
- /** Allowed function naming patterns */
841
- functionPattern: RegExp;
842
- /** Allowed class naming patterns */
843
- classPattern: RegExp;
844
- /** Allowed constant naming patterns */
845
- constantPattern: RegExp;
846
- /** Allowed type naming patterns */
847
- typePattern?: RegExp;
848
- /** Allowed interface naming patterns */
849
- interfacePattern?: RegExp;
850
- /** Language-specific exceptions (e.g., __init__ in Python) */
851
- exceptions?: string[];
852
- }
853
- /**
854
- * Language-specific configuration
855
- */
856
- interface LanguageConfig {
857
- language: Language;
858
- /** File extensions for this language */
859
- extensions: string[];
860
- /** Naming conventions */
861
- namingConventions: NamingConvention;
862
- /** Common abbreviations allowed */
863
- allowedAbbreviations?: string[];
864
- /** Language-specific keywords to ignore */
865
- keywords?: string[];
866
- }
867
- /**
868
- * Abstract interface for language parsers
869
- * Each language implementation should implement this interface
870
- */
871
- interface LanguageParser {
872
- /** Language this parser handles */
873
- readonly language: Language;
874
- /** File extensions this parser supports */
875
- readonly extensions: string[];
876
- /**
877
- * Parse source code and extract structure
878
- * @param code - Source code to parse
879
- * @param filePath - Path to the file (for context)
880
- * @returns Parse result with exports and imports
881
- * @throws ParseError if code has syntax errors
882
- */
883
- parse(code: string, filePath: string): ParseResult;
884
- /**
885
- * Get naming conventions for this language
886
- */
887
- getNamingConventions(): NamingConvention;
888
- /**
889
- * Initialize the parser (e.g. load WASM)
890
- */
891
- initialize(): Promise<void>;
892
- /**
893
- * Check if this parser can handle a file
894
- * @param filePath - File path to check
895
- */
896
- canHandle(filePath: string): boolean;
897
- /**
898
- * Get the raw AST for advanced querying
899
- * @param code - Source code to parse
900
- * @param filePath - Path to the file
901
- */
902
- getAST(code: string, filePath: string): Promise<any>;
903
- /**
904
- * Analyze structural metadata for a node (e.g. purity)
905
- * @param node - The AST node to analyze (language specific)
906
- * @param code - The original source code
907
- */
908
- analyzeMetadata(node: any, code: string): Partial<ExportInfo>;
909
- }
910
- /**
911
- * Parser error with location information
912
- */
913
- declare class ParseError extends Error {
914
- readonly filePath: string;
915
- readonly loc?: SourceLocation | undefined;
916
- constructor(message: string, filePath: string, loc?: SourceLocation | undefined);
917
- }
918
- /**
919
- * Statistics about parsed code
920
- */
921
- interface ParseStatistics {
922
- language: Language;
923
- filesAnalyzed: number;
924
- totalExports: number;
925
- totalImports: number;
926
- parseErrors: number;
927
- warnings: number;
928
- }
929
-
930
- /**
931
- * Priority levels for actionable recommendations.
932
- * Used to sort and display fixes for the user.
933
- */
934
- declare enum RecommendationPriority {
935
- High = "high",
936
- Medium = "medium",
937
- Low = "low"
938
- }
939
- /**
940
- * AI Readiness Rating categories.
941
- * Provides a high-level qualitative assessment based on the numeric score.
942
- */
943
- declare enum ReadinessRating {
944
- Excellent = "Excellent",
945
- Good = "Good",
946
- Fair = "Fair",
947
- NeedsWork = "Needs Work",
948
- Critical = "Critical"
949
- }
950
- /**
951
- * Output structure for a single tool's scoring analysis.
952
- */
953
- interface ToolScoringOutput {
954
- /** Unique tool identifier (e.g., "pattern-detect") */
955
- toolName: string;
956
- /** Normalized 0-100 score for this tool */
957
- score: number;
958
- /** AI token budget unit economics (v0.13+) */
959
- tokenBudget?: TokenBudget;
960
- /** Raw metrics used to calculate the score */
961
- rawMetrics: Record<string, any>;
962
- /** Factors that influenced the score */
963
- factors: Array<{
964
- /** Human-readable name of the factor */
965
- name: string;
966
- /** Points contribution (positive or negative) */
967
- impact: number;
968
- /** Explanation of the factor's impact */
969
- description: string;
970
- }>;
971
- /** Actionable recommendations with estimated impact */
972
- recommendations: Array<{
973
- /** The recommended action to take */
974
- action: string;
975
- /** Potential points increase if implemented */
976
- estimatedImpact: number;
977
- /** Implementation priority */
978
- priority: RecommendationPriority | 'high' | 'medium' | 'low';
979
- }>;
980
- }
981
- /**
982
- * Consolidated scoring result across all tools.
983
- */
984
- interface ScoringResult {
985
- /** Overall AI Readiness Score (0-100) */
986
- overall: number;
987
- /** Rating category representing the overall readiness */
988
- rating: ReadinessRating | string;
989
- /** Timestamp of score calculation */
990
- timestamp: string;
991
- /** Tools that contributed to this score */
992
- toolsUsed: string[];
993
- /** Breakdown by individual tool */
994
- breakdown: ToolScoringOutput[];
995
- /** Internal calculation details for transparency */
996
- calculation: {
997
- /** Textual representation of the calculation formula */
998
- formula: string;
999
- /** Weights applied to each tool */
1000
- weights: Record<string, number>;
1001
- /** Simplified normalized formula output */
1002
- normalized: string;
1003
- };
1004
- }
1005
- /**
1006
- * Configuration options for the scoring system.
1007
- */
1008
- interface ScoringConfig {
1009
- /** Minimum passing score (CLI will exit with non-zero if below) */
1010
- threshold?: number;
1011
- /** Whether to show the detailed tool-by-tool breakdown */
1012
- showBreakdown?: boolean;
1013
- /** Path to a baseline report JSON for trend comparison */
1014
- compareBaseline?: string;
1015
- /** Target file path to persist the calculated score */
1016
- saveTo?: string;
1017
- }
1018
- /**
1019
- * Default weights for known tools.
1020
- */
1021
- declare const DEFAULT_TOOL_WEIGHTS: Record<string, number>;
1022
- /**
1023
- * Tool name normalization map.
1024
- * Maps common shorthands and aliases to canonical tool IDs.
1025
- */
1026
- declare const TOOL_NAME_MAP: Record<string, string>;
1027
- /**
1028
- * Model context tiers for context-aware threshold calibration.
1029
- */
1030
- type ModelContextTier = 'compact' | 'standard' | 'extended' | 'frontier';
1031
- /**
1032
- * Scoring profiles for project-aware weighting adjustments.
1033
- *
1034
- * Different profiles prioritize different aspects of AI readiness based
1035
- * on the project's primary focus.
1036
- */
1037
- declare enum ScoringProfile {
1038
- Default = "default",
1039
- Agentic = "agentic",// Focus on AI agent navigation and signal
1040
- Logic = "logic",// Focus on testability and complexity
1041
- UI = "ui",// Focus on consistency and context
1042
- Cost = "cost",// Focus on token waste reduction
1043
- Security = "security"
1044
- }
1045
- /**
1046
- * Project-type-aware tool weight presets for different profiles.
1047
- */
1048
- declare const SCORING_PROFILES: Record<ScoringProfile, Record<string, number>>;
1049
- /**
1050
- * Context budget thresholds per tier.
1051
- *
1052
- * "Ideal" represents target state. "Critical" represents failure state.
1053
- */
1054
- declare const CONTEXT_TIER_THRESHOLDS: Record<ModelContextTier, {
1055
- idealTokens: number;
1056
- criticalTokens: number;
1057
- idealDepth: number;
1058
- }>;
1059
- /**
1060
- * Project-size-adjusted minimum thresholds.
1061
- *
1062
- * Larger projects have slightly lower thresholds due to inherent complexity.
1063
- */
1064
- declare const SIZE_ADJUSTED_THRESHOLDS: Record<string, number>;
1065
- /**
1066
- * Determine project size tier based on the total number of files.
1067
- *
1068
- * @param fileCount Total number of files in the project
1069
- * @returns A string identifier for the project size tier (xs, small, medium, large, enterprise)
1070
- */
1071
- declare function getProjectSizeTier(fileCount: number): keyof typeof SIZE_ADJUSTED_THRESHOLDS;
1072
- /**
1073
- * Calculate the recommended minimum AI readiness threshold for a project.
1074
- *
1075
- * Threshold is adjusted based on project size and the model context tier targeted.
1076
- *
1077
- * @param fileCount Total number of files in the project
1078
- * @param modelTier The model context tier targeted (compact, standard, extended, frontier)
1079
- * @returns The recommended score threshold (0-100)
1080
- */
1081
- declare function getRecommendedThreshold(fileCount: number, modelTier?: ModelContextTier): number;
1082
- /**
1083
- * Normalize a tool name from a shorthand or alias to its canonical ID.
1084
- *
1085
- * @param shortName The tool shorthand or alias name
1086
- * @returns The canonical tool ID
1087
- */
1088
- declare function normalizeToolName(shortName: string): string;
1089
- /**
1090
- * Retrieve the weight for a specific tool, considering overrides and profiles.
1091
- *
1092
- * @param toolName The canonical tool ID
1093
- * @param toolConfig Optional configuration for the tool containing a weight
1094
- * @param cliOverride Optional weight override from the CLI
1095
- * @param profile Optional scoring profile to use
1096
- * @returns The weight to be used for this tool in overall scoring
1097
- */
1098
- declare function getToolWeight(toolName: string, toolConfig?: {
1099
- scoreWeight?: number;
1100
- }, cliOverride?: number, profile?: ScoringProfile): number;
1101
- /**
1102
- * Parse a comma-separated weight string from the CLI.
1103
- *
1104
- * Format: "tool1:weight1,tool2:weight2"
1105
- *
1106
- * @param weightStr The raw weight string from the CLI or config
1107
- * @returns A Map of tool IDs to their parsed weights
1108
- */
1109
- declare function parseWeightString(weightStr?: string): Map<string, number>;
1110
- /**
1111
- * Calculate the overall consolidated AI Readiness Score.
1112
- *
1113
- * Orchestrates the weighted aggregation of all tool individual scores.
1114
- *
1115
- * @param toolOutputs Map of tool IDs to their individual scoring outputs
1116
- * @param config Optional global configuration
1117
- * @param cliWeights Optional weight overrides from the CLI
1118
- * @returns Consolidate ScoringResult including overall score and rating
1119
- */
1120
- declare function calculateOverallScore(toolOutputs: Map<string, ToolScoringOutput>, config?: any, cliWeights?: Map<string, number>): ScoringResult;
1121
- /**
1122
- * Convert numeric score to qualitative rating category.
1123
- *
1124
- * @param score The numerical AI readiness score (0-100)
1125
- * @returns The corresponding ReadinessRating category
1126
- */
1127
- declare function getRating(score: number): ReadinessRating;
1128
- /**
1129
- * Get a URL-friendly slug representing the rating category.
1130
- *
1131
- * @param score The numerical score
1132
- * @returns A kebab-case string (e.g., 'excellent', 'needs-work')
1133
- */
1134
- declare function getRatingSlug(score: number): string;
1135
- /**
1136
- * Convert score to rating with project-size and model awareness.
1137
- *
1138
- * Provides a more accurate rating by considering the target model's limits.
1139
- *
1140
- * @param score The numerical AI readiness score
1141
- * @param fileCount Total number of files in the project
1142
- * @param modelTier The model context tier being targeted
1143
- * @returns The size-aware ReadinessRating
1144
- */
1145
- declare function getRatingWithContext(score: number, fileCount: number, modelTier?: ModelContextTier): ReadinessRating;
1146
- /**
1147
- * Get display properties (emoji and color) for a given rating.
1148
- *
1149
- * @param rating The readiness rating category
1150
- * @returns Object containing display emoji and color string
1151
- */
1152
- declare function getRatingDisplay(rating: ReadinessRating | string): {
1153
- emoji: string;
1154
- color: string;
1155
- };
1156
- /**
1157
- * Format overall score for compact console display.
1158
- *
1159
- * @param result The consolidated scoring result
1160
- * @returns Formatted string (e.g., "85/100 (Good) 👍")
1161
- */
1162
- declare function formatScore(result: ScoringResult): string;
1163
- /**
1164
- * Format detailed tool score for expanded console display.
1165
- *
1166
- * Includes breakdown of influencing factors and actionable recommendations.
1167
- *
1168
- * @param output The scoring output for a single tool
1169
- * @returns Multi-line formatted string for console output
1170
- */
1171
- declare function formatToolScore(output: ToolScoringOutput): string;
1172
-
1173
- /**
1174
- * Visualization utilities for generating HTML from graph data
1175
- */
1176
-
1177
- /**
1178
- * Generate HTML visualization from graph data
1179
- * Creates an interactive HTML page with a canvas-based graph visualization
1180
- *
1181
- * @param graph - The graph data to visualize
1182
- * @returns HTML string representing the interactive visualization
1183
- */
1184
- declare function generateHTML(graph: GraphData): string;
1185
-
1186
- export { LeadSubmissionSchema as $, type AnalysisResult as A, type BusinessMetrics as B, type CostConfig as C, DEFAULT_TOOL_WEIGHTS as D, type ExportWithImports as E, type FileImport as F, GLOBAL_INFRA_OPTIONS as G, type GraphIssueSeverity as H, type GraphMetadata as I, type GraphNode as J, type Issue as K, type LanguageParser as L, type ModelContextTier as M, type NamingConvention as N, IssueSchema as O, type ProductivityImpact as P, IssueType as Q, IssueTypeSchema as R, type ScanOptions as S, ToolName as T, LANGUAGE_EXTENSIONS as U, type LanguageConfig as V, type Lead as W, LeadSchema as X, LeadSource as Y, LeadSourceSchema as Z, type LeadSubmission as _, type SpokeOutput as a, type Location as a0, LocationSchema as a1, type ManagedAccount as a2, ManagedAccountSchema as a3, type Metrics as a4, MetricsSchema as a5, ModelTier as a6, ModelTierSchema as a7, ParseError as a8, type ParseStatistics as a9, getRatingSlug as aA, getRatingWithContext as aB, getRecommendedThreshold as aC, getToolWeight as aD, normalizeToolName as aE, parseWeightString as aF, ReadinessRating as aa, RecommendationPriority as ab, SCORING_PROFILES as ac, SIZE_ADJUSTED_THRESHOLDS as ad, type ScanResult as ae, type ScoringConfig as af, ScoringProfile as ag, type ScoringResult as ah, SeveritySchema as ai, type SourceLocation as aj, type SourceRange as ak, SpokeOutputSchema as al, type SpokeSummary as am, SpokeSummarySchema as an, TOOL_NAME_MAP as ao, ToolNameSchema as ap, type ToolOutput as aq, type UnifiedReport as ar, UnifiedReportSchema as as, calculateOverallScore as at, formatScore as au, formatToolScore as av, generateHTML as aw, getProjectSizeTier as ax, getRating as ay, getRatingDisplay as az, type ToolScoringOutput as b, type ToolOptions as c, Severity as d, type AIReadyConfig as e, type TokenBudget as f, type AcceptancePrediction as g, type ComprehensionDifficulty as h, type TechnicalValueChainSummary as i, type TechnicalValueChain as j, Language as k, type ParseResult as l, type ExportInfo as m, type ASTNode as n, AnalysisResultSchema as o, AnalysisStatus as p, AnalysisStatusSchema as q, COMMON_FINE_TUNING_OPTIONS as r, CONTEXT_TIER_THRESHOLDS as s, type CommonASTNode as t, type Config as u, FRIENDLY_TOOL_NAMES as v, type FileContent as w, GLOBAL_SCAN_OPTIONS as x, type GraphData as y, type GraphEdge as z };