@backthread/extractor 0.1.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 (379) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +83 -0
  3. package/dist/cluster/domain-grouping.d.ts +113 -0
  4. package/dist/cluster/domain-grouping.d.ts.map +1 -0
  5. package/dist/cluster/domain-grouping.js +277 -0
  6. package/dist/cluster/domain-grouping.js.map +1 -0
  7. package/dist/cluster/grouping-gate.d.ts +54 -0
  8. package/dist/cluster/grouping-gate.d.ts.map +1 -0
  9. package/dist/cluster/grouping-gate.js +0 -0
  10. package/dist/cluster/grouping-gate.js.map +1 -0
  11. package/dist/cluster/louvain.d.ts +88 -0
  12. package/dist/cluster/louvain.d.ts.map +1 -0
  13. package/dist/cluster/louvain.js +674 -0
  14. package/dist/cluster/louvain.js.map +1 -0
  15. package/dist/cluster/overrides.d.ts +19 -0
  16. package/dist/cluster/overrides.d.ts.map +1 -0
  17. package/dist/cluster/overrides.js +32 -0
  18. package/dist/cluster/overrides.js.map +1 -0
  19. package/dist/cluster/subsystem.d.ts +45 -0
  20. package/dist/cluster/subsystem.d.ts.map +1 -0
  21. package/dist/cluster/subsystem.js +299 -0
  22. package/dist/cluster/subsystem.js.map +1 -0
  23. package/dist/cluster/workspaces.d.ts +64 -0
  24. package/dist/cluster/workspaces.d.ts.map +1 -0
  25. package/dist/cluster/workspaces.js +739 -0
  26. package/dist/cluster/workspaces.js.map +1 -0
  27. package/dist/extract.d.ts +52 -0
  28. package/dist/extract.d.ts.map +1 -0
  29. package/dist/extract.js +48 -0
  30. package/dist/extract.js.map +1 -0
  31. package/dist/framework/celery/celery.d.ts +17 -0
  32. package/dist/framework/celery/celery.d.ts.map +1 -0
  33. package/dist/framework/celery/celery.js +524 -0
  34. package/dist/framework/celery/celery.js.map +1 -0
  35. package/dist/framework/contribute-step.d.ts +38 -0
  36. package/dist/framework/contribute-step.d.ts.map +1 -0
  37. package/dist/framework/contribute-step.js +403 -0
  38. package/dist/framework/contribute-step.js.map +1 -0
  39. package/dist/framework/detect-step.d.ts +8 -0
  40. package/dist/framework/detect-step.d.ts.map +1 -0
  41. package/dist/framework/detect-step.js +54 -0
  42. package/dist/framework/detect-step.js.map +1 -0
  43. package/dist/framework/detect-util.d.ts +24 -0
  44. package/dist/framework/detect-util.d.ts.map +1 -0
  45. package/dist/framework/detect-util.js +59 -0
  46. package/dist/framework/detect-util.js.map +1 -0
  47. package/dist/framework/django/django.d.ts +22 -0
  48. package/dist/framework/django/django.d.ts.map +1 -0
  49. package/dist/framework/django/django.js +940 -0
  50. package/dist/framework/django/django.js.map +1 -0
  51. package/dist/framework/fastapi/fastapi.d.ts +27 -0
  52. package/dist/framework/fastapi/fastapi.d.ts.map +1 -0
  53. package/dist/framework/fastapi/fastapi.js +477 -0
  54. package/dist/framework/fastapi/fastapi.js.map +1 -0
  55. package/dist/framework/faststream/faststream.d.ts +19 -0
  56. package/dist/framework/faststream/faststream.d.ts.map +1 -0
  57. package/dist/framework/faststream/faststream.js +765 -0
  58. package/dist/framework/faststream/faststream.js.map +1 -0
  59. package/dist/framework/flask/flask.d.ts +17 -0
  60. package/dist/framework/flask/flask.d.ts.map +1 -0
  61. package/dist/framework/flask/flask.js +507 -0
  62. package/dist/framework/flask/flask.js.map +1 -0
  63. package/dist/framework/graphql/graphql.d.ts +17 -0
  64. package/dist/framework/graphql/graphql.d.ts.map +1 -0
  65. package/dist/framework/graphql/graphql.js +708 -0
  66. package/dist/framework/graphql/graphql.js.map +1 -0
  67. package/dist/framework/grpc/grpc.d.ts +22 -0
  68. package/dist/framework/grpc/grpc.d.ts.map +1 -0
  69. package/dist/framework/grpc/grpc.js +618 -0
  70. package/dist/framework/grpc/grpc.js.map +1 -0
  71. package/dist/framework/litestar/litestar.d.ts +17 -0
  72. package/dist/framework/litestar/litestar.d.ts.map +1 -0
  73. package/dist/framework/litestar/litestar.js +536 -0
  74. package/dist/framework/litestar/litestar.js.map +1 -0
  75. package/dist/framework/nest/nest.d.ts +19 -0
  76. package/dist/framework/nest/nest.d.ts.map +1 -0
  77. package/dist/framework/nest/nest.js +613 -0
  78. package/dist/framework/nest/nest.js.map +1 -0
  79. package/dist/framework/next/next.d.ts +22 -0
  80. package/dist/framework/next/next.d.ts.map +1 -0
  81. package/dist/framework/next/next.js +449 -0
  82. package/dist/framework/next/next.js.map +1 -0
  83. package/dist/framework/node/node.d.ts +24 -0
  84. package/dist/framework/node/node.d.ts.map +1 -0
  85. package/dist/framework/node/node.js +1009 -0
  86. package/dist/framework/node/node.js.map +1 -0
  87. package/dist/framework/orchestrator/orchestrator.d.ts +34 -0
  88. package/dist/framework/orchestrator/orchestrator.d.ts.map +1 -0
  89. package/dist/framework/orchestrator/orchestrator.js +691 -0
  90. package/dist/framework/orchestrator/orchestrator.js.map +1 -0
  91. package/dist/framework/orm/orm.d.ts +61 -0
  92. package/dist/framework/orm/orm.d.ts.map +1 -0
  93. package/dist/framework/orm/orm.js +620 -0
  94. package/dist/framework/orm/orm.js.map +1 -0
  95. package/dist/framework/python/analyze.d.ts +38 -0
  96. package/dist/framework/python/analyze.d.ts.map +1 -0
  97. package/dist/framework/python/analyze.js +98 -0
  98. package/dist/framework/python/analyze.js.map +1 -0
  99. package/dist/framework/python/py-ast.d.ts +130 -0
  100. package/dist/framework/python/py-ast.d.ts.map +1 -0
  101. package/dist/framework/python/py-ast.js +344 -0
  102. package/dist/framework/python/py-ast.js.map +1 -0
  103. package/dist/framework/python-orm/python-orm.d.ts +19 -0
  104. package/dist/framework/python-orm/python-orm.d.ts.map +1 -0
  105. package/dist/framework/python-orm/python-orm.js +516 -0
  106. package/dist/framework/python-orm/python-orm.js.map +1 -0
  107. package/dist/framework/react-native/react-native.d.ts +35 -0
  108. package/dist/framework/react-native/react-native.d.ts.map +1 -0
  109. package/dist/framework/react-native/react-native.js +1181 -0
  110. package/dist/framework/react-native/react-native.js.map +1 -0
  111. package/dist/framework/register.d.ts +2 -0
  112. package/dist/framework/register.d.ts.map +1 -0
  113. package/dist/framework/register.js +59 -0
  114. package/dist/framework/register.js.map +1 -0
  115. package/dist/framework/registry.d.ts +31 -0
  116. package/dist/framework/registry.d.ts.map +1 -0
  117. package/dist/framework/registry.js +70 -0
  118. package/dist/framework/registry.js.map +1 -0
  119. package/dist/framework/routing/expo-router.d.ts +31 -0
  120. package/dist/framework/routing/expo-router.d.ts.map +1 -0
  121. package/dist/framework/routing/expo-router.js +356 -0
  122. package/dist/framework/routing/expo-router.js.map +1 -0
  123. package/dist/framework/routing/index.d.ts +4 -0
  124. package/dist/framework/routing/index.d.ts.map +1 -0
  125. package/dist/framework/routing/index.js +16 -0
  126. package/dist/framework/routing/index.js.map +1 -0
  127. package/dist/framework/routing/next-router.d.ts +45 -0
  128. package/dist/framework/routing/next-router.d.ts.map +1 -0
  129. package/dist/framework/routing/next-router.js +378 -0
  130. package/dist/framework/routing/next-router.js.map +1 -0
  131. package/dist/framework/routing/route-tree.d.ts +73 -0
  132. package/dist/framework/routing/route-tree.d.ts.map +1 -0
  133. package/dist/framework/routing/route-tree.js +120 -0
  134. package/dist/framework/routing/route-tree.js.map +1 -0
  135. package/dist/framework/types.d.ts +230 -0
  136. package/dist/framework/types.d.ts.map +1 -0
  137. package/dist/framework/types.js +25 -0
  138. package/dist/framework/types.js.map +1 -0
  139. package/dist/graph/cross-language.d.ts +11 -0
  140. package/dist/graph/cross-language.d.ts.map +1 -0
  141. package/dist/graph/cross-language.js +123 -0
  142. package/dist/graph/cross-language.js.map +1 -0
  143. package/dist/graph/extract.d.ts +13 -0
  144. package/dist/graph/extract.d.ts.map +1 -0
  145. package/dist/graph/extract.js +79 -0
  146. package/dist/graph/extract.js.map +1 -0
  147. package/dist/graph/file-graph.d.ts +186 -0
  148. package/dist/graph/file-graph.d.ts.map +1 -0
  149. package/dist/graph/file-graph.js +427 -0
  150. package/dist/graph/file-graph.js.map +1 -0
  151. package/dist/graph/http-callsites.d.ts +14 -0
  152. package/dist/graph/http-callsites.d.ts.map +1 -0
  153. package/dist/graph/http-callsites.js +107 -0
  154. package/dist/graph/http-callsites.js.map +1 -0
  155. package/dist/graph/incremental.d.ts +122 -0
  156. package/dist/graph/incremental.d.ts.map +1 -0
  157. package/dist/graph/incremental.js +448 -0
  158. package/dist/graph/incremental.js.map +1 -0
  159. package/dist/graph/language.d.ts +31 -0
  160. package/dist/graph/language.d.ts.map +1 -0
  161. package/dist/graph/language.js +146 -0
  162. package/dist/graph/language.js.map +1 -0
  163. package/dist/graph/noise-filter.d.ts +46 -0
  164. package/dist/graph/noise-filter.d.ts.map +1 -0
  165. package/dist/graph/noise-filter.js +199 -0
  166. package/dist/graph/noise-filter.js.map +1 -0
  167. package/dist/graph/python-adapter.d.ts +36 -0
  168. package/dist/graph/python-adapter.d.ts.map +1 -0
  169. package/dist/graph/python-adapter.js +402 -0
  170. package/dist/graph/python-adapter.js.map +1 -0
  171. package/dist/graph/python-manifest.d.ts +22 -0
  172. package/dist/graph/python-manifest.d.ts.map +1 -0
  173. package/dist/graph/python-manifest.js +137 -0
  174. package/dist/graph/python-manifest.js.map +1 -0
  175. package/dist/graph/python-stdlib.d.ts +2 -0
  176. package/dist/graph/python-stdlib.d.ts.map +1 -0
  177. package/dist/graph/python-stdlib.js +53 -0
  178. package/dist/graph/python-stdlib.js.map +1 -0
  179. package/dist/graph/ts-morph-adapter.d.ts +65 -0
  180. package/dist/graph/ts-morph-adapter.d.ts.map +1 -0
  181. package/dist/graph/ts-morph-adapter.js +265 -0
  182. package/dist/graph/ts-morph-adapter.js.map +1 -0
  183. package/dist/graph/types.d.ts +37 -0
  184. package/dist/graph/types.d.ts.map +1 -0
  185. package/dist/graph/types.js +50 -0
  186. package/dist/graph/types.js.map +1 -0
  187. package/dist/index.d.ts +45 -0
  188. package/dist/index.d.ts.map +1 -0
  189. package/dist/index.js +51 -0
  190. package/dist/index.js.map +1 -0
  191. package/dist/infra/aws/aws-parse.d.ts +39 -0
  192. package/dist/infra/aws/aws-parse.d.ts.map +1 -0
  193. package/dist/infra/aws/aws-parse.js +149 -0
  194. package/dist/infra/aws/aws-parse.js.map +1 -0
  195. package/dist/infra/aws/aws.d.ts +6 -0
  196. package/dist/infra/aws/aws.d.ts.map +1 -0
  197. package/dist/infra/aws/aws.js +425 -0
  198. package/dist/infra/aws/aws.js.map +1 -0
  199. package/dist/infra/azure/azure-parse.d.ts +73 -0
  200. package/dist/infra/azure/azure-parse.d.ts.map +1 -0
  201. package/dist/infra/azure/azure-parse.js +178 -0
  202. package/dist/infra/azure/azure-parse.js.map +1 -0
  203. package/dist/infra/azure/azure.d.ts +12 -0
  204. package/dist/infra/azure/azure.d.ts.map +1 -0
  205. package/dist/infra/azure/azure.js +673 -0
  206. package/dist/infra/azure/azure.js.map +1 -0
  207. package/dist/infra/cloudflare/cloudflare.d.ts +50 -0
  208. package/dist/infra/cloudflare/cloudflare.d.ts.map +1 -0
  209. package/dist/infra/cloudflare/cloudflare.js +382 -0
  210. package/dist/infra/cloudflare/cloudflare.js.map +1 -0
  211. package/dist/infra/cloudflare/wrangler-parse.d.ts +6 -0
  212. package/dist/infra/cloudflare/wrangler-parse.d.ts.map +1 -0
  213. package/dist/infra/cloudflare/wrangler-parse.js +278 -0
  214. package/dist/infra/cloudflare/wrangler-parse.js.map +1 -0
  215. package/dist/infra/compose/compose-parse.d.ts +24 -0
  216. package/dist/infra/compose/compose-parse.d.ts.map +1 -0
  217. package/dist/infra/compose/compose-parse.js +77 -0
  218. package/dist/infra/compose/compose-parse.js.map +1 -0
  219. package/dist/infra/compose/compose.d.ts +12 -0
  220. package/dist/infra/compose/compose.d.ts.map +1 -0
  221. package/dist/infra/compose/compose.js +201 -0
  222. package/dist/infra/compose/compose.js.map +1 -0
  223. package/dist/infra/convex/convex-parse.d.ts +28 -0
  224. package/dist/infra/convex/convex-parse.d.ts.map +1 -0
  225. package/dist/infra/convex/convex-parse.js +74 -0
  226. package/dist/infra/convex/convex-parse.js.map +1 -0
  227. package/dist/infra/convex/convex.d.ts +18 -0
  228. package/dist/infra/convex/convex.d.ts.map +1 -0
  229. package/dist/infra/convex/convex.js +199 -0
  230. package/dist/infra/convex/convex.js.map +1 -0
  231. package/dist/infra/digitalocean/digitalocean.d.ts +33 -0
  232. package/dist/infra/digitalocean/digitalocean.d.ts.map +1 -0
  233. package/dist/infra/digitalocean/digitalocean.js +204 -0
  234. package/dist/infra/digitalocean/digitalocean.js.map +1 -0
  235. package/dist/infra/firebase/firebase.d.ts +43 -0
  236. package/dist/infra/firebase/firebase.d.ts.map +1 -0
  237. package/dist/infra/firebase/firebase.js +271 -0
  238. package/dist/infra/firebase/firebase.js.map +1 -0
  239. package/dist/infra/fly/fly-parse.d.ts +52 -0
  240. package/dist/infra/fly/fly-parse.d.ts.map +1 -0
  241. package/dist/infra/fly/fly-parse.js +114 -0
  242. package/dist/infra/fly/fly-parse.js.map +1 -0
  243. package/dist/infra/fly/fly.d.ts +15 -0
  244. package/dist/infra/fly/fly.d.ts.map +1 -0
  245. package/dist/infra/fly/fly.js +265 -0
  246. package/dist/infra/fly/fly.js.map +1 -0
  247. package/dist/infra/gcp/gcp-parse.d.ts +24 -0
  248. package/dist/infra/gcp/gcp-parse.d.ts.map +1 -0
  249. package/dist/infra/gcp/gcp-parse.js +123 -0
  250. package/dist/infra/gcp/gcp-parse.js.map +1 -0
  251. package/dist/infra/gcp/gcp.d.ts +10 -0
  252. package/dist/infra/gcp/gcp.d.ts.map +1 -0
  253. package/dist/infra/gcp/gcp.js +502 -0
  254. package/dist/infra/gcp/gcp.js.map +1 -0
  255. package/dist/infra/heroku/heroku-parse.d.ts +33 -0
  256. package/dist/infra/heroku/heroku-parse.d.ts.map +1 -0
  257. package/dist/infra/heroku/heroku-parse.js +63 -0
  258. package/dist/infra/heroku/heroku-parse.js.map +1 -0
  259. package/dist/infra/heroku/heroku.d.ts +24 -0
  260. package/dist/infra/heroku/heroku.d.ts.map +1 -0
  261. package/dist/infra/heroku/heroku.js +253 -0
  262. package/dist/infra/heroku/heroku.js.map +1 -0
  263. package/dist/infra/image-resolve.d.ts +56 -0
  264. package/dist/infra/image-resolve.d.ts.map +1 -0
  265. package/dist/infra/image-resolve.js +229 -0
  266. package/dist/infra/image-resolve.js.map +1 -0
  267. package/dist/infra/infra-step.d.ts +39 -0
  268. package/dist/infra/infra-step.d.ts.map +1 -0
  269. package/dist/infra/infra-step.js +57 -0
  270. package/dist/infra/infra-step.js.map +1 -0
  271. package/dist/infra/k8s/index.d.ts +78 -0
  272. package/dist/infra/k8s/index.d.ts.map +1 -0
  273. package/dist/infra/k8s/index.js +251 -0
  274. package/dist/infra/k8s/index.js.map +1 -0
  275. package/dist/infra/kamal/kamal-parse.d.ts +23 -0
  276. package/dist/infra/kamal/kamal-parse.d.ts.map +1 -0
  277. package/dist/infra/kamal/kamal-parse.js +66 -0
  278. package/dist/infra/kamal/kamal-parse.js.map +1 -0
  279. package/dist/infra/kamal/kamal.d.ts +17 -0
  280. package/dist/infra/kamal/kamal.d.ts.map +1 -0
  281. package/dist/infra/kamal/kamal.js +162 -0
  282. package/dist/infra/kamal/kamal.js.map +1 -0
  283. package/dist/infra/netlify/netlify.d.ts +33 -0
  284. package/dist/infra/netlify/netlify.d.ts.map +1 -0
  285. package/dist/infra/netlify/netlify.js +247 -0
  286. package/dist/infra/netlify/netlify.js.map +1 -0
  287. package/dist/infra/opentofu/opentofu.d.ts +3 -0
  288. package/dist/infra/opentofu/opentofu.d.ts.map +1 -0
  289. package/dist/infra/opentofu/opentofu.js +157 -0
  290. package/dist/infra/opentofu/opentofu.js.map +1 -0
  291. package/dist/infra/pulumi/pulumi-parse.d.ts +60 -0
  292. package/dist/infra/pulumi/pulumi-parse.d.ts.map +1 -0
  293. package/dist/infra/pulumi/pulumi-parse.js +155 -0
  294. package/dist/infra/pulumi/pulumi-parse.js.map +1 -0
  295. package/dist/infra/pulumi/pulumi.d.ts +23 -0
  296. package/dist/infra/pulumi/pulumi.d.ts.map +1 -0
  297. package/dist/infra/pulumi/pulumi.js +260 -0
  298. package/dist/infra/pulumi/pulumi.js.map +1 -0
  299. package/dist/infra/railway/railway-parse.d.ts +54 -0
  300. package/dist/infra/railway/railway-parse.d.ts.map +1 -0
  301. package/dist/infra/railway/railway-parse.js +200 -0
  302. package/dist/infra/railway/railway-parse.js.map +1 -0
  303. package/dist/infra/railway/railway.d.ts +19 -0
  304. package/dist/infra/railway/railway.d.ts.map +1 -0
  305. package/dist/infra/railway/railway.js +397 -0
  306. package/dist/infra/railway/railway.js.map +1 -0
  307. package/dist/infra/register.d.ts +2 -0
  308. package/dist/infra/register.d.ts.map +1 -0
  309. package/dist/infra/register.js +81 -0
  310. package/dist/infra/register.js.map +1 -0
  311. package/dist/infra/registry.d.ts +64 -0
  312. package/dist/infra/registry.d.ts.map +1 -0
  313. package/dist/infra/registry.js +205 -0
  314. package/dist/infra/registry.js.map +1 -0
  315. package/dist/infra/relevance.d.ts +16 -0
  316. package/dist/infra/relevance.d.ts.map +1 -0
  317. package/dist/infra/relevance.js +132 -0
  318. package/dist/infra/relevance.js.map +1 -0
  319. package/dist/infra/render/render-parse.d.ts +76 -0
  320. package/dist/infra/render/render-parse.d.ts.map +1 -0
  321. package/dist/infra/render/render-parse.js +155 -0
  322. package/dist/infra/render/render-parse.js.map +1 -0
  323. package/dist/infra/render/render.d.ts +11 -0
  324. package/dist/infra/render/render.d.ts.map +1 -0
  325. package/dist/infra/render/render.js +303 -0
  326. package/dist/infra/render/render.js.map +1 -0
  327. package/dist/infra/sst/sst-parse.d.ts +25 -0
  328. package/dist/infra/sst/sst-parse.d.ts.map +1 -0
  329. package/dist/infra/sst/sst-parse.js +45 -0
  330. package/dist/infra/sst/sst-parse.js.map +1 -0
  331. package/dist/infra/sst/sst.d.ts +19 -0
  332. package/dist/infra/sst/sst.d.ts.map +1 -0
  333. package/dist/infra/sst/sst.js +236 -0
  334. package/dist/infra/sst/sst.js.map +1 -0
  335. package/dist/infra/supabase/supabase-parse.d.ts +34 -0
  336. package/dist/infra/supabase/supabase-parse.d.ts.map +1 -0
  337. package/dist/infra/supabase/supabase-parse.js +113 -0
  338. package/dist/infra/supabase/supabase-parse.js.map +1 -0
  339. package/dist/infra/supabase/supabase.d.ts +15 -0
  340. package/dist/infra/supabase/supabase.d.ts.map +1 -0
  341. package/dist/infra/supabase/supabase.js +198 -0
  342. package/dist/infra/supabase/supabase.js.map +1 -0
  343. package/dist/infra/terraform/hcl-parse.d.ts +34 -0
  344. package/dist/infra/terraform/hcl-parse.d.ts.map +1 -0
  345. package/dist/infra/terraform/hcl-parse.js +203 -0
  346. package/dist/infra/terraform/hcl-parse.js.map +1 -0
  347. package/dist/infra/terraform/terraform.d.ts +14 -0
  348. package/dist/infra/terraform/terraform.d.ts.map +1 -0
  349. package/dist/infra/terraform/terraform.js +264 -0
  350. package/dist/infra/terraform/terraform.js.map +1 -0
  351. package/dist/infra/types.d.ts +151 -0
  352. package/dist/infra/types.d.ts.map +1 -0
  353. package/dist/infra/types.js +14 -0
  354. package/dist/infra/types.js.map +1 -0
  355. package/dist/infra/vercel/vercel-parse.d.ts +70 -0
  356. package/dist/infra/vercel/vercel-parse.d.ts.map +1 -0
  357. package/dist/infra/vercel/vercel-parse.js +194 -0
  358. package/dist/infra/vercel/vercel-parse.js.map +1 -0
  359. package/dist/infra/vercel/vercel.d.ts +30 -0
  360. package/dist/infra/vercel/vercel.d.ts.map +1 -0
  361. package/dist/infra/vercel/vercel.js +523 -0
  362. package/dist/infra/vercel/vercel.js.map +1 -0
  363. package/dist/infra/walk.d.ts +36 -0
  364. package/dist/infra/walk.d.ts.map +1 -0
  365. package/dist/infra/walk.js +85 -0
  366. package/dist/infra/walk.js.map +1 -0
  367. package/dist/safety.d.ts +13 -0
  368. package/dist/safety.d.ts.map +1 -0
  369. package/dist/safety.js +67 -0
  370. package/dist/safety.js.map +1 -0
  371. package/dist/types.d.ts +47 -0
  372. package/dist/types.d.ts.map +1 -0
  373. package/dist/types.js +111 -0
  374. package/dist/types.js.map +1 -0
  375. package/dist/version.d.ts +2 -0
  376. package/dist/version.d.ts.map +1 -0
  377. package/dist/version.js +35 -0
  378. package/dist/version.js.map +1 -0
  379. package/package.json +65 -0
