rubydex 0.1.0.beta6 → 0.1.0.beta7

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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +43 -0
  3. data/THIRD_PARTY_LICENSES.html +1373 -127
  4. data/ext/rubydex/declaration.c +37 -0
  5. data/ext/rubydex/extconf.rb +1 -1
  6. data/ext/rubydex/graph.c +48 -4
  7. data/lib/rubydex/failures.rb +15 -0
  8. data/lib/rubydex/graph.rb +20 -0
  9. data/lib/rubydex/librubydex_sys.dylib +0 -0
  10. data/lib/rubydex/location.rb +49 -6
  11. data/lib/rubydex/version.rb +1 -1
  12. data/lib/rubydex.rb +1 -5
  13. data/rbi/rubydex.rbi +273 -0
  14. data/rust/Cargo.lock +559 -5
  15. data/rust/Cargo.toml +1 -0
  16. data/rust/rubydex/Cargo.toml +1 -1
  17. data/rust/rubydex/src/indexing/rbs_indexer.rs +505 -27
  18. data/rust/rubydex/src/indexing/ruby_indexer.rs +148 -129
  19. data/rust/rubydex/src/integrity.rs +278 -0
  20. data/rust/rubydex/src/lib.rs +1 -0
  21. data/rust/rubydex/src/main.rs +21 -1
  22. data/rust/rubydex/src/model/declaration.rs +14 -2
  23. data/rust/rubydex/src/model/definitions.rs +28 -5
  24. data/rust/rubydex/src/model/graph.rs +228 -15
  25. data/rust/rubydex/src/offset.rs +63 -1
  26. data/rust/rubydex/src/query.rs +555 -193
  27. data/rust/rubydex/src/resolution.rs +1069 -123
  28. data/rust/rubydex/src/stats/timer.rs +1 -0
  29. data/rust/rubydex/src/test_utils/graph_test.rs +20 -0
  30. data/rust/rubydex/src/test_utils/local_graph_test.rs +85 -0
  31. data/rust/rubydex-mcp/Cargo.toml +28 -0
  32. data/rust/rubydex-mcp/src/main.rs +48 -0
  33. data/rust/rubydex-mcp/src/server.rs +533 -0
  34. data/rust/rubydex-mcp/src/tools.rs +37 -0
  35. data/rust/rubydex-mcp/tests/mcp.rs +299 -0
  36. data/rust/rubydex-sys/src/declaration_api.rs +58 -0
  37. data/rust/rubydex-sys/src/graph_api.rs +61 -12
  38. data/rust/rubydex-sys/src/location_api.rs +8 -8
  39. metadata +14 -6
  40. data/lib/rubydex/librubydex_sys.so +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2c48ae779052983ff0d4f7a345b2a6ac612271cc6c015ba99486220d5617949
4
- data.tar.gz: 4c81285808882e4a545ecb34bc418821d996fd4e6fe34200f89963430f8014f6
3
+ metadata.gz: 4cee63a5c5fbdcff32ea743870b83e52958838df77567d9f6e9835a9291ba87c
4
+ data.tar.gz: 7fc1e83c8121b8f0bea2c794b191c9f1fd2f1eb8c136a1fd6fbe6a288e85a5e8
5
5
  SHA512:
6
- metadata.gz: 0e61f0fbf4d4cf6613042b40a4e72a41d36428b72c1f21c711b9c99ea3e6bc686b87edd9d182307e29af796df7256921da6e88ffb9cf54219630b34c324d151c
7
- data.tar.gz: 1bb42b0c43a1483d1610ea743320852c1bcc4d3d5ebfab043949fb18671eb5a0c2d8f7275f3795c66faa884ac40bca62279739a23e38bbef624256c3cdf1a09e
6
+ metadata.gz: f3f4fbb0ed860644b68dc8c770f07b922f27a05f13789a51b00b8bd74d00091a556c43a2772a01c8a47cc60776875056bbac6d6fa1e0574a0b18cd0609b947e1
7
+ data.tar.gz: df158939d505be5ebec800dfeb486f5da52de1194f0203f119cee3239195ec0c8b2fd42781a881f0cd8f9b133df97757d32697b429f7bf358d6659295c9e219b
data/README.md CHANGED
@@ -77,6 +77,49 @@ diagnostic.message
77
77
  diagnostic.location
78
78
  ```
79
79
 
80
+ ## MCP Server (Experimental)
81
+
82
+ Rubydex can run as an MCP (Model Context Protocol) server, enabling AI assistants
83
+ like Claude to semantically query your Ruby codebase.
84
+
85
+ ### Setup
86
+
87
+ 1. Install the binary:
88
+ ```bash
89
+ cargo install --path rust/rubydex-mcp
90
+ ```
91
+
92
+ 2. Add rubydex to the Ruby project you want to index:
93
+ ```bash
94
+ claude mcp add --scope project rubydex "\${HOME}/.cargo/bin/rubydex_mcp"
95
+ ```
96
+
97
+ Or manually create a `.mcp.json` in the project root:
98
+ ```json
99
+ {
100
+ "mcpServers": {
101
+ "rubydex": {
102
+ "command": "${HOME}/.cargo/bin/rubydex_mcp"
103
+ }
104
+ }
105
+ }
106
+ ```
107
+
108
+ 3. Start Claude Code from that project directory. The MCP server indexes
109
+ the project at startup and provides semantic code intelligence tools.
110
+ Verify with `/mcp` in the session.
111
+
112
+ ### Available MCP Tools
113
+
114
+ | Tool | Description |
115
+ |------|-------------|
116
+ | `search_declarations` | Fuzzy search for classes, modules, methods, constants |
117
+ | `get_declaration` | Full details by fully qualified name with docs, ancestors, members |
118
+ | `get_descendants` | What classes/modules inherit from or include this one |
119
+ | `find_constant_references` | All precise, resolved constant references across the codebase |
120
+ | `get_file_declarations` | List declarations defined in a specific file |
121
+ | `codebase_stats` | High-level statistics about the indexed codebase |
122
+
80
123
  ## Contributing
81
124
 
82
125
  See [the contributing documentation](CONTRIBUTING.md).