@aiready/core 0.23.23 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as ToolName, S as ScanOptions, a as SpokeOutput, b as ToolScoringOutput, c as ToolOptions, d as Severity, A as AnalysisResult, E as ExportWithImports, F as FileImport, e as AIReadyConfig, I as Issue, M as Metrics, f as TechnicalValueChain, g as ModelContextTier, C as CostConfig, h as TokenBudget, P as ProductivityImpact, i as AcceptancePrediction, j as ComprehensionDifficulty, k as TechnicalValueChainSummary, L as Language, l as LanguageParser, m as ParseResult, N as NamingConvention, n as ExportInfo } from './index-Ctl_0z6F.js';
2
- export { o as AIReadyConfigSchema, p as ASTNode, q as AnalysisResultSchema, r as AnalysisStatus, s as AnalysisStatusSchema, B as BusinessMetrics, t as COMMON_FINE_TUNING_OPTIONS, u as CONTEXT_TIER_THRESHOLDS, v as CommonASTNode, w as Config, D as DEFAULT_TOOL_WEIGHTS, x as FRIENDLY_TOOL_NAMES, y as FileContent, G as GLOBAL_INFRA_OPTIONS, z as GLOBAL_SCAN_OPTIONS, H as GraphData, J as GraphEdge, K as GraphIssueSeverity, O as GraphMetadata, Q as GraphNode, R as IssueOverlay, U as IssueSchema, V as IssueType, W as IssueTypeSchema, X as LANGUAGE_EXTENSIONS, Y as LanguageConfig, Z as Lead, _ as LeadSchema, $ as LeadSource, a0 as LeadSourceSchema, a1 as LeadSubmission, a2 as LeadSubmissionSchema, a3 as Location, a4 as LocationSchema, a5 as ManagedAccount, a6 as ManagedAccountSchema, a7 as MetricsSchema, a8 as ModelTier, a9 as ModelTierSchema, aa as ParseError, ab as ParseStatistics, ac as ReadinessRating, ad as RecommendationPriority, ae as SCORING_PROFILES, af as SIZE_ADJUSTED_THRESHOLDS, ag as ScanResult, ah as ScoringConfig, ai as ScoringProfile, aj as ScoringResult, ak as SeveritySchema, al as SourceLocation, am as SourceRange, an as SpokeOutputSchema, ao as SpokeSummary, ap as SpokeSummarySchema, aq as TOOL_NAME_MAP, ar as ToolNameSchema, as as ToolOutput, at as UnifiedReport, au as UnifiedReportSchema, av as calculateOverallScore, aw as formatScore, ax as formatToolScore, ay as generateHTML, az as getPriorityIcon, aA as getProjectSizeTier, aB as getRating, aC as getRatingDisplay, aD as getRatingEmoji, aE as getRatingLabel, aF as getRatingMetadata, aG as getRatingSlug, aH as getRatingWithContext, aI as getRecommendedThreshold, aJ as getToolEmoji, aK as getToolWeight, aL as normalizeToolName, aM as parseWeightString } from './index-Ctl_0z6F.js';
1
+ import { T as ToolName, S as ScanOptions, a as SpokeOutput, b as ToolScoringOutput, c as Severity, d as ToolOptions, A as AnalysisResult, E as ExportWithImports, F as FileImport, e as AIReadyConfig, I as Issue, M as Metrics, f as TechnicalValueChain, g as ModelContextTier, C as CostConfig, h as TokenBudget, P as ProductivityImpact, i as AcceptancePrediction, j as ComprehensionDifficulty, k as TechnicalValueChainSummary, L as Language, l as LanguageParser, m as ParseResult, N as NamingConvention, n as ExportInfo } from './index-EQ2jRSlB.js';
2
+ export { o as AIReadyConfigSchema, p as ASTNode, q as AnalysisResultSchema, r as AnalysisStatus, s as AnalysisStatusSchema, B as BusinessMetrics, t as COMMON_FINE_TUNING_OPTIONS, u as CONTEXT_TIER_THRESHOLDS, v as CommonASTNode, w as Config, D as DEFAULT_TOOL_WEIGHTS, x as FRIENDLY_TOOL_NAMES, y as FileContent, G as GLOBAL_INFRA_OPTIONS, z as GLOBAL_SCAN_OPTIONS, H as GraphData, J as GraphEdge, K as GraphIssueSeverity, O as GraphMetadata, Q as GraphNode, R as IssueOverlay, U as IssueSchema, V as IssueType, W as IssueTypeSchema, X as LANGUAGE_EXTENSIONS, Y as LanguageConfig, Z as Lead, _ as LeadSchema, $ as LeadSource, a0 as LeadSourceSchema, a1 as LeadSubmission, a2 as LeadSubmissionSchema, a3 as Location, a4 as LocationSchema, a5 as ManagedAccount, a6 as ManagedAccountSchema, a7 as MetricsSchema, a8 as ModelTier, a9 as ModelTierSchema, aa as ParseError, ab as ParseStatistics, ac as ReadinessRating, ad as RecommendationPriority, ae as SCORING_PROFILES, af as SIZE_ADJUSTED_THRESHOLDS, ag as ScanResult, ah as ScoringConfig, ai as ScoringProfile, aj as ScoringResult, ak as SeveritySchema, al as SourceLocation, am as SourceRange, an as SpokeOutputSchema, ao as SpokeSummary, ap as SpokeSummarySchema, aq as TOOL_NAME_MAP, ar as ToolNameSchema, as as ToolOutput, at as UnifiedReport, au as UnifiedReportSchema, av as calculateOverallScore, aw as formatScore, ax as formatToolScore, ay as generateHTML, az as getPriorityIcon, aA as getProjectSizeTier, aB as getRating, aC as getRatingDisplay, aD as getRatingEmoji, aE as getRatingLabel, aF as getRatingMetadata, aG as getRatingSlug, aH as getRatingWithContext, aI as getRecommendedThreshold, aJ as getToolEmoji, aK as getToolWeight, aL as normalizeToolName, aM as parseWeightString } from './index-EQ2jRSlB.js';
3
3
  import { z } from 'zod';
