@aiready/core 0.24.23 → 0.24.26

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