@mgamil/mapx 0.2.4

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 (203) hide show
  1. package/LICENSE +194 -0
  2. package/README.md +488 -0
  3. package/VERSION +1 -0
  4. package/dist/agents/generator.d.ts +74 -0
  5. package/dist/agents/generator.js +375 -0
  6. package/dist/agents/templates.d.ts +29 -0
  7. package/dist/agents/templates.js +459 -0
  8. package/dist/cli.d.ts +16 -0
  9. package/dist/cli.js +1835 -0
  10. package/dist/core/cluster-engine.d.ts +32 -0
  11. package/dist/core/cluster-engine.js +314 -0
  12. package/dist/core/config.d.ts +29 -0
  13. package/dist/core/config.js +178 -0
  14. package/dist/core/context-builder.d.ts +61 -0
  15. package/dist/core/context-builder.js +252 -0
  16. package/dist/core/flow-tracer.d.ts +63 -0
  17. package/dist/core/flow-tracer.js +366 -0
  18. package/dist/core/git-tracker.d.ts +20 -0
  19. package/dist/core/git-tracker.js +159 -0
  20. package/dist/core/graph.d.ts +42 -0
  21. package/dist/core/graph.js +186 -0
  22. package/dist/core/metrics.d.ts +24 -0
  23. package/dist/core/metrics.js +87 -0
  24. package/dist/core/scanner.d.ts +53 -0
  25. package/dist/core/scanner.js +949 -0
  26. package/dist/core/store-bun.d.ts +13 -0
  27. package/dist/core/store-bun.js +34 -0
  28. package/dist/core/store-interface.d.ts +15 -0
  29. package/dist/core/store-interface.js +7 -0
  30. package/dist/core/store-node.d.ts +13 -0
  31. package/dist/core/store-node.js +35 -0
  32. package/dist/core/store.d.ts +132 -0
  33. package/dist/core/store.js +614 -0
  34. package/dist/core/workspace-manager.d.ts +9 -0
  35. package/dist/core/workspace-manager.js +64 -0
  36. package/dist/exporters/dot-exporter.d.ts +16 -0
  37. package/dist/exporters/dot-exporter.js +179 -0
  38. package/dist/exporters/graph-exporter.d.ts +14 -0
  39. package/dist/exporters/graph-exporter.js +85 -0
  40. package/dist/exporters/index.d.ts +9 -0
  41. package/dist/exporters/index.js +12 -0
  42. package/dist/exporters/llm-exporter.d.ts +18 -0
  43. package/dist/exporters/llm-exporter.js +224 -0
  44. package/dist/exporters/svg-exporter.d.ts +19 -0
  45. package/dist/exporters/svg-exporter.js +319 -0
  46. package/dist/exporters/toon-exporter.d.ts +16 -0
  47. package/dist/exporters/toon-exporter.js +246 -0
  48. package/dist/frameworks/detectors/aspnet.d.ts +11 -0
  49. package/dist/frameworks/detectors/aspnet.js +52 -0
  50. package/dist/frameworks/detectors/django.d.ts +14 -0
  51. package/dist/frameworks/detectors/django.js +135 -0
  52. package/dist/frameworks/detectors/drupal.d.ts +13 -0
  53. package/dist/frameworks/detectors/drupal.js +94 -0
  54. package/dist/frameworks/detectors/express.d.ts +12 -0
  55. package/dist/frameworks/detectors/express.js +234 -0
  56. package/dist/frameworks/detectors/fastapi.d.ts +12 -0
  57. package/dist/frameworks/detectors/fastapi.js +203 -0
  58. package/dist/frameworks/detectors/flask.d.ts +12 -0
  59. package/dist/frameworks/detectors/flask.js +244 -0
  60. package/dist/frameworks/detectors/go.d.ts +11 -0
  61. package/dist/frameworks/detectors/go.js +75 -0
  62. package/dist/frameworks/detectors/laravel.d.ts +11 -0
  63. package/dist/frameworks/detectors/laravel.js +462 -0
  64. package/dist/frameworks/detectors/nestjs.d.ts +12 -0
  65. package/dist/frameworks/detectors/nestjs.js +155 -0
  66. package/dist/frameworks/detectors/nextjs.d.ts +11 -0
  67. package/dist/frameworks/detectors/nextjs.js +118 -0
  68. package/dist/frameworks/detectors/rails.d.ts +12 -0
  69. package/dist/frameworks/detectors/rails.js +76 -0
  70. package/dist/frameworks/detectors/react-router.d.ts +11 -0
  71. package/dist/frameworks/detectors/react-router.js +115 -0
  72. package/dist/frameworks/detectors/rust.d.ts +11 -0
  73. package/dist/frameworks/detectors/rust.js +59 -0
  74. package/dist/frameworks/detectors/spring.d.ts +11 -0
  75. package/dist/frameworks/detectors/spring.js +56 -0
  76. package/dist/frameworks/detectors/sveltekit.d.ts +11 -0
  77. package/dist/frameworks/detectors/sveltekit.js +154 -0
  78. package/dist/frameworks/detectors/symfony.d.ts +13 -0
  79. package/dist/frameworks/detectors/symfony.js +175 -0
  80. package/dist/frameworks/detectors/tanstack-router.d.ts +12 -0
  81. package/dist/frameworks/detectors/tanstack-router.js +80 -0
  82. package/dist/frameworks/detectors/vapor.d.ts +11 -0
  83. package/dist/frameworks/detectors/vapor.js +52 -0
  84. package/dist/frameworks/detectors/vue-router.d.ts +12 -0
  85. package/dist/frameworks/detectors/vue-router.js +237 -0
  86. package/dist/frameworks/detectors/wordpress.d.ts +13 -0
  87. package/dist/frameworks/detectors/wordpress.js +141 -0
  88. package/dist/frameworks/detectors/yii.d.ts +11 -0
  89. package/dist/frameworks/detectors/yii.js +131 -0
  90. package/dist/frameworks/framework-registry.d.ts +13 -0
  91. package/dist/frameworks/framework-registry.js +77 -0
  92. package/dist/frameworks/route-registry.d.ts +26 -0
  93. package/dist/frameworks/route-registry.js +102 -0
  94. package/dist/index.d.ts +19 -0
  95. package/dist/index.js +30 -0
  96. package/dist/languages/index.d.ts +2 -0
  97. package/dist/languages/index.js +7 -0
  98. package/dist/languages/installer.d.ts +13 -0
  99. package/dist/languages/installer.js +103 -0
  100. package/dist/languages/registry.d.ts +19 -0
  101. package/dist/languages/registry.js +427 -0
  102. package/dist/main.d.ts +2 -0
  103. package/dist/main.js +20 -0
  104. package/dist/mcp.d.ts +11 -0
  105. package/dist/mcp.js +1699 -0
  106. package/dist/parsers/common-methods.d.ts +3 -0
  107. package/dist/parsers/common-methods.js +33 -0
  108. package/dist/parsers/fallback-parser.d.ts +10 -0
  109. package/dist/parsers/fallback-parser.js +18 -0
  110. package/dist/parsers/generic-wasm-parser.d.ts +23 -0
  111. package/dist/parsers/generic-wasm-parser.js +168 -0
  112. package/dist/parsers/ignored-symbols.d.ts +26 -0
  113. package/dist/parsers/ignored-symbols.js +77 -0
  114. package/dist/parsers/index.d.ts +9 -0
  115. package/dist/parsers/index.js +13 -0
  116. package/dist/parsers/languages/javascript.d.ts +11 -0
  117. package/dist/parsers/languages/javascript.js +28 -0
  118. package/dist/parsers/languages/php.d.ts +15 -0
  119. package/dist/parsers/languages/php.js +648 -0
  120. package/dist/parsers/languages/typescript.d.ts +10 -0
  121. package/dist/parsers/languages/typescript.js +9 -0
  122. package/dist/parsers/languages/vue.d.ts +13 -0
  123. package/dist/parsers/languages/vue.js +63 -0
  124. package/dist/parsers/parse-worker.d.ts +2 -0
  125. package/dist/parsers/parse-worker.js +185 -0
  126. package/dist/parsers/parser-interface.d.ts +9 -0
  127. package/dist/parsers/parser-interface.js +0 -0
  128. package/dist/parsers/parser-registry.d.ts +8 -0
  129. package/dist/parsers/parser-registry.js +52 -0
  130. package/dist/parsers/wasm-parser.d.ts +16 -0
  131. package/dist/parsers/wasm-parser.js +110 -0
  132. package/dist/types.d.ts +172 -0
  133. package/dist/types.js +0 -0
  134. package/dist/ui/index.html +270 -0
  135. package/dist/ui/main.js +581 -0
  136. package/dist/ui/main.js.map +7 -0
  137. package/dist/ui/styles.css +573 -0
  138. package/dist/ui-events.d.ts +36 -0
  139. package/dist/ui-events.js +61 -0
  140. package/dist/ui-server.d.ts +12 -0
  141. package/dist/ui-server.js +504 -0
  142. package/package.json +179 -0
  143. package/queries/bash/references.scm +22 -0
  144. package/queries/bash/symbols.scm +15 -0
  145. package/queries/c/references.scm +14 -0
  146. package/queries/c/symbols.scm +30 -0
  147. package/queries/c-sharp/references.scm +26 -0
  148. package/queries/c-sharp/symbols.scm +57 -0
  149. package/queries/cpp/references.scm +21 -0
  150. package/queries/cpp/symbols.scm +44 -0
  151. package/queries/dart/references.scm +33 -0
  152. package/queries/dart/symbols.scm +38 -0
  153. package/queries/elixir/references.scm +45 -0
  154. package/queries/elixir/symbols.scm +41 -0
  155. package/queries/go/references.scm +22 -0
  156. package/queries/go/symbols.scm +53 -0
  157. package/queries/java/references.scm +32 -0
  158. package/queries/java/symbols.scm +41 -0
  159. package/queries/javascript/references.scm +14 -0
  160. package/queries/javascript/symbols.scm +23 -0
  161. package/queries/kotlin/references.scm +31 -0
  162. package/queries/kotlin/symbols.scm +24 -0
  163. package/queries/lua/references.scm +19 -0
  164. package/queries/lua/symbols.scm +29 -0
  165. package/queries/pascal/references.scm +29 -0
  166. package/queries/pascal/symbols.scm +45 -0
  167. package/queries/php/references.scm +109 -0
  168. package/queries/php/symbols.scm +33 -0
  169. package/queries/python/references.scm +50 -0
  170. package/queries/python/symbols.scm +21 -0
  171. package/queries/ruby/references.scm +48 -0
  172. package/queries/ruby/symbols.scm +24 -0
  173. package/queries/rust/references.scm +31 -0
  174. package/queries/rust/symbols.scm +35 -0
  175. package/queries/scala/references.scm +30 -0
  176. package/queries/scala/symbols.scm +35 -0
  177. package/queries/svelte/references.scm +20 -0
  178. package/queries/svelte/symbols.scm +30 -0
  179. package/queries/swift/references.scm +22 -0
  180. package/queries/swift/symbols.scm +37 -0
  181. package/queries/typescript/references.scm +25 -0
  182. package/queries/typescript/symbols.scm +35 -0
  183. package/queries/vue/references.scm +20 -0
  184. package/queries/vue/symbols.scm +28 -0
  185. package/queries/zig/references.scm +20 -0
  186. package/queries/zig/symbols.scm +22 -0
  187. package/wasm/tree-sitter-c.wasm +0 -0
  188. package/wasm/tree-sitter-c_sharp.wasm +0 -0
  189. package/wasm/tree-sitter-cpp.wasm +0 -0
  190. package/wasm/tree-sitter-dart.wasm +0 -0
  191. package/wasm/tree-sitter-go.wasm +0 -0
  192. package/wasm/tree-sitter-java.wasm +0 -0
  193. package/wasm/tree-sitter-javascript.wasm +0 -0
  194. package/wasm/tree-sitter-kotlin.wasm +0 -0
  195. package/wasm/tree-sitter-php.wasm +0 -0
  196. package/wasm/tree-sitter-python.wasm +0 -0
  197. package/wasm/tree-sitter-ruby.wasm +0 -0
  198. package/wasm/tree-sitter-rust.wasm +0 -0
  199. package/wasm/tree-sitter-scala.wasm +0 -0
  200. package/wasm/tree-sitter-swift.wasm +0 -0
  201. package/wasm/tree-sitter-tsx.wasm +0 -0
  202. package/wasm/tree-sitter-typescript.wasm +0 -0
  203. package/wasm/tree-sitter-vue.wasm +0 -0