@@ -0,0 +1,403 @@
1
+ // (Slice A) — the GENERIC framework contribution-consumption step.
2
+ //
3
+ // The post-cluster sibling of scripts/ingest/infra/infra-step.ts. Where the
4
+ // detect-step ( Slice 1) only LOGS the detected-stack manifest, THIS step
5
+ // is what finally consumes it: for every detected adapter it runs the
6
+ // `syntheticEdges` + `roleTags` hooks and folds their contributions into the
7
+ // render graph. It is FRAMEWORK-AGNOSTIC — the RN adapter is the first client,
8
+ // and Next/Nest/Node/ORM reuse it unchanged.
9
+ //
10
+ // Founder decision (2026-06-26): render-only, POST-CLUSTER ("connect now, group
11
+ // later") — this runs AFTER clusterGraph + enrich, BEFORE assemble.
12
+ //
13
+ // What it does:
14
+ // * resolves each contribution's FILE-id endpoints → MODULE ids via the
15
+ // cluster's fileModuleMap (a screen file lands in its module);
16
+ // * DROPS self-edges (intra-module navigation collapses) + dedupes on
17
+ // (source, target, kind); validates every edge is one of the 8 verbs
18
+ // (parseEdgeKind — the same fail-loud boundary assemble + persist trust);
19
+ // * collapses role tags to ONE per module (highest RoleTag.priority, lexical
20
+ // tiebreak) — pure metadata; the module's `kind` is UNCHANGED (roles never
21
+ // widen the Module-kind enum);
22
+ // * consumes each adapter's `groupingPrior` (FrameworkGroup[]) and
23
+ // OVERRIDES the subsystem of every claimed module (see SUBSYSTEM OVERRIDE
24
+ // below). This is the only place that mutates `cluster`;
25
+ // * LOGS counts + everything unresolved/dropped — no silent caps.
26
+ //
27
+ // ── SUBSYSTEM OVERRIDE — the shared framework-grouping mechanism ──
28
+ // A framework's `groupingPrior` declares the AUTHORITATIVE grouping (a NestJS
29
+ // `@Module`, a Next route group): a named set of FILE ids that belong in ONE
30
+ // subsystem regardless of where they sit on disk. We resolve each group's files
31
+ // to MODULE ids and, for every claimed module, set its subsystem to the group.
32
+ //
33
+ // HOW (without touching assemble / cluster code): subsystems are computed inside
34
+ // assemble by computeSubsystems(cluster.modules), whose precedence is
35
+ // external > workspace-package (packageId) > directory.
36
+ // `packageId` is the EXISTING "a declared boundary beats directory
37
+ // clustering" lever, read ONLY by computeSubsystems. A framework group is exactly
38
+ // that shape, so we ride it: we MUTATE the claimed ClusteredModule in place —
39
+ // packageId = `<adapter>:<group.id>` (namespaced, deterministic, never an index),
40
+ // packageName = the group label, packageRole = cleared (a framework group is a
41
+ // domain boundary, not an app/lib/tooling package). assemble then renders the
42
+ // override naturally. This runs BEFORE assemble, so the rendered grouping — and
43
+ // the semantic-zoom subsystem super-nodes that aggregate by `Module.subsystem`
44
+ // — reflect it with no change to the zoom machinery.
45
+ //
46
+ // PRECEDENCE we implement: framework group > workspace-package > directory.
47
+ // (We overwrite packageId, so the group beats both an inherited workspace package
48
+ // AND the directory heuristic.) `external` / infra-namespaced modules are NEVER
49
+ // claimed (they have no source files in a group anyway, and we skip them
50
+ // defensively), so the `external` subsystem still wins — the partition stays total.
51
+ //
52
+ // A module claimed by more than one group goes to the group that claims the MOST
53
+ // of its files (lexical group-id tiebreak); the collision is LOGGED, never a
54
+ // silent pick. When no adapter supplies a group, this is a complete no-op — the
55
+ // cluster is untouched and assemble is byte-identical (the headline invariant).
56
+ //
57
+ // Detection runs INTERNALLY here (not reusing the once-per-clone detect-step log)
58
+ // so the manifest matches THIS tree: the hosted merge walk re-runs the step at
59
+ // each checkpoint's checked-out tree, and a repo may have adopted RN partway
60
+ // through its history. Cheap (file-exists + one package.json read per adapter).
61
+ //
62
+ // Degrade, don't abort (mirrors extractInfra's call-site discipline): a malformed
63
+ // adapter must never sink an otherwise-good snapshot — a throw anywhere degrades
64
+ // to the empty contribution + a warning, and the snapshot assembles without it.
65
+ import { ModuleId, parseEdgeKind } from '../types.js';
66
+ import { crossLanguageApiEdges } from '../graph/cross-language.js';
67
+ import { registerBuiltinFrameworkAdapters } from './register.js';
68
+ import { detectFrameworks, listFrameworkAdapters } from './registry.js';
69
+ const EMPTY = {
70
+ edges: [],
71
+ roles: new Map(),
72
+ subsystems: new Map(),
73
+ counts: {
74
+ adapters: 0,
75
+ rawEdges: 0,
76
+ edges: 0,
77
+ droppedSelf: 0,
78
+ droppedUnresolved: 0,
79
+ droppedBadKind: 0,
80
+ roles: 0,
81
+ groups: 0,
82
+ groupedModules: 0,
83
+ droppedGroupUnresolved: 0,
84
+ },
85
+ };
86
+ export async function contributeFrameworkGraph(args) {
87
+ const { repoDir, graph, cluster } = args;
88
+ try {
89
+ registerBuiltinFrameworkAdapters();
90
+ const manifest = await detectFrameworks(repoDir);
91
+ // the cross-language full-stack seam (frontend→backend HTTP-API
92
+ // edges) is computed from the graph + a direct FastAPI-surface parse, NOT from
93
+ // the framework manifest, so it fires even when the FastAPI backend sits in a
94
+ // nested package the root detect didn't claim. Empty for a single-language repo
95
+ // (so single-language output stays byte-identical). File-id space; folded
96
+ // through the SAME resolve/dedup as the adapters' syntheticEdges below.
97
+ let xlangEdges = [];
98
+ try {
99
+ xlangEdges = crossLanguageApiEdges({ repoDir, graph });
100
+ }
101
+ catch (err) {
102
+ console.warn(` ⚠ cross-language linking failed (${err.message}) — continuing without the full-stack seam`);
103
+ }
104
+ if (manifest.matches.length === 0 && xlangEdges.length === 0) {
105
+ // No framework detected AND no cross-language seam → generic behavior unchanged.
106
+ return EMPTY;
107
+ }
108
+ const adaptersByName = new Map(listFrameworkAdapters().map((a) => [a.name, a]));
109
+ const moduleIds = new Set(cluster.modules.map((m) => m.id));
110
+ const fileModuleMap = cluster.fileModuleMap;
111
+ // file id or module id → module id (or null when it resolves to nothing on
112
+ // the canvas — a dropped file, or an endpoint outside the cluster).
113
+ const resolve = (id) => {
114
+ if (moduleIds.has(id))
115
+ return id;
116
+ const viaFile = fileModuleMap[id];
117
+ if (viaFile && moduleIds.has(viaFile))
118
+ return viaFile;
119
+ return null;
120
+ };
121
+ const edgesByKey = new Map();
122
+ // moduleId → the highest-priority role seen + the distinct roles that landed
123
+ // on it (for the collapse log).
124
+ const roleByModule = new Map();
125
+ const distinctRolesByModule = new Map();
126
+ let rawEdges = 0;
127
+ let droppedSelf = 0;
128
+ let droppedUnresolved = 0;
129
+ let droppedBadKind = 0;
130
+ const unresolvedEndpoints = new Set();
131
+ // grouping priors collected across adapters, namespaced by adapter
132
+ // (`<adapter>:<group.id>`) so two adapters' groups never collide. Resolved +
133
+ // applied as a subsystem override AFTER the loop (see below).
134
+ const groupsByKey = new Map();
135
+ let rawGroups = 0;
136
+ let droppedGroupUnresolved = 0;
137
+ for (const match of manifest.matches) {
138
+ const adapter = adaptersByName.get(match.adapter);
139
+ if (!adapter)
140
+ continue;
141
+ const ctx = {
142
+ repoDir,
143
+ rootPath: match.rootPath,
144
+ match,
145
+ graph,
146
+ cluster: { fileModuleMap, moduleIds },
147
+ };
148
+ // --- syntheticEdges ---------------------------------------------------
149
+ if (adapter.syntheticEdges) {
150
+ let fwEdges = [];
151
+ try {
152
+ fwEdges = await adapter.syntheticEdges(ctx);
153
+ }
154
+ catch (err) {
155
+ console.warn(` ⚠ framework adapter '${match.adapter}' syntheticEdges failed (${err.message}) — skipping its edges`);
156
+ fwEdges = [];
157
+ }
158
+ for (const fe of fwEdges) {
159
+ rawEdges++;
160
+ const src = resolve(fe.source);
161
+ const tgt = resolve(fe.target);
162
+ if (!src || !tgt) {
163
+ droppedUnresolved++;
164
+ if (!src)
165
+ unresolvedEndpoints.add(fe.source);
166
+ if (!tgt)
167
+ unresolvedEndpoints.add(fe.target);
168
+ continue;
169
+ }
170
+ if (src === tgt) {
171
+ // Intra-module contribution (e.g. navigation within one cluster)
172
+ // collapses to a self-edge — dropped at the producer, exactly as
173
+ // aggregateModuleEdges + the infra join do.
174
+ droppedSelf++;
175
+ continue;
176
+ }
177
+ let kind;
178
+ try {
179
+ kind = parseEdgeKind(fe.kind);
180
+ }
181
+ catch (err) {
182
+ // A non-8-verb framework edge is a producer bug; drop + log it
183
+ // rather than sink the snapshot (degrade-on-throw).
184
+ droppedBadKind++;
185
+ console.warn(` ⚠ framework adapter '${match.adapter}' emitted ${err.message}`);
186
+ continue;
187
+ }
188
+ const key = `${src}→${tgt}:${kind}`;
189
+ if (!edgesByKey.has(key)) {
190
+ edgesByKey.set(key, { source: ModuleId(src), target: ModuleId(tgt), kind });
191
+ }
192
+ }
193
+ }
194
+ // --- roleTags ---------------------------------------------------------
195
+ if (adapter.roleTags) {
196
+ let tags = new Map();
197
+ try {
198
+ tags = await adapter.roleTags(ctx);
199
+ }
200
+ catch (err) {
201
+ console.warn(` ⚠ framework adapter '${match.adapter}' roleTags failed (${err.message}) — skipping its roles`);
202
+ tags = new Map();
203
+ }
204
+ for (const [endpoint, tag] of tags) {
205
+ const moduleId = resolve(endpoint);
206
+ if (!moduleId) {
207
+ unresolvedEndpoints.add(endpoint);
208
+ continue;
209
+ }
210
+ let seen = distinctRolesByModule.get(moduleId);
211
+ if (!seen) {
212
+ seen = new Set();
213
+ distinctRolesByModule.set(moduleId, seen);
214
+ }
215
+ seen.add(tag.role);
216
+ const cur = roleByModule.get(moduleId);
217
+ if (cur === undefined || beats(tag, cur))
218
+ roleByModule.set(moduleId, tag);
219
+ }
220
+ }
221
+ // --- groupingPrior ------------------------------------------
222
+ // Collect now (in FILE-id space); resolve + apply as a subsystem override
223
+ // after the loop, so a group spanning several adapters'/modules' files is
224
+ // arbitrated globally. classificationsNeeded is deferred (not run here).
225
+ if (adapter.groupingPrior) {
226
+ let prior;
227
+ try {
228
+ prior = await adapter.groupingPrior(ctx);
229
+ }
230
+ catch (err) {
231
+ console.warn(` ⚠ framework adapter '${match.adapter}' groupingPrior failed (${err.message}) — skipping its groups`);
232
+ prior = undefined;
233
+ }
234
+ for (const group of prior?.groups ?? []) {
235
+ rawGroups++;
236
+ // Namespace the id by adapter (the documented FrameworkGroup contract)
237
+ // so it's a unique, deterministic subsystem id across adapters.
238
+ const key = `${match.adapter}:${group.id}`;
239
+ const existing = groupsByKey.get(key);
240
+ if (existing)
241
+ existing.fileIds.push(...group.fileIds);
242
+ else
243
+ groupsByKey.set(key, { label: group.label, fileIds: [...group.fileIds] });
244
+ }
245
+ }
246
+ }
247
+ // --- cross-language full-stack seam ----------------------------
248
+ // Fold the frontend→backend HTTP-API edges through the SAME file-id→module
249
+ // resolution + self-edge drop + 8-verb validation + dedup as the adapter
250
+ // syntheticEdges above (so a seam edge that duplicates a structural edge, or
251
+ // collapses to one module, is handled identically).
252
+ for (const fe of xlangEdges) {
253
+ rawEdges++;
254
+ const src = resolve(fe.source);
255
+ const tgt = resolve(fe.target);
256
+ if (!src || !tgt) {
257
+ droppedUnresolved++;
258
+ if (!src)
259
+ unresolvedEndpoints.add(fe.source);
260
+ if (!tgt)
261
+ unresolvedEndpoints.add(fe.target);
262
+ continue;
263
+ }
264
+ if (src === tgt) {
265
+ droppedSelf++;
266
+ continue;
267
+ }
268
+ let kind;
269
+ try {
270
+ kind = parseEdgeKind(fe.kind);
271
+ }
272
+ catch (err) {
273
+ droppedBadKind++;
274
+ console.warn(` ⚠ cross-language edge emitted ${err.message}`);
275
+ continue;
276
+ }
277
+ const key = `${src}→${tgt}:${kind}`;
278
+ if (!edgesByKey.has(key)) {
279
+ edgesByKey.set(key, { source: ModuleId(src), target: ModuleId(tgt), kind });
280
+ }
281
+ }
282
+ if (xlangEdges.length > 0) {
283
+ console.log(` [cross-language] ${xlangEdges.length} frontend→backend API edge(s) contributed`);
284
+ }
285
+ // --- apply the grouping override -------------------------------
286
+ // Resolve every group's FILE ids → MODULE ids, tally per-module group claims,
287
+ // assign each claimed module to the group claiming the MOST of its files
288
+ // (lexical group-key tiebreak), and MUTATE that ClusteredModule's packageId/
289
+ // packageName so assemble's computeSubsystems renders the framework grouping
290
+ // (precedence: framework group > workspace-package > directory). See the
291
+ // SUBSYSTEM OVERRIDE note at the top of this file.
292
+ const subsystems = new Map();
293
+ if (groupsByKey.size > 0) {
294
+ const moduleById = new Map(cluster.modules.map((m) => [m.id, m]));
295
+ // moduleId → groupKey → count of that group's files landing in the module.
296
+ const claims = new Map();
297
+ const labelByKey = new Map();
298
+ const unresolvedGroupFiles = new Set();
299
+ for (const [key, group] of groupsByKey) {
300
+ labelByKey.set(key, group.label);
301
+ for (const fileId of group.fileIds) {
302
+ const moduleId = resolve(fileId);
303
+ const mod = moduleId ? moduleById.get(moduleId) : undefined;
304
+ // Never claim an external / infra-namespaced module (it has no source
305
+ // dir → it belongs to the fixed `external` subsystem, which outranks).
306
+ if (!moduleId || !mod || mod.kind === 'external' || moduleId.includes(':')) {
307
+ droppedGroupUnresolved++;
308
+ unresolvedGroupFiles.add(fileId);
309
+ continue;
310
+ }
311
+ let byKey = claims.get(moduleId);
312
+ if (!byKey) {
313
+ byKey = new Map();
314
+ claims.set(moduleId, byKey);
315
+ }
316
+ byKey.set(key, (byKey.get(key) ?? 0) + 1);
317
+ }
318
+ }
319
+ // Deterministic assignment + collision logging (no silent pick).
320
+ for (const moduleId of [...claims.keys()].sort()) {
321
+ const byKey = claims.get(moduleId);
322
+ let winner = '';
323
+ let winnerCount = -1;
324
+ for (const [key, count] of byKey) {
325
+ if (count > winnerCount || (count === winnerCount && key < winner)) {
326
+ winner = key;
327
+ winnerCount = count;
328
+ }
329
+ }
330
+ if (byKey.size > 1) {
331
+ const all = [...byKey.entries()].map(([k, c]) => `${k}×${c}`).sort().join(', ');
332
+ console.log(` [framework] module '${moduleId}' claimed by ${byKey.size} groups {${all}} → kept '${winner}'`);
333
+ }
334
+ const mod = moduleById.get(moduleId);
335
+ const label = labelByKey.get(winner) ?? winner;
336
+ // The override: ride 's packageId lever (read ONLY by
337
+ // computeSubsystems). Clear packageRole — a framework group is a domain
338
+ // boundary, not an app/lib/tooling package.
339
+ mod.packageId = winner;
340
+ mod.packageName = label;
341
+ mod.packageRole = undefined;
342
+ subsystems.set(moduleId, { id: winner, label });
343
+ }
344
+ // No silent caps: log group files that didn't resolve to a claimable
345
+ // module (mirrors the unresolved-endpoints log on the edges path).
346
+ if (unresolvedGroupFiles.size > 0) {
347
+ const sample = [...unresolvedGroupFiles].sort().slice(0, 10);
348
+ console.log(` [framework] ${unresolvedGroupFiles.size} group file(s) didn't resolve to a claimable module (not regrouped): ${sample.join(', ')}` +
349
+ (unresolvedGroupFiles.size > sample.length ? ' …' : ''));
350
+ }
351
+ }
352
+ // No silent caps: log unresolved endpoints + per-module role collapses.
353
+ if (unresolvedEndpoints.size > 0) {
354
+ const sample = [...unresolvedEndpoints].sort().slice(0, 10);
355
+ console.log(` [framework] ${unresolvedEndpoints.size} endpoint(s) didn't resolve to a module (dropped): ${sample.join(', ')}` +
356
+ (unresolvedEndpoints.size > sample.length ? ' …' : ''));
357
+ }
358
+ for (const [moduleId, set] of distinctRolesByModule) {
359
+ if (set.size > 1) {
360
+ const winner = roleByModule.get(moduleId)?.role;
361
+ console.log(` [framework] module '${moduleId}' had ${set.size} roles {${[...set].sort().join(', ')}} → kept '${winner}'`);
362
+ }
363
+ }
364
+ const edges = [...edgesByKey.values()];
365
+ console.log(`→ framework contributions: ${edges.length} edge(s)` +
366
+ (droppedSelf ? ` · ${droppedSelf} self-edge(s) collapsed` : '') +
367
+ (droppedUnresolved ? ` · ${droppedUnresolved} unresolved` : '') +
368
+ (droppedBadKind ? ` · ${droppedBadKind} bad-kind` : '') +
369
+ ` · ${roleByModule.size} role(s)` +
370
+ (subsystems.size ? ` · ${subsystems.size} module(s) regrouped into ${new Set([...subsystems.values()].map((s) => s.id)).size} subsystem(s)` : ''));
371
+ return {
372
+ edges,
373
+ roles: roleByModule,
374
+ subsystems,
375
+ counts: {
376
+ adapters: manifest.matches.length,
377
+ rawEdges,
378
+ edges: edges.length,
379
+ droppedSelf,
380
+ droppedUnresolved,
381
+ droppedBadKind,
382
+ roles: roleByModule.size,
383
+ groups: rawGroups,
384
+ groupedModules: subsystems.size,
385
+ droppedGroupUnresolved,
386
+ },
387
+ };
388
+ }
389
+ catch (err) {
390
+ console.warn(` ⚠ framework contribution failed (${err.message}) — continuing without framework edges/roles`);
391
+ return EMPTY;
392
+ }
393
+ }
394
+ // Higher RoleTag.priority wins; lexical role tiebreak keeps it deterministic
395
+ // regardless of adapter/iteration order.
396
+ function beats(incoming, incumbent) {
397
+ const a = incoming.priority ?? 0;
398
+ const b = incumbent.priority ?? 0;
399
+ if (a !== b)
400
+ return a > b;
401
+ return incoming.role < incumbent.role;
402
+ }
403
+ //# sourceMappingURL=contribute-step.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contribute-step.js","sourceRoot":"","sources":["../../src/framework/contribute-step.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,4EAA4E;AAC5E,0EAA0E;AAC1E,sEAAsE;AACtE,6EAA6E;AAC7E,+EAA+E;AAC/E,6CAA6C;AAC7C,EAAE;AACF,gFAAgF;AAChF,oEAAoE;AACpE,EAAE;AACF,gBAAgB;AAChB,0EAA0E;AAC1E,mEAAmE;AACnE,wEAAwE;AACxE,yEAAyE;AACzE,8EAA8E;AAC9E,+EAA+E;AAC/E,+EAA+E;AAC/E,mCAAmC;AACnC,qEAAqE;AACrE,8EAA8E;AAC9E,6DAA6D;AAC7D,oEAAoE;AACpE,EAAE;AACF,qEAAqE;AACrE,8EAA8E;AAC9E,6EAA6E;AAC7E,gFAAgF;AAChF,+EAA+E;AAC/E,EAAE;AACF,iFAAiF;AACjF,sEAAsE;AACtE,gEAAgE;AAChE,mEAAmE;AACnE,kFAAkF;AAClF,8EAA8E;AAC9E,kFAAkF;AAClF,+EAA+E;AAC/E,8EAA8E;AAC9E,gFAAgF;AAChF,+EAA+E;AAC/E,qDAAqD;AACrD,EAAE;AACF,gFAAgF;AAChF,kFAAkF;AAClF,gFAAgF;AAChF,yEAAyE;AACzE,oFAAoF;AACpF,EAAE;AACF,iFAAiF;AACjF,6EAA6E;AAC7E,gFAAgF;AAChF,gFAAgF;AAChF,EAAE;AACF,kFAAkF;AAClF,+EAA+E;AAC/E,6EAA6E;AAC7E,gFAAgF;AAChF,EAAE;AACF,kFAAkF;AAClF,iFAAiF;AACjF,gFAAgF;AAEhF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a,CAAC,OAAO,8CAA8C,CAC3G,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,6EAA6E;AAC7E,yCAAyC;AACzC,SAAS,KAAK,CAAC,QAAiB,EAAE,SAAkB;IAClD,MAAM,CAAC,GAAG,QAAQ,CAAC,QAAQ,IAAI,CAAC,CAAC;IACjC,MAAM,CAAC,GAAG,SAAS,CAAC,QAAQ,IAAI,CAAC,CAAC;IAClC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1B,OAAO,QAAQ,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;AACxC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { FrameworkManifest } from './types.js';
2
+ /**
3
+ * Register the builtin framework adapters, detect the repo's stack, log the
4
+ * manifest, and return it. Cheap + deterministic; safe to call once per ingest
5
+ * before extraction.
6
+ */
7
+ export declare function detectFrameworkStack(repoDir: string): Promise<FrameworkManifest>;
8
+ //# sourceMappingURL=detect-step.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect-step.d.ts","sourceRoot":"","sources":["../../src/framework/detect-step.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAkBtF"}
@@ -0,0 +1,54 @@
1
+ // the framework-detection pipeline step.
2
+ //
3
+ // Mirrors scripts/ingest/infra/infra-step.ts (registerBuiltins → run): a single
4
+ // entry point both the local CLI (cli.ts) and the hosted container (container.ts)
5
+ // call IDENTICALLY, so the two twins stay mirrored. It registers the builtin
6
+ // adapters, runs the cheap detection gate, LOGS the detected-stack manifest, and
7
+ // returns it.
8
+ //
9
+ // SLICE 1: nothing downstream consumes the manifest yet — this step only logs.
10
+ // Generic-TS behavior is byte-for-byte unchanged when the manifest is empty (the
11
+ // detection is read-only: package.json reads + config-file existence checks, no
12
+ // mutation, no effect on the assembled snapshot). Adapters consume the manifest
13
+ // starting in .
14
+ import { registerBuiltinFrameworkAdapters } from './register.js';
15
+ import { detectFrameworks } from './registry.js';
16
+ /**
17
+ * Register the builtin framework adapters, detect the repo's stack, log the
18
+ * manifest, and return it. Cheap + deterministic; safe to call once per ingest
19
+ * before extraction.
20
+ */
21
+ export async function detectFrameworkStack(repoDir) {
22
+ // Degrade, don't abort (mirrors extractInfra's call-site discipline in cli.ts /
23
+ // container.ts): framework detection is purely ADDITIVE + log-only this slice,
24
+ // so a throwing adapter must never sink an otherwise-good ingest. RN's detect()
25
+ // can't throw today (all fs reads are guarded), but the contract invites more
26
+ // adapters — catch here, once, so BOTH call sites inherit the guarantee and stay
27
+ // identical, and fall through to the empty-manifest generic-TS path on failure.
28
+ try {
29
+ registerBuiltinFrameworkAdapters();
30
+ const manifest = await detectFrameworks(repoDir);
31
+ logManifest(manifest);
32
+ return manifest;
33
+ }
34
+ catch (err) {
35
+ console.warn(` ⚠ framework detection failed (${err.message}) — continuing without a framework manifest`);
36
+ return { root: repoDir, matches: [] };
37
+ }
38
+ }
39
+ // No silent caps ( constraint 7): log exactly what's detected (or the
40
+ // empty fallthrough), with each adapter's variant, root, and confidence.
41
+ function logManifest(manifest) {
42
+ if (manifest.matches.length === 0) {
43
+ console.log('→ framework detection: none — generic TS fallthrough');
44
+ return;
45
+ }
46
+ const summary = manifest.matches
47
+ .map((m) => {
48
+ const variant = typeof m.metadata?.variant === 'string' ? ` (${m.metadata.variant})` : '';
49
+ return `${m.adapter}${variant} @ ${m.rootPath || '.'} · conf ${m.confidence.toFixed(2)}`;
50
+ })
51
+ .join(', ');
52
+ console.log(`→ framework detection: ${manifest.matches.length} stack(s) — ${summary}`);
53
+ }
54
+ //# sourceMappingURL=detect-step.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect-step.js","sourceRoot":"","sources":["../../src/framework/detect-step.ts"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,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1F,OAAO,GAAG,CAAC,CAAC,OAAO,GAAG,OAAO,MAAM,CAAC,CAAC,QAAQ,IAAI,GAAG,WAAW,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3F,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,OAAO,CAAC,GAAG,CAAC,0BAA0B,QAAQ,CAAC,OAAO,CAAC,MAAM,eAAe,OAAO,EAAE,CAAC,CAAC;AACzF,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { FrameworkDetectContext } from './types.js';
2
+ /**
3
+ * The merged dependency map from a package.json (`dependencies` +
4
+ * `devDependencies`); `{}` on any read/parse error. Deterministic — no source,
5
+ * no install, just the manifest.
6
+ */
7
+ export declare function readDeps(baseDir: string): Record<string, string>;
8
+ /** True if any of `names` exists as a file/dir directly under `baseDir`. */
9
+ export declare function existsAny(baseDir: string, names: readonly string[]): boolean;
10
+ /** True if `rel` is an existing directory under `baseDir`. */
11
+ export declare function isDir(baseDir: string, rel: string): boolean;
12
+ /**
13
+ * Resolve the base dir + repo-relative posix rootPath a detect pass should scan.
14
+ * Mirrors the RN adapter: a workspace `packageDir` (the per-package fan-out shape,
15
+ * ) scopes the scan + reports its repo-relative path; absent ⇒ the repo
16
+ * root (`''`). Path is posix-normalized so manifests are stable cross-platform.
17
+ */
18
+ export declare function resolveBase(ctx: FrameworkDetectContext): {
19
+ base: string;
20
+ rootPath: string;
21
+ };
22
+ /** Clamp a raw confidence sum into the [0,1] DetectMatch range, 2-dp stable. */
23
+ export declare function clampConfidence(raw: number): number;
24
+ //# sourceMappingURL=detect-util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect-util.d.ts","sourceRoot":"","sources":["../../src/framework/detect-util.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUhE;AAED,4EAA4E;AAC5E,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAE5E;AAED,8DAA8D;AAC9D,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAM3D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,sBAAsB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAQ3F;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEnD"}
@@ -0,0 +1,59 @@
1
+ // (Slice 2) — shared detection helpers for the manifest+config-existence
2
+ // adapters (Next / Nest / Node / ORM).
3
+ //
4
+ // Every Slice-2 adapter keeps the SAME pure-builder / fs-adapter split the React
5
+ // Native adapter established: a thin fs layer (gather*Signals) reads package.json
6
+ // deps + config-file EXISTENCE only — never source content (never-store-source) —
7
+ // and a PURE scorer (score*) turns the deterministic signal set into a DetectMatch
8
+ // (or null = no match = generic-TS fallthrough). These helpers are the bits the
9
+ // four adapters would otherwise duplicate verbatim, factored once. (The RN adapter
10
+ // predates this and inlines its own copies — intentionally left untouched.)
11
+ import { existsSync, readFileSync, statSync } from 'node:fs';
12
+ import { join, relative } from 'node:path';
13
+ /**
14
+ * The merged dependency map from a package.json (`dependencies` +
15
+ * `devDependencies`); `{}` on any read/parse error. Deterministic — no source,
16
+ * no install, just the manifest.
17
+ */
18
+ export function readDeps(baseDir) {
19
+ try {
20
+ const pkg = JSON.parse(readFileSync(join(baseDir, 'package.json'), 'utf8'));
21
+ return { ...(pkg.dependencies ?? {}), ...(pkg.devDependencies ?? {}) };
22
+ }
23
+ catch {
24
+ return {};
25
+ }
26
+ }
27
+ /** True if any of `names` exists as a file/dir directly under `baseDir`. */
28
+ export function existsAny(baseDir, names) {
29
+ return names.some((n) => existsSync(join(baseDir, n)));
30
+ }
31
+ /** True if `rel` is an existing directory under `baseDir`. */
32
+ export function isDir(baseDir, rel) {
33
+ try {
34
+ return statSync(join(baseDir, rel)).isDirectory();
35
+ }
36
+ catch {
37
+ return false;
38
+ }
39
+ }
40
+ /**
41
+ * Resolve the base dir + repo-relative posix rootPath a detect pass should scan.
42
+ * Mirrors the RN adapter: a workspace `packageDir` (the per-package fan-out shape,
43
+ * ) scopes the scan + reports its repo-relative path; absent ⇒ the repo
44
+ * root (`''`). Path is posix-normalized so manifests are stable cross-platform.
45
+ */
46
+ export function resolveBase(ctx) {
47
+ if (ctx.packageDir) {
48
+ return {
49
+ base: ctx.packageDir,
50
+ rootPath: relative(ctx.repoDir, ctx.packageDir).split('\\').join('/'),
51
+ };
52
+ }
53
+ return { base: ctx.repoDir, rootPath: '' };
54
+ }
55
+ /** Clamp a raw confidence sum into the [0,1] DetectMatch range, 2-dp stable. */
56
+ export function clampConfidence(raw) {
57
+ return Math.min(1, Math.max(0, Number(raw.toFixed(2))));
58
+ }
59
+ //# sourceMappingURL=detect-util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect-util.js","sourceRoot":"","sources":["../../src/framework/detect-util.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,uCAAuC;AACvC,EAAE;AACF,iFAAiF;AACjF,kFAAkF;AAClF,kFAAkF;AAClF,mFAAmF;AACnF,gFAAgF;AAChF,mFAAmF;AACnF,4EAA4E;AAE5E,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAG3C;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAe;IACtC,IAAI,CAAC;Q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GAAW;IACzC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { DetectMatch, FrameworkAdapter } from '../types.js';
2
+ /** The deterministic Django signal set (dependency names + file existence). */
3
+ export interface DjangoSignals {
4
+ hasDjango: boolean;
5
+ hasDrf: boolean;
6
+ hasNinja: boolean;
7
+ hasManagePy: boolean;
8
+ hasSettings: boolean;
9
+ }
10
+ /** Gather the signal set for a single root dir (reads manifests + file existence). */
11
+ export declare function gatherDjangoSignals(baseDir: string): DjangoSignals;
12
+ /**
13
+ * Decide Django from the signal set. `django` (dep) is the authoritative signal;
14
+ * absent it, a `manage.py` + a settings module is Django-unique enough to claim at
15
+ * lower confidence. DRF / Ninja only ride in metadata (they enable their passes,
16
+ * they don't decide the stack). Returns null → generic-Python fallthrough,
17
+ * byte-for-byte unchanged.
18
+ */
19
+ export declare function scoreDjango(s: DjangoSignals, rootPath?: string): DetectMatch | null;
20
+ export type DjangoRole = 'view' | 'command' | 'model' | 'app-config';
21
+ export declare const djangoAdapter: FrameworkAdapter;
22
+ //# sourceMappingURL=django.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"django.d.ts","sourceRoot":"","sources":["../../../src/framework/django/django.ts"],"names":[],"mappings":"AAsEA,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAOjB,MAAM,aAAa,CAAC;AAMrB,+EAA+E;AAC/E,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;CACtB;AAoFD,sFAAsF;AACtF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CASlE;AA6BD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,aAAa,EAAE,QAAQ,SAAK,GAAG,WAAW,GAAG,IAAI,CA6B/E;AAQD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,CAAC;AA+uBrE,eAAO,MAAM,aAAa,EAAE,gBA8C3B,CAAC"}