scip-query 0.10.6 → 0.10.8

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 (266) hide show
  1. package/README.md +7 -2
  2. package/dist/augment-vue-worker.js +1 -1
  3. package/dist/{chunk-YQH353VA.js → chunk-24S6MYOC.js} +2 -2
  4. package/dist/{chunk-BNKE4TT5.js → chunk-2H57MJLI.js} +2 -2
  5. package/dist/{chunk-AUVBR62P.js → chunk-2YI45TNM.js} +2 -2
  6. package/dist/{chunk-TM6GVHA6.js → chunk-3FYGJ2GY.js} +2 -2
  7. package/dist/chunk-3LQFMQPY.js +3 -0
  8. package/dist/chunk-4TMJDHC6.js +5 -0
  9. package/dist/{chunk-FNRPGGVI.js → chunk-5G5VI7J4.js} +2 -2
  10. package/dist/chunk-5GVOJOBL.js +2 -0
  11. package/dist/{chunk-4ZUJJRWT.js → chunk-5SMUKUV5.js} +2 -2
  12. package/dist/{chunk-DE7MA6OD.js → chunk-63MSELOP.js} +2 -2
  13. package/dist/{chunk-5FOPAXWY.js → chunk-6BNOACLT.js} +2 -2
  14. package/dist/chunk-6EO3E3IP.js +23 -0
  15. package/dist/{chunk-47UA45TU.js → chunk-6N6QTGSD.js} +2 -2
  16. package/dist/{chunk-QLNGUWR7.js → chunk-6TDOT7B3.js} +2 -2
  17. package/dist/{chunk-MUULWXSJ.js → chunk-7KJBH4IP.js} +2 -2
  18. package/dist/chunk-7XWXGANX.js +4 -0
  19. package/dist/chunk-A536TEU4.js +3 -0
  20. package/dist/{chunk-CJJP64OC.js → chunk-AA7L7GKI.js} +2 -2
  21. package/dist/chunk-AETMKBZR.js +40 -0
  22. package/dist/{chunk-ZQLO2SCU.js → chunk-ANIOISCE.js} +2 -2
  23. package/dist/{chunk-6UFMPECA.js → chunk-B4EHYG6M.js} +2 -2
  24. package/dist/{chunk-OLD6PBU6.js → chunk-BEUQVBE3.js} +2 -2
  25. package/dist/{chunk-EOZIZWW4.js → chunk-BJG67TCR.js} +2 -2
  26. package/dist/{chunk-ICXVNWMI.js → chunk-BJWNO6BU.js} +2 -2
  27. package/dist/chunk-BTCASU5J.js +3 -0
  28. package/dist/{chunk-YUOAAR24.js → chunk-BWL2ECGQ.js} +2 -2
  29. package/dist/{chunk-QUJBXLBY.js → chunk-BZ53S4ZN.js} +2 -2
  30. package/dist/{chunk-EYLXU575.js → chunk-C6BYNIH4.js} +2 -2
  31. package/dist/chunk-C6ROZBJA.js +32 -0
  32. package/dist/chunk-COUFCH64.js +2 -0
  33. package/dist/{chunk-D322LMSA.js → chunk-DS6QEB3G.js} +5 -5
  34. package/dist/{chunk-NVFERV4U.js → chunk-E2CCBFLR.js} +2 -2
  35. package/dist/{chunk-Z4VHYJ5U.js → chunk-EBIQY3RK.js} +2 -2
  36. package/dist/{chunk-5UDFZC4D.js → chunk-EKECQP6Z.js} +2 -2
  37. package/dist/{chunk-O3OKSF6O.js → chunk-FG4NT6VY.js} +2 -2
  38. package/dist/{chunk-X7ZY6FFF.js → chunk-FGTHPJON.js} +2 -2
  39. package/dist/{chunk-QSXQT3NE.js → chunk-FHWEEQVO.js} +2 -2
  40. package/dist/{chunk-CFL2CNIF.js → chunk-FKUCFCLU.js} +2 -2
  41. package/dist/chunk-FVA3NH4P.js +2 -0
  42. package/dist/{chunk-5QJXH6ZL.js → chunk-GZQID3FS.js} +2 -2
  43. package/dist/{chunk-SPE4YCOT.js → chunk-I274B3B3.js} +2 -2
  44. package/dist/{chunk-DAI74TJU.js → chunk-J6ADQKQA.js} +2 -2
  45. package/dist/{chunk-E7KERP7E.js → chunk-JRUKS66S.js} +2 -2
  46. package/dist/{chunk-ZSLT7NWQ.js → chunk-JUIAOOK7.js} +2 -2
  47. package/dist/{chunk-7KCSELEV.js → chunk-JYSAYZNX.js} +2 -2
  48. package/dist/chunk-K7VBTWNR.js +2 -0
  49. package/dist/{chunk-56UN3DMK.js → chunk-KLXVEBVC.js} +2 -2
  50. package/dist/{chunk-E44ZMVNA.js → chunk-KZYHFI2X.js} +2 -2
  51. package/dist/{chunk-FIB4JPEX.js → chunk-L4QKEQ4S.js} +2 -2
  52. package/dist/{chunk-CTCAF3YA.js → chunk-LGX2Y4BA.js} +2 -2
  53. package/dist/{chunk-VAA5FFIW.js → chunk-LM5SHAN4.js} +2 -2
  54. package/dist/{chunk-YYD245WG.js → chunk-LWTML2AN.js} +2 -2
  55. package/dist/{chunk-7OHWPJ5N.js → chunk-MEKSFV6H.js} +2 -2
  56. package/dist/{chunk-5M4TYWVI.js → chunk-N7F5UM6J.js} +2 -2
  57. package/dist/{chunk-YUTRW57I.js → chunk-NWFSC356.js} +2 -2
  58. package/dist/chunk-P3K7LX7M.js +4 -0
  59. package/dist/{chunk-CAWSSEVM.js → chunk-Q34NWRPP.js} +2 -2
  60. package/dist/chunk-QDGKE5HN.js +21 -0
  61. package/dist/{chunk-ESG4HBEF.js → chunk-RHKMQNFI.js} +2 -2
  62. package/dist/chunk-RSKOYTSY.js +3 -0
  63. package/dist/chunk-RY7CAOJF.js +4 -0
  64. package/dist/{chunk-NNDYO2DX.js → chunk-S7YOLFLX.js} +2 -2
  65. package/dist/{chunk-LPLGJ4HO.js → chunk-SHM5D3DQ.js} +2 -2
  66. package/dist/chunk-SOGKYB5I.js +8 -0
  67. package/dist/{chunk-MZ7APUFN.js → chunk-T633QLYF.js} +2 -2
  68. package/dist/{chunk-AW4N6MGC.js → chunk-VAXDTQHE.js} +2 -2
  69. package/dist/chunk-VFLHKRTW.js +2 -0
  70. package/dist/{chunk-77YBOOYT.js → chunk-VMPB52FG.js} +2 -2
  71. package/dist/{chunk-3KLLFNT4.js → chunk-VOYOYC5T.js} +2 -2
  72. package/dist/{chunk-DJMK4DBL.js → chunk-VXT7WVIN.js} +2 -2
  73. package/dist/chunk-W2CBNBEL.js +71 -0
  74. package/dist/{chunk-3UW7VM4H.js → chunk-X3BJUFSN.js} +2 -2
  75. package/dist/chunk-X3Z4MLVL.js +4 -0
  76. package/dist/chunk-XPOZO76D.js +2 -0
  77. package/dist/{chunk-WBJZNPUT.js → chunk-XWC67C3Q.js} +2 -2
  78. package/dist/{chunk-GZCQTZLK.js → chunk-YNSVAJR6.js} +2 -2
  79. package/dist/chunk-YWOOQ4FF.js +2 -0
  80. package/dist/chunk-YZA6PPZL.js +3 -0
  81. package/dist/{chunk-CSWZFD46.js → chunk-ZDR4VTOP.js} +2 -2
  82. package/dist/{chunk-QVCCLDZI.js → chunk-ZL52RLDK.js} +2 -2
  83. package/dist/{chunk-YTR4CO5S.js → chunk-ZMU6IWDK.js} +3 -3
  84. package/dist/cli.js +272 -235
  85. package/dist/{config-types-Bj4sh28g.d.ts → config-types-BDIWAYzr.d.ts} +13 -1
  86. package/dist/{db-CTarohbZ.d.ts → db-BAVwb4Pb.d.ts} +1 -1
  87. package/dist/{health-Bx0x1HAG.d.ts → health-B17sVFYf.d.ts} +6 -2
  88. package/dist/index.d.ts +3 -3
  89. package/dist/index.js +3 -3
  90. package/dist/postinstall.js +1 -1
  91. package/dist/queries/affected.d.ts +2 -2
  92. package/dist/queries/affected.js +1 -1
  93. package/dist/queries/bottlenecks.d.ts +2 -2
  94. package/dist/queries/bottlenecks.js +1 -1
  95. package/dist/queries/by-kind.d.ts +2 -2
  96. package/dist/queries/by-kind.js +1 -1
  97. package/dist/queries/call-graph.d.ts +2 -2
  98. package/dist/queries/call-graph.js +1 -1
  99. package/dist/queries/change-surface.d.ts +2 -2
  100. package/dist/queries/change-surface.js +1 -1
  101. package/dist/queries/cleanup-plan.d.ts +2 -2
  102. package/dist/queries/cleanup-plan.js +1 -1
  103. package/dist/queries/co-change.d.ts +2 -2
  104. package/dist/queries/co-change.js +1 -1
  105. package/dist/queries/code.d.ts +2 -2
  106. package/dist/queries/code.js +1 -1
  107. package/dist/queries/complexity-hotspots.d.ts +2 -2
  108. package/dist/queries/complexity-hotspots.js +1 -1
  109. package/dist/queries/complexity.d.ts +2 -2
  110. package/dist/queries/complexity.js +1 -1
  111. package/dist/queries/convergence.d.ts +2 -2
  112. package/dist/queries/convergence.js +1 -1
  113. package/dist/queries/coupling.d.ts +2 -2
  114. package/dist/queries/coupling.js +1 -1
  115. package/dist/queries/cycles.d.ts +2 -2
  116. package/dist/queries/cycles.js +1 -1
  117. package/dist/queries/dataflow.d.ts +2 -2
  118. package/dist/queries/dataflow.js +1 -1
  119. package/dist/queries/dead.d.ts +2 -2
  120. package/dist/queries/dead.js +1 -1
  121. package/dist/queries/deep-chains.d.ts +2 -2
  122. package/dist/queries/deep-chains.js +1 -1
  123. package/dist/queries/deps.d.ts +2 -2
  124. package/dist/queries/deps.js +1 -1
  125. package/dist/queries/diff-gate.d.ts +8 -5
  126. package/dist/queries/diff-gate.js +1 -1
  127. package/dist/queries/diff-impact.d.ts +7 -3
  128. package/dist/queries/diff-impact.js +1 -1
  129. package/dist/queries/doc-drift.d.ts +2 -2
  130. package/dist/queries/doc-drift.js +1 -1
  131. package/dist/queries/drift.d.ts +2 -2
  132. package/dist/queries/drift.js +1 -1
  133. package/dist/queries/extract-candidates.d.ts +2 -2
  134. package/dist/queries/extract-candidates.js +1 -1
  135. package/dist/queries/fan.d.ts +2 -2
  136. package/dist/queries/fan.js +1 -1
  137. package/dist/queries/files.d.ts +2 -2
  138. package/dist/queries/health.d.ts +3 -3
  139. package/dist/queries/health.js +1 -1
  140. package/dist/queries/hierarchy.d.ts +2 -2
  141. package/dist/queries/hierarchy.js +1 -1
  142. package/dist/queries/hotspots.d.ts +2 -2
  143. package/dist/queries/hotspots.js +1 -1
  144. package/dist/queries/imports.d.ts +2 -2
  145. package/dist/queries/imports.js +1 -1
  146. package/dist/queries/incomplete-migration.d.ts +5 -3
  147. package/dist/queries/incomplete-migration.js +1 -1
  148. package/dist/queries/index.d.ts +3 -3
  149. package/dist/queries/index.js +1 -1
  150. package/dist/queries/isolated.d.ts +2 -2
  151. package/dist/queries/isolated.js +1 -1
  152. package/dist/queries/locality-candidates.d.ts +2 -2
  153. package/dist/queries/locality-candidates.js +1 -1
  154. package/dist/queries/members.d.ts +2 -2
  155. package/dist/queries/members.js +1 -1
  156. package/dist/queries/methods.d.ts +2 -2
  157. package/dist/queries/methods.js +1 -1
  158. package/dist/queries/outline.d.ts +2 -2
  159. package/dist/queries/outline.js +1 -1
  160. package/dist/queries/passthrough-candidates.d.ts +2 -2
  161. package/dist/queries/passthrough-candidates.js +1 -1
  162. package/dist/queries/plan-context.d.ts +2 -2
  163. package/dist/queries/plan-context.js +1 -1
  164. package/dist/queries/react-component-duplicates.d.ts +2 -2
  165. package/dist/queries/react-component-duplicates.js +1 -1
  166. package/dist/queries/react-hook-candidates.d.ts +2 -2
  167. package/dist/queries/react-hook-candidates.js +1 -1
  168. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  169. package/dist/queries/react-large-component-pressure.js +1 -1
  170. package/dist/queries/recent-duplicates.d.ts +2 -2
  171. package/dist/queries/recent-duplicates.js +1 -1
  172. package/dist/queries/redundant-reexports.d.ts +2 -2
  173. package/dist/queries/redundant-reexports.js +1 -1
  174. package/dist/queries/refs.d.ts +2 -2
  175. package/dist/queries/refs.js +1 -1
  176. package/dist/queries/self-audit.d.ts +2 -2
  177. package/dist/queries/self-audit.js +1 -1
  178. package/dist/queries/similar-chains.d.ts +2 -2
  179. package/dist/queries/similar-chains.js +1 -1
  180. package/dist/queries/similar-files.d.ts +2 -2
  181. package/dist/queries/similar-files.js +1 -1
  182. package/dist/queries/similar-signatures.d.ts +2 -2
  183. package/dist/queries/similar-signatures.js +1 -1
  184. package/dist/queries/similar.d.ts +14 -4
  185. package/dist/queries/similar.js +1 -1
  186. package/dist/queries/slice.d.ts +2 -2
  187. package/dist/queries/slice.js +1 -1
  188. package/dist/queries/stale-abstractions.d.ts +2 -2
  189. package/dist/queries/stale-abstractions.js +1 -1
  190. package/dist/queries/stats.d.ts +2 -2
  191. package/dist/queries/surface.d.ts +2 -2
  192. package/dist/queries/surface.js +1 -1
  193. package/dist/queries/symbols.d.ts +2 -2
  194. package/dist/queries/symbols.js +1 -1
  195. package/dist/queries/system.d.ts +2 -2
  196. package/dist/queries/system.js +1 -1
  197. package/dist/queries/trace.d.ts +2 -2
  198. package/dist/queries/trace.js +1 -1
  199. package/dist/queries/unused-imports.d.ts +2 -2
  200. package/dist/queries/unused-imports.js +1 -1
  201. package/dist/queries/unused-params.d.ts +2 -2
  202. package/dist/queries/unused-params.js +1 -1
  203. package/dist/queries/vue-component-duplicates.d.ts +2 -2
  204. package/dist/queries/vue-component-duplicates.js +1 -1
  205. package/dist/queries/vue-composable-candidates.d.ts +2 -2
  206. package/dist/queries/vue-composable-candidates.js +1 -1
  207. package/dist/queries/vue-large-view-pressure.d.ts +2 -2
  208. package/dist/queries/vue-large-view-pressure.js +1 -1
  209. package/dist/queries/wrapper-candidates.d.ts +2 -2
  210. package/dist/queries/wrapper-candidates.js +1 -1
  211. package/dist/reindex-worker.js +11 -11
  212. package/dist/reindex.d.ts +11 -2
  213. package/dist/reindex.js +22 -22
  214. package/dist/runtime.d.ts +17 -20
  215. package/dist/runtime.js +2 -2
  216. package/dist/scip-cli-CnK9Va4O.d.ts +56 -0
  217. package/docs/AGENT_GUIDE.md +1 -1
  218. package/docs/COMMAND_REFERENCE.md +4 -3
  219. package/docs/analyzer-inventory.md +2 -2
  220. package/docs/analyzer-validation-ledger.md +2 -2
  221. package/package.json +1 -1
  222. package/skills/concrete-plan/SKILL.md +2 -2
  223. package/skills/scip-adoption/SKILL.md +4 -2
  224. package/skills/scip-ai-cleanup/SKILL.md +1 -1
  225. package/skills/scip-api-impact/SKILL.md +6 -2
  226. package/skills/scip-debloat/SKILL.md +1 -1
  227. package/skills/scip-debug/SKILL.md +6 -2
  228. package/skills/scip-diagram/SKILL.md +3 -1
  229. package/skills/scip-directory-architecture/SKILL.md +7 -3
  230. package/skills/scip-doc-reconcile/SKILL.md +3 -1
  231. package/skills/scip-explore/SKILL.md +2 -2
  232. package/skills/scip-health-audit/SKILL.md +6 -2
  233. package/skills/scip-health-improve/SKILL.md +6 -2
  234. package/skills/scip-hyper-optimization/SKILL.md +97 -0
  235. package/skills/scip-hyper-optimization/agents/openai.yaml +4 -0
  236. package/skills/scip-maintainability/SKILL.md +6 -3
  237. package/skills/scip-query/SKILL.md +14 -6
  238. package/skills/scip-query-setup/SKILL.md +10 -5
  239. package/skills/scip-react-maintainability/SKILL.md +7 -2
  240. package/skills/scip-triage-issue/SKILL.md +4 -2
  241. package/skills/scip-verify/SKILL.md +5 -3
  242. package/skills/scip-vue-maintainability/SKILL.md +7 -2
  243. package/dist/chunk-237YUOPK.js +0 -8
  244. package/dist/chunk-3UVJJ6Z7.js +0 -2
  245. package/dist/chunk-3ZYF3ELZ.js +0 -2
  246. package/dist/chunk-7JOTOWZO.js +0 -4
  247. package/dist/chunk-A3VNUGKJ.js +0 -2
  248. package/dist/chunk-A4L36SZS.js +0 -22
  249. package/dist/chunk-A7RNHUJH.js +0 -20
  250. package/dist/chunk-AYYIZ4BA.js +0 -4
  251. package/dist/chunk-BKDXBJDQ.js +0 -2
  252. package/dist/chunk-C3MZZ2ZN.js +0 -2
  253. package/dist/chunk-CRU42NJU.js +0 -2
  254. package/dist/chunk-ERHOS6AW.js +0 -2
  255. package/dist/chunk-EWC3UK4V.js +0 -3
  256. package/dist/chunk-FOQHUKNZ.js +0 -4
  257. package/dist/chunk-FUPDW5AC.js +0 -3
  258. package/dist/chunk-G3WGZU5Q.js +0 -2
  259. package/dist/chunk-HVTYSC26.js +0 -40
  260. package/dist/chunk-KPHKX4LP.js +0 -71
  261. package/dist/chunk-MA7OVFHI.js +0 -2
  262. package/dist/chunk-OBBDKQAG.js +0 -3
  263. package/dist/chunk-RHTJBYZ5.js +0 -2
  264. package/dist/chunk-UQJGTVHV.js +0 -5
  265. package/dist/chunk-ZFMPHDAT.js +0 -4
  266. package/dist/scip-cli-Bh1M_JPu.d.ts +0 -20