4
4
  import * as chalk from 'chalk';
5
5
  import * as Parser from 'web-tree-sitter';
@@ -199,11 +199,10 @@ declare function getFileExtension(filePath: string): string;
199
199
  */
200
200
  declare function isSourceFile(filePath: string): boolean;
201
201
 
202
- /**
203
- * Common CLI configuration interface
204
- * @deprecated Use ToolOptions from @aiready/core instead
205
- */
206
- type CLIOptions = ToolOptions;
202
+ /** @internal */
203
+ declare function ensureDir(path: string): void;
204
+ /** @internal */
205
+ declare function getFilesByPattern(dir: string, pattern: RegExp): string[];
207
206
  /**
208
207
  * Resolve output file path, defaulting to .aiready directory.
209
208
  * Creates parent directories if they don't exist.
@@ -215,18 +214,6 @@ type CLIOptions = ToolOptions;
215
214
  * @lastUpdated 2026-03-18
216
215
  */
217
216
  declare function resolveOutputPath(userPath: string | undefined, defaultFilename: string, workingDir?: string): string;
218
- /**
219
- * Load and merge configuration with CLI options.
220
- *
221
- * @param directory - Root directory to load config from.
222
- * @param defaults - Default configuration values.
223
- * @param cliOptions - Configuration overrides from CLI arguments.
224
- * @returns Merged configuration object.
225
- * @lastUpdated 2026-03-18
226
- */
227
- declare function loadMergedConfig<T extends Record<string, any>>(directory: string, defaults: T, cliOptions: Partial<T>): Promise<T & {
228
- rootDir: string;
229
- }>;
230
217
  /**
231
218
  * Handle JSON output for CLI commands.
232
219
  * Writes to file if outputFile is provided, otherwise logs to console.
@@ -238,46 +225,74 @@ declare function loadMergedConfig<T extends Record<string, any>>(directory: stri
238
225
  */
239
226
  declare function handleJSONOutput(data: any, outputFile?: string, successMessage?: string): void;