@@ -0,0 +1,29 @@
1
+ ; Lua Symbol Extraction Queries
2
+
3
+ ; Named function definitions: function foo() end
4
+ (function_definition
5
+ name: [
6
+ (identifier) @symbol.name
7
+ (dot_index_expression (identifier) @symbol.name)
8
+ ]) @symbol.kind_function
9
+
10
+ ; Method definitions: function Class:method() end
11
+ (function_definition
12
+ name: (method_index_expression
13
+ method: (identifier) @symbol.name)) @symbol.kind_method
14
+
15
+ ; Local function definitions: local function foo() end
16
+ (local_function
17
+ name: (identifier) @symbol.name) @symbol.kind_function
18
+
19
+ ; Variable assignments (module-level tables as classes/modules)
20
+ (variable_assignment
21
+ (variable_list
22
+ (variable (identifier) @symbol.name))) @symbol.kind_constant
23
+
24
+ ; Local variable declarations
25
+ (local_variable_declaration
26
+ (variable_list
27
+ (variable (identifier) @symbol.name))) @symbol.kind_constant
28
+
29
+ ; Table constructors used as "classes" — captured via assignment above
@@ -0,0 +1,29 @@
1
+ ; Pascal Reference Extraction Queries
2
+
3
+ ; Uses clause (imports): uses SysUtils, Classes;
4
+ (uses_clause
5
+ (identifier) @ref.target_import) @ref.type_import
6
+
7
+ ; Procedure/function calls
8
+ (call_expression
9
+ name: (identifier) @ref.target_call) @ref.type_call
10
+
11
+ ; Method calls: obj.Method()
12
+ (call_expression
13
+ name: (member_expression
14
+ (identifier) @ref.target_call)) @ref.type_call
15
+
16
+ ; Class inheritance: TFoo = class(TBar)
17
+ (class_declaration
18
+ (class_heritage
19
+ (identifier) @ref.target_extends)) @ref.type_extends
20
+
21
+ ; Interface implementation
22
+ (class_declaration
23
+ (class_heritage
24
+ (identifier) @ref.target_implements)) @ref.type_implements
25
+
26
+ ; Constructor calls: TFoo.Create
27
+ (call_expression
28
+ name: (member_expression
29
+ object: (identifier) @ref.target_instantiation)) @ref.type_instantiation
@@ -0,0 +1,45 @@
1
+ ; Pascal Symbol Extraction Queries
2
+
3
+ ; Procedure declarations
4
+ (procedure_declaration
5
+ name: (identifier) @symbol.name) @symbol.kind_function
6
+
7
+ ; Function declarations
8
+ (function_declaration
9
+ name: (identifier) @symbol.name) @symbol.kind_function
10
+
11
+ ; Class/object type declarations
12
+ (class_declaration
13
+ name: (identifier) @symbol.name) @symbol.kind_class
14
+
15
+ ; Record type declarations
16
+ (record_declaration
17
+ name: (identifier) @symbol.name) @symbol.kind_struct
18
+
19
+ ; Interface declarations
20
+ (interface_declaration
21
+ name: (identifier) @symbol.name) @symbol.kind_interface
22
+
23
+ ; Method declarations (procedures/functions inside a class)
24
+ (method_declaration
25
+ name: (identifier) @symbol.name) @symbol.kind_method
26
+
27
+ ; Constant declarations
28
+ (constant_declaration
29
+ name: (identifier) @symbol.name) @symbol.kind_constant
30
+
31
+ ; Type alias declarations
32
+ (type_declaration
33
+ name: (identifier) @symbol.name) @symbol.kind_constant
34
+
35
+ ; Unit declaration (module equivalent)
36
+ (unit_declaration
37
+ name: (identifier) @symbol.name) @symbol.kind_module
38
+
39
+ ; Variable declarations
40
+ (variable_declaration
41
+ name: (identifier) @symbol.name) @symbol.kind_property
42
+
43
+ ; Enum type declarations
44
+ (enum_type
45
+ (identifier) @symbol.name) @symbol.kind_enum
@@ -0,0 +1,109 @@
1
+ ; PHP Reference / Dependency Extraction
2
+
3
+ (require_once_expression
4
+ (parenthesized_expression
5
+ (string
6
+ (string_content) @ref.target_require))) @ref.type_require
7
+
8
+ (require_expression
9
+ (parenthesized_expression
10
+ (string
11
+ (string_content) @ref.target_require))) @ref.type_require
12
+
13
+ (include_once_expression
14
+ (parenthesized_expression
15
+ (string
16
+ (string_content) @ref.target_require))) @ref.type_require
17
+
18
+ (include_expression
19
+ (parenthesized_expression
20
+ (string
21
+ (string_content) @ref.target_require))) @ref.type_require
22
+
23
+ ; F05: Namespace use clauses
24
+ (namespace_use_clause) @ref.target_use_clause
25
+
26
+ ; Inheritance
27
+ (class_declaration
28
+ (base_clause
29
+ (name) @ref.target_extends)) @ref.type_extends
30
+
31
+ (class_declaration
32
+ (class_interface_clause
33
+ (name) @ref.target_implements)) @ref.type_implements
34
+
35
+ ; Instantiation
36
+ (object_creation_expression
37
+ (name) @ref.target_instantiation) @ref.type_instantiation
38
+
39
+ ; Scoped calls
40
+ (scoped_call_expression
41
+ scope: (name) @ref.target_call) @ref.type_call
42
+
43
+ ; Member calls
44
+ (member_call_expression
45
+ name: (name) @ref.target_call) @ref.type_call
46
+
47
+ ; F06: Type-hint dependencies
48
+ (property_promotion_parameter) @ref.target_param
49
+ (simple_parameter) @ref.target_param
50
+ (method_declaration return_type: (_) @ref.target_return_type)
51
+ (function_definition return_type: (_) @ref.target_return_type)
52
+ (property_declaration) @ref.target_property
53
+
54
+ ; F07: Eloquent relationships
55
+ (member_call_expression
56
+ name: (name) @ref.relation_method_name
57
+ (#match? @ref.relation_method_name "^(hasOne|hasMany|hasOneThrough|hasManyThrough|belongsTo|belongsToMany|morphTo|morphOne|morphMany|morphToMany|morphedByMany|hasOneOfMany)$")
58
+ arguments: (arguments) @ref.relation_arguments
59
+ ) @ref.type_relation_call
60
+
61
+ ; F08: Route controller binding (statically matched)
62
+ (scoped_call_expression
63
+ scope: (name) @_route_class (#eq? @_route_class "Route")
64
+ name: (name) @ref.route_method_name
65
+ arguments: (arguments) @ref.route_arguments
66
+ ) @ref.type_route_call
67
+
68
+ ; F08: Middleware chaining
69
+ (member_call_expression
70
+ name: (name) @_mw_name (#eq? @_mw_name "middleware")
71
+ arguments: (arguments) @ref.middleware_arguments
72
+ ) @ref.type_middleware_call
73
+
74
+ ; F09: Container Bindings
75
+ (member_call_expression
76
+ name: (name) @ref.binding_method_name
77
+ (#match? @ref.binding_method_name "^(bind|singleton|scoped|instance|alias)$")
78
+ arguments: (arguments) @ref.binding_arguments
79
+ ) @ref.type_binding_call
80
+
81
+ ; F12: Event, Job, and Notification dispatch
82
+ (function_call_expression
83
+ function: (name) @_fn (#match? @_fn "^(event|dispatch|dispatch_sync)$")
84
+ arguments: (arguments
85
+ (argument
86
+ (object_creation_expression
87
+ (name) @ref.target_dispatch)))) @ref.type_dispatch
88
+
89
+ (scoped_call_expression
90
+ scope: (name) @ref.target_dispatch_static
91
+ name: (name) @_dispatch_method (#match? @_dispatch_method "^(dispatch|dispatchSync|dispatchIf|dispatchUnless|dispatchAfterResponse)$")
92
+ ) @ref.type_dispatch_static_call
93
+
94
+ (member_call_expression
95
+ name: (name) @_notify_method (#match? @_notify_method "^(notify|notifyNow)$")
96
+ arguments: (arguments
97
+ (argument
98
+ (object_creation_expression
99
+ (name) @ref.target_notify)))) @ref.type_notify
100
+
101
+ (scoped_call_expression
102
+ scope: (name) @_notif_facade (#eq? @_notif_facade "Notification")
103
+ name: (name) @_send (#match? @_send "^(send|sendNow)$")
104
+ arguments: (arguments
105
+ (argument)
106
+ (argument
107
+ (object_creation_expression
108
+ (name) @ref.target_notify)))) @ref.type_notify_facade
109
+
@@ -0,0 +1,33 @@
1
+ ; PHP Symbol Extraction Queries
2
+
3
+ (class_declaration
4
+ name: (name) @symbol.name) @symbol.kind_class
5
+
6
+ (interface_declaration
7
+ name: (name) @symbol.name) @symbol.kind_interface
8
+
9
+ (trait_declaration
10
+ name: (name) @symbol.name) @symbol.kind_trait
11
+
12
+ (enum_declaration
13
+ name: (name) @symbol.name) @symbol.kind_enum
14
+
15
+ (function_definition
16
+ name: (name) @symbol.name) @symbol.kind_function
17
+
18
+ (method_declaration
19
+ name: (name) @symbol.name) @symbol.kind_method
20
+
21
+ (namespace_definition
22
+ (namespace_name) @symbol.name) @symbol.kind_namespace
23
+
24
+ (property_declaration
25
+ (property_element
26
+ (variable_name) @symbol.name)) @symbol.kind_property
27
+
28
+ (const_declaration
29
+ (const_element
30
+ (name) @symbol.name)) @symbol.kind_constant
31
+
32
+ (enum_case
33
+ (name) @symbol.name) @symbol.kind_constant
@@ -0,0 +1,50 @@
1
+ ; Python Reference Extraction Queries
2
+
3
+ ; import statements: import foo, import foo.bar
4
+ (import_statement
5
+ [(dotted_name) (identifier)] @ref.target_import) @ref.type_import
6
+
7
+ ; from ... import: from foo import bar
8
+ (import_from_statement
9
+ [(dotted_name) (identifier)] @ref.target_import) @ref.type_import
10
+
11
+ ; Class inheritance: class Foo(Base, Mixin)
12
+ (class_definition
13
+ superclasses: (argument_list
14
+ (identifier) @ref.target_extends)) @ref.type_extends
15
+
16
+ ; Class inheritance with dotted name: class Foo(module.Base)
17
+ (class_definition
18
+ superclasses: (argument_list
19
+ (attribute
20
+ attribute: (identifier) @ref.target_extends))) @ref.type_extends
21
+
22
+ ; Function calls: foo()
23
+ (call
24
+ function: (identifier) @ref.target_call) @ref.type_call
25
+
26
+ ; Method calls: obj.method()
27
+ (call
28
+ function: (attribute
29
+ attribute: (identifier) @ref.target_call)) @ref.type_call
30
+
31
+ ; Instantiation: ClassName() — uppercase identifiers in call position
32
+ ; (handled as call — GenericWasmParser treats PascalCase calls as instantiation when needed)
33
+
34
+ ; Decorator references: @decorator
35
+ (decorator
36
+ (identifier) @ref.target_call) @ref.type_call
37
+
38
+ ; Decorator with dotted name: @module.decorator
39
+ (decorator
40
+ (attribute
41
+ attribute: (identifier) @ref.target_call)) @ref.type_call
42
+
43
+ ; Decorator with arguments: @decorator(args)
44
+ (decorator
45
+ (call
46
+ function: (identifier) @ref.target_call)) @ref.type_call
47
+
48
+ ; Type annotations in function params (when available)
49
+ (type
50
+ (identifier) @ref.target_call) @ref.type_call
@@ -0,0 +1,21 @@
1
+ ; Python Symbol Extraction Queries
2
+
3
+ ; Classes
4
+ (class_definition
5
+ name: (identifier) @symbol.name) @symbol.kind_class
6
+
7
+ ; Functions (top-level)
8
+ (function_definition
9
+ name: (identifier) @symbol.name) @symbol.kind_function
10
+
11
+ ; Decorators (captured as metadata, not a separate symbol kind)
12
+ ; Decorator names are captured via references
13
+
14
+ ; Module-level constants (UPPER_CASE assignments)
15
+ (expression_statement
16
+ (assignment
17
+ left: (identifier) @symbol.name
18
+ (#match? @symbol.name "^[A-Z][A-Z0-9_]*$"))) @symbol.kind_constant
19
+
20
+ ; Property definitions via @property decorator are auto-promoted from function
21
+ ; to method by GenericWasmParser when inside a class scope
@@ -0,0 +1,48 @@
1
+ ; Ruby Reference Extraction Queries
2
+
3
+ ; require 'foo'
4
+ (call
5
+ method: (identifier) @_req
6
+ arguments: (argument_list (string (string_content) @ref.target_require))
7
+ (#eq? @_req "require")) @ref.type_require
8
+
9
+ ; require_relative 'foo'
10
+ (call
11
+ method: (identifier) @_reqr
12
+ arguments: (argument_list (string (string_content) @ref.target_require))
13
+ (#eq? @_reqr "require_relative")) @ref.type_require
14
+
15
+ ; Class inheritance: class Foo < Bar
16
+ (class
17
+ superclass: (scope_resolution name: (constant) @ref.target_extends)) @ref.type_extends
18
+
19
+ (class
20
+ superclass: (constant) @ref.target_extends) @ref.type_extends
21
+
22
+ ; include Module
23
+ (call
24
+ method: (identifier) @_include
25
+ arguments: (argument_list (constant) @ref.target_extends)
26
+ (#eq? @_include "include")) @ref.type_extends
27
+
28
+ ; extend Module
29
+ (call
30
+ method: (identifier) @_extend
31
+ arguments: (argument_list (constant) @ref.target_extends)
32
+ (#eq? @_extend "extend")) @ref.type_extends
33
+
34
+ ; prepend Module
35
+ (call
36
+ method: (identifier) @_prepend
37
+ arguments: (argument_list (constant) @ref.target_extends)
38
+ (#eq? @_prepend "prepend")) @ref.type_extends
39
+
40
+ ; Method calls: foo(), self.foo(), obj.foo()
41
+ (call
42
+ method: (identifier) @ref.target_call) @ref.type_call
43
+
44
+ ; Instantiation: ClassName.new
45
+ (call
46
+ method: (identifier) @_new
47
+ receiver: (constant) @ref.target_instantiation
48
+ (#eq? @_new "new")) @ref.type_instantiation
@@ -0,0 +1,24 @@
1
+ ; Ruby Symbol Extraction Queries
2
+
3
+ ; Classes
4
+ (class name: (constant) @symbol.name) @symbol.kind_class
5
+
6
+ ; Modules
7
+ (module name: (constant) @symbol.name) @symbol.kind_module
8
+
9
+ ; Instance methods
10
+ (method name: (identifier) @symbol.name) @symbol.kind_method
11
+
12
+ ; Class/singleton methods
13
+ (singleton_method name: (identifier) @symbol.name) @symbol.kind_method
14
+
15
+ ; Constants (UPPER_CASE = value)
16
+ (assignment
17
+ left: (constant) @symbol.name) @symbol.kind_constant
18
+
19
+ ; Attribute accessors (attr_reader, attr_writer, attr_accessor generate properties)
20
+ (call
21
+ method: (identifier) @_attr_method
22
+ arguments: (argument_list
23
+ (simple_symbol) @symbol.name)
24
+ (#match? @_attr_method "^attr_(reader|writer|accessor)$")) @symbol.kind_property
@@ -0,0 +1,31 @@
1
+ ; Rust Reference Extraction Queries
2
+
3
+ ; Use declarations
4
+ (use_declaration
5
+ argument: (_) @ref.target_import) @ref.type_import
6
+
7
+ ; Function calls
8
+ (call_expression
9
+ function: (identifier) @ref.target_call) @ref.type_call
10
+
11
+ ; Method calls: obj.method()
12
+ (call_expression
13
+ function: (field_expression
14
+ field: (field_identifier) @ref.target_call)) @ref.type_call
15
+
16
+ ; Struct instantiation: StructName { ... }
17
+ (struct_expression
18
+ name: (type_identifier) @ref.target_instantiation) @ref.type_instantiation
19
+
20
+ ; Trait implementation: impl Trait for Type
21
+ (impl_item
22
+ trait: (type_identifier) @ref.target_implements) @ref.type_implements
23
+
24
+ ; Path-based calls: Module::function()
25
+ (call_expression
26
+ function: (scoped_identifier
27
+ name: (identifier) @ref.target_call)) @ref.type_call
28
+
29
+ ; Macro invocations: macro_name!(...)
30
+ (macro_invocation
31
+ macro: (identifier) @ref.target_call) @ref.type_call
@@ -0,0 +1,35 @@
1
+ ; Rust Symbol Extraction Queries
2
+
3
+ ; Structs
4
+ (struct_item name: (type_identifier) @symbol.name) @symbol.kind_struct
5
+
6
+ ; Traits (Rust's interface equivalent)
7
+ (trait_item name: (type_identifier) @symbol.name) @symbol.kind_interface
8
+
9
+ ; Enums
10
+ (enum_item name: (type_identifier) @symbol.name) @symbol.kind_enum
11
+
12
+ ; Functions
13
+ (function_item name: (identifier) @symbol.name) @symbol.kind_function
14
+
15
+ ; Impl blocks (captured as class to represent implementation)
16
+ (impl_item
17
+ type: (type_identifier) @symbol.name) @symbol.kind_class
18
+
19
+ ; Const items
20
+ (const_item name: (identifier) @symbol.name) @symbol.kind_constant
21
+
22
+ ; Static items
23
+ (static_item name: (identifier) @symbol.name) @symbol.kind_constant
24
+
25
+ ; Type alias
26
+ (type_item name: (type_identifier) @symbol.name) @symbol.kind_constant
27
+
28
+ ; Module declarations
29
+ (mod_item name: (identifier) @symbol.name) @symbol.kind_module
30
+
31
+ ; Macro definitions
32
+ (macro_definition name: (identifier) @symbol.name) @symbol.kind_function
33
+
34
+ ; Enum variants
35
+ (enum_variant name: (identifier) @symbol.name) @symbol.kind_constant
@@ -0,0 +1,30 @@
1
+ ; Scala Reference Extraction Queries
2
+
3
+ ; Import declarations
4
+ (import_declaration
5
+ (identifier) @ref.target_import) @ref.type_import
6
+
7
+ ; Wildcard imports
8
+ (import_declaration
9
+ (stable_identifier (identifier) @ref.target_import)) @ref.type_import
10
+
11
+ ; Class extends: class Foo extends Bar
12
+ (extends_clause
13
+ (type_identifier) @ref.target_extends) @ref.type_extends
14
+
15
+ ; Trait with: class Foo extends Bar with Trait
16
+ (extends_clause
17
+ (type_identifier) @ref.target_extends) @ref.type_extends
18
+
19
+ ; Function/method calls
20
+ (call_expression
21
+ function: (identifier) @ref.target_call) @ref.type_call
22
+
23
+ ; Method calls on receiver: obj.method()
24
+ (call_expression
25
+ function: (field_expression
26
+ field: (identifier) @ref.target_call)) @ref.type_call
27
+
28
+ ; new ClassName()
29
+ (instance_expression
30
+ (type_identifier) @ref.target_instantiation) @ref.type_instantiation
@@ -0,0 +1,35 @@
1
+ ; Scala Symbol Extraction Queries
2
+
3
+ ; Classes
4
+ (class_definition
5
+ name: (identifier) @symbol.name) @symbol.kind_class
6
+
7
+ ; Case classes
8
+ ; TODO: Add a case-class-specific pattern (the previous query duplicated the generic class_definition capture).
9
+ ; Objects (singletons)
10
+ (object_definition
11
+ name: (identifier) @symbol.name) @symbol.kind_class
12
+
13
+ ; Traits
14
+ (trait_definition
15
+ name: (identifier) @symbol.name) @symbol.kind_interface
16
+
17
+ ; Functions/methods
18
+ (function_definition
19
+ name: (identifier) @symbol.name) @symbol.kind_function
20
+
21
+ ; Val declarations (immutable)
22
+ (val_definition
23
+ pattern: (identifier) @symbol.name) @symbol.kind_constant
24
+
25
+ ; Var declarations (mutable)
26
+ (var_definition
27
+ pattern: (identifier) @symbol.name) @symbol.kind_property
28
+
29
+ ; Type aliases
30
+ (type_definition
31
+ name: (type_identifier) @symbol.name) @symbol.kind_constant
32
+
33
+ ; Package declarations
34
+ (package_clause
35
+ (package_identifier) @symbol.name) @symbol.kind_namespace
@@ -0,0 +1,20 @@
1
+ ; Svelte Reference Extraction Queries
2
+
3
+ ; Import statements
4
+ (import_statement
5
+ source: (string (string_fragment) @ref.target_import)) @ref.type_import
6
+
7
+ ; Function calls
8
+ (call_expression
9
+ function: (identifier) @ref.target_call) @ref.type_call
10
+
11
+ ; Method calls: obj.method()
12
+ (call_expression
13
+ function: (member_expression
14
+ property: (property_identifier) @ref.target_call)) @ref.type_call
15
+
16
+ ; Svelte store subscriptions and lifecycle
17
+ (call_expression
18
+ function: (identifier) @_fn
19
+ (#match? @_fn "^(onMount|onDestroy|beforeUpdate|afterUpdate|createEventDispatcher|writable|readable|derived|get|tick)$")
20
+ ) @ref.type_call
@@ -0,0 +1,30 @@
1
+ ; Svelte Symbol Extraction Queries
2
+ ; Svelte SFC files contain <script> blocks using JavaScript/TypeScript AST
3
+
4
+ ; Functions
5
+ (function_declaration
6
+ name: (identifier) @symbol.name) @symbol.kind_function
7
+
8
+ ; Arrow functions / const declarations (stores, handlers, reactive declarations)
9
+ (variable_declarator
10
+ name: (identifier) @symbol.name
11
+ value: (arrow_function)) @symbol.kind_function
12
+
13
+ ; Class declarations
14
+ (class_declaration
15
+ name: (identifier) @symbol.name) @symbol.kind_class
16
+
17
+ ; Method definitions (in class or object)
18
+ (method_definition
19
+ name: (property_identifier) @symbol.name) @symbol.kind_method
20
+
21
+ ; Exported let declarations (component props in Svelte)
22
+ (export_statement
23
+ (lexical_declaration
24
+ (variable_declarator
25
+ name: (identifier) @symbol.name))) @symbol.kind_property
26
+
27
+ ; Top-level const/let declarations (reactive state)
28
+ (lexical_declaration
29
+ (variable_declarator
30
+ name: (identifier) @symbol.name)) @symbol.kind_constant
@@ -0,0 +1,22 @@
1
+ ; Swift Reference Extraction Queries
2
+
3
+ ; Import statements
4
+ (import_declaration
5
+ (identifier) @ref.target_import) @ref.type_import
6
+
7
+ ; Function/method calls
8
+ (call_expression
9
+ (simple_identifier) @ref.target_call) @ref.type_call
10
+
11
+ ; Method calls on receiver: obj.method()
12
+ (call_expression
13
+ (navigation_expression
14
+ (navigation_suffix (simple_identifier) @ref.target_call))) @ref.type_call
15
+
16
+ ; Protocol conformance / inheritance: class Foo: Bar, Protocol
17
+ (inheritance_specifier
18
+ (type_identifier) @ref.target_extends) @ref.type_extends
19
+
20
+ ; Instantiation: ClassName()
21
+ (call_expression
22
+ (type_identifier) @ref.target_instantiation) @ref.type_instantiation
@@ -0,0 +1,37 @@
1
+ ; Swift Symbol Extraction Queries
2
+
3
+ ; Classes
4
+ (class_declaration
5
+ name: (type_identifier) @symbol.name) @symbol.kind_class
6
+
7
+ ; Structs
8
+ (struct_declaration
9
+ name: (type_identifier) @symbol.name) @symbol.kind_struct
10
+
11
+ ; Protocols (Swift's interface equivalent)
12
+ (protocol_declaration
13
+ name: (type_identifier) @symbol.name) @symbol.kind_interface
14
+
15
+ ; Enums
16
+ (enum_declaration
17
+ name: (type_identifier) @symbol.name) @symbol.kind_enum
18
+
19
+ ; Functions (using simple_identifier for name)
20
+ (function_declaration
21
+ name: (simple_identifier) @symbol.name) @symbol.kind_function
22
+
23
+ ; Initializers
24
+ (init_declaration) @symbol.kind_method
25
+
26
+ ; Property declarations
27
+ (property_declaration
28
+ (pattern
29
+ (simple_identifier) @symbol.name)) @symbol.kind_property
30
+
31
+ ; Type aliases
32
+ (typealias_declaration
33
+ name: (type_identifier) @symbol.name) @symbol.kind_constant
34
+
35
+ ; Extensions
36
+ (extension_declaration
37
+ (type_identifier) @symbol.name) @symbol.kind_class
@@ -0,0 +1,25 @@
1
+ ; TypeScript Reference / Dependency Extraction
2
+
3
+ (import_statement
4
+ source: (string) @ref.target_import) @ref.type_import
5
+
6
+ (import_clause
7
+ (named_imports
8
+ (import_specifier
9
+ name: (identifier) @ref.target_import_name))) @ref.type_import
10
+
11
+ (class_declaration
12
+ (class_heritage
13
+ (extends_clause
14
+ (identifier) @ref.target_extends))) @ref.type_extends
15
+
16
+ (class_declaration
17
+ (class_heritage
18
+ (implements_clause
19
+ (type_identifier) @ref.target_implements))) @ref.type_implements
20
+
21
+ (new_expression
22
+ constructor: (identifier) @ref.target_instantiation) @ref.type_instantiation
23
+
24
+ (call_expression
25
+ function: (identifier) @ref.target_call) @ref.type_call