@aiready/core 0.23.15 → 0.23.20
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-2Y6WZCES.mjs +859 -0
- package/dist/chunk-FMNCV4CC.mjs +859 -0
- package/dist/chunk-REU6OUBT.mjs +859 -0
- package/dist/chunk-RMH2TPAT.mjs +822 -0
- package/dist/chunk-SQHS6PFL.mjs +859 -0
- package/dist/chunk-ST75O5C5.mjs +859 -0
- package/dist/chunk-ZB3EHHAG.mjs +822 -0
- package/dist/client-CYz0qxGB.d.mts +1217 -0
- package/dist/client-CYz0qxGB.d.ts +1217 -0
- package/dist/client-DLvFR2qA.d.mts +1197 -0
- package/dist/client-DLvFR2qA.d.ts +1197 -0
- package/dist/client-jGuH6TAG.d.mts +1244 -0
- package/dist/client-jGuH6TAG.d.ts +1244 -0
- package/dist/client-pYldIAg2.d.mts +1209 -0
- package/dist/client-pYldIAg2.d.ts +1209 -0
- package/dist/client.d.mts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +210 -177
- package/dist/client.mjs +27 -3
- package/dist/index.d.mts +73 -4
- package/dist/index.d.ts +73 -4
- package/dist/index.js +362 -183
- package/dist/index.mjs +133 -9
- package/package.json +1 -1
package/dist/client.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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,
|
|
1
|
+
export { e as AIReadyConfig, o as AIReadyConfigSchema, h as AcceptancePrediction, A as AnalysisResult, q as AnalysisResultSchema, r as AnalysisStatus, s as AnalysisStatusSchema, aL as BaseGraphLink, aM as BaseGraphNode, 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, R as IssueSchema, U as IssueType, V as IssueTypeSchema, 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, a3 as LocationSchema, M as Metrics, a6 as MetricsSchema, f as ModelContextTier, a7 as ModelTier, a8 as ModelTierSchema, N as NamingConvention, a9 as ParseError, m as ParseResult, aa as ParseStatistics, P as ProductivityImpact, 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, aj as SeveritySchema, d as SeverityType, ak as SourceLocation, al as SourceRange, a as SpokeOutput, am as SpokeOutputSchema, an as SpokeSummary, ao as SpokeSummarySchema, ap as TOOL_NAME_MAP, k as TechnicalValueChain, j as TechnicalValueChainSummary, g as TokenBudget, T as ToolName, aq as ToolNameSchema, 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, az as getProjectSizeTier, aA as getRating, aB as getRatingDisplay, aE as getRatingSlug, aF as getRatingWithContext, aG as getRecommendedThreshold, aI as getToolWeight, aJ as normalizeToolName, aK as parseWeightString } from './client-jGuH6TAG.mjs';
|
|
2
2
|
import 'zod';
|
package/dist/client.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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,
|
|
1
|
+
export { e as AIReadyConfig, o as AIReadyConfigSchema, h as AcceptancePrediction, A as AnalysisResult, q as AnalysisResultSchema, r as AnalysisStatus, s as AnalysisStatusSchema, aL as BaseGraphLink, aM as BaseGraphNode, 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, R as IssueSchema, U as IssueType, V as IssueTypeSchema, 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, a3 as LocationSchema, M as Metrics, a6 as MetricsSchema, f as ModelContextTier, a7 as ModelTier, a8 as ModelTierSchema, N as NamingConvention, a9 as ParseError, m as ParseResult, aa as ParseStatistics, P as ProductivityImpact, 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, aj as SeveritySchema, d as SeverityType, ak as SourceLocation, al as SourceRange, a as SpokeOutput, am as SpokeOutputSchema, an as SpokeSummary, ao as SpokeSummarySchema, ap as TOOL_NAME_MAP, k as TechnicalValueChain, j as TechnicalValueChainSummary, g as TokenBudget, T as ToolName, aq as ToolNameSchema, 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, az as getProjectSizeTier, aA as getRating, aB as getRatingDisplay, aE as getRatingSlug, aF as getRatingWithContext, aG as getRecommendedThreshold, aI as getToolWeight, aJ as normalizeToolName, aK as parseWeightString } from './client-jGuH6TAG.js';
|
|
2
2
|
import 'zod';
|
package/dist/client.js
CHANGED
|
@@ -20,29 +20,41 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/client.ts
|
|
21
21
|
var client_exports = {};
|
|
22
22
|
__export(client_exports, {
|
|
23
|
+
AIReadyConfigSchema: () => AIReadyConfigSchema,
|
|
24
|
+
AnalysisResultSchema: () => AnalysisResultSchema,
|
|
23
25
|
AnalysisStatus: () => AnalysisStatus,
|
|
26
|
+
AnalysisStatusSchema: () => AnalysisStatusSchema,
|
|
24
27
|
COMMON_FINE_TUNING_OPTIONS: () => COMMON_FINE_TUNING_OPTIONS,
|
|
25
28
|
CONTEXT_TIER_THRESHOLDS: () => CONTEXT_TIER_THRESHOLDS,
|
|
26
29
|
DEFAULT_TOOL_WEIGHTS: () => DEFAULT_TOOL_WEIGHTS,
|
|
27
30
|
FRIENDLY_TOOL_NAMES: () => FRIENDLY_TOOL_NAMES,
|
|
28
31
|
GLOBAL_INFRA_OPTIONS: () => GLOBAL_INFRA_OPTIONS,
|
|
29
32
|
GLOBAL_SCAN_OPTIONS: () => GLOBAL_SCAN_OPTIONS,
|
|
33
|
+
IssueSchema: () => IssueSchema,
|
|
30
34
|
IssueType: () => IssueType,
|
|
35
|
+
IssueTypeSchema: () => IssueTypeSchema,
|
|
31
36
|
LANGUAGE_EXTENSIONS: () => LANGUAGE_EXTENSIONS,
|
|
32
37
|
Language: () => Language,
|
|
33
38
|
LeadSchema: () => LeadSchema,
|
|
34
39
|
LeadSource: () => LeadSource,
|
|
35
40
|
LeadSourceSchema: () => LeadSourceSchema,
|
|
36
41
|
LeadSubmissionSchema: () => LeadSubmissionSchema,
|
|
42
|
+
LocationSchema: () => LocationSchema,
|
|
43
|
+
MetricsSchema: () => MetricsSchema,
|
|
44
|
+
ModelTier: () => ModelTier,
|
|
45
|
+
ModelTierSchema: () => ModelTierSchema,
|
|
37
46
|
ParseError: () => ParseError,
|
|
38
|
-
ReadinessRating: () => ReadinessRating,
|
|
39
47
|
RecommendationPriority: () => RecommendationPriority,
|
|
40
48
|
SCORING_PROFILES: () => SCORING_PROFILES,
|
|
41
49
|
SIZE_ADJUSTED_THRESHOLDS: () => SIZE_ADJUSTED_THRESHOLDS,
|
|
42
50
|
ScoringProfile: () => ScoringProfile,
|
|
43
51
|
Severity: () => Severity,
|
|
52
|
+
SeveritySchema: () => SeveritySchema,
|
|
53
|
+
SpokeOutputSchema: () => SpokeOutputSchema,
|
|
54
|
+
SpokeSummarySchema: () => SpokeSummarySchema,
|
|
44
55
|
TOOL_NAME_MAP: () => TOOL_NAME_MAP,
|
|
45
56
|
ToolName: () => ToolName,
|
|
57
|
+
ToolNameSchema: () => ToolNameSchema,
|
|
46
58
|
UnifiedReportSchema: () => UnifiedReportSchema,
|
|
47
59
|
calculateOverallScore: () => calculateOverallScore,
|
|
48
60
|
formatScore: () => formatScore,
|
|
@@ -60,8 +72,66 @@ __export(client_exports, {
|
|
|
60
72
|
});
|
|
61
73
|
module.exports = __toCommonJS(client_exports);
|
|
62
74
|
|
|
63
|
-
// src/types/
|
|
75
|
+
// src/types/business.ts
|
|
64
76
|
var import_zod = require("zod");
|
|
77
|
+
var LeadSource = /* @__PURE__ */ ((LeadSource2) => {
|
|
78
|
+
LeadSource2["ClawMoreHero"] = "clawmore-hero";
|
|
79
|
+
LeadSource2["ClawMoreWaitlist"] = "clawmore-waitlist";
|
|
80
|
+
LeadSource2["ClawMoreBeta"] = "clawmore-beta";
|
|
81
|
+
LeadSource2["AiReadyPlatform"] = "aiready-platform";
|
|
82
|
+
return LeadSource2;
|
|
83
|
+
})(LeadSource || {});
|
|
84
|
+
var LeadSourceSchema = import_zod.z.nativeEnum(LeadSource);
|
|
85
|
+
var LeadSchema = import_zod.z.object({
|
|
86
|
+
id: import_zod.z.string(),
|
|
87
|
+
email: import_zod.z.string().email(),
|
|
88
|
+
name: import_zod.z.string().min(1),
|
|
89
|
+
interest: import_zod.z.string().default("General"),
|
|
90
|
+
notes: import_zod.z.string().optional(),
|
|
91
|
+
timestamp: import_zod.z.string().datetime(),
|
|
92
|
+
source: LeadSourceSchema,
|
|
93
|
+
status: import_zod.z.enum(["new", "contacted", "qualified", "converted", "archived"]).default("new")
|
|
94
|
+
});
|
|
95
|
+
var LeadSubmissionSchema = LeadSchema.omit({
|
|
96
|
+
id: true,
|
|
97
|
+
timestamp: true,
|
|
98
|
+
status: true
|
|
99
|
+
});
|
|
100
|
+
var ManagedAccountSchema = import_zod.z.object({
|
|
101
|
+
id: import_zod.z.string(),
|
|
102
|
+
// Internal UUID
|
|
103
|
+
accountId: import_zod.z.string(),
|
|
104
|
+
// AWS Account ID
|
|
105
|
+
userId: import_zod.z.string(),
|
|
106
|
+
// Owner (caopengau@gmail.com)
|
|
107
|
+
stripeSubscriptionId: import_zod.z.string(),
|
|
108
|
+
// AI Token Management
|
|
109
|
+
tokenStrategy: import_zod.z.enum(["managed", "byok"]).default("managed"),
|
|
110
|
+
byokConfig: import_zod.z.object({
|
|
111
|
+
openaiKey: import_zod.z.string().optional(),
|
|
112
|
+
anthropicKey: import_zod.z.string().optional(),
|
|
113
|
+
openrouterKey: import_zod.z.string().optional()
|
|
114
|
+
}).optional(),
|
|
115
|
+
// Financials (in cents)
|
|
116
|
+
baseFeeCents: import_zod.z.number().default(2900),
|
|
117
|
+
includedComputeCents: import_zod.z.number().default(1500),
|
|
118
|
+
// $15.00 AWS included
|
|
119
|
+
includedTokenCents: import_zod.z.number().default(500),
|
|
120
|
+
// $5.00 Managed Tokens included
|
|
121
|
+
// Pre-paid Balance (credits)
|
|
122
|
+
prepaidTokenBalanceCents: import_zod.z.number().default(0),
|
|
123
|
+
// Users buy these in $10 packs
|
|
124
|
+
currentMonthlyTokenSpendCents: import_zod.z.number().default(0),
|
|
125
|
+
// Governance
|
|
126
|
+
status: import_zod.z.enum(["provisioning", "active", "warning", "quarantined", "suspended"]).default("provisioning"),
|
|
127
|
+
lastCostSyncAt: import_zod.z.string().datetime().optional(),
|
|
128
|
+
region: import_zod.z.string().default("ap-southeast-2"),
|
|
129
|
+
// Alerting thresholds (percentage of includedComputeCents)
|
|
130
|
+
alertThresholds: import_zod.z.array(import_zod.z.number()).default([50, 80, 100, 150])
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
// src/types/enums.ts
|
|
134
|
+
var import_zod2 = require("zod");
|
|
65
135
|
var Severity = /* @__PURE__ */ ((Severity2) => {
|
|
66
136
|
Severity2["Critical"] = "critical";
|
|
67
137
|
Severity2["Major"] = "major";
|
|
@@ -69,7 +139,7 @@ var Severity = /* @__PURE__ */ ((Severity2) => {
|
|
|
69
139
|
Severity2["Info"] = "info";
|
|
70
140
|
return Severity2;
|
|
71
141
|
})(Severity || {});
|
|
72
|
-
var SeveritySchema =
|
|
142
|
+
var SeveritySchema = import_zod2.z.nativeEnum(Severity);
|
|
73
143
|
var ToolName = /* @__PURE__ */ ((ToolName2) => {
|
|
74
144
|
ToolName2["PatternDetect"] = "pattern-detect";
|
|
75
145
|
ToolName2["ContextAnalyzer"] = "context-analyzer";
|
|
@@ -86,7 +156,7 @@ var ToolName = /* @__PURE__ */ ((ToolName2) => {
|
|
|
86
156
|
ToolName2["SemanticDistance"] = "semantic-distance";
|
|
87
157
|
return ToolName2;
|
|
88
158
|
})(ToolName || {});
|
|
89
|
-
var ToolNameSchema =
|
|
159
|
+
var ToolNameSchema = import_zod2.z.nativeEnum(ToolName);
|
|
90
160
|
var FRIENDLY_TOOL_NAMES = {
|
|
91
161
|
["pattern-detect" /* PatternDetect */]: "Semantic Duplicates",
|
|
92
162
|
["context-analyzer" /* ContextAnalyzer */]: "Context Fragmentation",
|
|
@@ -123,14 +193,14 @@ var IssueType = /* @__PURE__ */ ((IssueType2) => {
|
|
|
123
193
|
IssueType2["ChangeAmplification"] = "change-amplification";
|
|
124
194
|
return IssueType2;
|
|
125
195
|
})(IssueType || {});
|
|
126
|
-
var IssueTypeSchema =
|
|
196
|
+
var IssueTypeSchema = import_zod2.z.nativeEnum(IssueType);
|
|
127
197
|
var AnalysisStatus = /* @__PURE__ */ ((AnalysisStatus2) => {
|
|
128
198
|
AnalysisStatus2["Processing"] = "processing";
|
|
129
199
|
AnalysisStatus2["Completed"] = "completed";
|
|
130
200
|
AnalysisStatus2["Failed"] = "failed";
|
|
131
201
|
return AnalysisStatus2;
|
|
132
202
|
})(AnalysisStatus || {});
|
|
133
|
-
var AnalysisStatusSchema =
|
|
203
|
+
var AnalysisStatusSchema = import_zod2.z.nativeEnum(AnalysisStatus);
|
|
134
204
|
var ModelTier = /* @__PURE__ */ ((ModelTier2) => {
|
|
135
205
|
ModelTier2["Compact"] = "compact";
|
|
136
206
|
ModelTier2["Standard"] = "standard";
|
|
@@ -138,192 +208,149 @@ var ModelTier = /* @__PURE__ */ ((ModelTier2) => {
|
|
|
138
208
|
ModelTier2["Frontier"] = "frontier";
|
|
139
209
|
return ModelTier2;
|
|
140
210
|
})(ModelTier || {});
|
|
141
|
-
var ModelTierSchema =
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
211
|
+
var ModelTierSchema = import_zod2.z.nativeEnum(ModelTier);
|
|
212
|
+
|
|
213
|
+
// src/types/common.ts
|
|
214
|
+
var import_zod3 = require("zod");
|
|
215
|
+
var LocationSchema = import_zod3.z.object({
|
|
216
|
+
file: import_zod3.z.string(),
|
|
217
|
+
line: import_zod3.z.number(),
|
|
218
|
+
column: import_zod3.z.number().optional(),
|
|
219
|
+
endLine: import_zod3.z.number().optional(),
|
|
220
|
+
endColumn: import_zod3.z.number().optional()
|
|
148
221
|
});
|
|
149
|
-
|
|
222
|
+
|
|
223
|
+
// src/types/schemas/issue.ts
|
|
224
|
+
var import_zod4 = require("zod");
|
|
225
|
+
var IssueSchema = import_zod4.z.object({
|
|
150
226
|
type: IssueTypeSchema,
|
|
151
227
|
severity: SeveritySchema,
|
|
152
|
-
message:
|
|
228
|
+
message: import_zod4.z.string(),
|
|
153
229
|
location: LocationSchema,
|
|
154
|
-
suggestion:
|
|
230
|
+
suggestion: import_zod4.z.string().optional()
|
|
155
231
|
});
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
232
|
+
|
|
233
|
+
// src/types/schemas/metrics.ts
|
|
234
|
+
var import_zod5 = require("zod");
|
|
235
|
+
var MetricsSchema = import_zod5.z.object({
|
|
236
|
+
tokenCost: import_zod5.z.number().optional(),
|
|
237
|
+
complexityScore: import_zod5.z.number().optional(),
|
|
238
|
+
consistencyScore: import_zod5.z.number().optional(),
|
|
239
|
+
docFreshnessScore: import_zod5.z.number().optional(),
|
|
161
240
|
// AI agent readiness metrics (v0.12+)
|
|
162
|
-
aiSignalClarityScore:
|
|
163
|
-
agentGroundingScore:
|
|
164
|
-
testabilityScore:
|
|
165
|
-
docDriftScore:
|
|
166
|
-
dependencyHealthScore:
|
|
241
|
+
aiSignalClarityScore: import_zod5.z.number().optional(),
|
|
242
|
+
agentGroundingScore: import_zod5.z.number().optional(),
|
|
243
|
+
testabilityScore: import_zod5.z.number().optional(),
|
|
244
|
+
docDriftScore: import_zod5.z.number().optional(),
|
|
245
|
+
dependencyHealthScore: import_zod5.z.number().optional(),
|
|
167
246
|
modelContextTier: ModelTierSchema.optional(),
|
|
168
247
|
// Business value metrics
|
|
169
|
-
estimatedMonthlyCost:
|
|
170
|
-
estimatedDeveloperHours:
|
|
171
|
-
comprehensionDifficultyIndex:
|
|
248
|
+
estimatedMonthlyCost: import_zod5.z.number().optional(),
|
|
249
|
+
estimatedDeveloperHours: import_zod5.z.number().optional(),
|
|
250
|
+
comprehensionDifficultyIndex: import_zod5.z.number().optional(),
|
|
172
251
|
// Extended metrics for specific spokes
|
|
173
|
-
totalSymbols:
|
|
174
|
-
totalExports:
|
|
252
|
+
totalSymbols: import_zod5.z.number().optional(),
|
|
253
|
+
totalExports: import_zod5.z.number().optional()
|
|
175
254
|
});
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
255
|
+
|
|
256
|
+
// src/types/schemas/report.ts
|
|
257
|
+
var import_zod6 = require("zod");
|
|
258
|
+
var AnalysisResultSchema = import_zod6.z.object({
|
|
259
|
+
fileName: import_zod6.z.string(),
|
|
260
|
+
issues: import_zod6.z.array(IssueSchema),
|
|
179
261
|
metrics: MetricsSchema
|
|
180
262
|
});
|
|
181
|
-
var SpokeSummarySchema =
|
|
182
|
-
totalFiles:
|
|
183
|
-
totalIssues:
|
|
184
|
-
criticalIssues:
|
|
185
|
-
majorIssues:
|
|
186
|
-
score:
|
|
187
|
-
}).catchall(
|
|
188
|
-
var SpokeOutputSchema =
|
|
189
|
-
results:
|
|
263
|
+
var SpokeSummarySchema = import_zod6.z.object({
|
|
264
|
+
totalFiles: import_zod6.z.number().optional(),
|
|
265
|
+
totalIssues: import_zod6.z.number().optional(),
|
|
266
|
+
criticalIssues: import_zod6.z.number().optional(),
|
|
267
|
+
majorIssues: import_zod6.z.number().optional(),
|
|
268
|
+
score: import_zod6.z.number().optional()
|
|
269
|
+
}).catchall(import_zod6.z.any());
|
|
270
|
+
var SpokeOutputSchema = import_zod6.z.object({
|
|
271
|
+
results: import_zod6.z.array(AnalysisResultSchema),
|
|
190
272
|
summary: SpokeSummarySchema,
|
|
191
|
-
metadata:
|
|
192
|
-
toolName:
|
|
193
|
-
version:
|
|
194
|
-
timestamp:
|
|
195
|
-
config:
|
|
196
|
-
}).catchall(
|
|
273
|
+
metadata: import_zod6.z.object({
|
|
274
|
+
toolName: import_zod6.z.string(),
|
|
275
|
+
version: import_zod6.z.string().optional(),
|
|
276
|
+
timestamp: import_zod6.z.string().optional(),
|
|
277
|
+
config: import_zod6.z.any().optional()
|
|
278
|
+
}).catchall(import_zod6.z.any()).optional()
|
|
197
279
|
});
|
|
198
|
-
var UnifiedReportSchema =
|
|
199
|
-
summary:
|
|
200
|
-
totalFiles:
|
|
201
|
-
totalIssues:
|
|
202
|
-
criticalIssues:
|
|
203
|
-
majorIssues:
|
|
204
|
-
businessImpact:
|
|
205
|
-
estimatedMonthlyWaste:
|
|
206
|
-
potentialSavings:
|
|
207
|
-
productivityHours:
|
|
280
|
+
var UnifiedReportSchema = import_zod6.z.object({
|
|
281
|
+
summary: import_zod6.z.object({
|
|
282
|
+
totalFiles: import_zod6.z.number(),
|
|
283
|
+
totalIssues: import_zod6.z.number(),
|
|
284
|
+
criticalIssues: import_zod6.z.number(),
|
|
285
|
+
majorIssues: import_zod6.z.number(),
|
|
286
|
+
businessImpact: import_zod6.z.object({
|
|
287
|
+
estimatedMonthlyWaste: import_zod6.z.number().optional(),
|
|
288
|
+
potentialSavings: import_zod6.z.number().optional(),
|
|
289
|
+
productivityHours: import_zod6.z.number().optional()
|
|
208
290
|
}).optional()
|
|
209
291
|
}),
|
|
210
|
-
results:
|
|
211
|
-
scoring:
|
|
212
|
-
overall:
|
|
213
|
-
rating:
|
|
214
|
-
timestamp:
|
|
215
|
-
breakdown:
|
|
216
|
-
|
|
217
|
-
toolName:
|
|
218
|
-
score:
|
|
219
|
-
}).catchall(
|
|
292
|
+
results: import_zod6.z.array(AnalysisResultSchema),
|
|
293
|
+
scoring: import_zod6.z.object({
|
|
294
|
+
overall: import_zod6.z.number(),
|
|
295
|
+
rating: import_zod6.z.string(),
|
|
296
|
+
timestamp: import_zod6.z.string(),
|
|
297
|
+
breakdown: import_zod6.z.array(
|
|
298
|
+
import_zod6.z.object({
|
|
299
|
+
toolName: import_zod6.z.union([ToolNameSchema, import_zod6.z.string()]),
|
|
300
|
+
score: import_zod6.z.number()
|
|
301
|
+
}).catchall(import_zod6.z.any())
|
|
220
302
|
)
|
|
221
303
|
}).optional()
|
|
222
|
-
}).catchall(
|
|
223
|
-
|
|
304
|
+
}).catchall(import_zod6.z.any());
|
|
305
|
+
|
|
306
|
+
// src/types/schemas/config.ts
|
|
307
|
+
var import_zod7 = require("zod");
|
|
308
|
+
var AIReadyConfigSchema = import_zod7.z.object({
|
|
224
309
|
/** Target score threshold (0-100) */
|
|
225
|
-
threshold:
|
|
310
|
+
threshold: import_zod7.z.number().optional(),
|
|
226
311
|
/** Files or directories to include in scan */
|
|
227
|
-
include:
|
|
312
|
+
include: import_zod7.z.array(import_zod7.z.string()).optional(),
|
|
228
313
|
/** Files or directories to exclude from scan */
|
|
229
|
-
exclude:
|
|
314
|
+
exclude: import_zod7.z.array(import_zod7.z.string()).optional(),
|
|
230
315
|
/** Scan-specific configuration */
|
|
231
|
-
scan:
|
|
232
|
-
include:
|
|
233
|
-
exclude:
|
|
234
|
-
parallel:
|
|
235
|
-
deep:
|
|
236
|
-
tools:
|
|
316
|
+
scan: import_zod7.z.object({
|
|
317
|
+
include: import_zod7.z.array(import_zod7.z.string()).optional(),
|
|
318
|
+
exclude: import_zod7.z.array(import_zod7.z.string()).optional(),
|
|
319
|
+
parallel: import_zod7.z.boolean().optional(),
|
|
320
|
+
deep: import_zod7.z.boolean().optional(),
|
|
321
|
+
tools: import_zod7.z.array(import_zod7.z.string()).optional()
|
|
237
322
|
}).optional(),
|
|
238
323
|
/** Output-specific configuration */
|
|
239
|
-
output:
|
|
324
|
+
output: import_zod7.z.object({
|
|
240
325
|
/** Output format (json, console, html) */
|
|
241
|
-
format:
|
|
326
|
+
format: import_zod7.z.enum(["json", "console", "html"]).optional(),
|
|
242
327
|
/** Output file path */
|
|
243
|
-
path:
|
|
328
|
+
path: import_zod7.z.string().optional(),
|
|
244
329
|
/** Output directory */
|
|
245
|
-
saveTo:
|
|
330
|
+
saveTo: import_zod7.z.string().optional(),
|
|
246
331
|
/** Whether to show score breakdown in console */
|
|
247
|
-
showBreakdown:
|
|
332
|
+
showBreakdown: import_zod7.z.boolean().optional(),
|
|
248
333
|
/** Baseline report to compare against */
|
|
249
|
-
compareBaseline:
|
|
334
|
+
compareBaseline: import_zod7.z.string().optional()
|
|
250
335
|
}).optional(),
|
|
251
336
|
/** Tool-specific configuration overrides (Strictly ToolName -> Config) */
|
|
252
|
-
tools:
|
|
337
|
+
tools: import_zod7.z.record(import_zod7.z.string(), import_zod7.z.any()).optional(),
|
|
253
338
|
/** Scoring profile and weights */
|
|
254
|
-
scoring:
|
|
339
|
+
scoring: import_zod7.z.object({
|
|
255
340
|
/** Name of the scoring profile (e.g. "strict", "balanced") */
|
|
256
|
-
profile:
|
|
341
|
+
profile: import_zod7.z.string().optional(),
|
|
257
342
|
/** Custom weights for tools and metrics */
|
|
258
|
-
weights:
|
|
343
|
+
weights: import_zod7.z.record(import_zod7.z.string(), import_zod7.z.number()).optional()
|
|
259
344
|
}).optional(),
|
|
260
345
|
/** Visualizer settings (interactive graph) */
|
|
261
|
-
visualizer:
|
|
262
|
-
groupingDirs:
|
|
263
|
-
graph:
|
|
264
|
-
maxNodes:
|
|
265
|
-
maxEdges:
|
|
346
|
+
visualizer: import_zod7.z.object({
|
|
347
|
+
groupingDirs: import_zod7.z.array(import_zod7.z.string()).optional(),
|
|
348
|
+
graph: import_zod7.z.object({
|
|
349
|
+
maxNodes: import_zod7.z.number().optional(),
|
|
350
|
+
maxEdges: import_zod7.z.number().optional()
|
|
266
351
|
}).optional()
|
|
267
352
|
}).optional()
|
|
268
|
-
}).catchall(
|
|
269
|
-
|
|
270
|
-
// src/types/business.ts
|
|
271
|
-
var import_zod2 = require("zod");
|
|
272
|
-
var LeadSource = /* @__PURE__ */ ((LeadSource2) => {
|
|
273
|
-
LeadSource2["ClawMoreHero"] = "clawmore-hero";
|
|
274
|
-
LeadSource2["ClawMoreWaitlist"] = "clawmore-waitlist";
|
|
275
|
-
LeadSource2["ClawMoreBeta"] = "clawmore-beta";
|
|
276
|
-
LeadSource2["AiReadyPlatform"] = "aiready-platform";
|
|
277
|
-
return LeadSource2;
|
|
278
|
-
})(LeadSource || {});
|
|
279
|
-
var LeadSourceSchema = import_zod2.z.nativeEnum(LeadSource);
|
|
280
|
-
var LeadSchema = import_zod2.z.object({
|
|
281
|
-
id: import_zod2.z.string(),
|
|
282
|
-
email: import_zod2.z.string().email(),
|
|
283
|
-
name: import_zod2.z.string().min(1),
|
|
284
|
-
interest: import_zod2.z.string().default("General"),
|
|
285
|
-
notes: import_zod2.z.string().optional(),
|
|
286
|
-
timestamp: import_zod2.z.string().datetime(),
|
|
287
|
-
source: LeadSourceSchema,
|
|
288
|
-
status: import_zod2.z.enum(["new", "contacted", "qualified", "converted", "archived"]).default("new")
|
|
289
|
-
});
|
|
290
|
-
var LeadSubmissionSchema = LeadSchema.omit({
|
|
291
|
-
id: true,
|
|
292
|
-
timestamp: true,
|
|
293
|
-
status: true
|
|
294
|
-
});
|
|
295
|
-
var ManagedAccountSchema = import_zod2.z.object({
|
|
296
|
-
id: import_zod2.z.string(),
|
|
297
|
-
// Internal UUID
|
|
298
|
-
accountId: import_zod2.z.string(),
|
|
299
|
-
// AWS Account ID
|
|
300
|
-
userId: import_zod2.z.string(),
|
|
301
|
-
// Owner (caopengau@gmail.com)
|
|
302
|
-
stripeSubscriptionId: import_zod2.z.string(),
|
|
303
|
-
// AI Token Management
|
|
304
|
-
tokenStrategy: import_zod2.z.enum(["managed", "byok"]).default("managed"),
|
|
305
|
-
byokConfig: import_zod2.z.object({
|
|
306
|
-
openaiKey: import_zod2.z.string().optional(),
|
|
307
|
-
anthropicKey: import_zod2.z.string().optional(),
|
|
308
|
-
openrouterKey: import_zod2.z.string().optional()
|
|
309
|
-
}).optional(),
|
|
310
|
-
// Financials (in cents)
|
|
311
|
-
baseFeeCents: import_zod2.z.number().default(2900),
|
|
312
|
-
includedComputeCents: import_zod2.z.number().default(1500),
|
|
313
|
-
// $15.00 AWS included
|
|
314
|
-
includedTokenCents: import_zod2.z.number().default(500),
|
|
315
|
-
// $5.00 Managed Tokens included
|
|
316
|
-
// Pre-paid Balance (credits)
|
|
317
|
-
prepaidTokenBalanceCents: import_zod2.z.number().default(0),
|
|
318
|
-
// Users buy these in $10 packs
|
|
319
|
-
currentMonthlyTokenSpendCents: import_zod2.z.number().default(0),
|
|
320
|
-
// Governance
|
|
321
|
-
status: import_zod2.z.enum(["provisioning", "active", "warning", "quarantined", "suspended"]).default("provisioning"),
|
|
322
|
-
lastCostSyncAt: import_zod2.z.string().datetime().optional(),
|
|
323
|
-
region: import_zod2.z.string().default("ap-southeast-2"),
|
|
324
|
-
// Alerting thresholds (percentage of includedComputeCents)
|
|
325
|
-
alertThresholds: import_zod2.z.array(import_zod2.z.number()).default([50, 80, 100, 150])
|
|
326
|
-
});
|
|
353
|
+
}).catchall(import_zod7.z.any());
|
|
327
354
|
|
|
328
355
|
// src/types.ts
|
|
329
356
|
var GLOBAL_INFRA_OPTIONS = [
|
|
@@ -382,6 +409,22 @@ var ParseError = class extends Error {
|
|
|
382
409
|
}
|
|
383
410
|
};
|
|
384
411
|
|
|
412
|
+
// src/utils/rating-helpers.ts
|
|
413
|
+
function getRatingSlug(score) {
|
|
414
|
+
if (score >= 90) return "excellent";
|
|
415
|
+
if (score >= 75) return "good";
|
|
416
|
+
if (score >= 60) return "fair";
|
|
417
|
+
if (score >= 40) return "needs-work";
|
|
418
|
+
return "critical";
|
|
419
|
+
}
|
|
420
|
+
function getRating(score) {
|
|
421
|
+
if (score >= 90) return "Excellent" /* Excellent */;
|
|
422
|
+
if (score >= 75) return "Good" /* Good */;
|
|
423
|
+
if (score >= 60) return "Fair" /* Fair */;
|
|
424
|
+
if (score >= 40) return "Needs Work" /* NeedsWork */;
|
|
425
|
+
return "Critical" /* Critical */;
|
|
426
|
+
}
|
|
427
|
+
|
|
385
428
|
// src/scoring.ts
|
|
386
429
|
var RecommendationPriority = /* @__PURE__ */ ((RecommendationPriority2) => {
|
|
387
430
|
RecommendationPriority2["High"] = "high";
|
|
@@ -389,14 +432,6 @@ var RecommendationPriority = /* @__PURE__ */ ((RecommendationPriority2) => {
|
|
|
389
432
|
RecommendationPriority2["Low"] = "low";
|
|
390
433
|
return RecommendationPriority2;
|
|
391
434
|
})(RecommendationPriority || {});
|
|
392
|
-
var ReadinessRating = /* @__PURE__ */ ((ReadinessRating2) => {
|
|
393
|
-
ReadinessRating2["Excellent"] = "Excellent";
|
|
394
|
-
ReadinessRating2["Good"] = "Good";
|
|
395
|
-
ReadinessRating2["Fair"] = "Fair";
|
|
396
|
-
ReadinessRating2["NeedsWork"] = "Needs Work";
|
|
397
|
-
ReadinessRating2["Critical"] = "Critical";
|
|
398
|
-
return ReadinessRating2;
|
|
399
|
-
})(ReadinessRating || {});
|
|
400
435
|
var DEFAULT_TOOL_WEIGHTS = {
|
|
401
436
|
["pattern-detect" /* PatternDetect */]: 22,
|
|
402
437
|
["context-analyzer" /* ContextAnalyzer */]: 19,
|
|
@@ -575,20 +610,6 @@ function calculateOverallScore(toolOutputs, config, cliWeights) {
|
|
|
575
610
|
}
|
|
576
611
|
};
|
|
577
612
|
}
|
|
578
|
-
function getRating(score) {
|
|
579
|
-
if (score >= 90) return "Excellent" /* Excellent */;
|
|
580
|
-
if (score >= 75) return "Good" /* Good */;
|
|
581
|
-
if (score >= 60) return "Fair" /* Fair */;
|
|
582
|
-
if (score >= 40) return "Needs Work" /* NeedsWork */;
|
|
583
|
-
return "Critical" /* Critical */;
|
|
584
|
-
}
|
|
585
|
-
function getRatingSlug(score) {
|
|
586
|
-
if (score >= 90) return "excellent";
|
|
587
|
-
if (score >= 75) return "good";
|
|
588
|
-
if (score >= 60) return "fair";
|
|
589
|
-
if (score >= 40) return "needs-work";
|
|
590
|
-
return "critical";
|
|
591
|
-
}
|
|
592
613
|
function getRatingWithContext(score, fileCount, modelTier = "standard") {
|
|
593
614
|
const threshold = getRecommendedThreshold(fileCount, modelTier);
|
|
594
615
|
const normalized = score - threshold + 70;
|
|
@@ -815,29 +836,41 @@ function generateHTML(graph) {
|
|
|
815
836
|
}
|
|
816
837
|
// Annotate the CommonJS export names for ESM import in node:
|
|
817
838
|
0 && (module.exports = {
|
|
839
|
+
AIReadyConfigSchema,
|
|
840
|
+
AnalysisResultSchema,
|
|
818
841
|
AnalysisStatus,
|
|
842
|
+
AnalysisStatusSchema,
|
|
819
843
|
COMMON_FINE_TUNING_OPTIONS,
|
|
820
844
|
CONTEXT_TIER_THRESHOLDS,
|
|
821
845
|
DEFAULT_TOOL_WEIGHTS,
|
|
822
846
|
FRIENDLY_TOOL_NAMES,
|
|
823
847
|
GLOBAL_INFRA_OPTIONS,
|
|
824
848
|
GLOBAL_SCAN_OPTIONS,
|
|
849
|
+
IssueSchema,
|
|
825
850
|
IssueType,
|
|
851
|
+
IssueTypeSchema,
|
|
826
852
|
LANGUAGE_EXTENSIONS,
|
|
827
853
|
Language,
|
|
828
854
|
LeadSchema,
|
|
829
855
|
LeadSource,
|
|
830
856
|
LeadSourceSchema,
|
|
831
857
|
LeadSubmissionSchema,
|
|
858
|
+
LocationSchema,
|
|
859
|
+
MetricsSchema,
|
|
860
|
+
ModelTier,
|
|
861
|
+
ModelTierSchema,
|
|
832
862
|
ParseError,
|
|
833
|
-
ReadinessRating,
|
|
834
863
|
RecommendationPriority,
|
|
835
864
|
SCORING_PROFILES,
|
|
836
865
|
SIZE_ADJUSTED_THRESHOLDS,
|
|
837
866
|
ScoringProfile,
|
|
838
867
|
Severity,
|
|
868
|
+
SeveritySchema,
|
|
869
|
+
SpokeOutputSchema,
|
|
870
|
+
SpokeSummarySchema,
|
|
839
871
|
TOOL_NAME_MAP,
|
|
840
872
|
ToolName,
|
|
873
|
+
ToolNameSchema,
|
|
841
874
|
UnifiedReportSchema,
|
|
842
875
|
calculateOverallScore,
|
|
843
876
|
formatScore,
|
package/dist/client.mjs
CHANGED
|
@@ -1,27 +1,39 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AIReadyConfigSchema,
|
|
3
|
+
AnalysisResultSchema,
|
|
2
4
|
AnalysisStatus,
|
|
5
|
+
AnalysisStatusSchema,
|
|
3
6
|
COMMON_FINE_TUNING_OPTIONS,
|
|
4
7
|
CONTEXT_TIER_THRESHOLDS,
|
|
5
8
|
DEFAULT_TOOL_WEIGHTS,
|
|
6
9
|
FRIENDLY_TOOL_NAMES,
|
|
7
10
|
GLOBAL_INFRA_OPTIONS,
|
|
8
11
|
GLOBAL_SCAN_OPTIONS,
|
|
12
|
+
IssueSchema,
|
|
9
13
|
IssueType,
|
|
14
|
+
IssueTypeSchema,
|
|
10
15
|
LANGUAGE_EXTENSIONS,
|
|
11
16
|
Language,
|
|
12
17
|
LeadSchema,
|
|
13
18
|
LeadSource,
|
|
14
19
|
LeadSourceSchema,
|
|
15
20
|
LeadSubmissionSchema,
|
|
21
|
+
LocationSchema,
|
|
22
|
+
MetricsSchema,
|
|
23
|
+
ModelTier,
|
|
24
|
+
ModelTierSchema,
|
|
16
25
|
ParseError,
|
|
17
|
-
ReadinessRating,
|
|
18
26
|
RecommendationPriority,
|
|
19
27
|
SCORING_PROFILES,
|
|
20
28
|
SIZE_ADJUSTED_THRESHOLDS,
|
|
21
29
|
ScoringProfile,
|
|
22
30
|
Severity,
|
|
31
|
+
SeveritySchema,
|
|
32
|
+
SpokeOutputSchema,
|
|
33
|
+
SpokeSummarySchema,
|
|
23
34
|
TOOL_NAME_MAP,
|
|
24
35
|
ToolName,
|
|
36
|
+
ToolNameSchema,
|
|
25
37
|
UnifiedReportSchema,
|
|
26
38
|
calculateOverallScore,
|
|
27
39
|
formatScore,
|
|
@@ -36,31 +48,43 @@ import {
|
|
|
36
48
|
getToolWeight,
|
|
37
49
|
normalizeToolName,
|
|
38
50
|
parseWeightString
|
|
39
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-SQHS6PFL.mjs";
|
|
40
52
|
export {
|
|
53
|
+
AIReadyConfigSchema,
|
|
54
|
+
AnalysisResultSchema,
|
|
41
55
|
AnalysisStatus,
|
|
56
|
+
AnalysisStatusSchema,
|
|
42
57
|
COMMON_FINE_TUNING_OPTIONS,
|
|
43
58
|
CONTEXT_TIER_THRESHOLDS,
|
|
44
59
|
DEFAULT_TOOL_WEIGHTS,
|
|
45
60
|
FRIENDLY_TOOL_NAMES,
|
|
46
61
|
GLOBAL_INFRA_OPTIONS,
|
|
47
62
|
GLOBAL_SCAN_OPTIONS,
|
|
63
|
+
IssueSchema,
|
|
48
64
|
IssueType,
|
|
65
|
+
IssueTypeSchema,
|
|
49
66
|
LANGUAGE_EXTENSIONS,
|
|
50
67
|
Language,
|
|
51
68
|
LeadSchema,
|
|
52
69
|
LeadSource,
|
|
53
70
|
LeadSourceSchema,
|
|
54
71
|
LeadSubmissionSchema,
|
|
72
|
+
LocationSchema,
|
|
73
|
+
MetricsSchema,
|
|
74
|
+
ModelTier,
|
|
75
|
+
ModelTierSchema,
|
|
55
76
|
ParseError,
|
|
56
|
-
ReadinessRating,
|
|
57
77
|
RecommendationPriority,
|
|
58
78
|
SCORING_PROFILES,
|
|
59
79
|
SIZE_ADJUSTED_THRESHOLDS,
|
|
60
80
|
ScoringProfile,
|
|
61
81
|
Severity,
|
|
82
|
+
SeveritySchema,
|
|
83
|
+
SpokeOutputSchema,
|
|
84
|
+
SpokeSummarySchema,
|
|
62
85
|
TOOL_NAME_MAP,
|
|
63
86
|
ToolName,
|
|
87
|
+
ToolNameSchema,
|
|
64
88
|
UnifiedReportSchema,
|
|
65
89
|
calculateOverallScore,
|
|
66
90
|
formatScore,
|