@aiready/core 0.24.22 → 0.24.25
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-3GCIM6XG.mjs +904 -0
- package/dist/chunk-3S5WU6KX.mjs +552 -0
- package/dist/chunk-4OMXBYX7.mjs +167 -0
- package/dist/chunk-6YWGFKZG.mjs +250 -0
- package/dist/chunk-A3BIROBZ.mjs +902 -0
- package/dist/chunk-BYMQDORS.mjs +256 -0
- package/dist/chunk-CBZNRNEF.mjs +309 -0
- package/dist/chunk-ET2WRQSM.mjs +262 -0
- package/dist/chunk-F4FTHFHK.mjs +552 -0
- package/dist/chunk-G737F72Q.mjs +256 -0
- package/dist/chunk-GVFUAIWU.mjs +864 -0
- package/dist/chunk-KSEA5XDH.mjs +894 -0
- package/dist/chunk-LMIZRJFV.mjs +256 -0
- package/dist/chunk-LRPBPWBM.mjs +170 -0
- package/dist/chunk-MOTBXU6W.mjs +902 -0
- package/dist/chunk-OAH6FVVF.mjs +919 -0
- package/dist/chunk-OCM6HLBM.mjs +262 -0
- package/dist/chunk-OFBRNGKT.mjs +893 -0
- package/dist/chunk-P3KYGPO4.mjs +262 -0
- package/dist/chunk-PNWSO6XQ.mjs +250 -0
- package/dist/chunk-SO6UKAPR.mjs +164 -0
- package/dist/chunk-T2FW6AAF.mjs +552 -0
- package/dist/chunk-TQX77RIC.mjs +250 -0
- package/dist/chunk-X64EJ3ZO.mjs +314 -0
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +32 -5
- package/dist/client/index.mjs +1 -1
- package/dist/csharp-parser-3CGM6FKB.mjs +9 -0
- package/dist/csharp-parser-UWRUYHUH.mjs +9 -0
- package/dist/csharp-parser-WIAIE3DD.mjs +9 -0
- package/dist/go-parser-AH5QNS4O.mjs +9 -0
- package/dist/go-parser-CSAB23BL.mjs +9 -0
- package/dist/go-parser-Q3HI32B7.mjs +9 -0
- package/dist/index-CL_0jxiJ.d.mts +1315 -0
- package/dist/index-CL_0jxiJ.d.ts +1315 -0
- package/dist/index-ClwnZa_Y.d.mts +1333 -0
- package/dist/index-ClwnZa_Y.d.ts +1333 -0
- package/dist/index-DC0cdf0g.d.mts +1321 -0
- package/dist/index-DC0cdf0g.d.ts +1321 -0
- package/dist/index-DKqKGhcJ.d.mts +1309 -0
- package/dist/index-DKqKGhcJ.d.ts +1309 -0
- package/dist/index-DNnlhdk0.d.mts +1318 -0
- package/dist/index-DNnlhdk0.d.ts +1318 -0
- package/dist/index-De2xy_k5.d.mts +1326 -0
- package/dist/index-De2xy_k5.d.ts +1326 -0
- package/dist/index.d.mts +104 -20
- package/dist/index.d.ts +104 -20
- package/dist/index.js +581 -147
- package/dist/index.mjs +507 -134
- package/dist/java-parser-GUKWCEYS.mjs +9 -0
- package/dist/java-parser-XTWT5Y5I.mjs +9 -0
- package/dist/java-parser-YP5XWLQK.mjs +9 -0
- package/dist/python-parser-AOPXUEIV.mjs +8 -0
- package/dist/python-parser-FB55P6UA.mjs +8 -0
- package/dist/python-parser-WIJPSRKC.mjs +8 -0
- package/dist/typescript-parser-5ZWLLMWJ.mjs +7 -0
- package/dist/typescript-parser-TWPRLYK6.mjs +7 -0
- package/package.json +5 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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-ClwnZa_Y.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-ClwnZa_Y.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { Command } from 'commander';
|
|
5
5
|
import * as chalk from 'chalk';
|
|
@@ -219,34 +219,18 @@ declare function scanEntries(options: ScanOptions): Promise<{
|
|
|
219
219
|
files: string[];
|
|
220
220
|
dirs: string[];
|
|
221
221
|
}>;
|
|
222
|
-
/**
|
|
223
|
-
* Read the contents of a file as a UTF-8 string.
|
|
224
|
-
* @param filePath - Absolute path to the file to read
|
|
225
|
-
* @returns The file contents as a string
|
|
226
|
-
*/
|
|
227
222
|
/**
|
|
228
223
|
* Read the contents of a file as a UTF-8 string.
|
|
229
224
|
* @param filePath - Absolute path to the file to read
|
|
230
225
|
* @returns The file contents as a string
|
|
231
226
|
*/
|
|
232
227
|
declare function readFileContent(filePath: string): Promise<string>;
|
|
233
|
-
/**
|
|
234
|
-
* Extract the file extension from a file path.
|
|
235
|
-
* @param filePath - The file path to extract extension from
|
|
236
|
-
* @returns The file extension without the dot (e.g., 'ts', 'js', 'py')
|
|
237
|
-
*/
|
|
238
228
|
/**
|
|
239
229
|
* Extract the file extension from a file path.
|
|
240
230
|
* @param filePath - The file path to extract extension from
|
|
241
231
|
* @returns The file extension without the dot (e.g., 'ts', 'js', 'py')
|
|
242
232
|
*/
|
|
243
233
|
declare function getFileExtension(filePath: string): string;
|
|
244
|
-
/**
|
|
245
|
-
* Check if a file is a source code file based on its extension.
|
|
246
|
-
* Supports TypeScript, JavaScript, Python, Java, Go, Rust, and C#.
|
|
247
|
-
* @param filePath - The file path to check
|
|
248
|
-
* @returns True if the file has a source code extension
|
|
249
|
-
*/
|
|
250
234
|
/**
|
|
251
235
|
* Check if a file is a source code file based on its extension.
|
|
252
236
|
* Supports TypeScript, JavaScript, Python, Java, Go, Rust, and C#.
|
|
@@ -270,6 +254,14 @@ declare function getFilesByPattern(dir: string, pattern: RegExp): string[];
|
|
|
270
254
|
* @lastUpdated 2026-03-18
|
|
271
255
|
*/
|
|
272
256
|
declare function resolveOutputPath(userPath: string | undefined, defaultFilename: string, workingDir?: string): string;
|
|
257
|
+
/**
|
|
258
|
+
* Safe JSON stringify that handles BigInt values.
|
|
259
|
+
*
|
|
260
|
+
* @param obj - Object to stringify.
|
|
261
|
+
* @param indent - Indentation spaces.
|
|
262
|
+
* @returns JSON string.
|
|
263
|
+
*/
|
|
264
|
+
declare function safeJsonStringify(obj: any, indent?: number): string;
|
|
273
265
|
/**
|
|
274
266
|
* Handle JSON output for CLI commands.
|
|
275
267
|
* Writes to file if outputFile is provided, otherwise logs to console.
|
|
@@ -567,12 +559,32 @@ declare function parseFileExports(code: string, filePath: string): Promise<{
|
|
|
567
559
|
*/
|
|
568
560
|
declare function estimateTokens(text: string): number;
|
|
569
561
|
|
|
562
|
+
declare const DEFAULT_AUTO_EXCLUDE_PATTERNS: {
|
|
563
|
+
tests: string[];
|
|
564
|
+
mocks: string[];
|
|
565
|
+
barrels: string[];
|
|
566
|
+
generated: string[];
|
|
567
|
+
};
|
|
568
|
+
interface ValidationWarning {
|
|
569
|
+
line?: number;
|
|
570
|
+
rule: string;
|
|
571
|
+
message: string;
|
|
572
|
+
suggestion?: string;
|
|
573
|
+
}
|
|
570
574
|
/**
|
|
571
575
|
* Search upwards for AIReady configuration files and load the first one found.
|
|
572
576
|
* @param rootDir Starting directory for the search
|
|
577
|
+
* @param options Options for config loading
|
|
573
578
|
* @returns Parsed configuration object or null if not found
|
|
574
579
|
*/
|
|
575
|
-
declare function loadConfig(rootDir: string
|
|
580
|
+
declare function loadConfig(rootDir: string, options?: {
|
|
581
|
+
validate?: boolean;
|
|
582
|
+
applyAutoExclude?: boolean;
|
|
583
|
+
}): Promise<{
|
|
584
|
+
config: AIReadyConfig | null;
|
|
585
|
+
warnings: ValidationWarning[];
|
|
586
|
+
}>;
|
|
587
|
+
declare function validateConfig(configPath: string): ValidationWarning[];
|
|
576
588
|
/**
|
|
577
589
|
* Merge user-provided configuration with default settings.
|
|
578
590
|
* @param userConfig The configuration loaded from file
|
|
@@ -771,6 +783,15 @@ declare function inferPatternType(keyword: string, name: string): string;
|
|
|
771
783
|
*/
|
|
772
784
|
declare function extractCodeBlocks(file: string, content: string): CodeBlock[];
|
|
773
785
|
|
|
786
|
+
/**
|
|
787
|
+
* Common utility to get the directory name from import.meta.url.
|
|
788
|
+
* Handles both ESM and CJS compatibility for local development.
|
|
789
|
+
*
|
|
790
|
+
* @param importMetaUrl - The import.meta.url from the calling module.
|
|
791
|
+
* @returns The absolute directory path of the calling module.
|
|
792
|
+
*/
|
|
793
|
+
declare function getDirname(importMetaUrl?: string): string;
|
|
794
|
+
|
|
774
795
|
/**
|
|
775
796
|
* Business Value Metrics Module.
|
|
776
797
|
*
|
|
@@ -2083,6 +2104,14 @@ declare function getRepoMetadata(directory: string): {
|
|
|
2083
2104
|
commit?: string;
|
|
2084
2105
|
author?: string;
|
|
2085
2106
|
};
|
|
2107
|
+
/**
|
|
2108
|
+
* Get a list of files that have been changed in the current repository.
|
|
2109
|
+
* Includes staged and unstaged changes, and untracked files.
|
|
2110
|
+
*
|
|
2111
|
+
* @param directory - The repository root directory.
|
|
2112
|
+
* @returns Array of relative file paths.
|
|
2113
|
+
*/
|
|
2114
|
+
declare function getChangedFiles(directory: string): string[];
|
|
2086
2115
|
|
|
2087
2116
|
/**
|
|
2088
2117
|
* Utilities for GitHub Actions integration
|
|
@@ -2197,4 +2226,59 @@ declare function withErrorHandling<T>(operation: () => Promise<T>, context?: str
|
|
|
2197
2226
|
error: string;
|
|
2198
2227
|
}>;
|
|
2199
2228
|
|
|
2200
|
-
|
|
2229
|
+
interface IssueContext {
|
|
2230
|
+
number: number;
|
|
2231
|
+
title: string;
|
|
2232
|
+
body: string;
|
|
2233
|
+
labels: string[];
|
|
2234
|
+
author?: string;
|
|
2235
|
+
}
|
|
2236
|
+
interface ResolveResult {
|
|
2237
|
+
success: boolean;
|
|
2238
|
+
message: string;
|
|
2239
|
+
changes?: string[];
|
|
2240
|
+
}
|
|
2241
|
+
interface ResolverOptions {
|
|
2242
|
+
generate: (prompt: string) => Promise<string>;
|
|
2243
|
+
trustedAuthors?: string[];
|
|
2244
|
+
}
|
|
2245
|
+
declare class GitHubIssueResolverAgent {
|
|
2246
|
+
private generate;
|
|
2247
|
+
private trustedAuthors;
|
|
2248
|
+
constructor(options: ResolverOptions);
|
|
2249
|
+
resolve(issue: IssueContext, workingDir: string): Promise<ResolveResult>;
|
|
2250
|
+
private identifyStrategy;
|
|
2251
|
+
private executeSubtreeSync;
|
|
2252
|
+
private applyContributionPattern;
|
|
2253
|
+
private applyAgenticPatch;
|
|
2254
|
+
private extractVersion;
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
interface GitHubIssue {
|
|
2258
|
+
title: string;
|
|
2259
|
+
body: string;
|
|
2260
|
+
labels?: string[];
|
|
2261
|
+
}
|
|
2262
|
+
declare class GitHubService {
|
|
2263
|
+
private octokit;
|
|
2264
|
+
constructor(token: string);
|
|
2265
|
+
/**
|
|
2266
|
+
* Creates an issue in a repository.
|
|
2267
|
+
*/
|
|
2268
|
+
createHubIssue(owner: string, repo: string, issue: GitHubIssue): Promise<number>;
|
|
2269
|
+
/**
|
|
2270
|
+
* Creates a Pull Request in a repository.
|
|
2271
|
+
*/
|
|
2272
|
+
createPullRequest(owner: string, repo: string, pr: {
|
|
2273
|
+
title: string;
|
|
2274
|
+
body: string;
|
|
2275
|
+
head: string;
|
|
2276
|
+
base: string;
|
|
2277
|
+
}): Promise<number>;
|
|
2278
|
+
/**
|
|
2279
|
+
* Scans a repository content.
|
|
2280
|
+
*/
|
|
2281
|
+
listRecentChangesInRepo(owner: string, repo: string, path?: string): Promise<string[]>;
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
export { AIReadyConfig, AWS_CONSTANTS, AcceptancePrediction, type AgentGroundingScore, type AiSignalClarity, type AiSignalClaritySignal, AnalysisResult, type AwsRegion, type CLIOptions, CSharpParser, type ChangeAmplificationScore, type CodeBlock, type CognitiveLoad, ComprehensionDifficulty, type ConceptCohesion, type ConfigProvider, CostConfig, DEFAULT_AUTO_EXCLUDE_PATTERNS, DEFAULT_COST_CONFIG, DEFAULT_EXCLUDE, DIContainer, DI_TOKENS, type DependencyHealthScore, type DocDriftRisk, ExportInfo, ExportWithImports, type Factory, FileImport, type FileSystem, type FileTestability, type FileWithDomain, type GitHubIssue, GitHubIssueResolverAgent, GitHubService, GoParser, type HtmlReportSection, Issue, type IssueContext, type JSONOutputParams, JavaParser, type KnowledgeConcentrationRisk, Language, LanguageParser, type LoadFactor, type Logger, MODEL_PRICING_PRESETS, Metrics, ModelContextTier, type ModelPricingPreset, NamingConvention, ParseResult, ParserFactory, type PatternEntropy, ProductivityImpact, type ProviderFactoryConfig, PythonParser, type ReportOptions, type ResolveResult, type ResolverOptions, SEVERITY_TIME_ESTIMATES, ScanOptions, type ScoreHistoryEntry, type ScoreTrend, type SemanticDistance, Severity, Severity as SeverityType, SpokeOutput, type StandardReportData, type StandardScoringParams, type StatCard, TEST_PATTERNS, type TableConfig, type TechnicalDebtInterest, TechnicalValueChain, TechnicalValueChainSummary, type TestabilityIndex, type Token, TokenBudget, ToolName, ToolOptions, type ToolProvider, ToolRegistry, ToolScoringOutput, TypeScriptParser, VAGUE_FILE_NAMES, type ValidationWarning, 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, createErrorResponse, createProvider, createStandardCommand, createStandardProgressCallback, defaultImplementations, detectTestFramework, displayStandardConsoleReport, emitAnnotation, emitIssuesAsAnnotations, emitProgress, ensureDir, estimateCostFromBudget, estimateTokens, executeSpokeCli, exportHistory, extractCodeBlocks, filterBySeverity, findLatestReport, findLatestScanReport, formatAcceptanceRate, formatCost, formatHours, formatStandardCliResult, formatStandardReport, generateCompleteReport, generateIssueSummary, generateReportFooter, generateReportHead, generateReportHero, generateStandardHtmlReport, generateStatCards, generateTable, generateValueChain, getChangedFiles, getDirname, getElapsedTime, getErrorMessage, getFileCommitTimestamps, getFileExtension, getFilesByPattern, getHistorySummary, getLineRangeLastModifiedCached, getModelPreset, getParser, getRepoMetadata, getReportTimestamp, getSafetyIcon, getScoreBar, getScoreColor, getSeverityBadge, getSeverityColor, getSeverityEnum, getSeverityLabel, getSeverityLevel, getSeverityValue, getSupportedLanguages, getTerminalDivider, getWasmPath, globalContainer, groupIssuesByFile, handleCLIError, handleJSONOutput, handleStandardJSONOutput, inferPatternType, initTreeSitter, initializeParsers, isBuildArtifact, isFileSupported, isIgnorableSourceFile, isSourceFile, isTestFile, loadConfig, loadMergedConfig, loadScoreHistory, mergeConfigWithDefaults, normalizeAnalysisResult, normalizeIssue, normalizeMetrics, normalizeSeverity, normalizeSpokeOutput, parseFileExports, predictAcceptanceRate, prepareActionConfig, printTerminalHeader, readFileContent, resolveOutputFormat, resolveOutputPath, runBatchAnalysis, runStandardCliAction, safeJsonStringify, saveScoreEntry, scanEntries, scanFiles, setupParser, severityToAnnotationLevel, toErrorMessage, validateConfig, validateSpokeOutput, validateWithSchema, withErrorHandling, wrapInCard };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as ToolName, S as ScanOptions, a as SpokeOutput, b as ToolScoringOutput, c as 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-ClwnZa_Y.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-ClwnZa_Y.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { Command } from 'commander';
|
|
5
5
|
import * as chalk from 'chalk';
|
|
@@ -219,34 +219,18 @@ declare function scanEntries(options: ScanOptions): Promise<{
|
|
|
219
219
|
files: string[];
|
|
220
220
|
dirs: string[];
|
|
221
221
|
}>;
|
|
222
|
-
/**
|
|
223
|
-
* Read the contents of a file as a UTF-8 string.
|
|
224
|
-
* @param filePath - Absolute path to the file to read
|
|
225
|
-
* @returns The file contents as a string
|
|
226
|
-
*/
|
|
227
222
|
/**
|
|
228
223
|
* Read the contents of a file as a UTF-8 string.
|
|
229
224
|
* @param filePath - Absolute path to the file to read
|
|
230
225
|
* @returns The file contents as a string
|
|
231
226
|
*/
|
|
232
227
|
declare function readFileContent(filePath: string): Promise<string>;
|
|
233
|
-
/**
|
|
234
|
-
* Extract the file extension from a file path.
|
|
235
|
-
* @param filePath - The file path to extract extension from
|
|
236
|
-
* @returns The file extension without the dot (e.g., 'ts', 'js', 'py')
|
|
237
|
-
*/
|
|
238
228
|
/**
|
|
239
229
|
* Extract the file extension from a file path.
|
|
240
230
|
* @param filePath - The file path to extract extension from
|
|
241
231
|
* @returns The file extension without the dot (e.g., 'ts', 'js', 'py')
|
|
242
232
|
*/
|
|
243
233
|
declare function getFileExtension(filePath: string): string;
|
|
244
|
-
/**
|
|
245
|
-
* Check if a file is a source code file based on its extension.
|
|
246
|
-
* Supports TypeScript, JavaScript, Python, Java, Go, Rust, and C#.
|
|
247
|
-
* @param filePath - The file path to check
|
|
248
|
-
* @returns True if the file has a source code extension
|
|
249
|
-
*/
|
|
250
234
|
/**
|
|
251
235
|
* Check if a file is a source code file based on its extension.
|
|
252
236
|
* Supports TypeScript, JavaScript, Python, Java, Go, Rust, and C#.
|
|
@@ -270,6 +254,14 @@ declare function getFilesByPattern(dir: string, pattern: RegExp): string[];
|
|
|
270
254
|
* @lastUpdated 2026-03-18
|
|
271
255
|
*/
|
|
272
256
|
declare function resolveOutputPath(userPath: string | undefined, defaultFilename: string, workingDir?: string): string;
|
|
257
|
+
/**
|
|
258
|
+
* Safe JSON stringify that handles BigInt values.
|
|
259
|
+
*
|
|
260
|
+
* @param obj - Object to stringify.
|
|
261
|
+
* @param indent - Indentation spaces.
|
|
262
|
+
* @returns JSON string.
|
|
263
|
+
*/
|
|
264
|
+
declare function safeJsonStringify(obj: any, indent?: number): string;
|
|
273
265
|
/**
|
|
274
266
|
* Handle JSON output for CLI commands.
|
|
275
267
|
* Writes to file if outputFile is provided, otherwise logs to console.
|
|
@@ -567,12 +559,32 @@ declare function parseFileExports(code: string, filePath: string): Promise<{
|
|
|
567
559
|
*/
|
|
568
560
|
declare function estimateTokens(text: string): number;
|
|
569
561
|
|
|
562
|
+
declare const DEFAULT_AUTO_EXCLUDE_PATTERNS: {
|
|
563
|
+
tests: string[];
|
|
564
|
+
mocks: string[];
|
|
565
|
+
barrels: string[];
|
|
566
|
+
generated: string[];
|
|
567
|
+
};
|
|
568
|
+
interface ValidationWarning {
|
|
569
|
+
line?: number;
|
|
570
|
+
rule: string;
|
|
571
|
+
message: string;
|
|
572
|
+
suggestion?: string;
|
|
573
|
+
}
|
|
570
574
|
/**
|
|
571
575
|
* Search upwards for AIReady configuration files and load the first one found.
|
|
572
576
|
* @param rootDir Starting directory for the search
|
|
577
|
+
* @param options Options for config loading
|
|
573
578
|
* @returns Parsed configuration object or null if not found
|
|
574
579
|
*/
|
|
575
|
-
declare function loadConfig(rootDir: string
|
|
580
|
+
declare function loadConfig(rootDir: string, options?: {
|
|
581
|
+
validate?: boolean;
|
|
582
|
+
applyAutoExclude?: boolean;
|
|
583
|
+
}): Promise<{
|
|
584
|
+
config: AIReadyConfig | null;
|
|
585
|
+
warnings: ValidationWarning[];
|
|
586
|
+
}>;
|
|
587
|
+
declare function validateConfig(configPath: string): ValidationWarning[];
|
|
576
588
|
/**
|
|
577
589
|
* Merge user-provided configuration with default settings.
|
|
578
590
|
* @param userConfig The configuration loaded from file
|
|
@@ -771,6 +783,15 @@ declare function inferPatternType(keyword: string, name: string): string;
|
|
|
771
783
|
*/
|
|
772
784
|
declare function extractCodeBlocks(file: string, content: string): CodeBlock[];
|
|
773
785
|
|
|
786
|
+
/**
|
|
787
|
+
* Common utility to get the directory name from import.meta.url.
|
|
788
|
+
* Handles both ESM and CJS compatibility for local development.
|
|
789
|
+
*
|
|
790
|
+
* @param importMetaUrl - The import.meta.url from the calling module.
|
|
791
|
+
* @returns The absolute directory path of the calling module.
|
|
792
|
+
*/
|
|
793
|
+
declare function getDirname(importMetaUrl?: string): string;
|
|
794
|
+
|
|
774
795
|
/**
|
|
775
796
|
* Business Value Metrics Module.
|
|
776
797
|
*
|
|
@@ -2083,6 +2104,14 @@ declare function getRepoMetadata(directory: string): {
|
|
|
2083
2104
|
commit?: string;
|
|
2084
2105
|
author?: string;
|
|
2085
2106
|
};
|
|
2107
|
+
/**
|
|
2108
|
+
* Get a list of files that have been changed in the current repository.
|
|
2109
|
+
* Includes staged and unstaged changes, and untracked files.
|
|
2110
|
+
*
|
|
2111
|
+
* @param directory - The repository root directory.
|
|
2112
|
+
* @returns Array of relative file paths.
|
|
2113
|
+
*/
|
|
2114
|
+
declare function getChangedFiles(directory: string): string[];
|
|
2086
2115
|
|
|
2087
2116
|
/**
|
|
2088
2117
|
* Utilities for GitHub Actions integration
|
|
@@ -2197,4 +2226,59 @@ declare function withErrorHandling<T>(operation: () => Promise<T>, context?: str
|
|
|
2197
2226
|
error: string;
|
|
2198
2227
|
}>;
|
|
2199
2228
|
|
|
2200
|
-
|
|
2229
|
+
interface IssueContext {
|
|
2230
|
+
number: number;
|
|
2231
|
+
title: string;
|
|
2232
|
+
body: string;
|
|
2233
|
+
labels: string[];
|
|
2234
|
+
author?: string;
|
|
2235
|
+
}
|
|
2236
|
+
interface ResolveResult {
|
|
2237
|
+
success: boolean;
|
|
2238
|
+
message: string;
|
|
2239
|
+
changes?: string[];
|
|
2240
|
+
}
|
|
2241
|
+
interface ResolverOptions {
|
|
2242
|
+
generate: (prompt: string) => Promise<string>;
|
|
2243
|
+
trustedAuthors?: string[];
|
|
2244
|
+
}
|
|
2245
|
+
declare class GitHubIssueResolverAgent {
|
|
2246
|
+
private generate;
|
|
2247
|
+
private trustedAuthors;
|
|
2248
|
+
constructor(options: ResolverOptions);
|
|
2249
|
+
resolve(issue: IssueContext, workingDir: string): Promise<ResolveResult>;
|
|
2250
|
+
private identifyStrategy;
|
|
2251
|
+
private executeSubtreeSync;
|
|
2252
|
+
private applyContributionPattern;
|
|
2253
|
+
private applyAgenticPatch;
|
|
2254
|
+
private extractVersion;
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
interface GitHubIssue {
|
|
2258
|
+
title: string;
|
|
2259
|
+
body: string;
|
|
2260
|
+
labels?: string[];
|
|
2261
|
+
}
|
|
2262
|
+
declare class GitHubService {
|
|
2263
|
+
private octokit;
|
|
2264
|
+
constructor(token: string);
|
|
2265
|
+
/**
|
|
2266
|
+
* Creates an issue in a repository.
|
|
2267
|
+
*/
|
|
2268
|
+
createHubIssue(owner: string, repo: string, issue: GitHubIssue): Promise<number>;
|
|
2269
|
+
/**
|
|
2270
|
+
* Creates a Pull Request in a repository.
|
|
2271
|
+
*/
|
|
2272
|
+
createPullRequest(owner: string, repo: string, pr: {
|
|
2273
|
+
title: string;
|
|
2274
|
+
body: string;
|
|
2275
|
+
head: string;
|
|
2276
|
+
base: string;
|
|
2277
|
+
}): Promise<number>;
|
|
2278
|
+
/**
|
|
2279
|
+
* Scans a repository content.
|
|
2280
|
+
*/
|
|
2281
|
+
listRecentChangesInRepo(owner: string, repo: string, path?: string): Promise<string[]>;
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
export { AIReadyConfig, AWS_CONSTANTS, AcceptancePrediction, type AgentGroundingScore, type AiSignalClarity, type AiSignalClaritySignal, AnalysisResult, type AwsRegion, type CLIOptions, CSharpParser, type ChangeAmplificationScore, type CodeBlock, type CognitiveLoad, ComprehensionDifficulty, type ConceptCohesion, type ConfigProvider, CostConfig, DEFAULT_AUTO_EXCLUDE_PATTERNS, DEFAULT_COST_CONFIG, DEFAULT_EXCLUDE, DIContainer, DI_TOKENS, type DependencyHealthScore, type DocDriftRisk, ExportInfo, ExportWithImports, type Factory, FileImport, type FileSystem, type FileTestability, type FileWithDomain, type GitHubIssue, GitHubIssueResolverAgent, GitHubService, GoParser, type HtmlReportSection, Issue, type IssueContext, type JSONOutputParams, JavaParser, type KnowledgeConcentrationRisk, Language, LanguageParser, type LoadFactor, type Logger, MODEL_PRICING_PRESETS, Metrics, ModelContextTier, type ModelPricingPreset, NamingConvention, ParseResult, ParserFactory, type PatternEntropy, ProductivityImpact, type ProviderFactoryConfig, PythonParser, type ReportOptions, type ResolveResult, type ResolverOptions, SEVERITY_TIME_ESTIMATES, ScanOptions, type ScoreHistoryEntry, type ScoreTrend, type SemanticDistance, Severity, Severity as SeverityType, SpokeOutput, type StandardReportData, type StandardScoringParams, type StatCard, TEST_PATTERNS, type TableConfig, type TechnicalDebtInterest, TechnicalValueChain, TechnicalValueChainSummary, type TestabilityIndex, type Token, TokenBudget, ToolName, ToolOptions, type ToolProvider, ToolRegistry, ToolScoringOutput, TypeScriptParser, VAGUE_FILE_NAMES, type ValidationWarning, 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, createErrorResponse, createProvider, createStandardCommand, createStandardProgressCallback, defaultImplementations, detectTestFramework, displayStandardConsoleReport, emitAnnotation, emitIssuesAsAnnotations, emitProgress, ensureDir, estimateCostFromBudget, estimateTokens, executeSpokeCli, exportHistory, extractCodeBlocks, filterBySeverity, findLatestReport, findLatestScanReport, formatAcceptanceRate, formatCost, formatHours, formatStandardCliResult, formatStandardReport, generateCompleteReport, generateIssueSummary, generateReportFooter, generateReportHead, generateReportHero, generateStandardHtmlReport, generateStatCards, generateTable, generateValueChain, getChangedFiles, getDirname, getElapsedTime, getErrorMessage, getFileCommitTimestamps, getFileExtension, getFilesByPattern, getHistorySummary, getLineRangeLastModifiedCached, getModelPreset, getParser, getRepoMetadata, getReportTimestamp, getSafetyIcon, getScoreBar, getScoreColor, getSeverityBadge, getSeverityColor, getSeverityEnum, getSeverityLabel, getSeverityLevel, getSeverityValue, getSupportedLanguages, getTerminalDivider, getWasmPath, globalContainer, groupIssuesByFile, handleCLIError, handleJSONOutput, handleStandardJSONOutput, inferPatternType, initTreeSitter, initializeParsers, isBuildArtifact, isFileSupported, isIgnorableSourceFile, isSourceFile, isTestFile, loadConfig, loadMergedConfig, loadScoreHistory, mergeConfigWithDefaults, normalizeAnalysisResult, normalizeIssue, normalizeMetrics, normalizeSeverity, normalizeSpokeOutput, parseFileExports, predictAcceptanceRate, prepareActionConfig, printTerminalHeader, readFileContent, resolveOutputFormat, resolveOutputPath, runBatchAnalysis, runStandardCliAction, safeJsonStringify, saveScoreEntry, scanEntries, scanFiles, setupParser, severityToAnnotationLevel, toErrorMessage, validateConfig, validateSpokeOutput, validateWithSchema, withErrorHandling, wrapInCard };
|