@aiready/core 0.24.7 → 0.24.9
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-LRM26BOB.mjs +888 -0
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +158 -158
- package/dist/client/index.mjs +1 -1
- package/dist/index-DGbarGnr.d.mts +1307 -0
- package/dist/index-DGbarGnr.d.ts +1307 -0
- package/dist/index-DUnnB68N.d.mts +1307 -0
- package/dist/index-DUnnB68N.d.ts +1307 -0
- package/dist/index-McIRPbHO.d.mts +1307 -0
- package/dist/index-McIRPbHO.d.ts +1307 -0
- package/dist/index.d.mts +63 -63
- package/dist/index.d.ts +63 -63
- package/dist/index.js +175 -167
- package/dist/index.mjs +18 -10
- package/package.json +4 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,33 @@
|
|
|
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-
|
|
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-
|
|
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-DGbarGnr.mjs';
|
|
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-DGbarGnr.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import * as chalk from 'chalk';
|
|
5
5
|
import * as Parser from 'web-tree-sitter';
|
|
6
6
|
import { TSESTree } from '@typescript-eslint/typescript-estree';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Represents a block of code extracted from a source file.
|
|
10
|
+
* Used for pattern detection and code analysis.
|
|
11
|
+
*/
|
|
12
|
+
interface CodeBlock {
|
|
13
|
+
/** Relative file path */
|
|
14
|
+
file: string;
|
|
15
|
+
/** Starting line number (1-based) */
|
|
16
|
+
startLine: number;
|
|
17
|
+
/** Ending line number (1-based) */
|
|
18
|
+
endLine: number;
|
|
19
|
+
/** The actual code content */
|
|
20
|
+
code: string;
|
|
21
|
+
/** Approximate token count */
|
|
22
|
+
tokens: number;
|
|
23
|
+
/** Type of pattern (e.g., 'function', 'class', 'block') */
|
|
24
|
+
patternType: string;
|
|
25
|
+
/** Optional function/method signature for matching */
|
|
26
|
+
signature?: string;
|
|
27
|
+
/** Optional hash for quick duplicate detection */
|
|
28
|
+
hash?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
8
31
|
/**
|
|
9
32
|
* Spoke-to-Hub Contract Definitions
|
|
10
33
|
* This file defines the expected JSON structure for tool outputs to ensure
|
|
@@ -35,7 +58,7 @@ interface ToolProvider {
|
|
|
35
58
|
* @param output - The raw output data to check.
|
|
36
59
|
* @returns Validation result with boolean flag and any errors found.
|
|
37
60
|
*/
|
|
38
|
-
declare function validateSpokeOutput(toolName: string, output:
|
|
61
|
+
declare function validateSpokeOutput(toolName: string, output: unknown): {
|
|
39
62
|
valid: boolean;
|
|
40
63
|
errors: string[];
|
|
41
64
|
};
|
|
@@ -47,7 +70,7 @@ declare function validateSpokeOutput(toolName: string, output: any): {
|
|
|
47
70
|
* @returns Result object with valid flag and typed data or errors.
|
|
48
71
|
* @lastUpdated 2026-03-18
|
|
49
72
|
*/
|
|
50
|
-
declare function validateWithSchema<T>(schema: z.ZodSchema<T>, data:
|
|
73
|
+
declare function validateWithSchema<T>(schema: z.ZodSchema<T>, data: unknown): {
|
|
51
74
|
valid: boolean;
|
|
52
75
|
data?: T;
|
|
53
76
|
errors?: string[];
|
|
@@ -505,7 +528,7 @@ declare function loadConfig(rootDir: string): Promise<AIReadyConfig | null>;
|
|
|
505
528
|
* @param defaults The default configuration object
|
|
506
529
|
* @returns Merged configuration with all defaults applied
|
|
507
530
|
*/
|
|
508
|
-
declare function mergeConfigWithDefaults(userConfig: AIReadyConfig | null, defaults:
|
|
531
|
+
declare function mergeConfigWithDefaults<T extends Record<string, any>>(userConfig: AIReadyConfig | null, defaults: T): T;
|
|
509
532
|
|
|
510
533
|
interface StatCard {
|
|
511
534
|
value: string | number;
|
|
@@ -690,29 +713,6 @@ declare function getScoreColor(score: number): chalk.ChalkInstance;
|
|
|
690
713
|
*/
|
|
691
714
|
declare function displayStandardConsoleReport(data: StandardReportData): void;
|
|
692
715
|
|
|
693
|
-
/**
|
|
694
|
-
* Represents a block of code extracted from a source file.
|
|
695
|
-
* Used for pattern detection and code analysis.
|
|
696
|
-
*/
|
|
697
|
-
interface CodeBlock {
|
|
698
|
-
/** Relative file path */
|
|
699
|
-
file: string;
|
|
700
|
-
/** Starting line number (1-based) */
|
|
701
|
-
startLine: number;
|
|
702
|
-
/** Ending line number (1-based) */
|
|
703
|
-
endLine: number;
|
|
704
|
-
/** The actual code content */
|
|
705
|
-
code: string;
|
|
706
|
-
/** Approximate token count */
|
|
707
|
-
tokens: number;
|
|
708
|
-
/** Type of pattern (e.g., 'function', 'class', 'block') */
|
|
709
|
-
patternType: string;
|
|
710
|
-
/** Optional function/method signature for matching */
|
|
711
|
-
signature?: string;
|
|
712
|
-
/** Optional hash for quick duplicate detection */
|
|
713
|
-
hash?: string;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
716
|
/**
|
|
717
717
|
* Infer the type of code pattern based on keywords and naming conventions.
|
|
718
718
|
*/
|
|
@@ -1739,6 +1739,40 @@ declare function calculateDependencyHealth(params: {
|
|
|
1739
1739
|
trainingCutoffSkew: number;
|
|
1740
1740
|
}): DependencyHealthScore;
|
|
1741
1741
|
|
|
1742
|
+
/**
|
|
1743
|
+
* Change Amplification Metrics.
|
|
1744
|
+
* Measures how a change in one file ripples through the system via dependency fan-out.
|
|
1745
|
+
*
|
|
1746
|
+
* @lastUpdated 2026-03-18
|
|
1747
|
+
*/
|
|
1748
|
+
interface ChangeAmplificationScore {
|
|
1749
|
+
score: number;
|
|
1750
|
+
rating: 'isolated' | 'contained' | 'amplified' | 'explosive';
|
|
1751
|
+
avgAmplification: number;
|
|
1752
|
+
maxAmplification: number;
|
|
1753
|
+
hotspots: Array<{
|
|
1754
|
+
file: string;
|
|
1755
|
+
fanOut: number;
|
|
1756
|
+
fanIn: number;
|
|
1757
|
+
amplificationFactor: number;
|
|
1758
|
+
}>;
|
|
1759
|
+
recommendations: string[];
|
|
1760
|
+
}
|
|
1761
|
+
/**
|
|
1762
|
+
* Calculate Change Amplification metrics for a set of files in a dependency graph.
|
|
1763
|
+
*
|
|
1764
|
+
* @param params - Structural metrics gathered from link analysis.
|
|
1765
|
+
* @param params.files - List of files with their fan-in/fan-out counts.
|
|
1766
|
+
* @returns Comprehensive ChangeAmplificationScore.
|
|
1767
|
+
*/
|
|
1768
|
+
declare function calculateChangeAmplification(params: {
|
|
1769
|
+
files: Array<{
|
|
1770
|
+
file: string;
|
|
1771
|
+
fanOut: number;
|
|
1772
|
+
fanIn: number;
|
|
1773
|
+
}>;
|
|
1774
|
+
}): ChangeAmplificationScore;
|
|
1775
|
+
|
|
1742
1776
|
/**
|
|
1743
1777
|
* Parameters for generating comprehensive future-proof recommendations.
|
|
1744
1778
|
*
|
|
@@ -1798,40 +1832,6 @@ declare function calculateExtendedFutureProofScore(params: FutureProofRecommenda
|
|
|
1798
1832
|
semanticDistances?: SemanticDistance[];
|
|
1799
1833
|
}): ToolScoringOutput;
|
|
1800
1834
|
|
|
1801
|
-
/**
|
|
1802
|
-
* Change Amplification Metrics.
|
|
1803
|
-
* Measures how a change in one file ripples through the system via dependency fan-out.
|
|
1804
|
-
*
|
|
1805
|
-
* @lastUpdated 2026-03-18
|
|
1806
|
-
*/
|
|
1807
|
-
interface ChangeAmplificationScore {
|
|
1808
|
-
score: number;
|
|
1809
|
-
rating: 'isolated' | 'contained' | 'amplified' | 'explosive';
|
|
1810
|
-
avgAmplification: number;
|
|
1811
|
-
maxAmplification: number;
|
|
1812
|
-
hotspots: Array<{
|
|
1813
|
-
file: string;
|
|
1814
|
-
fanOut: number;
|
|
1815
|
-
fanIn: number;
|
|
1816
|
-
amplificationFactor: number;
|
|
1817
|
-
}>;
|
|
1818
|
-
recommendations: string[];
|
|
1819
|
-
}
|
|
1820
|
-
/**
|
|
1821
|
-
* Calculate Change Amplification metrics for a set of files in a dependency graph.
|
|
1822
|
-
*
|
|
1823
|
-
* @param params - Structural metrics gathered from link analysis.
|
|
1824
|
-
* @param params.files - List of files with their fan-in/fan-out counts.
|
|
1825
|
-
* @returns Comprehensive ChangeAmplificationScore.
|
|
1826
|
-
*/
|
|
1827
|
-
declare function calculateChangeAmplification(params: {
|
|
1828
|
-
files: Array<{
|
|
1829
|
-
file: string;
|
|
1830
|
-
fanOut: number;
|
|
1831
|
-
fanIn: number;
|
|
1832
|
-
}>;
|
|
1833
|
-
}): ChangeAmplificationScore;
|
|
1834
|
-
|
|
1835
1835
|
/**
|
|
1836
1836
|
* Temporal Tracking Utilities
|
|
1837
1837
|
*
|
|
@@ -1955,7 +1955,7 @@ declare function runBatchAnalysis<T, R>(items: T[], label: string, toolId: strin
|
|
|
1955
1955
|
/**
|
|
1956
1956
|
* Shared logic for spoke-specific CLI entry points to reduce code duplication.
|
|
1957
1957
|
*/
|
|
1958
|
-
declare function executeSpokeCli(name: string, description: string, options:
|
|
1958
|
+
declare function executeSpokeCli(name: string, description: string, options: Partial<ScanOptions> & Record<string, any>, analyzeFn: (config: ScanOptions) => Promise<unknown>): Promise<unknown>;
|
|
1959
1959
|
|
|
1960
1960
|
/**
|
|
1961
1961
|
* Common test file patterns for multiple languages.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,33 @@
|
|
|
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-
|
|
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-
|
|
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-DGbarGnr.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-DGbarGnr.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import * as chalk from 'chalk';
|
|
5
5
|
import * as Parser from 'web-tree-sitter';
|
|
6
6
|
import { TSESTree } from '@typescript-eslint/typescript-estree';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Represents a block of code extracted from a source file.
|
|
10
|
+
* Used for pattern detection and code analysis.
|
|
11
|
+
*/
|
|
12
|
+
interface CodeBlock {
|
|
13
|
+
/** Relative file path */
|
|
14
|
+
file: string;
|
|
15
|
+
/** Starting line number (1-based) */
|
|
16
|
+
startLine: number;
|
|
17
|
+
/** Ending line number (1-based) */
|
|
18
|
+
endLine: number;
|
|
19
|
+
/** The actual code content */
|
|
20
|
+
code: string;
|
|
21
|
+
/** Approximate token count */
|
|
22
|
+
tokens: number;
|
|
23
|
+
/** Type of pattern (e.g., 'function', 'class', 'block') */
|
|
24
|
+
patternType: string;
|
|
25
|
+
/** Optional function/method signature for matching */
|
|
26
|
+
signature?: string;
|
|
27
|
+
/** Optional hash for quick duplicate detection */
|
|
28
|
+
hash?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
8
31
|
/**
|
|
9
32
|
* Spoke-to-Hub Contract Definitions
|
|
10
33
|
* This file defines the expected JSON structure for tool outputs to ensure
|
|
@@ -35,7 +58,7 @@ interface ToolProvider {
|
|
|
35
58
|
* @param output - The raw output data to check.
|
|
36
59
|
* @returns Validation result with boolean flag and any errors found.
|
|
37
60
|
*/
|
|
38
|
-
declare function validateSpokeOutput(toolName: string, output:
|
|
61
|
+
declare function validateSpokeOutput(toolName: string, output: unknown): {
|
|
39
62
|
valid: boolean;
|
|
40
63
|
errors: string[];
|
|
41
64
|
};
|
|
@@ -47,7 +70,7 @@ declare function validateSpokeOutput(toolName: string, output: any): {
|
|
|
47
70
|
* @returns Result object with valid flag and typed data or errors.
|
|
48
71
|
* @lastUpdated 2026-03-18
|
|
49
72
|
*/
|
|
50
|
-
declare function validateWithSchema<T>(schema: z.ZodSchema<T>, data:
|
|
73
|
+
declare function validateWithSchema<T>(schema: z.ZodSchema<T>, data: unknown): {
|
|
51
74
|
valid: boolean;
|
|
52
75
|
data?: T;
|
|
53
76
|
errors?: string[];
|
|
@@ -505,7 +528,7 @@ declare function loadConfig(rootDir: string): Promise<AIReadyConfig | null>;
|
|
|
505
528
|
* @param defaults The default configuration object
|
|
506
529
|
* @returns Merged configuration with all defaults applied
|
|
507
530
|
*/
|
|
508
|
-
declare function mergeConfigWithDefaults(userConfig: AIReadyConfig | null, defaults:
|
|
531
|
+
declare function mergeConfigWithDefaults<T extends Record<string, any>>(userConfig: AIReadyConfig | null, defaults: T): T;
|
|
509
532
|
|
|
510
533
|
interface StatCard {
|
|
511
534
|
value: string | number;
|
|
@@ -690,29 +713,6 @@ declare function getScoreColor(score: number): chalk.ChalkInstance;
|
|
|
690
713
|
*/
|
|
691
714
|
declare function displayStandardConsoleReport(data: StandardReportData): void;
|
|
692
715
|
|
|
693
|
-
/**
|
|
694
|
-
* Represents a block of code extracted from a source file.
|
|
695
|
-
* Used for pattern detection and code analysis.
|
|
696
|
-
*/
|
|
697
|
-
interface CodeBlock {
|
|
698
|
-
/** Relative file path */
|
|
699
|
-
file: string;
|
|
700
|
-
/** Starting line number (1-based) */
|
|
701
|
-
startLine: number;
|
|
702
|
-
/** Ending line number (1-based) */
|
|
703
|
-
endLine: number;
|
|
704
|
-
/** The actual code content */
|
|
705
|
-
code: string;
|
|
706
|
-
/** Approximate token count */
|
|
707
|
-
tokens: number;
|
|
708
|
-
/** Type of pattern (e.g., 'function', 'class', 'block') */
|
|
709
|
-
patternType: string;
|
|
710
|
-
/** Optional function/method signature for matching */
|
|
711
|
-
signature?: string;
|
|
712
|
-
/** Optional hash for quick duplicate detection */
|
|
713
|
-
hash?: string;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
716
|
/**
|
|
717
717
|
* Infer the type of code pattern based on keywords and naming conventions.
|
|
718
718
|
*/
|
|
@@ -1739,6 +1739,40 @@ declare function calculateDependencyHealth(params: {
|
|
|
1739
1739
|
trainingCutoffSkew: number;
|
|
1740
1740
|
}): DependencyHealthScore;
|
|
1741
1741
|
|
|
1742
|
+
/**
|
|
1743
|
+
* Change Amplification Metrics.
|
|
1744
|
+
* Measures how a change in one file ripples through the system via dependency fan-out.
|
|
1745
|
+
*
|
|
1746
|
+
* @lastUpdated 2026-03-18
|
|
1747
|
+
*/
|
|
1748
|
+
interface ChangeAmplificationScore {
|
|
1749
|
+
score: number;
|
|
1750
|
+
rating: 'isolated' | 'contained' | 'amplified' | 'explosive';
|
|
1751
|
+
avgAmplification: number;
|
|
1752
|
+
maxAmplification: number;
|
|
1753
|
+
hotspots: Array<{
|
|
1754
|
+
file: string;
|
|
1755
|
+
fanOut: number;
|
|
1756
|
+
fanIn: number;
|
|
1757
|
+
amplificationFactor: number;
|
|
1758
|
+
}>;
|
|
1759
|
+
recommendations: string[];
|
|
1760
|
+
}
|
|
1761
|
+
/**
|
|
1762
|
+
* Calculate Change Amplification metrics for a set of files in a dependency graph.
|
|
1763
|
+
*
|
|
1764
|
+
* @param params - Structural metrics gathered from link analysis.
|
|
1765
|
+
* @param params.files - List of files with their fan-in/fan-out counts.
|
|
1766
|
+
* @returns Comprehensive ChangeAmplificationScore.
|
|
1767
|
+
*/
|
|
1768
|
+
declare function calculateChangeAmplification(params: {
|
|
1769
|
+
files: Array<{
|
|
1770
|
+
file: string;
|
|
1771
|
+
fanOut: number;
|
|
1772
|
+
fanIn: number;
|
|
1773
|
+
}>;
|
|
1774
|
+
}): ChangeAmplificationScore;
|
|
1775
|
+
|
|
1742
1776
|
/**
|
|
1743
1777
|
* Parameters for generating comprehensive future-proof recommendations.
|
|
1744
1778
|
*
|
|
@@ -1798,40 +1832,6 @@ declare function calculateExtendedFutureProofScore(params: FutureProofRecommenda
|
|
|
1798
1832
|
semanticDistances?: SemanticDistance[];
|
|
1799
1833
|
}): ToolScoringOutput;
|
|
1800
1834
|
|
|
1801
|
-
/**
|
|
1802
|
-
* Change Amplification Metrics.
|
|
1803
|
-
* Measures how a change in one file ripples through the system via dependency fan-out.
|
|
1804
|
-
*
|
|
1805
|
-
* @lastUpdated 2026-03-18
|
|
1806
|
-
*/
|
|
1807
|
-
interface ChangeAmplificationScore {
|
|
1808
|
-
score: number;
|
|
1809
|
-
rating: 'isolated' | 'contained' | 'amplified' | 'explosive';
|
|
1810
|
-
avgAmplification: number;
|
|
1811
|
-
maxAmplification: number;
|
|
1812
|
-
hotspots: Array<{
|
|
1813
|
-
file: string;
|
|
1814
|
-
fanOut: number;
|
|
1815
|
-
fanIn: number;
|
|
1816
|
-
amplificationFactor: number;
|
|
1817
|
-
}>;
|
|
1818
|
-
recommendations: string[];
|
|
1819
|
-
}
|
|
1820
|
-
/**
|
|
1821
|
-
* Calculate Change Amplification metrics for a set of files in a dependency graph.
|
|
1822
|
-
*
|
|
1823
|
-
* @param params - Structural metrics gathered from link analysis.
|
|
1824
|
-
* @param params.files - List of files with their fan-in/fan-out counts.
|
|
1825
|
-
* @returns Comprehensive ChangeAmplificationScore.
|
|
1826
|
-
*/
|
|
1827
|
-
declare function calculateChangeAmplification(params: {
|
|
1828
|
-
files: Array<{
|
|
1829
|
-
file: string;
|
|
1830
|
-
fanOut: number;
|
|
1831
|
-
fanIn: number;
|
|
1832
|
-
}>;
|
|
1833
|
-
}): ChangeAmplificationScore;
|
|
1834
|
-
|
|
1835
1835
|
/**
|
|
1836
1836
|
* Temporal Tracking Utilities
|
|
1837
1837
|
*
|
|
@@ -1955,7 +1955,7 @@ declare function runBatchAnalysis<T, R>(items: T[], label: string, toolId: strin
|
|
|
1955
1955
|
/**
|
|
1956
1956
|
* Shared logic for spoke-specific CLI entry points to reduce code duplication.
|
|
1957
1957
|
*/
|
|
1958
|
-
declare function executeSpokeCli(name: string, description: string, options:
|
|
1958
|
+
declare function executeSpokeCli(name: string, description: string, options: Partial<ScanOptions> & Record<string, any>, analyzeFn: (config: ScanOptions) => Promise<unknown>): Promise<unknown>;
|
|
1959
1959
|
|
|
1960
1960
|
/**
|
|
1961
1961
|
* Common test file patterns for multiple languages.
|