@aiready/core 0.23.19 → 0.23.21
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-2N7ISIKE.mjs +158 -0
- package/dist/chunk-ARUIZO7M.mjs +297 -0
- package/dist/chunk-CYC5EGEI.mjs +297 -0
- package/dist/{chunk-ZB3EHHAG.mjs → chunk-DBOPSRBC.mjs} +88 -26
- package/dist/chunk-EZ7ECLAZ.mjs +299 -0
- package/dist/chunk-FNPULWG7.mjs +248 -0
- package/dist/chunk-FZTFKZUQ.mjs +250 -0
- package/dist/chunk-GTS642BQ.mjs +262 -0
- package/dist/chunk-IXPY5J4K.mjs +248 -0
- package/dist/chunk-JJQLYW6Z.mjs +111 -0
- package/dist/chunk-L6BKANJC.mjs +130 -0
- package/dist/chunk-LXEO5PG3.mjs +292 -0
- package/dist/chunk-LZHO636W.mjs +501 -0
- package/dist/chunk-MTK2IIDZ.mjs +262 -0
- package/dist/chunk-QDCQETSI.mjs +262 -0
- package/dist/chunk-QZNY7B2N.mjs +248 -0
- package/dist/chunk-RCZSMGCX.mjs +250 -0
- package/dist/chunk-SWZOT67M.mjs +250 -0
- package/dist/chunk-U3IY2CFC.mjs +36 -0
- package/dist/chunk-UBCM5Y6R.mjs +275 -0
- package/dist/chunk-UTCRW3N7.mjs +301 -0
- package/dist/{chunk-RMH2TPAT.mjs → chunk-UYLH35LA.mjs} +88 -26
- package/dist/{chunk-TJXR2CHZ.mjs → chunk-WVNVC2PP.mjs} +266 -213
- package/dist/chunk-WYOW6O3P.mjs +114 -0
- package/dist/{chunk-CGOS2J6T.mjs → chunk-YRSSR4KN.mjs} +260 -217
- package/dist/client-2xbeKnrg.d.mts +1291 -0
- package/dist/client-2xbeKnrg.d.ts +1291 -0
- package/dist/client-4HLAGzFg.d.mts +1291 -0
- package/dist/client-4HLAGzFg.d.ts +1291 -0
- package/dist/client-B4TQwNa7.d.mts +1290 -0
- package/dist/client-B4TQwNa7.d.ts +1290 -0
- package/dist/client-Bdi4ty0v.d.mts +1294 -0
- package/dist/client-Bdi4ty0v.d.ts +1294 -0
- package/dist/client-BsKpUH3H.d.mts +1339 -0
- package/dist/client-BsKpUH3H.d.ts +1339 -0
- package/dist/client-Bv1zOaWF.d.mts +1291 -0
- package/dist/client-Bv1zOaWF.d.ts +1291 -0
- package/dist/client-Bz9YJMIX.d.mts +1290 -0
- package/dist/client-Bz9YJMIX.d.ts +1290 -0
- package/dist/client-CBpzm34X.d.mts +1291 -0
- package/dist/client-CBpzm34X.d.ts +1291 -0
- package/dist/client-CNu_tCZZ.d.mts +1305 -0
- package/dist/client-CNu_tCZZ.d.ts +1305 -0
- package/dist/client-CmEvxxQu.d.mts +1339 -0
- package/dist/client-CmEvxxQu.d.ts +1339 -0
- package/dist/client-DGMAxkZc.d.mts +1339 -0
- package/dist/client-DGMAxkZc.d.ts +1339 -0
- package/dist/client-DZq-CqcD.d.mts +1292 -0
- package/dist/client-DZq-CqcD.d.ts +1292 -0
- package/dist/{client-WVCAIWdJ.d.mts → client-DcqGfDTt.d.mts} +318 -226
- package/dist/{client-WVCAIWdJ.d.ts → client-DcqGfDTt.d.ts} +318 -226
- package/dist/{client-DLvFR2qA.d.mts → client-O8RvSRm0.d.mts} +89 -25
- package/dist/{client-DLvFR2qA.d.ts → client-O8RvSRm0.d.ts} +89 -25
- package/dist/client.d.mts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +53 -27
- package/dist/client.mjs +6 -6
- package/dist/csharp-parser-4ZKCSX5B.mjs +9 -0
- package/dist/csharp-parser-5HKICCRR.mjs +9 -0
- package/dist/csharp-parser-JCKXIAJW.mjs +9 -0
- package/dist/go-parser-J4KIH4RG.mjs +9 -0
- package/dist/go-parser-TKXL3DVH.mjs +9 -0
- package/dist/go-parser-XOM232XZ.mjs +9 -0
- package/dist/index.d.mts +332 -54
- package/dist/index.d.ts +332 -54
- package/dist/index.js +3930 -3064
- package/dist/index.mjs +933 -2036
- package/dist/java-parser-3KHXOXRQ.mjs +9 -0
- package/dist/java-parser-MASGS4WB.mjs +9 -0
- package/dist/java-parser-T5LXD63J.mjs +9 -0
- package/dist/python-parser-FNFK2473.mjs +8 -0
- package/dist/typescript-parser-2GGNRNB5.mjs +7 -0
- package/dist/typescript-parser-3ENJ6C7H.mjs +7 -0
- package/dist/typescript-parser-4GI7DPSW.mjs +7 -0
- package/dist/typescript-parser-4H3HUBO4.mjs +7 -0
- package/dist/typescript-parser-K63IVZMF.mjs +7 -0
- package/dist/typescript-parser-ZJKROMQG.mjs +7 -0
- package/package.json +1 -1
- package/dist/chunk-5SHLHMH7.mjs +0 -760
- package/dist/chunk-Q55AMEFV.mjs +0 -760
- package/dist/client-BEoUYNLp.d.mts +0 -1191
- package/dist/client-BEoUYNLp.d.ts +0 -1191
- package/dist/client-BrIMPk89.d.mts +0 -1214
- package/dist/client-BrIMPk89.d.ts +0 -1214
- package/dist/client-C5BuGX4F.d.mts +0 -1205
- package/dist/client-C5BuGX4F.d.ts +0 -1205
- package/dist/client-CKcjnPXt.d.mts +0 -1214
- package/dist/client-CKcjnPXt.d.ts +0 -1214
- package/dist/client-CLulBnie.d.mts +0 -1182
- package/dist/client-CLulBnie.d.ts +0 -1182
- package/dist/client-CQwvp8ep.d.mts +0 -1182
- package/dist/client-CQwvp8ep.d.ts +0 -1182
- package/dist/client-PFPdeo-z.d.mts +0 -1186
- package/dist/client-PFPdeo-z.d.ts +0 -1186
- package/dist/client-wk2fgk1q.d.mts +0 -1184
- package/dist/client-wk2fgk1q.d.ts +0 -1184
|
@@ -1,5 +1,63 @@
|
|
|
1
|
-
// src/types/
|
|
1
|
+
// src/types/business.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
var LeadSource = /* @__PURE__ */ ((LeadSource2) => {
|
|
4
|
+
LeadSource2["ClawMoreHero"] = "clawmore-hero";
|
|
5
|
+
LeadSource2["ClawMoreWaitlist"] = "clawmore-waitlist";
|
|
6
|
+
LeadSource2["ClawMoreBeta"] = "clawmore-beta";
|
|
7
|
+
LeadSource2["AiReadyPlatform"] = "aiready-platform";
|
|
8
|
+
return LeadSource2;
|
|
9
|
+
})(LeadSource || {});
|
|
10
|
+
var LeadSourceSchema = z.nativeEnum(LeadSource);
|
|
11
|
+
var LeadSchema = z.object({
|
|
12
|
+
id: z.string(),
|
|
13
|
+
email: z.string().email(),
|
|
14
|
+
name: z.string().min(1),
|
|
15
|
+
interest: z.string().default("General"),
|
|
16
|
+
notes: z.string().optional(),
|
|
17
|
+
timestamp: z.string().datetime(),
|
|
18
|
+
source: LeadSourceSchema,
|
|
19
|
+
status: z.enum(["new", "contacted", "qualified", "converted", "archived"]).default("new")
|
|
20
|
+
});
|
|
21
|
+
var LeadSubmissionSchema = LeadSchema.omit({
|
|
22
|
+
id: true,
|
|
23
|
+
timestamp: true,
|
|
24
|
+
status: true
|
|
25
|
+
});
|
|
26
|
+
var ManagedAccountSchema = z.object({
|
|
27
|
+
id: z.string(),
|
|
28
|
+
// Internal UUID
|
|
29
|
+
accountId: z.string(),
|
|
30
|
+
// AWS Account ID
|
|
31
|
+
userId: z.string(),
|
|
32
|
+
// Owner (caopengau@gmail.com)
|
|
33
|
+
stripeSubscriptionId: z.string(),
|
|
34
|
+
// AI Token Management
|
|
35
|
+
tokenStrategy: z.enum(["managed", "byok"]).default("managed"),
|
|
36
|
+
byokConfig: z.object({
|
|
37
|
+
openaiKey: z.string().optional(),
|
|
38
|
+
anthropicKey: z.string().optional(),
|
|
39
|
+
openrouterKey: z.string().optional()
|
|
40
|
+
}).optional(),
|
|
41
|
+
// Financials (in cents)
|
|
42
|
+
baseFeeCents: z.number().default(2900),
|
|
43
|
+
includedComputeCents: z.number().default(1500),
|
|
44
|
+
// $15.00 AWS included
|
|
45
|
+
includedTokenCents: z.number().default(500),
|
|
46
|
+
// $5.00 Managed Tokens included
|
|
47
|
+
// Pre-paid Balance (credits)
|
|
48
|
+
prepaidTokenBalanceCents: z.number().default(0),
|
|
49
|
+
// Users buy these in $10 packs
|
|
50
|
+
currentMonthlyTokenSpendCents: z.number().default(0),
|
|
51
|
+
// Governance
|
|
52
|
+
status: z.enum(["provisioning", "active", "warning", "quarantined", "suspended"]).default("provisioning"),
|
|
53
|
+
lastCostSyncAt: z.string().datetime().optional(),
|
|
54
|
+
region: z.string().default("ap-southeast-2"),
|
|
55
|
+
// Alerting thresholds (percentage of includedComputeCents)
|
|
56
|
+
alertThresholds: z.array(z.number()).default([50, 80, 100, 150])
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// src/types/enums.ts
|
|
60
|
+
import { z as z2 } from "zod";
|
|
3
61
|
var Severity = /* @__PURE__ */ ((Severity2) => {
|
|
4
62
|
Severity2["Critical"] = "critical";
|
|
5
63
|
Severity2["Major"] = "major";
|
|
@@ -7,7 +65,7 @@ var Severity = /* @__PURE__ */ ((Severity2) => {
|
|
|
7
65
|
Severity2["Info"] = "info";
|
|
8
66
|
return Severity2;
|
|
9
67
|
})(Severity || {});
|
|
10
|
-
var SeveritySchema =
|
|
68
|
+
var SeveritySchema = z2.nativeEnum(Severity);
|
|
11
69
|
var ToolName = /* @__PURE__ */ ((ToolName2) => {
|
|
12
70
|
ToolName2["PatternDetect"] = "pattern-detect";
|
|
13
71
|
ToolName2["ContextAnalyzer"] = "context-analyzer";
|
|
@@ -24,7 +82,7 @@ var ToolName = /* @__PURE__ */ ((ToolName2) => {
|
|
|
24
82
|
ToolName2["SemanticDistance"] = "semantic-distance";
|
|
25
83
|
return ToolName2;
|
|
26
84
|
})(ToolName || {});
|
|
27
|
-
var ToolNameSchema =
|
|
85
|
+
var ToolNameSchema = z2.nativeEnum(ToolName);
|
|
28
86
|
var FRIENDLY_TOOL_NAMES = {
|
|
29
87
|
["pattern-detect" /* PatternDetect */]: "Semantic Duplicates",
|
|
30
88
|
["context-analyzer" /* ContextAnalyzer */]: "Context Fragmentation",
|
|
@@ -61,14 +119,14 @@ var IssueType = /* @__PURE__ */ ((IssueType2) => {
|
|
|
61
119
|
IssueType2["ChangeAmplification"] = "change-amplification";
|
|
62
120
|
return IssueType2;
|
|
63
121
|
})(IssueType || {});
|
|
64
|
-
var IssueTypeSchema =
|
|
122
|
+
var IssueTypeSchema = z2.nativeEnum(IssueType);
|
|
65
123
|
var AnalysisStatus = /* @__PURE__ */ ((AnalysisStatus2) => {
|
|
66
124
|
AnalysisStatus2["Processing"] = "processing";
|
|
67
125
|
AnalysisStatus2["Completed"] = "completed";
|
|
68
126
|
AnalysisStatus2["Failed"] = "failed";
|
|
69
127
|
return AnalysisStatus2;
|
|
70
128
|
})(AnalysisStatus || {});
|
|
71
|
-
var AnalysisStatusSchema =
|
|
129
|
+
var AnalysisStatusSchema = z2.nativeEnum(AnalysisStatus);
|
|
72
130
|
var ModelTier = /* @__PURE__ */ ((ModelTier2) => {
|
|
73
131
|
ModelTier2["Compact"] = "compact";
|
|
74
132
|
ModelTier2["Standard"] = "standard";
|
|
@@ -76,184 +134,149 @@ var ModelTier = /* @__PURE__ */ ((ModelTier2) => {
|
|
|
76
134
|
ModelTier2["Frontier"] = "frontier";
|
|
77
135
|
return ModelTier2;
|
|
78
136
|
})(ModelTier || {});
|
|
79
|
-
var ModelTierSchema =
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
137
|
+
var ModelTierSchema = z2.nativeEnum(ModelTier);
|
|
138
|
+
|
|
139
|
+
// src/types/common.ts
|
|
140
|
+
import { z as z3 } from "zod";
|
|
141
|
+
var LocationSchema = z3.object({
|
|
142
|
+
file: z3.string(),
|
|
143
|
+
line: z3.number(),
|
|
144
|
+
column: z3.number().optional(),
|
|
145
|
+
endLine: z3.number().optional(),
|
|
146
|
+
endColumn: z3.number().optional()
|
|
86
147
|
});
|
|
87
|
-
|
|
148
|
+
|
|
149
|
+
// src/types/schemas/issue.ts
|
|
150
|
+
import { z as z4 } from "zod";
|
|
151
|
+
var IssueSchema = z4.object({
|
|
88
152
|
type: IssueTypeSchema,
|
|
89
153
|
severity: SeveritySchema,
|
|
90
|
-
message:
|
|
154
|
+
message: z4.string(),
|
|
91
155
|
location: LocationSchema,
|
|
92
|
-
suggestion:
|
|
156
|
+
suggestion: z4.string().optional()
|
|
93
157
|
});
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
158
|
+
|
|
159
|
+
// src/types/schemas/metrics.ts
|
|
160
|
+
import { z as z5 } from "zod";
|
|
161
|
+
var MetricsSchema = z5.object({
|
|
162
|
+
tokenCost: z5.number().optional(),
|
|
163
|
+
complexityScore: z5.number().optional(),
|
|
164
|
+
consistencyScore: z5.number().optional(),
|
|
165
|
+
docFreshnessScore: z5.number().optional(),
|
|
99
166
|
// AI agent readiness metrics (v0.12+)
|
|
100
|
-
aiSignalClarityScore:
|
|
101
|
-
agentGroundingScore:
|
|
102
|
-
testabilityScore:
|
|
103
|
-
docDriftScore:
|
|
104
|
-
dependencyHealthScore:
|
|
167
|
+
aiSignalClarityScore: z5.number().optional(),
|
|
168
|
+
agentGroundingScore: z5.number().optional(),
|
|
169
|
+
testabilityScore: z5.number().optional(),
|
|
170
|
+
docDriftScore: z5.number().optional(),
|
|
171
|
+
dependencyHealthScore: z5.number().optional(),
|
|
105
172
|
modelContextTier: ModelTierSchema.optional(),
|
|
106
173
|
// Business value metrics
|
|
107
|
-
estimatedMonthlyCost:
|
|
108
|
-
estimatedDeveloperHours:
|
|
109
|
-
comprehensionDifficultyIndex:
|
|
174
|
+
estimatedMonthlyCost: z5.number().optional(),
|
|
175
|
+
estimatedDeveloperHours: z5.number().optional(),
|
|
176
|
+
comprehensionDifficultyIndex: z5.number().optional(),
|
|
110
177
|
// Extended metrics for specific spokes
|
|
111
|
-
totalSymbols:
|
|
112
|
-
totalExports:
|
|
178
|
+
totalSymbols: z5.number().optional(),
|
|
179
|
+
totalExports: z5.number().optional()
|
|
113
180
|
});
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
181
|
+
|
|
182
|
+
// src/types/schemas/report.ts
|
|
183
|
+
import { z as z6 } from "zod";
|
|
184
|
+
var AnalysisResultSchema = z6.object({
|
|
185
|
+
fileName: z6.string(),
|
|
186
|
+
issues: z6.array(IssueSchema),
|
|
117
187
|
metrics: MetricsSchema
|
|
118
188
|
});
|
|
119
|
-
var SpokeSummarySchema =
|
|
120
|
-
totalFiles:
|
|
121
|
-
totalIssues:
|
|
122
|
-
criticalIssues:
|
|
123
|
-
majorIssues:
|
|
124
|
-
score:
|
|
125
|
-
}).catchall(
|
|
126
|
-
var SpokeOutputSchema =
|
|
127
|
-
results:
|
|
189
|
+
var SpokeSummarySchema = z6.object({
|
|
190
|
+
totalFiles: z6.number().optional(),
|
|
191
|
+
totalIssues: z6.number().optional(),
|
|
192
|
+
criticalIssues: z6.number().optional(),
|
|
193
|
+
majorIssues: z6.number().optional(),
|
|
194
|
+
score: z6.number().optional()
|
|
195
|
+
}).catchall(z6.any());
|
|
196
|
+
var SpokeOutputSchema = z6.object({
|
|
197
|
+
results: z6.array(AnalysisResultSchema),
|
|
128
198
|
summary: SpokeSummarySchema,
|
|
129
|
-
metadata:
|
|
130
|
-
toolName:
|
|
131
|
-
version:
|
|
132
|
-
timestamp:
|
|
133
|
-
config:
|
|
134
|
-
}).catchall(
|
|
199
|
+
metadata: z6.object({
|
|
200
|
+
toolName: z6.string(),
|
|
201
|
+
version: z6.string().optional(),
|
|
202
|
+
timestamp: z6.string().optional(),
|
|
203
|
+
config: z6.any().optional()
|
|
204
|
+
}).catchall(z6.any()).optional()
|
|
135
205
|
});
|
|
136
|
-
var UnifiedReportSchema =
|
|
137
|
-
summary:
|
|
138
|
-
totalFiles:
|
|
139
|
-
totalIssues:
|
|
140
|
-
criticalIssues:
|
|
141
|
-
majorIssues:
|
|
142
|
-
businessImpact:
|
|
143
|
-
estimatedMonthlyWaste:
|
|
144
|
-
potentialSavings:
|
|
145
|
-
productivityHours:
|
|
206
|
+
var UnifiedReportSchema = z6.object({
|
|
207
|
+
summary: z6.object({
|
|
208
|
+
totalFiles: z6.number(),
|
|
209
|
+
totalIssues: z6.number(),
|
|
210
|
+
criticalIssues: z6.number(),
|
|
211
|
+
majorIssues: z6.number(),
|
|
212
|
+
businessImpact: z6.object({
|
|
213
|
+
estimatedMonthlyWaste: z6.number().optional(),
|
|
214
|
+
potentialSavings: z6.number().optional(),
|
|
215
|
+
productivityHours: z6.number().optional()
|
|
146
216
|
}).optional()
|
|
147
217
|
}),
|
|
148
|
-
results:
|
|
149
|
-
scoring:
|
|
150
|
-
overall:
|
|
151
|
-
rating:
|
|
152
|
-
timestamp:
|
|
153
|
-
breakdown:
|
|
154
|
-
|
|
155
|
-
toolName:
|
|
156
|
-
score:
|
|
157
|
-
}).catchall(
|
|
218
|
+
results: z6.array(AnalysisResultSchema),
|
|
219
|
+
scoring: z6.object({
|
|
220
|
+
overall: z6.number(),
|
|
221
|
+
rating: z6.string(),
|
|
222
|
+
timestamp: z6.string(),
|
|
223
|
+
breakdown: z6.array(
|
|
224
|
+
z6.object({
|
|
225
|
+
toolName: z6.union([ToolNameSchema, z6.string()]),
|
|
226
|
+
score: z6.number()
|
|
227
|
+
}).catchall(z6.any())
|
|
158
228
|
)
|
|
159
229
|
}).optional()
|
|
160
|
-
}).catchall(
|
|
161
|
-
|
|
230
|
+
}).catchall(z6.any());
|
|
231
|
+
|
|
232
|
+
// src/types/schemas/config.ts
|
|
233
|
+
import { z as z7 } from "zod";
|
|
234
|
+
var AIReadyConfigSchema = z7.object({
|
|
162
235
|
/** Target score threshold (0-100) */
|
|
163
|
-
threshold:
|
|
236
|
+
threshold: z7.number().optional(),
|
|
164
237
|
/** Files or directories to include in scan */
|
|
165
|
-
include:
|
|
238
|
+
include: z7.array(z7.string()).optional(),
|
|
166
239
|
/** Files or directories to exclude from scan */
|
|
167
|
-
exclude:
|
|
240
|
+
exclude: z7.array(z7.string()).optional(),
|
|
168
241
|
/** Scan-specific configuration */
|
|
169
|
-
scan:
|
|
170
|
-
include:
|
|
171
|
-
exclude:
|
|
172
|
-
parallel:
|
|
173
|
-
deep:
|
|
174
|
-
tools:
|
|
242
|
+
scan: z7.object({
|
|
243
|
+
include: z7.array(z7.string()).optional(),
|
|
244
|
+
exclude: z7.array(z7.string()).optional(),
|
|
245
|
+
parallel: z7.boolean().optional(),
|
|
246
|
+
deep: z7.boolean().optional(),
|
|
247
|
+
tools: z7.array(z7.string()).optional()
|
|
175
248
|
}).optional(),
|
|
176
249
|
/** Output-specific configuration */
|
|
177
|
-
output:
|
|
250
|
+
output: z7.object({
|
|
178
251
|
/** Output format (json, console, html) */
|
|
179
|
-
format:
|
|
252
|
+
format: z7.enum(["json", "console", "html"]).optional(),
|
|
180
253
|
/** Output file path */
|
|
181
|
-
path:
|
|
254
|
+
path: z7.string().optional(),
|
|
182
255
|
/** Output directory */
|
|
183
|
-
saveTo:
|
|
256
|
+
saveTo: z7.string().optional(),
|
|
184
257
|
/** Whether to show score breakdown in console */
|
|
185
|
-
showBreakdown:
|
|
258
|
+
showBreakdown: z7.boolean().optional(),
|
|
186
259
|
/** Baseline report to compare against */
|
|
187
|
-
compareBaseline:
|
|
260
|
+
compareBaseline: z7.string().optional()
|
|
188
261
|
}).optional(),
|
|
189
262
|
/** Tool-specific configuration overrides (Strictly ToolName -> Config) */
|
|
190
|
-
tools:
|
|
263
|
+
tools: z7.record(z7.string(), z7.any()).optional(),
|
|
191
264
|
/** Scoring profile and weights */
|
|
192
|
-
scoring:
|
|
265
|
+
scoring: z7.object({
|
|
193
266
|
/** Name of the scoring profile (e.g. "strict", "balanced") */
|
|
194
|
-
profile:
|
|
267
|
+
profile: z7.string().optional(),
|
|
195
268
|
/** Custom weights for tools and metrics */
|
|
196
|
-
weights:
|
|
197
|
-
}).optional()
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
// src/types/business.ts
|
|
201
|
-
import { z as z2 } from "zod";
|
|
202
|
-
var LeadSource = /* @__PURE__ */ ((LeadSource2) => {
|
|
203
|
-
LeadSource2["ClawMoreHero"] = "clawmore-hero";
|
|
204
|
-
LeadSource2["ClawMoreWaitlist"] = "clawmore-waitlist";
|
|
205
|
-
LeadSource2["ClawMoreBeta"] = "clawmore-beta";
|
|
206
|
-
LeadSource2["AiReadyPlatform"] = "aiready-platform";
|
|
207
|
-
return LeadSource2;
|
|
208
|
-
})(LeadSource || {});
|
|
209
|
-
var LeadSourceSchema = z2.nativeEnum(LeadSource);
|
|
210
|
-
var LeadSchema = z2.object({
|
|
211
|
-
id: z2.string(),
|
|
212
|
-
email: z2.string().email(),
|
|
213
|
-
name: z2.string().min(1),
|
|
214
|
-
interest: z2.string().default("General"),
|
|
215
|
-
notes: z2.string().optional(),
|
|
216
|
-
timestamp: z2.string().datetime(),
|
|
217
|
-
source: LeadSourceSchema,
|
|
218
|
-
status: z2.enum(["new", "contacted", "qualified", "converted", "archived"]).default("new")
|
|
219
|
-
});
|
|
220
|
-
var LeadSubmissionSchema = LeadSchema.omit({
|
|
221
|
-
id: true,
|
|
222
|
-
timestamp: true,
|
|
223
|
-
status: true
|
|
224
|
-
});
|
|
225
|
-
var ManagedAccountSchema = z2.object({
|
|
226
|
-
id: z2.string(),
|
|
227
|
-
// Internal UUID
|
|
228
|
-
accountId: z2.string(),
|
|
229
|
-
// AWS Account ID
|
|
230
|
-
userId: z2.string(),
|
|
231
|
-
// Owner (caopengau@gmail.com)
|
|
232
|
-
stripeSubscriptionId: z2.string(),
|
|
233
|
-
// AI Token Management
|
|
234
|
-
tokenStrategy: z2.enum(["managed", "byok"]).default("managed"),
|
|
235
|
-
byokConfig: z2.object({
|
|
236
|
-
openaiKey: z2.string().optional(),
|
|
237
|
-
anthropicKey: z2.string().optional(),
|
|
238
|
-
openrouterKey: z2.string().optional()
|
|
269
|
+
weights: z7.record(z7.string(), z7.number()).optional()
|
|
239
270
|
}).optional(),
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
currentMonthlyTokenSpendCents: z2.number().default(0),
|
|
250
|
-
// Governance
|
|
251
|
-
status: z2.enum(["provisioning", "active", "warning", "quarantined", "suspended"]).default("provisioning"),
|
|
252
|
-
lastCostSyncAt: z2.string().datetime().optional(),
|
|
253
|
-
region: z2.string().default("ap-southeast-2"),
|
|
254
|
-
// Alerting thresholds (percentage of includedComputeCents)
|
|
255
|
-
alertThresholds: z2.array(z2.number()).default([50, 80, 100, 150])
|
|
256
|
-
});
|
|
271
|
+
/** Visualizer settings (interactive graph) */
|
|
272
|
+
visualizer: z7.object({
|
|
273
|
+
groupingDirs: z7.array(z7.string()).optional(),
|
|
274
|
+
graph: z7.object({
|
|
275
|
+
maxNodes: z7.number().optional(),
|
|
276
|
+
maxEdges: z7.number().optional()
|
|
277
|
+
}).optional()
|
|
278
|
+
}).optional()
|
|
279
|
+
}).catchall(z7.any());
|
|
257
280
|
|
|
258
281
|
// src/types.ts
|
|
259
282
|
var GLOBAL_INFRA_OPTIONS = [
|
|
@@ -281,44 +304,7 @@ var COMMON_FINE_TUNING_OPTIONS = [
|
|
|
281
304
|
"showBreakdown"
|
|
282
305
|
];
|
|
283
306
|
|
|
284
|
-
// src/
|
|
285
|
-
var Language = /* @__PURE__ */ ((Language2) => {
|
|
286
|
-
Language2["TypeScript"] = "typescript";
|
|
287
|
-
Language2["JavaScript"] = "javascript";
|
|
288
|
-
Language2["Python"] = "python";
|
|
289
|
-
Language2["Java"] = "java";
|
|
290
|
-
Language2["Go"] = "go";
|
|
291
|
-
Language2["Rust"] = "rust";
|
|
292
|
-
Language2["CSharp"] = "csharp";
|
|
293
|
-
return Language2;
|
|
294
|
-
})(Language || {});
|
|
295
|
-
var LANGUAGE_EXTENSIONS = {
|
|
296
|
-
".ts": "typescript" /* TypeScript */,
|
|
297
|
-
".tsx": "typescript" /* TypeScript */,
|
|
298
|
-
".js": "javascript" /* JavaScript */,
|
|
299
|
-
".jsx": "javascript" /* JavaScript */,
|
|
300
|
-
".py": "python" /* Python */,
|
|
301
|
-
".java": "java" /* Java */,
|
|
302
|
-
".go": "go" /* Go */,
|
|
303
|
-
".rs": "rust" /* Rust */,
|
|
304
|
-
".cs": "csharp" /* CSharp */
|
|
305
|
-
};
|
|
306
|
-
var ParseError = class extends Error {
|
|
307
|
-
constructor(message, filePath, loc) {
|
|
308
|
-
super(message);
|
|
309
|
-
this.filePath = filePath;
|
|
310
|
-
this.loc = loc;
|
|
311
|
-
this.name = "ParseError";
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
// src/scoring.ts
|
|
316
|
-
var RecommendationPriority = /* @__PURE__ */ ((RecommendationPriority2) => {
|
|
317
|
-
RecommendationPriority2["High"] = "high";
|
|
318
|
-
RecommendationPriority2["Medium"] = "medium";
|
|
319
|
-
RecommendationPriority2["Low"] = "low";
|
|
320
|
-
return RecommendationPriority2;
|
|
321
|
-
})(RecommendationPriority || {});
|
|
307
|
+
// src/utils/rating-helpers.ts
|
|
322
308
|
var ReadinessRating = /* @__PURE__ */ ((ReadinessRating2) => {
|
|
323
309
|
ReadinessRating2["Excellent"] = "Excellent";
|
|
324
310
|
ReadinessRating2["Good"] = "Good";
|
|
@@ -327,6 +313,85 @@ var ReadinessRating = /* @__PURE__ */ ((ReadinessRating2) => {
|
|
|
327
313
|
ReadinessRating2["Critical"] = "Critical";
|
|
328
314
|
return ReadinessRating2;
|
|
329
315
|
})(ReadinessRating || {});
|
|
316
|
+
function getRatingMetadata(score) {
|
|
317
|
+
if (score >= 90) {
|
|
318
|
+
return {
|
|
319
|
+
label: "Excellent",
|
|
320
|
+
slug: "excellent",
|
|
321
|
+
emoji: "\u2705",
|
|
322
|
+
rating: "Excellent" /* Excellent */
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
if (score >= 75) {
|
|
326
|
+
return {
|
|
327
|
+
label: "Good",
|
|
328
|
+
slug: "good",
|
|
329
|
+
emoji: "\u{1F44D}",
|
|
330
|
+
rating: "Good" /* Good */
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
if (score >= 60) {
|
|
334
|
+
return {
|
|
335
|
+
label: "Fair",
|
|
336
|
+
slug: "fair",
|
|
337
|
+
emoji: "\u{1F44C}",
|
|
338
|
+
rating: "Fair" /* Fair */
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
if (score >= 40) {
|
|
342
|
+
return {
|
|
343
|
+
label: "Needs Work",
|
|
344
|
+
slug: "needs-work",
|
|
345
|
+
emoji: "\u{1F528}",
|
|
346
|
+
rating: "Needs Work" /* NeedsWork */
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
return {
|
|
350
|
+
label: "Critical",
|
|
351
|
+
slug: "critical",
|
|
352
|
+
emoji: "\u{1F6A8}",
|
|
353
|
+
rating: "Critical" /* Critical */
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
function getRatingLabel(score) {
|
|
357
|
+
return getRatingMetadata(score).label;
|
|
358
|
+
}
|
|
359
|
+
function getRatingSlug(score) {
|
|
360
|
+
return getRatingMetadata(score).slug;
|
|
361
|
+
}
|
|
362
|
+
function getRatingEmoji(score) {
|
|
363
|
+
return getRatingMetadata(score).emoji;
|
|
364
|
+
}
|
|
365
|
+
function getToolEmoji(score) {
|
|
366
|
+
return getRatingEmoji(score);
|
|
367
|
+
}
|
|
368
|
+
function getPriorityIcon(priority) {
|
|
369
|
+
switch (priority) {
|
|
370
|
+
case "critical":
|
|
371
|
+
return "\u{1F534}";
|
|
372
|
+
case "high":
|
|
373
|
+
return "\u{1F7E0}";
|
|
374
|
+
case "medium":
|
|
375
|
+
return "\u{1F7E1}";
|
|
376
|
+
case "low":
|
|
377
|
+
return "\u{1F535}";
|
|
378
|
+
default:
|
|
379
|
+
return "\u26AA";
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
function getRating(score) {
|
|
383
|
+
return getRatingMetadata(score).rating;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// src/scoring-types.ts
|
|
387
|
+
var RecommendationPriority = /* @__PURE__ */ ((RecommendationPriority2) => {
|
|
388
|
+
RecommendationPriority2["High"] = "high";
|
|
389
|
+
RecommendationPriority2["Medium"] = "medium";
|
|
390
|
+
RecommendationPriority2["Low"] = "low";
|
|
391
|
+
return RecommendationPriority2;
|
|
392
|
+
})(RecommendationPriority || {});
|
|
393
|
+
|
|
394
|
+
// src/scoring.ts
|
|
330
395
|
var DEFAULT_TOOL_WEIGHTS = {
|
|
331
396
|
["pattern-detect" /* PatternDetect */]: 22,
|
|
332
397
|
["context-analyzer" /* ContextAnalyzer */]: 19,
|
|
@@ -487,8 +552,8 @@ function calculateOverallScore(toolOutputs, config, cliWeights) {
|
|
|
487
552
|
const rating = getRating(overall);
|
|
488
553
|
const formulaParts = Array.from(toolOutputs.entries()).map(
|
|
489
554
|
([name, output]) => {
|
|
490
|
-
const
|
|
491
|
-
return `(${output.score} \xD7 ${
|
|
555
|
+
const weight = weights.get(name) ?? 5;
|
|
556
|
+
return `(${output.score} \xD7 ${weight})`;
|
|
492
557
|
}
|
|
493
558
|
);
|
|
494
559
|
const formulaStr = `[${formulaParts.join(" + ")}] / ${totalWeight} = ${overall}`;
|
|
@@ -505,20 +570,6 @@ function calculateOverallScore(toolOutputs, config, cliWeights) {
|
|
|
505
570
|
}
|
|
506
571
|
};
|
|
507
572
|
}
|
|
508
|
-
function getRating(score) {
|
|
509
|
-
if (score >= 90) return "Excellent" /* Excellent */;
|
|
510
|
-
if (score >= 75) return "Good" /* Good */;
|
|
511
|
-
if (score >= 60) return "Fair" /* Fair */;
|
|
512
|
-
if (score >= 40) return "Needs Work" /* NeedsWork */;
|
|
513
|
-
return "Critical" /* Critical */;
|
|
514
|
-
}
|
|
515
|
-
function getRatingSlug(score) {
|
|
516
|
-
if (score >= 90) return "excellent";
|
|
517
|
-
if (score >= 75) return "good";
|
|
518
|
-
if (score >= 60) return "fair";
|
|
519
|
-
if (score >= 40) return "needs-work";
|
|
520
|
-
return "critical";
|
|
521
|
-
}
|
|
522
573
|
function getRatingWithContext(score, fileCount, modelTier = "standard") {
|
|
523
574
|
const threshold = getRecommendedThreshold(fileCount, modelTier);
|
|
524
575
|
const normalized = score - threshold + 70;
|
|
@@ -745,6 +796,11 @@ function generateHTML(graph) {
|
|
|
745
796
|
}
|
|
746
797
|
|
|
747
798
|
export {
|
|
799
|
+
LeadSource,
|
|
800
|
+
LeadSourceSchema,
|
|
801
|
+
LeadSchema,
|
|
802
|
+
LeadSubmissionSchema,
|
|
803
|
+
ManagedAccountSchema,
|
|
748
804
|
Severity,
|
|
749
805
|
SeveritySchema,
|
|
750
806
|
ToolName,
|
|
@@ -764,19 +820,18 @@ export {
|
|
|
764
820
|
SpokeOutputSchema,
|
|
765
821
|
UnifiedReportSchema,
|
|
766
822
|
AIReadyConfigSchema,
|
|
767
|
-
LeadSource,
|
|
768
|
-
LeadSourceSchema,
|
|
769
|
-
LeadSchema,
|
|
770
|
-
LeadSubmissionSchema,
|
|
771
|
-
ManagedAccountSchema,
|
|
772
823
|
GLOBAL_INFRA_OPTIONS,
|
|
773
824
|
GLOBAL_SCAN_OPTIONS,
|
|
774
825
|
COMMON_FINE_TUNING_OPTIONS,
|
|
775
|
-
Language,
|
|
776
|
-
LANGUAGE_EXTENSIONS,
|
|
777
|
-
ParseError,
|
|
778
|
-
RecommendationPriority,
|
|
779
826
|
ReadinessRating,
|
|
827
|
+
getRatingMetadata,
|
|
828
|
+
getRatingLabel,
|
|
829
|
+
getRatingSlug,
|
|
830
|
+
getRatingEmoji,
|
|
831
|
+
getToolEmoji,
|
|
832
|
+
getPriorityIcon,
|
|
833
|
+
getRating,
|
|
834
|
+
RecommendationPriority,
|
|
780
835
|
DEFAULT_TOOL_WEIGHTS,
|
|
781
836
|
TOOL_NAME_MAP,
|
|
782
837
|
ScoringProfile,
|
|
@@ -789,8 +844,6 @@ export {
|
|
|
789
844
|
getToolWeight,
|
|
790
845
|
parseWeightString,
|
|
791
846
|
calculateOverallScore,
|
|
792
|
-
getRating,
|
|
793
|
-
getRatingSlug,
|
|
794
847
|
getRatingWithContext,
|
|
795
848
|
getRatingDisplay,
|
|
796
849
|
formatScore,
|