@aiready/core 0.23.6 → 0.23.8
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-5SHLHMH7.mjs +760 -0
- package/dist/chunk-TJXR2CHZ.mjs +799 -0
- package/dist/client-BrIMPk89.d.mts +1214 -0
- package/dist/client-BrIMPk89.d.ts +1214 -0
- package/dist/client-C5BuGX4F.d.mts +1205 -0
- package/dist/client-C5BuGX4F.d.ts +1205 -0
- package/dist/client-CLulBnie.d.mts +1182 -0
- package/dist/client-CLulBnie.d.ts +1182 -0
- package/dist/client-CQwvp8ep.d.mts +1182 -0
- package/dist/client-CQwvp8ep.d.ts +1182 -0
- package/dist/client-PFPdeo-z.d.mts +1186 -0
- package/dist/client-PFPdeo-z.d.ts +1186 -0
- package/dist/client-wk2fgk1q.d.mts +1184 -0
- package/dist/client-wk2fgk1q.d.ts +1184 -0
- package/dist/client.d.mts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +42 -4
- package/dist/client.mjs +1 -1
- package/dist/index.d.mts +495 -149
- package/dist/index.d.ts +495 -149
- package/dist/index.js +507 -385
- package/dist/index.mjs +447 -364
- package/package.json +1 -1
package/dist/client.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { e as AIReadyConfig,
|
|
1
|
+
export { e as AIReadyConfig, h as AcceptancePrediction, A as AnalysisResult, r as AnalysisStatus, B as BusinessMetrics, t as COMMON_FINE_TUNING_OPTIONS, u as CONTEXT_TIER_THRESHOLDS, v as CommonASTNode, i as ComprehensionDifficulty, w as Config, C as CostConfig, D as DEFAULT_TOOL_WEIGHTS, n as ExportInfo, 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, I as Issue, U as IssueType, W as LANGUAGE_EXTENSIONS, l as Language, X as LanguageConfig, L as LanguageParser, Y as Lead, Z as LeadSchema, _ as LeadSource, $ as LeadSourceSchema, a0 as LeadSubmission, a1 as LeadSubmissionSchema, a2 as Location, M as Metrics, f as ModelContextTier, N as NamingConvention, a9 as ParseError, m as ParseResult, aa as ParseStatistics, P as ProductivityImpact, ab as ReadinessRating, ac as RecommendationPriority, ad as SCORING_PROFILES, ae as SIZE_ADJUSTED_THRESHOLDS, S as ScanOptions, af as ScanResult, ag as ScoringConfig, ah as ScoringProfile, ai as ScoringResult, d as Severity, d as SeverityType, ak as SourceLocation, al as SourceRange, a as SpokeOutput, ap as TOOL_NAME_MAP, k as TechnicalValueChain, j as TechnicalValueChainSummary, g as TokenBudget, T as ToolName, c as ToolOptions, ar as ToolOutput, b as ToolScoringOutput, as as UnifiedReport, at as UnifiedReportSchema, au as calculateOverallScore, av as formatScore, aw as formatToolScore, ax as generateHTML, ay as getProjectSizeTier, az as getRating, aA as getRatingDisplay, aB as getRatingSlug, aC as getRatingWithContext, aD as getRecommendedThreshold, aE as getToolWeight, aF as normalizeToolName, aG as parseWeightString } from './client-wk2fgk1q.mjs';
|
|
2
2
|
import 'zod';
|
package/dist/client.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { e as AIReadyConfig,
|
|
1
|
+
export { e as AIReadyConfig, h as AcceptancePrediction, A as AnalysisResult, r as AnalysisStatus, B as BusinessMetrics, t as COMMON_FINE_TUNING_OPTIONS, u as CONTEXT_TIER_THRESHOLDS, v as CommonASTNode, i as ComprehensionDifficulty, w as Config, C as CostConfig, D as DEFAULT_TOOL_WEIGHTS, n as ExportInfo, 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, I as Issue, U as IssueType, W as LANGUAGE_EXTENSIONS, l as Language, X as LanguageConfig, L as LanguageParser, Y as Lead, Z as LeadSchema, _ as LeadSource, $ as LeadSourceSchema, a0 as LeadSubmission, a1 as LeadSubmissionSchema, a2 as Location, M as Metrics, f as ModelContextTier, N as NamingConvention, a9 as ParseError, m as ParseResult, aa as ParseStatistics, P as ProductivityImpact, ab as ReadinessRating, ac as RecommendationPriority, ad as SCORING_PROFILES, ae as SIZE_ADJUSTED_THRESHOLDS, S as ScanOptions, af as ScanResult, ag as ScoringConfig, ah as ScoringProfile, ai as ScoringResult, d as Severity, d as SeverityType, ak as SourceLocation, al as SourceRange, a as SpokeOutput, ap as TOOL_NAME_MAP, k as TechnicalValueChain, j as TechnicalValueChainSummary, g as TokenBudget, T as ToolName, c as ToolOptions, ar as ToolOutput, b as ToolScoringOutput, as as UnifiedReport, at as UnifiedReportSchema, au as calculateOverallScore, av as formatScore, aw as formatToolScore, ax as generateHTML, ay as getProjectSizeTier, az as getRating, aA as getRatingDisplay, aB as getRatingSlug, aC as getRatingWithContext, aD as getRecommendedThreshold, aE as getToolWeight, aF as normalizeToolName, aG as parseWeightString } from './client-wk2fgk1q.js';
|
|
2
2
|
import 'zod';
|
package/dist/client.js
CHANGED
|
@@ -220,6 +220,44 @@ var UnifiedReportSchema = import_zod.z.object({
|
|
|
220
220
|
)
|
|
221
221
|
}).optional()
|
|
222
222
|
}).catchall(import_zod.z.any());
|
|
223
|
+
var AIReadyConfigSchema = import_zod.z.object({
|
|
224
|
+
/** Target score threshold (0-100) */
|
|
225
|
+
threshold: import_zod.z.number().optional(),
|
|
226
|
+
/** Files or directories to include in scan */
|
|
227
|
+
include: import_zod.z.array(import_zod.z.string()).optional(),
|
|
228
|
+
/** Files or directories to exclude from scan */
|
|
229
|
+
exclude: import_zod.z.array(import_zod.z.string()).optional(),
|
|
230
|
+
/** Scan-specific configuration */
|
|
231
|
+
scan: import_zod.z.object({
|
|
232
|
+
include: import_zod.z.array(import_zod.z.string()).optional(),
|
|
233
|
+
exclude: import_zod.z.array(import_zod.z.string()).optional(),
|
|
234
|
+
parallel: import_zod.z.boolean().optional(),
|
|
235
|
+
deep: import_zod.z.boolean().optional(),
|
|
236
|
+
tools: import_zod.z.array(import_zod.z.string()).optional()
|
|
237
|
+
}).optional(),
|
|
238
|
+
/** Output-specific configuration */
|
|
239
|
+
output: import_zod.z.object({
|
|
240
|
+
/** Output format (json, console, html) */
|
|
241
|
+
format: import_zod.z.enum(["json", "console", "html"]).optional(),
|
|
242
|
+
/** Output file path */
|
|
243
|
+
path: import_zod.z.string().optional(),
|
|
244
|
+
/** Output directory */
|
|
245
|
+
saveTo: import_zod.z.string().optional(),
|
|
246
|
+
/** Whether to show score breakdown in console */
|
|
247
|
+
showBreakdown: import_zod.z.boolean().optional(),
|
|
248
|
+
/** Baseline report to compare against */
|
|
249
|
+
compareBaseline: import_zod.z.string().optional()
|
|
250
|
+
}).optional(),
|
|
251
|
+
/** Tool-specific configuration overrides (Strictly ToolName -> Config) */
|
|
252
|
+
tools: import_zod.z.record(import_zod.z.string(), import_zod.z.any()).optional(),
|
|
253
|
+
/** Scoring profile and weights */
|
|
254
|
+
scoring: import_zod.z.object({
|
|
255
|
+
/** Name of the scoring profile (e.g. "strict", "balanced") */
|
|
256
|
+
profile: import_zod.z.string().optional(),
|
|
257
|
+
/** Custom weights for tools and metrics */
|
|
258
|
+
weights: import_zod.z.record(import_zod.z.string(), import_zod.z.number()).optional()
|
|
259
|
+
}).optional()
|
|
260
|
+
});
|
|
223
261
|
|
|
224
262
|
// src/types/business.ts
|
|
225
263
|
var import_zod2 = require("zod");
|
|
@@ -458,12 +496,12 @@ function getRecommendedThreshold(fileCount, modelTier = "standard") {
|
|
|
458
496
|
return base + modelBonus;
|
|
459
497
|
}
|
|
460
498
|
function normalizeToolName(shortName) {
|
|
461
|
-
return TOOL_NAME_MAP[shortName.toLowerCase()]
|
|
499
|
+
return TOOL_NAME_MAP[shortName.toLowerCase()] ?? shortName;
|
|
462
500
|
}
|
|
463
501
|
function getToolWeight(toolName, toolConfig, cliOverride, profile = "default" /* Default */) {
|
|
464
502
|
if (cliOverride !== void 0) return cliOverride;
|
|
465
503
|
if (toolConfig?.scoreWeight !== void 0) return toolConfig.scoreWeight;
|
|
466
|
-
const profileWeights = SCORING_PROFILES[profile]
|
|
504
|
+
const profileWeights = SCORING_PROFILES[profile] ?? DEFAULT_TOOL_WEIGHTS;
|
|
467
505
|
return profileWeights[toolName] ?? DEFAULT_TOOL_WEIGHTS[toolName] ?? 5;
|
|
468
506
|
}
|
|
469
507
|
function parseWeightString(weightStr) {
|
|
@@ -500,7 +538,7 @@ function calculateOverallScore(toolOutputs, config, cliWeights) {
|
|
|
500
538
|
const toolsUsed = [];
|
|
501
539
|
const calculationWeights = {};
|
|
502
540
|
for (const [toolName, output] of toolOutputs.entries()) {
|
|
503
|
-
const weight = weights.get(toolName)
|
|
541
|
+
const weight = weights.get(toolName) ?? 5;
|
|
504
542
|
weightedSum += output.score * weight;
|
|
505
543
|
totalWeight += weight;
|
|
506
544
|
toolsUsed.push(toolName);
|
|
@@ -511,7 +549,7 @@ function calculateOverallScore(toolOutputs, config, cliWeights) {
|
|
|
511
549
|
const rating = getRating(overall);
|
|
512
550
|
const formulaParts = Array.from(toolOutputs.entries()).map(
|
|
513
551
|
([name, output]) => {
|
|
514
|
-
const w = weights.get(name)
|
|
552
|
+
const w = weights.get(name) ?? 5;
|
|
515
553
|
return `(${output.score} \xD7 ${w})`;
|
|
516
554
|
}
|
|
517
555
|
);
|