@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,192 +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:
|
|
269
|
+
weights: z7.record(z7.string(), z7.number()).optional()
|
|
197
270
|
}).optional(),
|
|
198
271
|
/** Visualizer settings (interactive graph) */
|
|
199
|
-
visualizer:
|
|
200
|
-
groupingDirs:
|
|
201
|
-
graph:
|
|
202
|
-
maxNodes:
|
|
203
|
-
maxEdges:
|
|
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()
|
|
204
277
|
}).optional()
|
|
205
278
|
}).optional()
|
|
206
|
-
}).catchall(
|
|
207
|
-
|
|
208
|
-
// src/types/business.ts
|
|
209
|
-
import { z as z2 } from "zod";
|
|
210
|
-
var LeadSource = /* @__PURE__ */ ((LeadSource2) => {
|
|
211
|
-
LeadSource2["ClawMoreHero"] = "clawmore-hero";
|
|
212
|
-
LeadSource2["ClawMoreWaitlist"] = "clawmore-waitlist";
|
|
213
|
-
LeadSource2["ClawMoreBeta"] = "clawmore-beta";
|
|
214
|
-
LeadSource2["AiReadyPlatform"] = "aiready-platform";
|
|
215
|
-
return LeadSource2;
|
|
216
|
-
})(LeadSource || {});
|
|
217
|
-
var LeadSourceSchema = z2.nativeEnum(LeadSource);
|
|
218
|
-
var LeadSchema = z2.object({
|
|
219
|
-
id: z2.string(),
|
|
220
|
-
email: z2.string().email(),
|
|
221
|
-
name: z2.string().min(1),
|
|
222
|
-
interest: z2.string().default("General"),
|
|
223
|
-
notes: z2.string().optional(),
|
|
224
|
-
timestamp: z2.string().datetime(),
|
|
225
|
-
source: LeadSourceSchema,
|
|
226
|
-
status: z2.enum(["new", "contacted", "qualified", "converted", "archived"]).default("new")
|
|
227
|
-
});
|
|
228
|
-
var LeadSubmissionSchema = LeadSchema.omit({
|
|
229
|
-
id: true,
|
|
230
|
-
timestamp: true,
|
|
231
|
-
status: true
|
|
232
|
-
});
|
|
233
|
-
var ManagedAccountSchema = z2.object({
|
|
234
|
-
id: z2.string(),
|
|
235
|
-
// Internal UUID
|
|
236
|
-
accountId: z2.string(),
|
|
237
|
-
// AWS Account ID
|
|
238
|
-
userId: z2.string(),
|
|
239
|
-
// Owner (caopengau@gmail.com)
|
|
240
|
-
stripeSubscriptionId: z2.string(),
|
|
241
|
-
// AI Token Management
|
|
242
|
-
tokenStrategy: z2.enum(["managed", "byok"]).default("managed"),
|
|
243
|
-
byokConfig: z2.object({
|
|
244
|
-
openaiKey: z2.string().optional(),
|
|
245
|
-
anthropicKey: z2.string().optional(),
|
|
246
|
-
openrouterKey: z2.string().optional()
|
|
247
|
-
}).optional(),
|
|
248
|
-
// Financials (in cents)
|
|
249
|
-
baseFeeCents: z2.number().default(2900),
|
|
250
|
-
includedComputeCents: z2.number().default(1500),
|
|
251
|
-
// $15.00 AWS included
|
|
252
|
-
includedTokenCents: z2.number().default(500),
|
|
253
|
-
// $5.00 Managed Tokens included
|
|
254
|
-
// Pre-paid Balance (credits)
|
|
255
|
-
prepaidTokenBalanceCents: z2.number().default(0),
|
|
256
|
-
// Users buy these in $10 packs
|
|
257
|
-
currentMonthlyTokenSpendCents: z2.number().default(0),
|
|
258
|
-
// Governance
|
|
259
|
-
status: z2.enum(["provisioning", "active", "warning", "quarantined", "suspended"]).default("provisioning"),
|
|
260
|
-
lastCostSyncAt: z2.string().datetime().optional(),
|
|
261
|
-
region: z2.string().default("ap-southeast-2"),
|
|
262
|
-
// Alerting thresholds (percentage of includedComputeCents)
|
|
263
|
-
alertThresholds: z2.array(z2.number()).default([50, 80, 100, 150])
|
|
264
|
-
});
|
|
279
|
+
}).catchall(z7.any());
|
|
265
280
|
|
|
266
281
|
// src/types.ts
|
|
267
282
|
var GLOBAL_INFRA_OPTIONS = [
|
|
@@ -289,36 +304,84 @@ var COMMON_FINE_TUNING_OPTIONS = [
|
|
|
289
304
|
"showBreakdown"
|
|
290
305
|
];
|
|
291
306
|
|
|
292
|
-
// src/
|
|
293
|
-
var
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
".java": "java" /* Java */,
|
|
310
|
-
".go": "go" /* Go */,
|
|
311
|
-
".rs": "rust" /* Rust */,
|
|
312
|
-
".cs": "csharp" /* CSharp */
|
|
313
|
-
};
|
|
314
|
-
var ParseError = class extends Error {
|
|
315
|
-
constructor(message, filePath, loc) {
|
|
316
|
-
super(message);
|
|
317
|
-
this.filePath = filePath;
|
|
318
|
-
this.loc = loc;
|
|
319
|
-
this.name = "ParseError";
|
|
307
|
+
// src/utils/rating-helpers.ts
|
|
308
|
+
var ReadinessRating = /* @__PURE__ */ ((ReadinessRating2) => {
|
|
309
|
+
ReadinessRating2["Excellent"] = "Excellent";
|
|
310
|
+
ReadinessRating2["Good"] = "Good";
|
|
311
|
+
ReadinessRating2["Fair"] = "Fair";
|
|
312
|
+
ReadinessRating2["NeedsWork"] = "Needs Work";
|
|
313
|
+
ReadinessRating2["Critical"] = "Critical";
|
|
314
|
+
return ReadinessRating2;
|
|
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
|
+
};
|
|
320
324
|
}
|
|
321
|
-
|
|
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
|
+
}
|
|
322
385
|
|
|
323
386
|
// src/scoring.ts
|
|
324
387
|
var RecommendationPriority = /* @__PURE__ */ ((RecommendationPriority2) => {
|
|
@@ -327,14 +390,6 @@ var RecommendationPriority = /* @__PURE__ */ ((RecommendationPriority2) => {
|
|
|
327
390
|
RecommendationPriority2["Low"] = "low";
|
|
328
391
|
return RecommendationPriority2;
|
|
329
392
|
})(RecommendationPriority || {});
|
|
330
|
-
var ReadinessRating = /* @__PURE__ */ ((ReadinessRating2) => {
|
|
331
|
-
ReadinessRating2["Excellent"] = "Excellent";
|
|
332
|
-
ReadinessRating2["Good"] = "Good";
|
|
333
|
-
ReadinessRating2["Fair"] = "Fair";
|
|
334
|
-
ReadinessRating2["NeedsWork"] = "Needs Work";
|
|
335
|
-
ReadinessRating2["Critical"] = "Critical";
|
|
336
|
-
return ReadinessRating2;
|
|
337
|
-
})(ReadinessRating || {});
|
|
338
393
|
var DEFAULT_TOOL_WEIGHTS = {
|
|
339
394
|
["pattern-detect" /* PatternDetect */]: 22,
|
|
340
395
|
["context-analyzer" /* ContextAnalyzer */]: 19,
|
|
@@ -495,8 +550,8 @@ function calculateOverallScore(toolOutputs, config, cliWeights) {
|
|
|
495
550
|
const rating = getRating(overall);
|
|
496
551
|
const formulaParts = Array.from(toolOutputs.entries()).map(
|
|
497
552
|
([name, output]) => {
|
|
498
|
-
const
|
|
499
|
-
return `(${output.score} \xD7 ${
|
|
553
|
+
const weight = weights.get(name) ?? 5;
|
|
554
|
+
return `(${output.score} \xD7 ${weight})`;
|
|
500
555
|
}
|
|
501
556
|
);
|
|
502
557
|
const formulaStr = `[${formulaParts.join(" + ")}] / ${totalWeight} = ${overall}`;
|
|
@@ -513,20 +568,6 @@ function calculateOverallScore(toolOutputs, config, cliWeights) {
|
|
|
513
568
|
}
|
|
514
569
|
};
|
|
515
570
|
}
|
|
516
|
-
function getRating(score) {
|
|
517
|
-
if (score >= 90) return "Excellent" /* Excellent */;
|
|
518
|
-
if (score >= 75) return "Good" /* Good */;
|
|
519
|
-
if (score >= 60) return "Fair" /* Fair */;
|
|
520
|
-
if (score >= 40) return "Needs Work" /* NeedsWork */;
|
|
521
|
-
return "Critical" /* Critical */;
|
|
522
|
-
}
|
|
523
|
-
function getRatingSlug(score) {
|
|
524
|
-
if (score >= 90) return "excellent";
|
|
525
|
-
if (score >= 75) return "good";
|
|
526
|
-
if (score >= 60) return "fair";
|
|
527
|
-
if (score >= 40) return "needs-work";
|
|
528
|
-
return "critical";
|
|
529
|
-
}
|
|
530
571
|
function getRatingWithContext(score, fileCount, modelTier = "standard") {
|
|
531
572
|
const threshold = getRecommendedThreshold(fileCount, modelTier);
|
|
532
573
|
const normalized = score - threshold + 70;
|
|
@@ -753,6 +794,11 @@ function generateHTML(graph) {
|
|
|
753
794
|
}
|
|
754
795
|
|
|
755
796
|
export {
|
|
797
|
+
LeadSource,
|
|
798
|
+
LeadSourceSchema,
|
|
799
|
+
LeadSchema,
|
|
800
|
+
LeadSubmissionSchema,
|
|
801
|
+
ManagedAccountSchema,
|
|
756
802
|
Severity,
|
|
757
803
|
SeveritySchema,
|
|
758
804
|
ToolName,
|
|
@@ -772,19 +818,18 @@ export {
|
|
|
772
818
|
SpokeOutputSchema,
|
|
773
819
|
UnifiedReportSchema,
|
|
774
820
|
AIReadyConfigSchema,
|
|
775
|
-
LeadSource,
|
|
776
|
-
LeadSourceSchema,
|
|
777
|
-
LeadSchema,
|
|
778
|
-
LeadSubmissionSchema,
|
|
779
|
-
ManagedAccountSchema,
|
|
780
821
|
GLOBAL_INFRA_OPTIONS,
|
|
781
822
|
GLOBAL_SCAN_OPTIONS,
|
|
782
823
|
COMMON_FINE_TUNING_OPTIONS,
|
|
783
|
-
Language,
|
|
784
|
-
LANGUAGE_EXTENSIONS,
|
|
785
|
-
ParseError,
|
|
786
|
-
RecommendationPriority,
|
|
787
824
|
ReadinessRating,
|
|
825
|
+
getRatingMetadata,
|
|
826
|
+
getRatingLabel,
|
|
827
|
+
getRatingSlug,
|
|
828
|
+
getRatingEmoji,
|
|
829
|
+
getToolEmoji,
|
|
830
|
+
getPriorityIcon,
|
|
831
|
+
getRating,
|
|
832
|
+
RecommendationPriority,
|
|
788
833
|
DEFAULT_TOOL_WEIGHTS,
|
|
789
834
|
TOOL_NAME_MAP,
|
|
790
835
|
ScoringProfile,
|
|
@@ -797,8 +842,6 @@ export {
|
|
|
797
842
|
getToolWeight,
|
|
798
843
|
parseWeightString,
|
|
799
844
|
calculateOverallScore,
|
|
800
|
-
getRating,
|
|
801
|
-
getRatingSlug,
|
|
802
845
|
getRatingWithContext,
|
|
803
846
|
getRatingDisplay,
|
|
804
847
|
formatScore,
|