faf-cli 5.1.0 → 6.0.0

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 (731) hide show
  1. package/README.md +80 -52
  2. package/dist/cli.js +313 -1884
  3. package/dist/index.js +4 -46
  4. package/package.json +29 -104
  5. package/project.faf +33 -141
  6. package/assets/project-faf-screenshot.png +0 -0
  7. package/dist/big-orange/bigo-push.d.ts +0 -18
  8. package/dist/big-orange/bigo-push.d.ts.map +0 -1
  9. package/dist/big-orange/bigo-push.js +0 -88
  10. package/dist/big-orange/bigo-push.js.map +0 -1
  11. package/dist/big-orange/compare.d.ts +0 -11
  12. package/dist/big-orange/compare.d.ts.map +0 -1
  13. package/dist/big-orange/compare.js +0 -179
  14. package/dist/big-orange/compare.js.map +0 -1
  15. package/dist/big-orange/faf-generator.d.ts +0 -22
  16. package/dist/big-orange/faf-generator.d.ts.map +0 -1
  17. package/dist/big-orange/faf-generator.js +0 -215
  18. package/dist/big-orange/faf-generator.js.map +0 -1
  19. package/dist/big-orange/index.d.ts +0 -7
  20. package/dist/big-orange/index.d.ts.map +0 -1
  21. package/dist/big-orange/index.js +0 -96
  22. package/dist/big-orange/index.js.map +0 -1
  23. package/dist/big-orange/types.d.ts +0 -62
  24. package/dist/big-orange/types.d.ts.map +0 -1
  25. package/dist/big-orange/types.js +0 -7
  26. package/dist/big-orange/types.js.map +0 -1
  27. package/dist/cli.d.ts +0 -8
  28. package/dist/cli.d.ts.map +0 -1
  29. package/dist/cli.js.map +0 -1
  30. package/dist/commands/agents.d.ts +0 -14
  31. package/dist/commands/agents.d.ts.map +0 -1
  32. package/dist/commands/agents.js +0 -353
  33. package/dist/commands/agents.js.map +0 -1
  34. package/dist/commands/ai-analyze.d.ts +0 -18
  35. package/dist/commands/ai-analyze.d.ts.map +0 -1
  36. package/dist/commands/ai-analyze.js +0 -190
  37. package/dist/commands/ai-analyze.js.map +0 -1
  38. package/dist/commands/ai-enhance.d.ts +0 -17
  39. package/dist/commands/ai-enhance.d.ts.map +0 -1
  40. package/dist/commands/ai-enhance.js +0 -275
  41. package/dist/commands/ai-enhance.js.map +0 -1
  42. package/dist/commands/antigravity.d.ts +0 -16
  43. package/dist/commands/antigravity.d.ts.map +0 -1
  44. package/dist/commands/antigravity.js +0 -398
  45. package/dist/commands/antigravity.js.map +0 -1
  46. package/dist/commands/audit.d.ts +0 -11
  47. package/dist/commands/audit.d.ts.map +0 -1
  48. package/dist/commands/audit.js +0 -148
  49. package/dist/commands/audit.js.map +0 -1
  50. package/dist/commands/auto.d.ts +0 -27
  51. package/dist/commands/auto.d.ts.map +0 -1
  52. package/dist/commands/auto.js +0 -498
  53. package/dist/commands/auto.js.map +0 -1
  54. package/dist/commands/bi-sync.d.ts +0 -50
  55. package/dist/commands/bi-sync.d.ts.map +0 -1
  56. package/dist/commands/bi-sync.js +0 -307
  57. package/dist/commands/bi-sync.js.map +0 -1
  58. package/dist/commands/chat.d.ts +0 -7
  59. package/dist/commands/chat.d.ts.map +0 -1
  60. package/dist/commands/chat.js +0 -415
  61. package/dist/commands/chat.js.map +0 -1
  62. package/dist/commands/check.d.ts +0 -31
  63. package/dist/commands/check.d.ts.map +0 -1
  64. package/dist/commands/check.js +0 -301
  65. package/dist/commands/check.js.map +0 -1
  66. package/dist/commands/clear.d.ts +0 -15
  67. package/dist/commands/clear.d.ts.map +0 -1
  68. package/dist/commands/clear.js +0 -167
  69. package/dist/commands/clear.js.map +0 -1
  70. package/dist/commands/compile.d.ts +0 -12
  71. package/dist/commands/compile.d.ts.map +0 -1
  72. package/dist/commands/compile.js +0 -51
  73. package/dist/commands/compile.js.map +0 -1
  74. package/dist/commands/conductor.d.ts +0 -15
  75. package/dist/commands/conductor.d.ts.map +0 -1
  76. package/dist/commands/conductor.js +0 -339
  77. package/dist/commands/conductor.js.map +0 -1
  78. package/dist/commands/convert.d.ts +0 -19
  79. package/dist/commands/convert.d.ts.map +0 -1
  80. package/dist/commands/convert.js +0 -99
  81. package/dist/commands/convert.js.map +0 -1
  82. package/dist/commands/credit.d.ts +0 -13
  83. package/dist/commands/credit.d.ts.map +0 -1
  84. package/dist/commands/credit.js +0 -149
  85. package/dist/commands/credit.js.map +0 -1
  86. package/dist/commands/cursor.d.ts +0 -13
  87. package/dist/commands/cursor.d.ts.map +0 -1
  88. package/dist/commands/cursor.js +0 -310
  89. package/dist/commands/cursor.js.map +0 -1
  90. package/dist/commands/decompile.d.ts +0 -9
  91. package/dist/commands/decompile.d.ts.map +0 -1
  92. package/dist/commands/decompile.js +0 -21
  93. package/dist/commands/decompile.js.map +0 -1
  94. package/dist/commands/demo.d.ts +0 -20
  95. package/dist/commands/demo.d.ts.map +0 -1
  96. package/dist/commands/demo.js +0 -205
  97. package/dist/commands/demo.js.map +0 -1
  98. package/dist/commands/doctor.d.ts +0 -6
  99. package/dist/commands/doctor.d.ts.map +0 -1
  100. package/dist/commands/doctor.js +0 -230
  101. package/dist/commands/doctor.js.map +0 -1
  102. package/dist/commands/drift.d.ts +0 -16
  103. package/dist/commands/drift.d.ts.map +0 -1
  104. package/dist/commands/drift.js +0 -524
  105. package/dist/commands/drift.js.map +0 -1
  106. package/dist/commands/edit-helper.d.ts +0 -6
  107. package/dist/commands/edit-helper.d.ts.map +0 -1
  108. package/dist/commands/edit-helper.js +0 -52
  109. package/dist/commands/edit-helper.js.map +0 -1
  110. package/dist/commands/edit.d.ts +0 -14
  111. package/dist/commands/edit.d.ts.map +0 -1
  112. package/dist/commands/edit.js +0 -196
  113. package/dist/commands/edit.js.map +0 -1
  114. package/dist/commands/enhance-real.d.ts +0 -18
  115. package/dist/commands/enhance-real.d.ts.map +0 -1
  116. package/dist/commands/enhance-real.js +0 -1164
  117. package/dist/commands/enhance-real.js.map +0 -1
  118. package/dist/commands/faf-auth.d.ts +0 -10
  119. package/dist/commands/faf-auth.d.ts.map +0 -1
  120. package/dist/commands/faf-auth.js +0 -162
  121. package/dist/commands/faf-auth.js.map +0 -1
  122. package/dist/commands/faf-dna.d.ts +0 -9
  123. package/dist/commands/faf-dna.d.ts.map +0 -1
  124. package/dist/commands/faf-dna.js +0 -141
  125. package/dist/commands/faf-dna.js.map +0 -1
  126. package/dist/commands/faf-log.d.ts +0 -9
  127. package/dist/commands/faf-log.d.ts.map +0 -1
  128. package/dist/commands/faf-log.js +0 -135
  129. package/dist/commands/faf-log.js.map +0 -1
  130. package/dist/commands/faf-recover.d.ts +0 -3
  131. package/dist/commands/faf-recover.d.ts.map +0 -1
  132. package/dist/commands/faf-recover.js +0 -296
  133. package/dist/commands/faf-recover.js.map +0 -1
  134. package/dist/commands/faf-update.d.ts +0 -9
  135. package/dist/commands/faf-update.d.ts.map +0 -1
  136. package/dist/commands/faf-update.js +0 -68
  137. package/dist/commands/faf-update.js.map +0 -1
  138. package/dist/commands/fam.d.ts +0 -15
  139. package/dist/commands/fam.d.ts.map +0 -1
  140. package/dist/commands/fam.js +0 -339
  141. package/dist/commands/fam.js.map +0 -1
  142. package/dist/commands/faq.d.ts +0 -12
  143. package/dist/commands/faq.d.ts.map +0 -1
  144. package/dist/commands/faq.js +0 -84
  145. package/dist/commands/faq.js.map +0 -1
  146. package/dist/commands/formats.d.ts +0 -12
  147. package/dist/commands/formats.d.ts.map +0 -1
  148. package/dist/commands/formats.js +0 -107
  149. package/dist/commands/formats.js.map +0 -1
  150. package/dist/commands/gemini.d.ts +0 -15
  151. package/dist/commands/gemini.d.ts.map +0 -1
  152. package/dist/commands/gemini.js +0 -357
  153. package/dist/commands/gemini.js.map +0 -1
  154. package/dist/commands/git.d.ts +0 -25
  155. package/dist/commands/git.d.ts.map +0 -1
  156. package/dist/commands/git.js +0 -365
  157. package/dist/commands/git.js.map +0 -1
  158. package/dist/commands/go.d.ts +0 -23
  159. package/dist/commands/go.d.ts.map +0 -1
  160. package/dist/commands/go.js +0 -283
  161. package/dist/commands/go.js.map +0 -1
  162. package/dist/commands/human.d.ts +0 -19
  163. package/dist/commands/human.d.ts.map +0 -1
  164. package/dist/commands/human.js +0 -204
  165. package/dist/commands/human.js.map +0 -1
  166. package/dist/commands/index.d.ts +0 -26
  167. package/dist/commands/index.d.ts.map +0 -1
  168. package/dist/commands/index.js +0 -438
  169. package/dist/commands/index.js.map +0 -1
  170. package/dist/commands/init.d.ts +0 -19
  171. package/dist/commands/init.d.ts.map +0 -1
  172. package/dist/commands/init.js +0 -409
  173. package/dist/commands/init.js.map +0 -1
  174. package/dist/commands/lint.d.ts +0 -11
  175. package/dist/commands/lint.d.ts.map +0 -1
  176. package/dist/commands/lint.js +0 -233
  177. package/dist/commands/lint.js.map +0 -1
  178. package/dist/commands/memory.d.ts +0 -14
  179. package/dist/commands/memory.d.ts.map +0 -1
  180. package/dist/commands/memory.js +0 -293
  181. package/dist/commands/memory.js.map +0 -1
  182. package/dist/commands/migrate.d.ts +0 -11
  183. package/dist/commands/migrate.d.ts.map +0 -1
  184. package/dist/commands/migrate.js +0 -85
  185. package/dist/commands/migrate.js.map +0 -1
  186. package/dist/commands/notifications.d.ts +0 -12
  187. package/dist/commands/notifications.d.ts.map +0 -1
  188. package/dist/commands/notifications.js +0 -35
  189. package/dist/commands/notifications.js.map +0 -1
  190. package/dist/commands/plugin-install.d.ts +0 -20
  191. package/dist/commands/plugin-install.d.ts.map +0 -1
  192. package/dist/commands/plugin-install.js +0 -183
  193. package/dist/commands/plugin-install.js.map +0 -1
  194. package/dist/commands/pro.d.ts +0 -10
  195. package/dist/commands/pro.d.ts.map +0 -1
  196. package/dist/commands/pro.js +0 -113
  197. package/dist/commands/pro.js.map +0 -1
  198. package/dist/commands/quick.d.ts +0 -10
  199. package/dist/commands/quick.d.ts.map +0 -1
  200. package/dist/commands/quick.js +0 -207
  201. package/dist/commands/quick.js.map +0 -1
  202. package/dist/commands/ram.d.ts +0 -17
  203. package/dist/commands/ram.d.ts.map +0 -1
  204. package/dist/commands/ram.js +0 -322
  205. package/dist/commands/ram.js.map +0 -1
  206. package/dist/commands/readme.d.ts +0 -21
  207. package/dist/commands/readme.d.ts.map +0 -1
  208. package/dist/commands/readme.js +0 -519
  209. package/dist/commands/readme.js.map +0 -1
  210. package/dist/commands/rename.d.ts +0 -18
  211. package/dist/commands/rename.d.ts.map +0 -1
  212. package/dist/commands/rename.js +0 -212
  213. package/dist/commands/rename.js.map +0 -1
  214. package/dist/commands/score-v3.d.ts +0 -15
  215. package/dist/commands/score-v3.d.ts.map +0 -1
  216. package/dist/commands/score-v3.js +0 -224
  217. package/dist/commands/score-v3.js.map +0 -1
  218. package/dist/commands/score.d.ts +0 -16
  219. package/dist/commands/score.d.ts.map +0 -1
  220. package/dist/commands/score.js +0 -19
  221. package/dist/commands/score.js.map +0 -1
  222. package/dist/commands/search.d.ts +0 -16
  223. package/dist/commands/search.d.ts.map +0 -1
  224. package/dist/commands/search.js +0 -174
  225. package/dist/commands/search.js.map +0 -1
  226. package/dist/commands/share.d.ts +0 -17
  227. package/dist/commands/share.d.ts.map +0 -1
  228. package/dist/commands/share.js +0 -261
  229. package/dist/commands/share.js.map +0 -1
  230. package/dist/commands/show.d.ts +0 -10
  231. package/dist/commands/show.d.ts.map +0 -1
  232. package/dist/commands/show.js +0 -142
  233. package/dist/commands/show.js.map +0 -1
  234. package/dist/commands/sixws.d.ts +0 -6
  235. package/dist/commands/sixws.d.ts.map +0 -1
  236. package/dist/commands/sixws.js +0 -154
  237. package/dist/commands/sixws.js.map +0 -1
  238. package/dist/commands/skills.d.ts +0 -8
  239. package/dist/commands/skills.d.ts.map +0 -1
  240. package/dist/commands/skills.js +0 -43
  241. package/dist/commands/skills.js.map +0 -1
  242. package/dist/commands/stacks.d.ts +0 -51
  243. package/dist/commands/stacks.d.ts.map +0 -1
  244. package/dist/commands/stacks.js +0 -180
  245. package/dist/commands/stacks.js.map +0 -1
  246. package/dist/commands/status.d.ts +0 -14
  247. package/dist/commands/status.d.ts.map +0 -1
  248. package/dist/commands/status.js +0 -210
  249. package/dist/commands/status.js.map +0 -1
  250. package/dist/commands/sync.d.ts +0 -11
  251. package/dist/commands/sync.d.ts.map +0 -1
  252. package/dist/commands/sync.js +0 -543
  253. package/dist/commands/sync.js.map +0 -1
  254. package/dist/commands/taf-init.d.ts +0 -14
  255. package/dist/commands/taf-init.d.ts.map +0 -1
  256. package/dist/commands/taf-init.js +0 -138
  257. package/dist/commands/taf-init.js.map +0 -1
  258. package/dist/commands/taf-log.d.ts +0 -31
  259. package/dist/commands/taf-log.d.ts.map +0 -1
  260. package/dist/commands/taf-log.js +0 -351
  261. package/dist/commands/taf-log.js.map +0 -1
  262. package/dist/commands/taf-stars.d.ts +0 -8
  263. package/dist/commands/taf-stars.d.ts.map +0 -1
  264. package/dist/commands/taf-stars.js +0 -105
  265. package/dist/commands/taf-stars.js.map +0 -1
  266. package/dist/commands/taf-stats.d.ts +0 -8
  267. package/dist/commands/taf-stats.d.ts.map +0 -1
  268. package/dist/commands/taf-stats.js +0 -133
  269. package/dist/commands/taf-stats.js.map +0 -1
  270. package/dist/commands/taf-validate.d.ts +0 -8
  271. package/dist/commands/taf-validate.d.ts.map +0 -1
  272. package/dist/commands/taf-validate.js +0 -108
  273. package/dist/commands/taf-validate.js.map +0 -1
  274. package/dist/commands/taf.d.ts +0 -14
  275. package/dist/commands/taf.d.ts.map +0 -1
  276. package/dist/commands/taf.js +0 -106
  277. package/dist/commands/taf.js.map +0 -1
  278. package/dist/commands/todo.d.ts +0 -14
  279. package/dist/commands/todo.d.ts.map +0 -1
  280. package/dist/commands/todo.js +0 -282
  281. package/dist/commands/todo.js.map +0 -1
  282. package/dist/commands/trust.d.ts +0 -33
  283. package/dist/commands/trust.d.ts.map +0 -1
  284. package/dist/commands/trust.js +0 -308
  285. package/dist/commands/trust.js.map +0 -1
  286. package/dist/commands/tsa.d.ts +0 -9
  287. package/dist/commands/tsa.d.ts.map +0 -1
  288. package/dist/commands/tsa.js +0 -60
  289. package/dist/commands/tsa.js.map +0 -1
  290. package/dist/commands/validate.d.ts +0 -11
  291. package/dist/commands/validate.d.ts.map +0 -1
  292. package/dist/commands/validate.js +0 -64
  293. package/dist/commands/validate.js.map +0 -1
  294. package/dist/commands/verify.d.ts +0 -36
  295. package/dist/commands/verify.d.ts.map +0 -1
  296. package/dist/commands/verify.js +0 -194
  297. package/dist/commands/verify.js.map +0 -1
  298. package/dist/commands/version.d.ts +0 -5
  299. package/dist/commands/version.d.ts.map +0 -1
  300. package/dist/commands/version.js +0 -29
  301. package/dist/commands/version.js.map +0 -1
  302. package/dist/commands/vibe.d.ts +0 -7
  303. package/dist/commands/vibe.d.ts.map +0 -1
  304. package/dist/commands/vibe.js +0 -73
  305. package/dist/commands/vibe.js.map +0 -1
  306. package/dist/commands/welcome.d.ts +0 -10
  307. package/dist/commands/welcome.d.ts.map +0 -1
  308. package/dist/commands/welcome.js +0 -117
  309. package/dist/commands/welcome.js.map +0 -1
  310. package/dist/commands/yolo.d.ts +0 -12
  311. package/dist/commands/yolo.d.ts.map +0 -1
  312. package/dist/commands/yolo.js +0 -212
  313. package/dist/commands/yolo.js.map +0 -1
  314. package/dist/compiler/faf-compiler.d.ts +0 -176
  315. package/dist/compiler/faf-compiler.d.ts.map +0 -1
  316. package/dist/compiler/faf-compiler.js +0 -1587
  317. package/dist/compiler/faf-compiler.js.map +0 -1
  318. package/dist/converters/faf-converters.d.ts +0 -43
  319. package/dist/converters/faf-converters.d.ts.map +0 -1
  320. package/dist/converters/faf-converters.js +0 -197
  321. package/dist/converters/faf-converters.js.map +0 -1
  322. package/dist/core-extraction-fixes.d.ts +0 -92
  323. package/dist/core-extraction-fixes.d.ts.map +0 -1
  324. package/dist/core-extraction-fixes.js +0 -265
  325. package/dist/core-extraction-fixes.js.map +0 -1
  326. package/dist/engines/art-ansi-renderer.d.ts +0 -335
  327. package/dist/engines/art-ansi-renderer.d.ts.map +0 -1
  328. package/dist/engines/art-ansi-renderer.js +0 -290
  329. package/dist/engines/art-ansi-renderer.js.map +0 -1
  330. package/dist/engines/c-mirror/broadcast/terminal-display.d.ts +0 -23
  331. package/dist/engines/c-mirror/broadcast/terminal-display.d.ts.map +0 -1
  332. package/dist/engines/c-mirror/broadcast/terminal-display.js +0 -194
  333. package/dist/engines/c-mirror/broadcast/terminal-display.js.map +0 -1
  334. package/dist/engines/c-mirror/core/claude-to-faf.d.ts +0 -28
  335. package/dist/engines/c-mirror/core/claude-to-faf.d.ts.map +0 -1
  336. package/dist/engines/c-mirror/core/claude-to-faf.js +0 -195
  337. package/dist/engines/c-mirror/core/claude-to-faf.js.map +0 -1
  338. package/dist/engines/c-mirror/core/events/event-emitter.d.ts +0 -36
  339. package/dist/engines/c-mirror/core/events/event-emitter.d.ts.map +0 -1
  340. package/dist/engines/c-mirror/core/events/event-emitter.js +0 -77
  341. package/dist/engines/c-mirror/core/events/event-emitter.js.map +0 -1
  342. package/dist/engines/c-mirror/core/events/mirror-events.d.ts +0 -103
  343. package/dist/engines/c-mirror/core/events/mirror-events.d.ts.map +0 -1
  344. package/dist/engines/c-mirror/core/events/mirror-events.js +0 -65
  345. package/dist/engines/c-mirror/core/events/mirror-events.js.map +0 -1
  346. package/dist/engines/c-mirror/core/faf-to-claude.d.ts +0 -18
  347. package/dist/engines/c-mirror/core/faf-to-claude.d.ts.map +0 -1
  348. package/dist/engines/c-mirror/core/faf-to-claude.js +0 -162
  349. package/dist/engines/c-mirror/core/faf-to-claude.js.map +0 -1
  350. package/dist/engines/c-mirror/core/interfaces.d.ts +0 -153
  351. package/dist/engines/c-mirror/core/interfaces.d.ts.map +0 -1
  352. package/dist/engines/c-mirror/core/interfaces.js +0 -8
  353. package/dist/engines/c-mirror/core/interfaces.js.map +0 -1
  354. package/dist/engines/c-mirror/core/mirror-engine.d.ts +0 -49
  355. package/dist/engines/c-mirror/core/mirror-engine.d.ts.map +0 -1
  356. package/dist/engines/c-mirror/core/mirror-engine.js +0 -315
  357. package/dist/engines/c-mirror/core/mirror-engine.js.map +0 -1
  358. package/dist/engines/c-mirror/faf-extensions/faf-mirror.d.ts +0 -33
  359. package/dist/engines/c-mirror/faf-extensions/faf-mirror.d.ts.map +0 -1
  360. package/dist/engines/c-mirror/faf-extensions/faf-mirror.js +0 -115
  361. package/dist/engines/c-mirror/faf-extensions/faf-mirror.js.map +0 -1
  362. package/dist/engines/c-mirror/strategies/atomic-write.d.ts +0 -34
  363. package/dist/engines/c-mirror/strategies/atomic-write.d.ts.map +0 -1
  364. package/dist/engines/c-mirror/strategies/atomic-write.js +0 -132
  365. package/dist/engines/c-mirror/strategies/atomic-write.js.map +0 -1
  366. package/dist/engines/claude-todo-engine.d.ts +0 -115
  367. package/dist/engines/claude-todo-engine.d.ts.map +0 -1
  368. package/dist/engines/claude-todo-engine.js +0 -346
  369. package/dist/engines/claude-todo-engine.js.map +0 -1
  370. package/dist/engines/dependency-tsa.d.ts +0 -89
  371. package/dist/engines/dependency-tsa.d.ts.map +0 -1
  372. package/dist/engines/dependency-tsa.js +0 -365
  373. package/dist/engines/dependency-tsa.js.map +0 -1
  374. package/dist/engines/drop-coach.d.ts +0 -64
  375. package/dist/engines/drop-coach.d.ts.map +0 -1
  376. package/dist/engines/drop-coach.js +0 -222
  377. package/dist/engines/drop-coach.js.map +0 -1
  378. package/dist/engines/execution-context.d.ts +0 -75
  379. package/dist/engines/execution-context.d.ts.map +0 -1
  380. package/dist/engines/execution-context.js +0 -308
  381. package/dist/engines/execution-context.js.map +0 -1
  382. package/dist/engines/fab-formats-processor.d.ts +0 -179
  383. package/dist/engines/fab-formats-processor.d.ts.map +0 -1
  384. package/dist/engines/fab-formats-processor.js +0 -1524
  385. package/dist/engines/fab-formats-processor.js.map +0 -1
  386. package/dist/engines/faf-dna.d.ts +0 -160
  387. package/dist/engines/faf-dna.d.ts.map +0 -1
  388. package/dist/engines/faf-dna.js +0 -547
  389. package/dist/engines/faf-dna.js.map +0 -1
  390. package/dist/engines/relentless-context-extractor.d.ts +0 -105
  391. package/dist/engines/relentless-context-extractor.d.ts.map +0 -1
  392. package/dist/engines/relentless-context-extractor.js +0 -698
  393. package/dist/engines/relentless-context-extractor.js.map +0 -1
  394. package/dist/engines/v252-hybrid-engine.d.ts +0 -60
  395. package/dist/engines/v252-hybrid-engine.d.ts.map +0 -1
  396. package/dist/engines/v252-hybrid-engine.js +0 -290
  397. package/dist/engines/v252-hybrid-engine.js.map +0 -1
  398. package/dist/family/detectors/n8n.d.ts +0 -10
  399. package/dist/family/detectors/n8n.d.ts.map +0 -1
  400. package/dist/family/detectors/n8n.js +0 -102
  401. package/dist/family/detectors/n8n.js.map +0 -1
  402. package/dist/family/detectors/next.d.ts +0 -8
  403. package/dist/family/detectors/next.d.ts.map +0 -1
  404. package/dist/family/detectors/next.js +0 -106
  405. package/dist/family/detectors/next.js.map +0 -1
  406. package/dist/family/detectors/react.d.ts +0 -8
  407. package/dist/family/detectors/react.d.ts.map +0 -1
  408. package/dist/family/detectors/react.js +0 -85
  409. package/dist/family/detectors/react.js.map +0 -1
  410. package/dist/family/detectors/svelte.d.ts +0 -8
  411. package/dist/family/detectors/svelte.d.ts.map +0 -1
  412. package/dist/family/detectors/svelte.js +0 -102
  413. package/dist/family/detectors/svelte.js.map +0 -1
  414. package/dist/family/detectors/typescript.d.ts +0 -8
  415. package/dist/family/detectors/typescript.d.ts.map +0 -1
  416. package/dist/family/detectors/typescript.js +0 -112
  417. package/dist/family/detectors/typescript.js.map +0 -1
  418. package/dist/family/detectors/vite.d.ts +0 -8
  419. package/dist/family/detectors/vite.d.ts.map +0 -1
  420. package/dist/family/detectors/vite.js +0 -97
  421. package/dist/family/detectors/vite.js.map +0 -1
  422. package/dist/family/index.d.ts +0 -21
  423. package/dist/family/index.d.ts.map +0 -1
  424. package/dist/family/index.js +0 -73
  425. package/dist/family/index.js.map +0 -1
  426. package/dist/family/registry.d.ts +0 -57
  427. package/dist/family/registry.d.ts.map +0 -1
  428. package/dist/family/registry.js +0 -156
  429. package/dist/family/registry.js.map +0 -1
  430. package/dist/family/types.d.ts +0 -102
  431. package/dist/family/types.d.ts.map +0 -1
  432. package/dist/family/types.js +0 -8
  433. package/dist/family/types.js.map +0 -1
  434. package/dist/fix-once/colors.d.ts +0 -105
  435. package/dist/fix-once/colors.d.ts.map +0 -1
  436. package/dist/fix-once/colors.js +0 -248
  437. package/dist/fix-once/colors.js.map +0 -1
  438. package/dist/fix-once/commander.d.ts +0 -18
  439. package/dist/fix-once/commander.d.ts.map +0 -1
  440. package/dist/fix-once/commander.js +0 -25
  441. package/dist/fix-once/commander.js.map +0 -1
  442. package/dist/fix-once/types.d.ts +0 -258
  443. package/dist/fix-once/types.d.ts.map +0 -1
  444. package/dist/fix-once/types.js +0 -26
  445. package/dist/fix-once/types.js.map +0 -1
  446. package/dist/fix-once/yaml.d.ts +0 -58
  447. package/dist/fix-once/yaml.d.ts.map +0 -1
  448. package/dist/fix-once/yaml.js +0 -172
  449. package/dist/fix-once/yaml.js.map +0 -1
  450. package/dist/framework-detector.d.ts +0 -307
  451. package/dist/framework-detector.d.ts.map +0 -1
  452. package/dist/framework-detector.js +0 -951
  453. package/dist/framework-detector.js.map +0 -1
  454. package/dist/generators/faf-generator-championship.d.ts +0 -17
  455. package/dist/generators/faf-generator-championship.d.ts.map +0 -1
  456. package/dist/generators/faf-generator-championship.js +0 -612
  457. package/dist/generators/faf-generator-championship.js.map +0 -1
  458. package/dist/github/current-score-calculator.d.ts +0 -15
  459. package/dist/github/current-score-calculator.d.ts.map +0 -1
  460. package/dist/github/current-score-calculator.js +0 -125
  461. package/dist/github/current-score-calculator.js.map +0 -1
  462. package/dist/github/faf-git-generator.d.ts +0 -52
  463. package/dist/github/faf-git-generator.d.ts.map +0 -1
  464. package/dist/github/faf-git-generator.js +0 -527
  465. package/dist/github/faf-git-generator.js.map +0 -1
  466. package/dist/github/github-extractor.d.ts +0 -60
  467. package/dist/github/github-extractor.d.ts.map +0 -1
  468. package/dist/github/github-extractor.js +0 -381
  469. package/dist/github/github-extractor.js.map +0 -1
  470. package/dist/github/popular-repos.d.ts +0 -43
  471. package/dist/github/popular-repos.d.ts.map +0 -1
  472. package/dist/github/popular-repos.js +0 -205
  473. package/dist/github/popular-repos.js.map +0 -1
  474. package/dist/github/repo-selector.d.ts +0 -48
  475. package/dist/github/repo-selector.d.ts.map +0 -1
  476. package/dist/github/repo-selector.js +0 -297
  477. package/dist/github/repo-selector.js.map +0 -1
  478. package/dist/index.d.ts +0 -20
  479. package/dist/index.d.ts.map +0 -1
  480. package/dist/index.js.map +0 -1
  481. package/dist/licensing/license-messages.d.ts +0 -20
  482. package/dist/licensing/license-messages.d.ts.map +0 -1
  483. package/dist/licensing/license-messages.js +0 -77
  484. package/dist/licensing/license-messages.js.map +0 -1
  485. package/dist/licensing/pro-gate.d.ts +0 -54
  486. package/dist/licensing/pro-gate.d.ts.map +0 -1
  487. package/dist/licensing/pro-gate.js +0 -243
  488. package/dist/licensing/pro-gate.js.map +0 -1
  489. package/dist/output/experience-manager.d.ts +0 -58
  490. package/dist/output/experience-manager.d.ts.map +0 -1
  491. package/dist/output/experience-manager.js +0 -215
  492. package/dist/output/experience-manager.js.map +0 -1
  493. package/dist/schema/faf-schema.d.ts +0 -97
  494. package/dist/schema/faf-schema.d.ts.map +0 -1
  495. package/dist/schema/faf-schema.js +0 -173
  496. package/dist/schema/faf-schema.js.map +0 -1
  497. package/dist/smart-faf.d.ts +0 -68
  498. package/dist/smart-faf.d.ts.map +0 -1
  499. package/dist/smart-faf.js +0 -400
  500. package/dist/smart-faf.js.map +0 -1
  501. package/dist/systems/question-system.d.ts +0 -122
  502. package/dist/systems/question-system.d.ts.map +0 -1
  503. package/dist/systems/question-system.js +0 -413
  504. package/dist/systems/question-system.js.map +0 -1
  505. package/dist/taf/index.d.ts +0 -21
  506. package/dist/taf/index.d.ts.map +0 -1
  507. package/dist/taf/index.js +0 -72
  508. package/dist/taf/index.js.map +0 -1
  509. package/dist/taf/logger.d.ts +0 -88
  510. package/dist/taf/logger.d.ts.map +0 -1
  511. package/dist/taf/logger.js +0 -137
  512. package/dist/taf/logger.js.map +0 -1
  513. package/dist/taf/parser.d.ts +0 -32
  514. package/dist/taf/parser.d.ts.map +0 -1
  515. package/dist/taf/parser.js +0 -161
  516. package/dist/taf/parser.js.map +0 -1
  517. package/dist/taf/star-badge.d.ts +0 -32
  518. package/dist/taf/star-badge.d.ts.map +0 -1
  519. package/dist/taf/star-badge.js +0 -158
  520. package/dist/taf/star-badge.js.map +0 -1
  521. package/dist/taf/star-rating.d.ts +0 -30
  522. package/dist/taf/star-rating.d.ts.map +0 -1
  523. package/dist/taf/star-rating.js +0 -79
  524. package/dist/taf/star-rating.js.map +0 -1
  525. package/dist/taf/stats.d.ts +0 -31
  526. package/dist/taf/stats.d.ts.map +0 -1
  527. package/dist/taf/stats.js +0 -190
  528. package/dist/taf/stats.js.map +0 -1
  529. package/dist/taf/test-output-parser.d.ts +0 -42
  530. package/dist/taf/test-output-parser.d.ts.map +0 -1
  531. package/dist/taf/test-output-parser.js +0 -127
  532. package/dist/taf/test-output-parser.js.map +0 -1
  533. package/dist/taf/types.d.ts +0 -77
  534. package/dist/taf/types.d.ts.map +0 -1
  535. package/dist/taf/types.js +0 -9
  536. package/dist/taf/types.js.map +0 -1
  537. package/dist/taf/validator.d.ts +0 -18
  538. package/dist/taf/validator.d.ts.map +0 -1
  539. package/dist/taf/validator.js +0 -148
  540. package/dist/taf/validator.js.map +0 -1
  541. package/dist/telemetry/analytics.d.ts +0 -74
  542. package/dist/telemetry/analytics.d.ts.map +0 -1
  543. package/dist/telemetry/analytics.js +0 -370
  544. package/dist/telemetry/analytics.js.map +0 -1
  545. package/dist/tests/test-chrome-fuzzy.d.ts +0 -5
  546. package/dist/tests/test-chrome-fuzzy.d.ts.map +0 -1
  547. package/dist/tests/test-chrome-fuzzy.js +0 -68
  548. package/dist/tests/test-chrome-fuzzy.js.map +0 -1
  549. package/dist/types/faf-types.d.ts +0 -144
  550. package/dist/types/faf-types.d.ts.map +0 -1
  551. package/dist/types/faf-types.js +0 -21
  552. package/dist/types/faf-types.js.map +0 -1
  553. package/dist/types/index.d.ts +0 -36
  554. package/dist/types/index.d.ts.map +0 -1
  555. package/dist/types/index.js +0 -7
  556. package/dist/types/index.js.map +0 -1
  557. package/dist/utils/agents-parser.d.ts +0 -60
  558. package/dist/utils/agents-parser.d.ts.map +0 -1
  559. package/dist/utils/agents-parser.js +0 -339
  560. package/dist/utils/agents-parser.js.map +0 -1
  561. package/dist/utils/announcements.d.ts +0 -16
  562. package/dist/utils/announcements.d.ts.map +0 -1
  563. package/dist/utils/announcements.js +0 -131
  564. package/dist/utils/announcements.js.map +0 -1
  565. package/dist/utils/balance-visualizer.d.ts +0 -38
  566. package/dist/utils/balance-visualizer.d.ts.map +0 -1
  567. package/dist/utils/balance-visualizer.js +0 -190
  568. package/dist/utils/balance-visualizer.js.map +0 -1
  569. package/dist/utils/championship-core.d.ts +0 -127
  570. package/dist/utils/championship-core.d.ts.map +0 -1
  571. package/dist/utils/championship-core.js +0 -212
  572. package/dist/utils/championship-core.js.map +0 -1
  573. package/dist/utils/championship-style.d.ts +0 -110
  574. package/dist/utils/championship-style.d.ts.map +0 -1
  575. package/dist/utils/championship-style.js +0 -219
  576. package/dist/utils/championship-style.js.map +0 -1
  577. package/dist/utils/chrome-extension-confirmer.d.ts +0 -41
  578. package/dist/utils/chrome-extension-confirmer.d.ts.map +0 -1
  579. package/dist/utils/chrome-extension-confirmer.js +0 -203
  580. package/dist/utils/chrome-extension-confirmer.js.map +0 -1
  581. package/dist/utils/chrome-extension-detector.d.ts +0 -74
  582. package/dist/utils/chrome-extension-detector.d.ts.map +0 -1
  583. package/dist/utils/chrome-extension-detector.js +0 -268
  584. package/dist/utils/chrome-extension-detector.js.map +0 -1
  585. package/dist/utils/color-utils.d.ts +0 -17
  586. package/dist/utils/color-utils.d.ts.map +0 -1
  587. package/dist/utils/color-utils.js +0 -112
  588. package/dist/utils/color-utils.js.map +0 -1
  589. package/dist/utils/conductor-parser.d.ts +0 -86
  590. package/dist/utils/conductor-parser.d.ts.map +0 -1
  591. package/dist/utils/conductor-parser.js +0 -293
  592. package/dist/utils/conductor-parser.js.map +0 -1
  593. package/dist/utils/cursorrules-parser.d.ts +0 -56
  594. package/dist/utils/cursorrules-parser.d.ts.map +0 -1
  595. package/dist/utils/cursorrules-parser.js +0 -327
  596. package/dist/utils/cursorrules-parser.js.map +0 -1
  597. package/dist/utils/email-opt-in.d.ts +0 -31
  598. package/dist/utils/email-opt-in.d.ts.map +0 -1
  599. package/dist/utils/email-opt-in.js +0 -199
  600. package/dist/utils/email-opt-in.js.map +0 -1
  601. package/dist/utils/fab-formats-engine.d.ts +0 -83
  602. package/dist/utils/fab-formats-engine.d.ts.map +0 -1
  603. package/dist/utils/fab-formats-engine.js +0 -502
  604. package/dist/utils/fab-formats-engine.js.map +0 -1
  605. package/dist/utils/fafb-compiler.d.ts +0 -62
  606. package/dist/utils/fafb-compiler.d.ts.map +0 -1
  607. package/dist/utils/fafb-compiler.js +0 -225
  608. package/dist/utils/fafb-compiler.js.map +0 -1
  609. package/dist/utils/fafb-detector.d.ts +0 -26
  610. package/dist/utils/fafb-detector.d.ts.map +0 -1
  611. package/dist/utils/fafb-detector.js +0 -180
  612. package/dist/utils/fafb-detector.js.map +0 -1
  613. package/dist/utils/fafignore-parser.d.ts +0 -21
  614. package/dist/utils/fafignore-parser.d.ts.map +0 -1
  615. package/dist/utils/fafignore-parser.js +0 -178
  616. package/dist/utils/fafignore-parser.js.map +0 -1
  617. package/dist/utils/feedback-messages.d.ts +0 -13
  618. package/dist/utils/feedback-messages.d.ts.map +0 -1
  619. package/dist/utils/feedback-messages.js +0 -118
  620. package/dist/utils/feedback-messages.js.map +0 -1
  621. package/dist/utils/file-utils.d.ts +0 -113
  622. package/dist/utils/file-utils.d.ts.map +0 -1
  623. package/dist/utils/file-utils.js +0 -949
  624. package/dist/utils/file-utils.js.map +0 -1
  625. package/dist/utils/gemini-parser.d.ts +0 -58
  626. package/dist/utils/gemini-parser.d.ts.map +0 -1
  627. package/dist/utils/gemini-parser.js +0 -263
  628. package/dist/utils/gemini-parser.js.map +0 -1
  629. package/dist/utils/markdown-to-context.d.ts +0 -28
  630. package/dist/utils/markdown-to-context.d.ts.map +0 -1
  631. package/dist/utils/markdown-to-context.js +0 -206
  632. package/dist/utils/markdown-to-context.js.map +0 -1
  633. package/dist/utils/memory-parser.d.ts +0 -95
  634. package/dist/utils/memory-parser.d.ts.map +0 -1
  635. package/dist/utils/memory-parser.js +0 -408
  636. package/dist/utils/memory-parser.js.map +0 -1
  637. package/dist/utils/memory-topic-writer.d.ts +0 -52
  638. package/dist/utils/memory-topic-writer.d.ts.map +0 -1
  639. package/dist/utils/memory-topic-writer.js +0 -415
  640. package/dist/utils/memory-topic-writer.js.map +0 -1
  641. package/dist/utils/native-cli-parser.d.ts +0 -152
  642. package/dist/utils/native-cli-parser.d.ts.map +0 -1
  643. package/dist/utils/native-cli-parser.js +0 -466
  644. package/dist/utils/native-cli-parser.js.map +0 -1
  645. package/dist/utils/native-file-finder.d.ts +0 -116
  646. package/dist/utils/native-file-finder.d.ts.map +0 -1
  647. package/dist/utils/native-file-finder.js +0 -211
  648. package/dist/utils/native-file-finder.js.map +0 -1
  649. package/dist/utils/platform-detector.d.ts +0 -31
  650. package/dist/utils/platform-detector.d.ts.map +0 -1
  651. package/dist/utils/platform-detector.js +0 -220
  652. package/dist/utils/platform-detector.js.map +0 -1
  653. package/dist/utils/score-header.d.ts +0 -22
  654. package/dist/utils/score-header.d.ts.map +0 -1
  655. package/dist/utils/score-header.js +0 -88
  656. package/dist/utils/score-header.js.map +0 -1
  657. package/dist/utils/slot-counter.d.ts +0 -56
  658. package/dist/utils/slot-counter.d.ts.map +0 -1
  659. package/dist/utils/slot-counter.js +0 -100
  660. package/dist/utils/slot-counter.js.map +0 -1
  661. package/dist/utils/technical-credit.d.ts +0 -36
  662. package/dist/utils/technical-credit.d.ts.map +0 -1
  663. package/dist/utils/technical-credit.js +0 -286
  664. package/dist/utils/technical-credit.js.map +0 -1
  665. package/dist/utils/trust-cache.d.ts +0 -29
  666. package/dist/utils/trust-cache.d.ts.map +0 -1
  667. package/dist/utils/trust-cache.js +0 -122
  668. package/dist/utils/trust-cache.js.map +0 -1
  669. package/dist/utils/turbo-cat-knowledge.d.ts +0 -105
  670. package/dist/utils/turbo-cat-knowledge.d.ts.map +0 -1
  671. package/dist/utils/turbo-cat-knowledge.js +0 -1941
  672. package/dist/utils/turbo-cat-knowledge.js.map +0 -1
  673. package/dist/utils/turbo-cat-pyramid.d.ts +0 -48
  674. package/dist/utils/turbo-cat-pyramid.d.ts.map +0 -1
  675. package/dist/utils/turbo-cat-pyramid.js +0 -380
  676. package/dist/utils/turbo-cat-pyramid.js.map +0 -1
  677. package/dist/utils/turbo-cat.d.ts +0 -99
  678. package/dist/utils/turbo-cat.d.ts.map +0 -1
  679. package/dist/utils/turbo-cat.js +0 -456
  680. package/dist/utils/turbo-cat.js.map +0 -1
  681. package/dist/utils/universal-fuzzy-detector.d.ts +0 -64
  682. package/dist/utils/universal-fuzzy-detector.d.ts.map +0 -1
  683. package/dist/utils/universal-fuzzy-detector.js +0 -386
  684. package/dist/utils/universal-fuzzy-detector.js.map +0 -1
  685. package/dist/utils/update-checker.d.ts +0 -15
  686. package/dist/utils/update-checker.d.ts.map +0 -1
  687. package/dist/utils/update-checker.js +0 -200
  688. package/dist/utils/update-checker.js.map +0 -1
  689. package/dist/utils/vibe-sync.d.ts +0 -25
  690. package/dist/utils/vibe-sync.d.ts.map +0 -1
  691. package/dist/utils/vibe-sync.js +0 -175
  692. package/dist/utils/vibe-sync.js.map +0 -1
  693. package/dist/utils/yaml-generator.d.ts +0 -52
  694. package/dist/utils/yaml-generator.d.ts.map +0 -1
  695. package/dist/utils/yaml-generator.js +0 -432
  696. package/dist/utils/yaml-generator.js.map +0 -1
  697. package/faf-banner.png +0 -0
  698. package/scripts/ANTHROPIC-DEMO.sh +0 -203
  699. package/scripts/boris-ready.sh +0 -169
  700. package/scripts/bundle-yaml.js +0 -87
  701. package/scripts/check-version.js +0 -88
  702. package/scripts/clean-build.js +0 -34
  703. package/scripts/cleanup-unused.sh +0 -54
  704. package/scripts/debug-django.txt +0 -9
  705. package/scripts/debug-mongo.txt +0 -9
  706. package/scripts/debug-react.txt +0 -9
  707. package/scripts/debug-rust.txt +0 -9
  708. package/scripts/debug-whisper.cpp.txt +0 -9
  709. package/scripts/evaluate-family-member.ts +0 -300
  710. package/scripts/generate-docs.ts +0 -358
  711. package/scripts/generate-drift-reports.sh +0 -111
  712. package/scripts/industry-showcase.json +0 -122
  713. package/scripts/mcp-ecosystem-research.sh +0 -58
  714. package/scripts/migrate-yaml-imports.sh +0 -55
  715. package/scripts/migrate-yaml.ts +0 -132
  716. package/scripts/performance-validation.ts +0 -460
  717. package/scripts/postinstall.js +0 -30
  718. package/scripts/prepare-release.ts +0 -421
  719. package/scripts/run-industry-showcase.ts +0 -237
  720. package/scripts/run-test-showcase.ts +0 -244
  721. package/scripts/setup-github-watch.sh +0 -43
  722. package/scripts/sync-version.js +0 -35
  723. package/scripts/test-integration-detection.ts +0 -93
  724. package/scripts/test-integration-simple.js +0 -93
  725. package/scripts/test-medal-progression.sh +0 -143
  726. package/scripts/test-showcase-results.json +0 -109
  727. package/scripts/test-showcase.json +0 -32
  728. package/scripts/update-version.js +0 -148
  729. package/scripts/verify-build.js +0 -343
  730. package/scripts/version-check.js +0 -78
  731. package/scripts/watch-discussions.sh +0 -86
