@aiready/core 0.21.13 → 0.21.14
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/client.d.mts +4 -0
- package/dist/client.d.ts +4 -0
- package/dist/index.d.mts +15 -25
- package/dist/index.d.ts +15 -25
- package/dist/index.js +1705 -1447
- package/dist/index.mjs +1310 -1053
- package/package.json +3 -1
package/dist/client.d.mts
CHANGED
|
@@ -762,6 +762,10 @@ interface LanguageParser {
|
|
|
762
762
|
* Get naming conventions for this language
|
|
763
763
|
*/
|
|
764
764
|
getNamingConventions(): NamingConvention;
|
|
765
|
+
/**
|
|
766
|
+
* Initialize the parser (e.g. load WASM)
|
|
767
|
+
*/
|
|
768
|
+
initialize(): Promise<void>;
|
|
765
769
|
/**
|
|
766
770
|
* Check if this parser can handle a file
|
|
767
771
|
* @param filePath - File path to check
|
package/dist/client.d.ts
CHANGED
|
@@ -762,6 +762,10 @@ interface LanguageParser {
|
|
|
762
762
|
* Get naming conventions for this language
|
|
763
763
|
*/
|
|
764
764
|
getNamingConventions(): NamingConvention;
|
|
765
|
+
/**
|
|
766
|
+
* Initialize the parser (e.g. load WASM)
|
|
767
|
+
*/
|
|
768
|
+
initialize(): Promise<void>;
|
|
765
769
|
/**
|
|
766
770
|
* Check if this parser can handle a file
|
|
767
771
|
* @param filePath - File path to check
|
package/dist/index.d.mts
CHANGED
|
@@ -451,11 +451,19 @@ declare class ParserFactory {
|
|
|
451
451
|
* Reset factory (useful for testing)
|
|
452
452
|
*/
|
|
453
453
|
static reset(): void;
|
|
454
|
+
/**
|
|
455
|
+
* Initialize all registered parsers
|
|
456
|
+
*/
|
|
457
|
+
initializeAll(): Promise<void>;
|
|
454
458
|
}
|
|
455
459
|
/**
|
|
456
460
|
* Convenience function to get parser for a file
|
|
457
461
|
*/
|
|
458
462
|
declare function getParser(filePath: string): LanguageParser | null;
|
|
463
|
+
/**
|
|
464
|
+
* Initialize all parsers
|
|
465
|
+
*/
|
|
466
|
+
declare function initializeParsers(): Promise<void>;
|
|
459
467
|
/**
|
|
460
468
|
* Convenience function to check if file is supported
|
|
461
469
|
*/
|
|
@@ -474,6 +482,7 @@ declare function getSupportedLanguages(): Language[];
|
|
|
474
482
|
declare class TypeScriptParser implements LanguageParser {
|
|
475
483
|
readonly language = Language.TypeScript;
|
|
476
484
|
readonly extensions: string[];
|
|
485
|
+
initialize(): Promise<void>;
|
|
477
486
|
parse(code: string, filePath: string): ParseResult;
|
|
478
487
|
getNamingConventions(): NamingConvention;
|
|
479
488
|
canHandle(filePath: string): boolean;
|
|
@@ -483,17 +492,7 @@ declare class TypeScriptParser implements LanguageParser {
|
|
|
483
492
|
}
|
|
484
493
|
|
|
485
494
|
/**
|
|
486
|
-
* Python Parser using tree-sitter
|
|
487
|
-
*
|
|
488
|
-
* Parses Python files using tree-sitter-python for accurate AST parsing
|
|
489
|
-
*/
|
|
490
|
-
|
|
491
|
-
/**
|
|
492
|
-
* Python Parser implementation
|
|
493
|
-
*
|
|
494
|
-
* Note: This implementation will use tree-sitter-python for parsing.
|
|
495
|
-
* For now, it provides a skeleton that can be filled in once web-tree-sitter
|
|
496
|
-
* is properly configured.
|
|
495
|
+
* Python Parser implementation using tree-sitter
|
|
497
496
|
*/
|
|
498
497
|
declare class PythonParser implements LanguageParser {
|
|
499
498
|
readonly language = Language.Python;
|
|
@@ -502,25 +501,16 @@ declare class PythonParser implements LanguageParser {
|
|
|
502
501
|
private initialized;
|
|
503
502
|
/**
|
|
504
503
|
* Initialize the tree-sitter parser
|
|
505
|
-
* This is async because tree-sitter WASM needs to be loaded
|
|
506
504
|
*/
|
|
507
505
|
initialize(): Promise<void>;
|
|
508
506
|
parse(code: string, filePath: string): ParseResult;
|
|
507
|
+
private extractImportsAST;
|
|
508
|
+
private extractExportsAST;
|
|
509
|
+
private extractParameters;
|
|
510
|
+
private parseRegex;
|
|
509
511
|
getNamingConventions(): NamingConvention;
|
|
510
512
|
canHandle(filePath: string): boolean;
|
|
511
|
-
/**
|
|
512
|
-
* Regex-based import extraction (temporary implementation)
|
|
513
|
-
*/
|
|
514
513
|
private extractImportsRegex;
|
|
515
|
-
/**
|
|
516
|
-
* Regex-based export extraction (temporary implementation)
|
|
517
|
-
*
|
|
518
|
-
* Python doesn't have explicit exports like JavaScript.
|
|
519
|
-
* We extract:
|
|
520
|
-
* - Functions defined at module level (def)
|
|
521
|
-
* - Classes defined at module level (class)
|
|
522
|
-
* - Variables in __all__ list
|
|
523
|
-
*/
|
|
524
514
|
private extractExportsRegex;
|
|
525
515
|
}
|
|
526
516
|
|
|
@@ -855,4 +845,4 @@ declare function getRepoMetadata(directory: string): {
|
|
|
855
845
|
author?: string;
|
|
856
846
|
};
|
|
857
847
|
|
|
858
|
-
export { AIReadyConfig, type ASTNode, AcceptancePrediction, type AgentGroundingScore, type AiSignalClarity, type AiSignalClaritySignal, type CLIOptions, type ChangeAmplificationScore, type CognitiveLoad, ComprehensionDifficulty, type ConceptCohesion, CostConfig, DEFAULT_COST_CONFIG, DEFAULT_EXCLUDE, type DependencyHealthScore, type DocDriftRisk, type ExportWithImports, type FileImport, type FileWithDomain, 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, isFileSupported, isSourceFile, loadConfig, loadMergedConfig, loadScoreHistory, mergeConfigWithDefaults, parseCode, parseFileExports, predictAcceptanceRate, readFileContent, resolveOutputPath, saveScoreEntry, scanEntries, scanFiles, validateSpokeOutput, validateWithSchema };
|
|
848
|
+
export { AIReadyConfig, type ASTNode, AcceptancePrediction, type AgentGroundingScore, type AiSignalClarity, type AiSignalClaritySignal, type CLIOptions, type ChangeAmplificationScore, type CognitiveLoad, ComprehensionDifficulty, type ConceptCohesion, CostConfig, DEFAULT_COST_CONFIG, DEFAULT_EXCLUDE, type DependencyHealthScore, type DocDriftRisk, type ExportWithImports, type FileImport, type FileWithDomain, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -451,11 +451,19 @@ declare class ParserFactory {
|
|
|
451
451
|
* Reset factory (useful for testing)
|
|
452
452
|
*/
|
|
453
453
|
static reset(): void;
|
|
454
|
+
/**
|
|
455
|
+
* Initialize all registered parsers
|
|
456
|
+
*/
|
|
457
|
+
initializeAll(): Promise<void>;
|
|
454
458
|
}
|
|
455
459
|
/**
|
|
456
460
|
* Convenience function to get parser for a file
|
|
457
461
|
*/
|
|
458
462
|
declare function getParser(filePath: string): LanguageParser | null;
|
|
463
|
+
/**
|
|
464
|
+
* Initialize all parsers
|
|
465
|
+
*/
|
|
466
|
+
declare function initializeParsers(): Promise<void>;
|
|
459
467
|
/**
|
|
460
468
|
* Convenience function to check if file is supported
|
|
461
469
|
*/
|
|
@@ -474,6 +482,7 @@ declare function getSupportedLanguages(): Language[];
|
|
|
474
482
|
declare class TypeScriptParser implements LanguageParser {
|
|
475
483
|
readonly language = Language.TypeScript;
|
|
476
484
|
readonly extensions: string[];
|
|
485
|
+
initialize(): Promise<void>;
|
|
477
486
|
parse(code: string, filePath: string): ParseResult;
|
|
478
487
|
getNamingConventions(): NamingConvention;
|
|
479
488
|
canHandle(filePath: string): boolean;
|
|
@@ -483,17 +492,7 @@ declare class TypeScriptParser implements LanguageParser {
|
|
|
483
492
|
}
|
|
484
493
|
|
|
485
494
|
/**
|
|
486
|
-
* Python Parser using tree-sitter
|
|
487
|
-
*
|
|
488
|
-
* Parses Python files using tree-sitter-python for accurate AST parsing
|
|
489
|
-
*/
|
|
490
|
-
|
|
491
|
-
/**
|
|
492
|
-
* Python Parser implementation
|
|
493
|
-
*
|
|
494
|
-
* Note: This implementation will use tree-sitter-python for parsing.
|
|
495
|
-
* For now, it provides a skeleton that can be filled in once web-tree-sitter
|
|
496
|
-
* is properly configured.
|
|
495
|
+
* Python Parser implementation using tree-sitter
|
|
497
496
|
*/
|
|
498
497
|
declare class PythonParser implements LanguageParser {
|
|
499
498
|
readonly language = Language.Python;
|
|
@@ -502,25 +501,16 @@ declare class PythonParser implements LanguageParser {
|
|
|
502
501
|
private initialized;
|
|
503
502
|
/**
|
|
504
503
|
* Initialize the tree-sitter parser
|
|
505
|
-
* This is async because tree-sitter WASM needs to be loaded
|
|
506
504
|
*/
|
|
507
505
|
initialize(): Promise<void>;
|
|
508
506
|
parse(code: string, filePath: string): ParseResult;
|
|
507
|
+
private extractImportsAST;
|
|
508
|
+
private extractExportsAST;
|
|
509
|
+
private extractParameters;
|
|
510
|
+
private parseRegex;
|
|
509
511
|
getNamingConventions(): NamingConvention;
|
|
510
512
|
canHandle(filePath: string): boolean;
|
|
511
|
-
/**
|
|
512
|
-
* Regex-based import extraction (temporary implementation)
|
|
513
|
-
*/
|
|
514
513
|
private extractImportsRegex;
|
|
515
|
-
/**
|
|
516
|
-
* Regex-based export extraction (temporary implementation)
|
|
517
|
-
*
|
|
518
|
-
* Python doesn't have explicit exports like JavaScript.
|
|
519
|
-
* We extract:
|
|
520
|
-
* - Functions defined at module level (def)
|
|
521
|
-
* - Classes defined at module level (class)
|
|
522
|
-
* - Variables in __all__ list
|
|
523
|
-
*/
|
|
524
514
|
private extractExportsRegex;
|
|
525
515
|
}
|
|
526
516
|
|
|
@@ -855,4 +845,4 @@ declare function getRepoMetadata(directory: string): {
|
|
|
855
845
|
author?: string;
|
|
856
846
|
};
|
|
857
847
|
|
|
858
|
-
export { AIReadyConfig, type ASTNode, AcceptancePrediction, type AgentGroundingScore, type AiSignalClarity, type AiSignalClaritySignal, type CLIOptions, type ChangeAmplificationScore, type CognitiveLoad, ComprehensionDifficulty, type ConceptCohesion, CostConfig, DEFAULT_COST_CONFIG, DEFAULT_EXCLUDE, type DependencyHealthScore, type DocDriftRisk, type ExportWithImports, type FileImport, type FileWithDomain, 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, isFileSupported, isSourceFile, loadConfig, loadMergedConfig, loadScoreHistory, mergeConfigWithDefaults, parseCode, parseFileExports, predictAcceptanceRate, readFileContent, resolveOutputPath, saveScoreEntry, scanEntries, scanFiles, validateSpokeOutput, validateWithSchema };
|
|
848
|
+
export { AIReadyConfig, type ASTNode, AcceptancePrediction, type AgentGroundingScore, type AiSignalClarity, type AiSignalClaritySignal, type CLIOptions, type ChangeAmplificationScore, type CognitiveLoad, ComprehensionDifficulty, type ConceptCohesion, CostConfig, DEFAULT_COST_CONFIG, DEFAULT_EXCLUDE, type DependencyHealthScore, type DocDriftRisk, type ExportWithImports, type FileImport, type FileWithDomain, 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 };
|