scip-query 0.10.8 → 0.10.11

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 (233) hide show
  1. package/README.md +3 -1
  2. package/dist/chunk-2KHTSEIL.js +102 -0
  3. package/dist/chunk-3VD3JMK2.js +2 -0
  4. package/dist/{chunk-MEKSFV6H.js → chunk-4UZO3XCV.js} +2 -2
  5. package/dist/{chunk-BJWNO6BU.js → chunk-54KGX7EX.js} +2 -2
  6. package/dist/chunk-5GOLFJEO.js +8 -0
  7. package/dist/chunk-5OST6GYB.js +2 -0
  8. package/dist/{chunk-C6BYNIH4.js → chunk-65AU3HFZ.js} +2 -2
  9. package/dist/{chunk-E2CCBFLR.js → chunk-6GN7FXCH.js} +2 -2
  10. package/dist/{chunk-RHKMQNFI.js → chunk-6IR2AOBM.js} +2 -2
  11. package/dist/{chunk-6EO3E3IP.js → chunk-6JRV4MY2.js} +2 -2
  12. package/dist/{chunk-5SMUKUV5.js → chunk-6LJHXREW.js} +2 -2
  13. package/dist/chunk-6QSOCTZT.js +18 -0
  14. package/dist/{chunk-6TDOT7B3.js → chunk-72KY2ZFO.js} +2 -2
  15. package/dist/{chunk-LGX2Y4BA.js → chunk-7B6LP46R.js} +2 -2
  16. package/dist/chunk-7GO4EQF5.js +2 -0
  17. package/dist/chunk-7IVSJJZU.js +7 -0
  18. package/dist/{chunk-EBIQY3RK.js → chunk-7TWLSZK5.js} +2 -2
  19. package/dist/{chunk-X3Z4MLVL.js → chunk-AVWPHM2Q.js} +2 -2
  20. package/dist/{chunk-GZQID3FS.js → chunk-BASVXNY3.js} +2 -2
  21. package/dist/{chunk-BJG67TCR.js → chunk-BFXPG2VN.js} +2 -2
  22. package/dist/chunk-BSN22NRK.js +9 -0
  23. package/dist/{chunk-ZDR4VTOP.js → chunk-BVRS7RKQ.js} +2 -2
  24. package/dist/{chunk-ANIOISCE.js → chunk-C5CTSJ6X.js} +2 -2
  25. package/dist/{chunk-VXT7WVIN.js → chunk-CO5GJRP7.js} +2 -2
  26. package/dist/chunk-CW5YFOCP.js +5 -0
  27. package/dist/chunk-E35O7UCB.js +2 -0
  28. package/dist/{chunk-LWTML2AN.js → chunk-EXDQ35NN.js} +2 -2
  29. package/dist/{chunk-Q34NWRPP.js → chunk-EY43NV4M.js} +2 -2
  30. package/dist/chunk-FAYI6KZ5.js +2 -0
  31. package/dist/{chunk-ZL52RLDK.js → chunk-FDEQIPPK.js} +2 -2
  32. package/dist/{chunk-5G5VI7J4.js → chunk-FFVIFETB.js} +2 -2
  33. package/dist/{chunk-JUIAOOK7.js → chunk-FKCGBZAC.js} +2 -2
  34. package/dist/{chunk-JRUKS66S.js → chunk-FXNWFMKW.js} +2 -2
  35. package/dist/chunk-G5UPYQGL.js +4 -0
  36. package/dist/chunk-GQBMH2TQ.js +2 -0
  37. package/dist/{chunk-VFLHKRTW.js → chunk-GRJY65YT.js} +2 -2
  38. package/dist/chunk-HF25DFSC.js +3 -0
  39. package/dist/chunk-HHN2B5KA.js +2 -0
  40. package/dist/{chunk-7KJBH4IP.js → chunk-IHUETYFW.js} +2 -2
  41. package/dist/{chunk-BEUQVBE3.js → chunk-JATUZIEH.js} +2 -2
  42. package/dist/chunk-JCLDUKT6.js +38 -0
  43. package/dist/{chunk-B4EHYG6M.js → chunk-JGN2ZFJR.js} +2 -2
  44. package/dist/{chunk-L4QKEQ4S.js → chunk-JME7OWD3.js} +2 -2
  45. package/dist/chunk-KDFONWTW.js +40 -0
  46. package/dist/{chunk-VMPB52FG.js → chunk-LPL4MA6R.js} +2 -2
  47. package/dist/{chunk-FGTHPJON.js → chunk-LSET2TXH.js} +2 -2
  48. package/dist/chunk-LZHUWKGD.js +2 -0
  49. package/dist/{chunk-JYSAYZNX.js → chunk-M4COR2H6.js} +2 -2
  50. package/dist/{chunk-QDGKE5HN.js → chunk-NOJAM5ZV.js} +2 -2
  51. package/dist/chunk-O6ZH6C6Y.js +2 -0
  52. package/dist/{chunk-3LQFMQPY.js → chunk-OBGRLXWF.js} +2 -2
  53. package/dist/chunk-OLTESY4K.js +3 -0
  54. package/dist/chunk-P4KYUPBD.js +4 -0
  55. package/dist/chunk-P5RYBRIO.js +4 -0
  56. package/dist/{chunk-6N6QTGSD.js → chunk-P753MDDE.js} +2 -2
  57. package/dist/{chunk-NWFSC356.js → chunk-P7AL7Y37.js} +2 -2
  58. package/dist/chunk-QLAUCRDJ.js +2 -0
  59. package/dist/{chunk-FHWEEQVO.js → chunk-QPU7EXAW.js} +2 -2
  60. package/dist/{chunk-AA7L7GKI.js → chunk-QYB5P7GL.js} +2 -2
  61. package/dist/chunk-RNM6LMCF.js +2 -0
  62. package/dist/chunk-RVWSAMTT.js +2 -0
  63. package/dist/{chunk-T633QLYF.js → chunk-TK7O5ER5.js} +2 -2
  64. package/dist/chunk-TQ5W2H3S.js +4 -0
  65. package/dist/chunk-USPV3T5K.js +2 -0
  66. package/dist/{chunk-FKUCFCLU.js → chunk-VCQYSG2M.js} +2 -2
  67. package/dist/{chunk-2YI45TNM.js → chunk-VUKC6F77.js} +2 -2
  68. package/dist/{chunk-N7F5UM6J.js → chunk-W6BVEKYC.js} +2 -2
  69. package/dist/{chunk-63MSELOP.js → chunk-WUCEKFQC.js} +2 -2
  70. package/dist/chunk-XUGQU7PM.js +41 -0
  71. package/dist/{chunk-KZYHFI2X.js → chunk-Y5NBHMQX.js} +2 -2
  72. package/dist/{chunk-6BNOACLT.js → chunk-YCOFCT4B.js} +2 -2
  73. package/dist/{chunk-SHM5D3DQ.js → chunk-YWYFU2V3.js} +2 -2
  74. package/dist/{chunk-BWL2ECGQ.js → chunk-Z3YYR4OS.js} +2 -2
  75. package/dist/{chunk-3FYGJ2GY.js → chunk-Z4HICZGY.js} +2 -2
  76. package/dist/{chunk-24S6MYOC.js → chunk-ZQDIXAF5.js} +2 -2
  77. package/dist/cli.js +298 -244
  78. package/dist/{db-BAVwb4Pb.d.ts → db-Djj3Nqrb.d.ts} +2 -0
  79. package/dist/{health-B17sVFYf.d.ts → health-D5J42g4D.d.ts} +1 -1
  80. package/dist/index.d.ts +3 -2
  81. package/dist/index.js +3 -3
  82. package/dist/queries/affected.d.ts +1 -1
  83. package/dist/queries/affected.js +1 -1
  84. package/dist/queries/bottlenecks.d.ts +1 -1
  85. package/dist/queries/bottlenecks.js +1 -1
  86. package/dist/queries/by-kind.d.ts +1 -1
  87. package/dist/queries/by-kind.js +1 -1
  88. package/dist/queries/call-graph.d.ts +1 -1
  89. package/dist/queries/call-graph.js +1 -1
  90. package/dist/queries/change-surface.d.ts +1 -1
  91. package/dist/queries/change-surface.js +1 -1
  92. package/dist/queries/cleanup-plan.d.ts +1 -1
  93. package/dist/queries/cleanup-plan.js +1 -1
  94. package/dist/queries/co-change.d.ts +1 -1
  95. package/dist/queries/co-change.js +1 -1
  96. package/dist/queries/code.d.ts +1 -1
  97. package/dist/queries/code.js +1 -1
  98. package/dist/queries/complexity-hotspots.d.ts +1 -1
  99. package/dist/queries/complexity-hotspots.js +1 -1
  100. package/dist/queries/complexity.d.ts +1 -1
  101. package/dist/queries/complexity.js +1 -1
  102. package/dist/queries/convergence.d.ts +1 -1
  103. package/dist/queries/convergence.js +1 -1
  104. package/dist/queries/coupling.d.ts +1 -1
  105. package/dist/queries/coupling.js +1 -1
  106. package/dist/queries/cycles.d.ts +1 -1
  107. package/dist/queries/cycles.js +1 -1
  108. package/dist/queries/dataflow.d.ts +1 -1
  109. package/dist/queries/dataflow.js +1 -1
  110. package/dist/queries/dead.d.ts +1 -1
  111. package/dist/queries/dead.js +1 -1
  112. package/dist/queries/deep-chains.d.ts +1 -1
  113. package/dist/queries/deep-chains.js +1 -1
  114. package/dist/queries/deps.d.ts +1 -1
  115. package/dist/queries/deps.js +1 -1
  116. package/dist/queries/diff-gate.d.ts +1 -1
  117. package/dist/queries/diff-gate.js +1 -1
  118. package/dist/queries/diff-impact.d.ts +1 -1
  119. package/dist/queries/diff-impact.js +1 -1
  120. package/dist/queries/doc-drift.d.ts +1 -1
  121. package/dist/queries/doc-drift.js +1 -1
  122. package/dist/queries/drift.d.ts +2 -1
  123. package/dist/queries/drift.js +1 -1
  124. package/dist/queries/extract-candidates.d.ts +1 -1
  125. package/dist/queries/extract-candidates.js +1 -1
  126. package/dist/queries/fan.d.ts +1 -1
  127. package/dist/queries/fan.js +1 -1
  128. package/dist/queries/files.d.ts +1 -1
  129. package/dist/queries/health.d.ts +2 -2
  130. package/dist/queries/health.js +1 -1
  131. package/dist/queries/hierarchy.d.ts +1 -1
  132. package/dist/queries/hierarchy.js +1 -1
  133. package/dist/queries/hotspots.d.ts +1 -1
  134. package/dist/queries/hotspots.js +1 -1
  135. package/dist/queries/imports.d.ts +1 -1
  136. package/dist/queries/imports.js +1 -1
  137. package/dist/queries/incomplete-migration.d.ts +1 -1
  138. package/dist/queries/incomplete-migration.js +1 -1
  139. package/dist/queries/index.d.ts +3 -3
  140. package/dist/queries/index.js +1 -1
  141. package/dist/queries/isolated.d.ts +1 -1
  142. package/dist/queries/isolated.js +1 -1
  143. package/dist/queries/locality-candidates.d.ts +1 -1
  144. package/dist/queries/locality-candidates.js +1 -1
  145. package/dist/queries/members.d.ts +1 -1
  146. package/dist/queries/members.js +1 -1
  147. package/dist/queries/methods.d.ts +1 -1
  148. package/dist/queries/methods.js +1 -1
  149. package/dist/queries/outline.d.ts +1 -1
  150. package/dist/queries/outline.js +1 -1
  151. package/dist/queries/passthrough-candidates.d.ts +1 -1
  152. package/dist/queries/passthrough-candidates.js +1 -1
  153. package/dist/queries/plan-context.d.ts +1 -1
  154. package/dist/queries/plan-context.js +1 -1
  155. package/dist/queries/react-component-duplicates.d.ts +2 -1
  156. package/dist/queries/react-component-duplicates.js +1 -1
  157. package/dist/queries/react-hook-candidates.d.ts +2 -1
  158. package/dist/queries/react-hook-candidates.js +1 -1
  159. package/dist/queries/react-large-component-pressure.d.ts +1 -1
  160. package/dist/queries/react-large-component-pressure.js +1 -1
  161. package/dist/queries/recent-duplicates.d.ts +1 -1
  162. package/dist/queries/recent-duplicates.js +1 -1
  163. package/dist/queries/redundant-reexports.d.ts +1 -1
  164. package/dist/queries/redundant-reexports.js +1 -1
  165. package/dist/queries/refs.d.ts +1 -1
  166. package/dist/queries/refs.js +1 -1
  167. package/dist/queries/self-audit.d.ts +1 -1
  168. package/dist/queries/self-audit.js +1 -1
  169. package/dist/queries/similar-chains.d.ts +1 -1
  170. package/dist/queries/similar-chains.js +1 -1
  171. package/dist/queries/similar-files.d.ts +1 -1
  172. package/dist/queries/similar-files.js +1 -1
  173. package/dist/queries/similar-signatures.d.ts +1 -1
  174. package/dist/queries/similar-signatures.js +1 -1
  175. package/dist/queries/similar.d.ts +13 -2
  176. package/dist/queries/similar.js +1 -1
  177. package/dist/queries/slice.d.ts +1 -1
  178. package/dist/queries/slice.js +1 -1
  179. package/dist/queries/stale-abstractions.d.ts +1 -1
  180. package/dist/queries/stale-abstractions.js +1 -1
  181. package/dist/queries/stats.d.ts +1 -1
  182. package/dist/queries/surface.d.ts +1 -1
  183. package/dist/queries/surface.js +1 -1
  184. package/dist/queries/symbols.d.ts +1 -1
  185. package/dist/queries/symbols.js +1 -1
  186. package/dist/queries/system.d.ts +1 -1
  187. package/dist/queries/system.js +1 -1
  188. package/dist/queries/trace.d.ts +1 -1
  189. package/dist/queries/trace.js +1 -1
  190. package/dist/queries/unused-imports.d.ts +1 -1
  191. package/dist/queries/unused-imports.js +1 -1
  192. package/dist/queries/unused-params.d.ts +1 -1
  193. package/dist/queries/unused-params.js +1 -1
  194. package/dist/queries/vue-component-duplicates.d.ts +2 -1
  195. package/dist/queries/vue-component-duplicates.js +1 -1
  196. package/dist/queries/vue-composable-candidates.d.ts +2 -1
  197. package/dist/queries/vue-composable-candidates.js +1 -1
  198. package/dist/queries/vue-large-view-pressure.d.ts +1 -1
  199. package/dist/queries/wrapper-candidates.d.ts +1 -1
  200. package/dist/queries/wrapper-candidates.js +1 -1
  201. package/docs/COMMAND_REFERENCE.md +1 -1
  202. package/docs/analyzer-inventory.md +29 -0
  203. package/docs/analyzer-validation-ledger.md +32 -1
  204. package/package.json +1 -1
  205. package/skills/scip-hyper-optimization/SKILL.md +153 -24
  206. package/skills/scip-hyper-optimization/agents/openai.yaml +3 -3
  207. package/dist/chunk-2H57MJLI.js +0 -2
  208. package/dist/chunk-4TMJDHC6.js +0 -5
  209. package/dist/chunk-5GVOJOBL.js +0 -2
  210. package/dist/chunk-7XWXGANX.js +0 -4
  211. package/dist/chunk-AETMKBZR.js +0 -40
  212. package/dist/chunk-BTCASU5J.js +0 -3
  213. package/dist/chunk-C6ROZBJA.js +0 -32
  214. package/dist/chunk-COUFCH64.js +0 -2
  215. package/dist/chunk-EKECQP6Z.js +0 -2
  216. package/dist/chunk-FVA3NH4P.js +0 -2
  217. package/dist/chunk-I274B3B3.js +0 -7
  218. package/dist/chunk-J6ADQKQA.js +0 -2
  219. package/dist/chunk-K7VBTWNR.js +0 -2
  220. package/dist/chunk-KLXVEBVC.js +0 -2
  221. package/dist/chunk-KRGBLZT2.js +0 -7
  222. package/dist/chunk-P3K7LX7M.js +0 -4
  223. package/dist/chunk-PVZMPG5I.js +0 -2
  224. package/dist/chunk-RSKOYTSY.js +0 -3
  225. package/dist/chunk-RY7CAOJF.js +0 -4
  226. package/dist/chunk-S7YOLFLX.js +0 -2
  227. package/dist/chunk-SOGKYB5I.js +0 -8
  228. package/dist/chunk-VAXDTQHE.js +0 -18
  229. package/dist/chunk-X3BJUFSN.js +0 -62
  230. package/dist/chunk-XPOZO76D.js +0 -2
  231. package/dist/chunk-XWC67C3Q.js +0 -2
  232. package/dist/chunk-YNSVAJR6.js +0 -2
  233. package/dist/chunk-ZMU6IWDK.js +0 -38
package/README.md CHANGED
@@ -301,7 +301,9 @@ It creates `.scipquery.json`:
301
301
 
302
302
  Use `declaredCouplings` for files that intentionally form one maintenance unit.
303
303
  These pairs are treated as structurally linked by `co-change` and health, while
304
- still appearing in file-specific exploration:
304
+ still appearing in file-specific exploration. The cleanup detector example
305
+ keeps dead-code, isolated-callable, and stale-abstraction detectors together
306
+ because they share candidate and evidence policy changes:
305
307
 
