@aiready/core 0.23.20 → 0.23.22

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