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.
- checksums.yaml +4 -4
- data/README.md +43 -0
- data/THIRD_PARTY_LICENSES.html +1373 -127
- data/ext/rubydex/declaration.c +37 -0
- data/ext/rubydex/extconf.rb +1 -1
- data/ext/rubydex/graph.c +48 -4
- data/lib/rubydex/failures.rb +15 -0
- data/lib/rubydex/graph.rb +20 -0
- data/lib/rubydex/librubydex_sys.dylib +0 -0
- data/lib/rubydex/location.rb +49 -6
- data/lib/rubydex/version.rb +1 -1
- data/lib/rubydex.rb +1 -5
- data/rbi/rubydex.rbi +273 -0
- data/rust/Cargo.lock +559 -5
- data/rust/Cargo.toml +1 -0
- data/rust/rubydex/Cargo.toml +1 -1
- data/rust/rubydex/src/indexing/rbs_indexer.rs +505 -27
- data/rust/rubydex/src/indexing/ruby_indexer.rs +148 -129
- data/rust/rubydex/src/integrity.rs +278 -0
- data/rust/rubydex/src/lib.rs +1 -0
- data/rust/rubydex/src/main.rs +21 -1
- data/rust/rubydex/src/model/declaration.rs +14 -2
- data/rust/rubydex/src/model/definitions.rs +28 -5
- data/rust/rubydex/src/model/graph.rs +228 -15
- data/rust/rubydex/src/offset.rs +63 -1
- data/rust/rubydex/src/query.rs +555 -193
- data/rust/rubydex/src/resolution.rs +1069 -123
- data/rust/rubydex/src/stats/timer.rs +1 -0
- data/rust/rubydex/src/test_utils/graph_test.rs +20 -0
- data/rust/rubydex/src/test_utils/local_graph_test.rs +85 -0
- data/rust/rubydex-mcp/Cargo.toml +28 -0
- data/rust/rubydex-mcp/src/main.rs +48 -0
- data/rust/rubydex-mcp/src/server.rs +533 -0
- data/rust/rubydex-mcp/src/tools.rs +37 -0
- data/rust/rubydex-mcp/tests/mcp.rs +299 -0
- data/rust/rubydex-sys/src/declaration_api.rs +58 -0
- data/rust/rubydex-sys/src/graph_api.rs +61 -12
- data/rust/rubydex-sys/src/location_api.rs +8 -8
- metadata +14 -6
- data/lib/rubydex/librubydex_sys.so +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4cee63a5c5fbdcff32ea743870b83e52958838df77567d9f6e9835a9291ba87c
|
|
4
|
+
data.tar.gz: 7fc1e83c8121b8f0bea2c794b191c9f1fd2f1eb8c136a1fd6fbe6a288e85a5e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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).
|