306
308
  ```json
307
309
  {
@@ -0,0 +1,102 @@
1
+ import{a as N,b as m,c as F,d as E,e as p,g as M}from"./chunk-JM72FNGA.js";import{c as R}from"./chunk-72KY2ZFO.js";import{a as f}from"./chunk-DS6QEB3G.js";import{b,c as S,d as I,e as h,j as D}from"./chunk-XUGQU7PM.js";import{a as _}from"./chunk-64MNV6AB.js";import{c as g}from"./chunk-7S5E7KWT.js";function pe(e,n){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.end_line, d.relative_path, gs.display_name, gs.documentation
2
+ FROM global_symbols gs
3
+ JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
4
+ JOIN documents d ON der.document_id = d.id
5
+ WHERE ${n.where}
6
+ ${e.pathExclusionsFor("d")}
7
+ ${k(n.orderBy)}
8
+ ${w(n.limit)}`,...n.params??[])}function ye(e,n){return e.all(`SELECT
9
+ gs.id,
10
+ gs.symbol,
11
+ c.document_id,
12
+ MIN(c.start_line) AS start_line,
13
+ MAX(c.end_line) AS end_line,
14
+ d.relative_path,
15
+ gs.display_name,
16
+ gs.documentation
17
+ FROM global_symbols gs
18
+ JOIN mentions m ON m.symbol_id = gs.id
19
+ JOIN chunks c ON m.chunk_id = c.id
20
+ JOIN documents d ON c.document_id = d.id
21
+ WHERE m.role = 1
22
+ AND ${n.where}
23
+ ${e.pathExclusionsFor("d")}
24
+ GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path, gs.display_name, gs.documentation
25
+ ${k(n.orderBy)}
26
+ ${w(n.limit)}`,...n.params??[])}function k(e){return e?`ORDER BY ${e}`:""}function w(e){return typeof e=="number"?`LIMIT ${e}`:""}function $(e){return!e||!e.trim()?null:e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim()||null}function C(e){if(!e)return null;let n=O(e);if(n)return n.replace(/\n/g," ");let t=e.indexOf("|");if(t===-1)return e.replace(/\n/g," ");let i=e.slice(t+1);return(O(i)??i).replace(/\n/g," ")}function O(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}function j(e){if(m(e.symbol)!==null)return!1;let t=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(t)}function L(e,n,t={}){let i=new Map;for(let r of n)e.length>0&&!j(r)||i.set(r.id,r);for(let r of e)i.set(r.id,r);let o=[...i.values()];return t.sort?o.sort((r,s)=>r.start_line-s.start_line||r.end_line-s.end_line||r.symbol.localeCompare(s.symbol)):o}var W=g("file-definitions",{clearGroups:["definition-catalog"]}),Y=g("file-function-like-definitions",{clearGroups:["definition-catalog"]}),A=new WeakMap;function x(e,n){return W.get(e,n,()=>{let t=P(e,n);if(t)return t;let i=B(e,n),o=S(e),r=f(e,n);return o&&r&&h(e,"file-definitions",n,b(e,n,r),JSON.stringify({projectFingerprint:o,definitions:i.map(s=>({...s}))})),i})}function z(e,n){return Y.get(e,n,()=>{let t=P(e,n);return t?t.filter(i=>i.isFunctionLike):B(e,n,i=>i.isFunctionLike)})}function P(e,n){let t=S(e);if(!t)return null;let i=f(e,n);if(!i)return null;let o=I(e,"file-definitions",n,b(e,n,i));return o?G(o,t,n):null}function G(e,n,t){try{let i=JSON.parse(e);if(!D(i)||i.projectFingerprint!==n||!Array.isArray(i.definitions))return null;let o=[];for(let r of i.definitions){let s=K(r,t);if(!s)return null;o.push(s)}return o}catch{return null}}function K(e,n){return!D(e)||typeof e.symbolId!="number"||typeof e.symbol!="string"||typeof e.documentId!="number"||typeof e.startLine!="number"||typeof e.endLine!="number"||e.relativePath!==n||typeof e.leaf!="string"||typeof e.parentTypeName!="string"&&e.parentTypeName!==null||typeof e.isFunctionLike!="boolean"||typeof e.isTypeLike!="boolean"||typeof e.kind!="number"&&e.kind!==null||typeof e.documentation!="string"&&e.documentation!==null||typeof e.enclosingSymbol!="string"&&e.enclosingSymbol!==null?null:{symbolId:e.symbolId,symbol:e.symbol,documentId:e.documentId,startLine:e.startLine,endLine:e.endLine,relativePath:e.relativePath,leaf:e.leaf,parentTypeName:e.parentTypeName,isFunctionLike:e.isFunctionLike,isTypeLike:e.isTypeLike,kind:e.kind,documentation:e.documentation,enclosingSymbol:e.enclosingSymbol}}function B(e,n,t){let i=L(U(e,n),q(e,n),{sort:!0}).map(J);return t&&(i=i.filter(t)),v(e,n,i)}function U(e,n){return e.all(`SELECT
27
+ gs.id,
28
+ gs.symbol,
29
+ der.document_id,
30
+ der.start_line,
31
+ der.end_line,
32
+ d.relative_path,
33
+ gs.display_name,
34
+ gs.kind,
35
+ gs.documentation,
36
+ gs.enclosing_symbol
37
+ FROM global_symbols gs
38
+ JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
39
+ JOIN documents d ON der.document_id = d.id
40
+ WHERE d.relative_path = ?
41
+ ${e.symbolNoiseFor("gs")}
42
+ ORDER BY der.start_line, der.end_line`,n)}function q(e,n){return e.all(`SELECT
43
+ gs.id,
44
+ gs.symbol,
45
+ c.document_id,
46
+ MIN(c.start_line) AS start_line,
47
+ MAX(c.end_line) AS end_line,
48
+ d.relative_path,
49
+ gs.display_name,
50
+ gs.kind,
51
+ gs.documentation,
52
+ gs.enclosing_symbol
53
+ FROM global_symbols gs
54
+ JOIN mentions m ON m.symbol_id = gs.id
55
+ JOIN chunks c ON m.chunk_id = c.id
56
+ JOIN documents d ON c.document_id = d.id
57
+ WHERE d.relative_path = ?
58
+ AND m.role = 1
59
+ ${e.symbolNoiseFor("gs")}
60
+ GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
61
+ ORDER BY start_line, end_line`,n)}function J(e){return{symbolId:e.id,symbol:e.symbol,documentId:e.document_id,startLine:e.start_line,endLine:e.end_line,relativePath:e.relative_path,leaf:E(e.symbol),parentTypeName:m(e.symbol),isFunctionLike:M(e.symbol),isTypeLike:p(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function Ee(e,n={}){return X(e,n.scope)}function X(e,n){return _(e,{scope:n,includeIgnored:!1}).flatMap(t=>x(e,t)).filter(t=>!e.isIgnored(t.relativePath))}function Me(e,n){return _(e,{scope:n,includeIgnored:!1}).flatMap(t=>z(e,t)).filter(t=>!e.isIgnored(t.relativePath))}function Oe(e,n){let t=T(Z(e,n.scope,n.sqlPrefilter)),i=T(V(e,n.scope,n.sqlPrefilter)),o=new Set([...t.keys(),...i.keys()]),r=[];for(let s of[...o].sort()){if(e.isIgnored(s))continue;let l=L(t.get(s)??[],i.get(s)??[],{sort:!0}).filter(a=>n.symbolMatches(a.symbol));l.length!==0&&r.push(...v(e,s,l.map(J)))}return r}function Z(e,n,t){let i=n?"AND d.relative_path LIKE ?":"",o=t?`AND ${H("gs",t)}`:"",r=n?[`%${n}%`]:[];return e.all(`SELECT
62
+ gs.id,
63
+ gs.symbol,
64
+ der.document_id,
65
+ der.start_line,
66
+ der.end_line,
67
+ d.relative_path,
68
+ gs.display_name,
69
+ gs.kind,
70
+ gs.documentation,
71
+ gs.enclosing_symbol
72
+ FROM global_symbols gs
73
+ JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
74
+ JOIN documents d ON der.document_id = d.id
75
+ WHERE 1 = 1
76
+ ${e.pathExclusionsFor("d")}
77
+ ${i}
78
+ ${o}
79
+ ${e.symbolNoiseFor("gs")}
80
+ ORDER BY d.relative_path, der.start_line, der.end_line`,...r)}function V(e,n,t){let i=n?"AND d.relative_path LIKE ?":"",o=t?`AND ${H("gs",t)}`:"",r=n?[`%${n}%`]:[];return e.all(`SELECT
81
+ gs.id,
82
+ gs.symbol,
83
+ c.document_id,
84
+ MIN(c.start_line) AS start_line,
85
+ MAX(c.end_line) AS end_line,
86
+ d.relative_path,
87
+ gs.display_name,
88
+ gs.kind,
89
+ gs.documentation,
90
+ gs.enclosing_symbol
91
+ FROM global_symbols gs
92
+ JOIN mentions m ON m.symbol_id = gs.id
93
+ JOIN chunks c ON m.chunk_id = c.id
94
+ JOIN documents d ON c.document_id = d.id
95
+ WHERE m.role = 1
96
+ ${e.pathExclusionsFor("d")}
97
+ ${i}
98
+ ${o}
99
+ ${e.symbolNoiseFor("gs")}
100
+ GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
101
+ ORDER BY d.relative_path, start_line, end_line`,...r)}function ee(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function H(e,n){return n==="callable"?ee(e):ne(e)}function ne(e){return`${e}.symbol LIKE '%.'`}function T(e){let n=new Map;for(let t of e){let i=n.get(t.relative_path);i?i.push(t):n.set(t.relative_path,[t])}return n}function ke(e,n,t={}){if(n.length===0)return[];let i=n.flatMap(o=>x(e,o)).filter(o=>!e.isIgnored(o.relativePath));return t.onlyDocumented&&(i=i.filter(o=>o.documentation!==null&&o.documentation!=="")),t.sort&&(i=i.sort((o,r)=>o.relativePath.localeCompare(r.relativePath)||o.startLine-r.startLine||o.endLine-r.endLine)),i.map(o=>({startLine:o.startLine,endLine:o.endLine,symbol:o.symbol,shortName:F(o.symbol),signature:$(C(o.documentation)),relativePath:o.relativePath,enclosingSymbol:o.enclosingSymbol}))}function te(e){let n=new Map,t=e.map((i,o)=>({definition:i,index:o,span:i.endLine-i.startLine})).sort((i,o)=>i.span-o.span||i.index-o.index);for(let{definition:i}of t)for(let o=i.startLine;o<=i.endLine;o+=1)n.has(o)||n.set(o,i);return n}function we(e,n){let t=A.get(e);return t||(t=te(e),A.set(e,t)),t.get(n)??null}function $e(e,n){let t=x(e,n.relative_path).find(i=>i.symbolId===n.id);return t?{symbolId:t.symbolId,symbol:t.symbol,documentId:t.documentId,startLine:t.startLine,endLine:t.endLine,relativePath:t.relativePath}:{symbolId:n.id,symbol:n.symbol,documentId:n.document_id,startLine:n.start_line,endLine:n.end_line,relativePath:n.relative_path}}function v(e,n,t){let i=f(e,n),o=R(e,n);return o?ae(t,o,i):i?ie(t,i):t}function ie(e,n){let t=n.split(/\r?\n/),i=oe(e,t),o=re(e,i),r=se(o,t);return le(e,r)}function oe(e,n){let t=e.some(o=>y(o.symbol))?me(n):null,i=new Map;for(let o of e)i.set(o.symbolId,de(n,t,o));return i}function re(e,n){return e.filter(t=>y(t.symbol)).map(t=>({definition:t,startLine:n.get(t.symbolId)??t.startLine})).sort((t,i)=>t.startLine-i.startLine||t.definition.startLine-i.definition.startLine||t.definition.symbol.localeCompare(i.definition.symbol))}function se(e,n){let t=new Map;for(let i=0;i<e.length;i+=1){let o=e[i],r=e[i+1],s=r?Math.max(o.startLine,r.startLine-1):n.length-1;t.set(o.definition.symbolId,{startLine:o.startLine,endLine:ue(n,o.definition,o.startLine,s)})}return t}function le(e,n){return e.map(t=>{let i=n.get(t.symbolId);return i?{...t,startLine:i.startLine,endLine:i.endLine}:t})}function ae(e,n,t=null){let i=new Map;for(let o of n){let r=i.get(o.name);r?r.push(o):i.set(o.name,[o])}return e.map(o=>{if(!ce(o)||!o.leaf)return Q(o,t);let r=i.get(o.leaf);if(!r||r.length===0)return Q(o,t);let s=r[0],l=Math.abs(s.startLine-o.startLine);for(let a=1;a<r.length;a+=1){let c=r[a],d=Math.abs(c.startLine-o.startLine);d<l&&(s=c,l=d)}return{...o,startLine:s.startLine,endLine:s.endLine}})}function ce(e){return y(e.symbol)?!0:p(e.symbol)==="term"&&m(e.symbol)===null}function Q(e,n){if(!n||!e.leaf||p(e.symbol)!=="term"||m(e.symbol)!==null)return e;let t=e.leaf.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${t}\\b`),r=n.split(/\r?\n/).findIndex(s=>i.test(s));return r>=0?{...e,startLine:r,endLine:r}:e}function de(e,n,t){if(!y(t.symbol))return t.startLine;let i=Math.max(0,Math.min(t.startLine,e.length-1));if(!n)return i;let o=n.get(t.leaf);if(!o||o.length===0)return i;let r=null;for(let s of o){let l=Math.abs(s-t.startLine);(!r||l<r.distance)&&(r={line:s,distance:l})}return r?.line??i}function me(e){let n=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,t=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,i=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,o=/\b([A-Za-z_$][\w$]*)\s*\(/g,r=new Map,s=(l,a)=>{let c=r.get(l);if(!c){r.set(l,[a]);return}c[c.length-1]!==a&&c.push(a)};for(let l=0;l<e.length;l+=1){let a=e[l]??"";for(let d of a.matchAll(n))d[1]&&s(d[1],l);for(let d of a.matchAll(t))d[1]&&s(d[1],l);let c=a.match(i);c?.[1]&&s(c[1],l);for(let d of a.matchAll(o))d[1]&&s(d[1],l)}return r}function ue(e,n,t,i){let o=Math.max(t,Math.min(e.length-1,i)),r=Math.max(t,Math.min(o,n.endLine)),s=0,l=0,a=!1;for(let c=t;c<=o;c+=1){let d=fe(e[c]??"");for(let u of d)u==="{"?(s+=1,a=!0):u==="}"?s=Math.max(0,s-1):u==="("?l+=1:u===")"&&(l=Math.max(0,l-1));if(a&&s===0||!a&&l===0&&c>=r)return c}return r}function fe(e){let n="",t=null,i=!1;for(let o=0;o<e.length;o+=1){let r=e[o],s=e[o+1];if(!t&&r==="/"&&s==="/"){n+=" ".repeat(e.length-o);break}if(t){if(i){i=!1,n+=" ";continue}if(r==="\\"){i=!0,n+=" ";continue}r===t&&(t=null),n+=" ";continue}if(r==='"'||r==="'"||r==="`"){t=r,n+=" ";continue}n+=r}return n}function y(e){return e.includes("().")}function Ce(e){let n=N(e);if("kind"in n)return[];let t=[];for(let i=n.descriptors.length-2;i>=0;i-=1){let o=n.descriptors[i];o?.suffix==="type"&&o.name&&t.push(o.name)}return t}export{pe as a,ye as b,$ as c,C as d,L as e,x as f,Ee as g,X as h,Me as i,Oe as j,ke as k,te as l,we as m,$e as n,Ce as o};
102
+ //# sourceMappingURL=chunk-2KHTSEIL.js.map
@@ -0,0 +1,2 @@
1
+ function o(e){let f=[];if(e.filePattern){let l=e.profiles.find(r=>r.file.includes(e.filePattern));if(!l)return[];for(let r of e.profiles){if(r.file===l.file||e.focusFiles&&!e.focusFiles.has(l.file)&&!e.focusFiles.has(r.file))continue;let i=e.compare(l,r);i&&f.push(i)}}else{if(e.focusFiles?.size===0)return[];let l=e.focusFiles?e.profiles.map((i,n)=>e.focusFiles.has(i.file)?n:-1).filter(i=>i>=0):[],r=typeof e.overrunFactor=="number"&&Number.isFinite(e.limit)?e.limit*e.overrunFactor:Number.POSITIVE_INFINITY;for(let i=0;i<e.profiles.length;i+=1){let n=e.profiles[i];if(e.focusFiles&&!e.focusFiles.has(n.file))for(let s of l){if(s<=i)continue;let t=e.compare(n,e.profiles[s]);t&&f.push(t)}else for(let s=i+1;s<e.profiles.length;s+=1){let t=e.compare(n,e.profiles[s]);t&&f.push(t)}if(f.length>r)break}}return f.sort(e.sort??((l,r)=>r.similarity-l.similarity)),f.slice(0,e.limit)}export{o as a};
2
+ //# sourceMappingURL=chunk-3VD3JMK2.js.map
@@ -1,4 +1,4 @@
1
- import{a as g}from"./chunk-LGX2Y4BA.js";import{c as u}from"./chunk-RSKOYTSY.js";import{a as p}from"./chunk-T633QLYF.js";import{b as a}from"./chunk-RY7CAOJF.js";import{c as l,d as c,h as f}from"./chunk-JM72FNGA.js";import{a as d}from"./chunk-64MNV6AB.js";function J(e,s,t={}){return I(e,s,t)?.map(r=>({symbol:r.symbol,shortName:r.shortName,fromFile:r.fromFile}))??[]}function P(e,s){let t=N(e,s);return t.length>0?t:E(e,s)}function v(e,s,t={}){return I(e,s,t)?.filter(r=>!r.used).map(r=>({symbol:r.symbol,shortName:r.shortName,importedIn:r.importer}))??[]}function N(e,s){return e.all(`SELECT DISTINCT gs.symbol, d.relative_path AS importer
1
+ import{a as g}from"./chunk-7B6LP46R.js";import{c as u}from"./chunk-OLTESY4K.js";import{a as p}from"./chunk-TK7O5ER5.js";import{b as a}from"./chunk-P5RYBRIO.js";import{c as l,d as c,h as f}from"./chunk-JM72FNGA.js";import{a as d}from"./chunk-64MNV6AB.js";function J(e,s,t={}){return I(e,s,t)?.map(r=>({symbol:r.symbol,shortName:r.shortName,fromFile:r.fromFile}))??[]}function P(e,s){let t=N(e,s);return t.length>0?t:E(e,s)}function v(e,s,t={}){return I(e,s,t)?.filter(r=>!r.used).map(r=>({symbol:r.symbol,shortName:r.shortName,importedIn:r.importer}))??[]}function N(e,s){return e.all(`SELECT DISTINCT gs.symbol, d.relative_path AS importer
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
@@ -32,4 +32,4 @@ import{a as g}from"./chunk-LGX2Y4BA.js";import{c as u}from"./chunk-RSKOYTSY.js";
32
32
  WHERE imp_d.relative_path = ?
33
33
  AND m.role = 2
34
34
  ORDER BY def_d.relative_path, gs.symbol`,s).filter(m=>!e.isIgnored(m.importer));if(o.length>0){let m=t.semantic===!1?[]:u(e,s);return o.map(i=>({symbol:i.symbol,shortName:l(i.symbol),fromFile:i.from_file??"(external)",importer:i.importer,used:i.used!==0||m.some(n=>n.isUsed&&n.sourcePath===i.from_file)}))}return null}function F(e,s){let t=u(e,s);return t.length>0?t.map(r=>{let o=h(r.importedName,r.localName,r.kind);return{symbol:o,shortName:o,fromFile:r.sourcePath??"(external)",importer:s,used:r.kind==="side-effect"?!0:r.isUsed}}):null}function O(e,s){return a(e,s).map(t=>{let r=h(t.importedName,t.localName,t.kind),o=t.kind==="side-effect"?!0:t.used;return{symbol:r,shortName:r,fromFile:t.sourcePath??"(external)",importer:s,used:o}})}function h(e,s,t){return t==="namespace"&&e==="*"&&s?`* as ${s}`:t==="default"&&s?`default as ${s}`:t==="side-effect"?"(side effect import)":s&&s!==e?`${e} as ${s}`:e}function b(e){return e.replace(/\\/g,"/")}function R(e){return/\.(?:c|h|cc|cpp|cxx|hpp|hh|hxx)$/i.test(e)}export{J as a,P as b,v as c};
35
- //# sourceMappingURL=chunk-MEKSFV6H.js.map
35
+ //# sourceMappingURL=chunk-4UZO3XCV.js.map
@@ -1,4 +1,4 @@
1
- import{b as m}from"./chunk-LGX2Y4BA.js";import{i as o}from"./chunk-X3BJUFSN.js";function h(t,l){let s=m(t,l);if(s.length===0)return{files:[],symbols:[],dependsOn:[],dependedOnBy:[]};let d=s.map(()=>"?").join(", "),i=t.all(`SELECT relative_path FROM documents
1
+ import{b as m}from"./chunk-7B6LP46R.js";import{k as o}from"./chunk-2KHTSEIL.js";function h(t,l){let s=m(t,l);if(s.length===0)return{files:[],symbols:[],dependsOn:[],dependedOnBy:[]};let d=s.map(()=>"?").join(", "),i=t.all(`SELECT relative_path FROM documents
2
2
  WHERE relative_path IN (${d})
3
3
  ORDER BY relative_path`,...s).map(e=>e.relative_path).filter(e=>!t.isIgnored(e)),n=o(t,i,{onlyDocumented:!0,sort:!0}).map(({relativePath:e,...c})=>c),a=t.all(`SELECT DISTINCT d2.relative_path
4
4
  FROM mentions m
@@ -32,4 +32,4 @@ import{b as m}from"./chunk-LGX2Y4BA.js";import{i as o}from"./chunk-X3BJUFSN.js";
32
32
  WHERE d2.relative_path IN (${d})
33
33
  AND d1.relative_path NOT IN (${d})
34
34
  ORDER BY d1.relative_path`,...s,...s).map(e=>e.relative_path).filter(e=>!t.isIgnored(e));return{files:i,symbols:n,dependsOn:a,dependedOnBy:r}}export{h as a};
35
- //# sourceMappingURL=chunk-BJWNO6BU.js.map
35
+ //# sourceMappingURL=chunk-54KGX7EX.js.map
@@ -0,0 +1,8 @@
1
+ import{g as H,j as O}from"./chunk-CW5YFOCP.js";import{d as D}from"./chunk-YWOOQ4FF.js";import{b as _,d as T,h as E,i as L}from"./chunk-NOJAM5ZV.js";import{a as w}from"./chunk-5OST6GYB.js";import{c as C,d as F}from"./chunk-JM72FNGA.js";var V=5;function re(e,t={}){let{base:a="HEAD",minContainment:o=.7,minCallees:r=3,minSiteCoverage:n=.4,maxHelpers:c=Number.POSITIVE_INFINITY,limit:m=20,scanLimit:g}=t,f=t.semantic!==!1,s=t.diffPlan??T(e,{base:a}),l={available:s.note!==_,base:a,changedFiles:s.changedFiles,helpersChecked:0,skipped:[],findings:[]};if(!l.available||s.changedFiles.length===0)return l;let x=new w(e),k=new Set(s.changedFiles),$=new Map(s.renamedFiles.map(i=>[i.to,i.from])),z=t.baseContentAt??E(e.config.projectRoot,a,L(s)),h=X(x,k,$,z);if(h.length===0)return l;let R=h.slice(0,c);h.length>c&&(l.note=`helper scoring capped at ${c} of ${h.length} new symbols`);let j=x.calleeMap(R,{semantic:f}),q=R.map(i=>({def:i,callees:O((j.get(i.symbolId)??[]).map(p=>p.symbol))})),M,B=()=>(M??=H(e,{minCallees:Math.min(3,r),scanLimit:g,semantic:f}),M);for(let{def:i,callees:p}of q){let d=C(i.symbol);if(p.size<r){l.skipped.push({helperShortName:d,helperFile:i.relativePath,reason:`fewer than ${r} meaningful callees \u2014 too small to score`});continue}let P=B(),N=W(p,P);if(N===0){l.skipped.push({helperShortName:d,helperFile:i.relativePath,reason:"helper callee pattern is all project-wide infrastructure \u2014 too generic to score"});continue}let b=Y(e,i.symbolId);if(b.length===0){l.skipped.push({helperShortName:d,helperFile:i.relativePath,reason:"no references yet \u2014 covered by the new-dead check"});continue}l.helpersChecked+=1;let I=G({candidateIndex:P,changed:k,helperCallees:p,helperFile:i.relativePath,helperSymbol:i.symbol,minContainment:o,minSiteCoverage:n,migratedFiles:b});I.length!==0&&(I.sort((u,S)=>A(S.migrationScope)-A(u.migrationScope)||S.containment-u.containment||S.siteCoverage-u.siteCoverage||u.file.localeCompare(S.file)),l.findings.push({helperSymbol:i.symbol,helperShortName:d,helperFile:i.relativePath,helperShape:"specific-callee-cluster",helperCalleeCount:p.size,specificHelperCalleeCount:N,migratedFiles:b.sort(),leftovers:I.slice(0,V)}))}return l.findings.sort((i,p)=>(p.leftovers[0]?.containment??0)-(i.leftovers[0]?.containment??0)||i.helperFile.localeCompare(p.helperFile)),l.findings=l.findings.slice(0,m),l}function G(e){let t=[],a=J(e.helperSymbol,e.helperFile,e.migratedFiles),o=new Set;for(let r of e.helperCallees)for(let n of e.candidateIndex.candidateIndexesByCallee.get(r)??[])o.add(n);for(let r of o){let n=e.candidateIndex.corpus[r];if(n.symbol===e.helperSymbol||e.changed.has(n.file)||n.callees.has(e.helperSymbol))continue;let c=D(e.helperCallees,n.callees);if(c<e.minContainment)continue;let m=[...e.helperCallees].filter(s=>n.callees.has(s)),g=n.callees.size===0?0:m.length/n.callees.size;if(g<e.minSiteCoverage||!m.some(s=>(e.candidateIndex.docFreq.get(s)??0)<=e.candidateIndex.ubiquityThreshold))continue;let f=K(a,n.symbol,n.file);t.push({symbol:n.symbol,shortName:C(n.symbol),file:n.file,...f,containment:c,siteCoverage:g,uniqueSiteCalleeCount:Math.max(0,n.callees.size-m.length),sharedCallees:m.map(C).sort()})}return t}function A(e){return e==="same-scope"?2:e==="unknown"?1:0}function J(e,t,a){let o=new Set([...y(t),...v(F(e))]);for(let r of a)for(let n of y(r))o.add(n);return o}function K(e,t,a){let o=new Set([...y(a),...v(F(t))]);if(e.size===0||o.size===0)return{migrationScope:"unknown",migrationScopeReasons:["insufficient path/name tokens to infer migration scope"]};let r=[...o].filter(n=>e.has(n)).sort();return r.length>0?{migrationScope:"same-scope",migrationScopeReasons:[`shares migration-scope token(s): ${r.slice(0,5).join(", ")}`]}:{migrationScope:"possible-subtype",migrationScopeReasons:["no path/name tokens shared with the helper or already migrated files"]}}var U=new Set(["app","apps","common","component","components","helper","helpers","index","lib","package","packages","page","pages","route","routes","service","services","shared","spec","src","test","tests","util","utils"]);function y(e){return v(e.replace(/\.[^.]+$/,""))}function v(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(t=>t.length>1&&!U.has(t))}function W(e,t){let a=0;for(let o of e)(t.docFreq.get(o)??0)<=t.ubiquityThreshold&&(a+=1);return a}function X(e,t,a,o){return e.productionCallableDefinitions({files:[...t],requireFunctionLikeSymbol:!0}).filter(r=>{if(!t.has(r.relativePath))return!1;let n=a.get(r.relativePath)??r.relativePath,c=o(n);return c===null||!new RegExp(`\\b${Z(r.leaf)}\\b`).test(c)})}function Y(e,t){return e.all(`SELECT DISTINCT ref_d.relative_path
2
+ FROM mentions m
3
+ JOIN chunks c ON m.chunk_id = c.id
4
+ JOIN documents ref_d ON c.document_id = ref_d.id
5
+ WHERE m.symbol_id = ?
6
+ AND m.role != 1
7
+ ${e.pathExclusionsFor("ref_d")}`,t).map(o=>o.relative_path)}function Z(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}export{re as a};
8
+ //# sourceMappingURL=chunk-5GOLFJEO.js.map
@@ -0,0 +1,2 @@
1
+ import{b as R,f as B,g as j}from"./chunk-C5CTSJ6X.js";import{a as F}from"./chunk-BGBBVSH4.js";import{b as J,c as Q,d as U}from"./chunk-RNM6LMCF.js";import{c as z}from"./chunk-JCLDUKT6.js";import{a as H,j as W,k as Y,m as M,n as _}from"./chunk-KDFONWTW.js";import{a as A}from"./chunk-VUKC6F77.js";import{f as h,h as V,i as G,j as O}from"./chunk-2KHTSEIL.js";import{f as C,g as q,i as E,j as K}from"./chunk-JM72FNGA.js";import{a as P,f as g}from"./chunk-72KY2ZFO.js";import{a as S,b as N}from"./chunk-HF25DFSC.js";import{a as k,d as y}from"./chunk-DS6QEB3G.js";import{c as w}from"./chunk-A536TEU4.js";import{a as T}from"./chunk-64MNV6AB.js";function X(t,e,i){let o=e.identifierResolution==="strict"?M:_,s=e.candidateNames?W(e.candidateNames):null;for(let n of e.paths)if(!(!S(n)&&!(e.includeVueSfc&&N(n)))&&!t.isIgnored(n)&&!e.skipPath?.(n))try{if(s&&!Y(k(t,n),s))continue;let d=(a,c,p,b)=>{if(e.candidateNames&&!e.candidateNames.has(a))return;let D=e.resolveTargets?e.resolveTargets({sourceFile:n,name:a,kind:c,defaultTargets:b}):b();for(let I of D)i({sourceFile:n,name:a,target:I,occurrences:p,kind:c})},m=H(t,n);for(let[a,c]of m)d(a,"identifier",c.length,()=>o(t,n,a));for(let a of g(t,n,{includeCrossLanguageDispatchNames:e.includeCrossLanguageDispatchNames,includeRustAttributeNames:e.includeRustAttributeNames})){let c=a.kind==="cross-language-dispatch"?()=>M(t,n,a.name):()=>o(t,n,a.name);d(a.name,a.kind,a.occurrences,c)}}finally{e.afterPath?.(n)}}function Z(t,e={}){let{scope:i,files:o,minLoc:s=1,maxLoc:n=Number.POSITIVE_INFINITY,excludeSymbol:f,excludeEntrySurfaces:d=!1,excludeTypesFiles:m=!1,excludeRootedSymbols:a=!1,requireFunctionLikeSymbol:c=!1,requireCallableSymbol:p=!1,excludeRustTraitImplMembers:b=!1,includeSuppressed:D=!1,sortByLocDesc:I=!1}=e,x=[],ee=ie(t,{scope:i,files:o,requireCallableSymbol:p}),L=new Map,v=new Map,ne=r=>{let l=L.get(r);if(l!==void 0)return l;let u=B(t,r);return L.set(r,u),u},te=r=>{let l=v.get(r);if(l!==void 0)return l;let u=R(r);return v.set(r,u),u};for(let r of ee){let l=r.relativePath;if(t.isIgnored(l)||d&&ne(l)||!re(r,{requireFunctionLikeSymbol:c,requireCallableSymbol:p})||f!==void 0&&r.symbol===f)continue;let u=F(r);u<s||u>n||m&&oe(l)||a&&j(t,r.symbol,l)||b&&E(r.symbol)||te(l)!=="test"&&(K(r.symbol)||!D&&y(t,l,r.startLine)||x.push(r))}return I?x.sort((r,l)=>F(l)-F(r)):x}function ie(t,e){return e.files!==void 0?[...new Set(e.files.map(o=>o.replace(/\\/g,"/")))].sort().filter(o=>!e.scope||o.includes(e.scope)).flatMap(o=>h(t,o)):e.requireCallableSymbol?O(t,{scope:e.scope,symbolMatches:C,sqlPrefilter:"callable"}):G(t,e.scope)}function re(t,e){return e.requireCallableSymbol?C(t.symbol):e.requireFunctionLikeSymbol?q(t.symbol):t.isFunctionLike}function oe(t){return(t.split("/").pop()??"").includes("types")}var $=class{constructor(e){this.db=e}db;scopedDefinitions(e){return V(this.db,e)}definitionsForFile(e){return h(this.db,e)}productionCallableDefinitions(e={}){return Z(this.db,e)}calleeMap(e,i={}){return z(this.db,e,i)}crossFileCallerMap(e,i={}){return J(this.db,e,i)}sourceFallbackCallerFiles(e){return Q(this.db,e)}callerFileMap(e,i={}){return U(this.db,e,i)}frameworkReferencedSymbolIds(e){let i=new Map;for(let s of e){if(!s.leaf)continue;let n=i.get(s.leaf)??[];n.push(s.symbolId),i.set(s.leaf,n)}let o=new Set;for(let s of T(this.db,{includeIgnored:!1}))if(S(s)==="rust")for(let{name:n}of g(this.db,s,{includeRustAttributeNames:!0}))for(let f of i.get(n)??[])o.add(f);return o}symbolsWithNonSelfCallees(e,i={}){if(e.length===0)return new Set;let o=new Map(e.map(n=>[n.symbolId,n.symbol])),s=this.calleeMap(e,i);return new Set([...s.entries()].filter(([n,f])=>{let d=o.get(n);return f.some(m=>m.symbol!==d)}).map(([n])=>n))}fileDependencyGraph(e){return A(this.db,e)}fileKind(e){return R(e)}hasSuppressionComment(e){return y(this.db,e.relativePath,e.startLine)}sourceFiles(){return w(this.db)}scanSourceReferences(e,i){X(this.db,e,i)}callableSignature(e){let i=P(this.db,e.relativePath)?.callables.find(o=>o.startLine===e.startLine&&o.endLine===e.endLine);return i?{paramCount:i.paramCount}:null}};export{$ as a};
2
+ //# sourceMappingURL=chunk-5OST6GYB.js.map
@@ -1,2 +1,2 @@
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
1
+ import{a as b,f as S}from"./chunk-BSN22NRK.js";import{b as d}from"./chunk-C5CTSJ6X.js";import{a as h}from"./chunk-VUKC6F77.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-65AU3HFZ.js.map
@@ -1,2 +1,2 @@
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
+ import{a}from"./chunk-5OST6GYB.js";import{a as i}from"./chunk-TK7O5ER5.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-6GN7FXCH.js.map
@@ -1,7 +1,7 @@
1
- import{a as u}from"./chunk-XPOZO76D.js";import{a as b}from"./chunk-T633QLYF.js";import{u as l}from"./chunk-3LQFMQPY.js";import{c as m}from"./chunk-JM72FNGA.js";import{readFileSync as p}from"fs";import{join as h}from"path";function O(e,n,r={}){let t=b(e,n);if(!t)return null;let c=new u(e),o=P(d(e,t.relativePath,t.startLine,t.endLine),y(e,t.relativePath)),s=t.endLine-t.startLine+1,a=c.calleeMap([t],{additive:!0,semantic:r.semantic}).get(t.symbolId)??[],f=new Set(a.map(g=>g.symbol));return{symbol:t.symbol,shortName:m(t.symbol),relativePath:t.relativePath,startLine:t.startLine,endLine:t.endLine,loc:s,branches:o,cyclomaticEstimate:o+1,calleeCount:f.size,fanIn:S(e,t.symbolId),fanOut:L(a,t.relativePath)}}function y(e,n){return e.get("SELECT language FROM documents WHERE relative_path = ?",n)?.language??"unknown"}function d(e,n,r,t){try{return p(h(e.config.projectRoot,n),"utf-8").split(`
1
+ import{a as u}from"./chunk-5OST6GYB.js";import{a as b}from"./chunk-TK7O5ER5.js";import{u as l}from"./chunk-OBGRLXWF.js";import{c as m}from"./chunk-JM72FNGA.js";import{readFileSync as p}from"fs";import{join as h}from"path";function O(e,n,r={}){let t=b(e,n);if(!t)return null;let c=new u(e),o=P(d(e,t.relativePath,t.startLine,t.endLine),y(e,t.relativePath)),s=t.endLine-t.startLine+1,a=c.calleeMap([t],{additive:!0,semantic:r.semantic}).get(t.symbolId)??[],f=new Set(a.map(g=>g.symbol));return{symbol:t.symbol,shortName:m(t.symbol),relativePath:t.relativePath,startLine:t.startLine,endLine:t.endLine,loc:s,branches:o,cyclomaticEstimate:o+1,calleeCount:f.size,fanIn:S(e,t.symbolId),fanOut:L(a,t.relativePath)}}function y(e,n){return e.get("SELECT language FROM documents WHERE relative_path = ?",n)?.language??"unknown"}function d(e,n,r,t){try{return p(h(e.config.projectRoot,n),"utf-8").split(`
2
2
  `).slice(r,t+1).join(`
3
3
  `)}catch{return""}}function S(e,n){return e.get(`SELECT COUNT(DISTINCT c.document_id) AS c
4
4
  FROM mentions m
5
5
  JOIN chunks c ON m.chunk_id = c.id
6
6
  WHERE m.symbol_id = ? AND m.role != 1`,n)?.c??0}function L(e,n){return new Set(e.filter(r=>r.file!==n).map(r=>r.symbol)).size}function P(e,n){let r=l(e),t=0,c=[/\bif\b/g,/\belse\s+if\b/g,/\belse\b/g,/\bfor\b/g,/\bwhile\b/g,/\bswitch\b/g,/\bcase\b/g,/\bcatch\b/g,/\?\s*[^?]/g,/&&/g,/\|\|/g];for(let o of c){let s=r.match(o);s&&(t+=s.length)}if(n==="python"){let o=[/\belif\b/g,/\bexcept\b/g,/\bfinally\b/g];for(let s of o){let i=r.match(s);i&&(t+=i.length)}}else if(n==="rust"){let o=[/\bmatch\b/g,/=>/g,/\bloop\b/g];for(let s of o){let i=r.match(s);i&&(t+=i.length)}}else if(n==="ruby"){let o=[/\belsif\b/g,/\bunless\b/g,/\brescue\b/g,/\bwhen\b/g];for(let s of o){let i=r.match(s);i&&(t+=i.length)}}else if(n==="go"){let o=[/\bselect\b/g,/\bdefer\b/g];for(let s of o){let i=r.match(s);i&&(t+=i.length)}}return t}export{O as a};
7
- //# sourceMappingURL=chunk-RHKMQNFI.js.map
7
+ //# sourceMappingURL=chunk-6IR2AOBM.js.map
@@ -1,4 +1,4 @@
1
- import{g as p}from"./chunk-X3BJUFSN.js";import{a as f,c as g,e as l}from"./chunk-JM72FNGA.js";import{a as c}from"./chunk-64MNV6AB.js";var m={0:"UnspecifiedKind",1:"AbstractMethod",2:"Accessor",3:"Array",4:"Assertion",5:"AssociatedType",6:"Attribute",7:"Axiom",8:"Boolean",9:"Class",10:"Constant",11:"Constructor",12:"Contract",13:"DataFamily",14:"DefinitionMacro",15:"Delegate",16:"Enum",17:"EnumMember",18:"Error",19:"Event",20:"Fact",21:"Field",22:"File",23:"Function",24:"Getter",25:"Grammar",26:"Instance",27:"Interface",28:"Key",29:"Lang",30:"Lemma",31:"Library",32:"Macro",33:"Method",34:"MethodAlias",35:"MethodReceiver",36:"MethodSpecification",37:"Message",38:"Modifier",39:"Module",40:"Namespace",41:"Null",42:"Number",43:"Object",44:"Operator",45:"Package",46:"PackageObject",47:"Parameter",48:"ParameterLabel",49:"Pattern",50:"Predicate",51:"Property",52:"Protocol",53:"ProtocolMethod",54:"PureVirtualMethod",55:"Quasiquoter",56:"SelfParameter",57:"Setter",58:"Signature",59:"SingletonClass",60:"SingletonMethod",61:"StaticDataMember",62:"StaticEvent",63:"StaticField",64:"StaticMethod",65:"StaticProperty",66:"StaticVariable",67:"String",68:"Struct",69:"Subscript",70:"Tactic",71:"Theorem",72:"ThisParameter",73:"Trait",74:"TraitMethod",75:"Type",76:"TypeAlias",77:"TypeClass",78:"TypeClassMethod",79:"TypeFamily",80:"TypeParameter",81:"Union",82:"Value",83:"Variable"},d=new Map;for(let[e,r]of Object.entries(m))d.set(r.toLowerCase(),Number(e));var b=500;function _(e){let r=parseInt(e,10);if(!isNaN(r))return r;let t=e.toLowerCase(),n=d.get(t);if(n!==void 0)return n;for(let[i,o]of d)if(i.includes(t))return o;return null}function O(e,r,t={}){let{scope:n,limit:i=100}=t,o=_(r);return o===null?[]:h(e,n).map(s=>({row:s,resolvedKind:N(s)})).filter(s=>s.resolvedKind===o).slice(0,i).map(({row:s,resolvedKind:u})=>({symbol:s.symbol,shortName:g(s.symbol),kind:u,kindName:m[u]??"Unknown",relativePath:s.relative_path,startLine:s.start_line,endLine:s.end_line}))}function P(e,r={}){let t=k(e,r.scope);for(let n of S(e,r.scope)){let i=N(n);i===null||i===0||t.set(i,(t.get(i)??0)+1)}return[...t.entries()].sort((n,i)=>i[1]-n[1]||n[0]-i[0]).map(([n,i])=>({kind:n,kindName:m[n]??"Unknown",count:i}))}function h(e,r){return p(e,{scope:r}).map(K)}function k(e,r){let t=new Map;for(let n of y(c(e,{scope:r,includeIgnored:!1}))){let i=n.map(()=>"?").join(", "),o=e.all(`SELECT gs.kind AS kind, COUNT(*) AS count
1
+ import{g as p}from"./chunk-2KHTSEIL.js";import{a as f,c as g,e as l}from"./chunk-JM72FNGA.js";import{a as c}from"./chunk-64MNV6AB.js";var m={0:"UnspecifiedKind",1:"AbstractMethod",2:"Accessor",3:"Array",4:"Assertion",5:"AssociatedType",6:"Attribute",7:"Axiom",8:"Boolean",9:"Class",10:"Constant",11:"Constructor",12:"Contract",13:"DataFamily",14:"DefinitionMacro",15:"Delegate",16:"Enum",17:"EnumMember",18:"Error",19:"Event",20:"Fact",21:"Field",22:"File",23:"Function",24:"Getter",25:"Grammar",26:"Instance",27:"Interface",28:"Key",29:"Lang",30:"Lemma",31:"Library",32:"Macro",33:"Method",34:"MethodAlias",35:"MethodReceiver",36:"MethodSpecification",37:"Message",38:"Modifier",39:"Module",40:"Namespace",41:"Null",42:"Number",43:"Object",44:"Operator",45:"Package",46:"PackageObject",47:"Parameter",48:"ParameterLabel",49:"Pattern",50:"Predicate",51:"Property",52:"Protocol",53:"ProtocolMethod",54:"PureVirtualMethod",55:"Quasiquoter",56:"SelfParameter",57:"Setter",58:"Signature",59:"SingletonClass",60:"SingletonMethod",61:"StaticDataMember",62:"StaticEvent",63:"StaticField",64:"StaticMethod",65:"StaticProperty",66:"StaticVariable",67:"String",68:"Struct",69:"Subscript",70:"Tactic",71:"Theorem",72:"ThisParameter",73:"Trait",74:"TraitMethod",75:"Type",76:"TypeAlias",77:"TypeClass",78:"TypeClassMethod",79:"TypeFamily",80:"TypeParameter",81:"Union",82:"Value",83:"Variable"},d=new Map;for(let[e,r]of Object.entries(m))d.set(r.toLowerCase(),Number(e));var b=500;function _(e){let r=parseInt(e,10);if(!isNaN(r))return r;let t=e.toLowerCase(),n=d.get(t);if(n!==void 0)return n;for(let[i,o]of d)if(i.includes(t))return o;return null}function O(e,r,t={}){let{scope:n,limit:i=100}=t,o=_(r);return o===null?[]:h(e,n).map(s=>({row:s,resolvedKind:N(s)})).filter(s=>s.resolvedKind===o).slice(0,i).map(({row:s,resolvedKind:u})=>({symbol:s.symbol,shortName:g(s.symbol),kind:u,kindName:m[u]??"Unknown",relativePath:s.relative_path,startLine:s.start_line,endLine:s.end_line}))}function P(e,r={}){let t=k(e,r.scope);for(let n of S(e,r.scope)){let i=N(n);i===null||i===0||t.set(i,(t.get(i)??0)+1)}return[...t.entries()].sort((n,i)=>i[1]-n[1]||n[0]-i[0]).map(([n,i])=>({kind:n,kindName:m[n]??"Unknown",count:i}))}function h(e,r){return p(e,{scope:r}).map(K)}function k(e,r){let t=new Map;for(let n of y(c(e,{scope:r,includeIgnored:!1}))){let i=n.map(()=>"?").join(", "),o=e.all(`SELECT gs.kind AS kind, COUNT(*) AS count
2
2
  FROM defn_enclosing_ranges der
3
3
  JOIN global_symbols gs ON der.symbol_id = gs.id
4
4
  JOIN documents d ON der.document_id = d.id
@@ -20,4 +20,4 @@ import{g as p}from"./chunk-X3BJUFSN.js";import{a as f,c as g,e as l}from"./chunk
20
20
  ${e.symbolNoiseFor("gs")}
21
21
  AND d.relative_path IN (${i})
22
22
  ORDER BY d.relative_path, der.start_line, der.end_line, gs.symbol`,...n))}return t}function y(e){let r=[];for(let t=0;t<e.length;t+=b)r.push(e.slice(t,t+b));return r}function K(e){return{symbol:e.symbol,kind:e.kind,documentation:e.documentation,enclosing_symbol:e.enclosingSymbol,relative_path:e.relativePath,start_line:e.startLine,end_line:e.endLine}}function N(e){return e.kind!==null&&e.kind!==0?M(e.kind,e.symbol,e.documentation):R(e.symbol,e.documentation,e.enclosing_symbol)}function M(e,r,t){let n=(t??"").toLowerCase();if(l(r)==="type"){if(n.includes("type "))return 76;if(n.includes("interface "))return 27;if(n.includes("struct "))return 68;if(n.includes("trait "))return 73;if(n.includes("class "))return 9}return e}function R(e,r,t){let n=f(e);if("kind"in n)return null;let i=n.descriptors,o=i[i.length-2]??null,a=l(e),s=(r??"").toLowerCase();return a==="type"?s.includes("type ")?76:s.includes("interface ")?27:s.includes("struct ")?68:s.includes("trait ")?73:(s.includes("class "),9):a==="method"?o?.suffix==="type"?33:23:a==="namespace"?39:a!=="term"?null:s.includes("async def ")||s.includes("def ")?23:(t?l(t):o?.suffix??null)==="type"?21:83}export{O as a,P as b};
23
- //# sourceMappingURL=chunk-6EO3E3IP.js.map
23
+ //# sourceMappingURL=chunk-6JRV4MY2.js.map
@@ -1,4 +1,4 @@
1
- import{a as s}from"./chunk-LGX2Y4BA.js";function m(e,d){let i=s(e,d);return i?e.all(`SELECT DISTINCT d2.relative_path
1
+ import{a as s}from"./chunk-7B6LP46R.js";function m(e,d){let i=s(e,d);return i?e.all(`SELECT DISTINCT d2.relative_path
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN documents d1 ON c.document_id = d1.id
@@ -30,4 +30,4 @@ import{a as s}from"./chunk-LGX2Y4BA.js";function m(e,d){let i=s(e,d);return i?e.
30
30
  WHERE d2.relative_path = ?
31
31
  AND d1.relative_path != ?
32
32
  ORDER BY d1.relative_path`,i,i).filter(t=>!e.isIgnored(t.relative_path)).map(t=>({relativePath:t.relative_path})):[]}export{m as a,o as b};
33
- //# sourceMappingURL=chunk-5SMUKUV5.js.map
33
+ //# sourceMappingURL=chunk-6LJHXREW.js.map
@@ -0,0 +1,18 @@
1
+ import{a as y}from"./chunk-5OST6GYB.js";import{b}from"./chunk-C5CTSJ6X.js";import{c as D}from"./chunk-OLTESY4K.js";import{b as p}from"./chunk-P5RYBRIO.js";import{a as h}from"./chunk-64MNV6AB.js";import g from"path";function d(e){let n=e.replace(/\\/g,"/").split("/").filter(Boolean);return n.length<=1?"(root)":n.length>=3&&["src","lib","app","server","client"].includes(n[0])?`${n[0]}/${n[1]}`:n[0]}function S(e,t){if(e===t)return"ok";let n=m(e),i=m(t);return n&&i?k(n,i)?"ok":"violation":x(e,t)}function v(e,t){let n=m(d(e)),i=m(d(t));return!!n&&!!i}function m(e){return/^src\/([^/]+)$/.exec(e)?.[1]??null}function k(e,t){return t==="domain"?!0:e==="domain"?!1:{analysis:new Set(["domain","source","storage","symbols"]),core:new Set(["analysis","domain","resolution","source","storage","symbols"]),"language-parsers":new Set(["domain","resolution","source","storage"]),queries:new Set(["analysis","core","domain","language-parsers","resolution","semantic","source","storage","symbols"]),reindex:new Set(["domain","language-parsers","resolution","runtime","semantic","source","storage","symbols"]),resolution:new Set(["domain","source","storage","symbols"]),runtime:new Set(["domain","queries","reindex","resolution","semantic","source","storage","symbols"]),semantic:new Set(["domain","resolution","storage","symbols"]),source:new Set(["domain","storage"]),storage:new Set(["domain","source"]),symbols:new Set(["analysis","domain","language-parsers","resolution","semantic","source","storage"])}[e]?.has(t)??!1}function x(e,t){if(t==="shared")return"ok";let n={app:new Set(["core","shared","ui"]),core:new Set(["shared"]),infra:new Set(["core","shared"]),ui:new Set(["core","shared"])};return n[e]?n[e].has(t)?"ok":"violation":null}function Z(e,t){let{scope:n,minDeviation:i=5}=t??{},r=t?.semantic!==!1,s=t?.includePatternDeviations!==!1,o=new y(e).fileDependencyGraph(n);return M([...$(e,o,{scope:n,semantic:r}),...P(o),...s?_(o,i):[]])}function $(e,t,n){let i=N(e,n.scope),r=[],s=new Set;for(let[o,a]of t){if(l(o))continue;let u=i.get(o)??new Set;for(let f of a)l(f)||u.has(f)||I(e,o,f,n)||(r.push({file:o,dep:f}),s.add(o))}s.size>0&&A(e,i,{paths:[...s]});let c=[];for(let{file:o,dep:a}of r)(i.get(o)??new Set).has(a)||c.push({file:o,kind:"unused-import",description:`Depends on ${a} but references none of its symbols`,dep:a,actionTier:"direct",evidenceReasons:[`dependency edge exists from ${o} to ${a}`,"no semantic, source, type-only, side-effect, or Vue-template usage survived the conservative skip gates"],recommendation:"Remove the unused import or dependency edge after running the project checks."});return c}function I(e,t,n,i){return V(e,t,n)||q(e,t,n)||j(n)||U(e,t,n)||J(n)?!0:i.semantic&&B(e,t,n)}function P(e){let t=[],n=L(e);for(let[i,r]of e){if(l(i))continue;let s=d(i);for(let c of r){if(l(c))continue;let o=d(c);if(s===o)continue;let a=S(s,o),u=a?"explicit":"inferred";if((a??n.get(`${s}->${o}`))==="violation"){let R=u==="explicit"?"direct":"signal";t.push({file:i,kind:"layer-violation",description:`Imports from ${o}/ (${c}) \u2014 may cross architectural boundary`,dep:c,detail:`${s}/ should not depend on ${o}/`,actionTier:R,policyBasis:u,evidenceReasons:[`dependency edge exists from ${i} to ${c}`,u==="explicit"?`explicit layer policy rejects ${s}/ -> ${o}/`:`rare cross-layer edge ${s}/ -> ${o}/ is inferred as a violation`],recommendation:u==="explicit"?"Move the dependency behind an allowed layer boundary or document a policy change.":"Review whether this is a real boundary break or an intentional exception before moving code."})}}}return t}function _(e,t){let n=[];for(let[i,r]of O(e)){let s=r.filter(o=>!l(o));if(s.length<t)continue;let c=E(e,s);for(let o of s)for(let a of e.get(o)??[])l(a)||(c.get(a)??0)===1&&g.dirname(a)!==i&&g.dirname(a)!==g.dirname(i)&&(v(o,a)||n.push({file:o,kind:"pattern-deviation",description:`Only file in ${i}/ that depends on ${a}`,dep:a,actionTier:"signal",evidenceReasons:[`${s.length} sibling file(s) in ${i}/ were compared`,`${o} is the only non-skipped sibling depending on ${a}`],recommendation:"Review sibling ownership before changing this import; unique dependency shape can be intentional specialization."}))}return n}function M(e){return{results:e,unusedImports:e.filter(t=>t.kind==="unused-import").length,layerViolations:e.filter(t=>t.kind==="layer-violation").length,patternDeviations:e.filter(t=>t.kind==="pattern-deviation").length}}function O(e){let t=new Map;for(let n of e.keys()){let i=g.dirname(n),r=t.get(i);r||(r=[],t.set(i,r)),r.push(n)}return t}function E(e,t){let n=new Map;for(let i of t)for(let r of e.get(i)??[])l(r)||n.set(r,(n.get(r)??0)+1);return n}function N(e,t){let n=new Map;return F(e,n,t),n}function F(e,t,n){for(let i of T(e,n))w(e,t,i.from_file,i.to_file)}function T(e,t){let n=t?`AND d1.relative_path LIKE '%${t}%'`:"";return e.all(`SELECT DISTINCT d1.relative_path AS from_file, d2.relative_path AS to_file
2
+ FROM mentions m
3
+ JOIN chunks c ON m.chunk_id = c.id
4
+ JOIN documents d1 ON c.document_id = d1.id
5
+ JOIN global_symbols gs ON m.symbol_id = gs.id
6
+ JOIN (
7
+ SELECT m2.symbol_id, c2.document_id
8
+ FROM mentions m2
9
+ JOIN chunks c2 ON m2.chunk_id = c2.id
10
+ WHERE m2.role = 1
11
+ GROUP BY m2.symbol_id
12
+ ) sym_def ON sym_def.symbol_id = gs.id
13
+ JOIN documents d2 ON sym_def.document_id = d2.id
14
+ WHERE d1.id != d2.id
15
+ AND m.role != 1
16
+ ${e.pathExclusionsFor("d1","d2")}
17
+ ${n}`)}function A(e,t,n={}){new y(e).scanSourceReferences({paths:n.paths??h(e,{includeIgnored:!1}),includeRustAttributeNames:!0,identifierResolution:"permissive"},r=>{r.target.relativePath!==r.sourceFile&&(e.isIgnored(r.target.relativePath)||w(e,t,r.sourceFile,r.target.relativePath))})}function w(e,t,n,i){if(e.isIgnored(n)||e.isIgnored(i))return;let r=t.get(n);r||(r=new Set,t.set(n,r)),r.add(i)}function L(e){let t=new Map;for(let[i,r]of e){if(l(i))continue;let s=d(i);for(let c of r){if(l(c))continue;let o=d(c);if(s===o||S(s,o))continue;let a=`${s}->${o}`;t.set(a,(t.get(a)??0)+1)}}let n=new Map;for(let[i,r]of t)n.set(i,r<=2?"violation":"ok");return n}function j(e){return e.includes("types")||e.endsWith(".d.ts")}function B(e,t,n){let i=D(e,t).filter(r=>r.sourcePath===n);return i.length>0&&i.some(r=>r.isUsed)}function V(e,t,n){let i=p(e,t).filter(r=>r.sourcePath===n);return i.length>0&&i.some(r=>r.used)}function q(e,t,n){let i=p(e,t).filter(r=>r.sourcePath===n);return i.length>0&&i.every(r=>r.isTypeOnly===!0)}function J(e){return e.endsWith(".vue")}function U(e,t,n){let i=p(e,t).filter(r=>r.sourcePath===n);return i.length===0?!1:i.every(r=>r.kind==="side-effect"||r.kind==="namespace"&&r.usedMembers.length===0&&!r.used)}function l(e){let t=b(e);return!!(t==="entry"||t==="barrel"||t==="test"||t==="worker"||z(g.basename(e)))}function z(e){return!!(e==="index.ts"||e==="index.js"||e==="cli.ts"||e==="main.ts"||e==="main.rs"||e.includes("worker.")||e.includes("postinstall.")||e==="health.ts"||e==="health.js")}export{Z as a};
18
+ //# sourceMappingURL=chunk-6QSOCTZT.js.map
@@ -1,2 +1,2 @@
1
- import{a as C}from"./chunk-YZA6PPZL.js";import{a as m,b as d,c as _,d as g}from"./chunk-BTCASU5J.js";import{a as x,i as N,j as S}from"./chunk-DS6QEB3G.js";import{b as h,d as L,e as A}from"./chunk-C6ROZBJA.js";import{f as b}from"./chunk-7S5E7KWT.js";var k=new Set(["identifier","type_identifier","field_identifier"]),v=new Set(["identifier"]),B=new Set(["identifier","property_identifier","type_identifier","shorthand_property_identifier","shorthand_property_identifier_pattern"]),V=new Set(["rust","python"]),j=/\{([^{}]*)\}/g,O=/\b([A-Za-z_][\w]*)\b/g;function F(e,t){return P(t).has(e.type)}function R(e,t){return V.has(t)&&e.type==="string_content"}function y(e){let t=0;for(let n of e.values()){let c=n[n.length-1];c!==void 0&&c>t&&(t=c)}let r=new Array(t+1);for(let n=0;n<=t;n+=1)r[n]=new Set;for(let[n,c]of e)for(let u of c)r[u].add(n);return r}function P(e){return e==="rust"?k:e==="python"?v:B}function w(e,t){let r=e.startPosition.row;for(let n of e.text.matchAll(j)){let c=n[1]??"";for(let u of c.matchAll(O))u[1]&&t(u[1],r)}}var H=[/\bdefault\s*=\s*"([^"]+)"/g,/\bwith\s*=\s*"([^"]+)"/g,/\bserialize_with\s*=\s*"([^"]+)"/g,/\bdeserialize_with\s*=\s*"([^"]+)"/g,/\bskip_serializing_if\s*=\s*"([^"]+)"/g,/\bgetter\s*=\s*"([^"]+)"/g,/\brename_all_with\s*=\s*"([^"]+)"/g,/\bschema_with\s*=\s*"([^"]+)"/g],z=/^#!?\[\s*serde\s*\(/,U=/^#!?\[\s*schemars\s*\(/,G=/^#!?\[\s*validate\s*\(/,K=new Set(["invoke","invokeTauriCommand","listen","once","emit","subscribe","dispatch","sendCommand","callRust"]);function T(e,t,r){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript"||e.type!=="call_expression")return;let n=e.childForFieldName("function")??e.namedChild(0);if(!n)return;let c=S(n);if(!c||!K.has(c))return;let u=e.namedChildren.find(i=>i.type==="arguments");if(!u)return;let a=u.namedChild(0);if(!a||a.type!=="string")return;let o=a.namedChildren.find(i=>i.type==="string_fragment");o&&r.add(o.text)}function D(e,t){let r=z.test(e),n=U.test(e),c=G.test(e);if(!(!r&&!n&&!c))for(let u of H){u.lastIndex=0;let a;for(;(a=u.exec(e))!==null;){let o=a[1],i=o.split("::").pop()??o;i==="is_none"&&/\bOption\b/.test(o)||i==="is_empty"&&/\b(String|Vec|HashMap|BTreeMap|HashSet|BTreeSet)\b/.test(o)||i&&t.add(i)}}}function E(e,t){let r=new Map,n=(a,o)=>{if(a===o)return;let i=r.get(a);i||(i=new Set,r.set(a,i)),i.add(o)},c=t==="python"?new Set(["identifier"]):new Set(["type_identifier"]),u=(a,o)=>{let i=s=>{c.has(s.type)&&s.text!==o&&n(s.text,o);for(let l of s.children)i(l)};for(let s of a.children)i(s)};if(t==="rust")for(let a of e.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let o=a.namedChildren.find(s=>s.type==="type_identifier")?.text;if(!o)continue;let i=a.namedChildren.find(s=>s.type==="field_declaration_list"||s.type==="enum_variant_list"||s.type==="ordered_field_declaration_list");i&&u(i,o),a.type==="type_item"&&u(a,o)}else if(t==="python")for(let a of e.rootNode.descendantsOfType("class_definition")){let o=a.namedChildren.find(s=>s.type==="identifier")?.text;if(!o)continue;let i=a.namedChildren.find(s=>s.type==="block");if(i)for(let s of i.descendantsOfType("type"))for(let l of s.descendantsOfType("identifier"))l.text!==o&&n(l.text,o)}else for(let a of e.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let o=a.namedChildren.find(i=>i.type==="type_identifier")?.text;o&&u(a,o)}return r}var Y=b("source-facts",{clearGroups:["whole-project","source-file"]});function f(e,t){let r=x(e,t);if(!r)return null;let n=J(t,r);return n?Y.get(e,t,r,()=>Q(e,t,n,r)):null}function J(e,t){return d(e)?_(t)?.language??null:m(e)}function Q(e,t,r,n){let c=h(e,t,n),u=L(e,"source-facts",t,c);if(u){let i=q(u);if(i&&i.language===r)return i}let a=g(e,t);if(!a)return null;let o=$(a,r);return A(e,"source-facts",t,c,Z(o)),o}function Z(e){let t={language:e.language,callables:e.callables,callSites:e.callSites,typeContainerMap:[...e.typeContainerMap.entries()].map(([r,n])=>[r,[...n]]),identifierLineMap:[...e.identifierLineMap.entries()],rustAttrReferencedNames:[...e.rustAttrReferencedNames],crossLanguageDispatchNames:[...e.crossLanguageDispatchNames]};return JSON.stringify(t)}function q(e){try{let t=JSON.parse(e),r=new Map(t.identifierLineMap);return{language:t.language,callables:t.callables,callSites:t.callSites,typeContainerMap:new Map(t.typeContainerMap.map(([n,c])=>[n,new Set(c)])),identifierLineMap:r,identifiersByLine:y(r),fileIdentifiers:new Set(r.keys()),rustAttrReferencedNames:new Set(t.rustAttrReferencedNames),crossLanguageDispatchNames:new Set(t.crossLanguageDispatchNames)}}catch{return null}}function W(e,t,r,n){let c=f(e,t);return c?X(c,r,n)?.isLiteralPassthrough??!0:!0}function X(e,t,r){return e.callables.find(n=>n.startLine===t&&n.endLine===r)??null}function $(e,t){let r=[],n=[],c=new Set,u=new Set,a=new Map,o=(s,l)=>{let p=a.get(s);if(!p){a.set(s,[l]);return}p[p.length-1]!==l&&p.push(l)},i=s=>{let l=C(s,t);l&&r.push(l);let p=N(s,t);p&&n.push(p),T(s,t,u),t==="rust"&&(s.type==="attribute_item"||s.type==="inner_attribute_item")&&D(s.text,c),F(s,t)&&o(s.text,s.startPosition.row),R(s,t)&&w(s,o);for(let M of s.children)i(M)};return i(e.rootNode),{language:t,callables:r,callSites:n,typeContainerMap:E(e,t),identifierLineMap:a,identifiersByLine:y(a),fileIdentifiers:new Set(a.keys()),rustAttrReferencedNames:c,crossLanguageDispatchNames:u}}var I=new Set(["rust","typescript","tsx","javascript","python"]);function ee(e,t){let r=f(e,t);return!r||!I.has(r.language)?null:r.callables.map(n=>({name:n.name,startLine:n.startLine,endLine:n.endLine}))}function te(e,t){let r=f(e,t);return!r||!I.has(r.language)?null:r.callSites}function re(e,t){return f(e,t)?.typeContainerMap??new Map}function ne(e,t,r={}){let n=f(e,t);if(!n)return[];let c=[];if(r.includeCrossLanguageDispatchNames)for(let u of n.crossLanguageDispatchNames)c.push({name:u,kind:"cross-language-dispatch",occurrences:1});if(r.includeRustAttributeNames&&n.language==="rust")for(let u of n.rustAttrReferencedNames)c.push({name:u,kind:"rust-attribute",occurrences:1});return c}export{f as a,W as b,ee as c,te as d,re as e,ne as f};
2
- //# sourceMappingURL=chunk-6TDOT7B3.js.map
1
+ import{a as C}from"./chunk-YZA6PPZL.js";import{a as m,b as d,c as _,d as g}from"./chunk-HF25DFSC.js";import{a as x,i as N,j as S}from"./chunk-DS6QEB3G.js";import{b as h,d as L,e as A}from"./chunk-XUGQU7PM.js";import{f as b}from"./chunk-7S5E7KWT.js";var k=new Set(["identifier","type_identifier","field_identifier"]),v=new Set(["identifier"]),B=new Set(["identifier","property_identifier","type_identifier","shorthand_property_identifier","shorthand_property_identifier_pattern"]),V=new Set(["rust","python"]),j=/\{([^{}]*)\}/g,O=/\b([A-Za-z_][\w]*)\b/g;function F(e,t){return P(t).has(e.type)}function R(e,t){return V.has(t)&&e.type==="string_content"}function y(e){let t=0;for(let n of e.values()){let c=n[n.length-1];c!==void 0&&c>t&&(t=c)}let r=new Array(t+1);for(let n=0;n<=t;n+=1)r[n]=new Set;for(let[n,c]of e)for(let u of c)r[u].add(n);return r}function P(e){return e==="rust"?k:e==="python"?v:B}function w(e,t){let r=e.startPosition.row;for(let n of e.text.matchAll(j)){let c=n[1]??"";for(let u of c.matchAll(O))u[1]&&t(u[1],r)}}var H=[/\bdefault\s*=\s*"([^"]+)"/g,/\bwith\s*=\s*"([^"]+)"/g,/\bserialize_with\s*=\s*"([^"]+)"/g,/\bdeserialize_with\s*=\s*"([^"]+)"/g,/\bskip_serializing_if\s*=\s*"([^"]+)"/g,/\bgetter\s*=\s*"([^"]+)"/g,/\brename_all_with\s*=\s*"([^"]+)"/g,/\bschema_with\s*=\s*"([^"]+)"/g],z=/^#!?\[\s*serde\s*\(/,U=/^#!?\[\s*schemars\s*\(/,G=/^#!?\[\s*validate\s*\(/,K=new Set(["invoke","invokeTauriCommand","listen","once","emit","subscribe","dispatch","sendCommand","callRust"]);function T(e,t,r){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript"||e.type!=="call_expression")return;let n=e.childForFieldName("function")??e.namedChild(0);if(!n)return;let c=S(n);if(!c||!K.has(c))return;let u=e.namedChildren.find(i=>i.type==="arguments");if(!u)return;let a=u.namedChild(0);if(!a||a.type!=="string")return;let o=a.namedChildren.find(i=>i.type==="string_fragment");o&&r.add(o.text)}function D(e,t){let r=z.test(e),n=U.test(e),c=G.test(e);if(!(!r&&!n&&!c))for(let u of H){u.lastIndex=0;let a;for(;(a=u.exec(e))!==null;){let o=a[1],i=o.split("::").pop()??o;i==="is_none"&&/\bOption\b/.test(o)||i==="is_empty"&&/\b(String|Vec|HashMap|BTreeMap|HashSet|BTreeSet)\b/.test(o)||i&&t.add(i)}}}function E(e,t){let r=new Map,n=(a,o)=>{if(a===o)return;let i=r.get(a);i||(i=new Set,r.set(a,i)),i.add(o)},c=t==="python"?new Set(["identifier"]):new Set(["type_identifier"]),u=(a,o)=>{let i=s=>{c.has(s.type)&&s.text!==o&&n(s.text,o);for(let l of s.children)i(l)};for(let s of a.children)i(s)};if(t==="rust")for(let a of e.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let o=a.namedChildren.find(s=>s.type==="type_identifier")?.text;if(!o)continue;let i=a.namedChildren.find(s=>s.type==="field_declaration_list"||s.type==="enum_variant_list"||s.type==="ordered_field_declaration_list");i&&u(i,o),a.type==="type_item"&&u(a,o)}else if(t==="python")for(let a of e.rootNode.descendantsOfType("class_definition")){let o=a.namedChildren.find(s=>s.type==="identifier")?.text;if(!o)continue;let i=a.namedChildren.find(s=>s.type==="block");if(i)for(let s of i.descendantsOfType("type"))for(let l of s.descendantsOfType("identifier"))l.text!==o&&n(l.text,o)}else for(let a of e.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let o=a.namedChildren.find(i=>i.type==="type_identifier")?.text;o&&u(a,o)}return r}var Y=b("source-facts",{clearGroups:["whole-project","source-file"]});function f(e,t){let r=x(e,t);if(!r)return null;let n=J(t,r);return n?Y.get(e,t,r,()=>Q(e,t,n,r)):null}function J(e,t){return d(e)?_(t)?.language??null:m(e)}function Q(e,t,r,n){let c=h(e,t,n),u=L(e,"source-facts",t,c);if(u){let i=q(u);if(i&&i.language===r)return i}let a=g(e,t);if(!a)return null;let o=$(a,r);return A(e,"source-facts",t,c,Z(o)),o}function Z(e){let t={language:e.language,callables:e.callables,callSites:e.callSites,typeContainerMap:[...e.typeContainerMap.entries()].map(([r,n])=>[r,[...n]]),identifierLineMap:[...e.identifierLineMap.entries()],rustAttrReferencedNames:[...e.rustAttrReferencedNames],crossLanguageDispatchNames:[...e.crossLanguageDispatchNames]};return JSON.stringify(t)}function q(e){try{let t=JSON.parse(e),r=new Map(t.identifierLineMap);return{language:t.language,callables:t.callables,callSites:t.callSites,typeContainerMap:new Map(t.typeContainerMap.map(([n,c])=>[n,new Set(c)])),identifierLineMap:r,identifiersByLine:y(r),fileIdentifiers:new Set(r.keys()),rustAttrReferencedNames:new Set(t.rustAttrReferencedNames),crossLanguageDispatchNames:new Set(t.crossLanguageDispatchNames)}}catch{return null}}function W(e,t,r,n){let c=f(e,t);return c?X(c,r,n)?.isLiteralPassthrough??!0:!0}function X(e,t,r){return e.callables.find(n=>n.startLine===t&&n.endLine===r)??null}function $(e,t){let r=[],n=[],c=new Set,u=new Set,a=new Map,o=(s,l)=>{let p=a.get(s);if(!p){a.set(s,[l]);return}p[p.length-1]!==l&&p.push(l)},i=s=>{let l=C(s,t);l&&r.push(l);let p=N(s,t);p&&n.push(p),T(s,t,u),t==="rust"&&(s.type==="attribute_item"||s.type==="inner_attribute_item")&&D(s.text,c),F(s,t)&&o(s.text,s.startPosition.row),R(s,t)&&w(s,o);for(let M of s.children)i(M)};return i(e.rootNode),{language:t,callables:r,callSites:n,typeContainerMap:E(e,t),identifierLineMap:a,identifiersByLine:y(a),fileIdentifiers:new Set(a.keys()),rustAttrReferencedNames:c,crossLanguageDispatchNames:u}}var I=new Set(["rust","typescript","tsx","javascript","python"]);function ee(e,t){let r=f(e,t);return!r||!I.has(r.language)?null:r.callables.map(n=>({name:n.name,startLine:n.startLine,endLine:n.endLine}))}function te(e,t){let r=f(e,t);return!r||!I.has(r.language)?null:r.callSites}function re(e,t){return f(e,t)?.typeContainerMap??new Map}function ne(e,t,r={}){let n=f(e,t);if(!n)return[];let c=[];if(r.includeCrossLanguageDispatchNames)for(let u of n.crossLanguageDispatchNames)c.push({name:u,kind:"cross-language-dispatch",occurrences:1});if(r.includeRustAttributeNames&&n.language==="rust")for(let u of n.rustAttrReferencedNames)c.push({name:u,kind:"rust-attribute",occurrences:1});return c}export{f as a,W as b,ee as c,te as d,re as e,ne as f};
2
+ //# sourceMappingURL=chunk-72KY2ZFO.js.map
@@ -1,2 +1,2 @@
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
1
+ import{a as u}from"./chunk-TK7O5ER5.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-7B6LP46R.js.map
@@ -0,0 +1,2 @@
1
+ import{b as r}from"./chunk-7B6LP46R.js";import{k as e}from"./chunk-2KHTSEIL.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-7GO4EQF5.js.map
@@ -0,0 +1,7 @@
1
+ import{a as C,b as E}from"./chunk-GRJY65YT.js";import{a as _}from"./chunk-LM5SHAN4.js";import{a as P}from"./chunk-PFOCOG57.js";import{a as w}from"./chunk-B75HZHUP.js";import{a as k}from"./chunk-5OST6GYB.js";import{a as v}from"./chunk-BGBBVSH4.js";import{e as I}from"./chunk-RNM6LMCF.js";import{a as y}from"./chunk-KDFONWTW.js";import{b as L}from"./chunk-TQ5W2H3S.js";import{m as x}from"./chunk-2KHTSEIL.js";import{c as d,d as D,j as S}from"./chunk-JM72FNGA.js";import{basename as f,extname as g}from"path";function ne(t,n){let{scope:e,maxLoc:i=15,limit:a=30,scanLimit:o}=n??{},r=new k(t),l=B(r.fileDependencyGraph(e));return P({candidates:()=>T(r,e,i),orderCandidates:w,scanLimit:o,prepare:s=>({callerFileMap:W(t,r,s,{semantic:n?.semantic!==!1}),reverseFanIn:l}),evaluate:(s,c)=>R(t,r,s,c),orderResults:(s,c)=>c.callerFanIn-s.callerFanIn||c.loc-s.loc,limit:a})}function W(t,n,e,i){let a=C(n,e,{semantic:!1,sourceFallback:!1}),o=[];i.semantic&&L("wrapper.semantic-candidates",()=>{o=e.filter(u=>F(t,n,u,a).length<=1)},()=>({symbols:e.length,semanticCandidates:o.length}));let r=o.length===0?new Map:C(n,o,{semantic:!0,sourceFallback:!1}),l=r.size===0?a:I(a,r),s=new Map(e.map(u=>[u.symbolId,u])),c=new Map;for(let u of e){let b=F(t,n,u,l);if(b.length>1||(c.set(u.symbolId,u),b.length!==1))continue;let h=b[0],M=N(t,u.symbolId,h);if(!M)continue;let p=j(n,t,h,u.symbol,M);p?.isFunctionLike&&s.has(p.symbolId)&&c.set(p.symbolId,s.get(p.symbolId))}let m=[...c.values()];return m.length===0?l:I(l,n.sourceFallbackCallerFiles(m))}function R(t,n,e,i){let a=F(t,n,e,i.callerFileMap);if(a.length!==1)return null;let o=a[0],r=N(t,e.symbolId,o);if(!r)return null;let l=j(n,t,o,e.symbol,r);if(l&&S(l.symbol))return null;let{fanIn:s,source:c}=A(i.callerFileMap,i.reverseFanIn,o,l);if(c==="function"?s<=3:s<=5)return null;let m=q(t,e,o,l);return{symbol:e.symbol,shortName:d(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:v(e),singleCaller:l?.symbol??"",singleCallerShort:l?.isFunctionLike?d(l.symbol):f(o),callerFanIn:s,actionTier:m.length>0?"signal":"direct",boundaryEvidence:m}}function T(t,n,e){return t.productionCallableDefinitions({scope:n,minLoc:2,maxLoc:e,requireFunctionLikeSymbol:!0,excludeRootedSymbols:!0})}function F(t,n,e,i){let a=f(e.relativePath,g(e.relativePath)),o=[...i.get(e.symbolId)??[]].filter(r=>r!==e.relativePath).filter(r=>f(r,g(r))!==a).filter(r=>{let l=n.fileKind(r);return l!=="barrel"&&l!=="entry"&&l!=="test"});return E(t,e,o).realConsumers}function N(t,n,e){return t.get(`SELECT c.start_line, c.end_line
2
+ FROM mentions m
3
+ JOIN chunks c ON m.chunk_id = c.id
4
+ JOIN documents d ON c.document_id = d.id
5
+ WHERE m.symbol_id = ? AND m.role != 1 AND d.relative_path = ?
6
+ LIMIT 1`,n,e)}function j(t,n,e,i,a){let o=t.definitionsForFile(e),r=O(n,e,i,a.start_line,a.end_line);return x(o,r)}function A(t,n,e,i){if(i?.isFunctionLike){let a=[...t.get(i.symbolId)??[]].filter(o=>o!==i.relativePath);if(a.length>0)return{fanIn:a.length,source:"function"}}return{fanIn:J(n,e),source:"file"}}function O(t,n,e,i,a){let o=D(e);if(!o)return i;let r=y(t,n).get(o);if(!r||r.length===0)return i;for(let l of r)if(l>=i&&l<=a)return l;return i}function B(t){let n=new Map;for(let[e,i]of t){n.has(e)||n.set(e,n.get(e)??0);for(let a of i)n.set(a,(n.get(a)??0)+1)}return n}function J(t,n){let e=t.get(n)??0;if(e>0)return e;let i=f(n,g(n)),a=0;for(let[o,r]of t)o!==n&&f(o,g(o))===i&&r>a&&(a=r);return a}function q(t,n,e,i){return _(t,n.relativePath,n.startLine,"wrapper","explicit ignore-wrapper comment",[{label:"wrapper name",value:d(n.symbol)},{label:"caller name",value:i?.symbol?d(i.symbol):f(e)},{label:"wrapper path",value:n.relativePath},{label:"caller path",value:e}])}export{ne as a};
7
+ //# sourceMappingURL=chunk-7IVSJJZU.js.map
@@ -1,2 +1,2 @@
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
+ import{c as i}from"./chunk-B75HZHUP.js";import{a as m}from"./chunk-RNM6LMCF.js";import{a}from"./chunk-JCLDUKT6.js";import{a as r}from"./chunk-TK7O5ER5.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-7TWLSZK5.js.map
@@ -1,4 +1,4 @@
1
- import{a as I,b as K,c as $}from"./chunk-VFLHKRTW.js";import{a as A}from"./chunk-PFOCOG57.js";import{a as R}from"./chunk-XPOZO76D.js";import{b as M,g as k}from"./chunk-ANIOISCE.js";import{a as b}from"./chunk-BGBBVSH4.js";import{e as S}from"./chunk-YNSVAJR6.js";import{e as F}from"./chunk-RSKOYTSY.js";import{a as P,c as w,d as p}from"./chunk-JM72FNGA.js";import{e as T}from"./chunk-6TDOT7B3.js";import{a as h}from"./chunk-DS6QEB3G.js";function de(t,e){let{scope:n,minLoc:i=3,maxLoc:s=80,limit:r=30,includeLowConfidence:o=!1,scanLimit:l}=e??{},d=e?.semantic!==!1,a=new R(t),m=a.scopedDefinitions(n),g=Q(a,n),v={high:0,medium:1,low:2};return A({candidates:()=>O(t,a,m,{minLoc:i,maxLoc:s}),orderCandidates:(u,c)=>b(c)-b(u)||u.relativePath.localeCompare(c.relativePath),scanLimit:l,prepare:u=>{let c=z(u),f=W(t,a,u,c,{semantic:d}),y=u.filter(L=>{let x=C(t,L,f,c);return x.realConsumers.length<=1&&!x.transitivelyReachable&&B(L,x.realConsumers.length,g)});return{consumerFileMap:f,singletonBackedClassIds:H(t,a,m,y,{semantic:d}),candidateIndex:c}},evaluate:(u,c)=>{if(c.singletonBackedClassIds.has(u.symbolId))return null;let f=C(t,u,c.consumerFileMap,c.candidateIndex);if(f.transitivelyReachable||f.realConsumers.length>1||f.realConsumers.length===0&&f.barrelConsumers>0||!B(f.definition,f.realConsumers.length,g))return null;let y=E(t,f);return!o&&y.confidence==="low"?null:y},orderResults:(u,c)=>v[u.confidence]-v[c.confidence]||c.loc-u.loc||u.file.localeCompare(c.file)||u.startLine-c.startLine,limit:r})}function O(t,e,n,i){return n.filter(s=>s.isTypeLike&&b(s)>=i.minLoc).filter(s=>b(s)<=i.maxLoc).filter(s=>!t.isIgnored(s.relativePath)).filter(s=>M(s.relativePath)!=="test").filter(s=>!k(t,s.symbol,s.relativePath)).filter(s=>!X(s.symbol)).filter(s=>!e.hasSuppressionComment(s))}function U(t,e,n){return I(t,e,{semantic:n.semantic,sourceFallback:n.sourceFallback})}function W(t,e,n,i,s){let r=U(e,n,{semantic:!1,sourceFallback:!1}),o=n.filter(a=>{let m=C(t,a,r,i);return m.realConsumers.length<=1&&!(m.realConsumers.length>0&&D(a.relativePath))}),l=s.semantic&&o.length>0?S(r,F(t,o)):r,d=o.filter(a=>C(t,a,l,i).realConsumers.length<=1);return S(l,e.sourceFallbackCallerFiles(d))}function z(t){let e=new Map;for(let n of t){let i=e.get(n.relativePath);i||(i=new Map,e.set(n.relativePath,i));let s=p(n.symbol);s&&i.set(s,n)}return e}function C(t,e,n,i){let r=[...n.get(e.symbolId)??new Set].filter(m=>m!==e.relativePath&&!t.isIgnored(m)),{realConsumers:o,barrelConsumers:l,importOnlyConsumers:d}=K(t,e,r),a=Y(t,e,n,i);return{definition:e,realConsumers:o,barrelConsumers:l+d,transitivelyReachable:a}}function E(t,e){let n=N(t,e.definition.relativePath,e.definition.startLine),i=D(e.definition.relativePath)?!0:ee(t,e.definition),{confidence:s,reason:r}=ne(e.realConsumers.length,n,i),o=V(e.realConsumers.length,n,i);return{symbol:e.definition.symbol,shortName:w(e.definition.symbol),file:e.definition.relativePath,startLine:e.definition.startLine,endLine:e.definition.endLine,loc:b(e.definition),consumers:e.realConsumers.length,barrelConsumers:e.barrelConsumers,kind:n,definerUsesType:i,confidence:s,reason:r,actionTier:o.actionTier,stalenessKind:o.stalenessKind,recommendation:o.recommendation}}function V(t,e,n){return t===0?{actionTier:"direct",stalenessKind:"unused-abstraction",recommendation:"Delete the abstraction or wire the missing consumer after checking public/package surfaces."}:e==="class"?{actionTier:"signal",stalenessKind:"one-to-one-class-encapsulation",recommendation:"Treat as weak signal: a one-consumer class may be intentional encapsulation, so inline only after reviewing ownership and state boundaries."}:n?{actionTier:"signal",stalenessKind:"single-consumer-abstraction",recommendation:"Review whether this single-consumer abstraction earns its name or should be folded into the owning feature."}:{actionTier:"signal",stalenessKind:"misplaced-single-consumer-type",recommendation:"Review moving or co-locating the type with its only real consumer; keep it here only if this file owns the public contract."}}function H(t,e,n,i,s){let r=_(t,Z(n),i),o=r.map(a=>a.singleton);if(r.length===0)return new Set;let l=I(e,o,{semantic:s.semantic}),d=new Set;for(let{singleton:a,classId:m}of r)G(t,a,l)&&d.add(m);return d}function Z(t){let e=new Map;for(let n of t){let i=p(n.symbol);i&&e.set(j(n.relativePath,i),n)}return e}function _(t,e,n){let i=[];for(let s of n){let r=q(t,e,s);r&&i.push({singleton:r,classId:s.symbolId})}return i}function q(t,e,n){if(N(t,n.relativePath,n.startLine)!=="class")return null;let i=p(n.symbol);if(!i)return null;let s=J(t,n.relativePath,i);return s?e.get(j(n.relativePath,s))??null:null}function G(t,e,n){let i=p(e.symbol),s=n.get(e.symbolId);return!i||!s?!1:[...s].some(r=>r!==e.relativePath&&!t.isIgnored(r)&&!$(t,r,i))}function j(t,e){return`${t}\0${e}`}function J(t,e,n){let i=h(t,e);if(!i)return null;let s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`\\bexport\\s+const\\s+([A-Za-z_$][\\w$]*)\\s*=\\s*new\\s+${s}\\s*\\(`);return i.match(r)?.[1]??null}function Q(t,e){return new Set(t.scopedDefinitions(e).filter(n=>n.isFunctionLike).map(n=>n.relativePath))}function X(t){let e=P(t);if("kind"in e)return!1;let n=e.descriptors;if(n.length<2)return!1;let i=n[n.length-1],s=n[n.length-2];return i?.suffix==="type"&&s?.suffix==="type"}function D(t){let n=(t.split("/").pop()??"").replace(/\.[^.]+$/,"");return!!(n==="types"||n.endsWith("-types")||n==="models"||n==="schema"||n==="common"||n==="protocol"||n==="proto"||n==="dto"||n==="mod"||n==="contracts"||/(^|\/)types(\/|\.)/.test(t)||/(^|\/)models?(\/|\.)/.test(t)||/(^|\/)proto(?:col)?(\/|\.)/.test(t)||/(^|\/)schema(\/|\.)/.test(t)||/(^|\/)contracts?(\/|\.)/.test(t))}function B(t,e,n){return!(D(t.relativePath)&&e>0||e===0&&n.has(t.relativePath))}function Y(t,e,n,i){let s=T(t,e.relativePath),r=p(e.symbol);if(!r)return!1;let o=s.get(r);if(!o||o.size===0)return!1;let l=i.get(e.relativePath);if(!l)return!1;for(let d of o){let a=l.get(d);if(!a)continue;let m=n.get(a.symbolId);if(m){for(let g of m)if(g!==e.relativePath&&!t.isIgnored(g))return!0}}return!1}function N(t,e,n){let i=h(t,e);if(!i)return"other";let s=i.split(`
1
+ import{a as I,b as K,c as $}from"./chunk-GRJY65YT.js";import{a as A}from"./chunk-PFOCOG57.js";import{a as R}from"./chunk-5OST6GYB.js";import{b as M,g as k}from"./chunk-C5CTSJ6X.js";import{a as b}from"./chunk-BGBBVSH4.js";import{e as S}from"./chunk-RNM6LMCF.js";import{e as F}from"./chunk-OLTESY4K.js";import{a as P,c as w,d as p}from"./chunk-JM72FNGA.js";import{e as T}from"./chunk-72KY2ZFO.js";import{a as h}from"./chunk-DS6QEB3G.js";function de(t,e){let{scope:n,minLoc:i=3,maxLoc:s=80,limit:r=30,includeLowConfidence:o=!1,scanLimit:l}=e??{},d=e?.semantic!==!1,a=new R(t),m=a.scopedDefinitions(n),g=Q(a,n),v={high:0,medium:1,low:2};return A({candidates:()=>O(t,a,m,{minLoc:i,maxLoc:s}),orderCandidates:(u,c)=>b(c)-b(u)||u.relativePath.localeCompare(c.relativePath),scanLimit:l,prepare:u=>{let c=z(u),f=W(t,a,u,c,{semantic:d}),y=u.filter(L=>{let x=C(t,L,f,c);return x.realConsumers.length<=1&&!x.transitivelyReachable&&B(L,x.realConsumers.length,g)});return{consumerFileMap:f,singletonBackedClassIds:H(t,a,m,y,{semantic:d}),candidateIndex:c}},evaluate:(u,c)=>{if(c.singletonBackedClassIds.has(u.symbolId))return null;let f=C(t,u,c.consumerFileMap,c.candidateIndex);if(f.transitivelyReachable||f.realConsumers.length>1||f.realConsumers.length===0&&f.barrelConsumers>0||!B(f.definition,f.realConsumers.length,g))return null;let y=E(t,f);return!o&&y.confidence==="low"?null:y},orderResults:(u,c)=>v[u.confidence]-v[c.confidence]||c.loc-u.loc||u.file.localeCompare(c.file)||u.startLine-c.startLine,limit:r})}function O(t,e,n,i){return n.filter(s=>s.isTypeLike&&b(s)>=i.minLoc).filter(s=>b(s)<=i.maxLoc).filter(s=>!t.isIgnored(s.relativePath)).filter(s=>M(s.relativePath)!=="test").filter(s=>!k(t,s.symbol,s.relativePath)).filter(s=>!X(s.symbol)).filter(s=>!e.hasSuppressionComment(s))}function U(t,e,n){return I(t,e,{semantic:n.semantic,sourceFallback:n.sourceFallback})}function W(t,e,n,i,s){let r=U(e,n,{semantic:!1,sourceFallback:!1}),o=n.filter(a=>{let m=C(t,a,r,i);return m.realConsumers.length<=1&&!(m.realConsumers.length>0&&D(a.relativePath))}),l=s.semantic&&o.length>0?S(r,F(t,o)):r,d=o.filter(a=>C(t,a,l,i).realConsumers.length<=1);return S(l,e.sourceFallbackCallerFiles(d))}function z(t){let e=new Map;for(let n of t){let i=e.get(n.relativePath);i||(i=new Map,e.set(n.relativePath,i));let s=p(n.symbol);s&&i.set(s,n)}return e}function C(t,e,n,i){let r=[...n.get(e.symbolId)??new Set].filter(m=>m!==e.relativePath&&!t.isIgnored(m)),{realConsumers:o,barrelConsumers:l,importOnlyConsumers:d}=K(t,e,r),a=Y(t,e,n,i);return{definition:e,realConsumers:o,barrelConsumers:l+d,transitivelyReachable:a}}function E(t,e){let n=N(t,e.definition.relativePath,e.definition.startLine),i=D(e.definition.relativePath)?!0:ee(t,e.definition),{confidence:s,reason:r}=ne(e.realConsumers.length,n,i),o=V(e.realConsumers.length,n,i);return{symbol:e.definition.symbol,shortName:w(e.definition.symbol),file:e.definition.relativePath,startLine:e.definition.startLine,endLine:e.definition.endLine,loc:b(e.definition),consumers:e.realConsumers.length,barrelConsumers:e.barrelConsumers,kind:n,definerUsesType:i,confidence:s,reason:r,actionTier:o.actionTier,stalenessKind:o.stalenessKind,recommendation:o.recommendation}}function V(t,e,n){return t===0?{actionTier:"direct",stalenessKind:"unused-abstraction",recommendation:"Delete the abstraction or wire the missing consumer after checking public/package surfaces."}:e==="class"?{actionTier:"signal",stalenessKind:"one-to-one-class-encapsulation",recommendation:"Treat as weak signal: a one-consumer class may be intentional encapsulation, so inline only after reviewing ownership and state boundaries."}:n?{actionTier:"signal",stalenessKind:"single-consumer-abstraction",recommendation:"Review whether this single-consumer abstraction earns its name or should be folded into the owning feature."}:{actionTier:"signal",stalenessKind:"misplaced-single-consumer-type",recommendation:"Review moving or co-locating the type with its only real consumer; keep it here only if this file owns the public contract."}}function H(t,e,n,i,s){let r=_(t,Z(n),i),o=r.map(a=>a.singleton);if(r.length===0)return new Set;let l=I(e,o,{semantic:s.semantic}),d=new Set;for(let{singleton:a,classId:m}of r)G(t,a,l)&&d.add(m);return d}function Z(t){let e=new Map;for(let n of t){let i=p(n.symbol);i&&e.set(j(n.relativePath,i),n)}return e}function _(t,e,n){let i=[];for(let s of n){let r=q(t,e,s);r&&i.push({singleton:r,classId:s.symbolId})}return i}function q(t,e,n){if(N(t,n.relativePath,n.startLine)!=="class")return null;let i=p(n.symbol);if(!i)return null;let s=J(t,n.relativePath,i);return s?e.get(j(n.relativePath,s))??null:null}function G(t,e,n){let i=p(e.symbol),s=n.get(e.symbolId);return!i||!s?!1:[...s].some(r=>r!==e.relativePath&&!t.isIgnored(r)&&!$(t,r,i))}function j(t,e){return`${t}\0${e}`}function J(t,e,n){let i=h(t,e);if(!i)return null;let s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`\\bexport\\s+const\\s+([A-Za-z_$][\\w$]*)\\s*=\\s*new\\s+${s}\\s*\\(`);return i.match(r)?.[1]??null}function Q(t,e){return new Set(t.scopedDefinitions(e).filter(n=>n.isFunctionLike).map(n=>n.relativePath))}function X(t){let e=P(t);if("kind"in e)return!1;let n=e.descriptors;if(n.length<2)return!1;let i=n[n.length-1],s=n[n.length-2];return i?.suffix==="type"&&s?.suffix==="type"}function D(t){let n=(t.split("/").pop()??"").replace(/\.[^.]+$/,"");return!!(n==="types"||n.endsWith("-types")||n==="models"||n==="schema"||n==="common"||n==="protocol"||n==="proto"||n==="dto"||n==="mod"||n==="contracts"||/(^|\/)types(\/|\.)/.test(t)||/(^|\/)models?(\/|\.)/.test(t)||/(^|\/)proto(?:col)?(\/|\.)/.test(t)||/(^|\/)schema(\/|\.)/.test(t)||/(^|\/)contracts?(\/|\.)/.test(t))}function B(t,e,n){return!(D(t.relativePath)&&e>0||e===0&&n.has(t.relativePath))}function Y(t,e,n,i){let s=T(t,e.relativePath),r=p(e.symbol);if(!r)return!1;let o=s.get(r);if(!o||o.size===0)return!1;let l=i.get(e.relativePath);if(!l)return!1;for(let d of o){let a=l.get(d);if(!a)continue;let m=n.get(a.symbolId);if(m){for(let g of m)if(g!==e.relativePath&&!t.isIgnored(g))return!0}}return!1}function N(t,e,n){let i=h(t,e);if(!i)return"other";let s=i.split(`
2
2
  `),r=Math.max(0,n-2),o=Math.min(s.length-1,n+2);for(let l=r;l<=o;l++){let a=(s[l]??"").replace(/^\s*\/\/.*$/g,"");if(/\b(?:export\s+)?(?:abstract\s+)?class\s+\w/.test(a))return"class";if(/\b(?:export\s+)?interface\s+\w/.test(a))return"interface";if(/\b(?:export\s+)?type\s+\w/.test(a))return"type";if(/\b(?:export\s+)?(?:const\s+)?enum\s+\w/.test(a))return"enum"}return"other"}function ee(t,e){let n=h(t,e.relativePath);if(!n)return!1;let i=p(e.symbol);if(!i)return!1;let s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`\\b${s}\\b`),o=n.split(`
3
3
  `);for(let l=0;l<o.length;l++)if(!(l>=e.startLine&&l<=e.endLine)&&r.test(o[l]??""))return!0;return!1}function ne(t,e,n){return t===0?{confidence:"high",reason:"unused \u2014 no consumers and defining file has no real usage"}:t===1&&e==="class"?{confidence:"low",reason:"1 consumer + class kind \u2014 likely 1:1 encapsulation, not over-abstraction"}:t===1&&!n?{confidence:"high",reason:"1 consumer + defining file never uses it \u2014 type belongs with its consumer"}:{confidence:"medium",reason:"1 consumer \u2014 single-use abstraction"}}export{de as a};
4
- //# sourceMappingURL=chunk-X3Z4MLVL.js.map
4
+ //# sourceMappingURL=chunk-AVWPHM2Q.js.map
@@ -1,4 +1,4 @@
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
1
+ import{a as t}from"./chunk-7B6LP46R.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-LGX2Y4BA.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-GZQID3FS.js.map
56
+ //# sourceMappingURL=chunk-BASVXNY3.js.map
@@ -1,2 +1,2 @@
1
- import{c as m}from"./chunk-B75HZHUP.js";import{a as b}from"./chunk-YNSVAJR6.js";import{a as g}from"./chunk-ZMU6IWDK.js";import{q as y}from"./chunk-AETMKBZR.js";import{a as c}from"./chunk-T633QLYF.js";import{c as r}from"./chunk-JM72FNGA.js";function v(l,t,n={}){let o=c(l,t);if(!o)return null;let a=[{file:o.relativePath,line:o.startLine}],s=y(l,o,{semantic:n.semantic}).map(e=>({file:e.file,line:e.line,enclosingSymbol:e.enclosingSymbol??"(top-level)",enclosingShort:e.enclosingSymbol?r(e.enclosingSymbol):"(top-level)"})),{producers:f,consumers:i}=S(l,o,s,{semantic:n.semantic!==!1});return{symbol:o.symbol,shortName:r(o.symbol),relativePath:o.relativePath,definitionSites:a.filter(e=>!l.isIgnored(e.file)),usageSites:s,producers:f.filter(e=>!l.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:r(e.symbol),file:e.file})),consumers:i.filter(e=>!l.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:e.symbol===e.file?"(top-level)":r(e.symbol),file:e.file}))}}function S(l,t,n,o){let a=m(g(l,t,{limit:30,semantic:o.semantic}).map(i=>({symbol:i.symbol,file:i.file}))),s=m(b(l,t,{limit:30,semantic:o.semantic})),f=s.length>0?s:m(n.map(i=>({symbol:i.enclosingSymbol==="(top-level)"?i.file:i.enclosingSymbol,file:i.file})));return{producers:a,consumers:f}}export{v as a};
2
- //# sourceMappingURL=chunk-BJG67TCR.js.map
1
+ import{c as m}from"./chunk-B75HZHUP.js";import{a as b}from"./chunk-RNM6LMCF.js";import{a as g}from"./chunk-JCLDUKT6.js";import{q as y}from"./chunk-KDFONWTW.js";import{a as c}from"./chunk-TK7O5ER5.js";import{c as r}from"./chunk-JM72FNGA.js";function v(l,t,n={}){let o=c(l,t);if(!o)return null;let a=[{file:o.relativePath,line:o.startLine}],s=y(l,o,{semantic:n.semantic}).map(e=>({file:e.file,line:e.line,enclosingSymbol:e.enclosingSymbol??"(top-level)",enclosingShort:e.enclosingSymbol?r(e.enclosingSymbol):"(top-level)"})),{producers:f,consumers:i}=S(l,o,s,{semantic:n.semantic!==!1});return{symbol:o.symbol,shortName:r(o.symbol),relativePath:o.relativePath,definitionSites:a.filter(e=>!l.isIgnored(e.file)),usageSites:s,producers:f.filter(e=>!l.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:r(e.symbol),file:e.file})),consumers:i.filter(e=>!l.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:e.symbol===e.file?"(top-level)":r(e.symbol),file:e.file}))}}function S(l,t,n,o){let a=m(g(l,t,{limit:30,semantic:o.semantic}).map(i=>({symbol:i.symbol,file:i.file}))),s=m(b(l,t,{limit:30,semantic:o.semantic})),f=s.length>0?s:m(n.map(i=>({symbol:i.enclosingSymbol==="(top-level)"?i.file:i.enclosingSymbol,file:i.file})));return{producers:a,consumers:f}}export{v as a};
2
+ //# sourceMappingURL=chunk-BFXPG2VN.js.map
@@ -0,0 +1,9 @@
1
+ import{d as _,e as E}from"./chunk-XUGQU7PM.js";import{d as H}from"./chunk-7S5E7KWT.js";import{execFileSync as O}from"child_process";var y=2e3,S=50,L=64,N=8,j=3,B=2160*60*60,I=/\b(?:fix(?:es|ed)?|bug|regression|hotfix)\b/i,v=3,G=/#\d+|\b[A-Z][A-Z0-9]+-\d+\b/g,U=/^([a-z][a-z0-9-]+)(?:\([^)]+\))?!?:/i;function T(e){let t=H(e,{clearGroups:["whole-project"]});return(n,r)=>{let i=D(n.config.projectRoot);if(!i)return null;let o=t.has(n)?t.get(n,()=>({head:"",value:null})):null;return o&&o.head===i?o.value:(t.invalidate(n),t.get(n,()=>({head:i,value:r(n.config.projectRoot,i)})).value)}}var J=T("git-commit-history");function x(e){return J(e,K)}function D(e){try{return p(e,["rev-parse","HEAD"]).trim()||null}catch{return null}}function p(e,t){return O("git",["-C",e,...t],{encoding:"utf-8",maxBuffer:64*1024*1024,stdio:["ignore","pipe","ignore"]})}function K(e,t){let n;try{n=p(e,["log","--no-merges","--name-only","-n",String(y),"--pretty=format:%x01%H%x00%ct%x00%s"])}catch{return null}return{head:t,...R(n,S)}}function V(e){return I.test(e.subject)}function de(e){let t=x(e);if(!t)return null;let n=new Map;for(let r of t.commits){let i=V(r);for(let o of r.files){let c=n.get(o)??{changes:0,fixChanges:0,lastChangedAt:0};c.changes+=1,i&&(c.fixChanges+=1),r.timestamp>c.lastChangedAt&&(c.lastChangedAt=r.timestamp),n.set(o,c)}}return n}function ge(e){let t=x(e);if(!t||t.commits.length===0)return null;let n=t.commits.map(r=>r.files.length).filter(r=>r>0).sort((r,i)=>r-i);return n.length===0?null:{medianFilesPerCommit:P(n,.5),p90FilesPerCommit:P(n,.9),commitsAnalyzed:n.length}}function P(e,t){let n=Math.min(e.length-1,Math.floor(e.length*t));return e[n]}var W=T("git-tracked-files");function fe(e){return W(e,t=>{try{let n=p(t,["ls-files"]);return new Set(n.split(`
2
+ `).map(r=>r.trim()).filter(r=>r!==""))}catch{return null}})}var X=T("git-file-adds"),k="__git__/file-adds";function he(e){return X(e,(t,n)=>Y(e,t,n))}function Y(e,t,n){let r=$(_(e,"git-file-adds",k,n));if(r)return r;let i=q(t);return i&&E(e,"git-file-adds",k,n,Z(i)),i}function Z(e){return JSON.stringify([...e.entries()])}function $(e){if(!e)return null;try{let t=JSON.parse(e);if(!Array.isArray(t))return null;let n=new Map;for(let r of t){if(!Array.isArray(r)||r.length!==2||typeof r[0]!="string")return null;let i=r[1];if(!i||typeof i.commitsAgo!="number"||!Number.isFinite(i.commitsAgo)||typeof i.addedAt!="number"||!Number.isFinite(i.addedAt))return null;n.set(r[0],{commitsAgo:i.commitsAgo,addedAt:i.addedAt})}return n}catch{return null}}function q(e){let t;try{t=p(e,["log","--no-merges","--diff-filter=A","--name-only","-n",String(y),"--pretty=format:%x01%H%x00%ct%x00%s"])}catch{return null}let n=new Map,r=-1;for(let i of t.split("")){if(i.trim()==="")continue;r+=1;let o=i.indexOf(`
3
+ `),c=o>=0?i.slice(0,o):i,[,m]=c.split("\0"),l=Number(m)||0;if(!(o<0))for(let g of i.slice(o+1).split(`
4
+ `)){let h=g.trim();h!==""&&n.set(h,{commitsAgo:r,addedAt:l})}}return n}function pe(e,t={}){let n=x(e);return n?F(n,t):null}function Q(e,t,n={}){let r=x(e);return r?t.size===0?[]:F(r,n,t):null}function Ce(e,t,n={}){if(t.size===0)return[];let r=D(e.config.projectRoot);if(!r)return null;let i=n.maxFilesPerCommit??S;if(t.size>L)return Q(e,t,n);let o=ee(e.config.projectRoot,r,t,i);return o?F(o,n,t):null}function F(e,t,n){let{minTogether:r=4,minConfidence:i=.6,maxFilesPerCommit:o=S}=t,c=new Map,m=new Map,l=e.newestAnalyzedAt??0;for(let s of e.commits){let a=[...new Set(s.files)].sort();if(a.length>o)continue;e.newestAnalyzedAt===void 0&&s.timestamp>l&&(l=s.timestamp);let f=re(a),A=n===void 0||a.some(u=>n.has(u));for(let u of a)c.set(u,(c.get(u)??0)+1);if(A)for(let u=0;u<a.length;u++)for(let C=u+1;C<a.length;C++){if(n&&!n.has(a[u])&&!n.has(a[C]))continue;let b=`${a[u]}\0${a[C]}`,d=m.get(b)??{together:0,focusedTogether:0,broadTogether:0,lastTogetherAt:0,timestamps:[],subjects:[]};d.together+=1,f?d.broadTogether+=1:d.focusedTogether+=1,s.timestamp>d.lastTogetherAt&&(d.lastTogetherAt=s.timestamp),d.timestamps.push(s.timestamp),d.subjects.push(s.subject),m.set(b,d)}}let g=[],h=l-B;for(let[s,a]of m){let f=a.together;if(f<r)continue;let[A,u]=s.split("\0"),C=c.get(A)??f,b=c.get(u)??f,d=Math.max(f/C,f/b);if(d<i)continue;let M=a.broadTogether/f,w=a.timestamps.filter(z=>z>=h).length;g.push({fileA:A,fileB:u,together:f,confidence:d,changesA:C,changesB:b,focusedTogether:a.focusedTogether,broadTogether:a.broadTogether,broadCommitRatio:M,lastTogetherAt:a.lastTogetherAt,recentTogether:w,commitScope:oe(a.broadTogether,f),recency:w>0?"recent":"stale",subjectContext:se(a.subjects)})}return g.sort((s,a)=>a.together-s.together||a.confidence-s.confidence||s.fileA.localeCompare(a.fileA)),g}function ee(e,t,n,r){let i;try{i=te(e)}catch{return null}if(i.length===0)return{head:t,commits:[],skippedBulkCommits:0,newestAnalyzedAt:0};let o;try{o=p(e,["log","--no-merges","--format=%H","-n",String(y),"--",...[...n].sort()])}catch{return null}let c=new Set(i.map(s=>s.hash)),m=o.split(`
5
+ `).map(s=>s.trim()).filter(s=>s!==""&&c.has(s)),l=ne(e,i,r);if(m.length===0)return{head:t,commits:[],skippedBulkCommits:0,newestAnalyzedAt:l};let g;try{g=p(e,["show","--no-walk=unsorted","--name-only","--pretty=format:%x01%H%x00%ct%x00%s",...m])}catch{return null}let h=R(g,r);return{head:t,...h,newestAnalyzedAt:l}}function te(e){return p(e,["log","--no-merges","--format=%H%x00%ct","-n",String(y)]).split(`
6
+ `).map(n=>n.trim()).filter(n=>n!=="").map(n=>{let[r,i]=n.split("\0");return{hash:r??"",timestamp:Number(i)||0}}).filter(n=>n.hash!=="")}function ne(e,t,n){for(let i=0;i<t.length;i+=20){let o=t.slice(i,i+20),c;try{c=p(e,["show","--no-walk=unsorted","--name-only","--pretty=format:%x01%H%x00%ct%x00%s",...o.map(l=>l.hash)])}catch{return t[0]?.timestamp??0}let m=R(c,n);if(m.commits.length>0)return m.commits[0].timestamp}return 0}function R(e,t){let n=[],r=0;for(let i of e.split("")){if(i.trim()==="")continue;let o=i.indexOf(`
7
+ `),c=o>=0?i.slice(0,o):i,[m,l,g]=c.split("\0");if(!m||!l)continue;let h=o>=0?i.slice(o+1).split(`
8
+ `).map(s=>s.trim()).filter(s=>s!==""):[];if(h.length>t){r+=1;continue}n.push({hash:m,timestamp:Number(l)||0,subject:g??"",files:h})}return{commits:n,skippedBulkCommits:r}}function re(e){return e.length>=N?!0:ie(e).size>=j}function ie(e){let t=new Set;for(let n of e){let r=n.indexOf("/");t.add(r>=0?n.slice(0,r):".")}return t}function oe(e,t){return e===0?"focused":e/t>=.5?"broad-sweep":"mixed"}function se(e){let t=new Set,n=[],r=[];for(let i of e){!r.includes(i)&&r.length<v&&r.push(i);for(let o of ae(i))t.add(o);for(let o of i.match(G)??[])n.includes(o)||n.push(o)}return{subjectLabels:[...t].sort(),issueRefs:n,sampleSubjects:r,externalIssueLabelStatus:"unavailable"}}function ae(e){let t=new Set,n=U.exec(e)?.[1]?.toLowerCase();return n&&t.add(ce(n)),/\b(?:feat|feature)\b/i.test(e)&&t.add("feature"),/\b(?:fix(?:es|ed)?|bug|regression|hotfix)\b/i.test(e)&&t.add("fix"),/\b(?:docs?|documentation|guide|readme)\b/i.test(e)&&t.add("docs"),/\brefactor(?:ing|ed)?\b/i.test(e)&&t.add("refactor"),/\btests?\b/i.test(e)&&t.add("test"),/\b(?:release|version|v\d+\.\d+)\b/i.test(e)&&t.add("release"),/\bchore\b/i.test(e)&&t.add("chore"),/\bbuild\b/i.test(e)&&t.add("build"),/\bci\b/i.test(e)&&t.add("ci"),/\bperf(?:ormance)?\b/i.test(e)&&t.add("perf"),[...t]}function ce(e){return e==="feat"?"feature":e}export{x as a,de as b,ge as c,fe as d,he as e,pe as f,Ce as g};
9
+ //# sourceMappingURL=chunk-BSN22NRK.js.map
@@ -1,2 +1,2 @@
1
- import{a as k}from"./chunk-2YI45TNM.js";function K(i,l={}){let{limit:d=10,scope:h,minDepth:x=3}=l,f=k(i,h),w=new Map,o=[],p=new Map,a=new Map,m=new Set,b=[],g=0;for(let e of f.keys()){if(p.has(e))continue;let t=[],s=(f.get(e)??new Set).values();for(p.set(e,g),a.set(e,g),g+=1,b.push(e),m.add(e),t.push({node:e,iter:s,pendingChild:null});t.length>0;){let n=t[t.length-1];if(n.pendingChild!==null){let u=n.pendingChild;n.pendingChild=null,a.set(n.node,Math.min(a.get(n.node),a.get(u)))}let c=n.iter.next();if(c.done){if(a.get(n.node)===p.get(n.node)){let u=[];for(;;){let S=b.pop();if(m.delete(S),u.push(S),w.set(S,o.length),S===n.node)break}o.push(u)}t.pop();continue}let r=c.value;if(p.has(r))m.has(r)&&a.set(n.node,Math.min(a.get(n.node),p.get(r)));else{p.set(r,g),a.set(r,g),g+=1,b.push(r),m.add(r);let u=(f.get(r)??new Set).values();n.pendingChild=r,t.push({node:r,iter:u,pendingChild:null})}}}let C=new Map,D=new Array(o.length);for(let e=0;e<o.length;e++)D[e]=o[e].length,C.set(e,new Set);for(let[e,t]of f){let s=w.get(e);for(let n of t){let c=w.get(n);c!==s&&C.get(s).add(c)}}let y=new Array(o.length),R=new Array(o.length);for(let e=0;e<o.length;e++){let t=[],s=0;for(let n of C.get(e)){let c=R[n];c>s&&(s=c,t=y[n])}y[e]=[e,...t],R[e]=D[e]+s}function M(e){return y[e]}let T=o.map(e=>[...e].sort()),v=new Set,I=[];for(let e=0;e<o.length;e++){let t=M(e),s=[];for(let c of t)s.push(...T[c]);if(s.length<x)continue;let n=s.join(" ");v.has(n)||(v.add(n),I.push(A(s)))}return I.sort((e,t)=>t.depth-e.depth),F(I).slice(0,d)}function A(i){return{chain:i,depth:i.length,actionTier:"signal",chainKind:"transitive-dependency-depth",evidenceReasons:[`${i.length} file(s) form the representative transitive dependency path`,"cycles are condensed before longest-path calculation"],recommendation:"Review whether the chain crosses ownership or layer boundaries; shorten it only when the dependency direction is accidental."}}function F(i){let l=[];for(let d of i)l.some(h=>L(d.chain,h.chain))||l.push(d);return l}function L(i,l){if(i.length>=l.length)return!1;let d=l.length-i.length;for(let h=0;h<i.length;h++)if(i[h]!==l[d+h])return!1;return!0}export{K as a};
2
- //# sourceMappingURL=chunk-ZDR4VTOP.js.map
1
+ import{a as k}from"./chunk-VUKC6F77.js";function K(i,l={}){let{limit:d=10,scope:h,minDepth:x=3}=l,f=k(i,h),w=new Map,o=[],p=new Map,a=new Map,m=new Set,b=[],g=0;for(let e of f.keys()){if(p.has(e))continue;let t=[],s=(f.get(e)??new Set).values();for(p.set(e,g),a.set(e,g),g+=1,b.push(e),m.add(e),t.push({node:e,iter:s,pendingChild:null});t.length>0;){let n=t[t.length-1];if(n.pendingChild!==null){let u=n.pendingChild;n.pendingChild=null,a.set(n.node,Math.min(a.get(n.node),a.get(u)))}let c=n.iter.next();if(c.done){if(a.get(n.node)===p.get(n.node)){let u=[];for(;;){let S=b.pop();if(m.delete(S),u.push(S),w.set(S,o.length),S===n.node)break}o.push(u)}t.pop();continue}let r=c.value;if(p.has(r))m.has(r)&&a.set(n.node,Math.min(a.get(n.node),p.get(r)));else{p.set(r,g),a.set(r,g),g+=1,b.push(r),m.add(r);let u=(f.get(r)??new Set).values();n.pendingChild=r,t.push({node:r,iter:u,pendingChild:null})}}}let C=new Map,D=new Array(o.length);for(let e=0;e<o.length;e++)D[e]=o[e].length,C.set(e,new Set);for(let[e,t]of f){let s=w.get(e);for(let n of t){let c=w.get(n);c!==s&&C.get(s).add(c)}}let y=new Array(o.length),R=new Array(o.length);for(let e=0;e<o.length;e++){let t=[],s=0;for(let n of C.get(e)){let c=R[n];c>s&&(s=c,t=y[n])}y[e]=[e,...t],R[e]=D[e]+s}function M(e){return y[e]}let T=o.map(e=>[...e].sort()),v=new Set,I=[];for(let e=0;e<o.length;e++){let t=M(e),s=[];for(let c of t)s.push(...T[c]);if(s.length<x)continue;let n=s.join(" ");v.has(n)||(v.add(n),I.push(A(s)))}return I.sort((e,t)=>t.depth-e.depth),F(I).slice(0,d)}function A(i){return{chain:i,depth:i.length,actionTier:"signal",chainKind:"transitive-dependency-depth",evidenceReasons:[`${i.length} file(s) form the representative transitive dependency path`,"cycles are condensed before longest-path calculation"],recommendation:"Review whether the chain crosses ownership or layer boundaries; shorten it only when the dependency direction is accidental."}}function F(i){let l=[];for(let d of i)l.some(h=>L(d.chain,h.chain))||l.push(d);return l}function L(i,l){if(i.length>=l.length)return!1;let d=l.length-i.length;for(let h=0;h<i.length;h++)if(i[h]!==l[d+h])return!1;return!0}export{K as a};
2
+ //# sourceMappingURL=chunk-BVRS7RKQ.js.map
@@ -1,6 +1,6 @@
1
- import{a as E}from"./chunk-2YI45TNM.js";import{d as _}from"./chunk-JM72FNGA.js";import{a as b}from"./chunk-6TDOT7B3.js";import{c as P}from"./chunk-A536TEU4.js";import{d as p}from"./chunk-7S5E7KWT.js";import{existsSync as d,readFileSync as D,readdirSync as y}from"fs";import{join as l}from"path";var R={files:new Set,pathPrefixes:[]},x=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,F=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,j=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],C=new Set([".git",".next",".turbo","build","coverage","dist","node_modules","out"]),I=4,M=p("package-surface",{clearGroups:["whole-project"]});function X(t){return M.get(t,()=>W(t.config.projectRoot))}function T(t,e){let r=X(t);return r.files.has(e)?!0:r.pathPrefixes.some(s=>e.startsWith(s))}function W(t){let e=new Set,r=[];for(let{manifest:s,packageRoot:i}of U(t))for(let n of B(s))G(t,i,n,e,r);return e.size===0&&r.length===0?R:{files:e,pathPrefixes:r}}function U(t){let e=[],r=k(t,"");return r&&e.push({manifest:r,packageRoot:""}),w(t,"",e,0),e}function w(t,e,r,s){if(s>=I)return;let i=l(t,e);if(d(i))for(let n of y(i,{withFileTypes:!0})){if(!n.isDirectory()||C.has(n.name))continue;let a=e?`${e}/${n.name}`:n.name,o=k(t,a);o&&r.push({manifest:o,packageRoot:a}),w(t,a,r,s+1)}}function k(t,e){try{let r=D(l(t,e,"package.json"),"utf-8"),s=JSON.parse(r);return s&&typeof s=="object"?s:null}catch{return null}}function B(t){let e=[];for(let s of["main","module","types","browser"])typeof t[s]=="string"&&e.push(t[s]);let r=t.bin;if(typeof r=="string")e.push(r);else if(r&&typeof r=="object")for(let s of Object.values(r))typeof s=="string"&&e.push(s);return $(t.exports,e),e}function $(t,e){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object"))for(let r of Object.values(t))$(r,e)}function G(t,e,r,s,i){let n=r.replace(/\\/g,"/").replace(/^\.\//,"");if(n===""||n.startsWith(".."))return;let a=n.indexOf("*");if(a>=0){let c=n.slice(0,a);for(let u of m(c))u!==""&&i.push(f(e,u));return}let o=n.replace(F,"");for(let c of m(o)){c===o&&c===n&&s.add(f(e,n));for(let u of j)L(t,s,e,c+u)}s.add(f(e,n))}function m(t){let e=[t];return x.test(t)&&(e.push(t.replace(x,"src/")),e.push(t.replace(x,""))),e}function L(t,e,r,s){let i=f(r,s);if(e.add(i),!s.startsWith("src/")||d(l(t,i)))return;let n=j.find(h=>s.endsWith(h));if(!n)return;let a=s.slice(0,-n.length);V(t,e,r,a,n);let o=a.lastIndexOf("/");if(o<=4)return;let c=a.slice(0,o),u=a.slice(o+1);for(let h of v(t,r,c,`${u}${n}`))e.add(h)}function V(t,e,r,s,i){let n=f(r,`${s}/index${i}`);d(l(t,n))&&e.add(n)}function v(t,e,r,s){let i=l(t,e,r);if(!d(i))return[];let n=[];for(let a of y(i,{withFileTypes:!0})){let o=`${r}/${a.name}`;a.isDirectory()?n.push(...v(t,e,o,s)):a.isFile()&&a.name===s&&n.push(f(e,o))}return n}function f(t,e){return t?`${t}/${e}`:e}function S(t){let e=g(t);return ct(e)?"test":ut(e)?"worker":ft(e)?"entry":gt(e)?"barrel":"source"}function H(t){return S(t)==="barrel"}function N(t){return K.get(t,()=>{let e=E(t),r=P(t).filter(n=>{let a=S(n);return a==="entry"||a==="worker"}),s=new Set,i=new Set;for(;r.length>0;){let n=r.shift();if(!s.has(n)){s.add(n),S(n)==="barrel"&&i.add(n);for(let a of e.get(n)??[])s.has(a)||r.push(a)}}return i})}var K=p("live-barrels",{clearGroups:["whole-project"]});function J(t,e){return N(t).has(g(e))}function yt(t){let e=N(t);return P(t).filter(r=>H(r)&&!e.has(r)&&!Q(t,r))}function Q(t,e){let r=g(e),s=b(t,r)?.callables;return s&&s.length>0?!0:(t.get(`SELECT COUNT(*) AS n
1
+ import{a as E}from"./chunk-VUKC6F77.js";import{d as _}from"./chunk-JM72FNGA.js";import{a as b}from"./chunk-72KY2ZFO.js";import{c as P}from"./chunk-A536TEU4.js";import{d as p}from"./chunk-7S5E7KWT.js";import{existsSync as d,readFileSync as D,readdirSync as y}from"fs";import{join as l}from"path";var R={files:new Set,pathPrefixes:[]},x=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,F=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,j=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],C=new Set([".git",".next",".turbo","build","coverage","dist","node_modules","out"]),I=4,M=p("package-surface",{clearGroups:["whole-project"]});function X(t){return M.get(t,()=>W(t.config.projectRoot))}function T(t,e){let r=X(t);return r.files.has(e)?!0:r.pathPrefixes.some(s=>e.startsWith(s))}function W(t){let e=new Set,r=[];for(let{manifest:s,packageRoot:i}of U(t))for(let n of B(s))G(t,i,n,e,r);return e.size===0&&r.length===0?R:{files:e,pathPrefixes:r}}function U(t){let e=[],r=k(t,"");return r&&e.push({manifest:r,packageRoot:""}),w(t,"",e,0),e}function w(t,e,r,s){if(s>=I)return;let i=l(t,e);if(d(i))for(let n of y(i,{withFileTypes:!0})){if(!n.isDirectory()||C.has(n.name))continue;let a=e?`${e}/${n.name}`:n.name,o=k(t,a);o&&r.push({manifest:o,packageRoot:a}),w(t,a,r,s+1)}}function k(t,e){try{let r=D(l(t,e,"package.json"),"utf-8"),s=JSON.parse(r);return s&&typeof s=="object"?s:null}catch{return null}}function B(t){let e=[];for(let s of["main","module","types","browser"])typeof t[s]=="string"&&e.push(t[s]);let r=t.bin;if(typeof r=="string")e.push(r);else if(r&&typeof r=="object")for(let s of Object.values(r))typeof s=="string"&&e.push(s);return $(t.exports,e),e}function $(t,e){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object"))for(let r of Object.values(t))$(r,e)}function G(t,e,r,s,i){let n=r.replace(/\\/g,"/").replace(/^\.\//,"");if(n===""||n.startsWith(".."))return;let a=n.indexOf("*");if(a>=0){let c=n.slice(0,a);for(let u of m(c))u!==""&&i.push(f(e,u));return}let o=n.replace(F,"");for(let c of m(o)){c===o&&c===n&&s.add(f(e,n));for(let u of j)L(t,s,e,c+u)}s.add(f(e,n))}function m(t){let e=[t];return x.test(t)&&(e.push(t.replace(x,"src/")),e.push(t.replace(x,""))),e}function L(t,e,r,s){let i=f(r,s);if(e.add(i),!s.startsWith("src/")||d(l(t,i)))return;let n=j.find(h=>s.endsWith(h));if(!n)return;let a=s.slice(0,-n.length);V(t,e,r,a,n);let o=a.lastIndexOf("/");if(o<=4)return;let c=a.slice(0,o),u=a.slice(o+1);for(let h of v(t,r,c,`${u}${n}`))e.add(h)}function V(t,e,r,s,i){let n=f(r,`${s}/index${i}`);d(l(t,n))&&e.add(n)}function v(t,e,r,s){let i=l(t,e,r);if(!d(i))return[];let n=[];for(let a of y(i,{withFileTypes:!0})){let o=`${r}/${a.name}`;a.isDirectory()?n.push(...v(t,e,o,s)):a.isFile()&&a.name===s&&n.push(f(e,o))}return n}function f(t,e){return t?`${t}/${e}`:e}function S(t){let e=g(t);return ct(e)?"test":ut(e)?"worker":ft(e)?"entry":gt(e)?"barrel":"source"}function H(t){return S(t)==="barrel"}function N(t){return K.get(t,()=>{let e=E(t),r=P(t).filter(n=>{let a=S(n);return a==="entry"||a==="worker"}),s=new Set,i=new Set;for(;r.length>0;){let n=r.shift();if(!s.has(n)){s.add(n),S(n)==="barrel"&&i.add(n);for(let a of e.get(n)??[])s.has(a)||r.push(a)}}return i})}var K=p("live-barrels",{clearGroups:["whole-project"]});function J(t,e){return N(t).has(g(e))}function yt(t){let e=N(t);return P(t).filter(r=>H(r)&&!e.has(r)&&!Q(t,r))}function Q(t,e){let r=g(e),s=b(t,r)?.callables;return s&&s.length>0?!0:(t.get(`SELECT COUNT(*) AS n
2
2
  FROM defn_enclosing_ranges der
3
3
  JOIN documents d ON d.id = der.document_id
4
4
  WHERE d.relative_path = ?
5
5
  AND der.end_line - der.start_line >= 2`,r)?.n??0)>0}function jt(t,e){let r=S(e);return r==="entry"||r==="worker"||J(t,e)}function Tt(t,e,r){let s=g(r);if(T(t,s)||et(e,s))return!0;let i=t.config.entryRoots;return i?!!(i.files?.some(n=>g(n)===s)||i.pathPrefixes?.some(n=>s.startsWith(g(n)))||i.qualifiedVars?.some(n=>lt(e,n))||i.symbolPatterns?.some(n=>{try{return new RegExp(n).test(e)}catch{return!1}})):!1}var A=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]),Y=new Set(["default","generateMetadata","generateStaticParams"]),Z=new Set(["default","getStaticProps","getServerSideProps","getStaticPaths","config"]),q=new Set(["default","loader","action","clientLoader","clientAction","headers","links","meta","shouldRevalidate","ErrorBoundary","HydrateFallback"]),z=new Set(["load","actions","entries",...A]),tt=new Set(["default"]);function et(t,e){let r=_(t);return r===""?!1:rt(e)?A.has(r):st(e)?Y.has(r):nt(e)?Z.has(r):it(e)?q.has(r):at(e)?z.has(r):ot(e)?tt.has(r):!1}function rt(t){return/(?:^|\/)app(?:\/[^/]+)*\/route\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function st(t){return/(?:^|\/)app(?:\/[^/]+)*\/(?:page|layout|template|loading|error|not-found|global-error|head|default)\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function nt(t){return/(?:^|\/)pages\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function it(t){return/(?:^|\/)app\/routes\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function at(t){return/(?:^|\/)src\/routes\/(?:.*\/)?\+(?:page|page\.server|layout|layout\.server|server)\.(?:ts|js)$/.test(t)}function ot(t){return/(?:^|\/)src\/(?:pages|views|routes)\/.+\.(?:ts|tsx|js|jsx|vue)$/.test(t)}function ct(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function ut(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function ft(t){let e=t.split("/"),r=e[e.length-1]??t;return r==="cli.ts"||r==="cli.js"||r==="postinstall.ts"||r==="postinstall.js"||r==="main.ts"||r==="main.js"||r==="main.rs"||r==="main.go"||r==="main.py"||r==="build.rs"||r==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:r==="index.ts"||r==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:e.length<=2:!1}function gt(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}function g(t){return t.replace(/\\/g,"/")}function lt(t,e){let r=e.lastIndexOf("/");if(r<0)return!1;let s=e.slice(0,r),i=e.slice(r+1);return t.includes(O(s)+"/")&&t.includes(O(i)+".")}function O(t){return/^[A-Za-z0-9_$+-]+$/.test(t)?t:"`"+t.replace(/`/g,"``")+"`"}export{T as a,S as b,H as c,J as d,yt as e,jt as f,Tt as g};
6
- //# sourceMappingURL=chunk-ANIOISCE.js.map
6
+ //# sourceMappingURL=chunk-C5CTSJ6X.js.map