@@ -0,0 +1,3 @@
1
+ import{a as u,b as h,e as m,g as N,i as x}from"./chunk-DS6QEB3G.js";import{c as S}from"./chunk-A536TEU4.js";import{e as f,f as g}from"./chunk-7S5E7KWT.js";import{extname as y}from"path";var F={".rs":"rust",".ts":"typescript",".mts":"typescript",".cts":"typescript",".tsx":"tsx",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".py":"python",".pyi":"python",".java":"java",".kt":"kotlin",".kts":"kotlin",".scala":"scala",".sc":"scala",".rb":"ruby",".c":"c",".h":"c",".cc":"cpp",".cpp":"cpp",".cxx":"cpp",".hpp":"cpp",".hh":"cpp",".hxx":"cpp",".cs":"csharp",".php":"php",".vb":"vb"};function p(e){return F[y(e).toLowerCase()]??null}function k(e){return y(e).toLowerCase()===".vue"}import{extname as $}from"path";import{parse as E}from"@vue/compiler-sfc";function v(e){let t=E(e),n=t.descriptor.scriptSetup??t.descriptor.script;if(!n||n.src)return null;let s=N(n.lang??null);return s?{body:n.content,startLine:Math.max(0,n.loc.start.line-1),language:s}:null}var b=g("ast-trees",{clearGroups:["whole-project","source-file"]});function _(e,t){if(k(t))return B(e,t);let n=p(t);if(!n)return null;let s=u(e,t);return s?b.get(e,t,s,()=>m(n,s)):null}function B(e,t){let n=u(e,t);return n?b.get(e,t,n,()=>{let s=v(n);if(!s)return null;let r=`
2
+ `.repeat(s.startLine)+s.body;return m(s.language,r)}):null}var O=[".tsx",".jsx"],C=new Set(["useActionState","useCallback","useContext","useDebugValue","useDeferredValue","useEffect","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useOptimistic","useReducer","useRef","useState","useSyncExternalStore","useTransition"]),P=new Set(["useEffect","useInsertionEffect","useLayoutEffect"]),J=new Set(["useActionState","useOptimistic","useReducer","useRef","useState"]),q=new Set(["useLocation","useNavigate","useParams","useSearchParams","useTranslation"]),D=new Set(["axios","fetch","gql","graphql","mutate","query","request","useMutation","useQuery","useSuspenseQuery"]),I=new Set(["add","apply","cancel","change","clear","close","create","delete","fetch","filter","handle","load","open","refresh","remove","render","reset","save","select","submit","toggle","update"]),V=new Set(["children","className","false","key","null","style","true","undefined"]),Z=new Set(["aria-hidden","className","clipRule","d","fill","fillRule","height","role","stroke","strokeLinecap","strokeLinejoin","strokeWidth","style","viewBox","width","xmlns"]),z=f("react-component-behavior-profiles");function je(e,t={}){let n=S(e,{extensions:O}).filter(r=>!t.scope||r.includes(t.scope)).sort();return(typeof t.scanLimit=="number"&&t.scanLimit>0?n.slice(0,t.scanLimit):n).flatMap(r=>H(e,r)).filter(r=>(t.minJsxTokens===void 0||r.jsxTokens.size>=t.minJsxTokens)&&(t.minBehaviorTokens===void 0||r.behaviorTokens.size>=t.minBehaviorTokens))}function H(e,t){let n=t.replace(/\\/g,"/"),s=u(e,n);return z.get(e,n,s,()=>M(e,n)).map(K)}function M(e,t){let n=U(t);if(!n)return[];let s=_(e,t);if(!s)return[];let r=h(e,t).length;return W(s.rootNode,n).filter(o=>o.kind==="hook"||j(o.bodyNode)).map(o=>{let i=ee(o.bodyNode),l=oe(o.bodyNode,n);return{file:t,name:o.name,kind:o.kind,startLine:o.node.startPosition.row,endLine:o.node.endPosition.row,loc:Math.max(1,o.node.endPosition.row-o.node.startPosition.row+1),fileLines:r,jsxTokens:i.tokens,behaviorTokens:l.tokens,componentNames:c(i.componentNames),nativeTags:c(i.nativeTags),propNames:c(i.propNames),eventNames:c(i.eventNames),hookNames:c(l.hookNames),requestNames:c(l.requestNames),stateNames:c(l.stateNames),effectNames:c(l.effectNames),handlerNames:c(l.handlerNames)}})}function K(e){return{...e,jsxTokens:new Set(e.jsxTokens),behaviorTokens:new Set(e.behaviorTokens),componentNames:[...e.componentNames],nativeTags:[...e.nativeTags],propNames:[...e.propNames],eventNames:[...e.eventNames],hookNames:[...e.hookNames],requestNames:[...e.requestNames],stateNames:[...e.stateNames],effectNames:[...e.effectNames],handlerNames:[...e.handlerNames]}}function U(e){let t=$(e).toLowerCase();return t!==".tsx"&&t!==".jsx"?null:p(e)}function W(e,t){let n=[],s=new Set,r=a=>{let o=G(a);if(o&&!X(a)){let i=`${o.name}:${o.node.startIndex}:${o.node.endIndex}`;s.has(i)||(s.add(i),n.push(o));return}for(let i of a.namedChildren)r(i)};return(t==="tsx"||t==="javascript")&&r(e),n}function G(e){if(e.type==="function_declaration"){let a=R(e);return!a||!T(a)?null:{name:a,kind:L(a),node:e,bodyNode:e}}if(e.type!=="variable_declarator")return null;let t=e.childForFieldName("name")??e.namedChild(0),n=e.childForFieldName("value")??e.namedChild(1),s=d(t);if(!s||!n||!T(s))return null;let r=Q(n);return r?{name:s,kind:L(s),node:e,bodyNode:r}:null}function T(e){return/^[A-Z]/.test(e)||/^use[A-Z0-9_]/.test(e)}function L(e){return/^use[A-Z0-9_]/.test(e)?"hook":"component"}function Q(e){if(e.type==="arrow_function"||e.type==="function_expression")return e;if(e.type!=="call_expression")return null;let t=Y(e);return t!=="memo"&&t!=="forwardRef"?null:e.namedChildren.find(r=>r.type==="arguments")?.namedChildren.find(r=>r.type==="arrow_function"||r.type==="function_expression")??null}function X(e){let t=e.parent;for(;t;){if(t.type==="function_declaration"||t.type==="function_expression"||t.type==="arrow_function"||t.type==="method_definition")return!0;t=t.parent}return!1}function R(e){return d(e.childForFieldName("name")??e.namedChild(0))}function Y(e){let t=e.childForFieldName("function")??e.namedChild(0);return t?t.text.split(".").pop()??t.text:null}function j(e){return e.type.startsWith("jsx_")?!0:e.namedChildren.some(j)}function ee(e){let t={tokens:new Set,componentNames:new Set,nativeTags:new Set,propNames:new Set,eventNames:new Set},n=s=>{s.type==="jsx_opening_element"||s.type==="jsx_self_closing_element"?te(s,t):s.type==="jsx_expression"?ne(s,t):s.type==="jsx_fragment"&&t.tokens.add("jsx:fragment");for(let r of s.namedChildren)n(r)};return n(e),t}function te(e,t){let n=se(e),s=!1;if(n){let r=w(n);s=ue(r),s?(t.componentNames.add(r),t.tokens.add(`component:${r}`)):(t.nativeTags.add(r),t.tokens.add(`native:${r}`))}for(let r of e.namedChildren)if(r.type==="jsx_attribute"){let a=re(r);if(!a)continue;let o=w(a);if(o.startsWith("on")&&o.length>2){let i=o.slice(2).replace(/^[A-Z]/,l=>l.toLowerCase());t.eventNames.add(i),t.tokens.add(`event:${i}`)}else Z.has(o)||(t.propNames.add(o),t.tokens.add(`${s?"prop":"native-prop"}:${o}`))}else r.type==="jsx_spread_attribute"&&t.tokens.add("prop:spread")}function ne(e,t){let n=e.text;(n.includes("&&")||n.includes("?"))&&t.tokens.add("jsx:conditional"),(n.includes(".map(")||n.includes(".flatMap("))&&t.tokens.add("jsx:list");for(let s of de(n))V.has(s)||t.tokens.add(`binding:${s}`)}function se(e){for(let t of e.namedChildren)if(t.type==="identifier"||t.type==="jsx_identifier"||t.type==="property_identifier"||t.type==="member_expression"||t.type==="jsx_member_expression")return t.text;return/^<\s*([A-Za-z][\w$.]*)/.exec(e.text)?.[1]??null}function re(e){for(let t of e.namedChildren)if(t.type==="property_identifier"||t.type==="identifier"||t.type==="jsx_identifier")return t.text;return/^([A-Za-z_$][\w$:-]*)/.exec(e.text)?.[1]??null}function oe(e,t){let n={tokens:new Set,hookNames:new Set,requestNames:new Set,stateNames:new Set,effectNames:new Set,handlerNames:new Set},s=r=>{if(r.type==="call_expression"){let a=x(r,t);a&&ae(a.calleeLeaf,n)}else if(r.type==="variable_declarator")ce(r,n);else if(r.type==="function_declaration"){let a=R(r);a&&A(a,n)}for(let a of r.namedChildren)s(a)};return s(e),n}function ae(e,t){/^use[A-Z0-9_]/.test(e)&&(t.hookNames.add(e),!C.has(e)&&!q.has(e)&&t.tokens.add(`hook:${e}`)),C.has(e)&&t.tokens.add(`react-hook:${e}`),P.has(e)&&(t.effectNames.add(e),t.tokens.add(`effect:${e}`)),J.has(e)&&t.tokens.add(`state-hook:${e}`),ie(e)&&(t.requestNames.add(e),t.tokens.add(`request:${e}`))}function ie(e){if(D.has(e))return!0;let t=/^use([A-Z0-9_].*)$/.exec(e)?.[1];return t?/(Query|Mutation|Fetch|Resource)$/.test(t):!1}function ce(e,t){let n=e.childForFieldName("name")??e.namedChild(0),s=e.childForFieldName("value")??e.namedChild(1);if(n?.type==="array_pattern"&&s?.text.includes("useState")){let a=n.namedChildren.find(i=>d(i)),o=d(a);o&&(t.stateNames.add(o),t.tokens.add(`state:${o}`))}let r=d(n);r&&A(r,t)}function A(e,t){let n=le(e);!n||!I.has(n)||(t.handlerNames.add(e),t.tokens.add(`handler:${e}`),t.tokens.add(`handler-verb:${n}`))}function le(e){let t=e.startsWith("handle")&&e.length>6?e.slice(6).replace(/^[A-Z]/,n=>n.toLowerCase()):e;return/^[a-z]+/.exec(t)?.[0]??null}function ue(e){return/^[A-Z]/.test(e)||e.includes(".")}function w(e){return e.replace(/^this\./,"").replace(/\$/g,".")}function d(e){return e&&(e.type==="identifier"||e.type==="property_identifier"||e.type==="shorthand_property_identifier"||/^[A-Za-z_$][\w$]*$/.test(e.text))?e.text:null}function de(e){let t=[];for(let n of e.matchAll(/\b[A-Za-z_$][\w$]*\b/g)){let s=n[0];t.includes(s)||t.push(s)}return t}function c(e){return[...e].sort()}export{p as a,k as b,v as c,_ as d,je as e};
3
+ //# sourceMappingURL=chunk-BTCASU5J.js.map
@@ -1,2 +1,2 @@
1
- import{b}from"./chunk-CTCAF3YA.js";import{i as f}from"./chunk-3UW7VM4H.js";import{l as d}from"./chunk-JM72FNGA.js";function S(a,g){let p=b(a,g),i=f(a,p,{sort:!0});if(i.length===0)return[];let o=i.map(e=>({symbol:e.symbol,shortName:e.shortName,startLine:e.startLine,endLine:e.endLine,signature:e.signature,children:[]})),s=new Map;for(let e of o)s.set(e.symbol,e);let c=[];for(let e=0;e<i.length;e++){let r=i[e],n=o[e];if(r.enclosingSymbol&&s.has(r.enclosingSymbol)){s.get(r.enclosingSymbol).children.push(n);continue}let l=null,m=1/0;for(let t of o)if(t!==n&&t.startLine<=n.startLine&&t.endLine>=n.endLine){if(t.startLine===n.startLine&&t.endLine===n.endLine&&!d(t.symbol,n.symbol))continue;let u=t.endLine-t.startLine;u<m&&(m=u,l=t)}l?l.children.push(n):c.push(n)}return c}export{S as a};
2
- //# sourceMappingURL=chunk-YUOAAR24.js.map
1
+ import{b}from"./chunk-LGX2Y4BA.js";import{i as f}from"./chunk-X3BJUFSN.js";import{l as d}from"./chunk-JM72FNGA.js";function S(a,g){let p=b(a,g),i=f(a,p,{sort:!0});if(i.length===0)return[];let o=i.map(e=>({symbol:e.symbol,shortName:e.shortName,startLine:e.startLine,endLine:e.endLine,signature:e.signature,children:[]})),s=new Map;for(let e of o)s.set(e.symbol,e);let c=[];for(let e=0;e<i.length;e++){let r=i[e],n=o[e];if(r.enclosingSymbol&&s.has(r.enclosingSymbol)){s.get(r.enclosingSymbol).children.push(n);continue}let l=null,m=1/0;for(let t of o)if(t!==n&&t.startLine<=n.startLine&&t.endLine>=n.endLine){if(t.startLine===n.startLine&&t.endLine===n.endLine&&!d(t.symbol,n.symbol))continue;let u=t.endLine-t.startLine;u<m&&(m=u,l=t)}l?l.children.push(n):c.push(n)}return c}export{S as a};
2
+ //# sourceMappingURL=chunk-BWL2ECGQ.js.map
@@ -1,2 +1,2 @@
1
- import{a as l,c as g}from"./chunk-3UVJJ6Z7.js";function v(e){let n=[],r=[],i=[];for(let o of e.primitiveGroups)o.values.length!==0&&h(o.bucket,r,i).push(`${o.reasonPrefix}: ${o.values.join(", ")}`);for(let o of e.nameGroups)u(o.names,o.label,e.genericWords,e.stripPrefixes??[],n,h(o.fallbackBucket,r,i));let c=n.length>0,d=r.length>0,s=i.length>0,t=c?d||s?"mixed":"domain-behavior":s?"shared-abstraction":"generic-workflow-scaffolding";return{actionTier:t==="domain-behavior"||t==="mixed"?"signal":"support",evidenceClass:t,reasons:[...n,...i,...r].slice(0,6),recommendation:e.recommendation(t)}}function x(e,n){if(e.size===0||n.size===0)return 0;let i=l(e,n).size/Math.min(e.size,n.size);return Math.max(g(e,n),i)}function y(e,n){return[...e].filter(r=>r.startsWith(n)).map(r=>r.slice(n.length)).sort()}function b(e){return[...e].sort()}function u(e,n,r,i,c,d){let s=[],t=[];for(let a of e)m(a,i).filter(f=>!r.has(f)).length>0?s.push(a):t.push(a);s.length&&c.push(`${n} has domain term(s): ${s.slice(0,6).join(", ")}`),t.length&&d.push(`${n} is generic workflow: ${t.slice(0,6).join(", ")}`)}function m(e,n){let r=e.replace(/([A-Z])([A-Z][a-z])/g,"$1 $2").replace(/([a-z0-9])([A-Z])/g,"$1 $2");for(let i of n)r=r.replace(i,"");return r.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean)}function h(e,n,r){return e==="generic"?n:r}export{v as a,x as b,y as c,b as d};
2
- //# sourceMappingURL=chunk-QUJBXLBY.js.map
1
+ import{a as l,c as g}from"./chunk-YWOOQ4FF.js";function v(e){let n=[],r=[],i=[];for(let o of e.primitiveGroups)o.values.length!==0&&h(o.bucket,r,i).push(`${o.reasonPrefix}: ${o.values.join(", ")}`);for(let o of e.nameGroups)u(o.names,o.label,e.genericWords,e.stripPrefixes??[],n,h(o.fallbackBucket,r,i));let c=n.length>0,d=r.length>0,s=i.length>0,t=c?d||s?"mixed":"domain-behavior":s?"shared-abstraction":"generic-workflow-scaffolding";return{actionTier:t==="domain-behavior"||t==="mixed"?"signal":"support",evidenceClass:t,reasons:[...n,...i,...r].slice(0,6),recommendation:e.recommendation(t)}}function x(e,n){if(e.size===0||n.size===0)return 0;let i=l(e,n).size/Math.min(e.size,n.size);return Math.max(g(e,n),i)}function y(e,n){return[...e].filter(r=>r.startsWith(n)).map(r=>r.slice(n.length)).sort()}function b(e){return[...e].sort()}function u(e,n,r,i,c,d){let s=[],t=[];for(let a of e)m(a,i).filter(f=>!r.has(f)).length>0?s.push(a):t.push(a);s.length&&c.push(`${n} has domain term(s): ${s.slice(0,6).join(", ")}`),t.length&&d.push(`${n} is generic workflow: ${t.slice(0,6).join(", ")}`)}function m(e,n){let r=e.replace(/([A-Z])([A-Z][a-z])/g,"$1 $2").replace(/([a-z0-9])([A-Z])/g,"$1 $2");for(let i of n)r=r.replace(i,"");return r.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean)}function h(e,n,r){return e==="generic"?n:r}export{v as a,x as b,y as c,b as d};
2
+ //# sourceMappingURL=chunk-BZ53S4ZN.js.map
@@ -1,2 +1,2 @@
1
- import{a as b,f as S}from"./chunk-KRGBLZT2.js";import{b as d}from"./chunk-ZQLO2SCU.js";import{a as h}from"./chunk-AUVBR62P.js";import{existsSync as R}from"fs";import{join as $}from"path";function U(e){return C.test(e)}var C=/(?:^|\/)(?:package-lock\.json|pnpm-lock\.yaml|yarn\.lock|Cargo\.lock|CHANGELOG(?:\.[a-z]+)?|.*\.map)$|(?:^|\/)(?:dist|build|out|node_modules|docs\/plans)\//i;function X(e,t,n={}){let{minTogether:s=4,minConfidence:o=.6,limit:a=30,maxFilesPerCommit:c=20}=n,l=b(e),r=t!==void 0,g=S(e,{minTogether:r?Math.min(s,2):s,minConfidence:r?0:o,maxFilesPerCommit:c});if(!l||!g)return{available:!1,commitsAnalyzed:0,findings:[]};let A=h(e),E=x(e),k=L(e,A,E),w=n.includeLinked===!0||r,u=[];for(let i of g){if(C.test(i.fileA)||C.test(i.fileB)||!y(e,i.fileA)||!y(e,i.fileB)||r&&!i.fileA.includes(t)&&!i.fileB.includes(t)||!r&&(d(i.fileA)==="test"||d(i.fileB)==="test"||j(i.fileA,i.fileB)))continue;let m=k(i.fileA,i.fileB);if(!w&&m)continue;let f=v(i.fileA,i.fileB),p=F(i,f,m);if(u.push({...i,structurallyLinked:m,partnerClass:f.partnerClass,partnerClassReasons:f.reasons,...p?{declaredCouplingSuggestion:p}:{}}),u.length>=a)break}return{available:!0,commitsAnalyzed:l.commits.length,findings:u}}function y(e,t){return R($(e.config.projectRoot,t))}function v(e,t){let n=P(e),s=P(t),o=[],a=r=>{o.includes(r)||o.push(r)},c=(r,g)=>n.tags.has(r)&&s.tags.has(g)||n.tags.has(g)&&s.tags.has(r);if(c("doc","code"))return a("one side is documentation and the other is executable source"),{partnerClass:"doc-code",reasons:o};if(n.tags.has("test")||s.tags.has("test"))return a("one side is classified as a test file"),{partnerClass:"test-code",reasons:o};if(c("schema","script"))return a("schema or contract file changes with a script or generated-code path"),{partnerClass:"schema-script",reasons:o};if(c("model","view"))return a("model or state path changes with a view or component path"),{partnerClass:"model-view",reasons:o};if(c("config","code"))return a("configuration file changes with executable source"),{partnerClass:"config-code",reasons:o};let l=q(n.tokens,s.tokens).filter(r=>!G.has(r));return T(e,t)||l.length>=2?(a(T(e,t)?"both files live in the same directory":`files share feature tokens: ${l.slice(0,4).join(", ")}`),{partnerClass:"same-feature",reasons:o}):(a("no specific relationship pattern matched"),{partnerClass:"unknown",reasons:o})}function F(e,t,n){if(n||e.together<4||e.confidence<.75||e.commitScope==="broad-sweep"||e.recency==="stale"||!M.has(t.partnerClass))return;let s=[e.fileA,e.fileB].sort();return{name:`co-change ${t.partnerClass}: ${Z(s)}`,files:s,reason:`${t.partnerClass} pair changed together ${e.together}x with ${Math.round(e.confidence*100)}% confidence; declare it if future edits should require both sides.`}}function L(e,t=h(e),n=x(e)){return(s,o)=>_(t,n,s,o)}function j(e,t){let n=e.lastIndexOf("/"),s=t.lastIndexOf("/");if(e.slice(0,n)!==t.slice(0,s))return!1;let o=e.slice(n+1).split(".")[0],a=t.slice(s+1).split(".")[0];return o!==""&&o===a}function x(e){return(e.config.declaredCouplings??[]).filter(t=>Array.isArray(t.files)&&t.files.length>=2).map(t=>new Set(t.files))}function _(e,t,n,s){return e.get(n)?.has(s)===!0||e.get(s)?.has(n)===!0?!0:t.some(o=>o.has(n)&&o.has(s))}var I=/(?:^|\/)(?:readme|docs?|guides?|adr|architecture|design)(?:\/|$)|\.(?:md|mdx|rst|adoc|txt)$/i,N=/(?:^|\/)(?:\.[a-z0-9-]+rc|config|configs|settings|\.github)(?:\/|$)|(?:^|\/)(?:package\.json|tsconfig(?:\.[^.]+)?\.json|vite\.config\.[cm]?[jt]s|rollup\.config\.[cm]?[jt]s|eslint\.config\.[cm]?[jt]s)$|\.(?:json|ya?ml|toml|ini|env)$/i,D=/(?:^|\/)(?:schemas?|contracts?|migrations?|models?|types?)(?:\/|$)|(?:^|\/)[^/]*(?:schema|contract|migration|model|types?)[^/]*|(?:\.schema)?\.(?:graphql|gql|proto|prisma)$/i,O=/(?:^|\/)(?:scripts?|bin|tools?|tasks?|generators?|codegen|migrations?|seeds?)(?:\/|$)|(?:^|\/)[^/]*(?:generate|codegen|migrate|seed|script)[^/]*\.[cm]?[jt]s$/i,B=/(?:^|\/)(?:models?|entities|domain|state|stores?|reducers?)(?:\/|$)|(?:^|\/)[^/]*(?:model|entity|state|store|reducer|viewmodel)[^/]*\.[^.]+$/i,z=/(?:^|\/)(?:views?|pages?|components?|screens?|routes?|templates?)(?:\/|$)|(?:^|\/)[^/]*(?:view|page|component|screen|template)[^/]*\.[^.]+$|\.(?:vue|svelte|tsx|jsx)$/i,M=new Set(["doc-code","config-code","schema-script","model-view","test-code"]),G=new Set(["src","lib","app","test","tests","spec","index","main","utils","util","types","type","config","docs","doc"]);function P(e){let t=e.replace(/\\/g,"/"),n=new Set;return I.test(t)&&n.add("doc"),N.test(t)&&n.add("config"),D.test(t)&&n.add("schema"),O.test(t)&&n.add("script"),B.test(t)&&n.add("model"),z.test(t)&&n.add("view"),d(t)==="test"&&n.add("test"),!n.has("doc")&&!n.has("config")&&n.add("code"),{tags:n,tokens:H(t)}}function T(e,t){let n=e.lastIndexOf("/"),s=t.lastIndexOf("/"),o=n>=0?e.slice(0,n):"",a=s>=0?t.slice(0,s):"";return o!==""&&o===a}function H(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[^A-Za-z0-9]+/).map(t=>t.toLowerCase()).filter(t=>t.length>=2)}function q(e,t){let n=new Set(t);return[...new Set(e.filter(s=>n.has(s)))].sort()}function Z(e){return e.map(t=>t.split("/").pop()?.replace(/\.[^.]+$/,"")||t).join(" + ")}export{U as a,X as b,v as c,F as d,L as e};
2
- //# sourceMappingURL=chunk-EYLXU575.js.map
1
+ import{a as b,f as S}from"./chunk-KRGBLZT2.js";import{b as d}from"./chunk-ANIOISCE.js";import{a as h}from"./chunk-2YI45TNM.js";import{existsSync as R}from"fs";import{join as $}from"path";function U(e){return C.test(e)}var C=/(?:^|\/)(?:package-lock\.json|pnpm-lock\.yaml|yarn\.lock|Cargo\.lock|CHANGELOG(?:\.[a-z]+)?|.*\.map)$|(?:^|\/)(?:dist|build|out|node_modules|docs\/plans)\//i;function X(e,t,n={}){let{minTogether:s=4,minConfidence:o=.6,limit:a=30,maxFilesPerCommit:c=20}=n,l=b(e),r=t!==void 0,g=S(e,{minTogether:r?Math.min(s,2):s,minConfidence:r?0:o,maxFilesPerCommit:c});if(!l||!g)return{available:!1,commitsAnalyzed:0,findings:[]};let A=h(e),E=x(e),k=L(e,A,E),w=n.includeLinked===!0||r,u=[];for(let i of g){if(C.test(i.fileA)||C.test(i.fileB)||!y(e,i.fileA)||!y(e,i.fileB)||r&&!i.fileA.includes(t)&&!i.fileB.includes(t)||!r&&(d(i.fileA)==="test"||d(i.fileB)==="test"||j(i.fileA,i.fileB)))continue;let m=k(i.fileA,i.fileB);if(!w&&m)continue;let f=v(i.fileA,i.fileB),p=F(i,f,m);if(u.push({...i,structurallyLinked:m,partnerClass:f.partnerClass,partnerClassReasons:f.reasons,...p?{declaredCouplingSuggestion:p}:{}}),u.length>=a)break}return{available:!0,commitsAnalyzed:l.commits.length,findings:u}}function y(e,t){return R($(e.config.projectRoot,t))}function v(e,t){let n=P(e),s=P(t),o=[],a=r=>{o.includes(r)||o.push(r)},c=(r,g)=>n.tags.has(r)&&s.tags.has(g)||n.tags.has(g)&&s.tags.has(r);if(c("doc","code"))return a("one side is documentation and the other is executable source"),{partnerClass:"doc-code",reasons:o};if(n.tags.has("test")||s.tags.has("test"))return a("one side is classified as a test file"),{partnerClass:"test-code",reasons:o};if(c("schema","script"))return a("schema or contract file changes with a script or generated-code path"),{partnerClass:"schema-script",reasons:o};if(c("model","view"))return a("model or state path changes with a view or component path"),{partnerClass:"model-view",reasons:o};if(c("config","code"))return a("configuration file changes with executable source"),{partnerClass:"config-code",reasons:o};let l=q(n.tokens,s.tokens).filter(r=>!G.has(r));return T(e,t)||l.length>=2?(a(T(e,t)?"both files live in the same directory":`files share feature tokens: ${l.slice(0,4).join(", ")}`),{partnerClass:"same-feature",reasons:o}):(a("no specific relationship pattern matched"),{partnerClass:"unknown",reasons:o})}function F(e,t,n){if(n||e.together<4||e.confidence<.75||e.commitScope==="broad-sweep"||e.recency==="stale"||!M.has(t.partnerClass))return;let s=[e.fileA,e.fileB].sort();return{name:`co-change ${t.partnerClass}: ${Z(s)}`,files:s,reason:`${t.partnerClass} pair changed together ${e.together}x with ${Math.round(e.confidence*100)}% confidence; declare it if future edits should require both sides.`}}function L(e,t=h(e),n=x(e)){return(s,o)=>_(t,n,s,o)}function j(e,t){let n=e.lastIndexOf("/"),s=t.lastIndexOf("/");if(e.slice(0,n)!==t.slice(0,s))return!1;let o=e.slice(n+1).split(".")[0],a=t.slice(s+1).split(".")[0];return o!==""&&o===a}function x(e){return(e.config.declaredCouplings??[]).filter(t=>Array.isArray(t.files)&&t.files.length>=2).map(t=>new Set(t.files))}function _(e,t,n,s){return e.get(n)?.has(s)===!0||e.get(s)?.has(n)===!0?!0:t.some(o=>o.has(n)&&o.has(s))}var I=/(?:^|\/)(?:readme|docs?|guides?|adr|architecture|design)(?:\/|$)|\.(?:md|mdx|rst|adoc|txt)$/i,N=/(?:^|\/)(?:\.[a-z0-9-]+rc|config|configs|settings|\.github)(?:\/|$)|(?:^|\/)(?:package\.json|tsconfig(?:\.[^.]+)?\.json|vite\.config\.[cm]?[jt]s|rollup\.config\.[cm]?[jt]s|eslint\.config\.[cm]?[jt]s)$|\.(?:json|ya?ml|toml|ini|env)$/i,D=/(?:^|\/)(?:schemas?|contracts?|migrations?|models?|types?)(?:\/|$)|(?:^|\/)[^/]*(?:schema|contract|migration|model|types?)[^/]*|(?:\.schema)?\.(?:graphql|gql|proto|prisma)$/i,O=/(?:^|\/)(?:scripts?|bin|tools?|tasks?|generators?|codegen|migrations?|seeds?)(?:\/|$)|(?:^|\/)[^/]*(?:generate|codegen|migrate|seed|script)[^/]*\.[cm]?[jt]s$/i,B=/(?:^|\/)(?:models?|entities|domain|state|stores?|reducers?)(?:\/|$)|(?:^|\/)[^/]*(?:model|entity|state|store|reducer|viewmodel)[^/]*\.[^.]+$/i,z=/(?:^|\/)(?:views?|pages?|components?|screens?|routes?|templates?)(?:\/|$)|(?:^|\/)[^/]*(?:view|page|component|screen|template)[^/]*\.[^.]+$|\.(?:vue|svelte|tsx|jsx)$/i,M=new Set(["doc-code","config-code","schema-script","model-view","test-code"]),G=new Set(["src","lib","app","test","tests","spec","index","main","utils","util","types","type","config","docs","doc"]);function P(e){let t=e.replace(/\\/g,"/"),n=new Set;return I.test(t)&&n.add("doc"),N.test(t)&&n.add("config"),D.test(t)&&n.add("schema"),O.test(t)&&n.add("script"),B.test(t)&&n.add("model"),z.test(t)&&n.add("view"),d(t)==="test"&&n.add("test"),!n.has("doc")&&!n.has("config")&&n.add("code"),{tags:n,tokens:H(t)}}function T(e,t){let n=e.lastIndexOf("/"),s=t.lastIndexOf("/"),o=n>=0?e.slice(0,n):"",a=s>=0?t.slice(0,s):"";return o!==""&&o===a}function H(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[^A-Za-z0-9]+/).map(t=>t.toLowerCase()).filter(t=>t.length>=2)}function q(e,t){let n=new Set(t);return[...new Set(e.filter(s=>n.has(s)))].sort()}function Z(e){return e.map(t=>t.split("/").pop()?.replace(/\.[^.]+$/,"")||t).join(" + ")}export{U as a,X as b,v as c,F as d,L as e};
2
+ //# sourceMappingURL=chunk-C6BYNIH4.js.map
@@ -0,0 +1,32 @@
1
+ import{c as d}from"./chunk-7S5E7KWT.js";import{createHash as h}from"crypto";import{readFileSync as T}from"fs";import{createRequire as m}from"module";import{dirname as E,join as g}from"path";import v from"better-sqlite3";var N=m(import.meta.url),S="evidence.db",p=new WeakMap,y=d("evidence-content-hash",{clearGroups:["whole-project","source-file"]}),_=d("evidence-project-fingerprint",{clearGroups:["whole-project"]});function L(){for(let n of["../package.json","../../package.json"])try{return N(n).version}catch{}return"0.0.0"}var s=L();function f(n){return h("sha256").update(n).digest("hex")}function w(n,t,e){return y.get(n,t,()=>f(e))}function F(n){return _.get(n,"current",()=>{try{let t=JSON.parse(T(g(E(n.config.dbPath),"meta.json"),"utf-8"));if(t.version!==2&&t.version!==3||t.status!=="complete"||t.fingerprint===void 0)return null;let e=Array.isArray(t.indexedLanguages)?[...t.indexedLanguages].sort():[];return f(JSON.stringify({fingerprint:t.fingerprint,indexedLanguages:e}))}catch(t){return u("project fingerprint unavailable",t),null}})}function u(n,t){process.env.SCIP_QUERY_DEBUG&&console.error(`evidence-cache: ${n}: ${t instanceof Error?t.message:String(t)}`)}function c(n){if(p.has(n))return p.get(n)??null;let t=null;try{let e=new v(g(E(n.config.dbPath),S));e.pragma("journal_mode = WAL"),e.pragma("busy_timeout = 5000"),e.pragma("synchronous = NORMAL"),e.exec(`
2
+ CREATE TABLE IF NOT EXISTS file_evidence (
3
+ kind TEXT NOT NULL,
4
+ relative_path TEXT NOT NULL,
5
+ content_hash TEXT NOT NULL,
6
+ version TEXT NOT NULL,
7
+ payload TEXT NOT NULL,
8
+ PRIMARY KEY (kind, relative_path)
9
+ );
10
+ CREATE TABLE IF NOT EXISTS semantic_callees (
11
+ relative_path TEXT NOT NULL,
12
+ symbol TEXT NOT NULL,
13
+ content_hash TEXT NOT NULL,
14
+ deps_digest TEXT NOT NULL,
15
+ version TEXT NOT NULL,
16
+ payload TEXT NOT NULL,
17
+ PRIMARY KEY (relative_path, symbol)
18
+ );
19
+ CREATE TABLE IF NOT EXISTS semantic_references (
20
+ relative_path TEXT NOT NULL,
21
+ symbol TEXT NOT NULL,
22
+ project_fingerprint TEXT NOT NULL,
23
+ version TEXT NOT NULL,
24
+ payload TEXT NOT NULL,
25
+ PRIMARY KEY (relative_path, symbol)
26
+ );
27
+ `),t={evidence:e,readFileEvidence:e.prepare("SELECT payload FROM file_evidence WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?"),writeFileEvidence:e.prepare("INSERT OR REPLACE INTO file_evidence (kind, relative_path, content_hash, version, payload) VALUES (?, ?, ?, ?, ?)"),readCallees:e.prepare(`SELECT payload FROM semantic_callees
28
+ WHERE relative_path = ? AND symbol = ? AND content_hash = ? AND deps_digest = ? AND version = ?`),writeCallees:e.prepare(`INSERT OR REPLACE INTO semantic_callees
29
+ (relative_path, symbol, content_hash, deps_digest, version, payload) VALUES (?, ?, ?, ?, ?, ?)`),dropStaleCallees:e.prepare("DELETE FROM semantic_callees WHERE relative_path = ? AND content_hash != ?"),readReferences:e.prepare(`SELECT payload FROM semantic_references
30
+ WHERE relative_path = ? AND symbol = ? AND project_fingerprint = ? AND version = ?`),writeReferences:e.prepare(`INSERT OR REPLACE INTO semantic_references
31
+ (relative_path, symbol, project_fingerprint, version, payload) VALUES (?, ?, ?, ?, ?)`),dropStaleReferences:e.prepare("DELETE FROM semantic_references WHERE project_fingerprint != ?")}}catch(e){u("disabled (open failed)",e)}return p.set(n,t),t}function o(n,t,e){u(`disabled (${t})`,e),p.set(n,null)}function x(n,t,e,a){let r=c(n);if(!r)return null;try{return r.readFileEvidence.get(t,e,a,s)?.payload??null}catch(i){return o(n,"file_evidence read",i),null}}function I(n,t,e,a,r){let i=c(n);if(i)try{i.writeFileEvidence.run(t,e,a,s,r)}catch(l){o(n,"file_evidence write",l)}}function U(n,t,e,a,r){let i=c(n);if(!i)return null;try{return i.readCallees.get(t,e,a,r,s)?.payload??null}catch(l){return o(n,"semantic_callees read",l),null}}function j(n,t,e,a){let r=c(n);if(!r)return null;try{return r.readReferences.get(t,e,a,s)?.payload??null}catch(i){return o(n,"semantic_references read",i),null}}function X(n,t){if(t.length===0)return;let e=c(n);if(e)try{e.evidence.transaction(()=>{let a=new Set;for(let r of t){let i=`${r.relativePath}\0${r.contentHash}`;a.has(i)||(a.add(i),e.dropStaleCallees.run(r.relativePath,r.contentHash)),e.writeCallees.run(r.relativePath,r.symbol,r.contentHash,r.depsDigest,s,r.payload)}})()}catch(a){o(n,"semantic_callees write",a)}}function P(n,t){if(t.length===0)return;let e=c(n);if(e)try{e.evidence.transaction(()=>{let a=new Set;for(let r of t)a.has(r.projectFingerprint)||(a.add(r.projectFingerprint),e.dropStaleReferences.run(r.projectFingerprint)),e.writeReferences.run(r.relativePath,r.symbol,r.projectFingerprint,s,r.payload)})()}catch(a){o(n,"semantic_references write",a)}}export{f as a,w as b,F as c,x as d,I as e,U as f,j as g,X as h,P as i};
32
+ //# sourceMappingURL=chunk-C6ROZBJA.js.map
@@ -0,0 +1,2 @@
1
+ import{b as r}from"./chunk-LGX2Y4BA.js";import{i as e}from"./chunk-X3BJUFSN.js";function l(t,s){let o=r(t,s);return e(t,o).map(({relativePath:n,...a})=>a)}export{l as a};
2
+ //# sourceMappingURL=chunk-COUFCH64.js.map
@@ -1,5 +1,5 @@
1
- import{c as g,e as h}from"./chunk-7S5E7KWT.js";import{existsSync as V,readFileSync as w}from"fs";import{join as v}from"path";var j=g("source-text",{clearGroups:["whole-project","source-file"]}),_=g("source-lines",{clearGroups:["whole-project","source-file"]});function l(e,t){let r=t.replace(/\\/g,"/");return j.get(e,r,()=>{let n=v(e.config.projectRoot,r);return V(n)?w(n,"utf-8"):""})}function A(e,t){let r=t.replace(/\\/g,"/");return _.get(e,r,()=>{let n=l(e,r);return n?n.split(`
2
- `):[]})}var N=/^\s*(?:\/\/|#|\/\*+|\*)\s*scip-query[\s:-]*ignore(?:[\s:-]+(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar))?\b/i;function R(e){let t=N.exec(e);return t?t[1]??"":null}function X(e,t,r){if(r<=0)return!1;let n=A(e,t);if(n.length===0)return!1;for(let s=r-1;s>=0&&s>=r-5;s-=1){let a=(n[s]??"").trim();if(a!==""){if(R(a)!==null)return!0;if(!a.startsWith("//")&&!a.startsWith("*")&&!a.startsWith("/*")&&!a.startsWith("@")&&!a.startsWith("#"))return!1}}return!1}import{createRequire as P}from"module";var c=P(import.meta.url),p=null,k=!1;function T(){if(k)return null;if(p)return p;try{return p=c("tree-sitter"),p}catch{return k=!0,null}}var C=new Map,m=new Set;function Q(e){if(m.has(e))return null;let t=C.get(e);if(t)return t;let r;try{switch(e){case"rust":r=c("tree-sitter-rust");break;case"typescript":r=c("tree-sitter-typescript").typescript;break;case"tsx":r=c("tree-sitter-typescript").tsx;break;case"javascript":r=c("tree-sitter-javascript");break;case"python":r=c("tree-sitter-python");break;case"java":r=c("tree-sitter-java");break;case"kotlin":r=c("tree-sitter-kotlin");break;case"scala":r=c("tree-sitter-scala");break;case"ruby":r=c("tree-sitter-ruby");break;case"c":r=c("tree-sitter-c");break;case"cpp":r=c("tree-sitter-cpp");break;case"csharp":r=c("tree-sitter-c-sharp");break;case"php":r=c("tree-sitter-php").php;break;case"vb":{let n=c("tree-sitter-vb-dotnet");r=n.language??n;break}}}catch{return m.add(e),null}return C.set(e,r),r}var x=new Map;function U(e){let t=x.get(e);if(t)return t;let r=Q(e);if(!r)return null;let n=T();if(!n)return null;let s=new n;try{s.setLanguage(r)}catch{return m.add(e),null}return x.set(e,s),s}function E(e,t){return e.parse(n=>n>=t.length?null:t.slice(n,Math.min(t.length,n+16384)))}function Z(e,t){let r=U(e);if(!r)return null;try{return E(r,t)}catch{return null}}import{posix as y}from"path";import{parse as M}from"@vue/compiler-sfc";var I=h("vue-sfc-units");function ae(e,t){let r=B(t),n=l(e,r);return I.get(e,r,n,()=>z(e,r,n))}function B(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function D(e){let t=e?.toLowerCase();return!t||t==="js"||t==="javascript"||t==="jsx"?"javascript":t==="ts"||t==="typescript"?"typescript":t==="tsx"?"tsx":null}function ce(e){return!e||e.body.length===0?0:e.body.split(`
3
- `).length}function z(e,t,r){let n={relativePath:t,template:null,scripts:[],styles:[],customBlocks:[],errors:[]};if(!r)return n;let s;try{s=M(r,{filename:t})}catch(i){return n.errors.push(L(i)),n}n.errors.push(...s.errors.map(L));let{descriptor:a}=s;return a.template&&(n.template=f(e,t,"template",a.template)),a.script&&n.scripts.push(b(e,t,a.script,!1)),a.scriptSetup&&n.scripts.push(b(e,t,a.scriptSetup,!0)),n.styles=a.styles.map(i=>f(e,t,"style",i)),n.customBlocks=a.customBlocks.map(i=>f(e,t,"custom",i)),n.errors.push(...[n.template,...n.scripts,...n.styles,...n.customBlocks].flatMap(i=>i?.errors??[])),n}function b(e,t,r,n){let s=f(e,t,"script",r);return{...s,kind:"script",setup:n,astLanguage:D(s.lang)}}function f(e,t,r,n){let s=$(n.attrs),a=typeof s.lang=="string"?s.lang:null,i=typeof s.src=="string"?s.src:typeof n.src=="string"?n.src:void 0;if(i){let o=W(t,i);if(!o)return{kind:r,ownerPath:t,sourcePath:t,external:!0,src:i,attrs:s,lang:a,body:"",startLine:0,endLine:0,errors:[`Could not resolve Vue ${r} block source: ${i}`]};let u=l(e,o),F=u?Math.max(0,u.split(`
4
- `).length-1):0;return{kind:r,ownerPath:t,sourcePath:o,external:!0,src:i,attrs:s,lang:a,body:u,startLine:0,endLine:F,errors:u?[]:[`Vue ${r} block source not found: ${o}`]}}let S=Math.max(0,n.loc.start.line-1);return{kind:r,ownerPath:t,sourcePath:t,external:!1,attrs:s,lang:a,body:n.content,startLine:S,endLine:Math.max(S,n.loc.end.line-1),errors:[]}}function W(e,t){let r=t.split(/[?#]/,1)[0];if(!r||r.startsWith("/")||r.includes("://"))return null;let n=B(y.normalize(y.join(y.dirname(e),r)));return n===".."||n.startsWith("../")?null:n}function $(e){return{...e}}function L(e){return e instanceof Error?e.message:String(e)}function oe(e,t){let r=q(e,t);if(!r)return null;let n=d(r);return n?{calleeLeaf:n,memberAccess:G(r),line:e.startPosition.row}:null}function q(e,t){if(t==="rust")return e.type==="call_expression"?e.childForFieldName("function")??e.namedChild(0):e.type==="macro_invocation"?e.childForFieldName("macro")??e.namedChild(0):null;if(t==="python")return e.type!=="call"?null:e.childForFieldName("function")??e.namedChild(0);if(t==="typescript"||t==="tsx"||t==="javascript"){if(e.type==="call_expression")return e.childForFieldName("function")??e.namedChild(0);if(e.type==="new_expression")return e.childForFieldName("constructor")??e.namedChild(0)}return null}function G(e){switch(e.type){case"field_expression":case"member_expression":case"attribute":return!0;default:return!1}}function d(e){switch(e.type){case"identifier":case"type_identifier":case"property_identifier":case"shorthand_property_identifier":return e.text;case"field_expression":case"member_expression":case"attribute":{let t=e.namedChild(e.namedChildCount-1);return t?d(t):null}case"scoped_identifier":{let t=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return t?d(t):null}case"super":case"self":case"this":return null;default:return null}}export{l as a,A as b,R as c,X as d,Z as e,ae as f,D as g,ce as h,oe as i,d as j};
5
- //# sourceMappingURL=chunk-D322LMSA.js.map
1
+ import{c as g,e as h}from"./chunk-7S5E7KWT.js";import{readFileSync as w}from"fs";import{join as V}from"path";var j=g("source-text",{clearGroups:["whole-project","source-file"]}),v=g("source-lines",{clearGroups:["whole-project","source-file"]});function l(e,t){let r=t.replace(/\\/g,"/");return j.get(e,r,()=>{let n=V(e.config.projectRoot,r);try{return w(n,"utf-8")}catch(s){if(_(s))return"";throw s}})}function _(e){return typeof e=="object"&&e!==null&&"code"in e&&(e.code==="ENOENT"||e.code==="ENOTDIR")}function A(e,t){let r=t.replace(/\\/g,"/");return v.get(e,r,()=>{let n=l(e,r);return n?n.split(`
2
+ `):[]})}var N=/^\s*(?:\/\/|#|\/\*+|\*)\s*scip-query[\s:-]*ignore(?:[\s:-]+(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar))?\b/i;function R(e){let t=N.exec(e);return t?t[1]??"":null}function X(e,t,r){if(r<=0)return!1;let n=A(e,t);if(n.length===0)return!1;for(let s=r-1;s>=0&&s>=r-5;s-=1){let a=(n[s]??"").trim();if(a!==""){if(R(a)!==null)return!0;if(!a.startsWith("//")&&!a.startsWith("*")&&!a.startsWith("/*")&&!a.startsWith("@")&&!a.startsWith("#"))return!1}}return!1}import{createRequire as P}from"module";var c=P(import.meta.url),p=null,k=!1;function T(){if(k)return null;if(p)return p;try{return p=c("tree-sitter"),p}catch{return k=!0,null}}var C=new Map,m=new Set;function E(e){if(m.has(e))return null;let t=C.get(e);if(t)return t;let r;try{switch(e){case"rust":r=c("tree-sitter-rust");break;case"typescript":r=c("tree-sitter-typescript").typescript;break;case"tsx":r=c("tree-sitter-typescript").tsx;break;case"javascript":r=c("tree-sitter-javascript");break;case"python":r=c("tree-sitter-python");break;case"java":r=c("tree-sitter-java");break;case"kotlin":r=c("tree-sitter-kotlin");break;case"scala":r=c("tree-sitter-scala");break;case"ruby":r=c("tree-sitter-ruby");break;case"c":r=c("tree-sitter-c");break;case"cpp":r=c("tree-sitter-cpp");break;case"csharp":r=c("tree-sitter-c-sharp");break;case"php":r=c("tree-sitter-php").php;break;case"vb":{let n=c("tree-sitter-vb-dotnet");r=n.language??n;break}}}catch{return m.add(e),null}return C.set(e,r),r}var x=new Map;function M(e){let t=x.get(e);if(t)return t;let r=E(e);if(!r)return null;let n=T();if(!n)return null;let s=new n;try{s.setLanguage(r)}catch{return m.add(e),null}return x.set(e,s),s}function Q(e,t){return e.parse(n=>n>=t.length?null:t.slice(n,Math.min(t.length,n+16384)))}function Z(e,t){let r=M(e);if(!r)return null;try{return Q(r,t)}catch{return null}}import{posix as y}from"path";import{parse as U}from"@vue/compiler-sfc";var I=h("vue-sfc-units");function ae(e,t){let r=B(t),n=l(e,r);return I.get(e,r,n,()=>z(e,r,n))}function B(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function D(e){let t=e?.toLowerCase();return!t||t==="js"||t==="javascript"||t==="jsx"?"javascript":t==="ts"||t==="typescript"?"typescript":t==="tsx"?"tsx":null}function ce(e){return!e||e.body.length===0?0:e.body.split(`
3
+ `).length}function z(e,t,r){let n={relativePath:t,template:null,scripts:[],styles:[],customBlocks:[],errors:[]};if(!r)return n;let s;try{s=U(r,{filename:t})}catch(i){return n.errors.push(L(i)),n}n.errors.push(...s.errors.map(L));let{descriptor:a}=s;return a.template&&(n.template=f(e,t,"template",a.template)),a.script&&n.scripts.push(b(e,t,a.script,!1)),a.scriptSetup&&n.scripts.push(b(e,t,a.scriptSetup,!0)),n.styles=a.styles.map(i=>f(e,t,"style",i)),n.customBlocks=a.customBlocks.map(i=>f(e,t,"custom",i)),n.errors.push(...[n.template,...n.scripts,...n.styles,...n.customBlocks].flatMap(i=>i?.errors??[])),n}function b(e,t,r,n){let s=f(e,t,"script",r);return{...s,kind:"script",setup:n,astLanguage:D(s.lang)}}function f(e,t,r,n){let s=$(n.attrs),a=typeof s.lang=="string"?s.lang:null,i=typeof s.src=="string"?s.src:typeof n.src=="string"?n.src:void 0;if(i){let o=W(t,i);if(!o)return{kind:r,ownerPath:t,sourcePath:t,external:!0,src:i,attrs:s,lang:a,body:"",startLine:0,endLine:0,errors:[`Could not resolve Vue ${r} block source: ${i}`]};let u=l(e,o),F=u?Math.max(0,u.split(`
4
+ `).length-1):0;return{kind:r,ownerPath:t,sourcePath:o,external:!0,src:i,attrs:s,lang:a,body:u,startLine:0,endLine:F,errors:u?[]:[`Vue ${r} block source not found: ${o}`]}}let S=Math.max(0,n.loc.start.line-1);return{kind:r,ownerPath:t,sourcePath:t,external:!1,attrs:s,lang:a,body:n.content,startLine:S,endLine:Math.max(S,n.loc.end.line-1),errors:[]}}function W(e,t){let r=t.split(/[?#]/,1)[0];if(!r||r.startsWith("/")||r.includes("://"))return null;let n=B(y.normalize(y.join(y.dirname(e),r)));return n===".."||n.startsWith("../")?null:n}function $(e){return{...e}}function L(e){return e instanceof Error?e.message:String(e)}function oe(e,t){let r=O(e,t);if(!r)return null;let n=d(r);return n?{calleeLeaf:n,memberAccess:q(r),line:e.startPosition.row}:null}function O(e,t){if(t==="rust")return e.type==="call_expression"?e.childForFieldName("function")??e.namedChild(0):e.type==="macro_invocation"?e.childForFieldName("macro")??e.namedChild(0):null;if(t==="python")return e.type!=="call"?null:e.childForFieldName("function")??e.namedChild(0);if(t==="typescript"||t==="tsx"||t==="javascript"){if(e.type==="call_expression")return e.childForFieldName("function")??e.namedChild(0);if(e.type==="new_expression")return e.childForFieldName("constructor")??e.namedChild(0)}return null}function q(e){switch(e.type){case"field_expression":case"member_expression":case"attribute":return!0;default:return!1}}function d(e){switch(e.type){case"identifier":case"type_identifier":case"property_identifier":case"shorthand_property_identifier":return e.text;case"field_expression":case"member_expression":case"attribute":{let t=e.namedChild(e.namedChildCount-1);return t?d(t):null}case"scoped_identifier":{let t=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return t?d(t):null}case"super":case"self":case"this":return null;default:return null}}export{l as a,A as b,R as c,X as d,Z as e,ae as f,D as g,ce as h,oe as i,d as j};
5
+ //# sourceMappingURL=chunk-DS6QEB3G.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-3ZYF3ELZ.js";import{a as i}from"./chunk-MZ7APUFN.js";import{c as s,e as o,k as m}from"./chunk-JM72FNGA.js";function L(t,l){let r=i(t,l);return r?new a(t).definitionsForFile(r.relativePath).filter(e=>e.symbol!==r.symbol).filter(e=>m(r.symbol,e.symbol)).sort((e,n)=>e.startLine-n.startLine||e.endLine-n.endLine).map(e=>({symbol:e.symbol,shortName:s(e.symbol),startLine:e.startLine,endLine:e.endLine,kind:o(e.symbol)??"unknown"})):[]}export{L as a};
2
- //# sourceMappingURL=chunk-NVFERV4U.js.map
1
+ import{a}from"./chunk-XPOZO76D.js";import{a as i}from"./chunk-T633QLYF.js";import{c as s,e as o,k as m}from"./chunk-JM72FNGA.js";function L(t,l){let r=i(t,l);return r?new a(t).definitionsForFile(r.relativePath).filter(e=>e.symbol!==r.symbol).filter(e=>m(r.symbol,e.symbol)).sort((e,n)=>e.startLine-n.startLine||e.endLine-n.endLine).map(e=>({symbol:e.symbol,shortName:s(e.symbol),startLine:e.startLine,endLine:e.endLine,kind:o(e.symbol)??"unknown"})):[]}export{L as a};
2
+ //# sourceMappingURL=chunk-E2CCBFLR.js.map
@@ -1,2 +1,2 @@
1
- import{c as i}from"./chunk-B75HZHUP.js";import{a as m}from"./chunk-GZCQTZLK.js";import{a}from"./chunk-YTR4CO5S.js";import{a as r}from"./chunk-MZ7APUFN.js";import{c as o}from"./chunk-JM72FNGA.js";function S(s,n,c={}){let e=r(s,n);if(!e)return null;let t=c.semantic!==!1,y=m(s,e,{limit:50,semantic:t}),b=i(a(s,e,{limit:50,additive:!0,callableOnly:!0,semantic:t}));return{symbol:e.symbol,shortName:o(e.symbol),callers:y.map(l=>({symbol:l.symbol,shortName:o(l.symbol),file:l.file})),callees:b.map(l=>({symbol:l.symbol,shortName:o(l.symbol),file:l.file}))}}export{S as a};
2
- //# sourceMappingURL=chunk-Z4VHYJ5U.js.map
1
+ import{c as i}from"./chunk-B75HZHUP.js";import{a as m}from"./chunk-YNSVAJR6.js";import{a}from"./chunk-ZMU6IWDK.js";import{a as r}from"./chunk-T633QLYF.js";import{c as o}from"./chunk-JM72FNGA.js";function S(s,n,c={}){let e=r(s,n);if(!e)return null;let t=c.semantic!==!1,y=m(s,e,{limit:50,semantic:t}),b=i(a(s,e,{limit:50,additive:!0,callableOnly:!0,semantic:t}));return{symbol:e.symbol,shortName:o(e.symbol),callers:y.map(l=>({symbol:l.symbol,shortName:o(l.symbol),file:l.file})),callees:b.map(l=>({symbol:l.symbol,shortName:o(l.symbol),file:l.file}))}}export{S as a};
2
+ //# sourceMappingURL=chunk-EBIQY3RK.js.map
@@ -1,2 +1,2 @@
1
- import{a as C,b as k,c as a,d as m}from"./chunk-QUJBXLBY.js";import{a as V}from"./chunk-PVZMPG5I.js";import{a as B,b}from"./chunk-3UVJJ6Z7.js";import{c as y}from"./chunk-ERHOS6AW.js";function L(e,s={}){let{minSimilarity:h=.45,minSharedBehaviors:o=6,limit:r=20,scope:t,scanLimit:l,filePattern:c}=s,d=y(e,{scope:t,minBehaviorTokens:Math.max(3,o),scanLimit:l}).map(n=>({file:n.file,tokens:n.behaviorTokens,profile:n}));return V({profiles:d,limit:r,filePattern:c,compare:(n,i)=>R(n,i,h,o),sort:(n,i)=>i.similarity-n.similarity||n.fileA.localeCompare(i.fileA)||n.fileB.localeCompare(i.fileB)})}function R(e,s,h,o){let r=B(e.tokens,s.tokens);if(r.size<o||!P(r))return null;let t=k(e.tokens,s.tokens);if(t<h)return null;let l=a(r,"composable:"),c=a(r,"store:"),d=a(r,"reactivity:"),n=a(r,"lifecycle:"),i=a(r,"request:"),f=a(r,"function:"),g=a(r,"function-verb:"),v=a(r,"template-binding:"),p=a(r,"template-event:"),u=T({sharedComposables:l,sharedStores:c,sharedReactivity:d,sharedLifecycle:n,sharedRequests:i,sharedFunctions:f,sharedFunctionVerbs:g,sharedBindings:v,sharedTemplateEvents:p});return{fileA:e.file,fileB:s.file,similarity:t,sharedTokens:m(r),sharedComposables:l,sharedStores:c,sharedReactivity:d,sharedLifecycle:n,sharedRequests:i,sharedFunctions:f,sharedFunctionVerbs:g,sharedBindings:v,sharedTemplateEvents:p,evidenceClass:u.evidenceClass,actionTier:u.actionTier,evidenceClassReasons:u.reasons,recommendation:u.recommendation,uniqueToA:m(b(e.tokens,s.tokens)).slice(0,25),uniqueToB:m(b(s.tokens,e.tokens)).slice(0,25),reason:S({sharedComposables:l,sharedStores:c,sharedRequests:i,sharedLifecycle:n,sharedFunctions:f,sharedFunctionVerbs:g,sharedBindings:v}),locA:e.profile.totalLines,locB:s.profile.totalLines}}function T(e){return C({genericWords:q,primitiveGroups:[{values:e.sharedReactivity,reasonPrefix:"shared reactivity primitive",bucket:"generic"},{values:e.sharedLifecycle,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedComposables,label:"shared composable",fallbackBucket:"shared-abstraction"},{names:e.sharedStores,label:"shared store",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedFunctions,label:"shared function",fallbackBucket:"generic"},{names:e.sharedFunctionVerbs,label:"shared action verb",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"},{names:e.sharedTemplateEvents,label:"shared template event",fallbackBucket:"generic"}],recommendation:F})}function F(e){switch(e){case"domain-behavior":return"Review for a shared composable, store, or feature module around the named domain behavior.";case"mixed":return"Separate generic Vue mechanics from domain-specific behavior before extracting a composable.";case"shared-abstraction":return"Review the existing composable/store usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct composable-extraction evidence."}}function P(e){let s=0,h=0,o=0,r=0,t=0,l=0,c=0;for(let i of e)i.startsWith("composable:")?s+=1:i.startsWith("store:")?h+=1:i.startsWith("request:")?o+=1:i.startsWith("lifecycle:")?r+=1:i.startsWith("function:")?t+=1:i.startsWith("reactivity:")?l+=1:(i.startsWith("function-verb:")||i.startsWith("template-binding:")||i.startsWith("template-event:"))&&(c+=1);let d=s+h,n=d+o+r+t+c;return o>=1&&n>=4||r>=1&&t>=2&&n>=4||d>=2&&(o>=1||t>=2)&&n>=5||t>=2&&l>=1&&n>=4}function S(e){let s=[];return e.sharedComposables.length&&s.push(`shared composables: ${e.sharedComposables.join(", ")}`),e.sharedStores.length&&s.push(`shared stores: ${e.sharedStores.join(", ")}`),e.sharedRequests.length&&s.push(`shared request helpers: ${e.sharedRequests.join(", ")}`),e.sharedLifecycle.length&&s.push(`shared lifecycle: ${e.sharedLifecycle.join(", ")}`),e.sharedFunctions.length&&s.push(`shared functions: ${e.sharedFunctions.slice(0,6).join(", ")}`),e.sharedFunctionVerbs.length&&s.push(`shared action verbs: ${e.sharedFunctionVerbs.slice(0,6).join(", ")}`),e.sharedBindings.length&&s.push(`shared template bindings: ${e.sharedBindings.slice(0,6).join(", ")}`),s.join("; ")||"shared Vue behavior profile"}var q=new Set(["add","apply","cancel","change","clear","close","composable","create","data","delete","draft","edit","error","fetch","filter","form","item","items","load","loading","name","open","reactive","ref","refresh","remove","request","reset","resource","row","rows","save","saving","search","select","selected","store","submit","toggle","update","use","value","watch"]);export{L as a};
2
- //# sourceMappingURL=chunk-5UDFZC4D.js.map
1
+ import{a as C,b as k,c as a,d as m}from"./chunk-BZ53S4ZN.js";import{a as V}from"./chunk-PVZMPG5I.js";import{a as B,b}from"./chunk-YWOOQ4FF.js";import{c as y}from"./chunk-YZA6PPZL.js";function L(e,s={}){let{minSimilarity:h=.45,minSharedBehaviors:o=6,limit:r=20,scope:t,scanLimit:l,filePattern:c}=s,d=y(e,{scope:t,minBehaviorTokens:Math.max(3,o),scanLimit:l}).map(n=>({file:n.file,tokens:n.behaviorTokens,profile:n}));return V({profiles:d,limit:r,filePattern:c,compare:(n,i)=>R(n,i,h,o),sort:(n,i)=>i.similarity-n.similarity||n.fileA.localeCompare(i.fileA)||n.fileB.localeCompare(i.fileB)})}function R(e,s,h,o){let r=B(e.tokens,s.tokens);if(r.size<o||!P(r))return null;let t=k(e.tokens,s.tokens);if(t<h)return null;let l=a(r,"composable:"),c=a(r,"store:"),d=a(r,"reactivity:"),n=a(r,"lifecycle:"),i=a(r,"request:"),f=a(r,"function:"),g=a(r,"function-verb:"),v=a(r,"template-binding:"),p=a(r,"template-event:"),u=T({sharedComposables:l,sharedStores:c,sharedReactivity:d,sharedLifecycle:n,sharedRequests:i,sharedFunctions:f,sharedFunctionVerbs:g,sharedBindings:v,sharedTemplateEvents:p});return{fileA:e.file,fileB:s.file,similarity:t,sharedTokens:m(r),sharedComposables:l,sharedStores:c,sharedReactivity:d,sharedLifecycle:n,sharedRequests:i,sharedFunctions:f,sharedFunctionVerbs:g,sharedBindings:v,sharedTemplateEvents:p,evidenceClass:u.evidenceClass,actionTier:u.actionTier,evidenceClassReasons:u.reasons,recommendation:u.recommendation,uniqueToA:m(b(e.tokens,s.tokens)).slice(0,25),uniqueToB:m(b(s.tokens,e.tokens)).slice(0,25),reason:S({sharedComposables:l,sharedStores:c,sharedRequests:i,sharedLifecycle:n,sharedFunctions:f,sharedFunctionVerbs:g,sharedBindings:v}),locA:e.profile.totalLines,locB:s.profile.totalLines}}function T(e){return C({genericWords:q,primitiveGroups:[{values:e.sharedReactivity,reasonPrefix:"shared reactivity primitive",bucket:"generic"},{values:e.sharedLifecycle,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedComposables,label:"shared composable",fallbackBucket:"shared-abstraction"},{names:e.sharedStores,label:"shared store",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedFunctions,label:"shared function",fallbackBucket:"generic"},{names:e.sharedFunctionVerbs,label:"shared action verb",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"},{names:e.sharedTemplateEvents,label:"shared template event",fallbackBucket:"generic"}],recommendation:F})}function F(e){switch(e){case"domain-behavior":return"Review for a shared composable, store, or feature module around the named domain behavior.";case"mixed":return"Separate generic Vue mechanics from domain-specific behavior before extracting a composable.";case"shared-abstraction":return"Review the existing composable/store usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct composable-extraction evidence."}}function P(e){let s=0,h=0,o=0,r=0,t=0,l=0,c=0;for(let i of e)i.startsWith("composable:")?s+=1:i.startsWith("store:")?h+=1:i.startsWith("request:")?o+=1:i.startsWith("lifecycle:")?r+=1:i.startsWith("function:")?t+=1:i.startsWith("reactivity:")?l+=1:(i.startsWith("function-verb:")||i.startsWith("template-binding:")||i.startsWith("template-event:"))&&(c+=1);let d=s+h,n=d+o+r+t+c;return o>=1&&n>=4||r>=1&&t>=2&&n>=4||d>=2&&(o>=1||t>=2)&&n>=5||t>=2&&l>=1&&n>=4}function S(e){let s=[];return e.sharedComposables.length&&s.push(`shared composables: ${e.sharedComposables.join(", ")}`),e.sharedStores.length&&s.push(`shared stores: ${e.sharedStores.join(", ")}`),e.sharedRequests.length&&s.push(`shared request helpers: ${e.sharedRequests.join(", ")}`),e.sharedLifecycle.length&&s.push(`shared lifecycle: ${e.sharedLifecycle.join(", ")}`),e.sharedFunctions.length&&s.push(`shared functions: ${e.sharedFunctions.slice(0,6).join(", ")}`),e.sharedFunctionVerbs.length&&s.push(`shared action verbs: ${e.sharedFunctionVerbs.slice(0,6).join(", ")}`),e.sharedBindings.length&&s.push(`shared template bindings: ${e.sharedBindings.slice(0,6).join(", ")}`),s.join("; ")||"shared Vue behavior profile"}var q=new Set(["add","apply","cancel","change","clear","close","composable","create","data","delete","draft","edit","error","fetch","filter","form","item","items","load","loading","name","open","reactive","ref","refresh","remove","request","reset","resource","row","rows","save","saving","search","select","selected","store","submit","toggle","update","use","value","watch"]);export{L as a};
2
+ //# sourceMappingURL=chunk-EKECQP6Z.js.map
@@ -1,2 +1,2 @@
1
- import{c as l}from"./chunk-ERHOS6AW.js";function v(e,t={}){let{minTotalLines:n=800,minTemplateLines:i=300,minScriptLines:a=300,minStyleLines:r=500,limit:o=20,scope:m,scanLimit:p,filePattern:u}=t;return l(e,{scope:m,scanLimit:p}).filter(s=>!u||s.file.includes(u)).map(s=>L(s,{minTotalLines:n,minTemplateLines:i,minScriptLines:a,minStyleLines:r})).filter(s=>s!==null).sort((s,c)=>c.totalLines-s.totalLines||s.file.localeCompare(c.file)).slice(0,o)}function L(e,t){let n=[];if(e.totalLines>=t.minTotalLines&&n.push(`${e.totalLines} total component line(s)`),e.templateLines>=t.minTemplateLines&&n.push(`${e.templateLines} template line(s)`),e.scriptLines>=t.minScriptLines&&n.push(`${e.scriptLines} script line(s)`),e.styleLines>=t.minStyleLines&&n.push(`${e.styleLines} style line(s)`),n.length===0)return null;let i=b(e),a=g(e,t,i),r=x(e.file),o=V(i,r);return{file:e.file,totalLines:e.totalLines,sfcLines:e.sfcLines,templateLines:e.templateLines,scriptLines:e.scriptLines,styleLines:e.styleLines,externalScriptLines:e.externalScriptLines,externalScriptPaths:e.externalScriptPaths,customBlockLines:e.customBlockLines,dominantPressure:i,pressureKinds:a,contextKind:r,recommendationKind:o,recommendation:d(o,r),reasons:n,loc:e.totalLines}}function b(e){let t=[{axis:"template",lines:e.templateLines},{axis:"script",lines:e.scriptLines-e.externalScriptLines},{axis:"style",lines:e.styleLines},{axis:"external-script",lines:e.externalScriptLines},{axis:"custom-block",lines:e.customBlockLines}];return t.sort((n,i)=>i.lines-n.lines),t[0]?.lines?t[0].axis:"total"}function g(e,t,n){let i=[];return e.totalLines>=t.minTotalLines&&(i.push("total"),n!=="total"&&i.push(n)),e.templateLines>=t.minTemplateLines&&i.push("template"),e.scriptLines>=t.minScriptLines&&i.push("script"),e.styleLines>=t.minStyleLines&&i.push("style"),(e.externalScriptLines>=t.minScriptLines||n==="external-script")&&i.push("external-script"),e.customBlockLines>0&&n==="custom-block"&&i.push("custom-block"),[...new Set(i.length>0?i:[n])]}function x(e){return e.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).some(i=>w.has(i))||/(?:view|page|route)\.vue$/i.test(e)||/(?:^|\/)(views|pages|routes)\//i.test(e)?"route-page":"component"}function V(e,t){return e==="style"?"style-decomposition":e==="template"?"template-decomposition":e==="external-script"?"external-script-boundary":e==="custom-block"?"custom-block-review":t==="route-page"?"route-page-decomposition":e==="script"?"script-behavior-extraction":"total-size-review"}function d(e,t){switch(e){case"template-decomposition":return t==="route-page"?"Split route template sections into named panels before extracting script behavior.":"Split repeated template sections into named presentational components.";case"script-behavior-extraction":return"Extract independent script behavior into composables, controllers, or feature modules.";case"style-decomposition":return"Review UI/style decomposition; move repeated styling to component or style primitives, not composables.";case"external-script-boundary":return"Review the external script boundary and split controller/composable modules by workflow.";case"custom-block-review":return"Review custom block ownership before splitting template or script code.";case"route-page-decomposition":return"Split route/page orchestration from reusable panels and feature controllers.";case"total-size-review":return"Review the largest block first, then split by the dominant reason to change."}}var w=new Set(["landing","page","pages","route","routes","view","views"]);export{v as a};
2
- //# sourceMappingURL=chunk-O3OKSF6O.js.map
1
+ import{c as l}from"./chunk-YZA6PPZL.js";function v(e,t={}){let{minTotalLines:n=800,minTemplateLines:i=300,minScriptLines:a=300,minStyleLines:r=500,limit:o=20,scope:m,scanLimit:p,filePattern:u}=t;return l(e,{scope:m,scanLimit:p}).filter(s=>!u||s.file.includes(u)).map(s=>L(s,{minTotalLines:n,minTemplateLines:i,minScriptLines:a,minStyleLines:r})).filter(s=>s!==null).sort((s,c)=>c.totalLines-s.totalLines||s.file.localeCompare(c.file)).slice(0,o)}function L(e,t){let n=[];if(e.totalLines>=t.minTotalLines&&n.push(`${e.totalLines} total component line(s)`),e.templateLines>=t.minTemplateLines&&n.push(`${e.templateLines} template line(s)`),e.scriptLines>=t.minScriptLines&&n.push(`${e.scriptLines} script line(s)`),e.styleLines>=t.minStyleLines&&n.push(`${e.styleLines} style line(s)`),n.length===0)return null;let i=b(e),a=g(e,t,i),r=x(e.file),o=V(i,r);return{file:e.file,totalLines:e.totalLines,sfcLines:e.sfcLines,templateLines:e.templateLines,scriptLines:e.scriptLines,styleLines:e.styleLines,externalScriptLines:e.externalScriptLines,externalScriptPaths:e.externalScriptPaths,customBlockLines:e.customBlockLines,dominantPressure:i,pressureKinds:a,contextKind:r,recommendationKind:o,recommendation:d(o,r),reasons:n,loc:e.totalLines}}function b(e){let t=[{axis:"template",lines:e.templateLines},{axis:"script",lines:e.scriptLines-e.externalScriptLines},{axis:"style",lines:e.styleLines},{axis:"external-script",lines:e.externalScriptLines},{axis:"custom-block",lines:e.customBlockLines}];return t.sort((n,i)=>i.lines-n.lines),t[0]?.lines?t[0].axis:"total"}function g(e,t,n){let i=[];return e.totalLines>=t.minTotalLines&&(i.push("total"),n!=="total"&&i.push(n)),e.templateLines>=t.minTemplateLines&&i.push("template"),e.scriptLines>=t.minScriptLines&&i.push("script"),e.styleLines>=t.minStyleLines&&i.push("style"),(e.externalScriptLines>=t.minScriptLines||n==="external-script")&&i.push("external-script"),e.customBlockLines>0&&n==="custom-block"&&i.push("custom-block"),[...new Set(i.length>0?i:[n])]}function x(e){return e.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).some(i=>w.has(i))||/(?:view|page|route)\.vue$/i.test(e)||/(?:^|\/)(views|pages|routes)\//i.test(e)?"route-page":"component"}function V(e,t){return e==="style"?"style-decomposition":e==="template"?"template-decomposition":e==="external-script"?"external-script-boundary":e==="custom-block"?"custom-block-review":t==="route-page"?"route-page-decomposition":e==="script"?"script-behavior-extraction":"total-size-review"}function d(e,t){switch(e){case"template-decomposition":return t==="route-page"?"Split route template sections into named panels before extracting script behavior.":"Split repeated template sections into named presentational components.";case"script-behavior-extraction":return"Extract independent script behavior into composables, controllers, or feature modules.";case"style-decomposition":return"Review UI/style decomposition; move repeated styling to component or style primitives, not composables.";case"external-script-boundary":return"Review the external script boundary and split controller/composable modules by workflow.";case"custom-block-review":return"Review custom block ownership before splitting template or script code.";case"route-page-decomposition":return"Split route/page orchestration from reusable panels and feature controllers.";case"total-size-review":return"Review the largest block first, then split by the dominant reason to change."}}var w=new Set(["landing","page","pages","route","routes","view","views"]);export{v as a};
2
+ //# sourceMappingURL=chunk-FG4NT6VY.js.map
@@ -1,4 +1,4 @@
1
- import{o as f}from"./chunk-HVTYSC26.js";import{a as d}from"./chunk-MZ7APUFN.js";import{c as m,d as g}from"./chunk-3UW7VM4H.js";import{c as s,g as u}from"./chunk-JM72FNGA.js";import{a as c}from"./chunk-D322LMSA.js";function E(e,r,i={}){let n=d(e,r);if(!n)return{definitions:[],referencedBy:[]};let t=e.get("SELECT display_name, documentation FROM global_symbols WHERE id = ?",n.symbolId),a=g(t?.documentation??null),o=e.isIgnored(n.relativePath)?[]:[{relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,signature:y(a,t?.display_name??null,n.symbol),source:S(e,n.relativePath,n.startLine,n.endLine)}],b=f(e,n,{semantic:i.semantic}).map(l=>({relativePath:l.file,line:l.line,enclosingSymbol:l.enclosingSymbol,enclosingShort:l.enclosingSymbol?s(l.enclosingSymbol):"(top-level)"}));return{definitions:o,referencedBy:b}}function S(e,r,i,n){let t=c(e,r);if(!t)return null;let o=t.split(`
1
+ import{q as f}from"./chunk-AETMKBZR.js";import{a as d}from"./chunk-T633QLYF.js";import{c as m,d as g}from"./chunk-X3BJUFSN.js";import{c as s,g as u}from"./chunk-JM72FNGA.js";import{a as c}from"./chunk-DS6QEB3G.js";function E(e,r,i={}){let n=d(e,r);if(!n)return{definitions:[],referencedBy:[]};let t=e.get("SELECT display_name, documentation FROM global_symbols WHERE id = ?",n.symbolId),a=g(t?.documentation??null),o=e.isIgnored(n.relativePath)?[]:[{relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,signature:y(a,t?.display_name??null,n.symbol),source:S(e,n.relativePath,n.startLine,n.endLine)}],b=f(e,n,{semantic:i.semantic}).map(l=>({relativePath:l.file,line:l.line,enclosingSymbol:l.enclosingSymbol,enclosingShort:l.enclosingSymbol?s(l.enclosingSymbol):"(top-level)"}));return{definitions:o,referencedBy:b}}function S(e,r,i,n){let t=c(e,r);if(!t)return null;let o=t.split(`
2
2
  `).slice(i,n+1).join(`
3
3
  `).trimEnd();return o.length>0?o:null}function y(e,r,i){let n=m(e);if(n&&!p(n))return n;let t=(r??"").trim();return t?u(i)&&!t.endsWith("()")?`${t}()`:t:s(i)}function p(e){return e.startsWith("undefined")||e.includes("|")||e.includes("```")}export{E as a};
4
- //# sourceMappingURL=chunk-X7ZY6FFF.js.map
4
+ //# sourceMappingURL=chunk-FGTHPJON.js.map
@@ -1,2 +1,2 @@
1
- import{e as l}from"./chunk-EWC3UK4V.js";function S(e,n={}){let{minComponentLines:o=300,minFileLines:t=800,minJsxTokens:r=80,minBehaviorTokens:a=40,limit:m=20,scope:c,scanLimit:p,filePattern:i}=n;return l(e,{scope:c,scanLimit:p}).filter(s=>s.kind==="component").filter(s=>!i||s.file.includes(i)||s.name.includes(i)).map(s=>g(s,{minComponentLines:o,minFileLines:t,minJsxTokens:r,minBehaviorTokens:a})).filter(s=>s!==null).sort((s,u)=>u.componentLines-s.componentLines||u.fileLines-s.fileLines||s.file.localeCompare(u.file)).slice(0,m)}function g(e,n){let o=[];e.loc>=n.minComponentLines&&o.push(`${e.loc} component line(s)`);let t=Math.max(80,Math.floor(n.minComponentLines/2));if(e.fileLines>=n.minFileLines&&e.loc>=t&&o.push(`${e.fileLines} file line(s)`),e.jsxTokens.size>=n.minJsxTokens&&o.push(`${e.jsxTokens.size} JSX structure token(s)`),e.behaviorTokens.size>=n.minBehaviorTokens&&o.push(`${e.behaviorTokens.size} behavior token(s)`),o.length===0)return null;let r=x(e),a=C(e,n,r),m=f(e),c=b(r,a,m);return{file:e.file,component:e.name,componentLines:e.loc,fileLines:e.fileLines,jsxTokens:e.jsxTokens.size,behaviorTokens:e.behaviorTokens.size,dominantPressure:r,pressureKinds:a,contextKind:m,recommendationKind:c,recommendation:R(c,m),reasons:o,loc:e.loc}}function x(e){let n=[{axis:"component",value:e.loc},{axis:"file",value:e.fileLines},{axis:"jsx-structure",value:e.jsxTokens.size*3},{axis:"hook-behavior",value:e.behaviorTokens.size*4}];return n.sort((o,t)=>t.value-o.value),n[0]?.axis??"component"}function C(e,n,o){let t=[];e.loc>=n.minComponentLines&&t.push("component");let r=Math.max(80,Math.floor(n.minComponentLines/2));return e.fileLines>=n.minFileLines&&e.loc>=r&&t.push("file"),e.jsxTokens.size>=n.minJsxTokens&&t.push("jsx-structure"),e.behaviorTokens.size>=n.minBehaviorTokens&&t.push("hook-behavior"),[...new Set(t.length>0?t:[o])]}function f(e){let n=e.file.split(/[\\/]+/).filter(Boolean),o=n.slice(0,-1).map(i=>i.toLowerCase()),t=(n.at(-1)??e.name).replace(/\.[^.]+$/,""),r=`${t} ${e.name}`.split(/[^A-Za-z0-9]+/).filter(Boolean).map(i=>i.toLowerCase()),a=o.findIndex(i=>v.has(i)),m=a>=0&&o.slice(a+1).some(i=>h.has(i)),c=d(t)||d(e.name);return/(?:Page|Route|Screen|View)$/.test(t)||/(?:Page|Route|Screen|View)$/.test(e.name)||r.some(i=>k.has(i))||a>=0&&!m&&!c?"route-page":"component"}function d(e){let n=e.split(/[^A-Za-z0-9]+/).filter(Boolean).map(o=>o.toLowerCase());return n.at(-1)&&L.has(n.at(-1))?!0:[...L].some(o=>e.endsWith(T(o)))}function b(e,n,o){return e==="hook-behavior"?"behavior-extraction":o==="route-page"?"route-page-decomposition":n.includes("hook-behavior")?"behavior-extraction":n.includes("jsx-structure")?"jsx-decomposition":n.includes("file")?"file-decomposition":e==="jsx-structure"?"jsx-decomposition":e==="file"&&!n.includes("component")?"file-decomposition":"component-decomposition"}function R(e,n){switch(e){case"behavior-extraction":return"Extract independent state, effects, requests, or handlers into hooks, controllers, or feature modules.";case"route-page-decomposition":return"Split route/page orchestration from reusable panels and feature controllers.";case"jsx-decomposition":return n==="route-page"?"Split page JSX into named layout sections before extracting behavior.":"Split repeated JSX sections into named presentational components.";case"file-decomposition":return"Review file-level decomposition; split colocated panels or helpers before changing behavior.";case"component-decomposition":return"Review component boundaries around props, state ownership, and independently changing UI sections."}}var h=new Set(["component","components","panel","panels","partial","partials"]),L=new Set(["banner","button","card","dialog","drawer","filter","form","grid","header","item","list","menu","modal","nav","panel","picker","rail","row","section","selector","shell","sidebar","table","toolbar"]),v=new Set(["landing","page","pages","route","routes","screen","screens","view","views"]),k=new Set(["landing","page","route","screen","view"]);function T(e){return e.charAt(0).toUpperCase()+e.slice(1)}export{S as a};
2
- //# sourceMappingURL=chunk-QSXQT3NE.js.map
1
+ import{e as l}from"./chunk-BTCASU5J.js";function S(e,n={}){let{minComponentLines:o=300,minFileLines:t=800,minJsxTokens:r=80,minBehaviorTokens:a=40,limit:m=20,scope:c,scanLimit:p,filePattern:i}=n;return l(e,{scope:c,scanLimit:p}).filter(s=>s.kind==="component").filter(s=>!i||s.file.includes(i)||s.name.includes(i)).map(s=>g(s,{minComponentLines:o,minFileLines:t,minJsxTokens:r,minBehaviorTokens:a})).filter(s=>s!==null).sort((s,u)=>u.componentLines-s.componentLines||u.fileLines-s.fileLines||s.file.localeCompare(u.file)).slice(0,m)}function g(e,n){let o=[];e.loc>=n.minComponentLines&&o.push(`${e.loc} component line(s)`);let t=Math.max(80,Math.floor(n.minComponentLines/2));if(e.fileLines>=n.minFileLines&&e.loc>=t&&o.push(`${e.fileLines} file line(s)`),e.jsxTokens.size>=n.minJsxTokens&&o.push(`${e.jsxTokens.size} JSX structure token(s)`),e.behaviorTokens.size>=n.minBehaviorTokens&&o.push(`${e.behaviorTokens.size} behavior token(s)`),o.length===0)return null;let r=x(e),a=C(e,n,r),m=f(e),c=b(r,a,m);return{file:e.file,component:e.name,componentLines:e.loc,fileLines:e.fileLines,jsxTokens:e.jsxTokens.size,behaviorTokens:e.behaviorTokens.size,dominantPressure:r,pressureKinds:a,contextKind:m,recommendationKind:c,recommendation:R(c,m),reasons:o,loc:e.loc}}function x(e){let n=[{axis:"component",value:e.loc},{axis:"file",value:e.fileLines},{axis:"jsx-structure",value:e.jsxTokens.size*3},{axis:"hook-behavior",value:e.behaviorTokens.size*4}];return n.sort((o,t)=>t.value-o.value),n[0]?.axis??"component"}function C(e,n,o){let t=[];e.loc>=n.minComponentLines&&t.push("component");let r=Math.max(80,Math.floor(n.minComponentLines/2));return e.fileLines>=n.minFileLines&&e.loc>=r&&t.push("file"),e.jsxTokens.size>=n.minJsxTokens&&t.push("jsx-structure"),e.behaviorTokens.size>=n.minBehaviorTokens&&t.push("hook-behavior"),[...new Set(t.length>0?t:[o])]}function f(e){let n=e.file.split(/[\\/]+/).filter(Boolean),o=n.slice(0,-1).map(i=>i.toLowerCase()),t=(n.at(-1)??e.name).replace(/\.[^.]+$/,""),r=`${t} ${e.name}`.split(/[^A-Za-z0-9]+/).filter(Boolean).map(i=>i.toLowerCase()),a=o.findIndex(i=>v.has(i)),m=a>=0&&o.slice(a+1).some(i=>h.has(i)),c=d(t)||d(e.name);return/(?:Page|Route|Screen|View)$/.test(t)||/(?:Page|Route|Screen|View)$/.test(e.name)||r.some(i=>k.has(i))||a>=0&&!m&&!c?"route-page":"component"}function d(e){let n=e.split(/[^A-Za-z0-9]+/).filter(Boolean).map(o=>o.toLowerCase());return n.at(-1)&&L.has(n.at(-1))?!0:[...L].some(o=>e.endsWith(T(o)))}function b(e,n,o){return e==="hook-behavior"?"behavior-extraction":o==="route-page"?"route-page-decomposition":n.includes("hook-behavior")?"behavior-extraction":n.includes("jsx-structure")?"jsx-decomposition":n.includes("file")?"file-decomposition":e==="jsx-structure"?"jsx-decomposition":e==="file"&&!n.includes("component")?"file-decomposition":"component-decomposition"}function R(e,n){switch(e){case"behavior-extraction":return"Extract independent state, effects, requests, or handlers into hooks, controllers, or feature modules.";case"route-page-decomposition":return"Split route/page orchestration from reusable panels and feature controllers.";case"jsx-decomposition":return n==="route-page"?"Split page JSX into named layout sections before extracting behavior.":"Split repeated JSX sections into named presentational components.";case"file-decomposition":return"Review file-level decomposition; split colocated panels or helpers before changing behavior.";case"component-decomposition":return"Review component boundaries around props, state ownership, and independently changing UI sections."}}var h=new Set(["component","components","panel","panels","partial","partials"]),L=new Set(["banner","button","card","dialog","drawer","filter","form","grid","header","item","list","menu","modal","nav","panel","picker","rail","row","section","selector","shell","sidebar","table","toolbar"]),v=new Set(["landing","page","pages","route","routes","screen","screens","view","views"]),k=new Set(["landing","page","route","screen","view"]);function T(e){return e.charAt(0).toUpperCase()+e.slice(1)}export{S as a};
2
+ //# sourceMappingURL=chunk-FHWEEQVO.js.map
@@ -1,4 +1,4 @@
1
- import{a as N}from"./chunk-GZCQTZLK.js";import{a as I,b as S}from"./chunk-MZ7APUFN.js";import{f as p,k as g}from"./chunk-3UW7VM4H.js";import{c as h,e as b}from"./chunk-JM72FNGA.js";function x(o,s,r={}){let{maxDepth:c=5,scope:a}=r,l=I(o,s);if(!l)return[];let u=[],f=new Set([l.symbolId]),m=new Set,t=[l];for(let e=1;e<=c&&t.length!==0;e++){let i=[];for(let y of t)for(let n of D(o,y,a)){let d=`${n.file}|${n.shortName}`;if(n.symbolId!==null){if(f.has(n.symbolId))continue;f.add(n.symbolId)}else if(m.has(d))continue;m.add(d),u.push({symbol:n.symbol,shortName:n.shortName,file:n.file,depth:e}),n.symbolId!==null&&n.symbolMatch&&i.push(n.symbolMatch)}t=i}return u.sort((e,i)=>e.depth-i.depth||e.file.localeCompare(i.file)),u}function D(o,s,r){let c=N(o,s,{limit:500}).filter(t=>!o.isIgnored(t.file)).filter(t=>!r||t.file.includes(r)),a=new Set(c.map(t=>t.file)),l=[];for(let t of M(o,s,r)){if(a.has(t))continue;let e=p(o,t),i=e.length>0?g(e,e[0].startLine):null;l.push({symbol:i?.symbol??t,file:t})}let u=[...c,...l],f=[],m=new Set;for(let t of u){let e=S(o,t.symbol);if(!e){let y=`${t.file}|${t.symbol}`;if(m.has(y))continue;m.add(y),f.push({symbolId:null,symbol:t.symbol,shortName:h(t.symbol),file:t.file,symbolMatch:null});continue}if(e.symbolId===s.symbolId||o.isIgnored(e.relativePath)||!_(e.symbol))continue;let i=`${e.symbolId}|${e.relativePath}`;m.has(i)||(m.add(i),f.push({symbolId:e.symbolId,symbol:e.symbol,shortName:h(e.symbol),file:e.relativePath,symbolMatch:e}))}return f}function M(o,s,r){let c=r?"AND consumer_d.relative_path LIKE ?":"",a=[s.symbolId,s.documentId];return r&&a.push(`%${r}%`),new Set(o.all(`SELECT DISTINCT consumer_d.relative_path
1
+ import{a as N}from"./chunk-YNSVAJR6.js";import{a as I,b as S}from"./chunk-T633QLYF.js";import{f as p,k as g}from"./chunk-X3BJUFSN.js";import{c as h,e as b}from"./chunk-JM72FNGA.js";function x(o,s,r={}){let{maxDepth:c=5,scope:a}=r,l=I(o,s);if(!l)return[];let u=[],f=new Set([l.symbolId]),m=new Set,t=[l];for(let e=1;e<=c&&t.length!==0;e++){let i=[];for(let y of t)for(let n of D(o,y,a)){let d=`${n.file}|${n.shortName}`;if(n.symbolId!==null){if(f.has(n.symbolId))continue;f.add(n.symbolId)}else if(m.has(d))continue;m.add(d),u.push({symbol:n.symbol,shortName:n.shortName,file:n.file,depth:e}),n.symbolId!==null&&n.symbolMatch&&i.push(n.symbolMatch)}t=i}return u.sort((e,i)=>e.depth-i.depth||e.file.localeCompare(i.file)),u}function D(o,s,r){let c=N(o,s,{limit:500}).filter(t=>!o.isIgnored(t.file)).filter(t=>!r||t.file.includes(r)),a=new Set(c.map(t=>t.file)),l=[];for(let t of M(o,s,r)){if(a.has(t))continue;let e=p(o,t),i=e.length>0?g(e,e[0].startLine):null;l.push({symbol:i?.symbol??t,file:t})}let u=[...c,...l],f=[],m=new Set;for(let t of u){let e=S(o,t.symbol);if(!e){let y=`${t.file}|${t.symbol}`;if(m.has(y))continue;m.add(y),f.push({symbolId:null,symbol:t.symbol,shortName:h(t.symbol),file:t.file,symbolMatch:null});continue}if(e.symbolId===s.symbolId||o.isIgnored(e.relativePath)||!_(e.symbol))continue;let i=`${e.symbolId}|${e.relativePath}`;m.has(i)||(m.add(i),f.push({symbolId:e.symbolId,symbol:e.symbol,shortName:h(e.symbol),file:e.relativePath,symbolMatch:e}))}return f}function M(o,s,r){let c=r?"AND consumer_d.relative_path LIKE ?":"",a=[s.symbolId,s.documentId];return r&&a.push(`%${r}%`),new Set(o.all(`SELECT DISTINCT consumer_d.relative_path
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN documents consumer_d ON consumer_d.id = c.document_id
@@ -7,4 +7,4 @@ import{a as N}from"./chunk-GZCQTZLK.js";import{a as I,b as S}from"./chunk-MZ7APU
7
7
  AND c.document_id != ?
8
8
  ${o.pathExclusionsFor("consumer_d")}
9
9
  ${c}`,...a).map(l=>l.relative_path).filter(l=>!o.isIgnored(l)))}function _(o){let s=b(o);return s==="method"||s==="type"||o.endsWith("().")}export{x as a};
10
- //# sourceMappingURL=chunk-CFL2CNIF.js.map
10
+ //# sourceMappingURL=chunk-FKUCFCLU.js.map
@@ -0,0 +1,2 @@
1
+ import{b as G}from"./chunk-B75HZHUP.js";import{a as v}from"./chunk-XPOZO76D.js";import{b as B,e as W,f as U,g as H}from"./chunk-ANIOISCE.js";import{a as $}from"./chunk-YNSVAJR6.js";import{c as K,d as V,f as E,l as q}from"./chunk-AETMKBZR.js";import{e as Z}from"./chunk-RSKOYTSY.js";import{b as F}from"./chunk-RY7CAOJF.js";import{f as z,m as x}from"./chunk-X3BJUFSN.js";import{c as k,f as T,g as A,h as M,i as O,j}from"./chunk-JM72FNGA.js";import{a as N,d as S}from"./chunk-BTCASU5J.js";import{a as P}from"./chunk-DS6QEB3G.js";import{a as g}from"./chunk-64MNV6AB.js";import{b as _}from"./chunk-7S5E7KWT.js";var h=new WeakMap;function X(e,t){let n=N(t);return n==="rust"?Re(e,t):n==="typescript"||n==="tsx"||n==="javascript"?ye(e,t):[]}var me=new Set(["describe","it","test","fdescribe","fit","xdescribe","xit","beforeEach","afterEach","beforeAll","afterAll","before","after","suite","bench","benchmark"]),pe=/\b(?:describe|it|test|fdescribe|fit|xdescribe|xit|beforeEach|afterEach|beforeAll|afterAll|before|after|suite|bench|benchmark)\s*\(/,be=/\b(?:export\s+)?(?:async\s+)?function\s+use[A-Z][A-Za-z0-9_$]*\b|\b(?:const|let|var)\s+use[A-Z][A-Za-z0-9_$]*\s*(?::[^=;]+)?=\s*(?:async\s*)?(?:function\b|(?:<[^=;{]+>\s*)?(?:\([^)]*\)|[A-Za-z_$][\w$]*)\s*=>)/;function ye(e,t){let n=P(e,t);if(!n||!ge(n))return[];let r=S(e,t);if(!r)return[];let s=h.get(r);if(s)return s;let o=!1,i=r.rootNode;for(let c of i.namedChildren){if(c.type!=="expression_statement")continue;let l=c.namedChild(0);if(!l||l.type!=="call_expression")continue;let a=l.namedChild(0);if(!a)continue;let d=a.type==="member_expression"?a.namedChild(a.namedChildCount-1)?.text:a.text;if(d&&me.has(d)){o=!0;break}}let u=[];o&&u.push({startLine:0,endLine:i.endPosition.row,reason:"TS/JS test file (describe/it/test at top level)"});for(let c of i.namedChildren){let l=null,a=null;if(c.type==="function_declaration")l=c.namedChild(0)?.text??null,a=c;else if(c.type==="export_statement"){let d=c.namedChild(0);d?.type==="function_declaration"&&(l=d.namedChild(0)?.text??null,a=d)}else if(c.type==="lexical_declaration"){let d=c.namedChild(0);if(d?.type==="variable_declarator"){let m=d.namedChild(0)?.text,b=d.namedChild(1);m&&(b?.type==="arrow_function"||b?.type==="function_expression")&&(l=m,a=d)}}l&&/^use[A-Z]/.test(l)&&a&&u.push({startLine:a.startPosition.row,endLine:a.endPosition.row,reason:"React custom hook (use*)"})}return u.push(...Q(r,new Set(["function_declaration","method_definition","class_declaration","interface_declaration","type_alias_declaration","enum_declaration","variable_declarator","export_statement"]),new Set(["comment"]))),h.set(r,u),u}function ge(e){return e.includes("scip-query")||pe.test(e)||be.test(e)}var he=/scip-query[\s:-]*ignore[\s:-]*(?:dead(?:-code)?|stale)?/i;function xe(e){return he.test(e)}function Q(e,t,n){let r=[],s=o=>{if(t.has(o.type)&&o.parent){let u=o.parent.children,c=-1;for(let l=0;l<u.length;l+=1)if(u[l].startIndex===o.startIndex&&u[l].type===o.type){c=l;break}if(c>0)for(let l=c-1;l>=0;l-=1){let a=u[l];if(n.has(a.type)){if(xe(a.text)){r.push({startLine:o.startPosition.row,endLine:o.endPosition.row,reason:"scip-query suppression comment"});break}continue}if(!(a.type==="attribute_item"||a.type==="inner_attribute_item"))break}}for(let i of o.namedChildren)s(i)};return s(e.rootNode),r}function Re(e,t){let n=S(e,t);if(!n)return[];let r=h.get(n);if(r)return r;let s=[],o=_e(n);return o?(h.set(n,o),o):(Y(n.rootNode,s,!1,!1),s.push(...Q(n,new Set(["function_item","function_signature_item","struct_item","enum_item","union_item","impl_item","mod_item","static_item","const_item"]),new Set(["line_comment","block_comment"]))),s.push(...Ie(n.rootNode)),h.set(n,s),s)}function _e(e){return Pe(e.rootNode)?[{startLine:0,endLine:e.rootNode.endPosition.row,reason:"generated file (@generated header)"}]:null}function Y(e,t,n,r){let s=n,o=r;e.type==="trait_item"&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait declaration body (dynamic dispatch)"}),e.type==="impl_item"&&e.childForFieldName("trait")&&(o=!0,t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait impl block (dynamic dispatch)"})),e.type==="function_item"||e.type==="function_signature_item"?Se(e,t,n,r):r&&we(e)?t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait impl associated item (dynamic dispatch)"}):e.type==="struct_item"||e.type==="enum_item"||e.type==="union_item"?Ee(e,t,n):e.type==="mod_item"&&C(e).some(i=>/#\[\s*cfg\s*\(\s*test\s*\)/.test(i))&&(s=!0);for(let i of e.namedChildren)Y(i,t,s,o)}function Se(e,t,n,r){let s=C(e),o=null;r?o="trait impl method (dynamic dispatch)":n&&(o="inside #[cfg(test)] mod");for(let i of s){let u=Ce(i);if(u){o=u;break}if(ee(i)){o="#[allow(dead_code)]";break}}o&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:o})}function Ee(e,t,n){let r=C(e),s=e.namedChildren.find(o=>o.type==="type_identifier")?.text;r.some(Le)&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"#[derive(<reflective>)] \u2014 fields accessed via macro/reflection",containerName:s}),r.some(ee)&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"#[allow(dead_code)]",containerName:s}),n&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"inside #[cfg(test)] mod",containerName:s})}function C(e){let t=e.parent;if(!t)return[];let n=t.children,r=-1;for(let o=0;o<n.length;o+=1)if(n[o].startIndex===e.startIndex&&n[o].type===e.type){r=o;break}if(r<=0)return[];let s=[];for(let o=r-1;o>=0;o-=1){let i=n[o];if(i.type==="attribute_item"||i.type==="inner_attribute_item")s.push(i.text);else{if(i.type==="line_comment"||i.type==="block_comment")continue;break}}return s}var ve=[{re:/#\[\s*tauri::command\b/,reason:"#[tauri::command]"},{re:/#\[\s*command\b/,reason:"#[command]"},{re:/#\[\s*test\b/,reason:"#[test]"},{re:/#\[\s*bench\b/,reason:"#[bench]"},{re:/#\[\s*tokio::test\b/,reason:"#[tokio::test]"},{re:/#\[\s*async_std::test\b/,reason:"#[async_std::test]"},{re:/#\[\s*wasm_bindgen\b/,reason:"#[wasm_bindgen]"},{re:/#\[\s*no_mangle\b/,reason:"#[no_mangle]"},{re:/#\[\s*napi\b/,reason:"#[napi]"},{re:/#\[\s*pyfunction\b/,reason:"#[pyfunction]"},{re:/#\[\s*pymethod\b/,reason:"#[pymethod]"},{re:/#\[\s*pyo3\b/,reason:"#[pyo3]"},{re:/#\[\s*cfg\s*\(\s*test\s*\)/,reason:"#[cfg(test)]"},{re:/#\[\s*doc\s*\(\s*hidden\s*\)/,reason:"#[doc(hidden)]"}];function Ce(e){return ve.find(({re:t})=>t.test(e))?.reason??null}var De=[/\bSerialize\b/,/\bDeserialize\b/,/\bFromRow\b/,/\bsqlx::FromRow\b/,/\bDeriveEntityModel\b/,/\bIntoSchema\b/,/\bToSchema\b/,/\bDeriveValueType\b/,/\bError\b/,/\bthiserror::Error\b/];function Le(e){return/#\[\s*derive\s*\(/.test(e)?De.some(t=>t.test(e)):!1}function ee(e){return/#\[\s*allow\s*\(\s*dead_code\s*\)/.test(e)}function we(e){return e.type==="const_item"||e.type==="type_item"||e.type==="static_item"||e.type==="associated_type"}function Ie(e){let t=Fe(e);if(t.size===0)return[];let n=[];for(let r of e.descendantsOfType("mod_item")){let s=r.childForFieldName("name")?.text;s&&t.has(s)&&n.push({startLine:r.startPosition.row,endLine:r.endPosition.row,reason:'serde `with = "..."` module \u2014 body invoked via reflection',containerName:s})}return n}function Pe(e){for(let t=0;t<Math.min(e.namedChildCount,12);t+=1){let n=e.namedChild(t);if(!n||n.type!=="line_comment"&&n.type!=="block_comment")break;if(/@generated\b/.test(n.text)||/This file is .*generated\b/i.test(n.text)||/Code generated by/i.test(n.text)||/Generated by:\s*https?:\/\/openapi-generator/i.test(n.text)||/openapi-generator/i.test(n.text)&&/Generated by/i.test(n.text))return!0}return!1}var Ne=/^#!?\[\s*serde\s*\(/,J=/\bwith\s*=\s*"([^"]+)"/g;function Fe(e){let t=new Set;for(let n of e.descendantsOfType("attribute_item")){if(!Ne.test(n.text))continue;J.lastIndex=0;let r;for(;(r=J.exec(n.text))!==null;){let s=r[1],o=s.split("::").pop()??s;o&&t.add(o)}}return t}function te(e){let t=new Map,n=r=>{let s=t.get(r);if(s)return s;let o=X(e,r);return s={ranges:o.map(i=>({startLine:i.startLine,endLine:i.endLine})),containers:new Set(o.map(i=>i.containerName).filter(i=>!!i))},t.set(r,s),s};return(r,s,o,i)=>{let u=n(r);for(let c of u.ranges)if(s>=c.startLine&&s<=c.endLine)return!0;if(i&&u.containers.has(i))return!0;for(let c of x(o))if(u.containers.has(c))return!0;return!1}}function et(e,t={}){_(e,{groups:t.semanticProvider===!0?["whole-project","semantic-provider"]:["whole-project"]})}function D(e,t,n={}){_(e,{groups:n.definitions===!0?["source-file","definition-catalog"]:["source-file"],file:t.replace(/\\/g,"/")})}function re(e,t){return t.isIgnoredPath(e.relativePath)?p("ignored-file"):M(e.symbol)?p("module-like-symbol"):ne(e.symbol)?!e.isFunctionLike&&e.enclosingSymbol&&ne(e.enclosingSymbol)?p("nested-non-callable-value"):!t.includeTests&&!L(e.relativePath)?p("test-file"):!t.includeTests&&t.isExcludedRegion(e.relativePath,e.startLine,e.symbol,e.parentTypeName)?p("excluded-file-region"):O(e.symbol)?p("rust-trait-impl-member"):j(e.symbol)?p("rust-test-module"):!t.includeMembers&&!ke(e)?p("member"):e.endLine-e.startLine+1<t.minLoc?p("below-min-loc"):{accepted:!0}:p("non-value-symbol")}function L(e){return B(e)!=="test"}function p(e){return{accepted:!1,rejectionReason:e}}function ne(e){return A(e)||e.endsWith("().")||e.endsWith(".")}function ke(e){return T(e.symbol)||x(e.symbol).length===0}function se(){return new Map}function oe(e,t,n){let r=new Map;for(let s of K(e,n))e.isIgnored(s.relative_path)||t.has(s.relative_path)||R(r,s.symbol_id,s.relative_path,s.ref_count,"scip-mention");return r}function ie(e,t,n){let r=new Set;for(let s of V(e,t))e.isIgnored(s.relative_path)||n.has(s.relative_path)||r.add(s.symbol_id);return r}function w(e,t){let n=e.get(t);if(!n)return!1;for(let r of n.values())if(r.occurrences>0)return!0;return!1}function I(e,t,n){let r=e.get(t);if(!r)return!1;for(let[s,o]of r)if(s!==n&&o.occurrences>0)return!0;return!1}function ae(e){return e?.occurrences??0}function R(e,t,n,r,s="source-fallback"){if(r<=0)return;let o=le(e,t,n);o.occurrences+=r,o.sources.add(s)}function ce(e,t,n,r,s){if(r<=0)return;let o=le(e,t,n);o.occurrences=Math.max(r,o.occurrences),o.sources.add(s)}function le(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));let s=r.get(n);return s||(s={occurrences:0,sources:new Set},r.set(n,s)),s}var Te=3e3,Ae=1e3;function Et(e,t={}){let{scope:n,minLoc:r=1,includeTests:s=!1,skipBarrels:o=!1,includeMembers:i=!1,deadCodeOnly:u=!1,scanLimit:c,semantic:l=!0}=t,a=G(Me(e,{scope:n,minLoc:r,includeTests:s,includeMembers:i}),c),d=o?new Set(W(e)):new Set,m=u?se():oe(e,d,a.map(f=>f.symbolId)),b=u?ie(e,a.map(f=>f.symbolId),d):new Set,y=u?a.filter(f=>!b.has(f.symbolId)):a.filter(f=>!I(m,f.symbolId,f.relativePath));u?Ue(e,y,m,d):We(e,y,m,d);let de=u?y.filter(f=>!w(m,f.symbolId)):y.filter(f=>!I(m,f.symbolId,f.relativePath));Ze(e,de,m,{includeTests:s,inactiveBarrelPaths:d,includeSemantic:!u&&l});let fe=u?y.filter(f=>!w(m,f.symbolId)):a;return Be(e,Oe(fe,m))}function Me(e,t){let n=te(e),r=[];for(let s of g(e,{scope:t.scope}))try{for(let o of z(e,s))re(o,{minLoc:t.minLoc,includeTests:t.includeTests,includeMembers:t.includeMembers,isIgnoredPath:u=>e.isIgnored(u),isExcludedRegion:n}).accepted&&r.push(o)}finally{D(e,s,{definitions:!0})}return r}function Oe(e,t){return e.map(n=>je(n,t)).filter(n=>n.cross_file_refs===0).sort((n,r)=>r.loc-n.loc||n.relative_path.localeCompare(r.relative_path)||n.start_line-r.start_line)}function je(e,t){let n=t.get(e.symbolId)??new Map,r=ae(n.get(e.relativePath)),s=0;for(let[o,i]of n)o!==e.relativePath&&(s+=i.occurrences);return{relative_path:e.relativePath,start_line:e.startLine,end_line:e.endLine,loc:e.endLine-e.startLine+1,symbol:e.symbol,same_file_refs:r,cross_file_refs:s}}function Be(e,t){let n=[],r=0,s=0,o=0;for(let i of t){if(e.isIgnored(i.relative_path)||U(e,i.relative_path)||H(e,i.symbol,i.relative_path))continue;let u=i.same_file_refs===0?"dead-code":"file-internal";u==="dead-code"?r++:s++,o+=i.loc,n.push({relativePath:i.relative_path,startLine:i.start_line,endLine:i.end_line,loc:i.loc,symbol:i.symbol,shortName:k(i.symbol),sameFileRefs:i.same_file_refs,kind:u})}return{symbols:n,counts:{total:n.length,deadCode:r,fileInternal:s,loc:o},totalCount:n.length,deadCodeCount:r,fileInternalCount:s,totalLoc:o}}function We(e,t,n,r){if(t.length===0)return;let s=new v(e),o=new Set(t.map(c=>c.symbolId)),i=new Set(t.map(c=>c.leaf).filter(Boolean)),u=new Set(s.sourceFiles());for(let c of g(e))u.add(c);s.scanSourceReferences({paths:u,includeVueSfc:!0,includeCrossLanguageDispatchNames:!0,includeRustAttributeNames:!0,identifierResolution:"permissive",candidateNames:i,skipPath:c=>r.has(c)},c=>{o.has(c.target.symbolId)&&(Ke(e,c)||R(n,c.target.symbolId,c.sourceFile,Ve(c),"source-fallback"))})}function Ue(e,t,n,r){if(t.length===0)return;let s=new v(e),o=He(t),i=new Set(s.sourceFiles());for(let a of g(e))i.add(a);let u=new Set(o.keys()),c=new Map,l=a=>{let d=c.get(a);return d||(d=q(e,a),c.set(a,d)),d};s.scanSourceReferences({paths:i,includeVueSfc:!0,includeCrossLanguageDispatchNames:!0,includeRustAttributeNames:!0,identifierResolution:"permissive",candidateNames:u,skipPath:a=>r.has(a),resolveTargets:({sourceFile:a,name:d,kind:m})=>{let b=o.get(d);return b?ze(a,d,b,l(a),{permissive:m!=="cross-language-dispatch"}):[]},afterPath:a=>{c.delete(a),D(e,a)}},a=>{let d=a.kind==="identifier"&&a.sourceFile===a.target.relativePath?Math.max(0,a.occurrences-1):a.occurrences;a.kind==="identifier"&&ue(e,{sourceFile:a.sourceFile,name:a.name,target:a.target,occurrences:d})||R(n,a.target.symbolId,a.sourceFile,d,"source-fallback")})}function He(e){let t=new Map;for(let n of e){if(!n.leaf)continue;let r=t.get(n.leaf)??[];r.push(n),t.set(n.leaf,r)}return t}function ze(e,t,n,r,s){let o=n.filter(c=>c.relativePath===e);if(o.length>0)return o;if(!s.permissive&&n.length===1)return[...n];let i=r.get(t);if(i)for(let c of i){let l=n.filter(a=>E(c,a.relativePath));if(l.length>0)return l}let u=new Set;for(let c of r.values())for(let l of c)u.add(l);for(let c of u){let l=n.filter(a=>E(c,a.relativePath));if(l.length>0&&l.length===n.length)return l}return s.permissive?[...n]:[]}function Ke(e,t){return t.kind==="cross-language-dispatch"&&t.target.relativePath===t.sourceFile?!0:t.kind==="identifier"&&ue(e,t)}function Ve(e){return e.kind==="identifier"&&e.target.relativePath===e.sourceFile?Math.max(0,e.occurrences-1):e.occurrences}function ue(e,t){return t.occurrences>1?!1:F(e,t.sourceFile).some(n=>n.used||n.sourcePath!==t.target.relativePath?!1:n.importedName===t.name||n.localName===t.name)}function Ze(e,t,n,r){let s=r.includeSemantic!==!1,o=s&&t.length>=Te&&g(e).length>=Ae,i=(c,l)=>{l===c.relativePath||e.isIgnored(l)||r.inactiveBarrelPaths.has(l)||!r.includeTests&&!L(l)||ce(n,c.symbolId,l,1,"caller-map")};for(let c of t){let l=$(e,c,{semantic:s&&!o});if(l.length!==0)for(let a of l)i(c,a.file)}if(!o)return;let u=Z(e,t);for(let c of t){let l=u.get(c.symbolId);if(l)for(let a of l)i(c,a)}}export{et as a,Et as b};
2
+ //# sourceMappingURL=chunk-FVA3NH4P.js.map
@@ -1,4 +1,4 @@
1
- import{a as t}from"./chunk-CTCAF3YA.js";function l(e,n,i){let d=t(e,n)??n,o=t(e,i)??i,r=e.get(`SELECT COUNT(DISTINCT gs.id) AS shared
1
+ import{a as t}from"./chunk-LGX2Y4BA.js";function l(e,n,i){let d=t(e,n)??n,o=t(e,i)??i,r=e.get(`SELECT COUNT(DISTINCT gs.id) AS shared
2
2
  FROM global_symbols gs
3
3
  WHERE (
4
4
  -- Defined in file1, referenced in file2
@@ -53,4 +53,4 @@ import{a as t}from"./chunk-CTCAF3YA.js";function l(e,n,i){let d=t(e,n)??n,o=t(e,
53
53
  GROUP BY def_d.id, ref_d.id
54
54
  ORDER BY shared DESC
55
55
  LIMIT ?`,i).filter(s=>!e.isIgnored(s.file1)&&!e.isIgnored(s.file2)).map(s=>c(s.file1,s.file2,s.shared))}function c(e,n,i){return{file1:e,file2:n,sharedSymbols:i,actionTier:"signal",couplingKind:"shared-symbol-coupling",evidenceReasons:[`${i} symbol(s) are defined in one file and referenced by the other`],recommendation:"Review whether the shared symbol surface is an intentional boundary or hidden coordination pressure before moving code."}}export{l as a,_ as b};
56
- //# sourceMappingURL=chunk-5QJXH6ZL.js.map
56
+ //# sourceMappingURL=chunk-GZQID3FS.js.map
@@ -1,7 +1,7 @@
1
- import{a as L,b as M}from"./chunk-RHTJBYZ5.js";import{a as F}from"./chunk-VAA5FFIW.js";import{a as D}from"./chunk-PFOCOG57.js";import{a as x}from"./chunk-B75HZHUP.js";import{a as h}from"./chunk-3ZYF3ELZ.js";import{a as C}from"./chunk-BGBBVSH4.js";import{a as I}from"./chunk-HVTYSC26.js";import{k as b}from"./chunk-3UW7VM4H.js";import{c as f,d as p,j as g}from"./chunk-JM72FNGA.js";import{basename as u,extname as d}from"path";function K(r,n){let{scope:e,maxLoc:t=15,limit:a=30,scanLimit:o}=n??{},i=new h(r),l=E(i.fileDependencyGraph(e));return D({candidates:()=>v(i,e,t),orderCandidates:x,scanLimit:o,prepare:s=>({callerFileMap:L(i,s,{semantic:n?.semantic!==!1}),reverseFanIn:l}),evaluate:(s,c)=>S(r,i,s,c),orderResults:(s,c)=>c.callerFanIn-s.callerFanIn||c.loc-s.loc,limit:a})}function S(r,n,e,t){let a=y(r,n,e,t.callerFileMap);if(a.length!==1)return null;let o=a[0],i=P(r,e.symbolId,o);if(!i)return null;let l=w(n,r,o,e.symbol,i);if(l&&g(l.symbol))return null;let{fanIn:s,source:c}=_(t.callerFileMap,t.reverseFanIn,o,l);if(c==="function"?s<=3:s<=5)return null;let m=j(r,e,o,l);return{symbol:e.symbol,shortName:f(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:C(e),singleCaller:l?.symbol??"",singleCallerShort:l?.isFunctionLike?f(l.symbol):u(o),callerFanIn:s,actionTier:m.length>0?"signal":"direct",boundaryEvidence:m}}function v(r,n,e){return r.productionCallableDefinitions({scope:n,minLoc:2,maxLoc:e,requireFunctionLikeSymbol:!0,excludeRootedSymbols:!0})}function y(r,n,e,t){let a=u(e.relativePath,d(e.relativePath)),o=[...t.get(e.symbolId)??[]].filter(i=>i!==e.relativePath).filter(i=>u(i,d(i))!==a).filter(i=>{let l=n.fileKind(i);return l!=="barrel"&&l!=="entry"&&l!=="test"});return M(r,e,o).realConsumers}function P(r,n,e){return r.get(`SELECT c.start_line, c.end_line
1
+ import{a as L,b as M}from"./chunk-VFLHKRTW.js";import{a as F}from"./chunk-LM5SHAN4.js";import{a as D}from"./chunk-PFOCOG57.js";import{a as x}from"./chunk-B75HZHUP.js";import{a as h}from"./chunk-XPOZO76D.js";import{a as C}from"./chunk-BGBBVSH4.js";import{a as I}from"./chunk-AETMKBZR.js";import{k as b}from"./chunk-X3BJUFSN.js";import{c as f,d as p,j as g}from"./chunk-JM72FNGA.js";import{basename as u,extname as d}from"path";function K(r,n){let{scope:e,maxLoc:t=15,limit:a=30,scanLimit:o}=n??{},i=new h(r),l=E(i.fileDependencyGraph(e));return D({candidates:()=>v(i,e,t),orderCandidates:x,scanLimit:o,prepare:s=>({callerFileMap:L(i,s,{semantic:n?.semantic!==!1}),reverseFanIn:l}),evaluate:(s,c)=>S(r,i,s,c),orderResults:(s,c)=>c.callerFanIn-s.callerFanIn||c.loc-s.loc,limit:a})}function S(r,n,e,t){let a=y(r,n,e,t.callerFileMap);if(a.length!==1)return null;let o=a[0],i=P(r,e.symbolId,o);if(!i)return null;let l=w(n,r,o,e.symbol,i);if(l&&g(l.symbol))return null;let{fanIn:s,source:c}=_(t.callerFileMap,t.reverseFanIn,o,l);if(c==="function"?s<=3:s<=5)return null;let m=j(r,e,o,l);return{symbol:e.symbol,shortName:f(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:C(e),singleCaller:l?.symbol??"",singleCallerShort:l?.isFunctionLike?f(l.symbol):u(o),callerFanIn:s,actionTier:m.length>0?"signal":"direct",boundaryEvidence:m}}function v(r,n,e){return r.productionCallableDefinitions({scope:n,minLoc:2,maxLoc:e,requireFunctionLikeSymbol:!0,excludeRootedSymbols:!0})}function y(r,n,e,t){let a=u(e.relativePath,d(e.relativePath)),o=[...t.get(e.symbolId)??[]].filter(i=>i!==e.relativePath).filter(i=>u(i,d(i))!==a).filter(i=>{let l=n.fileKind(i);return l!=="barrel"&&l!=="entry"&&l!=="test"});return M(r,e,o).realConsumers}function P(r,n,e){return r.get(`SELECT c.start_line, c.end_line
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN documents d ON c.document_id = d.id
5
5
  WHERE m.symbol_id = ? AND m.role != 1 AND d.relative_path = ?
6
6
  LIMIT 1`,n,e)}function w(r,n,e,t,a){let o=r.definitionsForFile(e),i=k(n,e,t,a.start_line,a.end_line);return b(o,i)}function _(r,n,e,t){if(t?.isFunctionLike){let a=[...r.get(t.symbolId)??[]].filter(o=>o!==t.relativePath);if(a.length>0)return{fanIn:a.length,source:"function"}}return{fanIn:N(n,e),source:"file"}}function k(r,n,e,t,a){let o=p(e);if(!o)return t;let i=I(r,n).get(o);if(!i||i.length===0)return t;for(let l of i)if(l>=t&&l<=a)return l;return t}function E(r){let n=new Map;for(let[e,t]of r){n.has(e)||n.set(e,n.get(e)??0);for(let a of t)n.set(a,(n.get(a)??0)+1)}return n}function N(r,n){let e=r.get(n)??0;if(e>0)return e;let t=u(n,d(n)),a=0;for(let[o,i]of r)o!==n&&u(o,d(o))===t&&i>a&&(a=i);return a}function j(r,n,e,t){return F(r,n.relativePath,n.startLine,"wrapper","explicit ignore-wrapper comment",[{label:"wrapper name",value:f(n.symbol)},{label:"caller name",value:t?.symbol?f(t.symbol):u(e)},{label:"wrapper path",value:n.relativePath},{label:"caller path",value:e}])}export{K as a};
7
- //# sourceMappingURL=chunk-SPE4YCOT.js.map
7
+ //# sourceMappingURL=chunk-I274B3B3.js.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-PFOCOG57.js";import{a as p}from"./chunk-3ZYF3ELZ.js";import{c as i}from"./chunk-JM72FNGA.js";function x(e,r){let{scope:m,minLoc:o=10,limit:c=30,scanLimit:a}=r??{},s=new p(e);return u({candidates:()=>s.productionCallableDefinitions({scope:m,requireCallableSymbol:!0,includeSuppressed:!0,sortByLocDesc:typeof a=="number"&&a>0}),scanLimit:a,prepare:t=>({callerMap:s.crossFileCallerMap(t,{semantic:r?.semantic!==!1}),calleeMap:s.calleeMap(t,{semantic:r?.semantic!==!1})}),evaluate:(t,n)=>b(t,n,o),orderResults:(t,n)=>n.score-t.score||n.loc-t.loc,limit:c})}function b(e,r,m){let o=e.endLine-e.startLine+1;if(o<m)return null;let c=r.callerMap.get(e.symbolId)?.size??0,a=r.calleeMap.get(e.symbolId)??[],s=a.filter(l=>l.file!==e.relativePath),t=new Set(s.map(l=>`${l.symbol}|${l.file}`)).size,n=new Set(a.map(l=>`${l.symbol}|${l.file}`)).size;return{symbol:e.symbol,shortName:i(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:o,fanIn:c,fanOut:t,calleeCount:n,score:Math.round(o/50*(c/5)*Math.max(t/5,1)*100)/100}}export{x as a};
2
- //# sourceMappingURL=chunk-DAI74TJU.js.map
1
+ import{a as u}from"./chunk-PFOCOG57.js";import{a as p}from"./chunk-XPOZO76D.js";import{c as i}from"./chunk-JM72FNGA.js";function x(e,r){let{scope:m,minLoc:o=10,limit:c=30,scanLimit:a}=r??{},s=new p(e);return u({candidates:()=>s.productionCallableDefinitions({scope:m,requireCallableSymbol:!0,includeSuppressed:!0,sortByLocDesc:typeof a=="number"&&a>0}),scanLimit:a,prepare:t=>({callerMap:s.crossFileCallerMap(t,{semantic:r?.semantic!==!1}),calleeMap:s.calleeMap(t,{semantic:r?.semantic!==!1})}),evaluate:(t,n)=>b(t,n,o),orderResults:(t,n)=>n.score-t.score||n.loc-t.loc,limit:c})}function b(e,r,m){let o=e.endLine-e.startLine+1;if(o<m)return null;let c=r.callerMap.get(e.symbolId)?.size??0,a=r.calleeMap.get(e.symbolId)??[],s=a.filter(l=>l.file!==e.relativePath),t=new Set(s.map(l=>`${l.symbol}|${l.file}`)).size,n=new Set(a.map(l=>`${l.symbol}|${l.file}`)).size;return{symbol:e.symbol,shortName:i(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:o,fanIn:c,fanOut:t,calleeCount:n,score:Math.round(o/50*(c/5)*Math.max(t/5,1)*100)/100}}export{x as a};
2
+ //# sourceMappingURL=chunk-J6ADQKQA.js.map
@@ -1,4 +1,4 @@
1
- import{a as d}from"./chunk-GZCQTZLK.js";import{g as l}from"./chunk-3UW7VM4H.js";import{c as r}from"./chunk-JM72FNGA.js";function b(o,t={}){let{limit:n=30,scope:e}=t,i=e?`AND def_d.relative_path LIKE '%${e}%'`:"",m=o.all(`SELECT
1
+ import{a as d}from"./chunk-YNSVAJR6.js";import{g as l}from"./chunk-X3BJUFSN.js";import{c as r}from"./chunk-JM72FNGA.js";function b(o,t={}){let{limit:n=30,scope:e}=t,i=e?`AND def_d.relative_path LIKE '%${e}%'`:"",m=o.all(`SELECT
2
2
  gs.symbol,
3
3
  COUNT(*) AS ref_count,
4
4
  COUNT(DISTINCT ref_d.id) AS file_count,
@@ -22,4 +22,4 @@ import{a as d}from"./chunk-GZCQTZLK.js";import{g as l}from"./chunk-3UW7VM4H.js";
22
22
  GROUP BY gs.id
23
23
  ORDER BY ref_count DESC
24
24
  LIMIT ?`,n).filter(s=>!o.isIgnored(s.defined_in)).map(s=>({symbol:s.symbol,shortName:r(s.symbol),refCount:s.ref_count,fileCount:s.file_count,definedIn:s.defined_in}));return m.length>0?m:f(o,e,n)}function f(o,t,n){return l(o,{scope:t}).filter(e=>!o.isIgnored(e.relativePath)).map(e=>u(o,e)).filter(e=>e.refCount>0).sort((e,i)=>i.refCount-e.refCount||i.fileCount-e.fileCount).slice(0,n)}function u(o,t){let n=d(o,t,{limit:500});return{symbol:t.symbol,shortName:r(t.symbol),refCount:n.length,fileCount:new Set(n.map(e=>e.file)).size,definedIn:t.relativePath}}export{b as a};
25
- //# sourceMappingURL=chunk-E7KERP7E.js.map
25
+ //# sourceMappingURL=chunk-JRUKS66S.js.map
@@ -1,4 +1,4 @@
1
- import{a as R}from"./chunk-3ZYF3ELZ.js";import{a as _,d as f}from"./chunk-ZQLO2SCU.js";import{a as c,b as m,c as s}from"./chunk-FOQHUKNZ.js";import{c as d,e as p}from"./chunk-JM72FNGA.js";import{a as l}from"./chunk-D322LMSA.js";import{a}from"./chunk-64MNV6AB.js";function P(e,o={}){let{scope:r,limit:n}=o,t=new R(e),i=C([...h(e,r),...N(e,t,r)]);return D(i),n?i.slice(0,n):i}function h(e,o){let r=[];for(let n of E(e,o)){if(e.isIgnored(n.barrel_path)||e.isIgnored(n.original_path)||f(e,n.barrel_path)||l(e,n.barrel_path)&&s(e,n.barrel_path).length===0)continue;let t=S(e,n),i=t?.barrel_consumers??0,u=t?.direct_consumers??0;i!==0||u!==0||r.push({barrelFile:n.barrel_path,symbol:n.symbol,shortName:d(n.symbol),originalFile:n.original_path,barrelConsumers:i,directConsumers:u,...g(e,n.barrel_path)})}return r}function E(e,o){let r=o?`AND barrel_d.relative_path LIKE '%${o}%'`:"";return e.all(`SELECT DISTINCT
1
+ import{a as R}from"./chunk-XPOZO76D.js";import{a as _,d as f}from"./chunk-ANIOISCE.js";import{a as c,b as m,c as s}from"./chunk-RY7CAOJF.js";import{c as d,e as p}from"./chunk-JM72FNGA.js";import{a as l}from"./chunk-DS6QEB3G.js";import{a}from"./chunk-64MNV6AB.js";function P(e,o={}){let{scope:r,limit:n}=o,t=new R(e),i=C([...h(e,r),...N(e,t,r)]);return D(i),n?i.slice(0,n):i}function h(e,o){let r=[];for(let n of E(e,o)){if(e.isIgnored(n.barrel_path)||e.isIgnored(n.original_path)||f(e,n.barrel_path)||l(e,n.barrel_path)&&s(e,n.barrel_path).length===0)continue;let t=S(e,n),i=t?.barrel_consumers??0,u=t?.direct_consumers??0;i!==0||u!==0||r.push({barrelFile:n.barrel_path,symbol:n.symbol,shortName:d(n.symbol),originalFile:n.original_path,barrelConsumers:i,directConsumers:u,...g(e,n.barrel_path)})}return r}function E(e,o){let r=o?`AND barrel_d.relative_path LIKE '%${o}%'`:"";return e.all(`SELECT DISTINCT
2
2
  barrel_d.id AS barrel_doc_id,
3
3
  barrel_d.relative_path AS barrel_path,
4
4
  gs.id AS symbol_id,
@@ -58,4 +58,4 @@ import{a as R}from"./chunk-3ZYF3ELZ.js";import{a as _,d as f}from"./chunk-ZQLO2S
58
58
  ${e.pathExclusionsFor("consumer_d")}
59
59
  GROUP BY consumer_d.id
60
60
  )`,o.barrel_doc_id,o.symbol_id,o.barrel_doc_id,o.original_doc_id)}function N(e,o,r){let n=[];for(let t of y(e,r))x(e,t,t)>0||n.push(...I(e,o,t));return n}function y(e,o){return a(e,{scope:o,includeIgnored:!1}).filter(r=>s(e,r).length>0||c(e,r).length>0)}function I(e,o,r){let n=s(e,r).filter(i=>i.sourcePath&&!e.isIgnored(i.sourcePath)).flatMap(i=>b(e,o,r,i.sourcePath)),t=c(e,r).filter(i=>i.sourcePath&&!e.isIgnored(i.sourcePath)).flatMap(i=>b(e,o,r,i.sourcePath));return[...n,...t]}function b(e,o,r,n){let t=O(o,n);return t?[{barrelFile:r,symbol:t.symbol,shortName:d(t.symbol),originalFile:n,barrelConsumers:0,directConsumers:x(e,n,r),...g(e,r)}]:[]}function g(e,o){return _(e,o)?{actionTier:"signal",surfaceEvidence:["barrel file is declared on the package public surface"],recommendation:"Review the package API before removing this re-export; local consumers are zero, but external consumers may import through the public barrel."}:{actionTier:"direct",surfaceEvidence:[],recommendation:"Remove this unused re-export when the barrel is not part of an external API surface."}}function x(e,o,r){let n=new Set;for(let t of a(e,{includeIgnored:!1}))if(t!==r)for(let i of m(e,t))i.sourcePath===o&&n.add(t);return n.size}function O(e,o){let r=e.definitionsForFile(o);return r.find(n=>p(n.symbol)==="method")??r[0]??null}function C(e){let o=new Set,r=[];for(let n of e){let t=`${n.barrelFile}|${n.symbol}|${n.originalFile}`;o.has(t)||(o.add(t),r.push(n))}return r}function D(e){e.sort((o,r)=>r.directConsumers-o.directConsumers||o.barrelFile.localeCompare(r.barrelFile)||o.shortName.localeCompare(r.shortName))}export{P as a};
61
- //# sourceMappingURL=chunk-ZSLT7NWQ.js.map
61
+ //# sourceMappingURL=chunk-JUIAOOK7.js.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-PFOCOG57.js";import{a as m}from"./chunk-3ZYF3ELZ.js";import{a as d}from"./chunk-BGBBVSH4.js";import{c as u}from"./chunk-JM72FNGA.js";function k(n,c={}){let{scope:e,minLoc:t=10,minCallees:a=6,limit:r=20,scanLimit:i}=c,o=new m(n);return g({candidates:()=>o.productionCallableDefinitions({scope:e,minLoc:t,excludeTypesFiles:!0,requireFunctionLikeSymbol:!0,sortByLocDesc:!0}),scanLimit:i,prepare:s=>o.calleeMap(s,{semantic:c.semantic!==!1}),evaluate:(s,l)=>h(s,l.get(s.symbolId)??[],a),orderResults:(s,l)=>l.clusters.length-s.clusters.length||l.loc-s.loc,limit:r})}function h(n,c,e){let t=new Set(c.map(l=>l.symbol));if(t.size<e)return null;let a=S(t,c),r=y(t,a);if(r.length<2)return null;let i=C(r,a);if(i.length===0)return null;let o=u(n.symbol),s=p(o,t.size,r.length,i);return{symbol:n.symbol,shortName:o,relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,loc:d(n),totalCallees:t.size,extractionKind:s.extractionKind,actionTier:"signal",evidenceReasons:s.evidenceReasons,recommendation:s.recommendation,clusters:i}}function p(n,c,e,t){let a=Math.max(...t.map(s=>s.callees.length)),r=Math.max(...t.map(s=>s.isolation)),i=[`${c} distinct callees across ${e} co-occurrence cluster(s)`,`${t.length} extractable cluster(s) passed size and isolation thresholds`,`largest extractable cluster has ${a} callees at ${Math.round(r*100)}% isolation`],o=f(n,c,e);return o!==null?{extractionKind:"workflow-orchestration",evidenceReasons:[...i,o],recommendation:"Review the isolated helper group as a possible private or feature-local helper, but keep the orchestration sequence together when it preserves the workflow."}:a>=6?{extractionKind:"broad-helper-cluster",evidenceReasons:[...i,"one isolated helper group is broad enough to deserve a named review"],recommendation:"Review whether the broad helper cluster has a stable concept name before extracting it; avoid creating a bag-of-helpers abstraction."}:{extractionKind:"cohesive-helper-cluster",evidenceReasons:i,recommendation:"Review the isolated callee group as a possible same-file or feature-local helper; extract only if the new name preserves the current behavior."}}function f(n,c,e){if(c>=10)return`callee breadth suggests orchestration: ${c} callees`;if(e>=4)return`multiple disconnected callee groups suggest orchestration: ${e} groups`;let t=b(n);return x.has(t)?`caller verb suggests orchestration: ${t}`:null}function b(n){return n.split(":").pop()?.replace(/\(\)$/,"").replace(/[^A-Za-z0-9_]/g,"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[_\s-]+/).filter(Boolean)[0]?.toLowerCase()??""}var x=new Set(["apply","build","check","collect","create","diff","execute","find","handle","load","prepare","process","render","resolve","run","select","sync","update","validate","verify","write"]);function S(n,c){let e=new Map;for(let a of n)e.set(a,new Set);let t=new Map;for(let a of c){let r=t.get(a.chunkId);r||(r=new Set,t.set(a.chunkId,r)),r.add(a.symbol)}for(let a of t.values()){let r=[...a];for(let i=0;i<r.length;i++)for(let o=i+1;o<r.length;o++)e.get(r[i]).add(r[o]),e.get(r[o]).add(r[i])}return e}function y(n,c){let e=new Set,t=[];for(let a of n){if(e.has(a))continue;let r=new Set,i=[a];for(;i.length>0;){let o=i.pop();if(!e.has(o)){e.add(o),r.add(o);for(let s of c.get(o)??[])e.has(s)||i.push(s)}}t.push(r)}return t}function C(n,c){return n.filter(e=>e.size>=3).map(e=>v(e,n,c)).filter(e=>e.isolation>.5).sort((e,t)=>t.isolation-e.isolation)}function v(n,c,e){let t=new Set;for(let o of c)if(o!==n)for(let s of o)t.add(s);let a=0;for(let o of n)for(let s of e.get(o)??[])t.has(s)&&a++;let r=n.size*t.size,i=r>0?1-a/r:1;return{callees:[...n].map(u),isolation:i}}export{k as a};
2
- //# sourceMappingURL=chunk-7KCSELEV.js.map
1
+ import{a as g}from"./chunk-PFOCOG57.js";import{a as m}from"./chunk-XPOZO76D.js";import{a as d}from"./chunk-BGBBVSH4.js";import{c as u}from"./chunk-JM72FNGA.js";function k(n,c={}){let{scope:e,minLoc:t=10,minCallees:a=6,limit:r=20,scanLimit:i}=c,o=new m(n);return g({candidates:()=>o.productionCallableDefinitions({scope:e,minLoc:t,excludeTypesFiles:!0,requireFunctionLikeSymbol:!0,sortByLocDesc:!0}),scanLimit:i,prepare:s=>o.calleeMap(s,{semantic:c.semantic!==!1}),evaluate:(s,l)=>h(s,l.get(s.symbolId)??[],a),orderResults:(s,l)=>l.clusters.length-s.clusters.length||l.loc-s.loc,limit:r})}function h(n,c,e){let t=new Set(c.map(l=>l.symbol));if(t.size<e)return null;let a=S(t,c),r=y(t,a);if(r.length<2)return null;let i=C(r,a);if(i.length===0)return null;let o=u(n.symbol),s=p(o,t.size,r.length,i);return{symbol:n.symbol,shortName:o,relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,loc:d(n),totalCallees:t.size,extractionKind:s.extractionKind,actionTier:"signal",evidenceReasons:s.evidenceReasons,recommendation:s.recommendation,clusters:i}}function p(n,c,e,t){let a=Math.max(...t.map(s=>s.callees.length)),r=Math.max(...t.map(s=>s.isolation)),i=[`${c} distinct callees across ${e} co-occurrence cluster(s)`,`${t.length} extractable cluster(s) passed size and isolation thresholds`,`largest extractable cluster has ${a} callees at ${Math.round(r*100)}% isolation`],o=f(n,c,e);return o!==null?{extractionKind:"workflow-orchestration",evidenceReasons:[...i,o],recommendation:"Review the isolated helper group as a possible private or feature-local helper, but keep the orchestration sequence together when it preserves the workflow."}:a>=6?{extractionKind:"broad-helper-cluster",evidenceReasons:[...i,"one isolated helper group is broad enough to deserve a named review"],recommendation:"Review whether the broad helper cluster has a stable concept name before extracting it; avoid creating a bag-of-helpers abstraction."}:{extractionKind:"cohesive-helper-cluster",evidenceReasons:i,recommendation:"Review the isolated callee group as a possible same-file or feature-local helper; extract only if the new name preserves the current behavior."}}function f(n,c,e){if(c>=10)return`callee breadth suggests orchestration: ${c} callees`;if(e>=4)return`multiple disconnected callee groups suggest orchestration: ${e} groups`;let t=b(n);return x.has(t)?`caller verb suggests orchestration: ${t}`:null}function b(n){return n.split(":").pop()?.replace(/\(\)$/,"").replace(/[^A-Za-z0-9_]/g,"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[_\s-]+/).filter(Boolean)[0]?.toLowerCase()??""}var x=new Set(["apply","build","check","collect","create","diff","execute","find","handle","load","prepare","process","render","resolve","run","select","sync","update","validate","verify","write"]);function S(n,c){let e=new Map;for(let a of n)e.set(a,new Set);let t=new Map;for(let a of c){let r=t.get(a.chunkId);r||(r=new Set,t.set(a.chunkId,r)),r.add(a.symbol)}for(let a of t.values()){let r=[...a];for(let i=0;i<r.length;i++)for(let o=i+1;o<r.length;o++)e.get(r[i]).add(r[o]),e.get(r[o]).add(r[i])}return e}function y(n,c){let e=new Set,t=[];for(let a of n){if(e.has(a))continue;let r=new Set,i=[a];for(;i.length>0;){let o=i.pop();if(!e.has(o)){e.add(o),r.add(o);for(let s of c.get(o)??[])e.has(s)||i.push(s)}}t.push(r)}return t}function C(n,c){return n.filter(e=>e.size>=3).map(e=>v(e,n,c)).filter(e=>e.isolation>.5).sort((e,t)=>t.isolation-e.isolation)}function v(n,c,e){let t=new Set;for(let o of c)if(o!==n)for(let s of o)t.add(s);let a=0;for(let o of n)for(let s of e.get(o)??[])t.has(s)&&a++;let r=n.size*t.size,i=r>0?1-a/r:1;return{callees:[...n].map(u),isolation:i}}export{k as a};
2
+ //# sourceMappingURL=chunk-JYSAYZNX.js.map
@@ -0,0 +1,2 @@
1
+ import{a as C}from"./chunk-EKECQP6Z.js";import{a as D}from"./chunk-2H57MJLI.js";import{a as f}from"./chunk-XWC67C3Q.js";import{a as g}from"./chunk-KLXVEBVC.js";import{c as y}from"./chunk-4TMJDHC6.js";import{e as h}from"./chunk-KRGBLZT2.js";import{d as p}from"./chunk-A536TEU4.js";var F=.7,S=.62,R=.45;function $(i,t={}){let{windowCommits:e=100,limit:n=30,scope:a,scanLimit:o}=t,s=h(i);if(!s)return{available:!1,windowCommits:e,findings:[]};if(n<=0)return{available:!0,windowCommits:e,findings:[]};let d=A(i,{limit:n,minSimilarity:t.minSimilarity,scanLimit:o,scope:a,semantic:t.semantic}).map(r=>I(r,s,e)).filter(r=>r!==null);d.sort((r,c)=>(r.kind===c.kind?0:r.kind==="echo"?-1:1)||c.similarity-r.similarity||r.echoFile.localeCompare(c.echoFile)||r.echoSymbol.localeCompare(c.echoSymbol)||r.domain.localeCompare(c.domain));let b=d.slice(0,n).map(w);return{available:!0,windowCommits:e,findings:b,rootCauseGroups:T(b)}}function A(i,t){let e=K(t.limit),n=[...B(i,{scope:t.scope,minSimilarity:t.minSimilarity??F,limit:e,scanLimit:t.scanLimit,semantic:t.semantic})],a=p(i,{scope:t.scope});return a.react&&n.push(...k(i,{scope:t.scope,minSimilarity:t.minSimilarity??S,limit:e,scanLimit:t.scanLimit}),...L(i,{scope:t.scope,minSimilarity:t.minSimilarity??R,limit:e,scanLimit:t.scanLimit})),a.vue&&n.push(...E(i,{scope:t.scope,minSimilarity:t.minSimilarity??S,limit:e,scanLimit:t.scanLimit}),...x(i,{scope:t.scope,minSimilarity:t.minSimilarity??R,limit:e,scanLimit:t.scanLimit})),n}function B(i,t){return y(i,{scope:t.scope,minSimilarity:t.minSimilarity,limit:t.limit,crossFileOnly:!0,scanLimit:t.scanLimit,semantic:t.semantic}).map(e=>({domain:"callable",basis:e.similarityBasis??"callees",symbolA:e.shortNameA,fileA:e.fileA,symbolB:e.shortNameB,fileB:e.fileB,similarity:e.similarity,sharedEvidence:e.sharedCallees,sharedCallees:e.sharedCallees}))}function k(i,t){return u(i,t,{query:f,domain:"react-component",basis:"jsx-structure",symbolA:e=>e.componentA,symbolB:e=>e.componentB,evidenceBuckets:e=>[["component",e.sharedComponents],["tag",e.sharedNativeTags],["prop",e.sharedProps],["event",e.sharedEvents],["binding",e.sharedBindings]]})}function u(i,t,e){return e.query(i,t).filter(n=>n.fileA!==n.fileB).map(n=>({domain:e.domain,basis:e.basis,symbolA:e.symbolA(n),fileA:n.fileA,symbolB:e.symbolB(n),fileB:n.fileB,similarity:n.similarity,sharedEvidence:P(...e.evidenceBuckets(n)),sharedCallees:[]}))}function L(i,t){return u(i,t,{query:g,domain:"react-hook",basis:"react-behavior",symbolA:e=>e.componentA,symbolB:e=>e.componentB,evidenceBuckets:e=>[["hook",e.sharedHooks],["react-hook",e.sharedReactHooks],["effect",e.sharedEffects],["state",e.sharedState],["request",e.sharedRequests],["handler",e.sharedHandlers],["action",e.sharedHandlerVerbs]]})}function E(i,t){return u(i,t,{query:D,domain:"vue-component",basis:"vue-template",symbolA:e=>m(e.fileA),symbolB:e=>m(e.fileB),evidenceBuckets:e=>[["component",e.sharedComponents],["prop",e.sharedProps],["event",e.sharedEvents],["directive",e.sharedDirectives],["slot",e.sharedSlots],["identifier",e.sharedIdentifiers]]})}function x(i,t){return u(i,t,{query:C,domain:"vue-composable",basis:"vue-behavior",symbolA:e=>m(e.fileA),symbolB:e=>m(e.fileB),evidenceBuckets:e=>[["composable",e.sharedComposables],["store",e.sharedStores],["reactivity",e.sharedReactivity],["lifecycle",e.sharedLifecycle],["request",e.sharedRequests],["function",e.sharedFunctions],["action",e.sharedFunctionVerbs],["binding",e.sharedBindings],["template-event",e.sharedTemplateEvents]]})}function I(i,t,e){let n=t.get(i.fileA)?.commitsAgo??null,a=t.get(i.fileB)?.commitsAgo??null,o=n!==null&&n<=e,s=a!==null&&a<=e;if(!o&&!s)return null;if(o&&s){let l=(n??0)<=(a??0);return{kind:"twin",domain:i.domain,basis:i.basis,echoSymbol:l?i.symbolA:i.symbolB,echoFile:l?i.fileA:i.fileB,echoAgeCommits:(l?n:a)??0,establishedSymbol:l?i.symbolB:i.symbolA,establishedFile:l?i.fileB:i.fileA,establishedAgeCommits:l?a:n,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}return{kind:"echo",domain:i.domain,basis:i.basis,echoSymbol:o?i.symbolA:i.symbolB,echoFile:o?i.fileA:i.fileB,echoAgeCommits:(o?n:a)??0,establishedSymbol:o?i.symbolB:i.symbolA,establishedFile:o?i.fileB:i.fileA,establishedAgeCommits:o?a:n,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}function w(i){let t=v(i);return{...i,rootCauseKey:t,groupKey:`recent-duplicate:${t}`}}function v(i){if(i.kind==="echo")return["echo",i.domain,i.basis,i.establishedSymbol].join(":");let t=i.sharedEvidence.slice().sort().join("|"),e=[i.echoSymbol,i.establishedSymbol].sort().join("|");return["twin",i.domain,i.basis,t||e].join(":")}function T(i){let t=new Map;for(let[e,n]of i.entries()){let a=n.rootCauseKey??v(n),o=n.groupKey??`recent-duplicate:${a}`,s=t.get(o);s||(s={groupKey:o,rootCauseKey:a,kind:n.kind,domain:n.domain,basis:n.basis,count:0,maxSimilarity:n.similarity,findingIndexes:[],echoFiles:new Set,establishedFile:n.kind==="echo"?n.establishedFile:void 0,establishedSymbol:n.kind==="echo"?n.establishedSymbol:void 0,relatedFiles:new Set,sharedEvidence:new Set,recommendation:N(n)},t.set(o,s)),s.count+=1,s.maxSimilarity=Math.max(s.maxSimilarity,n.similarity),s.findingIndexes.push(e),s.echoFiles.add(n.echoFile),s.relatedFiles.add(n.echoFile),s.relatedFiles.add(n.establishedFile);for(let l of n.sharedEvidence)s.sharedEvidence.add(l)}return[...t.values()].map(e=>({...e,echoFiles:[...e.echoFiles].sort(),relatedFiles:[...e.relatedFiles].sort(),sharedEvidence:[...e.sharedEvidence].sort().slice(0,16)})).sort((e,n)=>n.count-e.count||n.maxSimilarity-e.maxSimilarity||e.groupKey.localeCompare(n.groupKey))}function N(i){return i.kind==="echo"?"Review the established side once, then migrate or delete every echo in this group.":"Pick one owner for the new twins and consolidate the group before the copies diverge."}function K(i){return Number.isFinite(i)?i*5:Number.POSITIVE_INFINITY}function P(...i){let t=[],e=new Set;for(let[n,a]of i)for(let o of a){let s=`${n}:${o}`;e.has(s)||(e.add(s),t.push(s))}return t}function m(i){return(i.split("/").pop()??i).replace(/\.[^.]+$/,"")}export{$ as a};
2
+ //# sourceMappingURL=chunk-K7VBTWNR.js.map
@@ -1,2 +1,2 @@
1
- import{a as p,b as H,c as l,d as m}from"./chunk-QUJBXLBY.js";import{a as b}from"./chunk-PVZMPG5I.js";import{a as R,b as g}from"./chunk-3UVJJ6Z7.js";import{e as v}from"./chunk-EWC3UK4V.js";function V(e,s={}){let{minSimilarity:d=.45,minSharedBehaviors:i=6,limit:o=20,scope:n,scanLimit:a,filePattern:c}=s,h=v(e,{scope:n,minBehaviorTokens:Math.max(3,i),scanLimit:a}).map(r=>({file:r.file,component:r.name,tokens:r.behaviorTokens,profile:r}));return b({profiles:h,limit:o,filePattern:c,compare:(r,t)=>y(r,t,d,i),sort:(r,t)=>t.similarity-r.similarity||r.fileA.localeCompare(t.fileA)||r.componentA.localeCompare(t.componentA)||r.fileB.localeCompare(t.fileB)||r.componentB.localeCompare(t.componentB)})}function y(e,s,d,i){let o=R(e.tokens,s.tokens);if(o.size<i||!A(o))return null;let n=H(e.tokens,s.tokens);if(n<d)return null;let a=l(o,"hook:"),c=l(o,"react-hook:"),h=l(o,"effect:"),r=l(o,"state:"),t=l(o,"request:"),u=l(o,"handler:"),k=l(o,"handler-verb:"),f=B({sharedHooks:a,sharedReactHooks:c,sharedEffects:h,sharedState:r,sharedRequests:t,sharedHandlers:u,sharedHandlerVerbs:k});return{fileA:e.file,componentA:e.component,fileB:s.file,componentB:s.component,similarity:n,sharedTokens:m(o),sharedHooks:a,sharedReactHooks:c,sharedEffects:h,sharedState:r,sharedRequests:t,sharedHandlers:u,sharedHandlerVerbs:k,evidenceClass:f.evidenceClass,actionTier:f.actionTier,evidenceClassReasons:f.reasons,recommendation:f.recommendation,uniqueToA:m(g(e.tokens,s.tokens)).slice(0,25),uniqueToB:m(g(s.tokens,e.tokens)).slice(0,25),reason:E({sharedHooks:a,sharedReactHooks:c,sharedEffects:h,sharedState:r,sharedRequests:t,sharedHandlers:u,sharedHandlerVerbs:k}),locA:e.profile.loc,locB:s.profile.loc}}function B(e){return p({genericWords:P,stripPrefixes:S,primitiveGroups:[{values:e.sharedReactHooks,reasonPrefix:"shared React primitives",bucket:"generic"},{values:e.sharedEffects,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedHooks,label:"shared hook",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedState,label:"shared state",fallbackBucket:"generic"},{names:e.sharedHandlers,label:"shared handler",fallbackBucket:"generic"},{names:e.sharedHandlerVerbs,label:"shared action verb",fallbackBucket:"generic"}],recommendation:C})}function C(e){switch(e){case"domain-behavior":return"Review for a shared hook, controller, or feature module around the named domain behavior.";case"mixed":return"Separate generic React mechanics from domain-specific behavior before extracting a shared hook.";case"shared-abstraction":return"Review the existing shared hook usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct hook-extraction evidence."}}function A(e){let s=0,d=0,i=0,o=0,n=0,a=0,c=0;for(let t of e)t.startsWith("hook:")?s+=1:t.startsWith("react-hook:")?d+=1:t.startsWith("effect:")?i+=1:t.startsWith("request:")?o+=1:t.startsWith("handler:")||t.startsWith("handler-verb:")?n+=1:t.startsWith("state:")?a+=1:t.startsWith("state-hook:")&&(c+=1);let h=a+c,r=s+d+i+o+n+h;return o>=1&&r>=4||s>=1&&(o>=1||a>=1||n>=2)&&r>=5||a>=1&&n>=2&&(i>=1||d>=2)&&r>=5}function E(e){let s=[];return e.sharedHooks.length&&s.push(`shared hooks: ${e.sharedHooks.join(", ")}`),e.sharedReactHooks.length&&s.push(`shared React hooks: ${e.sharedReactHooks.join(", ")}`),e.sharedEffects.length&&s.push(`shared effects: ${e.sharedEffects.join(", ")}`),e.sharedState.length&&s.push(`shared state: ${e.sharedState.join(", ")}`),e.sharedRequests.length&&s.push(`shared requests: ${e.sharedRequests.join(", ")}`),e.sharedHandlers.length&&s.push(`shared handlers: ${e.sharedHandlers.slice(0,6).join(", ")}`),e.sharedHandlerVerbs.length&&s.push(`shared action verbs: ${e.sharedHandlerVerbs.slice(0,6).join(", ")}`),s.join("; ")||"shared React behavior profile"}var P=new Set(["add","apply","async","callback","cancel","change","clear","close","create","data","delete","draft","edit","effect","error","fetch","filter","form","handle","has","is","item","items","load","loader","loading","memo","name","open","reducer","refresh","ref","remove","request","reset","resource","row","rows","save","saving","search","select","selected","state","store","submit","toggle","update","use","value"]),S=[/^use(?=[A-Z])/,/^handle(?=[A-Z])/,/^is(?=[A-Z])/,/^has(?=[A-Z])/];export{V as a};
2
- //# sourceMappingURL=chunk-56UN3DMK.js.map
1
+ import{a as p,b as H,c as l,d as m}from"./chunk-BZ53S4ZN.js";import{a as b}from"./chunk-PVZMPG5I.js";import{a as R,b as g}from"./chunk-YWOOQ4FF.js";import{e as v}from"./chunk-BTCASU5J.js";function V(e,s={}){let{minSimilarity:d=.45,minSharedBehaviors:i=6,limit:o=20,scope:n,scanLimit:a,filePattern:c}=s,h=v(e,{scope:n,minBehaviorTokens:Math.max(3,i),scanLimit:a}).map(r=>({file:r.file,component:r.name,tokens:r.behaviorTokens,profile:r}));return b({profiles:h,limit:o,filePattern:c,compare:(r,t)=>y(r,t,d,i),sort:(r,t)=>t.similarity-r.similarity||r.fileA.localeCompare(t.fileA)||r.componentA.localeCompare(t.componentA)||r.fileB.localeCompare(t.fileB)||r.componentB.localeCompare(t.componentB)})}function y(e,s,d,i){let o=R(e.tokens,s.tokens);if(o.size<i||!A(o))return null;let n=H(e.tokens,s.tokens);if(n<d)return null;let a=l(o,"hook:"),c=l(o,"react-hook:"),h=l(o,"effect:"),r=l(o,"state:"),t=l(o,"request:"),u=l(o,"handler:"),k=l(o,"handler-verb:"),f=B({sharedHooks:a,sharedReactHooks:c,sharedEffects:h,sharedState:r,sharedRequests:t,sharedHandlers:u,sharedHandlerVerbs:k});return{fileA:e.file,componentA:e.component,fileB:s.file,componentB:s.component,similarity:n,sharedTokens:m(o),sharedHooks:a,sharedReactHooks:c,sharedEffects:h,sharedState:r,sharedRequests:t,sharedHandlers:u,sharedHandlerVerbs:k,evidenceClass:f.evidenceClass,actionTier:f.actionTier,evidenceClassReasons:f.reasons,recommendation:f.recommendation,uniqueToA:m(g(e.tokens,s.tokens)).slice(0,25),uniqueToB:m(g(s.tokens,e.tokens)).slice(0,25),reason:E({sharedHooks:a,sharedReactHooks:c,sharedEffects:h,sharedState:r,sharedRequests:t,sharedHandlers:u,sharedHandlerVerbs:k}),locA:e.profile.loc,locB:s.profile.loc}}function B(e){return p({genericWords:P,stripPrefixes:S,primitiveGroups:[{values:e.sharedReactHooks,reasonPrefix:"shared React primitives",bucket:"generic"},{values:e.sharedEffects,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedHooks,label:"shared hook",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedState,label:"shared state",fallbackBucket:"generic"},{names:e.sharedHandlers,label:"shared handler",fallbackBucket:"generic"},{names:e.sharedHandlerVerbs,label:"shared action verb",fallbackBucket:"generic"}],recommendation:C})}function C(e){switch(e){case"domain-behavior":return"Review for a shared hook, controller, or feature module around the named domain behavior.";case"mixed":return"Separate generic React mechanics from domain-specific behavior before extracting a shared hook.";case"shared-abstraction":return"Review the existing shared hook usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct hook-extraction evidence."}}function A(e){let s=0,d=0,i=0,o=0,n=0,a=0,c=0;for(let t of e)t.startsWith("hook:")?s+=1:t.startsWith("react-hook:")?d+=1:t.startsWith("effect:")?i+=1:t.startsWith("request:")?o+=1:t.startsWith("handler:")||t.startsWith("handler-verb:")?n+=1:t.startsWith("state:")?a+=1:t.startsWith("state-hook:")&&(c+=1);let h=a+c,r=s+d+i+o+n+h;return o>=1&&r>=4||s>=1&&(o>=1||a>=1||n>=2)&&r>=5||a>=1&&n>=2&&(i>=1||d>=2)&&r>=5}function E(e){let s=[];return e.sharedHooks.length&&s.push(`shared hooks: ${e.sharedHooks.join(", ")}`),e.sharedReactHooks.length&&s.push(`shared React hooks: ${e.sharedReactHooks.join(", ")}`),e.sharedEffects.length&&s.push(`shared effects: ${e.sharedEffects.join(", ")}`),e.sharedState.length&&s.push(`shared state: ${e.sharedState.join(", ")}`),e.sharedRequests.length&&s.push(`shared requests: ${e.sharedRequests.join(", ")}`),e.sharedHandlers.length&&s.push(`shared handlers: ${e.sharedHandlers.slice(0,6).join(", ")}`),e.sharedHandlerVerbs.length&&s.push(`shared action verbs: ${e.sharedHandlerVerbs.slice(0,6).join(", ")}`),s.join("; ")||"shared React behavior profile"}var P=new Set(["add","apply","async","callback","cancel","change","clear","close","create","data","delete","draft","edit","effect","error","fetch","filter","form","handle","has","is","item","items","load","loader","loading","memo","name","open","reducer","refresh","ref","remove","request","reset","resource","row","rows","save","saving","search","select","selected","state","store","submit","toggle","update","use","value"]),S=[/^use(?=[A-Z])/,/^handle(?=[A-Z])/,/^is(?=[A-Z])/,/^has(?=[A-Z])/];export{V as a};
2
+ //# sourceMappingURL=chunk-KLXVEBVC.js.map
@@ -1,2 +1,2 @@
1
- import{a as D}from"./chunk-3ZYF3ELZ.js";import{n as A}from"./chunk-HVTYSC26.js";import{b as d,d as h,f as y}from"./chunk-FUPDW5AC.js";import{c as S}from"./chunk-JM72FNGA.js";function F(e,n={}){let{samples:o=50,scope:r,maxDisagreements:l=5}=n,s=new D(e),i=C(s.productionCallableDefinitions({scope:r,minLoc:2,requireFunctionLikeSymbol:!0}),o);if(i.length===0||!R(e,i))return{available:!1,sampleSize:i.length,oracleCoverage:0,scores:[],topDisagreements:[]};let c={references:v(),callees:v()},a=[],g=0,T=y(e,i);for(let t of i){let u=f(t,h(e,t).map(m=>m.file)),b=f(t,(T.get(t.symbolId)??[]).map(m=>m.file));if(u.size===0&&b.size===0)continue;g+=1;let Q=f(t,A(e,t).map(m=>m.file)),I=f(t,(s.calleeMap([t],{semantic:!1}).get(t.symbolId)??[]).map(m=>m.file));x(c.references,t,"references",Q,u,a),x(c.callees,t,"callees",I,b,a)}return a.sort((t,u)=>u.cheapOnly.length+u.oracleOnly.length-(t.cheapOnly.length+t.oracleOnly.length)),{available:!0,sampleSize:i.length,oracleCoverage:i.length>0?p(g/i.length):0,scores:["references","callees"].map(t=>O(t,c[t])),topDisagreements:a.slice(0,l)}}function v(){return{comparedSymbols:0,agreed:0,cheapTotal:0,oracleTotal:0}}function C(e,n){let o=[...e].sort((s,i)=>s.symbolId-i.symbolId);if(o.length<=n)return o;let r=o.length/n,l=[];for(let s=0;s<n;s++)l.push(o[Math.floor(s*r)]);return l}function R(e,n){let o=n[0];if(!o)return!1;try{return d(e,o.relativePath).availability().available}catch{return!1}}function f(e,n){let o=new Set;for(let r of n)r!==e.relativePath&&o.add(r);return o}function x(e,n,o,r,l,s){if(r.size===0&&l.size===0)return;e.comparedSymbols+=1,e.cheapTotal+=r.size,e.oracleTotal+=l.size;let i=[],c=[];for(let a of r)l.has(a)?e.agreed+=1:i.push(a);for(let a of l)r.has(a)||c.push(a);(i.length>0||c.length>0)&&s.push({symbol:S(n.symbol),question:o,cheapOnly:i,oracleOnly:c})}var z={references:!0,callees:!1};function O(e,n){let o=n.oracleTotal>0?n.agreed/n.oracleTotal:1,r=n.cheapTotal-n.agreed;return{question:e,comparedSymbols:n.comparedSymbols,precision:z[e]&&n.cheapTotal>0?p(n.agreed/n.cheapTotal):null,recall:p(o),unverified:r}}function p(e){return Math.round(e*1e3)/1e3}export{F as a};
2
- //# sourceMappingURL=chunk-E44ZMVNA.js.map
1
+ import{a as D}from"./chunk-XPOZO76D.js";import{p as A}from"./chunk-AETMKBZR.js";import{b as d,d as h,f as y}from"./chunk-RSKOYTSY.js";import{c as S}from"./chunk-JM72FNGA.js";function F(e,n={}){let{samples:o=50,scope:r,maxDisagreements:l=5}=n,s=new D(e),i=C(s.productionCallableDefinitions({scope:r,minLoc:2,requireFunctionLikeSymbol:!0}),o);if(i.length===0||!R(e,i))return{available:!1,sampleSize:i.length,oracleCoverage:0,scores:[],topDisagreements:[]};let c={references:v(),callees:v()},a=[],g=0,T=y(e,i);for(let t of i){let u=f(t,h(e,t).map(m=>m.file)),b=f(t,(T.get(t.symbolId)??[]).map(m=>m.file));if(u.size===0&&b.size===0)continue;g+=1;let Q=f(t,A(e,t).map(m=>m.file)),I=f(t,(s.calleeMap([t],{semantic:!1}).get(t.symbolId)??[]).map(m=>m.file));x(c.references,t,"references",Q,u,a),x(c.callees,t,"callees",I,b,a)}return a.sort((t,u)=>u.cheapOnly.length+u.oracleOnly.length-(t.cheapOnly.length+t.oracleOnly.length)),{available:!0,sampleSize:i.length,oracleCoverage:i.length>0?p(g/i.length):0,scores:["references","callees"].map(t=>O(t,c[t])),topDisagreements:a.slice(0,l)}}function v(){return{comparedSymbols:0,agreed:0,cheapTotal:0,oracleTotal:0}}function C(e,n){let o=[...e].sort((s,i)=>s.symbolId-i.symbolId);if(o.length<=n)return o;let r=o.length/n,l=[];for(let s=0;s<n;s++)l.push(o[Math.floor(s*r)]);return l}function R(e,n){let o=n[0];if(!o)return!1;try{return d(e,o.relativePath).availability().available}catch{return!1}}function f(e,n){let o=new Set;for(let r of n)r!==e.relativePath&&o.add(r);return o}function x(e,n,o,r,l,s){if(r.size===0&&l.size===0)return;e.comparedSymbols+=1,e.cheapTotal+=r.size,e.oracleTotal+=l.size;let i=[],c=[];for(let a of r)l.has(a)?e.agreed+=1:i.push(a);for(let a of l)r.has(a)||c.push(a);(i.length>0||c.length>0)&&s.push({symbol:S(n.symbol),question:o,cheapOnly:i,oracleOnly:c})}var z={references:!0,callees:!1};function O(e,n){let o=n.oracleTotal>0?n.agreed/n.oracleTotal:1,r=n.cheapTotal-n.agreed;return{question:e,comparedSymbols:n.comparedSymbols,precision:z[e]&&n.cheapTotal>0?p(n.agreed/n.cheapTotal):null,recall:p(o),unverified:r}}function p(e){return Math.round(e*1e3)/1e3}export{F as a};
2
+ //# sourceMappingURL=chunk-KZYHFI2X.js.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-3ZYF3ELZ.js";import{a as h}from"./chunk-YTR4CO5S.js";import{o as S}from"./chunk-HVTYSC26.js";import{a as d,b}from"./chunk-MZ7APUFN.js";import{k as y}from"./chunk-3UW7VM4H.js";import{c as m}from"./chunk-JM72FNGA.js";function v(e,o,l={}){let{direction:c="backward",maxDepth:s=3}=l,r=d(e,o);return r?c==="backward"?w(e,r,s,{semantic:l.semantic!==!1}):M(e,r,{semantic:l.semantic!==!1}):null}function w(e,o,l,c){let s=[],r=new Set([o.symbol]),t=[o];for(let n=1;n<=l&&t.length!==0;n++){let i=[];for(let p of t){let g=h(e,p,{semantic:c.semantic});for(let a of g){if(r.has(a.symbol))continue;r.add(a.symbol),s.push({symbol:a.symbol,shortName:m(a.symbol),file:a.file,relationship:n===1?"referenced within definition (callee)":`depth ${n} callee`});let f=b(e,a.symbol);f&&!e.isIgnored(f.relativePath)&&i.push(f)}}t=i}return{symbol:o.symbol,shortName:m(o.symbol),direction:"backward",connectedSymbols:s}}function M(e,o,l){let c=new Set,s=[],r=new u(e);for(let t of S(e,o,{semantic:l.semantic})){if(s.length>=30)break;let n=t.enclosingSymbol??y(r.definitionsForFile(t.file),t.line)?.symbol??null;if(!n||n===o.symbol)continue;let i=b(e,n);!i||e.isIgnored(i.relativePath)||c.has(i.symbol)||(c.add(i.symbol),s.push({symbol:i.symbol,shortName:m(i.symbol),file:i.relativePath,relationship:`references target at ${t.file}:${t.line+1}`}))}return s.sort((t,n)=>t.file.localeCompare(n.file)),{symbol:o.symbol,shortName:m(o.symbol),direction:"forward",connectedSymbols:s}}export{v as a};
2
- //# sourceMappingURL=chunk-FIB4JPEX.js.map
1
+ import{a as u}from"./chunk-XPOZO76D.js";import{a as h}from"./chunk-ZMU6IWDK.js";import{q as S}from"./chunk-AETMKBZR.js";import{a as d,b}from"./chunk-T633QLYF.js";import{k as y}from"./chunk-X3BJUFSN.js";import{c as m}from"./chunk-JM72FNGA.js";function v(e,o,l={}){let{direction:c="backward",maxDepth:s=3}=l,r=d(e,o);return r?c==="backward"?w(e,r,s,{semantic:l.semantic!==!1}):M(e,r,{semantic:l.semantic!==!1}):null}function w(e,o,l,c){let s=[],r=new Set([o.symbol]),t=[o];for(let n=1;n<=l&&t.length!==0;n++){let i=[];for(let p of t){let g=h(e,p,{semantic:c.semantic});for(let a of g){if(r.has(a.symbol))continue;r.add(a.symbol),s.push({symbol:a.symbol,shortName:m(a.symbol),file:a.file,relationship:n===1?"referenced within definition (callee)":`depth ${n} callee`});let f=b(e,a.symbol);f&&!e.isIgnored(f.relativePath)&&i.push(f)}}t=i}return{symbol:o.symbol,shortName:m(o.symbol),direction:"backward",connectedSymbols:s}}function M(e,o,l){let c=new Set,s=[],r=new u(e);for(let t of S(e,o,{semantic:l.semantic})){if(s.length>=30)break;let n=t.enclosingSymbol??y(r.definitionsForFile(t.file),t.line)?.symbol??null;if(!n||n===o.symbol)continue;let i=b(e,n);!i||e.isIgnored(i.relativePath)||c.has(i.symbol)||(c.add(i.symbol),s.push({symbol:i.symbol,shortName:m(i.symbol),file:i.relativePath,relationship:`references target at ${t.file}:${t.line+1}`}))}return s.sort((t,n)=>t.file.localeCompare(n.file)),{symbol:o.symbol,shortName:m(o.symbol),direction:"forward",connectedSymbols:s}}export{v as a};
2
+ //# sourceMappingURL=chunk-L4QKEQ4S.js.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-MZ7APUFN.js";import{a as c}from"./chunk-64MNV6AB.js";import{existsSync as m}from"fs";import{basename as p,isAbsolute as g,join as d}from"path";function S(t,r){let e=f(t,r,{allowMultiple:!1})[0]?.relativePath;return e||x(t,r)}function j(t,r){return f(t,r,{allowMultiple:!0}).map(e=>e.relativePath)}function x(t,r){if(!r)return null;let e=r.replace(/\\/g,"/").replace(/^\.\//,""),s=g(e)&&e.startsWith(t.config.projectRoot)?e.slice(t.config.projectRoot.length).replace(/^\/+/,""):e,i=d(t.config.projectRoot,s);return m(i)?s:null}function f(t,r,e){let s=h(r);if(!s)return[];let i=c(t,{includeIgnored:!1}).map(o=>({relativePath:o,score:v(o,s)})).filter(o=>o.score>0).sort((o,l)=>l.score-o.score||o.relativePath.localeCompare(l.relativePath));if(i.length===0){let o=u(t,r);return!o||t.isIgnored(o.relativePath)?[]:[{relativePath:o.relativePath,score:700}]}let n=i.filter(o=>o.score>=1100);if(n.length>0)return e.allowMultiple?n:[n[0]];let a=i.filter(o=>o.score>=800);return a.length>0?e.allowMultiple?a:[a[0]]:e.allowMultiple?i:[i[0]]}function v(t,r){let e=h(t),s=p(e),i=p(r),n=0;return e===r&&(n+=1200),e.endsWith(`/${r}`)&&(n+=1100),s===i&&(n+=900),e.startsWith(`${r}/`)&&(n+=850),e.includes(r)&&(n+=250),n}function h(t){return t.trim().replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"").replace(/\/+$/,"")}export{S as a,j as b};
2
- //# sourceMappingURL=chunk-CTCAF3YA.js.map
1
+ import{a as u}from"./chunk-T633QLYF.js";import{a as c}from"./chunk-64MNV6AB.js";import{existsSync as m}from"fs";import{basename as p,isAbsolute as g,join as d}from"path";function S(t,r){let e=f(t,r,{allowMultiple:!1})[0]?.relativePath;return e||x(t,r)}function j(t,r){return f(t,r,{allowMultiple:!0}).map(e=>e.relativePath)}function x(t,r){if(!r)return null;let e=r.replace(/\\/g,"/").replace(/^\.\//,""),s=g(e)&&e.startsWith(t.config.projectRoot)?e.slice(t.config.projectRoot.length).replace(/^\/+/,""):e,i=d(t.config.projectRoot,s);return m(i)?s:null}function f(t,r,e){let s=h(r);if(!s)return[];let i=c(t,{includeIgnored:!1}).map(o=>({relativePath:o,score:v(o,s)})).filter(o=>o.score>0).sort((o,l)=>l.score-o.score||o.relativePath.localeCompare(l.relativePath));if(i.length===0){let o=u(t,r);return!o||t.isIgnored(o.relativePath)?[]:[{relativePath:o.relativePath,score:700}]}let n=i.filter(o=>o.score>=1100);if(n.length>0)return e.allowMultiple?n:[n[0]];let a=i.filter(o=>o.score>=800);return a.length>0?e.allowMultiple?a:[a[0]]:e.allowMultiple?i:[i[0]]}function v(t,r){let e=h(t),s=p(e),i=p(r),n=0;return e===r&&(n+=1200),e.endsWith(`/${r}`)&&(n+=1100),s===i&&(n+=900),e.startsWith(`${r}/`)&&(n+=850),e.includes(r)&&(n+=250),n}function h(t){return t.trim().replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"").replace(/\/+$/,"")}export{S as a,j as b};
2
+ //# sourceMappingURL=chunk-LGX2Y4BA.js.map