240
227
  /**
241
- * Get a formatted terminal divider string based on current terminal width.
228
+ * Find the latest aiready report in a directory by modification time.
229
+ * Searches for both new format (aiready-report-*) and legacy format (aiready-scan-*).
242
230
  *
243
- * @param color - Chalk color function to use for the divider.
244
- * @param maxWidth - Maximum width for the divider (default: 60).
245
- * @returns String representation of the divider.
231
+ * @param dirPath - The directory path to search for .aiready directory.
232
+ * @returns The path to the latest report or null if not found.
233
+ * @lastUpdated 2026-03-18
246
234
  */
247
- declare function getTerminalDivider(color?: any, maxWidth?: number): string;
235
+ declare function findLatestReport(dirPath: string): string | null;
248
236
  /**
249
- * Print a standard terminal header with dividers.
237
+ * Find the latest scan report file with a specific prefix.
250
238
  *
251
- * @param title - Header title text.
252
- * @param color - Chalk color function for the dividers.
239
+ * @param scanReportsDir - Directory containing reports.
240
+ * @param reportFilePrefix - Filename prefix to match (e.g. "report-").
241
+ * @returns Path to the latest matching report or null.
242
+ * @lastUpdated 2026-03-18
253
243
  */
254
- declare function printTerminalHeader(title: string, color?: any): void;
244
+ declare function findLatestScanReport(scanReportsDir: string, reportFilePrefix: string): string | null;
245
+
246
+ /** @internal */
247
+ declare function normalizeSeverity(s: string | undefined): Severity | null;
255
248
  /**
256
- * Common CLI error handler for CLI commands.
257
- * Logs error and exits process with code 1.
249
+ * Get numeric severity value for comparison (4-1)
250
+ * @param s Severity level string
251
+ * @returns Numeric value (4: critical, 3: major, 2: minor, 1: info)
252
+ */
253
+ declare function getSeverityValue(s: string | undefined): number;
254
+ /**
255
+ * Get numeric severity level (alias for getSeverityValue)
256
+ * @param s Severity level string
257
+ * @returns Numeric value
258
+ */
259
+ declare function getSeverityLevel(s: string | undefined): number;
260
+ /**
261
+ * Get Severity enum from string for internal logic
262
+ * @param s Severity level string
263
+ * @returns Normalized severity string
264
+ */
265
+ declare function getSeverityEnum(s: string | undefined): any;
266
+ /**
267
+ * Get chalk color function for a given severity
258
268
  *
259
- * @param error - Error object or message.
260
- * @param commandName - Name of the command that failed.
261
- * @returns Never returns as it exits the process.
262
- * @lastUpdated 2026-03-18
269
+ * @param severity - Severity level string.
270
+ * @param chalkInstance - Optional chalk instance to use.
271
+ * @returns Chalk color function.
263
272
  */
264
- declare function handleCLIError(error: unknown, commandName: string): never;
273
+ declare function getSeverityColor(severity: string, chalkInstance?: any): any;
265
274
  /**
266
- * Calculate elapsed time and format for display
275
+ * Get a formatted severity badge string
276
+ */
277
+ declare function getSeverityBadge(severity: string, chalkInstance?: any): string;
278
+ /**
279
+ * Get a human-readable severity label with emoji
267
280
  *
268
- * @param startTime - Start timestamp in milliseconds.
269
- * @returns Formatted duration string in seconds.
270
- * @lastUpdated 2026-03-18
281
+ * @param severity - The severity level to label.
282
+ * @returns Formatted label string for UI display.
271
283
  */
272
- declare function getElapsedTime(startTime: number): string;
284
+ declare function getSeverityLabel(severity: Severity): string;
273
285
  /**
274
- * Generate a visual score bar for console output
286
+ * Filter items by minimum severity threshold
275
287
  *
276
- * @param val - Score value between 0 and 100.
277
- * @returns String representation of the bar (e.g., "█████░░░░░").
278
- * @lastUpdated 2026-03-18
288
+ * @param items - List of items with a severity property.
289
+ * @param minSeverity - Minimum threshold for inclusion.
290
+ * @returns Filtered list of items.
279
291
  */
