@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,184 +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()
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
- // Financials (in cents)
241
- baseFeeCents: z2.number().default(2900),
242
- includedComputeCents: z2.number().default(1500),
243
- // $15.00 AWS included
244
- includedTokenCents: z2.number().default(500),
245
- // $5.00 Managed Tokens included
246
- // Pre-paid Balance (credits)
247
- prepaidTokenBalanceCents: z2.number().default(0),
248
- // Users buy these in $10 packs
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/types/language.ts
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 w = weights.get(name) ?? 5;
491
- return `(${output.score} \xD7 ${w})`;
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,