rubydex 0.2.3-aarch64-linux → 0.2.4-aarch64-linux
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/THIRD_PARTY_LICENSES.html +2 -2
- data/lib/rubydex/declaration.rb +12 -0
- data/lib/rubydex/librubydex_sys.so +0 -0
- data/lib/rubydex/version.rb +1 -1
- data/rbi/rubydex.rbi +8 -1
- data/rust/Cargo.lock +4 -4
- data/rust/rubydex/src/model/graph.rs +21 -4
- data/rust/rubydex-mcp/Cargo.toml +1 -1
- data/rust/rubydex-mcp/src/server.rs +5 -6
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 49147264143f618ef7d2b5bbfa983e511b86123dc01548c2a4176e686a44b57e
|
|
4
|
+
data.tar.gz: cbd51f1380330f85dde7861c7df96cbc1db4117458952c561164eef9c511901e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5daa009adaef78d504f2710aac72ec36875a3a7ae169048b36e7220d984ddaf7dd562431a460a44b95530bb030a341887ccf300d14646051f722ba0cc941e9bb
|
|
7
|
+
data.tar.gz: adf4c9a9faf405356b64e6de927a7aa4b8499164c9cf48918683b45ab0e7825668f5505d50e0b29305292bae3db511ae6ffb6ab2e96628c1b1ecdc2076fb8b3b
|
data/THIRD_PARTY_LICENSES.html
CHANGED
|
@@ -2957,10 +2957,10 @@ limitations under the License.
|
|
|
2957
2957
|
1.0.25</a></li>
|
|
2958
2958
|
<li><a
|
|
2959
2959
|
href=" https://github.com/modelcontextprotocol/rust-sdk/ ">rmcp-macros
|
|
2960
|
-
|
|
2960
|
+
1.6.0</a></li>
|
|
2961
2961
|
<li><a
|
|
2962
2962
|
href=" https://github.com/modelcontextprotocol/rust-sdk/ ">rmcp
|
|
2963
|
-
|
|
2963
|
+
1.4.0</a></li>
|
|
2964
2964
|
<li><a
|
|
2965
2965
|
href=" https://github.com/rust-lang/rustc-hash ">rustc-hash
|
|
2966
2966
|
2.1.1</a></li>
|
data/lib/rubydex/declaration.rb
CHANGED
|
@@ -20,6 +20,13 @@ module Rubydex
|
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
+
class Namespace < Declaration
|
|
24
|
+
#: (String ancestor_name) -> bool
|
|
25
|
+
def has_ancestor?(ancestor_name)
|
|
26
|
+
ancestors.any? { |ancestor| ancestor.name == ancestor_name }
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
23
30
|
class Class < Namespace
|
|
24
31
|
include Visibility
|
|
25
32
|
end
|
|
@@ -28,6 +35,11 @@ module Rubydex
|
|
|
28
35
|
include Visibility
|
|
29
36
|
end
|
|
30
37
|
|
|
38
|
+
class SingletonClass < Namespace
|
|
39
|
+
#: () -> Declaration
|
|
40
|
+
alias_method :attached_class, :owner
|
|
41
|
+
end
|
|
42
|
+
|
|
31
43
|
class Constant < Declaration
|
|
32
44
|
include Visibility
|
|
33
45
|
end
|
|
Binary file
|
data/lib/rubydex/version.rb
CHANGED
data/rbi/rubydex.rbi
CHANGED
|
@@ -104,6 +104,9 @@ class Rubydex::Namespace < Rubydex::Declaration
|
|
|
104
104
|
sig { returns(T::Enumerable[Rubydex::Namespace]) }
|
|
105
105
|
def ancestors; end
|
|
106
106
|
|
|
107
|
+
sig { params(ancestor_name: String).returns(T::Boolean) }
|
|
108
|
+
def has_ancestor?(ancestor_name); end
|
|
109
|
+
|
|
107
110
|
sig { returns(T::Enumerable[Rubydex::Namespace]) }
|
|
108
111
|
def descendants; end
|
|
109
112
|
|
|
@@ -122,7 +125,11 @@ end
|
|
|
122
125
|
|
|
123
126
|
class Rubydex::Class < Rubydex::Namespace; end
|
|
124
127
|
class Rubydex::Module < Rubydex::Namespace; end
|
|
125
|
-
|
|
128
|
+
|
|
129
|
+
class Rubydex::SingletonClass < Rubydex::Namespace
|
|
130
|
+
sig { returns(Rubydex::Declaration) }
|
|
131
|
+
def attached_class; end
|
|
132
|
+
end
|
|
126
133
|
|
|
127
134
|
class Rubydex::Definition
|
|
128
135
|
abstract!
|
data/rust/Cargo.lock
CHANGED
|
@@ -971,9 +971,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
|
|
971
971
|
|
|
972
972
|
[[package]]
|
|
973
973
|
name = "rmcp"
|
|
974
|
-
version = "
|
|
974
|
+
version = "1.4.0"
|
|
975
975
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
976
|
-
checksum = "
|
|
976
|
+
checksum = "f542f74cf247da16f19bbc87e298cd201e912314f4083e88cdd671f44f5fcb53"
|
|
977
977
|
dependencies = [
|
|
978
978
|
"async-trait",
|
|
979
979
|
"base64",
|
|
@@ -993,9 +993,9 @@ dependencies = [
|
|
|
993
993
|
|
|
994
994
|
[[package]]
|
|
995
995
|
name = "rmcp-macros"
|
|
996
|
-
version = "
|
|
996
|
+
version = "1.6.0"
|
|
997
997
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
998
|
-
checksum = "
|
|
998
|
+
checksum = "7caa6743cc0888e433105fe1bc551a7f607940b126a37bc97b478e86064627eb"
|
|
999
999
|
dependencies = [
|
|
1000
1000
|
"darling",
|
|
1001
1001
|
"proc-macro2",
|
|
@@ -15,7 +15,7 @@ use crate::model::name::{Name, NameRef, ParentScope, ResolvedName};
|
|
|
15
15
|
use crate::model::references::{ConstantReference, MethodRef};
|
|
16
16
|
use crate::model::string_ref::StringRef;
|
|
17
17
|
use crate::model::visibility::Visibility;
|
|
18
|
-
use crate::stats;
|
|
18
|
+
use crate::{query, stats};
|
|
19
19
|
|
|
20
20
|
/// An entity whose validity depends on a particular `NameId`.
|
|
21
21
|
/// Used as the value type in the `name_dependents` reverse index.
|
|
@@ -650,7 +650,7 @@ impl Graph {
|
|
|
650
650
|
let definitions = declaration.definitions();
|
|
651
651
|
|
|
652
652
|
match declaration {
|
|
653
|
-
Declaration::Namespace(Namespace::Class(_) | Namespace::Module(_))
|
|
653
|
+
Declaration::Namespace(Namespace::Class(_) | Namespace::Module(_) | Namespace::Todo(_))
|
|
654
654
|
| Declaration::Constant(_)
|
|
655
655
|
| Declaration::ConstantAlias(_) => {
|
|
656
656
|
for def_id in definitions.iter().rev() {
|
|
@@ -661,25 +661,42 @@ impl Graph {
|
|
|
661
661
|
Some(Visibility::Public)
|
|
662
662
|
}
|
|
663
663
|
Declaration::Method(_) => {
|
|
664
|
+
let mut latest_alias: Option<DefinitionId> = None;
|
|
665
|
+
|
|
664
666
|
for def_id in definitions.iter().rev() {
|
|
665
667
|
let Some(definition) = self.definitions.get(def_id) else {
|
|
666
668
|
continue;
|
|
667
669
|
};
|
|
670
|
+
|
|
668
671
|
let visibility = match definition {
|
|
669
672
|
Definition::MethodVisibility(vis) => Some(*vis.visibility()),
|
|
670
673
|
Definition::Method(method) => Some(*method.visibility()),
|
|
671
674
|
Definition::AttrAccessor(attr) => Some(*attr.visibility()),
|
|
672
675
|
Definition::AttrReader(attr) => Some(*attr.visibility()),
|
|
673
676
|
Definition::AttrWriter(attr) => Some(*attr.visibility()),
|
|
677
|
+
Definition::MethodAlias(_) => {
|
|
678
|
+
if latest_alias.is_none() {
|
|
679
|
+
latest_alias = Some(*def_id);
|
|
680
|
+
}
|
|
681
|
+
None
|
|
682
|
+
}
|
|
674
683
|
_ => None,
|
|
675
684
|
};
|
|
685
|
+
|
|
676
686
|
if visibility.is_some() {
|
|
677
687
|
return visibility;
|
|
678
688
|
}
|
|
679
689
|
}
|
|
680
|
-
|
|
690
|
+
|
|
691
|
+
if let Some(alias_def_id) = latest_alias
|
|
692
|
+
&& let Ok(target_id) = query::follow_method_alias(self, alias_def_id)
|
|
693
|
+
{
|
|
694
|
+
return self.visibility(&target_id);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
Some(Visibility::Public)
|
|
681
698
|
}
|
|
682
|
-
Declaration::Namespace(Namespace::SingletonClass(_)
|
|
699
|
+
Declaration::Namespace(Namespace::SingletonClass(_))
|
|
683
700
|
| Declaration::GlobalVariable(_)
|
|
684
701
|
| Declaration::InstanceVariable(_)
|
|
685
702
|
| Declaration::ClassVariable(_) => None,
|
data/rust/rubydex-mcp/Cargo.toml
CHANGED
|
@@ -12,7 +12,7 @@ path = "src/main.rs"
|
|
|
12
12
|
[dependencies]
|
|
13
13
|
rubydex = { path = "../rubydex" }
|
|
14
14
|
clap = { version = "4.5.16", features = ["derive"] }
|
|
15
|
-
rmcp = { version = "
|
|
15
|
+
rmcp = { version = "1.4", features = ["server", "macros", "transport-io", "schemars"] }
|
|
16
16
|
tokio = { version = "1", features = ["macros", "rt", "io-std"] }
|
|
17
17
|
serde = { version = "1", features = ["derive"] }
|
|
18
18
|
serde_json = "1"
|
|
@@ -565,14 +565,13 @@ Pagination: tools that may return a high number of results include `total` for p
|
|
|
565
565
|
|
|
566
566
|
Use Grep instead for: literal string search, log messages, comments, non-Ruby files, or content search rather than structural queries."#;
|
|
567
567
|
|
|
568
|
-
#[tool_handler]
|
|
568
|
+
#[tool_handler(router = self.tool_router)]
|
|
569
569
|
impl ServerHandler for RubydexServer {
|
|
570
570
|
fn get_info(&self) -> ServerInfo {
|
|
571
|
-
ServerInfo
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
}
|
|
571
|
+
let mut info = ServerInfo::default();
|
|
572
|
+
info.instructions = Some(SERVER_INSTRUCTIONS.into());
|
|
573
|
+
info.capabilities = ServerCapabilities::builder().enable_tools().build();
|
|
574
|
+
info
|
|
576
575
|
}
|
|
577
576
|
}
|
|
578
577
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rubydex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: aarch64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Shopify
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: A high-performance static analysis suite for Ruby, built in Rust with
|
|
14
14
|
Ruby APIs
|