280
- declare function getScoreBar(val: number): string;
292
+ declare function filterBySeverity<T extends {
293
+ severity: Severity;
294
+ }>(items: T[], minSeverity: Severity): T[];
295
+
281
296
  /**
282
297
  * Get status icon for safety ratings
283
298
  *
@@ -286,6 +301,20 @@ declare function getScoreBar(val: number): string;
286
301
  * @lastUpdated 2026-03-18
287
302
  */
288
303
  declare function getSafetyIcon(rating: string): string;
304
+
305
+ /**
306
+ * Print a stylized terminal header for a tool
307
+ */
308
+ declare function printTerminalHeader(title: string, colorFn?: any, width?: number): void;
309
+ /**
310
+ * Get a terminal divider line
311
+ */
312
+ declare function getTerminalDivider(colorFn?: any, width?: number): string;
313
+ /**
314
+ * Get a visual score bar (emoji/block based)
315
+ */
316
+ declare function getScoreBar(score: number, width?: number): string;
317
+
289
318
  /**
290
319
  * Emit progress update with throttling to reduce log noise
291
320
  * @param processed Number of items processed
@@ -296,58 +325,36 @@ declare function getSafetyIcon(rating: string): string;
296
325
  * @param throttleCount Frequency of updates (every N items)
297
326
  */
298
327
  declare function emitProgress(processed: number, total: number, toolId: string, message: string, onProgress?: (processed: number, total: number, message: string) => void, throttleCount?: number): void;
328
+
299
329
  /**
300
- * Get chalk color function for a given severity
330
+ * Calculate elapsed time and format for display
301
331
  *
302
- * @param severity - Severity level string.
303
- * @param chalkInstance - Optional chalk instance to use.
304
- * @returns Chalk color function.
305
- * @lastUpdated 2026-03-18
306
- */
307
- declare function getSeverityColor(severity: string, chalkInstance?: any): any;
308
- /**
309
- * Get numeric severity value for comparison (4-1)
310
- * @param s Severity level string
311
- * @returns Numeric value (4: critical, 3: major, 2: minor, 1: info)
312
- */
313
- declare function getSeverityValue(s: string | undefined): number;
314
- /**
315
- * Get numeric severity level (alias for getSeverityValue)
316
- * @param s Severity level string
317
- * @returns Numeric value
318
- */
319
- declare function getSeverityLevel(s: string | undefined): number;
320
- /**
321
- * Get colored severity badge for console output
322
- * @param severity Severity level
323
- * @param chalkInstance Chalk instance (optional)
324
- * @returns Formatted badge string
332
+ * @param startTime - Start timestamp in milliseconds.
333
+ * @returns Formatted duration string in seconds.
325
334
  */
326
- declare function getSeverityBadge(severity: Severity | string, chalkInstance?: any): string;
335
+ declare function getElapsedTime(startTime: number): string;
327
336
  /**
328
- * Get Severity enum from string for internal logic
329
- * @param s Severity level string
330
- * @returns Normalized severity string
337
+ * Common CLI error handler for CLI commands.
331
338
  */
332
- declare function getSeverityEnum(s: string | undefined): any;
339
+ declare function handleCLIError(error: unknown, commandName: string): never;
340
+
333
341
  /**
334
- * Find the latest aiready report in a directory by modification time.
335
- * Searches for both new format (aiready-report-*) and legacy format (aiready-scan-*).
336
- *
337
- * @param dirPath - The directory path to search for .aiready directory.
338
- * @returns The path to the latest report or null if not found.
339
- * @lastUpdated 2026-03-18
342
+ * Common CLI configuration interface
343
+ * @deprecated Use ToolOptions from @aiready/core instead
340
344
  */
341
- declare function findLatestReport(dirPath: string): string | null;
345
+ type CLIOptions = ToolOptions;
342
346
  /**
343
- * Find the latest scan report file with a specific prefix.
347
+ * Load and merge configuration with CLI options.
344
348
  *
345
- * @param scanReportsDir - Directory containing reports.
346
- * @param reportFilePrefix - Filename prefix to match (e.g. "report-").
347
- * @returns Path to the latest matching report or null.
349
+ * @param directory - Root directory to load config from.
350
+ * @param defaults - Default configuration values.
351
+ * @param cliOptions - Configuration overrides from CLI arguments.
352
+ * @returns Merged configuration object.
348
353
  * @lastUpdated 2026-03-18
349
354
  */