@@ -1,949 +0,0 @@
1
- "use strict";
2
- /**
3
- * 📁 File Utilities
4
- * Helper functions for finding and working with .faf files
5
- */
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- var desc = Object.getOwnPropertyDescriptor(m, k);
9
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
- desc = { enumerable: true, get: function() { return m[k]; } };
11
- }
12
- Object.defineProperty(o, k2, desc);
13
- }) : (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- o[k2] = m[k];
16
- }));
17
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
- Object.defineProperty(o, "default", { enumerable: true, value: v });
19
- }) : function(o, v) {
20
- o["default"] = v;
21
- });
22
- var __importStar = (this && this.__importStar) || (function () {
23
- var ownKeys = function(o) {
24
- ownKeys = Object.getOwnPropertyNames || function (o) {
25
- var ar = [];
26
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
- return ar;
28
- };
29
- return ownKeys(o);
30
- };
31
- return function (mod) {
32
- if (mod && mod.__esModule) return mod;
33
- var result = {};
34
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
- __setModuleDefault(result, mod);
36
- return result;
37
- };
38
- })();
39
- var __importDefault = (this && this.__importDefault) || function (mod) {
40
- return (mod && mod.__esModule) ? mod : { "default": mod };
41
- };
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.findFafFile = findFafFile;
44
- exports.fileExists = fileExists;
45
- exports.getFileModTime = getFileModTime;
46
- exports.findPackageJson = findPackageJson;
47
- exports.findPyprojectToml = findPyprojectToml;
48
- exports.findRequirementsTxt = findRequirementsTxt;
49
- exports.findTsConfig = findTsConfig;
50
- exports.analyzeTsConfig = analyzeTsConfig;
51
- exports.findN8nWorkflows = findN8nWorkflows;
52
- exports.findMakeScenarios = findMakeScenarios;
53
- exports.findOpalMiniApps = findOpalMiniApps;
54
- exports.findOpenAIAssistants = findOpenAIAssistants;
55
- exports.detectProjectType = detectProjectType;
56
- exports.daysSinceModified = daysSinceModified;
57
- exports.detectPythonProjectType = detectPythonProjectType;
58
- exports.detectPythonPatterns = detectPythonPatterns;
59
- const fs_1 = require("fs");
60
- const path_1 = __importDefault(require("path"));
61
- const native_file_finder_1 = require("./native-file-finder");
62
- const fafignore_parser_1 = require("./fafignore-parser");
63
- /**
64
- * Find .faf file in current directory or parent directories
65
- *
66
- * v1.2.0: Prioritizes project.faf (standard) over .faf (legacy)
67
- */
68
- async function findFafFile(startDir = process.cwd()) {
69
- let currentDir = path_1.default.resolve(startDir);
70
- // Check up to 10 parent directories to avoid infinite loops
71
- for (let i = 0; i < 10; i++) {
72
- try {
73
- // First, try simple fs.readdir approach
74
- const files = await fs_1.promises.readdir(currentDir);
75
- // Filter for EXACTLY .faf files (not .faf.backup, .fafignore, etc.)
76
- const fafFiles = files.filter((file) => {
77
- // Must be exactly '.faf' or match pattern like 'project.faf'
78
- // Exclude: .faf.backup*, .fafignore, faf-*, etc.
79
- const isExactFaf = file === '.faf';
80
- const isNamedFaf = file.match(/^[^.]+\.faf$/) !== null; // like 'project.faf'
81
- const isNotBackup = !file.includes('.faf.');
82
- const isNotFafIgnore = file !== '.fafignore';
83
- return (isExactFaf || isNamedFaf) && isNotBackup && isNotFafIgnore;
84
- });
85
- if (fafFiles.length > 0) {
86
- // Sort to prioritize project.faf (standard) over .faf (legacy)
87
- const sortedFafFiles = fafFiles.sort((a, b) => {
88
- if (a === 'project.faf') {
89
- return -1;
90
- } // project.faf comes first (v1.2.0 standard)
91
- if (b === 'project.faf') {
92
- return 1;
93
- } // project.faf comes first
94
- if (a === '.faf') {
95
- return -1;
96
- } // .faf second (legacy)
97
- if (b === '.faf') {
98
- return 1;
99
- } // .faf second
100
- return a.localeCompare(b); // alphabetical otherwise
101
- });
102
- // Check all matching files, not just the first one
103
- // This handles cases where .faf directory exists alongside project.faf file
104
- for (const fafFile of sortedFafFiles) {
105
- const fafPath = path_1.default.join(currentDir, fafFile);
106
- // Verify it's a file (not directory) and readable
107
- try {
108
- const stats = await fs_1.promises.stat(fafPath);
109
- if (stats.isFile() && await fileExists(fafPath)) {
110
- // v1.2.0: Prioritize project.faf, silently support .faf for compatibility
111
- return fafPath;
112
- }
113
- }
114
- catch {
115
- // Skip if stat fails, continue to next file
116
- }
117
- }
118
- }
119
- // Move to parent directory
120
- const parentDir = path_1.default.dirname(currentDir);
121
- if (parentDir === currentDir) {
122
- // Reached filesystem root
123
- break;
124
- }
125
- currentDir = parentDir;
126
- }
127
- catch {
128
- // Skip this directory if we can't read it
129
- const parentDir = path_1.default.dirname(currentDir);
130
- if (parentDir === currentDir) {
131
- break;
132
- }
133
- currentDir = parentDir;
134
- }
135
- }
136
- return null;
137
- }
138
- /**
139
- * Check if file exists and is readable
140
- */
141
- async function fileExists(filePath) {
142
- try {
143
- await fs_1.promises.access(filePath, fs_1.promises.constants.F_OK | fs_1.promises.constants.R_OK);
144
- return true;
145
- }
146
- catch {
147
- return false;
148
- }
149
- }
150
- /**
151
- * Get file modification time
152
- */
153
- async function getFileModTime(filePath) {
154
- try {
155
- const stats = await fs_1.promises.stat(filePath);
156
- return stats.mtime;
157
- }
158
- catch {
159
- return null;
160
- }
161
- }
162
- /**
163
- * Find package.json in project
164
- */
165
- async function findPackageJson(startDir = process.cwd()) {
166
- let currentDir = path_1.default.resolve(startDir); // Fix: resolve to absolute path
167
- while (currentDir !== path_1.default.dirname(currentDir)) {
168
- const packagePath = path_1.default.join(currentDir, "package.json");
169
- if (await fileExists(packagePath)) {
170
- return packagePath;
171
- }
172
- currentDir = path_1.default.dirname(currentDir);
173
- }
174
- return null;
175
- }
176
- /**
177
- * Find pyproject.toml in project (Python Poetry/PEP 518)
178
- */
179
- async function findPyprojectToml(startDir = process.cwd()) {
180
- let currentDir = path_1.default.resolve(startDir); // Fix: resolve to absolute path
181
- while (currentDir !== path_1.default.dirname(currentDir)) {
182
- const pyprojectPath = path_1.default.join(currentDir, "pyproject.toml");
183
- if (await fileExists(pyprojectPath)) {
184
- return pyprojectPath;
185
- }
186
- currentDir = path_1.default.dirname(currentDir);
187
- }
188
- return null;
189
- }
190
- /**
191
- * Find requirements.txt in project (Python pip)
192
- */
193
- async function findRequirementsTxt(startDir = process.cwd()) {
194
- let currentDir = path_1.default.resolve(startDir); // Fix: resolve to absolute path
195
- while (currentDir !== path_1.default.dirname(currentDir)) {
196
- const requirementsPath = path_1.default.join(currentDir, "requirements.txt");
197
- if (await fileExists(requirementsPath)) {
198
- return requirementsPath;
199
- }
200
- currentDir = path_1.default.dirname(currentDir);
201
- }
202
- return null;
203
- }
204
- /**
205
- * Find tsconfig.json in project (TypeScript)
206
- */
207
- async function findTsConfig(startDir = process.cwd()) {
208
- let currentDir = path_1.default.resolve(startDir); // Fix: resolve to absolute path
209
- while (currentDir !== path_1.default.dirname(currentDir)) {
210
- const tsconfigPath = path_1.default.join(currentDir, "tsconfig.json");
211
- if (await fileExists(tsconfigPath)) {
212
- return tsconfigPath;
213
- }
214
- currentDir = path_1.default.dirname(currentDir);
215
- }
216
- return null;
217
- }
218
- /**
219
- * Analyze tsconfig.json for F1-Inspired TypeScript intelligence
220
- */
221
- async function analyzeTsConfig(filePath) {
222
- try {
223
- const content = await fs_1.promises.readFile(filePath, "utf-8");
224
- // Strip comments from JSON (tsconfig.json often has comments)
225
- const cleanedContent = content
226
- .replace(/\/\*[\s\S]*?\*\//g, "") // Remove /* */ comments
227
- .replace(/\/\/.*$/gm, ""); // Remove // comments
228
- const config = JSON.parse(cleanedContent);
229
- const compilerOptions = config.compilerOptions || {};
230
- // Detect F1-Inspired engineering quality
231
- const strictnessLevel = calculateStrictnessLevel(compilerOptions);
232
- const frameworkIntegration = detectFrameworkIntegration(compilerOptions, config);
233
- const performanceOptimizations = detectPerformanceConfig(compilerOptions);
234
- return {
235
- target: compilerOptions.target || "ES5",
236
- module: compilerOptions.module || "CommonJS",
237
- moduleResolution: compilerOptions.moduleResolution || "node",
238
- strict: compilerOptions.strict || false,
239
- strictnessLevel,
240
- frameworkIntegration,
241
- performanceOptimizations,
242
- includes: config.include || [],
243
- excludes: config.exclude || [],
244
- engineeringQuality: assessEngineeringQuality(compilerOptions),
245
- };
246
- }
247
- catch {
248
- return null;
249
- }
250
- }
251
- /**
252
- * Detect n8n workflow files in directory
253
- */
254
- async function findN8nWorkflows(projectDir = process.cwd()) {
255
- const workflows = [];
256
- try {
257
- const files = await fs_1.promises.readdir(projectDir);
258
- for (const file of files) {
259
- if (file.endsWith('.json') && !file.includes('package')) {
260
- try {
261
- const filePath = path_1.default.join(projectDir, file);
262
- const content = await fs_1.promises.readFile(filePath, 'utf-8');
263
- const json = JSON.parse(content);
264
- // Check if it's an n8n workflow (has nodes, connections, and name)
265
- if (json.nodes && Array.isArray(json.nodes) &&
266
- json.connections && typeof json.connections === 'object' &&
267
- json.name && typeof json.name === 'string') {
268
- workflows.push(file);
269
- }
270
- }
271
- catch {
272
- // Not valid JSON or not n8n format, skip
273
- }
274
- }
275
- }
276
- }
277
- catch {
278
- // Directory read error, return empty
279
- }
280
- return workflows;
281
- }
282
- /**
283
- * Find Make.com scenario files in a project directory
284
- *
285
- * Detects Make.com blueprint JSON files by checking for:
286
- * - name string (scenario name)
287
- * - flow array (modules/steps)
288
- * - metadata object (scenario metadata)
289
- *
290
- * @param projectDir - Directory to search (defaults to cwd)
291
- * @returns Array of Make.com scenario file names
292
- */
293
- async function findMakeScenarios(projectDir = process.cwd()) {
294
- const scenarios = [];
295
- try {
296
- const files = await fs_1.promises.readdir(projectDir);
297
- for (const file of files) {
298
- if (file.endsWith('.json') && !file.includes('package')) {
299
- try {
300
- const filePath = path_1.default.join(projectDir, file);
301
- const content = await fs_1.promises.readFile(filePath, 'utf-8');
302
- const json = JSON.parse(content);
303
- // Check if it's a Make.com blueprint (has name, flow array, and metadata)
304
- if (json.name && typeof json.name === 'string' &&
305
- json.flow && Array.isArray(json.flow) &&
306
- json.metadata && typeof json.metadata === 'object') {
307
- scenarios.push(file);
308
- }
309
- }
310
- catch {
311
- // Not valid JSON or not Make format, skip
312
- }
313
- }
314
- }
315
- }
316
- catch {
317
- // Directory read error, return empty
318
- }
319
- return scenarios;
320
- }
321
- /**
322
- * Find Google Opal mini-app files in a project directory
323
- *
324
- * Detects Opal mini-app JSON files by checking for:
325
- * - steps array (mini-app steps)
326
- * - model string (AI model used)
327
- *
328
- * @param projectDir - Directory to search (defaults to cwd)
329
- * @returns Array of Opal mini-app file names
330
- */
331
- async function findOpalMiniApps(projectDir = process.cwd()) {
332
- const miniApps = [];
333
- try {
334
- const files = await fs_1.promises.readdir(projectDir);
335
- for (const file of files) {
336
- if (file.endsWith('.json') && !file.includes('package')) {
337
- try {
338
- const filePath = path_1.default.join(projectDir, file);
339
- const content = await fs_1.promises.readFile(filePath, 'utf-8');
340
- const json = JSON.parse(content);
341
- // Check if it's an Opal mini-app (has steps and model)
342
- if (json.steps && Array.isArray(json.steps) &&
343
- json.model && typeof json.model === 'string') {
344
- miniApps.push(file);
345
- }
346
- }
347
- catch {
348
- // Not valid JSON or not Opal format, skip
349
- }
350
- }
351
- }
352
- }
353
- catch {
354
- // Directory read error, return empty
355
- }
356
- return miniApps;
357
- }
358
- /**
359
- * Find OpenAI Assistant files in a project directory
360
- *
361
- * Detects OpenAI Assistant JSON files (OpenAPI 3.x schemas) by checking for:
362
- * - openapi string (OpenAPI version)
363
- * - paths object (API endpoints/actions)
364
- *
365
- * @param projectDir - Directory to search (defaults to cwd)
366
- * @returns Array of OpenAI Assistant file names
367
- */
368
- async function findOpenAIAssistants(projectDir = process.cwd()) {
369
- const assistants = [];
370
- try {
371
- const files = await fs_1.promises.readdir(projectDir);
372
- for (const file of files) {
373
- if (file.endsWith('.json') && !file.includes('package')) {
374
- try {
375
- const filePath = path_1.default.join(projectDir, file);
376
- const content = await fs_1.promises.readFile(filePath, 'utf-8');
377
- const json = JSON.parse(content);
378
- // Check if it's an OpenAI Assistant schema (has openapi and paths)
379
- if (json.openapi && typeof json.openapi === 'string' &&
380
- json.paths && typeof json.paths === 'object') {
381
- assistants.push(file);
382
- }
383
- }
384
- catch {
385
- // Not valid JSON or not OpenAI format, skip
386
- }
387
- }
388
- }
389
- }
390
- catch {
391
- // Directory read error, return empty
392
- }
393
- return assistants;
394
- }
395
- /**
396
- * Detect project type from files and structure
397
- *
398
- * CHAMPIONSHIP DETECTION STRATEGY:
399
- * 1. 😽 TURBO-CAT: Format discovery (finds config files)
400
- * 2. 🛂 TSA: Dependency intelligence (analyzes actual usage)
401
- * 3. Cross-reference both engines for definitive answer
402
- * 4. Fallback to file patterns if engines unavailable
403
- *
404
- * Goal: Championship-grade detection using existing engines
405
- */
406
- async function detectProjectType(projectDir = process.cwd()) {
407
- // PHASE 1: TURBO-CAT + TSA CHAMPIONSHIP DETECTION
408
- // ============================================================================
409
- try {
410
- // Try to use TSA for smart dependency analysis (if package.json exists)
411
- const packageJsonPath = path_1.default.join(projectDir, "package.json");
412
- if (await fileExists(packageJsonPath)) {
413
- try {
414
- // Dynamic import to avoid circular dependencies and performance impact
415
- const { DependencyTSA } = await Promise.resolve().then(() => __importStar(require('../engines/dependency-tsa')));
416
- const tsa = new DependencyTSA(projectDir);
417
- const report = await tsa.inspect();
418
- // Analyze CORE dependencies (>10 imports = actually used)
419
- const coreDeps = report.inspections
420
- .filter(i => i.status === 'CORE')
421
- .map(i => i.package);
422
- const activeDeps = report.inspections
423
- .filter(i => i.status === 'ACTIVE')
424
- .map(i => i.package);
425
- // Read package.json for structural hints
426
- const packageContent = await fs_1.promises.readFile(packageJsonPath, "utf-8");
427
- const packageData = JSON.parse(packageContent);
428
- // Check for TypeScript
429
- const hasTypeScript = await fileExists(path_1.default.join(projectDir, "tsconfig.json")) ||
430
- coreDeps.includes('typescript') ||
431
- activeDeps.includes('typescript');
432
- // PRIORITY 1: CLI DETECTION (package.json.bin is DEFINITIVE)
433
- if (packageData.bin) {
434
- return hasTypeScript ? "cli-ts" : "cli";
435
- }
436
- // Secondary CLI check using TSA intelligence
437
- const cliDeps = ['commander', 'yargs', 'oclif', 'inquirer'];
438
- const hasCliCore = coreDeps.some(dep => cliDeps.includes(dep));
439
- const hasCliActive = activeDeps.some(dep => cliDeps.includes(dep));
440
- if (hasCliCore || hasCliActive) {
441
- return hasTypeScript ? "cli-ts" : "cli";
442
- }
443
- // PRIORITY 2: FULLSTACK (based on CORE usage)
444
- if (coreDeps.includes('next') || coreDeps.includes('@next/core')) {
445
- return hasTypeScript ? "fullstack-ts" : "fullstack";
446
- }
447
- if (coreDeps.includes('nuxt') || coreDeps.includes('@nuxt/core')) {
448
- return hasTypeScript ? "fullstack-ts" : "fullstack";
449
- }
450
- if (coreDeps.includes('@sveltejs/kit')) {
451
- return hasTypeScript ? "svelte-ts" : "svelte";
452
- }
453
- // PRIORITY 3: FRONTEND (based on CORE usage)
454
- if (coreDeps.includes('react') || coreDeps.includes('react-dom')) {
455
- return hasTypeScript ? "react-ts" : "react";
456
- }
457
- if (coreDeps.includes('vue') || coreDeps.includes('@vue/core')) {
458
- return hasTypeScript ? "vue-ts" : "vue";
459
- }
460
- if (coreDeps.includes('svelte')) {
461
- return hasTypeScript ? "svelte-ts" : "svelte";
462
- }
463
- if (coreDeps.includes('angular') || coreDeps.includes('@angular/core')) {
464
- return "angular";
465
- }
466
- // PRIORITY 4: BACKEND/API (based on CORE usage)
467
- const backendFrameworks = ['express', 'fastify', 'koa', 'hapi'];
468
- if (coreDeps.some(dep => backendFrameworks.includes(dep))) {
469
- return hasTypeScript ? "node-api-ts" : "node-api";
470
- }
471
- // If TSA worked but found nothing definitive, continue to fallback
472
- }
473
- catch {
474
- // TSA failed or not available, continue to fallback detection
475
- }
476
- }
477
- }
478
- catch {
479
- // TURBO-CAT/TSA unavailable, use fallback detection
480
- }
481
- // PHASE 2: FALLBACK DETECTION (when engines unavailable)
482
- // ============================================================================
483
- // TypeScript detection - check for tsconfig.json
484
- const tsconfigPath = path_1.default.join(projectDir, "tsconfig.json");
485
- let hasTypeScript = false;
486
- if (await fileExists(tsconfigPath)) {
487
- hasTypeScript = true;
488
- }
489
- // Check for package.json (fallback to naive dependency checking)
490
- const packageJsonPath = path_1.default.join(projectDir, "package.json");
491
- if (await fileExists(packageJsonPath)) {
492
- try {
493
- const packageContent = await fs_1.promises.readFile(packageJsonPath, "utf-8");
494
- const packageData = JSON.parse(packageContent);
495
- // Check dependencies for framework indicators (NAIVE - no usage analysis)
496
- const deps = {
497
- ...packageData.dependencies,
498
- ...packageData.devDependencies,
499
- };
500
- // Detect TypeScript in dependencies
501
- if (deps.typescript ||
502
- deps["@types/node"] ||
503
- Object.keys(deps).some((dep) => dep.startsWith("@types/"))) {
504
- hasTypeScript = true;
505
- }
506
- // CLI detection (structural only, no TSA intelligence)
507
- if (packageData.bin) {
508
- return hasTypeScript ? "cli-ts" : "cli";
509
- }
510
- const hasCliDeps = deps.commander || deps.yargs || deps.oclif || deps.inquirer;
511
- const hasCliKeywords = packageData.keywords?.includes('cli') ||
512
- packageData.keywords?.includes('command-line');
513
- const hasCliName = packageData.name?.includes('cli');
514
- if (hasCliDeps || hasCliKeywords || hasCliName) {
515
- return hasTypeScript ? "cli-ts" : "cli";
516
- }
517
- // Framework detection (naive - just checks if dependency exists)
518
- if (deps.next || deps["@next/core"]) {
519
- return hasTypeScript ? "fullstack-ts" : "fullstack";
520
- }
521
- if (deps.nuxt || deps["@nuxt/core"]) {
522
- return hasTypeScript ? "fullstack-ts" : "fullstack";
523
- }
524
- if (deps["@sveltejs/kit"]) {
525
- return hasTypeScript ? "svelte-ts" : "svelte";
526
- }
527
- if (deps.react || deps["react-dom"]) {
528
- return hasTypeScript ? "react-ts" : "react";
529
- }
530
- if (deps.vue || deps["@vue/core"]) {
531
- return hasTypeScript ? "vue-ts" : "vue";
532
- }
533
- if (deps.svelte) {
534
- return hasTypeScript ? "svelte-ts" : "svelte";
535
- }
536
- if (deps.angular || deps["@angular/core"]) {
537
- return "angular";
538
- }
539
- if (deps.express || deps.fastify || deps.koa || deps.hapi) {
540
- return hasTypeScript ? "node-api-ts" : "node-api";
541
- }
542
- }
543
- catch {
544
- // Continue with file-based detection
545
- }
546
- }
547
- // PHASE 2.5: COOKBOOK/EXAMPLES DETECTION
548
- // ============================================================================
549
- // Cookbooks are examples/tutorials repos - detect by name or structure
550
- const dirName = path_1.default.basename(projectDir).toLowerCase();
551
- const cookbookPatterns = ['cookbook', 'examples', 'tutorials', 'demos', 'samples'];
552
- if (cookbookPatterns.some(pattern => dirName.includes(pattern))) {
553
- return "cookbook";
554
- }
555
- // Check for examples/ directory with notebooks
556
- const examplesDir = path_1.default.join(projectDir, "examples");
557
- if (await fileExists(examplesDir)) {
558
- try {
559
- const examplesFiles = await fs_1.promises.readdir(examplesDir);
560
- const hasNotebooks = examplesFiles.some(f => f.endsWith('.ipynb'));
561
- if (hasNotebooks) {
562
- return "cookbook";
563
- }
564
- }
565
- catch {
566
- // Continue with other detection
567
- }
568
- }
569
- // PHASE 3: PYTHON DETECTION (check for Python-specific files)
570
- // ============================================================================
571
- const pythonType = await detectPythonProjectType(projectDir);
572
- if (pythonType !== "latest-idea") {
573
- return pythonType;
574
- }
575
- // PHASE 3.5: NATIVE LANGUAGE DETECTION (Zig, Rust, Go)
576
- // ============================================================================
577
- // These should take priority over file-based detection because they have
578
- // definitive build files that identify the project type unambiguously
579
- // Zig detection - build.zig is definitive
580
- const buildZigPath = path_1.default.join(projectDir, "build.zig");
581
- if (await fileExists(buildZigPath)) {
582
- return "zig";
583
- }
584
- // Rust detection - Cargo.toml is definitive
585
- const cargoTomlPath = path_1.default.join(projectDir, "Cargo.toml");
586
- if (await fileExists(cargoTomlPath)) {
587
- return "rust";
588
- }
589
- // Go detection - go.mod is definitive
590
- const goModPath = path_1.default.join(projectDir, "go.mod");
591
- if (await fileExists(goModPath)) {
592
- return "go";
593
- }
594
- // PHASE 4: FILE-BASED DETECTION (when package.json unavailable or inconclusive)
595
- // ============================================================================
596
- const ignorePatterns = await (0, fafignore_parser_1.parseFafIgnore)(projectDir);
597
- // File-based detection - using native file finder (NO GLOB!)
598
- const files = await native_file_finder_1.globReplacements.allSource(projectDir, {
599
- ignore: ignorePatterns.filter((p) => !p.startsWith("*.")) // Remove *.ext patterns
600
- });
601
- // ============================================================================
602
- // PRIORITY 5: PYTHON FILE DETECTION (fallback when no pyproject.toml/requirements.txt)
603
- // ============================================================================
604
- if (files.some((f) => f.endsWith(".py"))) {
605
- const pythonPatternType = await detectPythonPatterns(projectDir, files.filter((f) => f.endsWith(".py")));
606
- if (pythonPatternType !== "python-generic") {
607
- return pythonPatternType;
608
- }
609
- return "python-generic";
610
- }
611
- // ============================================================================
612
- // PRIORITY 6: FRAMEWORK FILE PATTERNS (when no package.json found)
613
- // ============================================================================
614
- // TypeScript file detection
615
- if (files.some((f) => f.endsWith(".ts") && !f.endsWith(".d.ts"))) {
616
- hasTypeScript = true;
617
- }
618
- // Check for framework-specific file extensions
619
- const hasSvelteFiles = files.some((f) => f.endsWith(".svelte"));
620
- const hasReactFiles = files.some((f) => f.endsWith(".jsx") || f.endsWith(".tsx"));
621
- const hasVueFiles = files.some((f) => f.endsWith(".vue"));
622
- if (hasSvelteFiles) {
623
- return hasTypeScript ? "svelte-ts" : "svelte";
624
- }
625
- if (hasReactFiles) {
626
- return hasTypeScript ? "react-ts" : "react";
627
- }
628
- if (hasVueFiles) {
629
- return hasTypeScript ? "vue-ts" : "vue";
630
- }
631
- // ============================================================================
632
- // PRIORITY 7: STATIC HTML DETECTION (no package.json, has HTML/CSS)
633
- // ============================================================================
634
- const hasIndexHtml = files.some((f) => f.endsWith('index.html') || f === 'index.html');
635
- const hasCssFiles = files.some((f) => f.endsWith('.css'));
636
- const hasHtmlFiles = files.some((f) => f.endsWith('.html'));
637
- // Check for package.json ONLY in project directory (not parent directories)
638
- const projectPackageJson = path_1.default.join(projectDir, 'package.json');
639
- const hasProjectPackageJson = await fileExists(projectPackageJson);
640
- // Detect static HTML: index.html without package.json in project dir + (CSS files OR other HTML files)
641
- if (hasIndexHtml && !hasProjectPackageJson && (hasCssFiles || hasHtmlFiles)) {
642
- return 'static-html';
643
- }
644
- // ============================================================================
645
- // PRIORITY 8: PURE TYPESCRIPT PROJECT (has .ts files but no framework)
646
- // ============================================================================
647
- if (hasTypeScript) {
648
- return "typescript";
649
- }
650
- // ============================================================================
651
- // FINAL FALLBACK: Unknown/early-stage project
652
- // ============================================================================
653
- return "latest-idea";
654
- }
655
- /**
656
- * Calculate days since file was modified
657
- */
658
- function daysSinceModified(date) {
659
- const now = new Date();
660
- const diffTime = Math.abs(now.getTime() - date.getTime());
661
- return Math.ceil(diffTime / (1000 * 60 * 60 * 24));
662
- }
663
- /**
664
- * Detect Python project type using dependency files (Option A)
665
- */
666
- async function detectPythonProjectType(projectDir) {
667
- // Priority order: pyproject.toml > requirements.txt
668
- const pyprojectPath = await findPyprojectToml(projectDir);
669
- if (pyprojectPath) {
670
- const framework = await analyzePyprojectToml(pyprojectPath);
671
- if (framework) {
672
- return framework;
673
- }
674
- }
675
- const requirementsPath = await findRequirementsTxt(projectDir);
676
- if (requirementsPath) {
677
- const framework = await analyzeRequirementsTxt(requirementsPath);
678
- if (framework) {
679
- return framework;
680
- }
681
- }
682
- return "latest-idea";
683
- }
684
- /**
685
- * Analyze pyproject.toml for Python frameworks
686
- */
687
- async function analyzePyprojectToml(filePath) {
688
- try {
689
- const content = await fs_1.promises.readFile(filePath, "utf-8");
690
- // Simple string-based detection for now (could use TOML parser later)
691
- if (content.includes("fastapi")) {
692
- return "python-fastapi";
693
- }
694
- if (content.includes("django")) {
695
- return "python-django";
696
- }
697
- if (content.includes("flask")) {
698
- return "python-flask";
699
- }
700
- if (content.includes("starlette")) {
701
- return "python-starlette";
702
- }
703
- // If it has Python dependencies but no specific framework
704
- if (content.includes("python = ")) {
705
- return "python-generic";
706
- }
707
- return null;
708
- }
709
- catch {
710
- return null;
711
- }
712
- }
713
- /**
714
- * Analyze requirements.txt for Python frameworks
715
- */
716
- async function analyzeRequirementsTxt(filePath) {
717
- try {
718
- const content = await fs_1.promises.readFile(filePath, "utf-8");
719
- if (content.includes("fastapi")) {
720
- return "python-fastapi";
721
- }
722
- if (content.includes("django")) {
723
- return "python-django";
724
- }
725
- if (content.includes("flask")) {
726
- return "python-flask";
727
- }
728
- if (content.includes("starlette")) {
729
- return "python-starlette";
730
- }
731
- // Any Python packages detected
732
- if (content.trim().length > 0) {
733
- return "python-generic";
734
- }
735
- return null;
736
- }
737
- catch {
738
- return null;
739
- }
740
- }
741
- /**
742
- * Detect Python frameworks using code patterns (Option B)
743
- */
744
- async function detectPythonPatterns(projectDir, pythonFiles) {
745
- try {
746
- // Check main Python files first (main.py, app.py, api.py)
747
- const mainFiles = pythonFiles.filter((f) => f.includes("main.py") || f.includes("app.py") || f.includes("api.py"));
748
- const filesToCheck = mainFiles.length > 0 ? mainFiles : pythonFiles.slice(0, 5);
749
- for (const file of filesToCheck) {
750
- const filePath = path_1.default.join(projectDir, file);
751
- try {
752
- const content = await fs_1.promises.readFile(filePath, "utf-8");
753
- // FastAPI patterns
754
- if (content.includes("from fastapi import") ||
755
- content.includes("FastAPI()")) {
756
- return "python-fastapi";
757
- }
758
- // Django patterns
759
- if (content.includes("from django.") ||
760
- content.includes("django.http")) {
761
- return "python-django";
762
- }
763
- // Flask patterns
764
- if (content.includes("from flask import") ||
765
- content.includes("Flask(")) {
766
- return "python-flask";
767
- }
768
- // Starlette patterns
769
- if (content.includes("from starlette.") ||
770
- content.includes("Starlette(")) {
771
- return "python-starlette";
772
- }
773
- }
774
- catch {
775
- continue;
776
- }
777
- }
778
- return "python-generic";
779
- }
780
- catch {
781
- return "python-generic";
782
- }
783
- }
784
- /**
785
- * Calculate TypeScript strictness level for F1-Inspired quality assessment
786
- */
787
- function calculateStrictnessLevel(compilerOptions) {
788
- let strictnessScore = 0;
789
- // Basic strictness
790
- if (compilerOptions.strict) {
791
- strictnessScore += 2;
792
- }
793
- if (compilerOptions.noImplicitAny) {
794
- strictnessScore += 1;
795
- }
796
- if (compilerOptions.strictNullChecks) {
797
- strictnessScore += 1;
798
- }
799
- // Advanced strictness
800
- if (compilerOptions.exactOptionalPropertyTypes) {
801
- strictnessScore += 2;
802
- }
803
- if (compilerOptions.noUncheckedIndexedAccess) {
804
- strictnessScore += 2;
805
- }
806
- if (compilerOptions.noImplicitReturns) {
807
- strictnessScore += 1;
808
- }
809
- if (compilerOptions.noFallthroughCasesInSwitch) {
810
- strictnessScore += 1;
811
- }
812
- if (compilerOptions.noUnusedLocals) {
813
- strictnessScore += 1;
814
- }
815
- if (compilerOptions.noUnusedParameters) {
816
- strictnessScore += 1;
817
- }
818
- // F1-Inspired ultra-strict
819
- if (compilerOptions.allowUnreachableCode === false) {
820
- strictnessScore += 1;
821
- }
822
- if (compilerOptions.allowUnusedLabels === false) {
823
- strictnessScore += 1;
824
- }
825
- if (compilerOptions.noPropertyAccessFromIndexSignature) {
826
- strictnessScore += 1;
827
- }
828
- if (compilerOptions.verbatimModuleSyntax) {
829
- strictnessScore += 1;
830
- }
831
- if (strictnessScore >= 12) {
832
- return "f1_inspired";
833
- }
834
- if (strictnessScore >= 8) {
835
- return "ultra_strict";
836
- }
837
- if (strictnessScore >= 4) {
838
- return "strict";
839
- }
840
- return "basic";
841
- }
842
- /**
843
- * Detect framework integration patterns
844
- */
845
- function detectFrameworkIntegration(compilerOptions, config) {
846
- const includes = config.include || [];
847
- const includesStr = includes.join(" ");
848
- // Svelte detection
849
- if (includesStr.includes("svelte") || config.extends?.includes("svelte")) {
850
- if (compilerOptions.verbatimModuleSyntax) {
851
- return "svelte_5_runes_native";
852
- }
853
- return "svelte_native";
854
- }
855
- // React detection
856
- if (compilerOptions.jsx) {
857
- if (compilerOptions.jsx === "react-jsx") {
858
- return "react_17_native";
859
- }
860
- return "react_native";
861
- }
862
- // Next.js detection
863
- if (config.extends?.includes("next")) {
864
- return "nextjs_native";
865
- }
866
- // Vue detection
867
- if (includesStr.includes("vue")) {
868
- return "vue_native";
869
- }
870
- // Node.js detection
871
- if (compilerOptions.moduleResolution === "NodeNext") {
872
- return "nodejs_native";
873
- }
874
- if (compilerOptions.module === "NodeNext") {
875
- return "nodejs_esm_native";
876
- }
877
- // Pure TypeScript project detection
878
- if (compilerOptions.target &&
879
- compilerOptions.module &&
880
- !compilerOptions.jsx) {
881
- return "pure_typescript";
882
- }
883
- return "standard";
884
- }
885
- /**
886
- * Detect performance optimizations
887
- */
888
- function detectPerformanceConfig(compilerOptions) {
889
- const optimizations = [];
890
- if (compilerOptions.target && compilerOptions.target.includes("2022")) {
891
- optimizations.push("modern_target_es2022");
892
- }
893
- if (compilerOptions.moduleResolution === "NodeNext") {
894
- optimizations.push("nodejs_native_modules");
895
- }
896
- if (compilerOptions.verbatimModuleSyntax) {
897
- optimizations.push("verbatim_module_syntax");
898
- }
899
- if (compilerOptions.isolatedModules) {
900
- optimizations.push("isolated_modules");
901
- }
902
- if (compilerOptions.skipLibCheck) {
903
- optimizations.push("skip_lib_check");
904
- }
905
- if (compilerOptions.allowImportingTsExtensions) {
906
- optimizations.push("ts_extension_imports");
907
- }
908
- return optimizations;
909
- }
910
- /**
911
- * Assess overall engineering quality based on configuration
912
- */
913
- function assessEngineeringQuality(compilerOptions) {
914
- let qualityScore = 0;
915
- // Quality indicators
916
- if (compilerOptions.declaration) {
917
- qualityScore += 1;
918
- }
919
- if (compilerOptions.declarationMap) {
920
- qualityScore += 1;
921
- }
922
- if (compilerOptions.sourceMap) {
923
- qualityScore += 1;
924
- }
925
- if (compilerOptions.forceConsistentCasingInFileNames) {
926
- qualityScore += 1;
927
- }
928
- if (compilerOptions.removeComments === false) {
929
- qualityScore += 1;
930
- } // Keeping docs
931
- // F1-Inspired indicators
932
- if (compilerOptions.exactOptionalPropertyTypes) {
933
- qualityScore += 2;
934
- }
935
- if (compilerOptions.noUncheckedIndexedAccess) {
936
- qualityScore += 2;
937
- }
938
- if (compilerOptions.verbatimModuleSyntax) {
939
- qualityScore += 2;
940
- }
941
- if (qualityScore >= 8) {
942
- return "f1_inspired";
943
- }
944
- if (qualityScore >= 5) {
945
- return "professional";
946
- }
947
- return "standard";
948
- }
949
- //# sourceMappingURL=file-utils.js.map