create-fornix 0.0.2 → 0.0.3

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/index.js CHANGED
@@ -898,6 +898,535 @@ function generateProjectManifest(config, blocks) {
898
898
  return JSON.stringify(manifest2, null, 2) + "\n";
899
899
  }
900
900
 
901
+ // ../fornix-registry/src/schemas/block-manifest.ts
902
+ import { z } from "zod";
903
+ var BlockFileSchema = z.object({
904
+ source: z.string().min(1),
905
+ destination: z.string().min(1),
906
+ condition: z.string().optional()
907
+ });
908
+ var EnvVarSchema = z.object({
909
+ name: z.string().min(1),
910
+ description: z.string().min(1),
911
+ required: z.boolean()
912
+ });
913
+ var ContentSlotSchema = z.object({
914
+ type: z.enum(["string", "number", "boolean", "array", "object"]),
915
+ description: z.string().optional(),
916
+ maxLength: z.number().int().positive().optional(),
917
+ example: z.unknown().optional(),
918
+ items: z.record(z.unknown()).optional(),
919
+ minItems: z.number().int().nonnegative().optional(),
920
+ maxItems: z.number().int().positive().optional()
921
+ });
922
+ var BlockCollectionSchema = z.object({
923
+ name: z.string().min(1),
924
+ type: z.enum(["data", "content"]),
925
+ schemaSource: z.string().min(1)
926
+ });
927
+ var BlockAIMetadataSchema = z.object({
928
+ whenToUse: z.string().min(1),
929
+ whenNotToUse: z.string().min(1),
930
+ pairsWith: z.array(z.string()),
931
+ contentSlots: z.record(ContentSlotSchema).optional()
932
+ });
933
+ var BlockManifestSchema = z.object({
934
+ schemaVersion: z.number().int().positive(),
935
+ name: z.string().regex(
936
+ /^[a-z][a-z0-9-]*$/,
937
+ "Block name must be kebab-case, starting with a lowercase letter (regex: ^[a-z][a-z0-9-]*$)"
938
+ ),
939
+ version: z.string().min(1),
940
+ type: z.enum(["section", "integration", "feature", "layout"]),
941
+ description: z.string().min(1).max(200),
942
+ category: z.string().min(1),
943
+ tags: z.array(z.string()),
944
+ dependencies: z.record(z.string()),
945
+ requires: z.array(z.string()),
946
+ conflicts: z.array(z.string()),
947
+ requiredMode: z.enum(["static", "hybrid", "server"]).optional(),
948
+ envVars: z.array(EnvVarSchema),
949
+ variants: z.array(z.string()),
950
+ slots: z.array(z.string()),
951
+ files: z.array(BlockFileSchema),
952
+ collections: z.array(BlockCollectionSchema).optional(),
953
+ ai: BlockAIMetadataSchema.optional()
954
+ });
955
+
956
+ // ../fornix-registry/src/schemas/palette.ts
957
+ import { z as z2 } from "zod";
958
+ var HexColorSchema = z2.string().regex(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/, "Must be a valid hex color (e.g. #ff00aa or #fff)");
959
+ var PaletteSchema = z2.object({
960
+ schemaVersion: z2.number().int().positive(),
961
+ name: z2.string().regex(
962
+ /^[a-z][a-z0-9-]*$/,
963
+ "Palette name must be kebab-case, starting with a lowercase letter"
964
+ ),
965
+ displayName: z2.string().min(1),
966
+ category: z2.string().min(1),
967
+ mode: z2.enum(["light", "dark"]),
968
+ colors: z2.object({
969
+ primary: HexColorSchema,
970
+ secondary: HexColorSchema,
971
+ accent: HexColorSchema,
972
+ background: HexColorSchema,
973
+ foreground: HexColorSchema
974
+ })
975
+ });
976
+ var PaletteRegistrySchema = z2.array(PaletteSchema);
977
+
978
+ // ../fornix-registry/src/builtin-palettes.ts
979
+ var BUILTIN_PALETTES = [
980
+ {
981
+ schemaVersion: 1,
982
+ name: "arctic",
983
+ displayName: "Arctic",
984
+ category: "nature",
985
+ mode: "light",
986
+ colors: {
987
+ primary: "#0ea5e9",
988
+ secondary: "#38bdf8",
989
+ accent: "#6366f1",
990
+ background: "#f0f9ff",
991
+ foreground: "#0c4a6e"
992
+ }
993
+ },
994
+ {
995
+ schemaVersion: 1,
996
+ name: "charcoal",
997
+ displayName: "Charcoal",
998
+ category: "dark",
999
+ mode: "dark",
1000
+ colors: {
1001
+ primary: "#3b82f6",
1002
+ secondary: "#60a5fa",
1003
+ accent: "#f59e0b",
1004
+ background: "#1c1917",
1005
+ foreground: "#e7e5e4"
1006
+ }
1007
+ },
1008
+ {
1009
+ schemaVersion: 1,
1010
+ name: "copper",
1011
+ displayName: "Copper",
1012
+ category: "warm",
1013
+ mode: "dark",
1014
+ colors: {
1015
+ primary: "#b45309",
1016
+ secondary: "#d97706",
1017
+ accent: "#06b6d4",
1018
+ background: "#27272a",
1019
+ foreground: "#fef3c7"
1020
+ }
1021
+ },
1022
+ {
1023
+ schemaVersion: 1,
1024
+ name: "corporate-blue",
1025
+ displayName: "Corporate Blue",
1026
+ category: "professional",
1027
+ mode: "light",
1028
+ colors: {
1029
+ primary: "#1e40af",
1030
+ secondary: "#2563eb",
1031
+ accent: "#0d9488",
1032
+ background: "#f0f9ff",
1033
+ foreground: "#1e3a5f"
1034
+ }
1035
+ },
1036
+ {
1037
+ schemaVersion: 1,
1038
+ name: "cotton",
1039
+ displayName: "Cotton",
1040
+ category: "light",
1041
+ mode: "light",
1042
+ colors: {
1043
+ primary: "#7c3aed",
1044
+ secondary: "#8b5cf6",
1045
+ accent: "#10b981",
1046
+ background: "#fafaf9",
1047
+ foreground: "#1c1917"
1048
+ }
1049
+ },
1050
+ {
1051
+ schemaVersion: 1,
1052
+ name: "cream",
1053
+ displayName: "Cream",
1054
+ category: "light",
1055
+ mode: "light",
1056
+ colors: {
1057
+ primary: "#b45309",
1058
+ secondary: "#d97706",
1059
+ accent: "#059669",
1060
+ background: "#fffbeb",
1061
+ foreground: "#451a03"
1062
+ }
1063
+ },
1064
+ {
1065
+ schemaVersion: 1,
1066
+ name: "cyber-punk",
1067
+ displayName: "Cyber Punk",
1068
+ category: "vibrant",
1069
+ mode: "dark",
1070
+ colors: {
1071
+ primary: "#eab308",
1072
+ secondary: "#facc15",
1073
+ accent: "#ec4899",
1074
+ background: "#0a0a0a",
1075
+ foreground: "#fef9c3"
1076
+ }
1077
+ },
1078
+ {
1079
+ schemaVersion: 1,
1080
+ name: "deep-sea",
1081
+ displayName: "Deep Sea",
1082
+ category: "cool",
1083
+ mode: "dark",
1084
+ colors: {
1085
+ primary: "#06b6d4",
1086
+ secondary: "#22d3ee",
1087
+ accent: "#f97316",
1088
+ background: "#042f2e",
1089
+ foreground: "#ccfbf1"
1090
+ }
1091
+ },
1092
+ {
1093
+ schemaVersion: 1,
1094
+ name: "desert-sand",
1095
+ displayName: "Desert Sand",
1096
+ category: "nature",
1097
+ mode: "light",
1098
+ colors: {
1099
+ primary: "#c2410c",
1100
+ secondary: "#ea580c",
1101
+ accent: "#0d9488",
1102
+ background: "#fef3c7",
1103
+ foreground: "#431407"
1104
+ }
1105
+ },
1106
+ {
1107
+ schemaVersion: 1,
1108
+ name: "electric-violet",
1109
+ displayName: "Electric Violet",
1110
+ category: "vibrant",
1111
+ mode: "dark",
1112
+ colors: {
1113
+ primary: "#8b5cf6",
1114
+ secondary: "#a78bfa",
1115
+ accent: "#34d399",
1116
+ background: "#1e1b4b",
1117
+ foreground: "#ede9fe"
1118
+ }
1119
+ },
1120
+ {
1121
+ schemaVersion: 1,
1122
+ name: "ember",
1123
+ displayName: "Ember",
1124
+ category: "warm",
1125
+ mode: "dark",
1126
+ colors: {
1127
+ primary: "#ef4444",
1128
+ secondary: "#f87171",
1129
+ accent: "#fbbf24",
1130
+ background: "#1c1917",
1131
+ foreground: "#fef2f2"
1132
+ }
1133
+ },
1134
+ {
1135
+ schemaVersion: 1,
1136
+ name: "executive",
1137
+ displayName: "Executive",
1138
+ category: "professional",
1139
+ mode: "dark",
1140
+ colors: {
1141
+ primary: "#d4af37",
1142
+ secondary: "#f5d063",
1143
+ accent: "#4ade80",
1144
+ background: "#1a1a2e",
1145
+ foreground: "#eef2ff"
1146
+ }
1147
+ },
1148
+ {
1149
+ schemaVersion: 1,
1150
+ name: "fintech-dark",
1151
+ displayName: "Fintech Dark",
1152
+ category: "brand-inspired",
1153
+ mode: "dark",
1154
+ colors: {
1155
+ primary: "#10b981",
1156
+ secondary: "#34d399",
1157
+ accent: "#6366f1",
1158
+ background: "#0a0a0a",
1159
+ foreground: "#ecfdf5"
1160
+ }
1161
+ },
1162
+ {
1163
+ schemaVersion: 1,
1164
+ name: "forest",
1165
+ displayName: "Forest",
1166
+ category: "nature",
1167
+ mode: "dark",
1168
+ colors: {
1169
+ primary: "#22c55e",
1170
+ secondary: "#4ade80",
1171
+ accent: "#fbbf24",
1172
+ background: "#14532d",
1173
+ foreground: "#dcfce7"
1174
+ }
1175
+ },
1176
+ {
1177
+ schemaVersion: 1,
1178
+ name: "frost",
1179
+ displayName: "Frost",
1180
+ category: "cool",
1181
+ mode: "light",
1182
+ colors: {
1183
+ primary: "#6366f1",
1184
+ secondary: "#818cf8",
1185
+ accent: "#f43f5e",
1186
+ background: "#eef2ff",
1187
+ foreground: "#312e81"
1188
+ }
1189
+ },
1190
+ {
1191
+ schemaVersion: 1,
1192
+ name: "glacier",
1193
+ displayName: "Glacier",
1194
+ category: "cool",
1195
+ mode: "light",
1196
+ colors: {
1197
+ primary: "#0284c7",
1198
+ secondary: "#0ea5e9",
1199
+ accent: "#c026d3",
1200
+ background: "#ecfeff",
1201
+ foreground: "#164e63"
1202
+ }
1203
+ },
1204
+ {
1205
+ schemaVersion: 1,
1206
+ name: "golden-hour",
1207
+ displayName: "Golden Hour",
1208
+ category: "warm",
1209
+ mode: "light",
1210
+ colors: {
1211
+ primary: "#d97706",
1212
+ secondary: "#f59e0b",
1213
+ accent: "#be185d",
1214
+ background: "#fffbeb",
1215
+ foreground: "#451a03"
1216
+ }
1217
+ },
1218
+ {
1219
+ schemaVersion: 1,
1220
+ name: "health-clean",
1221
+ displayName: "Health Clean",
1222
+ category: "brand-inspired",
1223
+ mode: "light",
1224
+ colors: {
1225
+ primary: "#0891b2",
1226
+ secondary: "#06b6d4",
1227
+ accent: "#16a34a",
1228
+ background: "#f0fdfa",
1229
+ foreground: "#134e4a"
1230
+ }
1231
+ },
1232
+ {
1233
+ schemaVersion: 1,
1234
+ name: "luxury-gold",
1235
+ displayName: "Luxury Gold",
1236
+ category: "brand-inspired",
1237
+ mode: "dark",
1238
+ colors: {
1239
+ primary: "#d4af37",
1240
+ secondary: "#f5d063",
1241
+ accent: "#e11d48",
1242
+ background: "#0c0a09",
1243
+ foreground: "#fef9c3"
1244
+ }
1245
+ },
1246
+ {
1247
+ schemaVersion: 1,
1248
+ name: "midnight",
1249
+ displayName: "Midnight",
1250
+ category: "dark",
1251
+ mode: "dark",
1252
+ colors: {
1253
+ primary: "#6366f1",
1254
+ secondary: "#818cf8",
1255
+ accent: "#c084fc",
1256
+ background: "#0f172a",
1257
+ foreground: "#f8fafc"
1258
+ }
1259
+ },
1260
+ {
1261
+ schemaVersion: 1,
1262
+ name: "neon-tokyo",
1263
+ displayName: "Neon Tokyo",
1264
+ category: "vibrant",
1265
+ mode: "dark",
1266
+ colors: {
1267
+ primary: "#f43f5e",
1268
+ secondary: "#fb7185",
1269
+ accent: "#22d3ee",
1270
+ background: "#0c0a09",
1271
+ foreground: "#fef2f2"
1272
+ }
1273
+ },
1274
+ {
1275
+ schemaVersion: 1,
1276
+ name: "obsidian",
1277
+ displayName: "Obsidian",
1278
+ category: "dark",
1279
+ mode: "dark",
1280
+ colors: {
1281
+ primary: "#a855f7",
1282
+ secondary: "#7c3aed",
1283
+ accent: "#f472b6",
1284
+ background: "#09090b",
1285
+ foreground: "#fafafa"
1286
+ }
1287
+ },
1288
+ {
1289
+ schemaVersion: 1,
1290
+ name: "ocean-breeze",
1291
+ displayName: "Ocean Breeze",
1292
+ category: "nature",
1293
+ mode: "light",
1294
+ colors: {
1295
+ primary: "#0077b6",
1296
+ secondary: "#0096c7",
1297
+ accent: "#f4845f",
1298
+ background: "#caf0f8",
1299
+ foreground: "#023e8a"
1300
+ }
1301
+ },
1302
+ {
1303
+ schemaVersion: 1,
1304
+ name: "pearl",
1305
+ displayName: "Pearl",
1306
+ category: "light",
1307
+ mode: "light",
1308
+ colors: {
1309
+ primary: "#0891b2",
1310
+ secondary: "#06b6d4",
1311
+ accent: "#e11d48",
1312
+ background: "#f8fafc",
1313
+ foreground: "#0c4a6e"
1314
+ }
1315
+ },
1316
+ {
1317
+ schemaVersion: 1,
1318
+ name: "slate-modern",
1319
+ displayName: "Slate Modern",
1320
+ category: "professional",
1321
+ mode: "light",
1322
+ colors: {
1323
+ primary: "#475569",
1324
+ secondary: "#64748b",
1325
+ accent: "#0ea5e9",
1326
+ background: "#f8fafc",
1327
+ foreground: "#0f172a"
1328
+ }
1329
+ },
1330
+ {
1331
+ schemaVersion: 1,
1332
+ name: "snow",
1333
+ displayName: "Snow",
1334
+ category: "light",
1335
+ mode: "light",
1336
+ colors: {
1337
+ primary: "#2563eb",
1338
+ secondary: "#3b82f6",
1339
+ accent: "#f97316",
1340
+ background: "#ffffff",
1341
+ foreground: "#0f172a"
1342
+ }
1343
+ },
1344
+ {
1345
+ schemaVersion: 1,
1346
+ name: "startup-bold",
1347
+ displayName: "Startup Bold",
1348
+ category: "brand-inspired",
1349
+ mode: "light",
1350
+ colors: {
1351
+ primary: "#7c3aed",
1352
+ secondary: "#8b5cf6",
1353
+ accent: "#f97316",
1354
+ background: "#faf5ff",
1355
+ foreground: "#3b0764"
1356
+ }
1357
+ },
1358
+ {
1359
+ schemaVersion: 1,
1360
+ name: "storm",
1361
+ displayName: "Storm",
1362
+ category: "cool",
1363
+ mode: "dark",
1364
+ colors: {
1365
+ primary: "#64748b",
1366
+ secondary: "#94a3b8",
1367
+ accent: "#38bdf8",
1368
+ background: "#0f172a",
1369
+ foreground: "#cbd5e1"
1370
+ }
1371
+ },
1372
+ {
1373
+ schemaVersion: 1,
1374
+ name: "sunset-glow",
1375
+ displayName: "Sunset Glow",
1376
+ category: "vibrant",
1377
+ mode: "dark",
1378
+ colors: {
1379
+ primary: "#f97316",
1380
+ secondary: "#fb923c",
1381
+ accent: "#a855f7",
1382
+ background: "#18181b",
1383
+ foreground: "#fff7ed"
1384
+ }
1385
+ },
1386
+ {
1387
+ schemaVersion: 1,
1388
+ name: "terracotta",
1389
+ displayName: "Terracotta",
1390
+ category: "warm",
1391
+ mode: "light",
1392
+ colors: {
1393
+ primary: "#c2410c",
1394
+ secondary: "#dc2626",
1395
+ accent: "#65a30d",
1396
+ background: "#fdf2f8",
1397
+ foreground: "#431407"
1398
+ }
1399
+ },
1400
+ {
1401
+ schemaVersion: 1,
1402
+ name: "trust",
1403
+ displayName: "Trust",
1404
+ category: "professional",
1405
+ mode: "light",
1406
+ colors: {
1407
+ primary: "#0369a1",
1408
+ secondary: "#0284c7",
1409
+ accent: "#16a34a",
1410
+ background: "#f0fdfa",
1411
+ foreground: "#0c4a6e"
1412
+ }
1413
+ },
1414
+ {
1415
+ schemaVersion: 1,
1416
+ name: "void",
1417
+ displayName: "Void",
1418
+ category: "dark",
1419
+ mode: "dark",
1420
+ colors: {
1421
+ primary: "#14b8a6",
1422
+ secondary: "#2dd4bf",
1423
+ accent: "#f43f5e",
1424
+ background: "#020617",
1425
+ foreground: "#e2e8f0"
1426
+ }
1427
+ }
1428
+ ];
1429
+
901
1430
  // src/cli/fixture-registry.ts