350
- declare function findLatestScanReport(scanReportsDir: string, reportFilePrefix: string): string | null;
355
+ declare function loadMergedConfig<T extends Record<string, any>>(directory: string, defaults: T, cliOptions: Partial<T>): Promise<T & {
356
+ rootDir: string;
357
+ }>;
351
358
 
352
359
  /**
353
360
  * Generate timestamp for report filenames (YYYYMMDD-HHMMSS)
@@ -499,65 +506,35 @@ declare function loadConfig(rootDir: string): Promise<AIReadyConfig | null>;
499
506
  */
500
507
  declare function mergeConfigWithDefaults(userConfig: AIReadyConfig | null, defaults: any): any;
501
508
 
502
- /**
503
- * Shared HTML report formatting utilities.
504
- * Provides common template parts for generating self-contained HTML reports.
505
- *
506
- * @lastUpdated 2026-03-24
507
- */
509
+ declare function generateReportHead(title: string, styles?: string): string;
510
+ declare function generateReportHero(title: string, subtitle?: string): string;
511
+ declare function generateStatCards(cards: any[]): string;
512
+ declare function generateTable(config: any): string;
513
+ declare function generateIssueSummary(crit: number, maj: number, min: number, savings?: number): string;
514
+ declare function generateReportFooter(options: any): string;
515
+ declare function wrapInCard(content: string, title?: string): string;
516
+ declare function generateCompleteReport(options: any, body: string): string;
517
+ interface StatCard {
518
+ value: string | number;
519
+ label: string;
520
+ color?: string;
521
+ }
522
+ interface HtmlReportSection {
523
+ title: string;
524
+ content: string;
525
+ }
508
526
  interface ReportOptions {
509
527
  title: string;
510
- subtitle?: string;
511
528
  packageName: string;
512
529
  packageUrl?: string;
513
530
  bugUrl?: string;
514
531
  version?: string;
532
+ emoji?: string;
515
533
  }
516
- interface StatCard {
517
- value: string | number;
534
+ declare function generateStandardHtmlReport(options: ReportOptions, stats: StatCard[], sections: HtmlReportSection[], score?: {
535
+ value: number | string;
518
536
  label: string;
519
- color?: string;
520
- }
521
- interface TableConfig {
522
- headers: string[];
523
- rows: string[][];
524
- }
525
- /**
526
- * Generate the HTML document head with common styles.
527
- */
528
- declare function generateReportHead(title: string): string;
529
- /**
530
- * Generate a hero section for the report.
531
- */
532
- declare function generateReportHero(title: string, subtitle?: string): string;
533
- /**
534
- * Generate stat cards section.
535
- */
536
- declare function generateStatCards(cards: StatCard[]): string;
537
- /**
538
- * Generate a score card with a single large value.
539
- */
540
- declare function generateScoreCard(value: string | number, label: string): string;
541
- /**
542
- * Generate an HTML table from configuration.
543
- */
544
- declare function generateTable(config: TableConfig): string;
545
- /**
546
- * Generate an issue summary card.
547
- */
548
- declare function generateIssueSummary(critical: number, major: number, minor: number, potentialSavings?: number): string;
549
- /**
550
- * Generate the report footer.
551
- */
552
- declare function generateReportFooter(options: ReportOptions): string;
553
- /**
554
- * Wrap content in a card div.
555
- */
556
- declare function wrapInCard(content: string, title?: string): string;
557
- /**
558
- * Generate a complete report by combining all parts.
559
- */
560
- declare function generateCompleteReport(options: ReportOptions, bodyContent: string): string;
537
+ }): string;
561
538
 
562
539
  /**
563
540
  * Normalizes raw issue data into a strict Issue object.
@@ -682,16 +659,28 @@ declare function getScoreColor(score: number): chalk.ChalkInstance;
682
659
  declare function displayStandardConsoleReport(data: StandardReportData): void;
683
660
 
684
661
  /**
685
- * Logical code block extracted from source
662
+ * Represents a block of code extracted from a source file.
663
+ * Used for pattern detection and code analysis.
686
664
  */
