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