@aiready/core 0.23.20 → 0.23.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2N7ISIKE.mjs +158 -0
- package/dist/chunk-ARUIZO7M.mjs +297 -0
- package/dist/chunk-CYC5EGEI.mjs +297 -0
- package/dist/{chunk-REU6OUBT.mjs → chunk-DBOPSRBC.mjs} +47 -22
- package/dist/chunk-EZ7ECLAZ.mjs +299 -0
- package/dist/chunk-FNPULWG7.mjs +248 -0
- package/dist/chunk-FZTFKZUQ.mjs +250 -0
- package/dist/chunk-GTS642BQ.mjs +262 -0
- package/dist/chunk-IXPY5J4K.mjs +248 -0
- package/dist/chunk-JJQLYW6Z.mjs +111 -0
- package/dist/chunk-L6BKANJC.mjs +130 -0
- package/dist/chunk-LXEO5PG3.mjs +292 -0
- package/dist/chunk-LZHO636W.mjs +501 -0
- package/dist/chunk-MTK2IIDZ.mjs +262 -0
- package/dist/chunk-QDCQETSI.mjs +262 -0
- package/dist/chunk-QZNY7B2N.mjs +248 -0
- package/dist/chunk-RCZSMGCX.mjs +250 -0
- package/dist/chunk-SWZOT67M.mjs +250 -0
- package/dist/chunk-U3IY2CFC.mjs +36 -0
- package/dist/chunk-UBCM5Y6R.mjs +275 -0
- package/dist/chunk-UTCRW3N7.mjs +301 -0
- package/dist/{chunk-SQHS6PFL.mjs → chunk-UYLH35LA.mjs} +47 -22
- package/dist/{chunk-ZB3EHHAG.mjs → chunk-WVNVC2PP.mjs} +90 -60
- package/dist/chunk-WYOW6O3P.mjs +114 -0
- package/dist/{chunk-RMH2TPAT.mjs → chunk-YRSSR4KN.mjs} +87 -59
- package/dist/client-2xbeKnrg.d.mts +1291 -0
- package/dist/client-2xbeKnrg.d.ts +1291 -0
- package/dist/client-4HLAGzFg.d.mts +1291 -0
- package/dist/client-4HLAGzFg.d.ts +1291 -0
- package/dist/client-B4TQwNa7.d.mts +1290 -0
- package/dist/client-B4TQwNa7.d.ts +1290 -0
- package/dist/client-Bdi4ty0v.d.mts +1294 -0
- package/dist/client-Bdi4ty0v.d.ts +1294 -0
- package/dist/client-BsKpUH3H.d.mts +1339 -0
- package/dist/client-BsKpUH3H.d.ts +1339 -0
- package/dist/client-Bv1zOaWF.d.mts +1291 -0
- package/dist/client-Bv1zOaWF.d.ts +1291 -0
- package/dist/client-Bz9YJMIX.d.mts +1290 -0
- package/dist/client-Bz9YJMIX.d.ts +1290 -0
- package/dist/client-CBpzm34X.d.mts +1291 -0
- package/dist/client-CBpzm34X.d.ts +1291 -0
- package/dist/client-CNu_tCZZ.d.mts +1305 -0
- package/dist/client-CNu_tCZZ.d.ts +1305 -0
- package/dist/client-CmEvxxQu.d.mts +1339 -0
- package/dist/client-CmEvxxQu.d.ts +1339 -0
- package/dist/client-DGMAxkZc.d.mts +1339 -0
- package/dist/client-DGMAxkZc.d.ts +1339 -0
- package/dist/client-DZq-CqcD.d.mts +1292 -0
- package/dist/client-DZq-CqcD.d.ts +1292 -0
- package/dist/{client-CYz0qxGB.d.mts → client-DcqGfDTt.d.mts} +90 -23
- package/dist/{client-CYz0qxGB.d.ts → client-DcqGfDTt.d.ts} +90 -23
- package/dist/{client-jGuH6TAG.d.mts → client-O8RvSRm0.d.mts} +18 -1
- package/dist/{client-jGuH6TAG.d.ts → client-O8RvSRm0.d.ts} +18 -1
- package/dist/client.d.mts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +47 -13
- package/dist/client.mjs +6 -4
- package/dist/csharp-parser-4ZKCSX5B.mjs +9 -0
- package/dist/csharp-parser-5HKICCRR.mjs +9 -0
- package/dist/csharp-parser-JCKXIAJW.mjs +9 -0
- package/dist/go-parser-J4KIH4RG.mjs +9 -0
- package/dist/go-parser-TKXL3DVH.mjs +9 -0
- package/dist/go-parser-XOM232XZ.mjs +9 -0
- package/dist/index.d.mts +269 -60
- package/dist/index.d.ts +269 -60
- package/dist/index.js +3733 -3031
- package/dist/index.mjs +802 -2029
- package/dist/java-parser-3KHXOXRQ.mjs +9 -0
- package/dist/java-parser-MASGS4WB.mjs +9 -0
- package/dist/java-parser-T5LXD63J.mjs +9 -0
- package/dist/python-parser-FNFK2473.mjs +8 -0
- package/dist/typescript-parser-2GGNRNB5.mjs +7 -0
- package/dist/typescript-parser-3ENJ6C7H.mjs +7 -0
- package/dist/typescript-parser-4GI7DPSW.mjs +7 -0
- package/dist/typescript-parser-4H3HUBO4.mjs +7 -0
- package/dist/typescript-parser-K63IVZMF.mjs +7 -0
- package/dist/typescript-parser-ZJKROMQG.mjs +7 -0
- package/package.json +1 -1
- package/dist/chunk-2Y6WZCES.mjs +0 -859
- package/dist/chunk-5SHLHMH7.mjs +0 -760
- package/dist/chunk-CGOS2J6T.mjs +0 -807
- package/dist/chunk-FMNCV4CC.mjs +0 -859
- package/dist/chunk-Q55AMEFV.mjs +0 -760
- package/dist/chunk-ST75O5C5.mjs +0 -859
- package/dist/chunk-TJXR2CHZ.mjs +0 -799
- package/dist/client-BEoUYNLp.d.mts +0 -1191
- package/dist/client-BEoUYNLp.d.ts +0 -1191
- package/dist/client-BrIMPk89.d.mts +0 -1214
- package/dist/client-BrIMPk89.d.ts +0 -1214
- package/dist/client-C5BuGX4F.d.mts +0 -1205
- package/dist/client-C5BuGX4F.d.ts +0 -1205
- package/dist/client-CKcjnPXt.d.mts +0 -1214
- package/dist/client-CKcjnPXt.d.ts +0 -1214
- package/dist/client-CLulBnie.d.mts +0 -1182
- package/dist/client-CLulBnie.d.ts +0 -1182
- package/dist/client-CQwvp8ep.d.mts +0 -1182
- package/dist/client-CQwvp8ep.d.ts +0 -1182
- package/dist/client-DLvFR2qA.d.mts +0 -1197
- package/dist/client-DLvFR2qA.d.ts +0 -1197
- package/dist/client-PFPdeo-z.d.mts +0 -1186
- package/dist/client-PFPdeo-z.d.ts +0 -1186
- package/dist/client-WVCAIWdJ.d.mts +0 -1192
- package/dist/client-WVCAIWdJ.d.ts +0 -1192
- package/dist/client-pYldIAg2.d.mts +0 -1209
- package/dist/client-pYldIAg2.d.ts +0 -1209
- package/dist/client-wk2fgk1q.d.mts +0 -1184
- package/dist/client-wk2fgk1q.d.ts +0 -1184
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
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 ModelContextTier, C as CostConfig, g as TokenBudget, P as ProductivityImpact, h as AcceptancePrediction, i as ComprehensionDifficulty, j as TechnicalValueChainSummary, k as TechnicalValueChain, L as
|
|
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
|
|
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 ModelContextTier, C as CostConfig, g as TokenBudget, P as ProductivityImpact, h as AcceptancePrediction, i as ComprehensionDifficulty, j as TechnicalValueChainSummary, k as TechnicalValueChain, L as Language, l as LanguageParser, m as ParseResult, N as NamingConvention, n as ExportInfo } from './client-Bdi4ty0v.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 './client-Bdi4ty0v.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
import * as chalk from 'chalk';
|
|
4
5
|
import * as Parser from 'web-tree-sitter';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -237,7 +238,22 @@ declare function loadMergedConfig<T extends Record<string, any>>(directory: stri
|
|
|
237
238
|
*/
|
|
238
239
|
declare function handleJSONOutput(data: any, outputFile?: string, successMessage?: string): void;
|
|
239
240
|
/**
|
|
240
|
-
*
|
|
241
|
+
* Get a formatted terminal divider string based on current terminal width.
|
|
242
|
+
*
|
|
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.
|
|
246
|
+
*/
|
|
247
|
+
declare function getTerminalDivider(color?: any, maxWidth?: number): string;
|
|
248
|
+
/**
|
|
249
|
+
* Print a standard terminal header with dividers.
|
|
250
|
+
*
|
|
251
|
+
* @param title - Header title text.
|
|
252
|
+
* @param color - Chalk color function for the dividers.
|
|
253
|
+
*/
|
|
254
|
+
declare function printTerminalHeader(title: string, color?: any): void;
|
|
255
|
+
/**
|
|
256
|
+
* Common CLI error handler for CLI commands.
|
|
241
257
|
* Logs error and exits process with code 1.
|
|
242
258
|
*
|
|
243
259
|
* @param error - Error object or message.
|
|
@@ -333,6 +349,61 @@ declare function findLatestReport(dirPath: string): string | null;
|
|
|
333
349
|
*/
|
|
334
350
|
declare function findLatestScanReport(scanReportsDir: string, reportFilePrefix: string): string | null;
|
|
335
351
|
|
|
352
|
+
/**
|
|
353
|
+
* Generate timestamp for report filenames (YYYYMMDD-HHMMSS)
|
|
354
|
+
* Provides better granularity than date-only filenames
|
|
355
|
+
*/
|
|
356
|
+
declare function getReportTimestamp(): string;
|
|
357
|
+
/**
|
|
358
|
+
* Interface for CLI action output parameters
|
|
359
|
+
*/
|
|
360
|
+
interface JSONOutputParams {
|
|
361
|
+
outputData: any;
|
|
362
|
+
outputFile?: string;
|
|
363
|
+
resolvedDir: string;
|
|
364
|
+
prefix?: string;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Standard JSON output handler for CLI actions.
|
|
368
|
+
* Consolidates path resolution and output handling.
|
|
369
|
+
*/
|
|
370
|
+
declare function handleStandardJSONOutput({ outputData, outputFile, resolvedDir, prefix, }: JSONOutputParams): void;
|
|
371
|
+
/**
|
|
372
|
+
* Resolves the output format and file path from CLI options and merged config.
|
|
373
|
+
*/
|
|
374
|
+
declare function resolveOutputFormat(options: {
|
|
375
|
+
output?: string;
|
|
376
|
+
outputFile?: string;
|
|
377
|
+
}, config: {
|
|
378
|
+
output?: {
|
|
379
|
+
format?: string;
|
|
380
|
+
file?: string;
|
|
381
|
+
};
|
|
382
|
+
}): {
|
|
383
|
+
format: string;
|
|
384
|
+
file: string | undefined;
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* Common configuration preparation for CLI actions.
|
|
388
|
+
* Resolves directory and merges configuration.
|
|
389
|
+
*/
|
|
390
|
+
declare function prepareActionConfig<T extends Record<string, any>>(directory: string, defaults: T, cliOptions: Partial<T>): Promise<{
|
|
391
|
+
resolvedDir: string;
|
|
392
|
+
finalOptions: T & {
|
|
393
|
+
rootDir: string;
|
|
394
|
+
};
|
|
395
|
+
}>;
|
|
396
|
+
/**
|
|
397
|
+
* Formats report data for standard JSON output including timing and scoring.
|
|
398
|
+
*/
|
|
399
|
+
declare function formatStandardReport(params: {
|
|
400
|
+
results?: any;
|
|
401
|
+
report?: any;
|
|
402
|
+
summary: any;
|
|
403
|
+
elapsedTime: string;
|
|
404
|
+
score?: ToolScoringOutput;
|
|
405
|
+
}): any;
|
|
406
|
+
|
|
336
407
|
/**
|
|
337
408
|
* Groups a flat array of issues by their `location.file` path into the
|
|
338
409
|
* `AnalysisResult[]` shape expected by `SpokeOutputSchema`.
|
|
@@ -403,10 +474,10 @@ declare function calculateImportSimilarity(export1: ExportWithImports, export2:
|
|
|
403
474
|
* @param filePath - Path to the file (used for language detection and AST metadata)
|
|
404
475
|
* @returns Object containing all identified exports and imports
|
|
405
476
|
*/
|
|
406
|
-
declare function parseFileExports(code: string, filePath: string): {
|
|
477
|
+
declare function parseFileExports(code: string, filePath: string): Promise<{
|
|
407
478
|
exports: ExportWithImports[];
|
|
408
479
|
imports: FileImport[];
|
|
409
|
-
}
|
|
480
|
+
}>;
|
|
410
481
|
|
|
411
482
|
/**
|
|
412
483
|
* Estimate token count for text (rough approximation)
|
|
@@ -429,8 +500,10 @@ declare function loadConfig(rootDir: string): Promise<AIReadyConfig | null>;
|
|
|
429
500
|
declare function mergeConfigWithDefaults(userConfig: AIReadyConfig | null, defaults: any): any;
|
|
430
501
|
|
|
431
502
|
/**
|
|
432
|
-
* Shared HTML report
|
|
503
|
+
* Shared HTML report formatting utilities.
|
|
433
504
|
* Provides common template parts for generating self-contained HTML reports.
|
|
505
|
+
*
|
|
506
|
+
* @lastUpdated 2026-03-24
|
|
434
507
|
*/
|
|
435
508
|
interface ReportOptions {
|
|
436
509
|
title: string;
|
|
@@ -450,27 +523,39 @@ interface TableConfig {
|
|
|
450
523
|
rows: string[][];
|
|
451
524
|
}
|
|
452
525
|
/**
|
|
453
|
-
* Generate the HTML document head with common styles
|
|
526
|
+
* Generate the HTML document head with common styles.
|
|
454
527
|
*/
|
|
455
528
|
declare function generateReportHead(title: string): string;
|
|
456
529
|
/**
|
|
457
|
-
* Generate
|
|
530
|
+
* Generate a hero section for the report.
|
|
531
|
+
*/
|
|
532
|
+
declare function generateReportHero(title: string, subtitle?: string): string;
|
|
533
|
+
/**
|
|
534
|
+
* Generate stat cards section.
|
|
458
535
|
*/
|
|
459
536
|
declare function generateStatCards(cards: StatCard[]): string;
|
|
460
537
|
/**
|
|
461
|
-
* Generate
|
|
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.
|
|
462
543
|
*/
|
|
463
544
|
declare function generateTable(config: TableConfig): string;
|
|
464
545
|
/**
|
|
465
|
-
* Generate
|
|
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.
|
|
466
551
|
*/
|
|
467
552
|
declare function generateReportFooter(options: ReportOptions): string;
|
|
468
553
|
/**
|
|
469
|
-
* Wrap content in a card div
|
|
554
|
+
* Wrap content in a card div.
|
|
470
555
|
*/
|
|
471
556
|
declare function wrapInCard(content: string, title?: string): string;
|
|
472
557
|
/**
|
|
473
|
-
* Generate a complete report by combining all parts
|
|
558
|
+
* Generate a complete report by combining all parts.
|
|
474
559
|
*/
|
|
475
560
|
declare function generateCompleteReport(options: ReportOptions, bodyContent: string): string;
|
|
476
561
|
|
|
@@ -491,6 +576,132 @@ declare function normalizeAnalysisResult(raw: any): AnalysisResult;
|
|
|
491
576
|
*/
|
|
492
577
|
declare function normalizeSpokeOutput(raw: any, toolName: string): SpokeOutput;
|
|
493
578
|
|
|
579
|
+
/**
|
|
580
|
+
* Standard parameters for building a ToolScoringOutput.
|
|
581
|
+
*/
|
|
582
|
+
interface StandardScoringParams {
|
|
583
|
+
toolName: ToolName | string;
|
|
584
|
+
score: number;
|
|
585
|
+
rawData: Record<string, any>;
|
|
586
|
+
dimensions: Record<string, number>;
|
|
587
|
+
dimensionNames: Record<string, string>;
|
|
588
|
+
recommendations: string[];
|
|
589
|
+
recommendationImpact?: number;
|
|
590
|
+
rating?: string;
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Common factor builder logic.
|
|
594
|
+
* Map dimension scores to standard factor objects with -50 impact baseline.
|
|
595
|
+
*/
|
|
596
|
+
declare function buildFactorsFromDimensions(dimensions: Record<string, number>, dimensionNames: Record<string, string>, rawData: Record<string, any>): ToolScoringOutput['factors'];
|
|
597
|
+
/**
|
|
598
|
+
* Unified tool scoring output builder.
|
|
599
|
+
*/
|
|
600
|
+
declare function buildStandardToolScore(params: StandardScoringParams): ToolScoringOutput;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Calculate Jaccard similarity between two strings.
|
|
604
|
+
* Splitting by non-alphanumeric to be robust across different programming languages and formats.
|
|
605
|
+
*
|
|
606
|
+
* @param a - First string for comparison.
|
|
607
|
+
* @param b - Second string for comparison.
|
|
608
|
+
* @returns Similarity score between 0 and 1.
|
|
609
|
+
*/
|
|
610
|
+
declare function calculateStringSimilarity(a: string, b: string): number;
|
|
611
|
+
/**
|
|
612
|
+
* Calculate heuristic confidence score for a duplicate or pattern detection.
|
|
613
|
+
* Considers similarity, block size, and structural match.
|
|
614
|
+
*
|
|
615
|
+
* @param similarity - Similarity score (0-1).
|
|
616
|
+
* @param tokens - Token count of the code block.
|
|
617
|
+
* @param lines - Line count of the code block.
|
|
618
|
+
* @returns Confidence score between 0 and 1.
|
|
619
|
+
*/
|
|
620
|
+
declare function calculateHeuristicConfidence(similarity: number, tokens: number, lines: number): number;
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Standard progress callback for AIReady spoke tools.
|
|
624
|
+
* Unified to remove structural duplication across spokes.
|
|
625
|
+
*
|
|
626
|
+
* @param toolName - The name of the tool reporting progress.
|
|
627
|
+
*/
|
|
628
|
+
declare function createStandardProgressCallback(toolName: string): (processed: number, total: number, message: string) => void;
|
|
629
|
+
/**
|
|
630
|
+
* Standard result formatter for CLI output.
|
|
631
|
+
*
|
|
632
|
+
* @param toolName - Canonical ToolName.
|
|
633
|
+
* @param score - Calculated readiness score (0-100).
|
|
634
|
+
* @param issuesCount - Number of identified issues.
|
|
635
|
+
*/
|
|
636
|
+
declare function formatStandardCliResult(toolName: string, score: number, issuesCount: number): void;
|
|
637
|
+
/**
|
|
638
|
+
* Common CLI action helper to unify try-catch and output handling.
|
|
639
|
+
*/
|
|
640
|
+
declare function runStandardCliAction(toolName: string, action: () => Promise<{
|
|
641
|
+
score: number;
|
|
642
|
+
issuesCount: number;
|
|
643
|
+
}>): Promise<void>;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Interface for standard CLI report data
|
|
647
|
+
*/
|
|
648
|
+
interface StandardReportData {
|
|
649
|
+
title: string;
|
|
650
|
+
subtitle?: string;
|
|
651
|
+
score: number;
|
|
652
|
+
rating: string;
|
|
653
|
+
dimensions: Array<{
|
|
654
|
+
name: string;
|
|
655
|
+
value: number;
|
|
656
|
+
label?: string;
|
|
657
|
+
}>;
|
|
658
|
+
stats?: Array<{
|
|
659
|
+
label: string;
|
|
660
|
+
value: string | number;
|
|
661
|
+
}>;
|
|
662
|
+
issues: Array<{
|
|
663
|
+
severity: Severity | string;
|
|
664
|
+
message: string;
|
|
665
|
+
suggestion?: string;
|
|
666
|
+
}>;
|
|
667
|
+
recommendations?: string[];
|
|
668
|
+
elapsedTime: string;
|
|
669
|
+
noIssuesMessage?: string;
|
|
670
|
+
safetyRating?: string;
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* Get color for score values
|
|
674
|
+
*/
|
|
675
|
+
declare function getScoreColor(score: number): chalk.ChalkInstance;
|
|
676
|
+
/**
|
|
677
|
+
* Display a standardized console report for any AIReady spoke CLI
|
|
678
|
+
*
|
|
679
|
+
* @param data - The report data to display
|
|
680
|
+
* @lastUpdated 2026-03-22
|
|
681
|
+
*/
|
|
682
|
+
declare function displayStandardConsoleReport(data: StandardReportData): void;
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* Logical code block extracted from source
|
|
686
|
+
*/
|
|
687
|
+
interface CodeBlock {
|
|
688
|
+
file: string;
|
|
689
|
+
startLine: number;
|
|
690
|
+
endLine: number;
|
|
691
|
+
code: string;
|
|
692
|
+
tokens: number;
|
|
693
|
+
patternType: string;
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* Infer the type of code pattern based on keywords and naming conventions.
|
|
697
|
+
*/
|
|
698
|
+
declare function inferPatternType(keyword: string, name: string): string;
|
|
699
|
+
/**
|
|
700
|
+
* Split file content into logical blocks (functions, classes, methods)
|
|
701
|
+
* Handles TS/JS, Java, C#, Go, and Python (via indentation)
|
|
702
|
+
*/
|
|
703
|
+
declare function extractCodeBlocks(file: string, content: string): CodeBlock[];
|
|
704
|
+
|
|
494
705
|
/**
|
|
495
706
|
* AI model pricing presets for cost estimation.
|
|
496
707
|
* Prices are input token costs per 1K tokens (USD), as of Q1 2026.
|
|
@@ -744,27 +955,25 @@ declare function generateValueChain(params: {
|
|
|
744
955
|
severity: 'critical' | 'major' | 'minor';
|
|
745
956
|
}): TechnicalValueChain;
|
|
746
957
|
|
|
747
|
-
/**
|
|
748
|
-
* Parser Factory - Manages language-specific parsers
|
|
749
|
-
*
|
|
750
|
-
* This factory provides a centralized way to access the appropriate parser
|
|
751
|
-
* for a given file based on its extension.
|
|
752
|
-
*/
|
|
753
|
-
|
|
754
958
|
/**
|
|
755
959
|
* Factory for creating and managing language parsers.
|
|
756
960
|
* Supports both singleton usage and multiple instances for test isolation.
|
|
757
961
|
*
|
|
758
|
-
* @lastUpdated 2026-03-
|
|
962
|
+
* @lastUpdated 2026-03-22
|
|
759
963
|
*/
|
|
760
964
|
declare class ParserFactory {
|
|
761
965
|
private static instance;
|
|
762
966
|
private parsers;
|
|
763
967
|
private extensionMap;
|
|
968
|
+
private registeredParsers;
|
|
764
969
|
/**
|
|
765
970
|
* Create a new ParserFactory instance
|
|
766
971
|
*/
|
|
767
972
|
constructor();
|
|
973
|
+
/**
|
|
974
|
+
* Register a lazy-loaded parser
|
|
975
|
+
*/
|
|
976
|
+
registerLazyParser(language: Language, loader: () => Promise<LanguageParser>): void;
|
|
768
977
|
/**
|
|
769
978
|
* Get the global singleton instance
|
|
770
979
|
*
|
|
@@ -778,13 +987,13 @@ declare class ParserFactory {
|
|
|
778
987
|
/**
|
|
779
988
|
* Get parser for a specific language
|
|
780
989
|
*/
|
|
781
|
-
getParserForLanguage(language: Language): LanguageParser | null
|
|
990
|
+
getParserForLanguage(language: Language): Promise<LanguageParser | null>;
|
|
782
991
|
/**
|
|
783
992
|
* Get parser for a file based on its extension
|
|
784
993
|
*/
|
|
785
|
-
getParserForFile(filePath: string): LanguageParser | null
|
|
994
|
+
getParserForFile(filePath: string): Promise<LanguageParser | null>;
|
|
786
995
|
/**
|
|
787
|
-
* Check if a file is supported
|
|
996
|
+
* Check if a file is supported (synchronous check based on extension)
|
|
788
997
|
*/
|
|
789
998
|
isSupported(filePath: string): boolean;
|
|
790
999
|
/**
|
|
@@ -817,9 +1026,9 @@ declare class ParserFactory {
|
|
|
817
1026
|
*
|
|
818
1027
|
* @param filePath - Path to the file to get a parser for.
|
|
819
1028
|
* @returns LanguageParser instance or null if unsupported.
|
|
820
|
-
* @lastUpdated 2026-03-
|
|
1029
|
+
* @lastUpdated 2026-03-22
|
|
821
1030
|
*/
|
|
822
|
-
declare function getParser(filePath: string): LanguageParser | null
|
|
1031
|
+
declare function getParser(filePath: string): Promise<LanguageParser | null>;
|
|
823
1032
|
/**
|
|
824
1033
|
* Initialize all parsers
|
|
825
1034
|
*/
|
|
@@ -1531,40 +1740,6 @@ interface FutureProofRecommendationParams {
|
|
|
1531
1740
|
dependencyHealth?: DependencyHealthScore;
|
|
1532
1741
|
}
|
|
1533
1742
|
|
|
1534
|
-
/**
|
|
1535
|
-
* Change Amplification Metrics.
|
|
1536
|
-
* Measures how a change in one file ripples through the system via dependency fan-out.
|
|
1537
|
-
*
|
|
1538
|
-
* @lastUpdated 2026-03-18
|
|
1539
|
-
*/
|
|
1540
|
-
interface ChangeAmplificationScore {
|
|
1541
|
-
score: number;
|
|
1542
|
-
rating: 'isolated' | 'contained' | 'amplified' | 'explosive';
|
|
1543
|
-
avgAmplification: number;
|
|
1544
|
-
maxAmplification: number;
|
|
1545
|
-
hotspots: Array<{
|
|
1546
|
-
file: string;
|
|
1547
|
-
fanOut: number;
|
|
1548
|
-
fanIn: number;
|
|
1549
|
-
amplificationFactor: number;
|
|
1550
|
-
}>;
|
|
1551
|
-
recommendations: string[];
|
|
1552
|
-
}
|
|
1553
|
-
/**
|
|
1554
|
-
* Calculate Change Amplification metrics for a set of files in a dependency graph.
|
|
1555
|
-
*
|
|
1556
|
-
* @param params - Structural metrics gathered from link analysis.
|
|
1557
|
-
* @param params.files - List of files with their fan-in/fan-out counts.
|
|
1558
|
-
* @returns Comprehensive ChangeAmplificationScore.
|
|
1559
|
-
*/
|
|
1560
|
-
declare function calculateChangeAmplification(params: {
|
|
1561
|
-
files: Array<{
|
|
1562
|
-
file: string;
|
|
1563
|
-
fanOut: number;
|
|
1564
|
-
fanIn: number;
|
|
1565
|
-
}>;
|
|
1566
|
-
}): ChangeAmplificationScore;
|
|
1567
|
-
|
|
1568
1743
|
/**
|
|
1569
1744
|
* Future-Proof AI Metrics Abstraction Layer.
|
|
1570
1745
|
*
|
|
@@ -1608,6 +1783,40 @@ declare function calculateExtendedFutureProofScore(params: FutureProofRecommenda
|
|
|
1608
1783
|
semanticDistances?: SemanticDistance[];
|
|
1609
1784
|
}): ToolScoringOutput;
|
|
1610
1785
|
|
|
1786
|
+
/**
|
|
1787
|
+
* Change Amplification Metrics.
|
|
1788
|
+
* Measures how a change in one file ripples through the system via dependency fan-out.
|
|
1789
|
+
*
|
|
1790
|
+
* @lastUpdated 2026-03-18
|
|
1791
|
+
*/
|
|
1792
|
+
interface ChangeAmplificationScore {
|
|
1793
|
+
score: number;
|
|
1794
|
+
rating: 'isolated' | 'contained' | 'amplified' | 'explosive';
|
|
1795
|
+
avgAmplification: number;
|
|
1796
|
+
maxAmplification: number;
|
|
1797
|
+
hotspots: Array<{
|
|
1798
|
+
file: string;
|
|
1799
|
+
fanOut: number;
|
|
1800
|
+
fanIn: number;
|
|
1801
|
+
amplificationFactor: number;
|
|
1802
|
+
}>;
|
|
1803
|
+
recommendations: string[];
|
|
1804
|
+
}
|
|
1805
|
+
/**
|
|
1806
|
+
* Calculate Change Amplification metrics for a set of files in a dependency graph.
|
|
1807
|
+
*
|
|
1808
|
+
* @param params - Structural metrics gathered from link analysis.
|
|
1809
|
+
* @param params.files - List of files with their fan-in/fan-out counts.
|
|
1810
|
+
* @returns Comprehensive ChangeAmplificationScore.
|
|
1811
|
+
*/
|
|
1812
|
+
declare function calculateChangeAmplification(params: {
|
|
1813
|
+
files: Array<{
|
|
1814
|
+
file: string;
|
|
1815
|
+
fanOut: number;
|
|
1816
|
+
fanIn: number;
|
|
1817
|
+
}>;
|
|
1818
|
+
}): ChangeAmplificationScore;
|
|
1819
|
+
|
|
1611
1820
|
/**
|
|
1612
1821
|
* Temporal Tracking Utilities
|
|
1613
1822
|
*
|
|
@@ -1723,4 +1932,4 @@ declare function severityToAnnotationLevel(severity: string): 'error' | 'warning
|
|
|
1723
1932
|
*/
|
|
1724
1933
|
declare function emitIssuesAsAnnotations(issues: any[]): void;
|
|
1725
1934
|
|
|
1726
|
-
export { AIReadyConfig, AcceptancePrediction, type AgentGroundingScore, type AiSignalClarity, type AiSignalClaritySignal, AnalysisResult, type CLIOptions, CSharpParser, type ChangeAmplificationScore, type CognitiveLoad, ComprehensionDifficulty, type ConceptCohesion, CostConfig, DEFAULT_COST_CONFIG, DEFAULT_EXCLUDE, type DependencyHealthScore, type DocDriftRisk, ExportInfo, ExportWithImports, FileImport, type FileTestability, type FileWithDomain, GoParser, Issue, 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 StatCard, type TableConfig, type TechnicalDebtInterest, TechnicalValueChain, TechnicalValueChainSummary, type TestabilityIndex, TokenBudget, ToolName, ToolOptions, type ToolProvider, ToolRegistry, ToolScoringOutput, TypeScriptParser, VAGUE_FILE_NAMES, buildSimpleProviderScore, buildSpokeOutput, calculateAgentGrounding, calculateAiSignalClarity, calculateBusinessROI, calculateChangeAmplification, calculateCognitiveLoad, calculateComprehensionDifficulty, calculateConceptCohesion, calculateDebtInterest, calculateDependencyHealth, calculateDetailedTokenROI, calculateDocDrift, calculateExtendedFutureProofScore, calculateFutureProofScore, calculateImportSimilarity, calculateKnowledgeConcentration, calculateMonthlyCost, calculatePatternEntropy, calculateProductivityImpact, calculateSemanticDistance, calculateTechnicalValueChain, calculateTestabilityIndex, calculateTokenBudget, clearHistory, createProvider, emitAnnotation, emitIssuesAsAnnotations, emitProgress, estimateCostFromBudget, estimateTokens, exportHistory, findLatestReport, findLatestScanReport, formatAcceptanceRate, formatCost, formatHours, generateCompleteReport, generateReportFooter, generateReportHead, generateStatCards, generateTable, generateValueChain, getElapsedTime, getFileCommitTimestamps, getFileExtension, getHistorySummary, getLineRangeLastModifiedCached, getModelPreset, getParser, getRepoMetadata, getSafetyIcon, getScoreBar, getSeverityBadge, getSeverityColor, getSeverityEnum, getSeverityLevel, getSeverityValue, getSupportedLanguages, getWasmPath, groupIssuesByFile, handleCLIError, handleJSONOutput, initTreeSitter, initializeParsers, isFileSupported, isSourceFile, loadConfig, loadMergedConfig, loadScoreHistory, mergeConfigWithDefaults, normalizeAnalysisResult, normalizeIssue, normalizeMetrics, normalizeSpokeOutput, parseFileExports, predictAcceptanceRate, readFileContent, resolveOutputPath, saveScoreEntry, scanEntries, scanFiles, setupParser, severityToAnnotationLevel, validateSpokeOutput, validateWithSchema, wrapInCard };
|
|
1935
|
+
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 };
|