687
665
  interface CodeBlock {
666
+ /** Relative file path */
688
667
  file: string;
668
+ /** Starting line number (1-based) */
689
669
  startLine: number;
670
+ /** Ending line number (1-based) */
690
671
  endLine: number;
672
+ /** The actual code content */
691
673
  code: string;
674
+ /** Approximate token count */
692
675
  tokens: number;
676
+ /** Type of pattern (e.g., 'function', 'class', 'block') */
693
677
  patternType: string;
678
+ /** Optional function/method signature for matching */
679
+ signature?: string;
680
+ /** Optional hash for quick duplicate detection */
681
+ hash?: string;
694
682
  }
683
+
695
684
  /**
696
685
  * Infer the type of code pattern based on keywords and naming conventions.
697
686
  */
@@ -1509,6 +1498,17 @@ interface AiSignalClarity {
1509
1498
  topRisk: string;
1510
1499
  /** Actionable recommendations to improve clarity */
1511
1500
  recommendations: string[];
1501
+ /** Metric dimensions for scoring (0-100) */
1502
+ dimensions: {
1503
+ overloadingScore: number;
1504
+ magicLiteralScore: number;
1505
+ booleanTrapScore: number;
1506
+ implicitSideEffectScore: number;
1507
+ deepCallbackScore: number;
1508
+ ambiguityScore: number;
1509
+ documentationScore: number;
1510
+ sizeScore: number;
1511
+ };
1512
1512
  }
1513
1513
  /**
1514
1514
  * Calculate AI Signal Clarity metrics based on various documented and undocumented code patterns.
@@ -1930,4 +1930,42 @@ declare function severityToAnnotationLevel(severity: string): 'error' | 'warning
1930
1930
  */
1931
1931
  declare function emitIssuesAsAnnotations(issues: any[]): void;
1932
1932
 
