@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.
Files changed (96) hide show
  1. package/dist/chunk-2N7ISIKE.mjs +158 -0
  2. package/dist/chunk-ARUIZO7M.mjs +297 -0
  3. package/dist/chunk-CYC5EGEI.mjs +297 -0
  4. package/dist/{chunk-ZB3EHHAG.mjs → chunk-DBOPSRBC.mjs} +88 -26
  5. package/dist/chunk-EZ7ECLAZ.mjs +299 -0
  6. package/dist/chunk-FNPULWG7.mjs +248 -0
  7. package/dist/chunk-FZTFKZUQ.mjs +250 -0
  8. package/dist/chunk-GTS642BQ.mjs +262 -0
  9. package/dist/chunk-IXPY5J4K.mjs +248 -0
  10. package/dist/chunk-JJQLYW6Z.mjs +111 -0
  11. package/dist/chunk-L6BKANJC.mjs +130 -0
  12. package/dist/chunk-LXEO5PG3.mjs +292 -0
  13. package/dist/chunk-LZHO636W.mjs +501 -0
  14. package/dist/chunk-MTK2IIDZ.mjs +262 -0
  15. package/dist/chunk-QDCQETSI.mjs +262 -0
  16. package/dist/chunk-QZNY7B2N.mjs +248 -0
  17. package/dist/chunk-RCZSMGCX.mjs +250 -0
  18. package/dist/chunk-SWZOT67M.mjs +250 -0
  19. package/dist/chunk-U3IY2CFC.mjs +36 -0
  20. package/dist/chunk-UBCM5Y6R.mjs +275 -0
  21. package/dist/chunk-UTCRW3N7.mjs +301 -0
  22. package/dist/{chunk-RMH2TPAT.mjs → chunk-UYLH35LA.mjs} +88 -26
  23. package/dist/{chunk-TJXR2CHZ.mjs → chunk-WVNVC2PP.mjs} +266 -213
  24. package/dist/chunk-WYOW6O3P.mjs +114 -0
  25. package/dist/{chunk-CGOS2J6T.mjs → chunk-YRSSR4KN.mjs} +260 -217
  26. package/dist/client-2xbeKnrg.d.mts +1291 -0
  27. package/dist/client-2xbeKnrg.d.ts +1291 -0
  28. package/dist/client-4HLAGzFg.d.mts +1291 -0
  29. package/dist/client-4HLAGzFg.d.ts +1291 -0
  30. package/dist/client-B4TQwNa7.d.mts +1290 -0
  31. package/dist/client-B4TQwNa7.d.ts +1290 -0
  32. package/dist/client-Bdi4ty0v.d.mts +1294 -0
  33. package/dist/client-Bdi4ty0v.d.ts +1294 -0
  34. package/dist/client-BsKpUH3H.d.mts +1339 -0
  35. package/dist/client-BsKpUH3H.d.ts +1339 -0
  36. package/dist/client-Bv1zOaWF.d.mts +1291 -0
  37. package/dist/client-Bv1zOaWF.d.ts +1291 -0
  38. package/dist/client-Bz9YJMIX.d.mts +1290 -0
  39. package/dist/client-Bz9YJMIX.d.ts +1290 -0
  40. package/dist/client-CBpzm34X.d.mts +1291 -0
  41. package/dist/client-CBpzm34X.d.ts +1291 -0
  42. package/dist/client-CNu_tCZZ.d.mts +1305 -0
  43. package/dist/client-CNu_tCZZ.d.ts +1305 -0
  44. package/dist/client-CmEvxxQu.d.mts +1339 -0
  45. package/dist/client-CmEvxxQu.d.ts +1339 -0
  46. package/dist/client-DGMAxkZc.d.mts +1339 -0
  47. package/dist/client-DGMAxkZc.d.ts +1339 -0
  48. package/dist/client-DZq-CqcD.d.mts +1292 -0
  49. package/dist/client-DZq-CqcD.d.ts +1292 -0
  50. package/dist/{client-WVCAIWdJ.d.mts → client-DcqGfDTt.d.mts} +318 -226
  51. package/dist/{client-WVCAIWdJ.d.ts → client-DcqGfDTt.d.ts} +318 -226
  52. package/dist/{client-DLvFR2qA.d.mts → client-O8RvSRm0.d.mts} +89 -25
  53. package/dist/{client-DLvFR2qA.d.ts → client-O8RvSRm0.d.ts} +89 -25
  54. package/dist/client.d.mts +1 -1
  55. package/dist/client.d.ts +1 -1
  56. package/dist/client.js +53 -27
  57. package/dist/client.mjs +6 -6
  58. package/dist/csharp-parser-4ZKCSX5B.mjs +9 -0
  59. package/dist/csharp-parser-5HKICCRR.mjs +9 -0
  60. package/dist/csharp-parser-JCKXIAJW.mjs +9 -0
  61. package/dist/go-parser-J4KIH4RG.mjs +9 -0
  62. package/dist/go-parser-TKXL3DVH.mjs +9 -0
  63. package/dist/go-parser-XOM232XZ.mjs +9 -0
  64. package/dist/index.d.mts +332 -54
  65. package/dist/index.d.ts +332 -54
  66. package/dist/index.js +3930 -3064
  67. package/dist/index.mjs +933 -2036
  68. package/dist/java-parser-3KHXOXRQ.mjs +9 -0
  69. package/dist/java-parser-MASGS4WB.mjs +9 -0
  70. package/dist/java-parser-T5LXD63J.mjs +9 -0
  71. package/dist/python-parser-FNFK2473.mjs +8 -0
  72. package/dist/typescript-parser-2GGNRNB5.mjs +7 -0
  73. package/dist/typescript-parser-3ENJ6C7H.mjs +7 -0
  74. package/dist/typescript-parser-4GI7DPSW.mjs +7 -0
  75. package/dist/typescript-parser-4H3HUBO4.mjs +7 -0
  76. package/dist/typescript-parser-K63IVZMF.mjs +7 -0
  77. package/dist/typescript-parser-ZJKROMQG.mjs +7 -0
  78. package/package.json +1 -1
  79. package/dist/chunk-5SHLHMH7.mjs +0 -760
  80. package/dist/chunk-Q55AMEFV.mjs +0 -760
  81. package/dist/client-BEoUYNLp.d.mts +0 -1191
  82. package/dist/client-BEoUYNLp.d.ts +0 -1191
  83. package/dist/client-BrIMPk89.d.mts +0 -1214
  84. package/dist/client-BrIMPk89.d.ts +0 -1214
  85. package/dist/client-C5BuGX4F.d.mts +0 -1205
  86. package/dist/client-C5BuGX4F.d.ts +0 -1205
  87. package/dist/client-CKcjnPXt.d.mts +0 -1214
  88. package/dist/client-CKcjnPXt.d.ts +0 -1214
  89. package/dist/client-CLulBnie.d.mts +0 -1182
  90. package/dist/client-CLulBnie.d.ts +0 -1182
  91. package/dist/client-CQwvp8ep.d.mts +0 -1182
  92. package/dist/client-CQwvp8ep.d.ts +0 -1182
  93. package/dist/client-PFPdeo-z.d.mts +0 -1186
  94. package/dist/client-PFPdeo-z.d.ts +0 -1186
  95. package/dist/client-wk2fgk1q.d.mts +0 -1184
  96. package/dist/client-wk2fgk1q.d.ts +0 -1184
