@aiready/core 0.21.16 → 0.21.18
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/README.md +5 -1
- package/dist/client.d.mts +24 -0
- package/dist/client.d.ts +24 -0
- package/dist/index.d.mts +31 -3
- package/dist/index.d.ts +31 -3
- package/dist/index.js +697 -292
- package/dist/index.mjs +700 -298
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,7 +28,11 @@ Legend:
|
|
|
28
28
|
|
|
29
29
|
## Overview
|
|
30
30
|
|
|
31
|
-
This package provides common utilities, type definitions, and
|
|
31
|
+
This package provides common utilities, type definitions, and the multi-language parser factory used across all AIReady tools. It's designed as a foundational library for building code analysis tools focused on AI-readiness.
|
|
32
|
+
|
|
33
|
+
### Language Support
|
|
34
|
+
|
|
35
|
+
Supports **TypeScript, JavaScript, Python, Java, Go, and C#**.
|
|
32
36
|
|
|
33
37
|
## License
|
|
34
38
|
|
package/dist/client.d.mts
CHANGED
|
@@ -685,8 +685,20 @@ interface ExportInfo {
|
|
|
685
685
|
parentClass?: string;
|
|
686
686
|
/** For functions/methods: parameters */
|
|
687
687
|
parameters?: string[];
|
|
688
|
+
/** For classes/interfaces: number of methods and properties */
|
|
689
|
+
methodCount?: number;
|
|
690
|
+
propertyCount?: number;
|
|
688
691
|
/** Visibility (public, private, protected) */
|
|
689
692
|
visibility?: 'public' | 'private' | 'protected';
|
|
693
|
+
/** Behavioral metadata for advanced metrics */
|
|
694
|
+
isPure?: boolean;
|
|
695
|
+
hasSideEffects?: boolean;
|
|
696
|
+
/** Associated documentation */
|
|
697
|
+
documentation?: {
|
|
698
|
+
content: string;
|
|
699
|
+
type: 'jsdoc' | 'docstring' | 'comment' | 'xml-doc';
|
|
700
|
+
isStale?: boolean;
|
|
701
|
+
};
|
|
690
702
|
}
|
|
691
703
|
/**
|
|
692
704
|
* Import information
|
|
@@ -771,6 +783,18 @@ interface LanguageParser {
|
|
|
771
783
|
* @param filePath - File path to check
|
|
772
784
|
*/
|
|
773
785
|
canHandle(filePath: string): boolean;
|
|
786
|
+
/**
|
|
787
|
+
* Get the raw AST for advanced querying
|
|
788
|
+
* @param code - Source code to parse
|
|
789
|
+
* @param filePath - Path to the file
|
|
790
|
+
*/
|
|
791
|
+
getAST(code: string, filePath: string): Promise<any>;
|
|
792
|
+
/**
|
|
793
|
+
* Analyze structural metadata for a node (e.g. purity)
|
|
794
|
+
* @param node - The AST node to analyze (language specific)
|
|
795
|
+
* @param code - The original source code
|
|
796
|
+
*/
|
|
797
|
+
analyzeMetadata(node: any, code: string): Partial<ExportInfo>;
|
|
774
798
|
}
|
|
775
799
|
/**
|
|
776
800
|
* Parser error with location information
|
package/dist/client.d.ts
CHANGED
|
@@ -685,8 +685,20 @@ interface ExportInfo {
|
|
|
685
685
|
parentClass?: string;
|
|
686
686
|
/** For functions/methods: parameters */
|
|
687
687
|
parameters?: string[];
|
|
688
|
+
/** For classes/interfaces: number of methods and properties */
|
|
689
|
+
methodCount?: number;
|
|
690
|
+
propertyCount?: number;
|
|
688
691
|
/** Visibility (public, private, protected) */
|
|
689
692
|
visibility?: 'public' | 'private' | 'protected';
|
|
693
|
+
/** Behavioral metadata for advanced metrics */
|
|
694
|
+
isPure?: boolean;
|
|
695
|
+
hasSideEffects?: boolean;
|
|
696
|
+
/** Associated documentation */
|
|
697
|
+
documentation?: {
|
|
698
|
+
content: string;
|
|
699
|
+
type: 'jsdoc' | 'docstring' | 'comment' | 'xml-doc';
|
|
700
|
+
isStale?: boolean;
|
|
701
|
+
};
|
|
690
702
|
}
|
|
691
703
|
/**
|
|
692
704
|
* Import information
|
|
@@ -771,6 +783,18 @@ interface LanguageParser {
|
|
|
771
783
|
* @param filePath - File path to check
|
|
772
784
|
*/
|
|
773
785
|
canHandle(filePath: string): boolean;
|
|
786
|
+
/**
|
|
787
|
+
* Get the raw AST for advanced querying
|
|
788
|
+
* @param code - Source code to parse
|
|
789
|
+
* @param filePath - Path to the file
|
|
790
|
+
*/
|
|
791
|
+
getAST(code: string, filePath: string): Promise<any>;
|
|
792
|
+
/**
|
|
793
|
+
* Analyze structural metadata for a node (e.g. purity)
|
|
794
|
+
* @param node - The AST node to analyze (language specific)
|
|
795
|
+
* @param code - The original source code
|
|
796
|
+
*/
|
|
797
|
+
analyzeMetadata(node: any, code: string): Partial<ExportInfo>;
|
|
774
798
|
}
|
|
775
799
|
/**
|
|
776
800
|
* Parser error with location information
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { ToolName, ScanOptions, SpokeOutput, ToolScoringOutput, AIReadyConfig, ModelContextTier, CostConfig, TokenBudget, ProductivityImpact, AcceptancePrediction, ComprehensionDifficulty, TechnicalValueChainSummary, TechnicalValueChain, LanguageParser, Language, ParseResult, NamingConvention } from './client.mjs';
|
|
2
|
-
export { AnalysisResult, AnalysisResultSchema, AnalysisStatus, AnalysisStatusSchema, BusinessReport, COMMON_FINE_TUNING_OPTIONS, CONTEXT_TIER_THRESHOLDS, CommonASTNode, DEFAULT_TOOL_WEIGHTS,
|
|
1
|
+
import { ToolName, ScanOptions, SpokeOutput, ToolScoringOutput, AIReadyConfig, ModelContextTier, CostConfig, TokenBudget, ProductivityImpact, AcceptancePrediction, ComprehensionDifficulty, TechnicalValueChainSummary, TechnicalValueChain, LanguageParser, Language, ExportInfo, ParseResult, NamingConvention } from './client.mjs';
|
|
2
|
+
export { AnalysisResult, AnalysisResultSchema, AnalysisStatus, AnalysisStatusSchema, BusinessReport, COMMON_FINE_TUNING_OPTIONS, CONTEXT_TIER_THRESHOLDS, CommonASTNode, DEFAULT_TOOL_WEIGHTS, FRIENDLY_TOOL_NAMES, GLOBAL_INFRA_OPTIONS, GLOBAL_SCAN_OPTIONS, GraphData, GraphEdge, GraphIssueSeverity, GraphMetadata, GraphNode, ImportInfo, Issue, IssueSchema, IssueType, IssueTypeSchema, LANGUAGE_EXTENSIONS, LanguageConfig, Location, LocationSchema, Metrics, MetricsSchema, ModelTier, ModelTierSchema, ParseError, ParseStatistics, Report, SIZE_ADJUSTED_THRESHOLDS, ScoringConfig, ScoringResult, Severity, SeveritySchema, SourceLocation, SourceRange, SpokeOutputSchema, SpokeSummary, SpokeSummarySchema, TOOL_NAME_MAP, ToolNameSchema, UnifiedReport, UnifiedReportSchema, calculateOverallScore, formatScore, formatToolScore, generateHTML, getProjectSizeTier, getRating, getRatingDisplay, getRatingWithContext, getRecommendedThreshold, getToolWeight, normalizeToolName, parseWeightString } from './client.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
import * as Parser from 'web-tree-sitter';
|
|
5
|
+
import { TSESTree } from '@typescript-eslint/typescript-estree';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Spoke-to-Hub Contract Definitions
|
|
@@ -473,6 +475,19 @@ declare function isFileSupported(filePath: string): boolean;
|
|
|
473
475
|
*/
|
|
474
476
|
declare function getSupportedLanguages(): Language[];
|
|
475
477
|
|
|
478
|
+
/**
|
|
479
|
+
* Initialize tree-sitter once
|
|
480
|
+
*/
|
|
481
|
+
declare function initTreeSitter(): Promise<void>;
|
|
482
|
+
/**
|
|
483
|
+
* Find a WASM file for a specific language
|
|
484
|
+
*/
|
|
485
|
+
declare function getWasmPath(language: string): string | null;
|
|
486
|
+
/**
|
|
487
|
+
* Load a language and return a configured parser
|
|
488
|
+
*/
|
|
489
|
+
declare function setupParser(language: string): Promise<Parser.Parser | null>;
|
|
490
|
+
|
|
476
491
|
/**
|
|
477
492
|
* TypeScript/JavaScript Parser
|
|
478
493
|
*
|
|
@@ -483,6 +498,8 @@ declare class TypeScriptParser implements LanguageParser {
|
|
|
483
498
|
readonly language = Language.TypeScript;
|
|
484
499
|
readonly extensions: string[];
|
|
485
500
|
initialize(): Promise<void>;
|
|
501
|
+
getAST(code: string, filePath: string): Promise<TSESTree.Program>;
|
|
502
|
+
analyzeMetadata(node: TSESTree.Node, code: string): Partial<ExportInfo>;
|
|
486
503
|
parse(code: string, filePath: string): ParseResult;
|
|
487
504
|
getNamingConventions(): NamingConvention;
|
|
488
505
|
canHandle(filePath: string): boolean;
|
|
@@ -503,6 +520,8 @@ declare class PythonParser implements LanguageParser {
|
|
|
503
520
|
* Initialize the tree-sitter parser
|
|
504
521
|
*/
|
|
505
522
|
initialize(): Promise<void>;
|
|
523
|
+
getAST(code: string, filePath: string): Promise<Parser.Tree | null>;
|
|
524
|
+
analyzeMetadata(node: Parser.Node, code: string): Partial<ExportInfo>;
|
|
506
525
|
parse(code: string, filePath: string): ParseResult;
|
|
507
526
|
private extractImportsAST;
|
|
508
527
|
private extractExportsAST;
|
|
@@ -526,7 +545,10 @@ declare class JavaParser implements LanguageParser {
|
|
|
526
545
|
* Initialize the tree-sitter parser
|
|
527
546
|
*/
|
|
528
547
|
initialize(): Promise<void>;
|
|
548
|
+
getAST(code: string, filePath: string): Promise<Parser.Tree | null>;
|
|
549
|
+
analyzeMetadata(node: Parser.Node, code: string): Partial<ExportInfo>;
|
|
529
550
|
parse(code: string, filePath: string): ParseResult;
|
|
551
|
+
private parseRegex;
|
|
530
552
|
private extractImportsAST;
|
|
531
553
|
private extractExportsAST;
|
|
532
554
|
private getModifiers;
|
|
@@ -548,7 +570,10 @@ declare class CSharpParser implements LanguageParser {
|
|
|
548
570
|
* Initialize the tree-sitter parser
|
|
549
571
|
*/
|
|
550
572
|
initialize(): Promise<void>;
|
|
573
|
+
getAST(code: string, filePath: string): Promise<Parser.Tree | null>;
|
|
574
|
+
analyzeMetadata(node: Parser.Node, code: string): Partial<ExportInfo>;
|
|
551
575
|
parse(code: string, filePath: string): ParseResult;
|
|
576
|
+
private parseRegex;
|
|
552
577
|
private extractImportsAST;
|
|
553
578
|
private extractExportsAST;
|
|
554
579
|
private getModifiers;
|
|
@@ -569,7 +594,10 @@ declare class GoParser implements LanguageParser {
|
|
|
569
594
|
* Initialize the tree-sitter parser
|
|
570
595
|
*/
|
|
571
596
|
initialize(): Promise<void>;
|
|
597
|
+
getAST(code: string, filePath: string): Promise<Parser.Tree | null>;
|
|
598
|
+
analyzeMetadata(node: Parser.Node, code: string): Partial<ExportInfo>;
|
|
572
599
|
parse(code: string, filePath: string): ParseResult;
|
|
600
|
+
private parseRegex;
|
|
573
601
|
private extractImportsAST;
|
|
574
602
|
private extractExportsAST;
|
|
575
603
|
private extractParameters;
|
|
@@ -908,4 +936,4 @@ declare function getRepoMetadata(directory: string): {
|
|
|
908
936
|
author?: string;
|
|
909
937
|
};
|
|
910
938
|
|
|
911
|
-
export { AIReadyConfig, type ASTNode, AcceptancePrediction, type AgentGroundingScore, type AiSignalClarity, type AiSignalClaritySignal, type CLIOptions, CSharpParser, type ChangeAmplificationScore, type CognitiveLoad, ComprehensionDifficulty, type ConceptCohesion, CostConfig, DEFAULT_COST_CONFIG, DEFAULT_EXCLUDE, type DependencyHealthScore, type DocDriftRisk, type ExportWithImports, type FileImport, type FileWithDomain, GoParser, JavaParser, type KnowledgeConcentrationRisk, Language, LanguageParser, type LoadFactor, MODEL_PRICING_PRESETS, ModelContextTier, type ModelPricingPreset, NamingConvention, ParseResult, ParserFactory, type PatternEntropy, ProductivityImpact, PythonParser, SEVERITY_TIME_ESTIMATES, ScanOptions, type ScoreHistoryEntry, type ScoreTrend, type SemanticDistance, SpokeOutput, type TechnicalDebtInterest, TechnicalValueChain, TechnicalValueChainSummary, type TestabilityIndex, TokenBudget, ToolName, type ToolProvider, ToolRegistry, ToolScoringOutput, TypeScriptParser, VAGUE_FILE_NAMES, calculateAgentGrounding, calculateAiSignalClarity, calculateBusinessROI, calculateChangeAmplification, calculateCognitiveLoad, calculateComprehensionDifficulty, calculateConceptCohesion, calculateDebtInterest, calculateDependencyHealth, calculateDocDrift, calculateExtendedFutureProofScore, calculateFutureProofScore, calculateImportSimilarity, calculateKnowledgeConcentration, calculateMonthlyCost, calculatePatternEntropy, calculateProductivityImpact, calculateSemanticDistance, calculateTechnicalValueChain, calculateTestabilityIndex, calculateTokenBudget, clearHistory, emitProgress, estimateCostFromBudget, estimateTokens, exportHistory, extractFunctions, extractImports, formatAcceptanceRate, formatCost, formatHours, generateValueChain, getElapsedTime, getFileCommitTimestamps, getFileExtension, getHistorySummary, getLineRangeLastModifiedCached, getModelPreset, getParser, getRepoMetadata, getSafetyIcon, getScoreBar, getSeverityColor, getSupportedLanguages, handleCLIError, handleJSONOutput, initializeParsers, isFileSupported, isSourceFile, loadConfig, loadMergedConfig, loadScoreHistory, mergeConfigWithDefaults, parseCode, parseFileExports, predictAcceptanceRate, readFileContent, resolveOutputPath, saveScoreEntry, scanEntries, scanFiles, validateSpokeOutput, validateWithSchema };
|
|
939
|
+
export { AIReadyConfig, type ASTNode, AcceptancePrediction, type AgentGroundingScore, type AiSignalClarity, type AiSignalClaritySignal, type CLIOptions, CSharpParser, type ChangeAmplificationScore, type CognitiveLoad, ComprehensionDifficulty, type ConceptCohesion, CostConfig, DEFAULT_COST_CONFIG, DEFAULT_EXCLUDE, type DependencyHealthScore, type DocDriftRisk, ExportInfo, type ExportWithImports, type FileImport, type FileWithDomain, GoParser, JavaParser, type KnowledgeConcentrationRisk, Language, LanguageParser, type LoadFactor, MODEL_PRICING_PRESETS, ModelContextTier, type ModelPricingPreset, NamingConvention, ParseResult, ParserFactory, type PatternEntropy, ProductivityImpact, PythonParser, SEVERITY_TIME_ESTIMATES, ScanOptions, type ScoreHistoryEntry, type ScoreTrend, type SemanticDistance, SpokeOutput, type TechnicalDebtInterest, TechnicalValueChain, TechnicalValueChainSummary, type TestabilityIndex, TokenBudget, ToolName, type ToolProvider, ToolRegistry, ToolScoringOutput, TypeScriptParser, VAGUE_FILE_NAMES, calculateAgentGrounding, calculateAiSignalClarity, calculateBusinessROI, calculateChangeAmplification, calculateCognitiveLoad, calculateComprehensionDifficulty, calculateConceptCohesion, calculateDebtInterest, calculateDependencyHealth, calculateDocDrift, calculateExtendedFutureProofScore, calculateFutureProofScore, calculateImportSimilarity, calculateKnowledgeConcentration, calculateMonthlyCost, calculatePatternEntropy, calculateProductivityImpact, calculateSemanticDistance, calculateTechnicalValueChain, calculateTestabilityIndex, calculateTokenBudget, clearHistory, emitProgress, estimateCostFromBudget, estimateTokens, exportHistory, extractFunctions, extractImports, formatAcceptanceRate, formatCost, formatHours, generateValueChain, getElapsedTime, getFileCommitTimestamps, getFileExtension, getHistorySummary, getLineRangeLastModifiedCached, getModelPreset, getParser, getRepoMetadata, getSafetyIcon, getScoreBar, getSeverityColor, getSupportedLanguages, getWasmPath, handleCLIError, handleJSONOutput, initTreeSitter, initializeParsers, isFileSupported, isSourceFile, loadConfig, loadMergedConfig, loadScoreHistory, mergeConfigWithDefaults, parseCode, parseFileExports, predictAcceptanceRate, readFileContent, resolveOutputPath, saveScoreEntry, scanEntries, scanFiles, setupParser, validateSpokeOutput, validateWithSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { ToolName, ScanOptions, SpokeOutput, ToolScoringOutput, AIReadyConfig, ModelContextTier, CostConfig, TokenBudget, ProductivityImpact, AcceptancePrediction, ComprehensionDifficulty, TechnicalValueChainSummary, TechnicalValueChain, LanguageParser, Language, ParseResult, NamingConvention } from './client.js';
|
|
2
|
-
export { AnalysisResult, AnalysisResultSchema, AnalysisStatus, AnalysisStatusSchema, BusinessReport, COMMON_FINE_TUNING_OPTIONS, CONTEXT_TIER_THRESHOLDS, CommonASTNode, DEFAULT_TOOL_WEIGHTS,
|
|
1
|
+
import { ToolName, ScanOptions, SpokeOutput, ToolScoringOutput, AIReadyConfig, ModelContextTier, CostConfig, TokenBudget, ProductivityImpact, AcceptancePrediction, ComprehensionDifficulty, TechnicalValueChainSummary, TechnicalValueChain, LanguageParser, Language, ExportInfo, ParseResult, NamingConvention } from './client.js';
|
|
2
|
+
export { AnalysisResult, AnalysisResultSchema, AnalysisStatus, AnalysisStatusSchema, BusinessReport, COMMON_FINE_TUNING_OPTIONS, CONTEXT_TIER_THRESHOLDS, CommonASTNode, DEFAULT_TOOL_WEIGHTS, FRIENDLY_TOOL_NAMES, GLOBAL_INFRA_OPTIONS, GLOBAL_SCAN_OPTIONS, GraphData, GraphEdge, GraphIssueSeverity, GraphMetadata, GraphNode, ImportInfo, Issue, IssueSchema, IssueType, IssueTypeSchema, LANGUAGE_EXTENSIONS, LanguageConfig, Location, LocationSchema, Metrics, MetricsSchema, ModelTier, ModelTierSchema, ParseError, ParseStatistics, Report, SIZE_ADJUSTED_THRESHOLDS, ScoringConfig, ScoringResult, Severity, SeveritySchema, SourceLocation, SourceRange, SpokeOutputSchema, SpokeSummary, SpokeSummarySchema, TOOL_NAME_MAP, ToolNameSchema, UnifiedReport, UnifiedReportSchema, calculateOverallScore, formatScore, formatToolScore, generateHTML, getProjectSizeTier, getRating, getRatingDisplay, getRatingWithContext, getRecommendedThreshold, getToolWeight, normalizeToolName, parseWeightString } from './client.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
import * as Parser from 'web-tree-sitter';
|
|
5
|
+
import { TSESTree } from '@typescript-eslint/typescript-estree';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Spoke-to-Hub Contract Definitions
|
|
@@ -473,6 +475,19 @@ declare function isFileSupported(filePath: string): boolean;
|
|
|
473
475
|
*/
|
|
474
476
|
declare function getSupportedLanguages(): Language[];
|
|
475
477
|
|
|
478
|
+
/**
|
|
479
|
+
* Initialize tree-sitter once
|
|
480
|
+
*/
|
|
481
|
+
declare function initTreeSitter(): Promise<void>;
|
|
482
|
+
/**
|
|
483
|
+
* Find a WASM file for a specific language
|
|
484
|
+
*/
|
|
485
|
+
declare function getWasmPath(language: string): string | null;
|
|
486
|
+
/**
|
|
487
|
+
* Load a language and return a configured parser
|
|
488
|
+
*/
|
|
489
|
+
declare function setupParser(language: string): Promise<Parser.Parser | null>;
|
|
490
|
+
|
|
476
491
|
/**
|
|
477
492
|
* TypeScript/JavaScript Parser
|
|
478
493
|
*
|
|
@@ -483,6 +498,8 @@ declare class TypeScriptParser implements LanguageParser {
|
|
|
483
498
|
readonly language = Language.TypeScript;
|
|
484
499
|
readonly extensions: string[];
|
|
485
500
|
initialize(): Promise<void>;
|
|
501
|
+
getAST(code: string, filePath: string): Promise<TSESTree.Program>;
|
|
502
|
+
analyzeMetadata(node: TSESTree.Node, code: string): Partial<ExportInfo>;
|
|
486
503
|
parse(code: string, filePath: string): ParseResult;
|
|
487
504
|
getNamingConventions(): NamingConvention;
|
|
488
505
|
canHandle(filePath: string): boolean;
|
|
@@ -503,6 +520,8 @@ declare class PythonParser implements LanguageParser {
|
|
|
503
520
|
* Initialize the tree-sitter parser
|
|
504
521
|
*/
|
|
505
522
|
initialize(): Promise<void>;
|
|
523
|
+
getAST(code: string, filePath: string): Promise<Parser.Tree | null>;
|
|
524
|
+
analyzeMetadata(node: Parser.Node, code: string): Partial<ExportInfo>;
|
|
506
525
|
parse(code: string, filePath: string): ParseResult;
|
|
507
526
|
private extractImportsAST;
|
|
508
527
|
private extractExportsAST;
|
|
@@ -526,7 +545,10 @@ declare class JavaParser implements LanguageParser {
|
|
|
526
545
|
* Initialize the tree-sitter parser
|
|
527
546
|
*/
|
|
528
547
|
initialize(): Promise<void>;
|
|
548
|
+
getAST(code: string, filePath: string): Promise<Parser.Tree | null>;
|
|
549
|
+
analyzeMetadata(node: Parser.Node, code: string): Partial<ExportInfo>;
|
|
529
550
|
parse(code: string, filePath: string): ParseResult;
|
|
551
|
+
private parseRegex;
|
|
530
552
|
private extractImportsAST;
|
|
531
553
|
private extractExportsAST;
|
|
532
554
|
private getModifiers;
|
|
@@ -548,7 +570,10 @@ declare class CSharpParser implements LanguageParser {
|
|
|
548
570
|
* Initialize the tree-sitter parser
|
|
549
571
|
*/
|
|
550
572
|
initialize(): Promise<void>;
|
|
573
|
+
getAST(code: string, filePath: string): Promise<Parser.Tree | null>;
|
|
574
|
+
analyzeMetadata(node: Parser.Node, code: string): Partial<ExportInfo>;
|
|
551
575
|
parse(code: string, filePath: string): ParseResult;
|
|
576
|
+
private parseRegex;
|
|
552
577
|
private extractImportsAST;
|
|
553
578
|
private extractExportsAST;
|
|
554
579
|
private getModifiers;
|
|
@@ -569,7 +594,10 @@ declare class GoParser implements LanguageParser {
|
|
|
569
594
|
* Initialize the tree-sitter parser
|
|
570
595
|
*/
|
|
571
596
|
initialize(): Promise<void>;
|
|
597
|
+
getAST(code: string, filePath: string): Promise<Parser.Tree | null>;
|
|
598
|
+
analyzeMetadata(node: Parser.Node, code: string): Partial<ExportInfo>;
|
|
572
599
|
parse(code: string, filePath: string): ParseResult;
|
|
600
|
+
private parseRegex;
|
|
573
601
|
private extractImportsAST;
|
|
574
602
|
private extractExportsAST;
|
|
575
603
|
private extractParameters;
|
|
@@ -908,4 +936,4 @@ declare function getRepoMetadata(directory: string): {
|
|
|
908
936
|
author?: string;
|
|
909
937
|
};
|
|
910
938
|
|
|
911
|
-
export { AIReadyConfig, type ASTNode, AcceptancePrediction, type AgentGroundingScore, type AiSignalClarity, type AiSignalClaritySignal, type CLIOptions, CSharpParser, type ChangeAmplificationScore, type CognitiveLoad, ComprehensionDifficulty, type ConceptCohesion, CostConfig, DEFAULT_COST_CONFIG, DEFAULT_EXCLUDE, type DependencyHealthScore, type DocDriftRisk, type ExportWithImports, type FileImport, type FileWithDomain, GoParser, JavaParser, type KnowledgeConcentrationRisk, Language, LanguageParser, type LoadFactor, MODEL_PRICING_PRESETS, ModelContextTier, type ModelPricingPreset, NamingConvention, ParseResult, ParserFactory, type PatternEntropy, ProductivityImpact, PythonParser, SEVERITY_TIME_ESTIMATES, ScanOptions, type ScoreHistoryEntry, type ScoreTrend, type SemanticDistance, SpokeOutput, type TechnicalDebtInterest, TechnicalValueChain, TechnicalValueChainSummary, type TestabilityIndex, TokenBudget, ToolName, type ToolProvider, ToolRegistry, ToolScoringOutput, TypeScriptParser, VAGUE_FILE_NAMES, calculateAgentGrounding, calculateAiSignalClarity, calculateBusinessROI, calculateChangeAmplification, calculateCognitiveLoad, calculateComprehensionDifficulty, calculateConceptCohesion, calculateDebtInterest, calculateDependencyHealth, calculateDocDrift, calculateExtendedFutureProofScore, calculateFutureProofScore, calculateImportSimilarity, calculateKnowledgeConcentration, calculateMonthlyCost, calculatePatternEntropy, calculateProductivityImpact, calculateSemanticDistance, calculateTechnicalValueChain, calculateTestabilityIndex, calculateTokenBudget, clearHistory, emitProgress, estimateCostFromBudget, estimateTokens, exportHistory, extractFunctions, extractImports, formatAcceptanceRate, formatCost, formatHours, generateValueChain, getElapsedTime, getFileCommitTimestamps, getFileExtension, getHistorySummary, getLineRangeLastModifiedCached, getModelPreset, getParser, getRepoMetadata, getSafetyIcon, getScoreBar, getSeverityColor, getSupportedLanguages, handleCLIError, handleJSONOutput, initializeParsers, isFileSupported, isSourceFile, loadConfig, loadMergedConfig, loadScoreHistory, mergeConfigWithDefaults, parseCode, parseFileExports, predictAcceptanceRate, readFileContent, resolveOutputPath, saveScoreEntry, scanEntries, scanFiles, validateSpokeOutput, validateWithSchema };
|
|
939
|
+
export { AIReadyConfig, type ASTNode, AcceptancePrediction, type AgentGroundingScore, type AiSignalClarity, type AiSignalClaritySignal, type CLIOptions, CSharpParser, type ChangeAmplificationScore, type CognitiveLoad, ComprehensionDifficulty, type ConceptCohesion, CostConfig, DEFAULT_COST_CONFIG, DEFAULT_EXCLUDE, type DependencyHealthScore, type DocDriftRisk, ExportInfo, type ExportWithImports, type FileImport, type FileWithDomain, GoParser, JavaParser, type KnowledgeConcentrationRisk, Language, LanguageParser, type LoadFactor, MODEL_PRICING_PRESETS, ModelContextTier, type ModelPricingPreset, NamingConvention, ParseResult, ParserFactory, type PatternEntropy, ProductivityImpact, PythonParser, SEVERITY_TIME_ESTIMATES, ScanOptions, type ScoreHistoryEntry, type ScoreTrend, type SemanticDistance, SpokeOutput, type TechnicalDebtInterest, TechnicalValueChain, TechnicalValueChainSummary, type TestabilityIndex, TokenBudget, ToolName, type ToolProvider, ToolRegistry, ToolScoringOutput, TypeScriptParser, VAGUE_FILE_NAMES, calculateAgentGrounding, calculateAiSignalClarity, calculateBusinessROI, calculateChangeAmplification, calculateCognitiveLoad, calculateComprehensionDifficulty, calculateConceptCohesion, calculateDebtInterest, calculateDependencyHealth, calculateDocDrift, calculateExtendedFutureProofScore, calculateFutureProofScore, calculateImportSimilarity, calculateKnowledgeConcentration, calculateMonthlyCost, calculatePatternEntropy, calculateProductivityImpact, calculateSemanticDistance, calculateTechnicalValueChain, calculateTestabilityIndex, calculateTokenBudget, clearHistory, emitProgress, estimateCostFromBudget, estimateTokens, exportHistory, extractFunctions, extractImports, formatAcceptanceRate, formatCost, formatHours, generateValueChain, getElapsedTime, getFileCommitTimestamps, getFileExtension, getHistorySummary, getLineRangeLastModifiedCached, getModelPreset, getParser, getRepoMetadata, getSafetyIcon, getScoreBar, getSeverityColor, getSupportedLanguages, getWasmPath, handleCLIError, handleJSONOutput, initTreeSitter, initializeParsers, isFileSupported, isSourceFile, loadConfig, loadMergedConfig, loadScoreHistory, mergeConfigWithDefaults, parseCode, parseFileExports, predictAcceptanceRate, readFileContent, resolveOutputPath, saveScoreEntry, scanEntries, scanFiles, setupParser, validateSpokeOutput, validateWithSchema };
|