1933
- export { AIReadyConfig, AcceptancePrediction, type AgentGroundingScore, type AiSignalClarity, type AiSignalClaritySignal, AnalysisResult, type CLIOptions, CSharpParser, type ChangeAmplificationScore, type CodeBlock, type CognitiveLoad, ComprehensionDifficulty, type ConceptCohesion, CostConfig, DEFAULT_COST_CONFIG, DEFAULT_EXCLUDE, type DependencyHealthScore, type DocDriftRisk, ExportInfo, ExportWithImports, FileImport, type FileTestability, type FileWithDomain, GoParser, Issue, type JSONOutputParams, JavaParser, type KnowledgeConcentrationRisk, Language, LanguageParser, type LoadFactor, MODEL_PRICING_PRESETS, Metrics, ModelContextTier, type ModelPricingPreset, NamingConvention, ParseResult, ParserFactory, type PatternEntropy, ProductivityImpact, type ProviderFactoryConfig, PythonParser, type ReportOptions, SEVERITY_TIME_ESTIMATES, ScanOptions, type ScoreHistoryEntry, type ScoreTrend, type SemanticDistance, Severity, Severity as SeverityType, SpokeOutput, type StandardReportData, type StandardScoringParams, type StatCard, type TableConfig, type TechnicalDebtInterest, TechnicalValueChain, TechnicalValueChainSummary, type TestabilityIndex, TokenBudget, ToolName, ToolOptions, type ToolProvider, ToolRegistry, ToolScoringOutput, TypeScriptParser, VAGUE_FILE_NAMES, buildFactorsFromDimensions, buildSimpleProviderScore, buildSpokeOutput, buildStandardToolScore, calculateAgentGrounding, calculateAiSignalClarity, calculateBusinessROI, calculateChangeAmplification, calculateCognitiveLoad, calculateComprehensionDifficulty, calculateConceptCohesion, calculateDebtInterest, calculateDependencyHealth, calculateDetailedTokenROI, calculateDocDrift, calculateExtendedFutureProofScore, calculateFutureProofScore, calculateHeuristicConfidence, calculateImportSimilarity, calculateKnowledgeConcentration, calculateMonthlyCost, calculatePatternEntropy, calculateProductivityImpact, calculateSemanticDistance, calculateStringSimilarity, calculateTechnicalValueChain, calculateTestabilityIndex, calculateTokenBudget, clearHistory, createProvider, createStandardProgressCallback, displayStandardConsoleReport, emitAnnotation, emitIssuesAsAnnotations, emitProgress, estimateCostFromBudget, estimateTokens, exportHistory, extractCodeBlocks, findLatestReport, findLatestScanReport, formatAcceptanceRate, formatCost, formatHours, formatStandardCliResult, formatStandardReport, generateCompleteReport, generateIssueSummary, generateReportFooter, generateReportHead, generateReportHero, generateScoreCard, generateStatCards, generateTable, generateValueChain, getElapsedTime, getFileCommitTimestamps, getFileExtension, getHistorySummary, getLineRangeLastModifiedCached, getModelPreset, getParser, getRepoMetadata, getReportTimestamp, getSafetyIcon, getScoreBar, getScoreColor, getSeverityBadge, getSeverityColor, getSeverityEnum, getSeverityLevel, getSeverityValue, getSupportedLanguages, getTerminalDivider, getWasmPath, groupIssuesByFile, handleCLIError, handleJSONOutput, handleStandardJSONOutput, inferPatternType, initTreeSitter, initializeParsers, isFileSupported, isSourceFile, loadConfig, loadMergedConfig, loadScoreHistory, mergeConfigWithDefaults, normalizeAnalysisResult, normalizeIssue, normalizeMetrics, normalizeSpokeOutput, parseFileExports, predictAcceptanceRate, prepareActionConfig, printTerminalHeader, readFileContent, resolveOutputFormat, resolveOutputPath, runStandardCliAction, saveScoreEntry, scanEntries, scanFiles, setupParser, severityToAnnotationLevel, validateSpokeOutput, validateWithSchema, wrapInCard };
1933
+ /**
1934
+ * Generic batch analysis runner with progress reporting.
1935
+ */
1936
+ declare function runBatchAnalysis<T, R>(items: T[], label: string, toolId: string, onProgress: ((processed: number, total: number, message: string) => void) | undefined, processFn: (item: T) => Promise<R>, onResult: (result: R) => void): Promise<void>;
1937
+
1938
+ /**
1939
+ * Shared logic for spoke-specific CLI entry points to reduce code duplication.
1940
+ */
1941
+ declare function executeSpokeCli(name: string, description: string, options: any, analyzeFn: (config: any) => Promise<any>): Promise<any>;
1942
+
1943
+ /**
1944
+ * Common test file patterns for multiple languages.
1945
+ */
1946
+ declare const TEST_PATTERNS: RegExp[];
1947
+ /**
1948
+ * Check if a file path matches known test patterns.
1949
+ *
1950
+ * @param filePath - The file path to check.
1951
+ * @param extraPatterns - Optional extra patterns to include.
1952
+ * @returns True if the file is considered a test file.
1953
+ */
1954
+ declare function isTestFile(filePath: string, extraPatterns?: string[]): boolean;
1955
+ /**
1956
+ * Detect if a testing framework is present in the root directory.
1957
+ * Supports Node.js (Jest, Vitest, etc.), Python (Pytest), Java (JUnit), and Go.
1958
+ *
1959
+ * @param rootDir - The root directory of the project.
1960
+ * @returns True if a testing framework is detected.
1961
+ */
1962
+ declare function detectTestFramework(rootDir: string): boolean;
1963
+ /**
1964
+ * Check if a file path belongs to a build artifact or dependency folder.
1965
+ *
1966
+ * @param filePath - The path to check.
1967
+ * @returns True if the file is a build artifact.
1968
+ */
1969
+ declare function isBuildArtifact(filePath: string): boolean;
1970
+
1971
+ export { AIReadyConfig, AcceptancePrediction, type AgentGroundingScore, type AiSignalClarity, type AiSignalClaritySignal, AnalysisResult, type CLIOptions, CSharpParser, type ChangeAmplificationScore, type CodeBlock, type CognitiveLoad, ComprehensionDifficulty, type ConceptCohesion, CostConfig, DEFAULT_COST_CONFIG, DEFAULT_EXCLUDE, type DependencyHealthScore, type DocDriftRisk, ExportInfo, ExportWithImports, FileImport, type FileTestability, type FileWithDomain, GoParser, type HtmlReportSection, Issue, type JSONOutputParams, JavaParser, type KnowledgeConcentrationRisk, Language, LanguageParser, type LoadFactor, MODEL_PRICING_PRESETS, Metrics, ModelContextTier, type ModelPricingPreset, NamingConvention, ParseResult, ParserFactory, type PatternEntropy, ProductivityImpact, type ProviderFactoryConfig, PythonParser, type ReportOptions, SEVERITY_TIME_ESTIMATES, ScanOptions, type ScoreHistoryEntry, type ScoreTrend, type SemanticDistance, Severity, Severity as SeverityType, SpokeOutput, type StandardReportData, type StandardScoringParams, type StatCard, TEST_PATTERNS, type TechnicalDebtInterest, TechnicalValueChain, TechnicalValueChainSummary, type TestabilityIndex, TokenBudget, ToolName, ToolOptions, type ToolProvider, ToolRegistry, ToolScoringOutput, TypeScriptParser, VAGUE_FILE_NAMES, buildFactorsFromDimensions, buildSimpleProviderScore, buildSpokeOutput, buildStandardToolScore, calculateAgentGrounding, calculateAiSignalClarity, calculateBusinessROI, calculateChangeAmplification, calculateCognitiveLoad, calculateComprehensionDifficulty, calculateConceptCohesion, calculateDebtInterest, calculateDependencyHealth, calculateDetailedTokenROI, calculateDocDrift, calculateExtendedFutureProofScore, calculateFutureProofScore, calculateHeuristicConfidence, calculateImportSimilarity, calculateKnowledgeConcentration, calculateMonthlyCost, calculatePatternEntropy, calculateProductivityImpact, calculateSemanticDistance, calculateStringSimilarity, calculateTechnicalValueChain, calculateTestabilityIndex, calculateTokenBudget, clearHistory, createProvider, createStandardProgressCallback, detectTestFramework, displayStandardConsoleReport, emitAnnotation, emitIssuesAsAnnotations, emitProgress, ensureDir, estimateCostFromBudget, estimateTokens, executeSpokeCli, exportHistory, extractCodeBlocks, filterBySeverity, findLatestReport, findLatestScanReport, formatAcceptanceRate, formatCost, formatHours, formatStandardCliResult, formatStandardReport, generateCompleteReport, generateIssueSummary, generateReportFooter, generateReportHead, generateReportHero, generateStandardHtmlReport, generateStatCards, generateTable, generateValueChain, getElapsedTime, getFileCommitTimestamps, getFileExtension, getFilesByPattern, getHistorySummary, getLineRangeLastModifiedCached, getModelPreset, getParser, getRepoMetadata, getReportTimestamp, getSafetyIcon, getScoreBar, getScoreColor, getSeverityBadge, getSeverityColor, getSeverityEnum, getSeverityLabel, getSeverityLevel, getSeverityValue, getSupportedLanguages, getTerminalDivider, getWasmPath, groupIssuesByFile, handleCLIError, handleJSONOutput, handleStandardJSONOutput, inferPatternType, initTreeSitter, initializeParsers, isBuildArtifact, isFileSupported, isSourceFile, isTestFile, loadConfig, loadMergedConfig, loadScoreHistory, mergeConfigWithDefaults, normalizeAnalysisResult, normalizeIssue, normalizeMetrics, normalizeSeverity, normalizeSpokeOutput, parseFileExports, predictAcceptanceRate, prepareActionConfig, printTerminalHeader, readFileContent, resolveOutputFormat, resolveOutputPath, runBatchAnalysis, runStandardCliAction, saveScoreEntry, scanEntries, scanFiles, setupParser, severityToAnnotationLevel, validateSpokeOutput, validateWithSchema, wrapInCard };