@@ -1,5 +1,63 @@
1
- // src/types/schema.ts
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 = z.nativeEnum(Severity);
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 = z.nativeEnum(ToolName);
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 = z.nativeEnum(IssueType);
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 = z.nativeEnum(AnalysisStatus);
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 = z.nativeEnum(ModelTier);
80
- var LocationSchema = z.object({
81
- file: z.string(),
82
- line: z.number(),
83
- column: z.number().optional(),
84
- endLine: z.number().optional(),
85
- endColumn: z.number().optional()
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
- var IssueSchema = z.object({
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: z.string(),
154
+ message: z4.string(),
91
155
  location: LocationSchema,
92
- suggestion: z.string().optional()
156
+ suggestion: z4.string().optional()
93
157
  });
94
- var MetricsSchema = z.object({
95
- tokenCost: z.number().optional(),
96
- complexityScore: z.number().optional(),
97
- consistencyScore: z.number().optional(),
98
- docFreshnessScore: z.number().optional(),
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: z.number().optional(),
101
- agentGroundingScore: z.number().optional(),
102
- testabilityScore: z.number().optional(),
103
- docDriftScore: z.number().optional(),
104
- dependencyHealthScore: z.number().optional(),
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: z.number().optional(),
108
- estimatedDeveloperHours: z.number().optional(),
109
- comprehensionDifficultyIndex: z.number().optional(),
174
+ estimatedMonthlyCost: z5.number().optional(),
175
+ estimatedDeveloperHours: z5.number().optional(),
176
+ comprehensionDifficultyIndex: z5.number().optional(),
110
177
  // Extended metrics for specific spokes
111
- totalSymbols: z.number().optional(),
112
- totalExports: z.number().optional()
178
+ totalSymbols: z5.number().optional(),
179
+ totalExports: z5.number().optional()
113
180
  });
114
- var AnalysisResultSchema = z.object({
115
- fileName: z.string(),
116
- issues: z.array(IssueSchema),
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 = z.object({
120
- totalFiles: z.number().optional(),
121
- totalIssues: z.number().optional(),
122
- criticalIssues: z.number().optional(),
123
- majorIssues: z.number().optional(),
124
- score: z.number().optional()
125
- }).catchall(z.any());
126
- var SpokeOutputSchema = z.object({
127
- results: z.array(AnalysisResultSchema),
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: z.object({
130
- toolName: z.string(),
131
- version: z.string().optional(),
132
- timestamp: z.string().optional(),
133
- config: z.any().optional()
134
- }).catchall(z.any()).optional()
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 = z.object({
137
- summary: z.object({
138
- totalFiles: z.number(),
139
- totalIssues: z.number(),
140
- criticalIssues: z.number(),
141
- majorIssues: z.number(),
142
- businessImpact: z.object({
143
- estimatedMonthlyWaste: z.number().optional(),
144
- potentialSavings: z.number().optional(),
145
- productivityHours: z.number().optional()
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: z.array(AnalysisResultSchema),
149
- scoring: z.object({
150
- overall: z.number(),
151
- rating: z.string(),
152
- timestamp: z.string(),
153
- breakdown: z.array(
154
- z.object({
155
- toolName: z.union([ToolNameSchema, z.string()]),
156
- score: z.number()
157
- }).catchall(z.any())
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(z.any());
161
- var AIReadyConfigSchema = z.object({
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: z.number().optional(),
236
+ threshold: z7.number().optional(),
164
237
  /** Files or directories to include in scan */
165
- include: z.array(z.string()).optional(),
238
+ include: z7.array(z7.string()).optional(),
166
239
  /** Files or directories to exclude from scan */
167
- exclude: z.array(z.string()).optional(),
240
+ exclude: z7.array(z7.string()).optional(),
168
241
  /** Scan-specific configuration */
169
- scan: z.object({
170
- include: z.array(z.string()).optional(),
171
- exclude: z.array(z.string()).optional(),
172
- parallel: z.boolean().optional(),
173
- deep: z.boolean().optional(),
174
- tools: z.array(z.string()).optional()
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: z.object({
250
+ output: z7.object({
178
251
  /** Output format (json, console, html) */
179
- format: z.enum(["json", "console", "html"]).optional(),
252
+ format: z7.enum(["json", "console", "html"]).optional(),
180
253
  /** Output file path */
181
- path: z.string().optional(),
254
+ path: z7.string().optional(),
182
255
  /** Output directory */
183
- saveTo: z.string().optional(),
256
+ saveTo: z7.string().optional(),
184
257
  /** Whether to show score breakdown in console */
185
- showBreakdown: z.boolean().optional(),
258
+ showBreakdown: z7.boolean().optional(),
186
259
  /** Baseline report to compare against */
187
- compareBaseline: z.string().optional()
260
+ compareBaseline: z7.string().optional()
188
261
  }).optional(),
189
262
  /** Tool-specific configuration overrides (Strictly ToolName -> Config) */
190
- tools: z.record(z.string(), z.any()).optional(),
263
+ tools: z7.record(z7.string(), z7.any()).optional(),
191
264
  /** Scoring profile and weights */
192
- scoring: z.object({
265
+ scoring: z7.object({
193
266
  /** Name of the scoring profile (e.g. "strict", "balanced") */
194
- profile: z.string().optional(),
267
+ profile: z7.string().optional(),
195
268
  /** Custom weights for tools and metrics */
196
- weights: z.record(z.string(), z.number()).optional()
269
+ weights: z7.record(z7.string(), z7.number()).optional()
197
270
  }).optional(),
198
271
  /** Visualizer settings (interactive graph) */
199
- visualizer: z.object({
200
- groupingDirs: z.array(z.string()).optional(),
201
- graph: z.object({
202
- maxNodes: z.number().optional(),
203
- maxEdges: z.number().optional()
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(z.any());
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/types/language.ts
293
- var Language = /* @__PURE__ */ ((Language2) => {
294
- Language2["TypeScript"] = "typescript";
295
- Language2["JavaScript"] = "javascript";
296
- Language2["Python"] = "python";
297
- Language2["Java"] = "java";
298
- Language2["Go"] = "go";
299
- Language2["Rust"] = "rust";
300
- Language2["CSharp"] = "csharp";
301
- return Language2;
302
- })(Language || {});
303
- var LANGUAGE_EXTENSIONS = {
304
- ".ts": "typescript" /* TypeScript */,
305
- ".tsx": "typescript" /* TypeScript */,
306
- ".js": "javascript" /* JavaScript */,
307
- ".jsx": "javascript" /* JavaScript */,
308
- ".py": "python" /* Python */,
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 w = weights.get(name) ?? 5;
499
- return `(${output.score} \xD7 ${w})`;
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,