902
1431
  import { readFileSync, readdirSync } from "fs";
903
1432
  import { join, dirname } from "path";
@@ -1208,6 +1737,9 @@ export function getStaticPaths() { return [{ params: { slug: '1' } }]; }
1208
1737
  };
1209
1738
  var FIXTURE_DEFAULT_CONTENT = {};
1210
1739
  function loadAllPalettes() {
1740
+ if (BUILTIN_PALETTES.length > 0) {
1741
+ return [...BUILTIN_PALETTES];
1742
+ }
1211
1743
  try {
1212
1744
  const registryPath = findRegistryPalettesDir();
1213
1745
  if (!registryPath) return [];
@@ -1779,26 +2311,26 @@ ONLY recommend blocks that exist in the catalog above. Be precise with block nam
1779
2311
  }
1780
2312
 
1781
2313
  // src/ai/schemas.ts
1782
- import { z } from "zod";
1783
- var BrandSchema = z.object({
1784
- name: z.string().min(1),
1785
- tagline: z.string().optional(),
1786
- description: z.string().min(1),
1787
- targetAudience: z.string().optional(),
1788
- tone: z.string().min(1)
2314
+ import { z as z3 } from "zod";
2315
+ var BrandSchema = z3.object({
2316
+ name: z3.string().min(1),
2317
+ tagline: z3.string().nullable().default(null),
2318
+ description: z3.string().min(1),
2319
+ targetAudience: z3.string().nullable().default(null),
2320
+ tone: z3.string().min(1)
1789
2321
  });
1790
- var RecommendedBlockSchema = z.object({
1791
- blockName: z.string().min(1),
1792
- reason: z.string().min(1),
1793
- confidence: z.number().min(0).max(1)
2322
+ var RecommendedBlockSchema = z3.object({
2323
+ blockName: z3.string().min(1),
2324
+ reason: z3.string().min(1),
2325
+ confidence: z3.number().min(0).max(1)
1794
2326
  });
1795
- var UncertaintySchema = z.object({
1796
- topic: z.string().min(1),
1797
- question: z.string().min(1),
1798
- defaultAssumption: z.string().min(1)
2327
+ var UncertaintySchema = z3.object({
2328
+ topic: z3.string().min(1),
2329
+ question: z3.string().min(1),
2330
+ defaultAssumption: z3.string().min(1)
1799
2331
  });
1800
- var IntentSchema = z.object({
1801
- siteType: z.enum([
2332
+ var IntentSchema = z3.object({
2333
+ siteType: z3.enum([
1802
2334
  "landing-page",
1803
2335
  "saas",
1804
2336
  "agency",
@@ -1810,20 +2342,20 @@ var IntentSchema = z.object({
1810
2342
  "community",
1811
2343
  "other"
1812
2344
  ]),
1813
- industry: z.string().min(1),
2345
+ industry: z3.string().min(1),
1814
2346
  brand: BrandSchema,
1815
- needsAuth: z.boolean(),
1816
- needsPayments: z.boolean(),
1817
- needsBlog: z.boolean(),
1818
- needsDocs: z.boolean(),
1819
- needsDashboard: z.boolean(),
1820
- needsContactForm: z.boolean(),
1821
- needsNewsletter: z.boolean(),
1822
- hasDynamicContent: z.boolean(),
1823
- hasEcommerce: z.boolean(),
1824
- hasUserAccounts: z.boolean(),
1825
- prefersDarkMode: z.boolean(),
1826
- visualStyle: z.enum([
2347
+ needsAuth: z3.boolean(),
2348
+ needsPayments: z3.boolean(),
2349
+ needsBlog: z3.boolean(),
2350
+ needsDocs: z3.boolean(),
2351
+ needsDashboard: z3.boolean(),
2352
+ needsContactForm: z3.boolean(),
2353
+ needsNewsletter: z3.boolean(),
2354
+ hasDynamicContent: z3.boolean(),
2355
+ hasEcommerce: z3.boolean(),
2356
+ hasUserAccounts: z3.boolean(),
2357
+ prefersDarkMode: z3.boolean(),
2358
+ visualStyle: z3.enum([
1827
2359
  "minimal",
1828
2360
  "bold",
1829
2361
  "glassmorphism",
@@ -1831,80 +2363,15 @@ var IntentSchema = z.object({
1831
2363
  "flat",
1832
2364
  "neo-brutalist"
1833
2365
  ]),
1834
- languages: z.array(z.string().min(1)).default([]),
1835
- palettePreference: z.enum(["custom", "prebuilt", "ai-generated", "unspecified"]),
1836
- wantsThemeSwitcher: z.boolean(),
1837
- recommendedBlocks: z.array(RecommendedBlockSchema),
1838
- uncertainties: z.array(UncertaintySchema),
1839
- overallConfidence: z.number().min(0).max(1)
2366
+ languages: z3.array(z3.string().min(1)).default([]),
2367
+ palettePreference: z3.enum(["custom", "prebuilt", "ai-generated", "unspecified"]),
2368
+ wantsThemeSwitcher: z3.boolean(),
2369
+ recommendedBlocks: z3.array(RecommendedBlockSchema),
2370
+ uncertainties: z3.array(UncertaintySchema),
2371
+ overallConfidence: z3.number().min(0).max(1)
1840
2372
  });
1841
2373
 
1842
2374
  // src/ai/rules.ts
1843
- import { z as z2 } from "zod";
1844
- var IntentSchema2 = z2.object({
1845
- siteType: z2.enum([
1846
- "landing-page",
1847
- "saas",
1848
- "agency",
1849
- "portfolio",
1850
- "blog",
1851
- "docs",
1852
- "ecommerce",
1853
- "dashboard",
1854
- "community",
1855
- "other"
1856
- ]),
1857
- industry: z2.string(),
1858
- brand: z2.object({
1859
- name: z2.string(),
1860
- tagline: z2.string().optional(),
1861
- description: z2.string(),
1862
- targetAudience: z2.string().optional(),
1863
- tone: z2.string()
1864
- }),
1865
- needsAuth: z2.boolean(),
1866
- needsPayments: z2.boolean(),
1867
- needsBlog: z2.boolean(),
1868
- needsDocs: z2.boolean(),
1869
- needsDashboard: z2.boolean(),
1870
- needsContactForm: z2.boolean(),
1871
- needsNewsletter: z2.boolean(),
1872
- hasDynamicContent: z2.boolean(),
1873
- hasEcommerce: z2.boolean(),
1874
- hasUserAccounts: z2.boolean(),
1875
- prefersDarkMode: z2.boolean(),
1876
- visualStyle: z2.enum([
1877
- "minimal",
1878
- "bold",
1879
- "glassmorphism",
1880
- "gradient",
1881
- "flat",
1882
- "neo-brutalist"
1883
- ]),
1884
- languages: z2.array(z2.string()),
1885
- palettePreference: z2.enum([
1886
- "custom",
1887
- "prebuilt",
1888
- "ai-generated",
1889
- "unspecified"
1890
- ]),
1891
- wantsThemeSwitcher: z2.boolean(),
1892
- recommendedBlocks: z2.array(
1893
- z2.object({
1894
- blockName: z2.string(),
1895
- reason: z2.string(),
1896
- confidence: z2.number()
1897
- })
1898
- ),
1899
- uncertainties: z2.array(
1900
- z2.object({
1901
- topic: z2.string(),
1902
- question: z2.string(),
1903
- defaultAssumption: z2.string()
1904
- })
1905
- ),
1906
- overallConfidence: z2.number().min(0).max(1)
1907
- });
1908
2375
  function hasBlock(config, name) {
1909
2376
  return config.blocks.some((b) => b.name === name);
1910
2377
  }
@@ -1996,37 +2463,37 @@ function createDefaultConfig(overrides = {}) {
1996
2463
  }
1997
2464
 
1998
2465
  // src/schemas/config.ts
1999
- import { z as z3 } from "zod";
2000
- var BlockSelectionSchema = z3.object({
2001
- name: z3.string().min(1),
2002
- variant: z3.string().min(1)
2466
+ import { z as z4 } from "zod";
2467
+ var BlockSelectionSchema = z4.object({
2468
+ name: z4.string().min(1),
2469
+ variant: z4.string().min(1)
2003
2470
  });
2004
- var PaletteColorsSchema = z3.object({
2005
- primary: z3.string().min(1),
2006
- secondary: z3.string().min(1),
2007
- accent: z3.string().min(1),
2008
- background: z3.string().min(1),
2009
- foreground: z3.string().min(1)
2471
+ var PaletteColorsSchema = z4.object({
2472
+ primary: z4.string().min(1),
2473
+ secondary: z4.string().min(1),
2474
+ accent: z4.string().min(1),
2475
+ background: z4.string().min(1),
2476
+ foreground: z4.string().min(1)
2010
2477
  });
2011
- var PaletteConfigSchema = z3.object({
2012
- preset: z3.string().min(1).optional(),
2478
+ var PaletteConfigSchema = z4.object({
2479
+ preset: z4.string().min(1).optional(),
2013
2480
  colors: PaletteColorsSchema
2014
2481
  });
2015
- var ResolvedConfigSchema = z3.object({
2016
- projectName: z3.string().min(1),
2017
- projectDir: z3.string().min(1),
2018
- renderMode: z3.enum(["static", "hybrid", "server"]),
2019
- deployTarget: z3.enum(["cloudflare", "vercel", "netlify", "static"]),
2020
- database: z3.enum(["none", "d1", "turso", "astro-db", "postgres"]),
2021
- cssEngine: z3.enum(["tailwind", "vanilla"]),
2022
- packageManager: z3.enum(["npm", "pnpm", "bun"]),
2023
- blocks: z3.array(BlockSelectionSchema),
2024
- locales: z3.array(z3.string().min(1)).transform((locales) => locales.length === 0 ? ["en"] : locales),
2025
- defaultLocale: z3.string().min(1),
2482
+ var ResolvedConfigSchema = z4.object({
2483
+ projectName: z4.string().min(1),
2484
+ projectDir: z4.string().min(1),
2485
+ renderMode: z4.enum(["static", "hybrid", "server"]),
2486
+ deployTarget: z4.enum(["cloudflare", "vercel", "netlify", "static"]),
2487
+ database: z4.enum(["none", "d1", "turso", "astro-db", "postgres"]),
2488
+ cssEngine: z4.enum(["tailwind", "vanilla"]),
2489
+ packageManager: z4.enum(["npm", "pnpm", "bun"]),
2490
+ blocks: z4.array(BlockSelectionSchema),
2491
+ locales: z4.array(z4.string().min(1)).transform((locales) => locales.length === 0 ? ["en"] : locales),
2492
+ defaultLocale: z4.string().min(1),
2026
2493
  palette: PaletteConfigSchema,
2027
- themeSwitcher: z3.boolean().default(false),
2028
- content: z3.record(z3.record(z3.unknown())).optional(),
2029
- createdWith: z3.enum(["ai", "manual", "recipe", "mcp"])
2494
+ themeSwitcher: z4.boolean().default(false),
2495
+ content: z4.record(z4.record(z4.unknown())).optional(),
2496
+ createdWith: z4.enum(["ai", "manual", "recipe", "mcp"])
2030
2497
  }).refine(
2031
2498
  (config) => config.locales.includes(config.defaultLocale),
2032
2499
  {
@@ -2341,7 +2808,7 @@ function createOpenAIProvider(apiKey) {
2341
2808
  const { openai } = await import("@ai-sdk/openai");
2342
2809
  const result = await generateObject({
2343
2810
  model: openai("gpt-4o-mini", { structuredOutputs: true }),
2344
- schema: IntentSchema2,
2811
+ schema: IntentSchema,
2345
2812
  system: systemPrompt ?? "You are the Fornix AI assistant. Analyze the user's website description and produce a structured Intent object.",
2346
2813
  prompt,
2347
2814
  maxTokens: 2e3
@@ -2402,7 +2869,7 @@ function createOllamaProvider(opts = {}) {
2402
2869
  });
2403
2870
  }
2404
2871
  const parsed = JSON.parse(content);
2405
- const validated = IntentSchema2.parse(parsed);
2872
+ const validated = IntentSchema.parse(parsed);
2406
2873
  return ok(validated);
2407
2874
  } catch (error) {
2408
2875
  const message = error instanceof Error ? error.message : "Unknown Ollama error";
@@ -2478,7 +2945,7 @@ function createCloudflareProvider(opts = {}) {
2478
2945
  });
2479
2946
  }
2480
2947
  const parsed = JSON.parse(content);
2481
- const validated = IntentSchema2.parse(parsed);
2948
+ const validated = IntentSchema.parse(parsed);
2482
2949
  return ok(validated);
2483
2950
  } catch (error) {
2484
2951
  const message = error instanceof Error ? error.message : "Unknown Cloudflare AI error";
@@ -2538,7 +3005,7 @@ function createMockProvider() {
2538
3005
  try {
2539
3006
  const raw = readFileSync2(filePath, "utf-8");
2540
3007
  const parsed = JSON.parse(raw);
2541
- const validated = IntentSchema2.parse(parsed);
3008
+ const validated = IntentSchema.parse(parsed);
2542
3009
  return ok(validated);
2543
3010
  } catch (error) {
2544
3011
  const message = error instanceof Error ? error.message : "Unknown parse error";
@@ -2862,11 +3329,11 @@ var createCommand = defineCommand({
2862
3329
  default: false
2863
3330
  }
2864
3331
  },
2865
- async run({ args }) {
3332
+ async run({ args: args2 }) {
2866
3333
  const allPalettes = loadAllPalettes();
2867
- const hasExplicitFlags = !!(args.render || args.deploy || args.blocks || args.database || args.css || args.locales || args.palette || args.recipe);
2868
- if (args.manual && !args.yes) {
2869
- const defaultProjectName = args.dir ? basename2(resolve(args.dir)) : "my-project";
3334
+ const hasExplicitFlags = !!(args2.render || args2.deploy || args2.blocks || args2.database || args2.css || args2.locales || args2.palette || args2.recipe);
3335
+ if (args2.manual && !args2.yes) {
3336
+ const defaultProjectName = args2.dir ? basename2(resolve(args2.dir)) : "my-project";
2870
3337
  const config = await runManualFlow({
2871
3338
  defaultProjectName,
2872
3339
  manifests: FIXTURE_MANIFESTS,
@@ -2876,20 +3343,20 @@ var createCommand = defineCommand({
2876
3343
  process.exitCode = 0;
2877
3344
  return;
2878
3345
  }
2879
- const projectDir = args.dir ? resolve(args.dir) : resolve(config.projectDir);
3346
+ const projectDir = args2.dir ? resolve(args2.dir) : resolve(config.projectDir);
2880
3347
  const finalConfig = { ...config, projectDir };
2881
- return runScaffold(finalConfig, allPalettes, args["dry-run"] ?? false, args.verbose ?? false, !(args.install ?? true), !(args.git ?? true));
3348
+ return runScaffold(finalConfig, allPalettes, args2["dry-run"] ?? false, args2.verbose ?? false, !(args2.install ?? true), !(args2.git ?? true));
2882
3349
  }
2883
- if (args.manual || hasExplicitFlags) {
2884
- return runFlagDrivenMode(args, allPalettes);
3350
+ if (args2.manual || hasExplicitFlags) {
3351
+ return runFlagDrivenMode(args2, allPalettes);
2885
3352
  }
2886
- return runAIMode(args, allPalettes);
3353
+ return runAIMode(args2, allPalettes);
2887
3354
  }
2888
3355
  });
2889
- async function runAIMode(args, allPalettes) {
2890
- const providerName = parseProviderName(args.provider);
2891
- if (args.provider && !providerName) {
2892
- console.error(pc3.red(`\u2716 Unknown provider: ${String(args.provider)}`));
3356
+ async function runAIMode(args2, allPalettes) {
3357
+ const providerName = parseProviderName(args2.provider);
3358
+ if (args2.provider && !providerName) {
3359
+ console.error(pc3.red(`\u2716 Unknown provider: ${String(args2.provider)}`));
2893
3360
  console.error(pc3.dim(` Available: ${VALID_PROVIDER_NAMES.join(", ")}`));
2894
3361
  process.exitCode = 1;
2895
3362
  return;
@@ -2904,7 +3371,7 @@ async function runAIMode(args, allPalettes) {
2904
3371
  return;
2905
3372
  }
2906
3373
  const provider = adaptProvider(legacyProvider);
2907
- const description = await getDescription(args);
3374
+ const description = await getDescription(args2);
2908
3375
  if (!description) {
2909
3376
  process.exitCode = 0;
2910
3377
  return;
@@ -2913,7 +3380,7 @@ async function runAIMode(args, allPalettes) {
2913
3380
  blocks: Object.values(FIXTURE_MANIFESTS),
2914
3381
  palettes: [...allPalettes]
2915
3382
  };
2916
- const projectDir = resolve(String(args.dir ?? "."));
3383
+ const projectDir = resolve(String(args2.dir ?? "."));
2917
3384
  const projectName = basename2(projectDir);
2918
3385
  const nameResult = validateProjectName(projectName);
2919
3386
  if (!nameResult.ok) {
@@ -2934,7 +3401,7 @@ async function runAIMode(args, allPalettes) {
2934
3401
  return;
2935
3402
  }
2936
3403
  const config = result.value;
2937
- if (!args.yes) {
3404
+ if (!args2.yes) {
2938
3405
  showAISummary(config);
2939
3406
  const confirmed = await p2.confirm({
2940
3407
  message: "Create this project?",
@@ -2949,14 +3416,14 @@ async function runAIMode(args, allPalettes) {
2949
3416
  return runScaffold(
2950
3417
  config,
2951
3418
  allPalettes,
2952
- (args["dry-run"] ?? false) === true,
2953
- (args.verbose ?? false) === true,
2954
- !((args.install ?? true) === true),
2955
- !((args.git ?? true) === true)
3419
+ (args2["dry-run"] ?? false) === true,
3420
+ (args2.verbose ?? false) === true,
3421
+ !((args2.install ?? true) === true),
3422
+ !((args2.git ?? true) === true)
2956
3423
  );
2957
3424
  }
2958
- function runFlagDrivenMode(args, allPalettes) {
2959
- const projectDir = resolve(String(args.dir ?? "."));
3425
+ function runFlagDrivenMode(args2, allPalettes) {
3426
+ const projectDir = resolve(String(args2.dir ?? "."));
2960
3427
  const projectName = basename2(projectDir);
2961
3428
  const nameResult = validateProjectName(projectName);
2962
3429
  if (!nameResult.ok) {
@@ -2964,7 +3431,7 @@ function runFlagDrivenMode(args, allPalettes) {
2964
3431
  process.exitCode = 1;
2965
3432
  return;
2966
3433
  }
2967
- const recipeName = args.recipe ? String(args.recipe) : void 0;
3434
+ const recipeName = args2.recipe ? String(args2.recipe) : void 0;
2968
3435
  let recipeOverlay = {};
2969
3436
  if (recipeName) {
2970
3437
  if (RECIPES[recipeName]) {
@@ -2977,11 +3444,11 @@ function runFlagDrivenMode(args, allPalettes) {
2977
3444
  return;
2978
3445
  }
2979
3446
  }
2980
- const renderMode = String(args.render ?? recipeOverlay.renderMode ?? "static");
2981
- const deployTarget = String(args.deploy ?? recipeOverlay.deployTarget ?? "cloudflare");
2982
- const database = String(args.database ?? recipeOverlay.database ?? "none");
2983
- const cssEngine = String(args.css ?? recipeOverlay.cssEngine ?? "tailwind");
2984
- const localesRaw = String(args.locales ?? "");
3447
+ const renderMode = String(args2.render ?? recipeOverlay.renderMode ?? "static");
3448
+ const deployTarget = String(args2.deploy ?? recipeOverlay.deployTarget ?? "cloudflare");
3449
+ const database = String(args2.database ?? recipeOverlay.database ?? "none");
3450
+ const cssEngine = String(args2.css ?? recipeOverlay.cssEngine ?? "tailwind");
3451
+ const localesRaw = String(args2.locales ?? "");
2985
3452
  let locales = ["en"];
2986
3453
  let defaultLocale = "en";
2987
3454
  if (localesRaw) {
@@ -2991,8 +3458,8 @@ function runFlagDrivenMode(args, allPalettes) {
2991
3458
  locales = [...recipeOverlay.locales];
2992
3459
  defaultLocale = recipeOverlay.defaultLocale ?? locales[0] ?? "en";
2993
3460
  }
2994
- const themeSwitcher = args["theme-switcher"] !== void 0 ? args["theme-switcher"] === true : recipeOverlay.themeSwitcher ?? false;
2995
- const blocksString = args.blocks ? String(args.blocks) : "";
3461
+ const themeSwitcher = args2["theme-switcher"] !== void 0 ? args2["theme-switcher"] === true : recipeOverlay.themeSwitcher ?? false;
3462
+ const blocksString = args2.blocks ? String(args2.blocks) : "";
2996
3463
  let blocks = recipeOverlay.blocks ? [...recipeOverlay.blocks] : [];
2997
3464
  if (blocksString) {
2998
3465
  const blockNames = blocksString.split(",").map((b) => b.trim()).filter(Boolean);
@@ -3006,8 +3473,8 @@ function runFlagDrivenMode(args, allPalettes) {
3006
3473
  }
3007
3474
  let paletteColors = recipeOverlay.palette ? { ...recipeOverlay.palette.colors } : { ...DEFAULT_COLORS };
3008
3475
  let palettePreset = recipeOverlay.palette?.preset;
3009
- if (args.palette) {
3010
- const paletteName = String(args.palette);
3476
+ if (args2.palette) {
3477
+ const paletteName = String(args2.palette);
3011
3478
  const found = allPalettes.find((palette) => palette.name === paletteName);
3012
3479
  if (found) {
3013
3480
  paletteColors = { ...found.colors };
@@ -3040,10 +3507,10 @@ function runFlagDrivenMode(args, allPalettes) {
3040
3507
  return runScaffold(
3041
3508
  config,
3042
3509
  allPalettes,
3043
- (args["dry-run"] ?? false) === true,
3044
- (args.verbose ?? false) === true,
3045
- !((args.install ?? true) === true),
3046
- !((args.git ?? true) === true)
3510
+ (args2["dry-run"] ?? false) === true,
3511
+ (args2.verbose ?? false) === true,
3512
+ !((args2.install ?? true) === true),
3513
+ !((args2.git ?? true) === true)
3047
3514
  );
3048
3515
  }
3049
3516
  function runScaffold(config, allPalettes, dryRun, verbose, skipInstall, skipGit) {
@@ -3125,9 +3592,9 @@ function parseProviderName(value) {
3125
3592
  }
3126
3593
  return void 0;
3127
3594
  }
3128
- async function getDescription(args) {
3129
- if (args.yes) {
3130
- return typeof args.description === "string" && args.description.length > 0 ? args.description : DEFAULT_AI_DESCRIPTION;
3595
+ async function getDescription(args2) {
3596
+ if (args2.yes) {
3597
+ return typeof args2.description === "string" && args2.description.length > 0 ? args2.description : DEFAULT_AI_DESCRIPTION;
3131
3598
  }
3132
3599
  p2.intro(pc3.bgCyan(pc3.black(" Fornix \u2014 AI Mode ")));
3133
3600
  const input = await p2.text({
@@ -3206,8 +3673,8 @@ var addCommand = defineCommand2({
3206
3673
  default: false
3207
3674
  }
3208
3675
  },
3209
- run({ args }) {
3210
- const typedArgs = args;
3676
+ run({ args: args2 }) {
3677
+ const typedArgs = args2;
3211
3678
  const cwd = process.cwd();
3212
3679
  const manifestPath = join5(cwd, "fornix.json");
3213
3680
  if (!existsSync2(manifestPath)) {
@@ -3375,8 +3842,8 @@ var removeCommand = defineCommand3({
3375
3842
  default: false
3376
3843
  }
3377
3844
  },
3378
- run({ args }) {
3379
- const typedArgs = args;
3845
+ run({ args: args2 }) {
3846
+ const typedArgs = args2;
3380
3847
  const cwd = process.cwd();
3381
3848
  const manifestPath = join6(cwd, "fornix.json");
3382
3849
  if (!existsSync3(manifestPath)) {
@@ -3503,8 +3970,8 @@ var listCommand = defineCommand4({
3503
3970
  default: false
3504
3971
  }
3505
3972
  },
3506
- run({ args }) {
3507
- const typedArgs = args;
3973
+ run({ args: args2 }) {
3974
+ const typedArgs = args2;
3508
3975
  const blocks = getFilteredBlocks(typedArgs);
3509
3976
  if (blocks.length === 0) {
3510
3977
  console.log(pc6.yellow("No blocks found matching your filters."));
@@ -3517,14 +3984,14 @@ var listCommand = defineCommand4({
3517
3984
  }
3518
3985
  }
3519
3986
  });
3520
- function getFilteredBlocks(args) {
3987
+ function getFilteredBlocks(args2) {
3521
3988
  let blocks = Object.values(FIXTURE_MANIFESTS);
3522
- if (args.type) {
3523
- const filterType = args.type.toLowerCase();
3989
+ if (args2.type) {
3990
+ const filterType = args2.type.toLowerCase();
3524
3991
  blocks = blocks.filter((b) => b.type === filterType);
3525
3992
  }
3526
- if (args.category) {
3527
- const filterCategory = args.category.toLowerCase();
3993
+ if (args2.category) {
3994
+ const filterCategory = args2.category.toLowerCase();
3528
3995
  blocks = blocks.filter((b) => b.category === filterCategory);
3529
3996
  }
3530
3997
  return blocks.sort((a, b) => a.name.localeCompare(b.name));
@@ -3618,8 +4085,8 @@ var statusCommand = defineCommand5({
3618
4085
  default: false
3619
4086
  }
3620
4087
  },
3621
- run({ args }) {
3622
- const typedArgs = args;
4088
+ run({ args: args2 }) {
4089
+ const typedArgs = args2;
3623
4090
  const cwd = process.cwd();
3624
4091
  const manifestPath = join7(cwd, "fornix.json");
3625
4092
  if (!existsSync4(manifestPath)) {
@@ -3730,7 +4197,7 @@ var doctorCommand = defineCommand6({
3730
4197
  default: false
3731
4198
  }
3732
4199
  },
3733
- run({ args }) {
4200
+ run({ args: args2 }) {
3734
4201
  const cwd = process.cwd();
3735
4202
  const manifestPath = join8(cwd, "fornix.json");
3736
4203
  let hasErrors = false;
@@ -3738,13 +4205,13 @@ var doctorCommand = defineCommand6({
3738
4205
  function reportError(msg) {
3739
4206
  hasErrors = true;
3740
4207
  errors.push(msg);
3741
- if (!args.json) {
4208
+ if (!args2.json) {
3742
4209
  console.error(pc8.red(`\u2717 ${msg}`));
3743
4210
  }
3744
4211
  }
3745
4212
  if (!existsSync5(manifestPath)) {
3746
4213
  reportError("No fornix.json found in the current directory.");
3747
- if (args.json) {
4214
+ if (args2.json) {
3748
4215
  console.log(JSON.stringify({ healthy: false, errors }));
3749
4216
  }
3750
4217
  process.exit(1);
@@ -3755,7 +4222,7 @@ var doctorCommand = defineCommand6({
3755
4222
  manifest2 = JSON.parse(raw);
3756
4223
  } catch {
3757
4224
  reportError("Failed to parse fornix.json.");
3758
- if (args.json) {
4225
+ if (args2.json) {
3759
4226
  console.log(JSON.stringify({ healthy: false, errors }));
3760
4227
  }
3761
4228
  process.exit(1);
@@ -3816,7 +4283,7 @@ var doctorCommand = defineCommand6({
3816
4283
  reportError(`Broken content reference: missing ${missing}`);
3817
4284
  }
3818
4285
  if (hasErrors) {
3819
- if (args.json) {
4286
+ if (args2.json) {
3820
4287
  console.log(JSON.stringify({ healthy: false, errors }));
3821
4288
  } else {
3822
4289
  console.log();
@@ -3824,7 +4291,7 @@ var doctorCommand = defineCommand6({
3824
4291
  }
3825
4292
  process.exit(1);
3826
4293
  } else {
3827
- if (args.json) {
4294
+ if (args2.json) {
3828
4295
  console.log(JSON.stringify({ healthy: true, errors: [] }));
3829
4296
  } else {
3830
4297
  console.log(pc8.green("\u2713 Project is healthy!"));
@@ -4090,7 +4557,7 @@ function getContentSchema(input) {
4090
4557
  }
4091
4558
 
4092
4559
  // src/mcp/tools/validate-content.ts
4093
- import { z as z4 } from "zod";
4560
+ import { z as z5 } from "zod";
4094
4561
  function validateContent(input) {
4095
4562
  const { collection, data } = input;
4096
4563
  const manifest2 = FIXTURE_MANIFESTS[collection];
@@ -4113,7 +4580,7 @@ function validateContent(input) {
4113
4580
  for (const [slotName, slot] of Object.entries(contentSlots)) {
4114
4581
  schemaShape[slotName] = zodTypeForSlot2(slot.type);
4115
4582
  }
4116
- const schema = z4.object(schemaShape);
4583
+ const schema = z5.object(schemaShape);
4117
4584
  const parseResult = schema.safeParse(data);
4118
4585
  if (parseResult.success) {
4119
4586
  return ok({ valid: true, errors: [] });
@@ -4126,17 +4593,17 @@ function validateContent(input) {
4126
4593
  function zodTypeForSlot2(slotType) {
4127
4594
  switch (slotType) {
4128
4595
  case "string":
4129
- return z4.string();
4596
+ return z5.string();
4130
4597
  case "number":
4131
- return z4.number();
4598
+ return z5.number();
4132
4599
  case "boolean":
4133
- return z4.boolean();
4600
+ return z5.boolean();
4134
4601
  case "array":
4135
- return z4.array(z4.unknown());
4602
+ return z5.array(z5.unknown());
4136
4603
  case "object":
4137
- return z4.record(z4.unknown());
4604
+ return z5.record(z5.unknown());
4138
4605
  default:
4139
- return z4.unknown();
4606
+ return z5.unknown();
4140
4607
  }
4141
4608
  }
4142
4609
 
@@ -4387,8 +4854,8 @@ var FornixMCPServer = class {
4387
4854
  CallToolRequestSchema,
4388
4855
  async (request) => {
4389
4856
  const toolName = request.params.name;
4390
- const args = request.params.arguments ?? {};
4391
- const result = await this.executeTool(toolName, args);
4857
+ const args2 = request.params.arguments ?? {};
4858
+ const result = await this.executeTool(toolName, args2);
4392
4859
  if (!result.ok) {
4393
4860
  return {
4394
4861
  content: [
@@ -4461,49 +4928,49 @@ var FornixMCPServer = class {
4461
4928
  * Execute a tool by name with the given arguments.
4462
4929
  * Exposed as a public method for testing without MCP transport.
4463
4930
  */
4464
- async callTool(toolName, args) {
4465
- return this.executeTool(toolName, args);
4931
+ async callTool(toolName, args2) {
4932
+ return this.executeTool(toolName, args2);
4466
4933
  }
4467
- async executeTool(toolName, args) {
4934
+ async executeTool(toolName, args2) {
4468
4935
  switch (toolName) {
4469
4936
  case "list_blocks": {
4470
4937
  const result = listBlocks({
4471
- type: args.type,
4472
- category: args.category,
4473
- search: args.search
4938
+ type: args2.type,
4939
+ category: args2.category,
4940
+ search: args2.search
4474
4941
  });
4475
4942
  if (!result.ok) return err(result.error);
4476
4943
  return ok(JSON.stringify(result.value, null, 2));
4477
4944
  }
4478
4945
  case "add_block": {
4479
4946
  const result = addBlock2({
4480
- name: args.name,
4481
- variant: args.variant,
4482
- projectDirectory: args.projectDirectory
4947
+ name: args2.name,
4948
+ variant: args2.variant,
4949
+ projectDirectory: args2.projectDirectory
4483
4950
  });
4484
4951
  if (!result.ok) return err(result.error);
4485
4952
  return ok(JSON.stringify(result.value, null, 2));
4486
4953
  }
4487
4954
  case "remove_block": {
4488
4955
  const result = removeBlock({
4489
- name: args.name,
4490
- force: args.force,
4491
- projectDirectory: args.projectDirectory
4956
+ name: args2.name,
4957
+ force: args2.force,
4958
+ projectDirectory: args2.projectDirectory
4492
4959
  });
4493
4960
  if (!result.ok) return err(result.error);
4494
4961
  return ok(JSON.stringify(result.value, null, 2));
4495
4962
  }
4496
4963
  case "get_content_schema": {
4497
4964
  const result = getContentSchema({
4498
- collection: args.collection
4965
+ collection: args2.collection
4499
4966
  });
4500
4967
  if (!result.ok) return err(result.error);
4501
4968
  return ok(JSON.stringify(result.value, null, 2));
4502
4969
  }
4503
4970
  case "update_content": {
4504
4971
  const validationResult = validateContent({
4505
- collection: args.collection,
4506
- data: args.data
4972
+ collection: args2.collection,
4973
+ data: args2.data
4507
4974
  });
4508
4975
  if (!validationResult.ok) return err(validationResult.error);
4509
4976
  if (!validationResult.value.valid) {
@@ -4517,34 +4984,34 @@ var FornixMCPServer = class {
4517
4984
  return ok(
4518
4985
  JSON.stringify({
4519
4986
  updated: true,
4520
- collection: args.collection,
4521
- data: args.data
4987
+ collection: args2.collection,
4988
+ data: args2.data
4522
4989
  })
4523
4990
  );
4524
4991
  }
4525
4992
  case "validate_content": {
4526
4993
  const result = validateContent({
4527
- collection: args.collection,
4528
- data: args.data
4994
+ collection: args2.collection,
4995
+ data: args2.data
4529
4996
  });
4530
4997
  if (!result.ok) return err(result.error);
4531
4998
  return ok(JSON.stringify(result.value, null, 2));
4532
4999
  }
4533
5000
  case "get_project_status": {
4534
5001
  const result = getProjectStatus({
4535
- projectDirectory: args.projectDirectory
5002
+ projectDirectory: args2.projectDirectory
4536
5003
  });
4537
5004
  if (!result.ok) return err(result.error);
4538
5005
  return ok(JSON.stringify(result.value, null, 2));
4539
5006
  }
4540
5007
  case "scaffold_project": {
4541
5008
  const result = scaffoldProject({
4542
- description: args.description,
4543
- projectDirectory: args.projectDirectory,
4544
- renderMode: args.renderMode,
4545
- deployTarget: args.deployTarget,
4546
- blocks: args.blocks,
4547
- locales: args.locales
5009
+ description: args2.description,
5010
+ projectDirectory: args2.projectDirectory,
5011
+ renderMode: args2.renderMode,
5012
+ deployTarget: args2.deployTarget,
5013
+ blocks: args2.blocks,
5014
+ locales: args2.locales
4548
5015
  });
4549
5016
  if (!result.ok) return err(result.error);
4550
5017
  return ok(JSON.stringify(result.value, null, 2));
@@ -4609,8 +5076,12 @@ var main = defineCommand8({
4609
5076
 
4610
5077
  // src/index.ts
4611
5078
  var KNOWN_COMMANDS = /* @__PURE__ */ new Set(["create", "add", "remove", "list", "status", "doctor", "mcp"]);
4612
- var firstArg = process.argv[2];
4613
- if (firstArg && !firstArg.startsWith("-") && !KNOWN_COMMANDS.has(firstArg)) {
5079
+ var HELP_FLAGS = /* @__PURE__ */ new Set(["--help", "-h", "--version", "-V"]);
5080
+ var args = process.argv.slice(2);
5081
+ var hasKnownCommand = args.some((arg) => KNOWN_COMMANDS.has(arg));
5082
+ var isHelpOrVersion = args.some((arg) => HELP_FLAGS.has(arg));
5083
+ var hasArgs = args.length > 0;
5084
+ if (hasArgs && !hasKnownCommand && !isHelpOrVersion) {
4614
5085
  process.argv.splice(2, 0, "create");
4615
5086
  }
4616
5087
  runMain(main);